* lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
[gnulib.git] / ChangeLog
1 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
2
3         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
4         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
5
6 2007-03-29  Eric Blake  <ebb9@byu.net>
7
8         * lib/acl-internal.h: Remove redundant include.
9         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
10         Cygwin when a file is locked.
11
12 2007-03-29  Bruno Haible  <bruno@clisp.org>
13
14         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
15         file.
16         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
17
18 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
19
20         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
21         try to remove a parent directory if the child couldn't be removed
22         (except for the first rmdir, which could fail because the child
23         doesn't exist).  Problem reported by Jeff Blaine in
24         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
25
26 2007-03-28  Bruno Haible  <bruno@clisp.org>
27
28         * lib/striconveh.c (utf8conv_carefully): New function.
29         (mem_cd_iconveh_internal): Invoke it.
30
31 2007-03-28  Bruno Haible  <bruno@clisp.org>
32
33         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
34         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
35         input.
36         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
37         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
38         unistr/u8-uctomb.
39
40 2007-03-28  Bruno Haible  <bruno@clisp.org>
41
42         * modules/unistr/u8-mbtoucr: New file.
43         * lib/unistr/u8-mbtoucr.c: New file.
44         * modules/unistr/u16-mbtoucr: New file.
45         * lib/unistr/u16-mbtoucr.c: New file.
46         * modules/unistr/u16-mbtoucr: New file.
47         * lib/unistr/u16-mbtoucr.c: New file.
48         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
49
50 2007-03-27  Simon Josefsson  <simon@josefsson.org>
51             Bruno Haible  <bruno@clisp.org>
52
53         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
54         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
55         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
56
57         * m4/stdio_h.m4: Add stubs for vasprintf too.
58
59         * modules/stdio: Support vasprintf in sed command.
60
61         * modules/vasprintf: Depend on stdio for prototypes.  Remove
62         vasprintf.h.  Add stdio module indicator.
63
64         * lib/stdio_.h: Declare asprintf and vasprintf, based on
65         vasprintf.h.
66
67         * lib/vasprintf.h: File removed.
68
69         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
70         * lib/vasprintf.c: Ditto.
71         * lib/xvasprintf.c: Ditto.
72         * tests/test-vasprintf-posix.c: Ditto.
73         * tests/test-vasprintf.c: Ditto.
74
75 2007-03-27  Bruno Haible  <bruno@clisp.org>
76
77         Make vasnprintf multithread-safe.
78         * lib/vasnprintf.c (decimal_point_char): New function.
79         (VASNPRINTF): Use it.
80         Suggested by Simon Josefsson.
81
82 2007-03-27  Eric Blake  <ebb9@byu.net>
83
84         Support sub-second birthtime on cygwin.
85         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
86         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
87         (get_stat_birthtime): Also work with st_birthtim.
88
89 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
90
91         * lib/stat-time.h (USE_BIRTHTIME): Remove.
92         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
93         (get_stat_birthtime_ns): Do not try to use "spare" fields.
94         (get_stat_birthtime_ns): Simplify compile-time tests.
95         (get_stat_birthtime): Change the API to look like
96         get_stat_mtime etc., except return a negative tv_nsec on error.
97         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
98         Don't check for "spare" fields.
99         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
100         or for struct stat.st_birthtime, as these tests aren't used.
101         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
102
103 2007-03-27  Bruno Haible  <bruno@clisp.org>
104
105         * lib/stat-time.h: Include <sys/stat.h>.
106
107 2007-03-27  James Youngman  <jay@gnu.org>
108
109         * lib/stat-time.h (get_stat_birthtime): New function for
110           retrieving st_birthtime as provided by UFS2 (hence *BSD).
111         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
112           and its variants.
113         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
114         * modules/stat-time-test: New file.
115         * tests/test-stat-time.c: New test, devised by Bruno Haible.
116
117 2007-03-26  Bruno Haible  <bruno@clisp.org>
118
119         Better support of signalling NaNs.
120         * lib/atanl.c: Include isnanl.h.
121         (atanl): Perform test for NaN at the beginning of the function and
122         through a call to isnanl.
123         * lib/cosl.c: Include isnanl.h.
124         (cosl): Perform test for NaN at the beginning of the function and
125         through a call to isnanl.
126         * lib/ldexpl.c: Include isnanl.h.
127         (ldexpl): Perform test for NaN through a call to isnanl.
128         * lib/logl.c: Include isnanl.h.
129         (logl): Perform test for NaN at the beginning of the function and
130         through a call to isnanl.
131         * lib/sinl.c: Include isnanl.h.
132         (sinl): Perform test for NaN at the beginning of the function and
133         through a call to isnanl.
134         * lib/sqrtl.c: Include isnanl.h.
135         (sqrtl): Perform test for NaN at the beginning of the function and
136         through a call to isnanl.
137         * lib/tanl.c: Include isnanl.h.
138         (tanl): Perform test for NaN at the beginning of the function and
139         through a call to isnanl.
140         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
141         * modules/mathl (Depends-on): Add isnanl.
142
143 2007-03-26  Eric Blake  <ebb9@byu.net>
144
145         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
146         regression in logic sense of previous patch.
147
148 2007-03-26  Bruno Haible  <bruno@clisp.org>
149
150         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
151         unportable shell command "if ! ...".
152         Reported by Ralf Wildenhues.
153
154 2007-03-25  Bruno Haible  <bruno@clisp.org>
155
156         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
157         <sysexits.h> file, and only add EX_CONFIG.
158         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
159         absolute file name and whether it is sufficient. Substitute also
160         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
161         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
162         ABSOLUTE_SYSEXITS_H into sysexits.h.
163
164 2007-03-25  Bruno Haible  <bruno@clisp.org>
165
166         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
167         hints is NULL.
168
169 2007-03-25  Bruno Haible  <bruno@clisp.org>
170
171         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
172         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
173
174 2007-03-25  Bruno Haible  <bruno@clisp.org>
175
176         * lib/vasnprintf.c: Include langinfo.h.
177         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
178         multithread-safe.
179         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
180         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
181         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
182         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
183         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
184         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
185         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
186         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
187         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
188         Reported by Simon Josefsson.
189
190 2007-03-25  Bruno Haible  <bruno@clisp.org>
191
192         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
193         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
194         * modules/vasnprintf (Depends-on): Add stdint.
195
196 2007-03-25  Bruno Haible  <bruno@clisp.org>
197
198         * modules/fpieee: New file.
199         * m4/fpieee.m4: New file.
200         * modules/isnan-nolibm (Depends-on): Add fpieee.
201         * modules/isnanl-nolibm (Depends-on): Add fpieee.
202         * modules/isnanl (Depends-on): Add fpieee.
203
204 2007-03-25  Bruno Haible  <bruno@clisp.org>
205
206         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
207
208 2007-03-25  Bruno Haible  <bruno@clisp.org>
209
210         Avoid test failures on IRIX 6.5.
211         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
212         (main): Use it.
213         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
214         macros.
215         (main): Use them.
216
217 2007-03-25  Bruno Haible  <bruno@clisp.org>
218
219         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
220         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
221         exists but doesn't work.
222         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
223         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
224         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
225         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
226
227 2007-03-25  Bruno Haible  <bruno@clisp.org>
228
229         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
230         returns inf. Needed on IRIX 6.5.
231
232 2007-03-25  Bruno Haible  <bruno@clisp.org>
233
234         * tests/test-frexpl.c: Include isnanl-nolibm.h.
235         (main): Use isnanl instead of x != x idiom.
236         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
237
238         * tests/test-frexp.c: Include isnan.h.
239         (main): Use isnan instead of x != x idiom.
240         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
241
242 2007-03-25  Bruno Haible  <bruno@clisp.org>
243
244         * tests/test-frexp.c (NaN): New function/macro.
245         (main): Use it instead of 0.0 / 0.0.
246         * tests/test-isnan.c (NaN): New function/macro.
247         (main): Use it instead of 0.0 / 0.0.
248         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
249         (test_function): Use it instead of 0.0 / 0.0.
250         * tests/test-vasprintf-posix.c (NaN): New function/macro.
251         (test_function): Use it instead of 0.0 / 0.0.
252         * tests/test-snprintf-posix.h (NaN): New function/macro.
253         (test_function): Use it instead of 0.0 / 0.0.
254         * tests/test-sprintf-posix.h (NaN): New function/macro.
255         (test_function): Use it instead of 0.0 / 0.0.
256         * tests/test-fprintf-posix.h (NaN): New function/macro.
257         (test_function): Use it instead of 0.0 / 0.0.
258         * tests/test-printf-posix.h (NaN): New function/macro.
259         (test_function): Use it instead of 0.0 / 0.0.
260
261         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
262
263 2007-03-25  Bruno Haible  <bruno@clisp.org>
264
265         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
266
267 2007-03-25  Bruno Haible  <bruno@clisp.org>
268
269         * lib/regexec.c (merge_state_with_log): Make static.
270
271 2007-03-25  Bruno Haible  <bruno@clisp.org>
272
273         * lib/trigl.c (kernel_rem_pio2): Make static.
274
275 2007-03-25  Bruno Haible  <bruno@clisp.org>
276
277         * lib/sincosl.c (sincosl_table): Make static.
278
279 2007-03-25  Bruno Haible  <bruno@clisp.org>
280
281         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
282         if the compiler does not support C99.
283
284 2007-03-25  Bruno Haible  <bruno@clisp.org>
285
286         * modules/time (Makefile.am): Ensure all rule action lines start with a
287         tab.
288
289 2007-03-24  Bruno Haible  <bruno@clisp.org>
290
291         * modules/tsearch-tests: New file.
292         * tests/test-tsearch.sh: New file.
293         * tests/test-tsearch.c: New file, mostly copied from glibc.
294
295         * modules/search-tests: New file.
296         * tests/test-search.c: New file.
297
298         * modules/search: New file.
299         * lib/search_.h: New file, incorporating lib/tsearch.h.
300         * m4/search_h.m4: New file.
301         * lib/tsearch.h: Remove file.
302         * lib/tsearch.c: Include search.h instead of tsearch.h.
303         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
304         HAVE_TSEARCH.
305         * modules/tsearch (Files): Remove lib/tsearch.h.
306         (Depends-on): Add search.
307         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
308         (Include): Change tsearch.h into search.h.
309
310 2007-03-24  Bruno Haible  <bruno@clisp.org>
311
312         * modules/fpucw: New file.
313         * lib/fpucw.h: New file.
314         * lib/frexp.c: Include fpucw.h.
315         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
316         (FUNC): Use them.
317         * lib/printf-frexp.c: Include fpucw.h.
318         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
319         (FUNC): Use them.
320         * lib/vasnprintf.c: Include fpucw.h.
321         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
322         'long double' calculations.
323         * tests/test-frexpl.c: Include fpucw.h.
324         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
325         * tests/test-printf-frexpl.c: Include fpucw.h.
326         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
327         * modules/frexpl (Depends-on): Add fpucw.
328         * modules/printf-frexpl (Depends-on): Likewise.
329         * modules/fprintf-posix (Depends-on): Likewise.
330         * modules/snprintf-posix (Depends-on): Likewise.
331         * modules/sprintf-posix (Depends-on): Likewise.
332         * modules/vasnprintf-posix (Depends-on): Likewise.
333         * modules/vasprintf-posix (Depends-on): Likewise.
334         * modules/vfprintf-posix (Depends-on): Likewise.
335         * modules/vsnprintf-posix (Depends-on): Likewise.
336         * modules/vsprintf-posix (Depends-on): Likewise.
337         * modules/frexpl-tests (Depends-on): Likewise.
338         * modules/printf-frexpl-tests (Depends-on): Likewise.
339
340 2007-03-24  Bruno Haible  <bruno@clisp.org>
341
342         * lib/float+.h: New file.
343         * lib/isnan.c: Include float+.h.
344         (SIZE): New macro.
345         (FUNC): Compare only SIZE bytes of the value.
346         * lib/vasnprintf.c: Include float+.h.
347         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
348         SIZEOF_LDBL or SIZEOF_DBL bytes.
349         * modules/isnan-nolibm (Files): Add lib/float+.h.
350         * modules/isnanl-nolibm (Files): Add lib/float+.h.
351         * modules/isnanl (Files): Add lib/float+.h.
352         * modules/vasnprintf (Files): Add lib/float+.h.
353
354 2007-03-24  Bruno Haible  <bruno@clisp.org>
355
356         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
357         include isnanl-nolibm.h.
358
359 2007-03-24  Bruno Haible  <bruno@clisp.org>
360
361         * tests/test-read-file.c (main): Don't produce spurious output for
362         expected situations. Make the test fail if it encountered unexpected
363         results.
364
365 2007-03-24  Bruno Haible  <bruno@clisp.org>
366
367         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
368         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
369
370 2007-03-24  Bruno Haible  <bruno@clisp.org>
371
372         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
373
374 2007-03-24  Bruno Haible  <bruno@clisp.org>
375
376         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
377         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
378
379         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
380         * modules/utf8-ucs4: Turn into a symbolic link to module
381         unistr/u8-mbtouc.
382
383         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
384         utf8-ucs4-unsafe.
385         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
386         unistr/u8-mbtouc-unsafe.
387
388         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
389         * modules/utf16-ucs4: Turn into a symbolic link to module
390         unistr/u16-mbtouc.
391
392         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
393         utf16-ucs4-unsafe.
394         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
395         unistr/u16-mbtouc-unsafe.
396
397         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
398         * modules/ucs4-utf8: Turn into a symbolic link to module
399         unistr/u8-ubtomb.
400
401         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
402         * modules/ucs4-utf16: Turn into a symbolic link to module
403         unistr/u16-ubtomb.
404
405 2007-03-24  Bruno Haible  <bruno@clisp.org>
406
407         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
408         Enable the function only if HAVE_INLINE.
409         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
410         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
411         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
412         Enable the function only if HAVE_INLINE.
413         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
414         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
415         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
416         Enable the function only if HAVE_INLINE.
417         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
418         Enable the function only if HAVE_INLINE.
419         * modules/utf8-ucs4: Update.
420         * modules/utf8-ucs4-unsafe: Update.
421         * modules/utf16-ucs4: Update.
422         * modules/utf16-ucs4-unsafe: Update.
423         * modules/ucs4-utf8: Update.
424         * modules/ucs4-utf16: Update.
425
426 2007-03-24  Bruno Haible  <bruno@clisp.org>
427
428         * lib/utf8-ucs4.h: Remove file.
429         * lib/utf8-ucs4-unsafe.h: Remove file.
430         * lib/utf16-ucs4.h: Remove file.
431         * lib/utf16-ucs4-unsafe.h: Remove file.
432         * lib/ucs4-utf8.h: Remove file.
433         * lib/ucs4-utf16.h: Remove file.
434         * lib/unistr.h: Include their previous contents.
435         * m4/utf-ucs4.m4: Remove file.
436         * m4/ucs4-utf.m4: Remove file.
437         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
438         (Depends-on): Add unistr/base.
439         (configure.ac): Remove gl_UTF_UCS4.
440         (Makefile.am): Update.
441         (Include): Change to unistr.h.
442         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
443         (Depends-on): Add unistr/base.
444         (configure.ac): Remove gl_UTF_UCS4.
445         (Makefile.am): Update.
446         (Include): Change to unistr.h.
447         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
448         (Depends-on): Add unistr/base.
449         (configure.ac): Remove gl_UTF_UCS4.
450         (Makefile.am): Update.
451         (Include): Change to unistr.h.
452         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
453         (Depends-on): Add unistr/base.
454         (configure.ac): Remove gl_UTF_UCS4.
455         (Makefile.am): Update.
456         (Include): Change to unistr.h.
457         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
458         (Depends-on): Add unistr/base.
459         (configure.ac): Remove gl_UCS4_UTF.
460         (Makefile.am): Update.
461         (Include): Change to unistr.h.
462         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
463         (Depends-on): Add unistr/base.
464         (configure.ac): Remove gl_UCS4_UTF.
465         (Makefile.am): Update.
466         (Include): Change to unistr.h.
467         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
468         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
469         utf8-ucs4-unsafe.h.
470         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
471         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
472         utf16-ucs4-unsafe.h.
473         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
474         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
475         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
476         * lib/unistr/u8-strchr.c: Likewise.
477         * lib/unistr/u8-strrchr.c: Likewise.
478         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
479         * lib/unistr/u16-strchr.c: Likewise.
480         * lib/unistr/u16-strrchr.c: Likewise.
481         * lib/striconveh.c: Update.
482         * lib/linebreak.c: Update.
483
484 2007-03-24  Bruno Haible  <bruno@clisp.org>
485
486         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
487         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
488
489 2007-03-22  Bruno Haible  <bruno@clisp.org>
490
491         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
492
493 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
494
495         * MODULES.html.sh (File system functions): New module write-any-file.
496         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
497         * m4/write-any-file.m4: New files.
498
499 2007-03-23  Eric Blake  <ebb9@byu.net>
500
501         * gnulib-tool: Rearrange space-tab sequences, since some editors
502         like to eat them.
503
504 2007-03-23  Eric Blake  <ebb9@byu.net>
505
506         * lib/version-etc.c (version_etc_va): Update license wording to
507         be more concise.  Recommended by Richard Stallman.
508
509 2007-03-22  Bruno Haible  <bruno@clisp.org>
510
511         * lib/poll.c (MSG_PEEK): New fallback definition.
512
513 2007-03-22  Bruno Haible  <bruno@clisp.org>
514
515         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
516         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
517         (main): Update.
518         Fixes a compilation error on BeOS.
519
520 2007-03-22  Bruno Haible  <bruno@clisp.org>
521
522         * modules/frexpl-tests: New file.
523         * tests/test-frexpl.c: New file.
524
525         * modules/frexpl: New file.
526         * m4/frexpl.m4: New file.
527         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
528         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
529         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
530         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
531         (Depends-on): Add frexpl. Remove isnanl-nolibm.
532         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
533
534 2007-03-22  Bruno Haible  <bruno@clisp.org>
535
536         * lib/frexpl.c: Share code with lib/frexp.c.
537         * modules/mathl (Files): Add lib/frexp.c.
538         (Depends-on): Add isnanl-nolibm.
539
540 2007-03-22  Bruno Haible  <bruno@clisp.org>
541
542         * modules/printf-frexp (Files): Add m4/frexp.m4.
543         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
544         only if the found frexp function actually works.
545
546 2007-03-22  Bruno Haible  <bruno@clisp.org>
547
548         * lib/frexp.c: Remove older implementation that uses divisions.
549
550 2007-03-21  Bruno Haible  <bruno@clisp.org>
551
552         * modules/frexp-tests: New file.
553         * tests/test-frexp.c: New file.
554
555         * modules/frexp: New file.
556         * lib/frexp.c: New file.
557         * m4/frexp.m4: New file.
558         * lib/math_.h (frexp): New declaration.
559         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
560         REPLACE_FREXP.
561         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
562
563 2007-03-21  Bruno Haible  <bruno@clisp.org>
564
565         * modules/isnanl-tests: New file.
566         * tests/test-isnanl.c: New file.
567
568         * modules/isnanl: New file.
569         * lib/isnanl.h: New file.
570         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
571         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
572         gl_FUNC_ISNANL_WORKS.
573         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
574         New macros.
575
576 2007-03-21  Bruno Haible  <bruno@clisp.org>
577
578         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
579         lib/isnanl.h.
580         (Include): Update.
581         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
582         * lib/vasnprintf.c: Update.
583         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
584         tests/test-isnanl.h, remove tests/test-isnanl.c.
585         (Makefile.am): Update.
586         * tests/test-isnanl-nolibm.c: New file.
587         * tests/test-isnanl.h: New file.
588         * tests/test-isnanl.c: Remove file.
589
590 2007-03-21  Jim Meyering  <jim@meyering.net>
591
592         When trying to open ".", treat ESTALE like EACCES.
593         * lib/savewd.c (savewd_save): Resort to forking not just upon
594         failure with EACCES, but also when errno is ESTALE.
595
596 2007-03-20  Bruno Haible  <bruno@clisp.org>
597
598         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
599         Needed on AIX 5.1. Reported by Matthew Woehlke.
600
601 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
602
603         Suggestions by Bruno Haible:
604         * lib/acl-internal.h: Include "gettext.h" rather than rolling
605         our own.
606         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
607         * modules/acl (Depends-on): Add gettext.
608
609 2007-03-19  Bruno Haible  <bruno@clisp.org>
610
611         * modules/iconvme: Remove file.
612         * lib/iconvme.h: Remove file.
613         * lib/iconvme.c: Remove file.
614         * m4/iconvme.m4: Remove file.
615
616 2007-03-19  Bruno Haible  <bruno@clisp.org>
617
618         * doc/relocatable-maint.texi: Break long shell script line.
619         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
620
621 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
622
623         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
624         handle file_has_acl.
625         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
626         * lib/acl.c: Move header inclusions and related macro defns into
627         lib/acl-internal.h.
628         (S_ISLNK): Remove defn, since that's now done for us.
629         (file_has_acl): Move to lib/file-has-acl.c.
630         Call acl_trivial if available.  This is the crucial part of the fix.
631         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
632         shared within the library.  Rewrite a bit, partly to make it compatible
633         with the GNU coding style.
634         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
635         Remove unnecessary double-quotes.
636         Don't test for acl_to_text; the build will catch that.
637         Replace acl_entries if it doesn't exist and it is needed.
638         Check for -lsec and acl_trivial (as used on Solaris 10).
639         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
640         lib/file-has-acl.c.
641         (Depends-on): Add sys_stat, for S_ISLNK.
642
643 2007-03-19  Ben Pfaff  <blp@gnu.org>
644
645         * doc/gnulib.texi: Fix typos.
646         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
647
648 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
649
650         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
651         If size is zero here, buf must be zero.
652
653 2007-03-19  Simon Josefsson  <simon@josefsson.org>
654
655         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
656         <bruno@clisp.org>.
657
658 2007-03-18  Bruno Haible  <bruno@clisp.org>
659
660         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
661         Suggested by Eric Blake.
662
663 2007-03-18  Ben Pfaff  <blp@gnu.org>
664
665         * doc/relocatable.texi: Recommend using as prefix a directory
666         that does not exist and will never be created.  Based on
667         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
668         and others.
669
670 2007-03-17  Bruno Haible  <bruno@clisp.org>
671
672         * lib/fchownat.c: Include lchown.h.
673
674 2007-03-17  Bruno Haible  <bruno@clisp.org>
675
676         Fix endless loop when the given allocated size was > INT_MAX.
677         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
678         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
679         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
680         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
681         * lib/sprintf.c (sprintf): Likewise.
682
683 2007-03-17  Bruno Haible  <bruno@clisp.org>
684
685         * tests/test-argp-2.sh (func_compare): Output a context diff.
686
687 2007-03-17  Bruno Haible  <bruno@clisp.org>
688
689         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
690         locale's decimal-point character.
691
692 2007-03-17  Bruno Haible  <bruno@clisp.org>
693
694         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
695         before comparing it. Needed because on some platforms (e.g. x86) a
696         'long double' occupies less bytes than sizeof (long double).
697
698 2007-03-17  Bruno Haible  <bruno@clisp.org>
699
700         * tests/test-crc.c (main): Make printf statements 64-bit clean.
701         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
702         * tests/test-getaddrinfo.c (simple): Likewise.
703         * tests/test-read-file.c (main): Likewise.
704
705 2007-03-17  Bruno Haible  <bruno@clisp.org>
706
707         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
708
709 2007-03-17  Bruno Haible  <bruno@clisp.org>
710
711         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
712         unused variable.
713
714 2007-03-17  Bruno Haible  <bruno@clisp.org>
715
716         * tests/test-c-strcasecmp.c: Include c-strcase.h.
717         * tests/test-c-strncasecmp.c: Likewise.
718
719 2007-03-17  Bruno Haible  <bruno@clisp.org>
720
721         * modules/stdlib (Depends-on): Add unistd.
722         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
723         Needed for MacOS X 10.3.
724
725 2007-03-17  Bruno Haible  <bruno@clisp.org>
726
727         * lib/unistr/u-strdup.h: Include <stdlib.h>.
728
729 2007-03-17  Bruno Haible  <bruno@clisp.org>
730
731         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
732
733 2007-03-17  Bruno Haible  <bruno@clisp.org>
734
735         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
736         to reflect files copied from gnulib (with or without modifications).
737         Suggested by Jim Meyering.
738
739 2007-03-17  Eric Blake  <ebb9@byu.net>
740
741         * NEWS: Document stdlib change from 2007-02-18.
742
743 2007-03-17  Jim Meyering  <jim@meyering.net>
744
745         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
746         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
747         someone uses a name containing shell meta-characters.
748         Reported by Alfred M. Szmidt.
749
750         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
751
752 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
753
754         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
755         and copy gettext configuration files only if configure.ac contains
756         a use of AM_GNU_GETTEXT_VERSION.
757
758 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
759
760         * build-aux/bootstrap (gnulib_name): New variable.
761         (gnulib_tool_options): Use it.
762
763 2007-03-13  Simon Josefsson  <simon@josefsson.org>
764
765         * tests/test-des.c: Use new namespace.
766
767 2007-03-15  Bruno Haible  <bruno@clisp.org>
768
769         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
770         Reported by James Youngman <jay@gnu.org>.
771
772 2007-03-15  Bruno Haible  <bruno@clisp.org>
773
774         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
775         declared prototype. Needed with cc on OSF/1 5.1.
776
777 2007-03-15  Bruno Haible  <bruno@clisp.org>
778
779         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
780         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
781         (struct gl_list_implementation): Add dispose_fn argument to the
782         'create_empty', 'create' methods.
783         (struct gl_list_impl_base): Add field 'dispose_fn'.
784         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
785         argument.
786         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
787         dispose_fn argument.
788         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
789         dispose_fn on the dropped values.
790         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
791         dispose_fn argument.
792         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
793         dropped values.
794         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
795         (gl_tree_remove_node): Call dispose_fn on the dropped value.
796         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
797         (gl_tree_remove_node): Call dispose_fn on the dropped value.
798         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
799         argument.
800         (gl_tree_list_free): Call dispose_fn on the dropped values.
801         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
802         the dropped values.
803         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
804         Add dispose_fn argument.
805         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
806         Call dispose_fn on the dropped values.
807         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
808         Add dispose_fn argument.
809         (gl_sublist_create): Initialize the 'dispose_fn' field.
810         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
811         * tests/test-array_list.c (main): Update.
812         * tests/test-carray_list.c (main): Update.
813         * tests/test-avltree_list.c (main): Update.
814         * tests/test-rbtree_list.c (main): Update.
815         * tests/test-avltreehash_list.c (main): Update.
816         * tests/test-rbtreehash_list.c (main): Update.
817         * tests/test-linked_list.c (main): Update.
818         * tests/test-linkedhash_list.c (main): Update.
819         * tests/test-array_oset.c (main): Update.
820
821 2007-03-15  Bruno Haible  <bruno@clisp.org>
822
823         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
824         (gl_oset_create_empty): Add dispose_fn argument.
825         (struct gl_oset_implementation): Add dispose_fn argument to
826         'create_empty' method.
827         (struct gl_oset_impl_base): Add dispose_fn field.
828         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
829         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
830         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
831         values.
832         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
833         (gl_tree_oset_free): Call dispose_fn on the dropped values.
834         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
835         dropped value.
836         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
837         dropped value.
838         * tests/test-array_oset.c (main): Update.
839         * tests/test-avltree_oset.c (main): Update.
840         * tests/test-rbtree_oset.c (main): Update.
841         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
842
843 2007-03-13  Bruno Haible  <bruno@clisp.org>
844
845         * tests/test-stdbool.c (i): Update after last patch.
846
847 2007-03-12  Bruno Haible  <bruno@clisp.org>
848
849         * lib/quotearg.c: Include <wctype.h> early, before the definition of
850         the iswprint macro. Needed on Solaris 2.5.1.
851
852 2007-03-12  Bruno Haible  <bruno@clisp.org>
853
854         * tests/test-printf-frexp.c (main): Declare x as volatile.
855
856 2007-03-12  Simon Josefsson  <simon@josefsson.org>
857
858         * doc/gnulib.texi (Build robot for gnulib): New section.
859
860 2007-03-12  Jim Meyering  <jim@meyering.net>
861
862         * build-aux/bootstrap: New file.
863         * build-aux/bootstrap.conf: New file, from coreutils.
864
865 2007-03-11  Bruno Haible  <bruno@clisp.org>
866
867         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
868
869 2007-03-12  Simon Josefsson  <simon@josefsson.org>
870
871         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
872         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
873         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
874
875 2007-03-11  Bruno Haible  <bruno@clisp.org>
876
877         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
878         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
879
880 2007-03-11  Bruno Haible  <bruno@clisp.org>
881
882         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
883         formula. Needed for SunPRO C 5.0.
884
885 2007-03-11  Bruno Haible  <bruno@clisp.org>
886
887         * modules/long-options (Depends-on): Add getopt.
888
889 2007-03-11  Bruno Haible  <bruno@clisp.org>
890
891         * modules/modechange (Depends-on): Add stdbool.
892
893 2007-03-11  Bruno Haible  <bruno@clisp.org>
894
895         * modules/i-ring (Depends-on): Add stdbool.
896
897 2007-03-11  Bruno Haible  <bruno@clisp.org>
898
899         * modules/gc-des (Depends-on): Add stdbool.
900
901 2007-03-11  Bruno Haible  <bruno@clisp.org>
902
903         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
904
905 2007-03-11  Bruno Haible  <bruno@clisp.org>
906
907         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
908
909 2007-03-11  Bruno Haible  <bruno@clisp.org>
910
911         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
912
913 2007-03-11  Bruno Haible  <bruno@clisp.org>
914
915         * lib/vasnprintf.c (sprintf): Undefine.
916
917 2007-03-11  Bruno Haible  <bruno@clisp.org>
918
919         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
920         initializers in SunPRO C and Compaq C compilers.
921
922 2007-03-11  Bruno Haible  <bruno@clisp.org>
923
924         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
925         decrementing code ANSI C compliant.
926
927 2007-03-11  Bruno Haible  <bruno@clisp.org>
928
929         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
930         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
931
932 2007-03-11  Bruno Haible  <bruno@clisp.org>
933
934         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
935         <stdbool.h> substitute doesn't pass.
936
937 2007-03-11  Bruno Haible  <bruno@clisp.org>
938
939         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
940
941 2007-03-11  Bruno Haible  <bruno@clisp.org>
942
943         * gnulib-tool (func_create_megatestdir): Create also an autobuild
944         script, for submission to autobuild.josefsson.org.
945
946 2007-03-10  Bruno Haible  <bruno@clisp.org>
947
948         * modules/canonicalize-lgpl-tests: New file.
949         * tests/test-canonicalize-lgpl.sh: New file.
950         * tests/test-canonicalize-lgpl.c: New file.
951
952         * modules/c-strcase-tests: New file.
953         * tests/test-c-strcase.sh: New file.
954         * tests/test-c-strcasecmp.c: New file.
955         * tests/test-c-strncasecmp.c: New file.
956
957         * modules/atexit-tests: New file.
958         * tests/test-atexit.sh: New file.
959         * tests/test-atexit.c: New file.
960
961 2007-03-10  Bruno Haible  <bruno@clisp.org>
962
963         * tests/test-binary-io.sh: Use temporary filenames that are not so
964         likely to clash with those of other tests (in a parallel make).
965         * tests/test-binary-io.c: Likewise.
966
967 2007-03-10  Bruno Haible  <bruno@clisp.org>
968
969         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
970         fallback; use #error instead.
971         Suggested by Simon Josefsson.
972
973 2007-03-10  Bruno Haible  <bruno@clisp.org>
974
975         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
976         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
977         first and the last.
978
979 2007-03-10  Bruno Haible  <bruno@clisp.org>
980
981         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
982
983 2007-03-10  Bruno Haible  <bruno@clisp.org>
984
985         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
986         "make distcheck".
987         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
988         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
989         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
990
991 2007-03-10  Bruno Haible  <bruno@clisp.org>
992
993         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
994         variable.
995         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
996         variable.
997
998 2007-03-09  Eric Blake  <ebb9@byu.net>
999         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
1000
1001         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
1002         types are not being provided by gnulib.
1003         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
1004         types are supported.
1005
1006 2007-03-10  Bruno Haible  <bruno@clisp.org>
1007
1008         * lib/stdio_.h (__attribute__): New macro.
1009         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
1010         vsprintf): Specify __attribute__ __format__ for GCC.
1011         Suggested by Eric Blake.
1012
1013 2007-03-09  Bruno Haible  <bruno@clisp.org>
1014
1015         * modules/printf-posix-tests: New file.
1016         * tests/test-printf-posix.sh: New file.
1017         * tests/test-printf-posix.c: New file.
1018
1019         * modules/printf-posix: New file.
1020         * lib/printf.c: New file.
1021         * m4/printf-posix-rpl.m4: New file.
1022         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
1023         REPLACE_PRINTF.
1024         * lib/stdio_.h (printf): New declaration.
1025         (format, __format__, ____printf____, ____scanf____, ____strftime____,
1026         ____strfmon____): New macros.
1027         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
1028         REPLACE_PRINTF.
1029
1030 2007-03-09  Bruno Haible  <bruno@clisp.org>
1031
1032         * tests/test-vasnprintf-posix2.sh: New file.
1033         * tests/test-vasnprintf-posix2.c: New file.
1034         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
1035         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
1036         (Makefile.am): Activate test-vasnprintf-posix2.sh.
1037
1038         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
1039         a locale dependent decimal point, rather than always '.'.
1040
1041 2007-03-09  Eric Blake  <ebb9@byu.net>
1042
1043         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
1044         spite of platforms like Tandem/NSK that define it to -1.
1045
1046 2007-03-08  Bruno Haible  <bruno@clisp.org>
1047
1048         * modules/vprintf-posix-tests: New file.
1049         * tests/test-vprintf-posix.sh: New file.
1050         * tests/test-vprintf-posix.c: New file.
1051         * tests/test-printf-posix.h: New file.
1052
1053         * modules/vprintf-posix: New file.
1054         * lib/vprintf.c: New file.
1055         * m4/vprintf-posix.m4: New file.
1056         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
1057         REPLACE_VPRINTF.
1058         * lib/stdio_.h (vprintf): New declaration.
1059         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
1060         REPLACE_VPRINTF.
1061
1062 2007-03-08  Bruno Haible  <bruno@clisp.org>
1063
1064         * modules/fprintf-posix-tests: New file.
1065         * tests/test-fprintf-posix.sh: New file.
1066         * tests/test-fprintf-posix.c: New file.
1067
1068         * modules/fprintf-posix: New file.
1069         * lib/fprintf.c: New file.
1070         * m4/fprintf-posix.m4: New file.
1071         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
1072         REPLACE_FPRINTF.
1073         * lib/stdio_.h (fprintf): New declaration.
1074         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
1075         REPLACE_FPRINTF.
1076
1077 2007-03-08  Bruno Haible  <bruno@clisp.org>
1078
1079         * modules/vfprintf-posix-tests: New file.
1080         * tests/test-vfprintf-posix.sh: New file.
1081         * tests/test-vfprintf-posix.c: New file.
1082         * tests/test-fprintf-posix.h: New file.
1083         * tests/test-fprintf-posix.out: New file.
1084
1085         * modules/vfprintf-posix: New file.
1086         * lib/vfprintf.c: New file.
1087         * m4/vfprintf-posix.m4: New file.
1088         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
1089         REPLACE_VFPRINTF.
1090         * lib/stdio_.h (vfprintf): New declaration.
1091         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
1092         REPLACE_VFPRINTF.
1093
1094 2007-03-08  Bruno Haible  <bruno@clisp.org>
1095
1096         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
1097
1098 2007-03-08  Bruno Haible  <bruno@clisp.org>
1099
1100         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
1101         instead of 'expr' invocations.
1102         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1103         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1104         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1105         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1106         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1107         Suggested by Paul Eggert.
1108
1109 2007-03-08  Bruno Haible  <bruno@clisp.org>
1110
1111         * modules/fseterr-tests: New file.
1112         * tests/test-fseterr.c: New file.
1113
1114         * modules/fseterr: New file.
1115         * lib/fseterr.h: New file.
1116         * lib/fseterr.c: New file.
1117
1118 2007-03-08  Bruno Haible  <bruno@clisp.org>
1119
1120         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
1121         * lib/getopt_.h: Likewise.
1122         * lib/mbswidth.h: Likewise.
1123         * lib/setenv.h: Likewise.
1124         * lib/vasnprintf.h: Likewise.
1125         * lib/vasprintf.h: Likewise.
1126         * lib/verror.h: Likewise.
1127         * lib/xsetenv.h: Likewise.
1128         * lib/xvasprintf.h: Likewise.
1129
1130 2007-03-08  Jim Meyering  <jim@meyering.net>
1131
1132         * users.txt: Add parted.
1133
1134         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
1135
1136 2007-03-07  Bruno Haible  <bruno@clisp.org>
1137
1138         * m4/printf.m4: Make the shell script snippets copy&pastable.
1139
1140 2007-03-02  Bruno Haible  <bruno@clisp.org>
1141
1142         * lib/netinet_in_.h: New file.
1143         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
1144         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
1145         * modules/netinet_in (Files): Add lib/netinet_in_.h.
1146         (Depends-on): Add absolute-header.
1147         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
1148         into netinet/in.h.
1149
1150 2007-03-03  Bruno Haible  <bruno@clisp.org>
1151
1152         * lib/sys_select_.h: New file.
1153         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
1154         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
1155         * modules/sys_select (Files): Add lib/sys_select_.h.
1156         (Depends-on): Add absolute-header.
1157         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
1158         into sys/select.h.
1159
1160 2007-03-02  Bruno Haible  <bruno@clisp.org>
1161
1162         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
1163         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
1164         values.
1165         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
1166         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
1167         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
1168         * modules/sys_socket (Depends-on): Add absolute-header.
1169         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
1170         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
1171         (Include): Remove requirement of inclusion of <sys/types.h>.
1172
1173 2007-03-02  Bruno Haible  <bruno@clisp.org>
1174
1175         * lib/byteswap_.h (bswap_32): Fix formula.
1176
1177 2007-03-06  Bruno Haible  <bruno@clisp.org>
1178
1179         * modules/sprintf-posix-tests: New file.
1180         * tests/test-sprintf-posix.c: New file.
1181
1182         * modules/sprintf-posix: New file.
1183         * lib/sprintf.c: New file.
1184         * m4/sprintf-posix.m4: New file.
1185         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
1186         REPLACE_SPRINTF.
1187         * lib/stdio_.h (sprintf): New declaration.
1188         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
1189         REPLACE_SPRINTF.
1190
1191 2007-03-06  Bruno Haible  <bruno@clisp.org>
1192
1193         * modules/vsprintf-posix-tests: New file.
1194         * tests/test-vsprintf-posix.c: New file.
1195         * tests/test-sprintf-posix.h: New file.
1196
1197         * modules/vsprintf-posix: New file.
1198         * lib/vsprintf.c: New file.
1199         * m4/vsprintf-posix.m4: New file.
1200         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
1201         REPLACE_VSPRINTF.
1202         * lib/stdio_.h (vsprintf): New declaration.
1203         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
1204         REPLACE_VSPRINTF.
1205
1206 2007-03-06  Bruno Haible  <bruno@clisp.org>
1207
1208         * modules/vsnprintf (Depend-on): Remove minmax.
1209
1210 2007-03-06  Bruno Haible  <bruno@clisp.org>
1211
1212         * modules/snprintf-posix-tests: New file.
1213         * tests/test-snprintf-posix.c: New file.
1214
1215         * modules/snprintf-posix: New file.
1216         * m4/snprintf-posix.m4: New file.
1217         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
1218         gl_FUNC_SNPRINTF.
1219         (gl_FUNC_SNPRINTF): Invoke it.
1220         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
1221         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
1222         is set.
1223         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
1224
1225 2007-03-06  Bruno Haible  <bruno@clisp.org>
1226
1227         * modules/vsnprintf-posix-tests: New file.
1228         * tests/test-vsnprintf-posix.c: New file.
1229         * tests/test-snprintf-posix.h: New file.
1230
1231         * modules/vsnprintf-posix: New file.
1232         * m4/vsnprintf-posix.m4: New file.
1233         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
1234         gl_FUNC_VSNPRINTF.
1235         (gl_FUNC_VSNPRINTF): Invoke it.
1236         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
1237         * lib/stdio_.h (vsnprintf): Define as a replacement if
1238         REPLACE_VSNPRINTF is set.
1239         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
1240
1241 2007-03-06  Bruno Haible  <bruno@clisp.org>
1242
1243         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
1244         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
1245
1246 2007-03-06  Bruno Haible  <bruno@clisp.org>
1247
1248         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
1249         (asinl): Declare also if HAVE_DECL_ASINL is set.
1250         (atanl): Declare also if HAVE_DECL_ATANL is set.
1251         (ceill): Declare also if HAVE_DECL_CEILL is set.
1252         (cosl): Declare also if HAVE_DECL_COSL is set.
1253         (expl): Declare also if HAVE_DECL_EXPL is set.
1254         (floorl): Declare also if HAVE_DECL_FLOORL is set.
1255         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
1256         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
1257         (logl): Declare also if HAVE_DECL_LOGL is set.
1258         (sinl): Declare also if HAVE_DECL_SINL is set.
1259         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
1260         (tanl): Declare also if HAVE_DECL_TANL is set.
1261         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
1262         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
1263         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
1264         declaration of frexpl, ldexpl.
1265         * modules/printf-frexpl (Depends-on): Add math.
1266         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
1267
1268 2007-03-05  Bruno Haible  <bruno@clisp.org>
1269
1270         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
1271         frexpl and ldexpl are declared.
1272         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
1273
1274 2007-03-05  Bruno Haible  <bruno@clisp.org>
1275
1276         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
1277         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
1278
1279 2007-03-05  Bruno Haible  <bruno@clisp.org>
1280
1281         * lib/stdio_.h: Include <stddef.h>.
1282
1283 2007-03-05  Bruno Haible  <bruno@clisp.org>
1284
1285         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
1286
1287 2007-03-05  Bruno Haible  <bruno@clisp.org>
1288
1289         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
1290         NetBSD 4, from Ralf Wildenhues.
1291
1292 2007-03-04  Bruno Haible  <bruno@clisp.org>
1293
1294         * lib/vasprintf.h: Update #if logic for the case when the functions
1295         exist but are overridden.
1296
1297 2007-03-04  Bruno Haible  <bruno@clisp.org>
1298
1299         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
1300         implementations: glibc-2.4 and MacOS X 10.3.
1301         * tests/test-vasnprintf-posix.c (test_function): Test also the case
1302         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
1303         * tests/test-vasprintf-posix.c (test_function): Likewise.
1304
1305 2007-03-04  Bruno Haible  <bruno@clisp.org>
1306
1307         * modules/vasprintf-posix-tests: New file.
1308         * tests/test-vasprintf-posix.c: New file.
1309
1310         * modules/vasprintf-posix: New file.
1311         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
1312         defined.
1313         * m4/vasprintf-posix.m4: New file.
1314         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
1315         gl_FUNC_VASPRINTF.
1316         (gl_FUNC_VASPRINTF): Invoke it.
1317         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
1318         here.
1319         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
1320
1321 2007-03-04  Bruno Haible  <bruno@clisp.org>
1322
1323         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
1324         REPLACE_GETTIMEOFDAY.
1325         * modules/sys_time (Makefile.am): Likewise.
1326         * m4/sys_time_h.m4: Likewise.
1327         * m4/gettimeofday.m4: Likewise.
1328
1329 2007-03-04  Bruno Haible  <bruno@clisp.org>
1330
1331         * modules/vasnprintf-posix-tests: New file.
1332         * tests/test-vasnprintf-posix.c: New file.
1333
1334         * modules/vasnprintf-posix: New file.
1335         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
1336         printf-frexpl.h.
1337         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
1338         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
1339         REPLACE_VASNPRINTF is defined.
1340         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
1341         gl_FUNC_VASNPRINTF.
1342         (gl_FUNC_VASNPRINTF): Invoke it.
1343         * m4/vasnprintf-posix.m4: New file.
1344         * m4/printf.m4: New file.
1345
1346 2007-03-04  Bruno Haible  <bruno@clisp.org>
1347
1348         Compile progreloc.c only if --enable-relocatable is specified.
1349         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
1350         if --enable-relocatable was specified.
1351         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
1352         lib_SOURCES.
1353
1354 2007-03-04  Jim Meyering  <jim@meyering.net>
1355
1356         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
1357         Use it consistently, rather than enumerating errno constants.
1358
1359 2007-03-04  Bruno Haible  <bruno@clisp.org>
1360
1361         * modules/xvasprintf-tests: New file.
1362         * tests/test-xvasprintf.c: New file.
1363
1364         * modules/vasprintf-tests: New file.
1365         * tests/test-vasprintf.c: New file.
1366
1367         * modules/vasnprintf-tests: New file.
1368         * tests/test-vasnprintf.c: New file.
1369
1370         * modules/vsnprintf-tests: New file.
1371         * tests/test-vsnprintf.c: New file.
1372
1373         * modules/snprintf-tests: New file.
1374         * tests/test-snprintf.c: New file.
1375
1376 2007-03-04  Bruno Haible  <bruno@clisp.org>
1377
1378         Compile relocatable.c only if --enable-relocatable is specified.
1379         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
1380         gl_RELOCATABLE_LIBRARY.
1381         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
1382         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
1383         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
1384         gl_RELOCATABLE_LIBRARY.
1385         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
1386         (Makefile.am): Remove lib_SOURCES.
1387         * modules/relocatable-lib-lgpl (configure.ac): Invoke
1388         gl_RELOCATABLE_LIBRARY.
1389         (Makefile.am): Remove lib_SOURCES.
1390         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
1391         always.
1392         * modules/relocatable-prog-wrapper (configure.ac): Invoke
1393         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
1394
1395 2007-03-04  Bruno Haible  <bruno@clisp.org>
1396
1397         * modules/argmatch-tests: New file.
1398         * tests/test-argmatch.c: New file.
1399
1400         * tests/test-allocsa.c (main): Halve the number of loop runs.
1401
1402         * modules/alloca-opt-tests: New file.
1403         * tests/test-alloca-opt.c: New file.
1404
1405 2007-03-04  Jim Meyering  <jim@meyering.net>
1406
1407         Work around difference between Linux ACLs and Solaris 10 ZFS.
1408         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
1409         for EINVAL.
1410
1411 2007-03-03  Bruno Haible  <bruno@clisp.org>
1412
1413         * modules/relocatable-prog (Depends-on): Add back progreloc's
1414         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
1415
1416 2007-03-03  Bruno Haible  <bruno@clisp.org>
1417
1418         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
1419         * modules/relocatable-lib: New file.
1420
1421 2007-03-03  Bruno Haible  <bruno@clisp.org>
1422
1423         * modules/relocatable-prog: Renamed from modules/relocatable.
1424         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
1425
1426 2007-03-03  Bruno Haible  <bruno@clisp.org>
1427
1428         * modules/relocatable-script (Files): Add doc/relocatable.texi,
1429         m4/relocatable-lib.m4.
1430         (Depends-on): Remove 'relocatable'.
1431         (configure.ac): Add gl_RELOCATABLE_NOP.
1432
1433 2007-03-03  Bruno Haible  <bruno@clisp.org>
1434
1435         * modules/relocatable-prog-wrapper: New file.
1436         * modules/relocatable (Depends-on): Add it. Remove all other
1437         dependencies except progname.
1438         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
1439
1440         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
1441         (gl_FUNC_STRERROR): Nop.
1442         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
1443
1444         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
1445         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
1446
1447         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
1448         (gl_FUNC_READLINK): Update.
1449
1450         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
1451
1452 2007-03-03  Bruno Haible  <bruno@clisp.org>
1453
1454         * lib/xreadlink.c: Include <unistd.h> unconditionally.
1455         * modules/xreadlink (Depends-on): Add unistd.
1456         * modules/xreadlink-with-size (Depends-on): Likewise.
1457
1458 2007-03-03  Bruno Haible  <bruno@clisp.org>
1459
1460         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
1461         extracted from gt_FUNC_SETENV.
1462         (gt_FUNC_SETENV): Remove macro.
1463         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
1464         remove gt_FUNC_SETENV.
1465
1466 2007-03-03  Bruno Haible  <bruno@clisp.org>
1467
1468         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
1469         ENABLE_RELOCATABLE here.
1470         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
1471
1472 2007-03-03  Bruno Haible  <bruno@clisp.org>
1473
1474         * modules/rbtreehash-list-tests (Depends-on): Add progname.
1475         * tests/test-rbtreehash_list.c: Include progname.h.
1476         (main): Call set_program_name.
1477
1478         * modules/rbtree-oset-tests (Depends-on): Add progname.
1479         * tests/test-rbtree_oset.c: Include progname.h.
1480         (main): Call set_program_name.
1481
1482         * modules/rbtree-list-tests (Depends-on): Add progname.
1483         * tests/test-rbtree_list.c: Include progname.h.
1484         (main): Call set_program_name.
1485
1486         * modules/linked-list-tests (Depends-on): Add progname.
1487         * tests/test-linked_list.c: Include progname.h.
1488         (main): Call set_program_name.
1489
1490 2007-03-03  Bruno Haible  <bruno@clisp.org>
1491
1492         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
1493         All uses of __restrict changed to _Restrict_.
1494         * lib/glob_.h (__restrict): Remove macro.
1495
1496 2007-03-02  Bruno Haible  <bruno@clisp.org>
1497
1498         * modules/gettext (configure.ac): Require gettext infrastructure
1499         from version 0.16.1.
1500
1501 2007-03-02  Bruno Haible  <bruno@clisp.org>
1502
1503         * modules/linkedhash-list-tests (Depends-on): Add progname.
1504         * tests/test-linkedhash_list.c: Include progname.h.
1505         (main): Call set_program_name.
1506
1507         * modules/carray-list-tests (Depends-on): Add progname.
1508         * tests/test-carray_list.c: Include progname.h.
1509         (main): Call set_program_name.
1510
1511         * modules/avltreehash-list-tests (Depends-on): Add progname.
1512         * tests/test-avltreehash_list.c: Include progname.h.
1513         (main): Call set_program_name.
1514
1515         * modules/avltree-oset-tests (Depends-on): Add progname.
1516         * tests/test-avltree_oset.c: Include progname.h.
1517         (main): Call set_program_name.
1518
1519         * modules/avltree-list-tests (Depends-on): Add progname.
1520         * tests/test-avltree_list.c: Include progname.h.
1521         (main): Call set_program_name.
1522
1523         * modules/array-oset-tests (Depends-on): Add progname.
1524         * tests/test-array_oset.c: Include progname.h.
1525         (main): Call set_program_name.
1526
1527         * modules/array-list-tests (Depends-on): Add progname.
1528         * tests/test-array_list.c: Include progname.h.
1529         (main): Call set_program_name.
1530
1531         * modules/argp-tests (Depends-on): Add progname.
1532         * tests/test-argp.c: Include argp.h first. Include progname.h.
1533         (main): Call set_program_name.
1534
1535 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
1536
1537         * doc/gnulib-tool.texi (Initial import): Reword description of
1538         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
1539         limited effect even if defined after the first system include.
1540
1541 2007-03-01  Bruno Haible  <bruno@clisp.org>
1542
1543         * build-aux/config.libpath: Update to libtool-1.5.22.
1544         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
1545
1546 2007-03-01  Bruno Haible  <bruno@clisp.org>
1547
1548         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
1549         foo_CFLAGS.
1550         Reported by Ralf Wildenhues.
1551
1552 2007-03-01  Bruno Haible  <bruno@clisp.org>
1553
1554         * build-aux/install-reloc: Remove object files left over by some
1555         compilers.
1556         Reported by Ralf Wildenhues.
1557
1558 2007-03-01  Bruno Haible  <bruno@clisp.org>
1559
1560         * build-aux/install-reloc: Break long lines.
1561
1562 2007-03-01  Bruno Haible  <bruno@clisp.org>
1563
1564         * doc/relocatable.texi: Document that it may not work on OpenBSD.
1565         Reported by Ralf Wildenhues.
1566
1567 2007-03-01  Bruno Haible  <bruno@clisp.org>
1568
1569         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
1570         include ordering constraints.
1571
1572 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
1573
1574         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
1575         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
1576         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
1577         as another example.
1578         * lib/time_.h: Fix misspelling.
1579         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1580         Require gl_HEADER_TIME_H_DEFAULTS.
1581         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
1582         * m4/time_r.m4 (gl_TIME_R): Likewise.
1583         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
1584
1585 2007-03-01  Bruno Haible  <bruno@clisp.org>
1586
1587         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
1588         * m4/utimens.m4 (gl_UTIMENS): Likewise.
1589
1590 2007-03-01  Jim Meyering  <jim@meyering.net>
1591
1592         * modules/xreadlink (Maintainer): Add my name.
1593         * modules/xreadlink-with-size (Depends-on): Alphabetize.
1594
1595 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
1596             Bruno Haible  <bruno@clisp.org>
1597
1598         * build-aux/install-reloc: Compile also c-ctype.c.
1599         * build-aux/relocatable.sh.in: New file.
1600         * doc/relocatable.texi: New file.
1601         * doc/relocatable-maint.texi: New file.
1602         * doc/gnulib.texi: Include relocatable-maint.texi.
1603         * lib/progreloc.c: Include unistd.h unconditionally.
1604         * lib/relocwrapper.c: Include unistd.h unconditionally.
1605         Include c-ctype.h.
1606         (add_dotbin): Use c_tolower.
1607         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
1608         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
1609         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
1610         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
1611         to m4/relocatable-lib.m4.
1612         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
1613         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
1614         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
1615         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
1616         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
1617         * modules/relocatable: New file.
1618         * modules/relocatable-lib: New file.
1619         * modules/relocatable-script: New file.
1620
1621 2007-02-28  Bruno Haible  <bruno@clisp.org>
1622
1623         Import --enable-relocatable infrastructure.
1624         * build-aux/config.libpath: New file, from GNU gettext.
1625         * build-aux/install-reloc: New file, from GNU gettext.
1626         * build-aux/reloc-ldflags: New file, from GNU gettext.
1627         * lib/relocatable.h: New file, from GNU gettext.
1628         * lib/relocatable.c: New file, from GNU gettext.
1629         * lib/relocwrapper.c: New file, from GNU gettext.
1630         * m4/relocatable.m4: New file, from GNU gettext.
1631
1632 2007-02-28  Bruno Haible  <bruno@clisp.org>
1633
1634         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
1635
1636         * modules/xreadlink: New file, from GNU gettext with modifications.
1637         * lib/xreadlink.c: New file, from GNU gettext.
1638         * lib/xreadlink.h: Add comments.
1639         (xreadlink): New declaration.
1640
1641         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
1642         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
1643         lib/xreadlink-with-size.c.
1644         (configure.ac): Remove gl_XREADLINK invocation.
1645         (Makefile.am): Augment lib_SOURCES.
1646         * m4/xreadlink.m4: Remove file.
1647         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
1648         (xreadlink_with_size): Renamed from xreadink.
1649         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
1650         * modules/canonicalize (Depends-on): Replace xreadlink with
1651         xreadlink-with-size.
1652         * lib/canonicalize.c (canonicalize_filename_mode): Update.
1653
1654 2007-02-25  Jim Meyering  <jim@meyering.net>
1655
1656         * build-aux/announce-gen: When complaining about excess arguments,
1657         list them.
1658
1659 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
1660
1661         * README: Document signed integer overflow situation more
1662         accurately.
1663
1664 2007-02-25  Bruno Haible  <bruno@clisp.org>
1665
1666         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
1667         'a' or 'A' conversion.
1668
1669 2007-02-25  Bruno Haible  <bruno@clisp.org>
1670
1671         * modules/filename: Renamed from modules/pathname.
1672         (Files): Replace lib/pathname.h with lib/filename.h. Replace
1673         lib/concatpath.c with lib/concat-filename.c.
1674         (Makefile.am): Update.
1675         (Include): Replace pathname.h with filename.h.
1676         * lib/filename.h: Renamed from lib/pathname.h.
1677         (concatenated_filename): Renamed from concatenated_pathname.
1678         * lib/concat-filename.c: Renamed from lib/concatpath.c.
1679         (concatenated_filename): Renamed from concatenated_pathname.
1680         * lib/findprog.c: Include filename.h instead of pathname.h.
1681         (find_in_path): Update.
1682         * lib/javacomp.c: Include filename.h instead of pathname.h.
1683         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
1684         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
1685         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
1686         is_oldgcj_14_13_usable, is_javac_usable): Update.
1687         * lib/javaexec.c: Include filename.h instead of pathname.h.
1688         (execute_java_class): Update.
1689         * modules/findprog: Update.
1690         * modules/javacomp: Update.
1691         * modules/javaexec: Update.
1692         * MODULES.html.sh (File system functions): Add 'filename', remove
1693         'pathname'.
1694
1695 2007-02-25  Bruno Haible  <bruno@clisp.org>
1696
1697         * modules/printf-frexpl-tests: New file.
1698         * tests/test-printf-frexpl.c: New file.
1699
1700         * modules/printf-frexpl: New file.
1701         * lib/printf-frexpl.h: New file.
1702         * lib/printf-frexpl.c: New file.
1703         * m4/printf-frexpl.m4: New file.
1704
1705 2007-02-25  Bruno Haible  <bruno@clisp.org>
1706
1707         * modules/printf-frexp-tests: New file.
1708         * tests/test-printf-frexp.c: New file.
1709
1710         * modules/printf-frexp: New file.
1711         * lib/printf-frexp.h: New file.
1712         * lib/printf-frexp.c: New file.
1713         * m4/printf-frexp.m4: New file.
1714
1715 2007-02-25  Bruno Haible  <bruno@clisp.org>
1716
1717         Assume automake >= 1.10 for the tests.
1718         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
1719         * modules/arctwo-tests: Likewise.
1720         * modules/argp-tests: Likewise.
1721         * modules/avltree-list-tests: Likewise.
1722         * modules/avltree-oset-tests: Likewise.
1723         * modules/avltreehash-list-tests: Likewise.
1724         * modules/carray-list-tests: Likewise.
1725         * modules/crc-tests: Likewise.
1726         * modules/des-tests: Likewise.
1727         * modules/gc-arcfour-tests: Likewise.
1728         * modules/gc-arctwo-tests: Likewise.
1729         * modules/gc-des-tests: Likewise.
1730         * modules/gc-hmac-md5-tests: Likewise.
1731         * modules/gc-hmac-sha1-tests: Likewise.
1732         * modules/gc-md2-tests: Likewise.
1733         * modules/gc-md4-tests: Likewise.
1734         * modules/gc-md5-tests: Likewise.
1735         * modules/gc-pbkdf2-sha1-tests: Likewise.
1736         * modules/gc-rijndael-tests: Likewise.
1737         * modules/gc-sha1-tests: Likewise.
1738         * modules/gc-tests: Likewise.
1739         * modules/getaddrinfo-tests: Likewise.
1740         * modules/hmac-md5-tests: Likewise.
1741         * modules/hmac-sha1-tests: Likewise.
1742         * modules/linked-list-tests: Likewise.
1743         * modules/linkedhash-list-tests: Likewise.
1744         * modules/lock-tests: Likewise.
1745         * modules/md2-tests: Likewise.
1746         * modules/md4-tests: Likewise.
1747         * modules/md5-tests: Likewise.
1748         * modules/rbtree-list-tests: Likewise.
1749         * modules/rbtree-oset-tests: Likewise.
1750         * modules/rbtreehash-list-tests: Likewise.
1751         * modules/read-file-tests: Likewise.
1752         * modules/rijndael-tests: Likewise.
1753         * modules/stdint-tests: Likewise.
1754         * modules/tls-tests: Likewise.
1755
1756 2007-02-24  Bruno Haible  <bruno@clisp.org>
1757
1758         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
1759         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
1760         function; instead check whether isnan with a double argument links.
1761         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
1762         function; instead check whether isnan with a 'long double' argument
1763         links.
1764         Reported by Eric Blake <ebb9@byu.net>.
1765
1766 2007-02-24  Bruno Haible  <bruno@clisp.org>
1767
1768         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
1769         defined.
1770         * lib/isnanl.c: Remove all code. Just include isnan.c.
1771         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
1772
1773 2007-02-25  Jim Meyering  <jim@meyering.net>
1774
1775         Avoid conflicting types for 'unsetenv' on FreeBSD.
1776         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
1777         conflicting with FreeBSD's (5.0 and 6.1) function declaration
1778         in stdlib.h.
1779
1780 2007-02-24  Bruno Haible  <bruno@clisp.org>
1781
1782         * modules/isnanl-nolibm-tests: New file.
1783         * tests/test-isnanl.c: New file.
1784
1785         * modules/isnanl-nolibm: New file.
1786         * lib/isnanl.h: New file.
1787         * lib/isnanl.c: New file.
1788         * m4/isnanl.m4: New file.
1789
1790 2007-02-24  Bruno Haible  <bruno@clisp.org>
1791
1792         * modules/isnan-nolibm-tests: New file.
1793         * tests/test-isnan.c: New file.
1794
1795         * modules/isnan-nolibm: New file.
1796         * lib/isnan.h: New file.
1797         * lib/isnan.c: New file.
1798         * m4/isnan.m4: New file.
1799
1800 2007-02-24  Bruno Haible  <bruno@clisp.org>
1801
1802         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
1803         assume that an exponent fits in 20 bits.
1804
1805 2007-02-24  Jim Meyering  <jim@meyering.net>
1806
1807         * m4/regex.m4: Update the description of the configure-time option,
1808         --without-included-regex, to state accurately what the defaults are,
1809         and perhaps to give people an idea why using this option is risky.
1810
1811 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
1812
1813         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
1814         loops on small arguments.  This attempts to avoid the problem
1815         Bruno Haible reported for AIX 4.3.2 in
1816         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
1817
1818 2007-02-23  Bruno Haible  <bruno@clisp.org>
1819
1820         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
1821         Needed for help2man.
1822
1823 2007-02-23  Karl Berry  <karl@gnu.org>
1824
1825         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
1826         exists, foo.h should be cvs-ignored, not committed.
1827
1828 2007-02-23  Eric Blake  <ebb9@byu.net>
1829
1830         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
1831         * lib/stat-time.h (includes): Likewise.
1832         * lib/utimecmp.c (includes): Likewise.
1833         * lib/utimens.h (includes): Likewise.
1834         * lib/getdate.y (includes): Also include "timespec.h" for use
1835         internal to the module.
1836         * modules/utimens (Depends-on): Revert yesterday's patch.
1837         * modules/nanosleep (Depends-on): Add missing dependency.
1838
1839 2007-02-22  Bruno Haible  <bruno@clisp.org>
1840
1841         * lib/glob.c: Don't include getlogin_r.h.
1842
1843 2007-02-22  Jim Meyering  <jim@meyering.net>
1844
1845         * modules/utimens (Depends-on): Add timespec, required for
1846         utimens.h's inclusion of timespec.h.
1847
1848 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
1849
1850         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
1851         long unreadable paths in GNU/Linux.  Problem reported by Andreas
1852         Schwab in
1853         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
1854         I'll try to think of a better way to fix the Solaris problem.
1855
1856         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
1857         like glibc; on Solaris 10, it fails with errno == EINVAL.
1858         POSIX says the behavior is unspecified if the first argument is NULL,
1859         so play it safe and never pass NULL to the system getcwd.
1860
1861 2007-02-21  Jim Meyering  <jim@meyering.net>
1862
1863         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
1864         of gettimeofday.  It would conflict with the one now always
1865         provided via sys_time_.h.  Reported by Matthew Woehlke, as
1866         an IRIX 6.5 build failure.
1867
1868 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
1869
1870         Minor fixups to port to Solaris 10 with Sun C 5.8.
1871         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
1872         * modules/getcwd (Depends-on): Add dirfd.
1873         * lib/putenv.c (putenv): #undef it.
1874         (rpl_putenv): New decl.
1875         (malloc, free): Include <stdlib.h> rather than prototyping separately.
1876
1877 2007-02-20  Bruno Haible  <bruno@clisp.org>
1878
1879         * modules/stdio-tests: New file.
1880         * tests/test-stdio.c: New file.
1881
1882         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
1883         (Depends-on): Add stdio.
1884         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
1885         (Include): Use <stdio.h> instead of vsnprintf.h.
1886         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
1887         HAVE_DECL_VSNPRINTF.
1888         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
1889
1890         * modules/snprintf (Files): Remove lib/snprintf.h.
1891         (Depends-on): Add stdio.
1892         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
1893         (Include): Use <stdio.h> instead of snprintf.h.
1894         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
1895         HAVE_DECL_SNPRINTF.
1896         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
1897         * lib/getaddrinfo.c: Likewise.
1898
1899         * modules/stdio: New file.
1900         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
1901         * lib/snprintf.h: Remove file.
1902         * lib/vsnprintf.h: Remove file.
1903         * lib/.cppi-disable: Remove snprintf.h.
1904         * m4/stdio_h.m4: New file.
1905         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
1906
1907 2007-02-20  Jim Meyering  <jim@meyering.net>
1908
1909         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
1910         used by e.g., mingw.  From Bruno Haible.
1911
1912 2007-02-19  Bruno Haible  <bruno@clisp.org>
1913
1914         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
1915         warnings.
1916         Reported by Ben Pfaff <blp@cs.stanford.edu>.
1917
1918 2007-02-19  Bruno Haible  <bruno@clisp.org>
1919
1920         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
1921         from mingw users.
1922
1923 2007-02-19  Bruno Haible  <bruno@clisp.org>
1924
1925         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
1926         warnings.
1927         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
1928
1929 2007-02-19  Jim Meyering  <jim@meyering.net>
1930
1931         Don't use FD after a successful "fdopendir (fd)".
1932         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
1933         Reset it by calling dirfd on the just-obtained DIR*.
1934
1935         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
1936         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
1937
1938 2007-02-18  Bruno Haible  <bruno@clisp.org>
1939
1940         * lib/readlink.c: Include <unistd.h>.
1941         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
1942         HAVE_READLINK.
1943         * modules/readlink (Depends-on): Add unistd.
1944         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1945         (Include): Add <unistd.h>.
1946
1947         * lib/getlogin_r.h: Remove file.
1948         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
1949         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
1950         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
1951         HAVE_DECL_GETLOGIN_R.
1952         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
1953         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1954         (Include): Use <unistd.h> instead of getlogin_r.h.
1955
1956         * lib/getcwd.h: Remove file.
1957         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
1958         * lib/xgetcwd.c: Likewise.
1959         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
1960         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
1961         * modules/getcwd (Files): Remove lib/getcwd.h.
1962         (Depends-on): Add unistd.
1963         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1964         (Include): Use <unistd.h> instad of getcwd.h.
1965
1966         * lib/ftruncate.c: Include <unistd.h> first.
1967         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
1968         Set HAVE_FTRUNCATE.
1969         * modules/ftruncate (Depends-on): Add unistd.
1970         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1971
1972         * lib/fchdir.c: Include <unistd.h> first.
1973         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
1974         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
1975         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
1976         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1977         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
1978
1979         * lib/dup2.c: Include <unistd.h> first.
1980         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
1981         HAVE_DUP2.
1982         * modules/dup2 (Depends-on): Add unistd.
1983         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1984
1985         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
1986         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
1987         REPLACE_CHOWN. Don't define chown as a macro here.
1988         * modules/chown (Depends-on): Add unistd.
1989         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1990
1991         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
1992         Add definition for GL_LINK_WARNING.
1993         (chown, dup2): New declarations.
1994         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
1995         link warning.
1996         (ftruncate): New declaration.
1997         (getcwd): New declaration, taken from old getcwd.h.
1998         (getlogin_r): New declaration, taken from old getlogin_r.h.
1999         (readlink): New declaration.
2000         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
2001         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
2002         (gl_PREREQ_UNISTD): Remove macro.
2003         (gl_UNISTD_MODULE_INDICATOR): New macro.
2004         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
2005         many new variables. Don't set UNISTD_H.
2006         * modules/unistd (Description): Change.
2007         (Depends-on): Add link-warning.
2008         (configure.ac): Update.
2009         (Makefile.am): Create unistd.h always. Substitute many new variables
2010         into it.
2011
2012 2007-02-18  Bruno Haible  <bruno@clisp.org>
2013
2014         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
2015         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
2016         HAVE_GETSUBOPT.
2017         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
2018         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
2019         * lib/getsubopt.h: Remove file.
2020         * modules/getsubopt (Files): Remove lib/getsubopt.h.
2021         (Depends-on): Add stdlib.
2022         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2023         (Includes): Use <stdlib.h> instead of getsubopt.h.
2024         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
2025         Set HAVE_GETSUBOPT.
2026         * lib/getsubopt.c: Don't include getsubopt.h.
2027
2028 2007-02-18  Bruno Haible  <bruno@clisp.org>
2029
2030         * modules/fchdir (Depends-on): Add dup2.
2031
2032 2007-02-18  Bruno Haible  <bruno@clisp.org>
2033
2034         * lib/stdlib_.h: Handle glibc's special invocation convention
2035         specially.
2036
2037 2007-02-18  Bruno Haible  <bruno@clisp.org>
2038
2039         * modules/stdlib-tests: New file.
2040         * tests/test-stdlib.c: New file.
2041
2042         * modules/mkstemp (Files): Remove lib/mkstemp.h.
2043         (Depends-on): Add stdlib.
2044         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2045         (Includes): Use <stdlib.h> instead of mkstemp.h.
2046         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
2047         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
2048         * lib/mkstemp.c: Don't include mkstemp.h.
2049         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
2050         * lib/stdlib--.h: Don't include mkstemp.h.
2051
2052         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
2053         (Depends-on): Add stdlib.
2054         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2055         (Includes): Use <stdlib.h> instead of mkdtemp.h.
2056         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
2057         HAVE_MKDTEMP.
2058         * lib/mkdtemp.c: Don't include mkdtemp.h.
2059         * lib/clean-temp.c: Don't include mkdtemp.h.
2060
2061         * modules/exit (Files): Remove lib/exit.h.
2062         (Depends-on): Add stdlib.
2063         (Makefile.am): Remove lib_SOURCES.
2064         (Include): Use <stdlib.h> instead of exit.h.
2065         * lib/argmatch.c: Don't include exit.h.
2066         * lib/execute.c: Likewise.
2067         * lib/pagealign_alloc.c: Likewise.
2068         * lib/pipe.c: Likewise.
2069         * lib/wait-process.c: Likewise.
2070         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
2071         * lib/exitfail.c: Likewise.
2072         * lib/savewd.c: Likewise.
2073         * lib/xsetenv.c: Likewise.
2074
2075         * modules/stdlib: New file.
2076         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
2077         and extra comments about mkstemp().
2078         * lib/exit.h: Remove file.
2079         * lib/mkdtemp.h: Remove file.
2080         * lib/mkstemp.h: Remove file.
2081         * m4/stdlib_h.m4: New file.
2082         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
2083
2084 2007-02-18  Bruno Haible  <bruno@clisp.org>
2085
2086         * modules/math-tests: New file.
2087         * tests/test-math.c: New file.
2088
2089         * modules/math: New file.
2090         * modules/mathl (Files): Remove lib/mathl.h.
2091         (Depends-on): Add math.
2092         (Makefile.am): Don't mention mathl.h.
2093         (Include): Use <math.h> instead of mathl.h.
2094         * lib/math_.h: New file.
2095         * lib/mathl.h: Remove file.
2096         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
2097         mathl.h.
2098         * lib/asinl.c: Likewise.
2099         * lib/atanl.c: Likewise.
2100         * lib/ceill.c: Likewise.
2101         * lib/cosl.c: Likewise.
2102         * lib/expl.c: Likewise.
2103         * lib/floorl.c: Likewise.
2104         * lib/frexpl.c: Likewise.
2105         * lib/ldexpl.c: Likewise.
2106         * lib/logl.c: Likewise.
2107         * lib/sincosl.c: Likewise.
2108         * lib/sinl.c: Likewise.
2109         * lib/sqrtl.c: Likewise.
2110         * lib/tanl.c: Likewise.
2111         * lib/trigl.c: Likewise.
2112         * m4/math_h.m4: New file.
2113         * MODULES.html.sh (Mathematics): Add math.
2114
2115 2007-02-17  Bruno Haible  <bruno@clisp.org>
2116
2117         * modules/wctype-tests: New file.
2118         * tests/test-wctype.c: New file.
2119
2120         * modules/wchar-tests: New file.
2121         * tests/test-wchar.c: New file.
2122
2123         * modules/unistd-tests: New file.
2124         * tests/test-unistd.c: New file.
2125
2126         * modules/time-tests: New file.
2127         * tests/test-time.c: New file.
2128
2129         * modules/sysexits-tests: New file.
2130         * tests/test-sysexits.c: New file.
2131
2132         * modules/sys_time-tests: New file.
2133         * tests/test-sys_time.c: New file.
2134
2135         * modules/sys_stat-tests: New file.
2136         * tests/test-sys_stat.c: New file.
2137
2138         * modules/sys_socket-tests: New file.
2139         * tests/test-sys_socket.c: New file.
2140
2141         * modules/sys_select-tests: New file.
2142         * tests/test-sys_select.c: New file.
2143
2144         * modules/string-tests: New file.
2145         * tests/test-string.c: New file.
2146
2147         * modules/stdbool-tests: New file.
2148         * tests/test-stdbool.c: New file.
2149
2150         * modules/netinet_in-tests: New file.
2151         * tests/test-netinet_in.c: New file.
2152
2153         * modules/inttypes-tests: New file.
2154         * tests/test-inttypes.c: New file.
2155
2156         * modules/fcntl-tests: New file.
2157         * tests/test-fcntl.c: New file.
2158
2159         * modules/byteswap-tests: New file.
2160         * tests/test-byteswap.c: New file.
2161
2162         * modules/arpa_inet-tests: New file.
2163         * tests/test-arpa_inet.c: New file.
2164
2165 2007-02-17  Bruno Haible  <bruno@clisp.org>
2166
2167         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
2168         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
2169         if the corresponding module is not enabled. Emit link warnings if
2170         the function is used nevertheless.
2171         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
2172         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
2173         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
2174         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
2175         * modules/inttypes (Depends-on): Add link-warning.
2176         (Makefile.am): Copy the contents of build-aux/link-warning.h into
2177         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
2178         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
2179         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
2180         * modules/imaxdiv (configure.ac): Likewise.
2181         * modules/strtoimax (configure.ac): Likewise.
2182         * modules/strtoumax (configure.ac): Likewise.
2183
2184 2007-02-17  Bruno Haible  <bruno@clisp.org>
2185
2186         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
2187         gl_STRING_MODULE_INDICATOR_DEFAULTS.
2188         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
2189         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
2190
2191 2007-02-17  Bruno Haible  <bruno@clisp.org>
2192
2193         * modules/link-warning: New file.
2194         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
2195         * lib/string_.h (GL_LINK_WARNING): Remove definition.
2196         * modules/string (Depends-on): Add link-warning.
2197         (Makefile.am): Copy the contents of build-aux/link-warning.h into
2198         string.h.
2199         * MODULES.html.sh (Support for building libraries and executables): Add
2200         link-warning.
2201
2202 2007-02-17  Bruno Haible  <bruno@clisp.org>
2203
2204         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
2205         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
2206         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
2207         long lines.
2208
2209 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
2210             Bruno Haible  <bruno@clisp.org>
2211
2212         * modules/tmpfile: New file.
2213         * lib/tmpfile.c: New file.
2214         * m4/tmpfile.m4: New file.
2215         * MODULES.html.sh (func_all_modules): New section "Input/output".
2216
2217 2007-02-15  Bruno Haible  <bruno@clisp.org>
2218
2219         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
2220         (supports_delete_on_close): New function.
2221         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
2222
2223 2007-02-14  Bruno Haible  <bruno@clisp.org>
2224
2225         * modules/mbspcasecmp-tests: New file.
2226         * tests/test-mbspcasecmp.sh: New file.
2227         * tests/test-mbspcasecmp.c: New file.
2228
2229         New module mbspcasecmp.
2230         * modules/mbspcasecmp: New file.
2231         * lib/mbspcasecmp.c: New file.
2232         * lib/string_.h (strncasecmp): Change warning message.
2233         (mbspcasecmp): New declaration.
2234         * m4/mbspcasecmp.m4: New file.
2235         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2236         GNULIB_MBSPCASECMP.
2237         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
2238         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
2239
2240 2007-02-14  Bruno Haible  <bruno@clisp.org>
2241
2242         * modules/mbsncasecmp-tests: New file.
2243         * tests/test-mbsncasecmp.sh: New file.
2244         * tests/test-mbsncasecmp.c: New file.
2245
2246         New module mbsncasecmp.
2247         * modules/mbsncasecmp: New file.
2248         * lib/mbsncasecmp.c: New file.
2249         * lib/string_.h (mbsncasecmp): New declaration.
2250         * m4/mbsncasecmp.m4: New file.
2251         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2252         GNULIB_MBSNCASECMP.
2253         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
2254         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
2255
2256 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
2257
2258         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
2259         Verify that it doesn't overlap with our flags.
2260         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
2261         do not have the desired effect in multibyte locales; instead, use
2262         mbscasecmp.
2263         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
2264         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
2265         we don't require GNU fnmatch ourselves (if our users require it, they
2266         should do so explicitly).
2267
2268         Fix regex code so it doesn't rely on strcasecmp.
2269         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
2270         Otherwise, include gnulib's langinfo.h.
2271         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
2272         undesirable behavior in non-C locales.  Instead, rely on localecharset.
2273         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
2274         * modules/regex (FILES): Remove m4/codeset.m4.
2275         (Depends-on): Add localcharset.  Remove strcase.
2276
2277 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2278
2279         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
2280         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
2281
2282 2007-02-13  Bruno Haible  <bruno@clisp.org>
2283
2284         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
2285         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2286
2287 2007-02-12  Bruno Haible  <bruno@clisp.org>
2288
2289         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
2290         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
2291         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
2292         time warning rather than a link error.
2293
2294 2007-02-12  Bruno Haible  <bruno@clisp.org>
2295
2296         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
2297         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
2298         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2299
2300 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
2301
2302         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
2303         args, not 2.
2304
2305 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
2306
2307         New module 'time', so that apps can include <time.h> as per
2308         POSIX and GNU instead of separate include files like time_r.h
2309         and timegm.h.  This implementation tries out a simpler approach
2310         for replacing decls in standard include files (as compared to
2311         the string module), somewhat as an experiment.
2312
2313         * config/srclist.txt: Comment out mktime.c for now.
2314         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
2315         since it doesn't apply any more.  Use generic wording instead.
2316         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
2317         'time'.
2318         * lib/time_.h, m4/time_h.m4, modules/time: New files.
2319         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
2320         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
2321         Don't include <sys/types.h>; no longer needed since we assume C89.
2322         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
2323         * lib/strftime.c: Likewise.
2324         * lib/time_r.c: Likewise.
2325         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
2326         * lib/nanosleep.c: Include <time.h> first, to check interface.
2327         * lib/strptime.c: Likewise.
2328         * lib/time_r.c: Likewise.
2329         * lib/timegm.c: Likewise.
2330         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
2331         needed.
2332         * lib/timegm.c: Don't include timegm.h; no longer needed.
2333         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
2334         time.h now handles any problems in that area.
2335         (struct timespec, nanosleep): Remove; time.h now arranges for these.
2336         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
2337         that time.h defines struct timespec.
2338         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
2339         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
2340         handles that.
2341         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
2342         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
2343         needed.  Set REPLACE_LOCALTIME.
2344         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
2345         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
2346         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
2347         nanosleep; time_h.m4 now does that.  Don't require
2348         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
2349         module handles this now.
2350         * modules/getdate (Depends-on): Remove timespec.  Add time.
2351         * modules/nanosleep (Depends-on): Likewise.
2352         * modules/stat-time (Depends-on): Likewise.
2353         * modules/nanosleep (Include): Include time.h, not timespec.h.
2354         * modules/strptime (Files): Remove lib/strptime.h.
2355         (Depends-on): Add extensions, time.
2356         (Include): Include time.h, not strptime.h.
2357         * modules/time_r (Files): Remove lib/time_r.h.
2358         (Depends-on): Add time.
2359         (Include): Include time.h, not time_r.h.
2360         * modules/timegm: Likewise.
2361         * modules/timespec (Description): Now does timespec-related decls
2362         of our own, instead of struct timespec itself.
2363         (Depends-on): Add time; remove extensions.
2364         (Maintainer): Add self.
2365         * modules/utimecmp (Depends-on): Add time; remove timespec.
2366         * modules/utimens (Depends-on): Likewise.
2367         * modules/xnanosleep (Depends-on): Likewise.
2368
2369 2007-02-11  Bruno Haible  <bruno@clisp.org>
2370
2371         * lib/c-strstr.c: Include allocsa.h.
2372         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2373         * lib/c-strcasestr.c: Include allocsa.h.
2374         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2375         * lib/strcasestr.c: Include allocsa.h.
2376         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2377         * lib/mbsstr.c: Include allocsa.h.
2378         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
2379         allocsa/freesa instead of malloc/free.
2380         * lib/mbscasestr.c: Include allocsa.h.
2381         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
2382         allocsa/freesa instead of malloc/free.
2383         * modules/c-strstr (Depends-on): Add allocsa.
2384         * modules/c-strcasestr (Depends-on): Likewise.
2385         * modules/strcasestr (Depends-on): Likewise.
2386         * modules/mbsstr (Depends-on): Likewise.
2387         * modules/mbscasestr (Depends-on): Likewise.
2388
2389 2007-02-11  Bruno Haible  <bruno@clisp.org>
2390
2391         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
2392
2393         * modules/mbsspn-tests: New file.
2394         * tests/test-mbsspn.sh: New file.
2395         * tests/test-mbsspn.c: New file.
2396
2397 2007-02-11  Bruno Haible  <bruno@clisp.org>
2398
2399         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
2400
2401         * modules/mbspbrk-tests: New file.
2402         * tests/test-mbspbrk.sh: New file.
2403         * tests/test-mbspbrk.c: New file.
2404
2405 2007-02-11  Bruno Haible  <bruno@clisp.org>
2406
2407         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
2408         unneeded cast.
2409
2410         * modules/mbscspn-tests: New file.
2411         * tests/test-mbscspn.sh: New file.
2412         * tests/test-mbscspn.c: New file.
2413
2414 2007-02-11  Bruno Haible  <bruno@clisp.org>
2415
2416         * modules/mbscasecmp-tests: New file.
2417         * tests/test-mbscasecmp.sh: New file.
2418         * tests/test-mbscasecmp.c: New file.
2419
2420 2007-02-11  Bruno Haible  <bruno@clisp.org>
2421
2422         Ensure O(n) worst-case complexity of mbscasestr.
2423         * lib/mbscasestr.c: Include stdbool.h.
2424         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
2425         functions.
2426         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
2427         the bookkeeping indicates that it's worth it.
2428         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
2429
2430         * modules/mbscasestr-tests: New file.
2431         * tests/test-mbscasestr1.c: New file.
2432         * tests/test-mbscasestr2.sh: New file.
2433         * tests/test-mbscasestr2.c: New file.
2434         * tests/test-mbscasestr3.sh: New file.
2435         * tests/test-mbscasestr3.c: New file.
2436         * tests/test-mbscasestr4.sh: New file.
2437         * tests/test-mbscasestr4.c: New file.
2438         * m4/locale-tr.m4: New file.
2439
2440 2007-02-11  Bruno Haible  <bruno@clisp.org>
2441
2442         Ensure O(n) worst-case complexity of mbsstr.
2443         * lib/mbsstr.c: Include stdbool.h.
2444         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
2445         functions.
2446         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
2447         bookkeeping indicates that it's worth it.
2448         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
2449
2450         * modules/mbsstr-tests: New file.
2451         * tests/test-mbsstr1.c: New file.
2452         * tests/test-mbsstr2.sh: New file.
2453         * tests/test-mbsstr2.c: New file.
2454         * tests/test-mbsstr3.sh: New file.
2455         * tests/test-mbsstr3.c: New file.
2456         * m4/locale-fr.m4: New file.
2457
2458 2007-02-11  Bruno Haible  <bruno@clisp.org>
2459
2460         * lib/mbsrchr.c (mbsrchr): Fix bug.
2461
2462         * modules/mbsrchr-tests: New file.
2463         * tests/test-mbsrchr.sh: New file.
2464         * tests/test-mbsrchr.c: New file.
2465
2466 2007-02-11  Bruno Haible  <bruno@clisp.org>
2467
2468         * lib/mbschr.c (mbschr): Fix bug.
2469
2470         * modules/mbschr-tests: New file.
2471         * tests/test-mbschr.sh: New file.
2472         * tests/test-mbschr.c: New file.
2473         * m4/locale-zh.m4: New file.
2474
2475 2007-02-11  Bruno Haible  <bruno@clisp.org>
2476
2477         Support for copying multibyte string iterators.
2478         * lib/mbiter.h: Include <string.h>.
2479         (mbiter_multi_copy): New function.
2480         (mbi_copy): New macro.
2481         * lib/mbuiter.h: Include <string.h>.
2482         (mbuiter_multi_copy): New function.
2483         (mbui_copy): New macro.
2484
2485 2007-02-11  Bruno Haible  <bruno@clisp.org>
2486
2487         New module mbslen.
2488         * modules/mbslen: New file.
2489         * lib/mbslen.c: New file.
2490         * lib/string_.h (mbslen): New declaration.
2491         * m4/mbslen.m4: New file.
2492         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2493         GNULIB_MBSLEN.
2494         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
2495         * MODULES.html.sh (Internationalization functions): Add mbslen.
2496
2497 2007-02-11  Bruno Haible  <bruno@clisp.org>
2498
2499         Ensure O(n) worst-case complexity of strcasestr substitute.
2500         * lib/strcasestr.c: Include stdbool.h.
2501         (knuth_morris_pratt): New function.
2502         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
2503         bookkeeping indicates that it's worth it.
2504         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
2505
2506         * modules/strcasestr-tests: New file.
2507         * tests/test-strcasestr.c: New file.
2508
2509 2007-02-11  Bruno Haible  <bruno@clisp.org>
2510
2511         Ensure O(n) worst-case complexity of c_strcasestr.
2512         * lib/c-strcasestr.c: Include stdbool.h, string.h.
2513         (knuth_morris_pratt): New function.
2514         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
2515         the bookkeeping indicates that it's worth it.
2516         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
2517
2518         * modules/c-strcasestr-tests: New file.
2519         * tests/test-c-strcasestr.c: New file.
2520
2521 2007-02-11  Bruno Haible  <bruno@clisp.org>
2522
2523         Ensure O(n) worst-case complexity of c_strstr.
2524         * lib/c-strstr.c: Include stdbool.h, string.h.
2525         (knuth_morris_pratt): New function.
2526         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
2527         bookkeeping indicates that it's worth it.
2528         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
2529
2530         * lib/c-strstr.c: Complete rewrite for maintainability.
2531
2532         * modules/c-strstr-tests: New file.
2533         * tests/test-c-strstr.c: New file.
2534
2535 2007-02-11  Bruno Haible  <bruno@clisp.org>
2536
2537         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
2538         5.2.1 and earlier, whereby \055 was treated just like the range
2539         delimiter '-'.
2540         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
2541
2542 2007-02-08  Bruno Haible  <bruno@clisp.org>
2543
2544         * modules/regex (Depends-on): Add stdbool.
2545         Reported by Dalibor Topic <robilad@kaffe.org>.
2546
2547 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
2548
2549         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
2550         Prefer returning from main to exiting from it.
2551         Remove unnecessary parens after sizeof.
2552
2553 2007-02-05  Bruno Haible  <bruno@clisp.org>
2554
2555         New module mbssep.
2556         * modules/mbssep: New file.
2557         * lib/mbssep.c: New file.
2558         * lib/string_.h (strsep): Add a conditional link warning.
2559         (mbssep): New declaration.
2560         * m4/mbssep.m4: New file.
2561         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2562         GNULIB_MBSSEP.
2563         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
2564         * MODULES.html.sh (Internationalization functions): Add mbssep.
2565
2566 2007-02-05  Bruno Haible  <bruno@clisp.org>
2567
2568         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
2569         Optimize search in case of 1 delimiter.
2570
2571 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2572
2573         * lib/acl.h: Include sys/types.h before sys/acl.h.
2574
2575 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2576
2577         Merge upstream fix for glibc bugzilla #3957:
2578
2579         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
2580
2581         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
2582         bit for RE_HAT_LISTS_NOT_NEWLINE.
2583         (build_charclass_op): Remove bogus comment.
2584
2585 2007-02-05  Simon Josefsson  <simon@josefsson.org>
2586
2587         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
2588
2589 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
2590
2591         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
2592         * lib/memmem.c [!defined _LIBC]: Include config.h.
2593
2594 2007-02-04  Bruno Haible  <bruno@clisp.org>
2595
2596         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
2597         warning message.
2598
2599 2007-02-04  Bruno Haible  <bruno@clisp.org>
2600
2601         New module mbstok_r.
2602         * modules/mbstok_r: New file.
2603         * lib/mbstok_r.c: New file.
2604         * lib/string_.h (strtok_r): Change argument names to match the
2605         comments. Add a conditional link warning.
2606         (mbstok_r): New declaration.
2607         * m4/mbstok_r.m4: New file.
2608         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2609         GNULIB_MBSTOK_R.
2610         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
2611         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
2612
2613 2007-02-04  Bruno Haible  <bruno@clisp.org>
2614
2615         New module mbsspn.
2616         * modules/mbsspn: New file.
2617         * lib/mbsspn.c: New file.
2618         * lib/string_.h (strspn): Add a conditional link warning.
2619         (mbsspn): New declaration.
2620         * m4/mbsspn.m4: New file.
2621         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2622         GNULIB_MBSSPN.
2623         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
2624         * MODULES.html.sh (Internationalization functions): Add mbsspn.
2625
2626 2007-02-04  Bruno Haible  <bruno@clisp.org>
2627
2628         New module mbspbrk.
2629         * modules/mbspbrk: New file.
2630         * lib/mbspbrk.c: New file.
2631         * lib/string_.h (strpbrk): Add a conditional link warning.
2632         (mbspbrk): New declaration.
2633         * m4/mbspbrk.m4: New file.
2634         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2635         GNULIB_MBSPBRK.
2636         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
2637         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
2638
2639 2007-02-04  Bruno Haible  <bruno@clisp.org>
2640
2641         New module mbscspn.
2642         * modules/mbscspn: New file.
2643         * lib/mbscspn.c: New file.
2644         * lib/string_.h (strcspn): Add a conditional link warning.
2645         (mbscspn): New declaration.
2646         * m4/mbscspn.m4: New file.
2647         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2648         GNULIB_MBSCSPN.
2649         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
2650         * MODULES.html.sh (Internationalization functions): Add mbscspn.
2651
2652 2007-02-04  Bruno Haible  <bruno@clisp.org>
2653
2654         New module mbscasestr, reduced goal of strcasestr.
2655         * modules/mbscasestr: New file.
2656         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
2657         (mbscasestr): Renamed from strcasestr.
2658         * lib/strcasestr.c: Don't include mbuiter.h.
2659         (strcasestr): Remove support for multibyte locales.
2660         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
2661         Change the conditional link warning.
2662         (mbscasestr): New declaration.
2663         * m4/mbscasestr.m4: New file.
2664         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
2665         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
2666         REPLACE_STRCASESTR.
2667         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
2668         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
2669         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
2670         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
2671         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
2672         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
2673         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
2674         (Depends-on): Remove mbuiter.
2675         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
2676
2677 2007-02-04  Bruno Haible  <bruno@clisp.org>
2678
2679         Simplify handling of strncasecmp.
2680         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
2681         the conditional link warning.
2682         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
2683         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
2684         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
2685         * modules/strcase (configure.ac): Don't invoke
2686         gl_STRING_MODULE_INDICATOR.
2687         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
2688
2689 2007-02-04  Bruno Haible  <bruno@clisp.org>
2690
2691         New module mbscasecmp, reduced goal of strcasecmp.
2692         * modules/mbscasecmp: New file.
2693         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
2694         (mbscasecmp): Renamed from strcasecmp.
2695         * lib/strcasecmp.c: Don't include mbuiter.h.
2696         (strcasecmp): Remove support for multibyte locales.
2697         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
2698         Change the conditional link warning.
2699         (mbscasecmp): New declaration.
2700         * m4/mbscasecmp.m4: New file.
2701         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
2702         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
2703         REPLACE_STRCASECMP.
2704         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
2705         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2706         GNULIB_MBSCASECMP.
2707         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
2708         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
2709         * modules/strcase (Files): Remove m4/mbrtowc.m4.
2710         (Depends-on): Remove mbuiter.
2711         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
2712
2713 2007-02-04  Bruno Haible  <bruno@clisp.org>
2714
2715         New module mbsstr. Remove module strstr.
2716         * modules/mbsstr: New file.
2717         * modules/strstr: Remove file.
2718         * lib/mbsstr.c: Renamed from lib/strstr.c.
2719         (mbsstr): Renamed from strstr.
2720         * lib/string_.h (strstr): Remove declaration. Change the conditional
2721         link warning.
2722         (mbsstr): New declaration.
2723         * m4/mbsstr.m4: New file.
2724         * m4/strstr.m4: Remove file.
2725         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
2726         REPLACE_STRSTR.
2727         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
2728         Don't initialize GNULIB_STRSTR.
2729         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
2730         substitute GNULIB_STRSTR and REPLACE_STRSTR.
2731         * MODULES.html.sh (Internationalization functions): Add mbsstr.
2732         (Support for systems lacking ANSI C 89): Remove strstr.
2733
2734 2007-02-04  Bruno Haible  <bruno@clisp.org>
2735
2736         New module mbsrchr.
2737         * modules/mbsrchr: New file.
2738         * lib/mbsrchr.c: New file.
2739         * lib/string_.h (strrchr): Add a conditional link warning.
2740         (mbsrchr): New declaration.
2741         * m4/mbsrchr.m4: New file.
2742         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2743         GNULIB_MBSRCHR.
2744         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
2745         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
2746
2747 2007-02-04  Bruno Haible  <bruno@clisp.org>
2748
2749         New module mbschr.
2750         * modules/mbschr: New file.
2751         * lib/mbschr.c: New file.
2752         * lib/string_.h (strchr): Add a conditional link warning.
2753         (mbschr): New declaration.
2754         * m4/mbschr.m4: New file.
2755         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2756         GNULIB_MBSCHR.
2757         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
2758         * MODULES.html.sh (Internationalization functions): Add mbschr.
2759
2760 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
2761
2762         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
2763
2764         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
2765
2766 2007-02-04  Bruno Haible  <bruno@clisp.org>
2767
2768         New module description section 'configure.ac-early'.
2769         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
2770         (func_get_autoconf_early_snippet): New function.
2771         (func_import, func_create_testdir): Use it. Remove special cases for
2772         modules 'extensions' and 'lock'.
2773         * modules/extensions (configure.ac-early): Require
2774         gl_USE_SYSTEM_EXTENSIONS.
2775         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
2776
2777 2007-02-04  Bruno Haible  <bruno@clisp.org>
2778
2779         Make use of gcj-4.3's -fsource and -ftarget option.
2780         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
2781         and if so try the options -fsource and -ftarget.
2782         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
2783         source_version, ftarget_option, target_version arguments.
2784         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
2785         (is_envjavac_oldgcj_14_14_usable): Renamed from
2786         is_envjavac_gcj_14_14_usable.
2787         (is_envjavac_oldgcj_14_13_usable): Renamed from
2788         is_envjavac_gcj_14_13_usable.
2789         (is_gcj_present): Update.
2790         (is_gcj_43, is_gcj43_usable): New functions.
2791         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
2792         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
2793         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
2794         try the options -fsource and -ftarget.
2795
2796 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
2797
2798         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
2799         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
2800         larger value.
2801
2802 2007-02-03  Jim Meyering  <jim@meyering.net>
2803
2804         Give tools a better chance to allocate space for very large buffers.
2805         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
2806
2807         Make pwd and readlink work also when run with an unreadable parent dir
2808         on systems with openat support.
2809         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
2810         provided getcwd function, even when we have openat support.
2811         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
2812
2813 2007-02-02  Bruno Haible  <bruno@clisp.org>
2814
2815         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
2816         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
2817         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
2818         portability problems if one of these functions is only used on specific
2819         platforms.
2820         Reported by Paul Eggert.
2821
2822 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
2823
2824         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
2825         is causing more trouble than it's curing.
2826         * lib/regex_internal.h (__mempcpy): Remove.
2827         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
2828         (and make the code a tad smaller to boot).
2829         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
2830
2831 2007-02-02  Jim Meyering  <jim@meyering.net>
2832
2833         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
2834         section, not in the Makefile.am: one.
2835
2836 2007-02-02  Eric Blake  <ebb9@byu.net>
2837
2838         * lib/strchrnul.c: Always include config.h first.
2839
2840         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
2841         gnulib strstr is not necessary here.
2842
2843 2007-02-02  Simon Josefsson  <simon@josefsson.org>
2844
2845         * m4/socklen.m4: Fix typo.
2846
2847 2007-02-02  Eric Blake  <ebb9@byu.net>
2848
2849         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
2850         * modules/netinet_in (Makefile.am): Likewise.
2851
2852 2007-02-01  Bruno Haible  <bruno@clisp.org>
2853
2854         * lib/string_.h (GL_LINK_WARNING): New macro.
2855         (strcasecmp, strstr, strcasestr): If provided by the system,
2856         conditionally define as a macro that leads to a warning instead of to
2857         an error.
2858         (strncasecmp): Conditionally define as a macro that leads to a warning.
2859
2860 2007-02-01  Karl Berry  <karl@gnu.org>
2861
2862         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
2863
2864 2007-02-01  Bruno Haible  <bruno@clisp.org>
2865
2866         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
2867         renamings.
2868
2869 2007-02-01  Eric Blake  <ebb9@byu.net>
2870
2871         * modules/regex (Depends-on): Revert dependence on mempcpy.
2872         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
2873         module's definition of mempcpy.
2874         Reported by Paul Eggert.
2875
2876 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
2877
2878         * lib/string_.h: If the gnulib module XYZ is not present, undefine
2879         the symbol XYZ before redefining it.  This fixes a problem with
2880         programs that don't use XYZ, when compiled on systems that define
2881         XYZ to something else.
2882
2883 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
2884
2885         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
2886         occurs when "mkdir -m foo" creates a setgid directory that is (1)
2887         writeable to group or other and (2) is intended to have a special
2888         mode bit that is set or cleared.  In such a case, the directory
2889         should be neither group- nor other-writeable until the special
2890         mode bits are right.
2891
2892 2007-01-31  Eric Blake  <ebb9@byu.net>
2893
2894         * modules/mountlist (Depends-on): Add strstr.
2895
2896         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
2897         bug.
2898         * modules/string (Makefile.am): Remove redundant replacement.
2899         * modules/regex (Depends-on): Add mempcpy.
2900
2901 2007-01-31  Bruno Haible  <bruno@clisp.org>
2902
2903         New module description field 'Link'.
2904         * gnulib-tool (func_usage): Document --extract-link-directive.
2905         (sed_extract_prog): Recognize 'Link' directive.
2906         (func_get_link_directive): New function.
2907         (func_import): Show summary of link directives.
2908         Handle --extract-link-directive option.
2909         * modules/acl (Link): New section.
2910         * modules/clock-time (Link): New section.
2911         * modules/euidaccess (Link): New section.
2912         * modules/gettext (Link): New section.
2913         * modules/iconv (Link): New section.
2914         * modules/lock (Link): New section.
2915         * modules/nanosleep (Link): New section.
2916         * modules/readline (Link): New section.
2917
2918 2007-01-27  Bruno Haible  <bruno@clisp.org>
2919
2920         Enforce the use of gnulib modules for unportable <string.h> functions.
2921         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
2922         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
2923         (gl_HEADER_STRING_H_BODY): Require it.
2924         * lib/string_.h: If the gnulib module XYZ is not present, redefine
2925         the symbol XYZ to one that gives a link error.
2926         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
2927         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
2928         * modules/mempcpy (configure.ac): Likewise.
2929         * modules/memrchr (configure.ac): Likewise.
2930         * modules/stpcpy (configure.ac): Likewise.
2931         * modules/stpncpy (configure.ac): Likewise.
2932         * modules/strcase (configure.ac): Likewise.
2933         * modules/strcasestr (configure.ac): Likewise.
2934         * modules/strchrnul (configure.ac): Likewise.
2935         * modules/strdup (configure.ac): Likewise.
2936         * modules/strndup (configure.ac): Likewise.
2937         * modules/strnlen (configure.ac): Likewise.
2938         * modules/strpbrk (configure.ac): Likewise.
2939         * modules/strsep (configure.ac): Likewise.
2940         * modules/strstr (configure.ac): Likewise.
2941         * modules/strtok_r (configure.ac): Likewise.
2942
2943 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
2944
2945         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
2946
2947 2007-01-30  Jim Meyering  <jim@meyering.net>
2948
2949         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
2950
2951 2007-01-29  Bruno Haible  <bruno@clisp.org>
2952
2953         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
2954         * lib/execute.c: Likewise.
2955         * lib/pipe.c: Likewise.
2956         * lib/printf-args.h: Likewise.
2957         * lib/printf-args.c: Likewise.
2958         * lib/printf-parse.c: Likewise.
2959         * lib/vasnprintf.c: Likewise.
2960
2961 2007-01-29  Eric Blake  <ebb9@byu.net>
2962
2963         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
2964         declaration.
2965
2966 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
2967
2968         * lib/strptime.h (strptime): Use 'restrict' for args where
2969         POSIX requires this.
2970         * lib/strptime.c (strptime): Likewise.
2971         Change license notice from LGPL to GPL, since gnulib-tool will
2972         change this as needed.
2973         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
2974         defined.
2975         Include "strptime.h" first, to check interface.
2976         Do not #undef _LIBC and _NL_CURRENT.
2977         Do not include <stdlib.h>; no longer needed.
2978         Include "time_r.h" and declare ptime_locale_status
2979         only if _LIBC is not defined.
2980         (__P): Remove unused macro.
2981         (match_string): Bring back glibc version, but use it only if _LIBC
2982         is defined.
2983         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
2984         Remove unnecessary assertion and abort() call.
2985         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
2986         * m4/strptime.m4: Fix serial number comment.
2987         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
2988         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
2989         (Depends-on): Add time_r.
2990
2991 2007-01-29  Bruno Haible  <bruno@clisp.org>
2992
2993         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2994         strptime.
2995         * modules/strptime (Depends-on): Add stdbool.
2996         * lib/strptime.h: Include <time.h> always. Add comments.
2997
2998 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
2999
3000         * modules/strptime: New file.
3001         * lib/strptime.h: New file.
3002         * lib/strptime.c: New file.
3003         * m4/strptime.m4: New file.
3004
3005 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
3006
3007         * MODULES.html.sh: New module mpsort.
3008         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
3009
3010         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
3011         a circularity problem with HP-UX ia64 reported by Bob Proulx in
3012         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
3013         All uses changed.
3014         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
3015         All uses changed.
3016         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
3017         to _Restrict_.
3018         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
3019         the parameter matches the prototype.
3020
3021 2007-01-28  Jim Meyering  <jim@meyering.net>
3022
3023         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
3024         sys/time.h here, reverting that part of the previous patch:
3025         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
3026
3027 2007-01-28  Bruno Haible  <bruno@clisp.org>
3028
3029         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
3030         value of $(SYS_TIME_H).
3031         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
3032         remove it conditionally, too. [added by Jim Meyering]
3033         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
3034         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
3035         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
3036         GETTIMEOFDAY_REPLACEMENT to 1.
3037
3038 2007-01-28  Bruno Haible  <bruno@clisp.org>
3039
3040         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
3041         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
3042         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
3043         Set UNISTD_H instead of UNISTD_H2.
3044         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
3045
3046 2007-01-28  Bruno Haible  <bruno@clisp.org>
3047
3048         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
3049         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
3050
3051 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3052
3053         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
3054         (func_create_testdir): Ensure C locale for `grep' and `tr'
3055         character ranges.
3056         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
3057         ACLOCAL_AMFLAGS parsing state machine.
3058
3059 2007-01-27  Bruno Haible  <bruno@clisp.org>
3060
3061         * modules/unistr/base: Update.
3062
3063 2007-01-27  Bruno Haible  <bruno@clisp.org>
3064
3065         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
3066         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
3067         * modules/unistr/u32-mbtouc-unsafe: Renamed from
3068         modules/unistr/u32-mbtouc.
3069         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
3070         * lib/unistr.h: Update.
3071         * lib/linebreak.c: Update.
3072         * modules/unistr/u32-mbtouc: Renamed from
3073         modules/unistr/u32-mbtouc-safe.
3074         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
3075         * lib/unistr.h: Update.
3076         * lib/unistr/u32-to-u8.c: Update.
3077         * lib/unistr/u32-to-u16.c: Update.
3078
3079 2007-01-27  Bruno Haible  <bruno@clisp.org>
3080
3081         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
3082         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
3083         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
3084         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
3085         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
3086         * modules/unistr/u16-mbtouc-unsafe: Renamed from
3087         modules/unistr/u16-mbtouc.
3088         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
3089         * lib/unistr.h: Update.
3090         * lib/linebreak.c: Update.
3091         * modules/linebreak: Update.
3092         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
3093         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
3094         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
3095         * modules/unistr/u16-mbtouc: Renamed from
3096         modules/unistr/u16-mbtouc-safe.
3097         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
3098         * lib/unistr.h: Update.
3099         * lib/unistr/u16-to-u8.c: Update.
3100         * modules/unistr/u16-to-u8: Update.
3101         * lib/unistr/u16-to-u32.c: Update.
3102         * modules/unistr/u16-to-u32: Update.
3103
3104 2007-01-27  Bruno Haible  <bruno@clisp.org>
3105
3106         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
3107         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
3108         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
3109         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
3110         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
3111         * modules/unistr/u8-mbtouc-unsafe: Renamed from
3112         modules/unistr/u8-mbtouc.
3113         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
3114         * lib/unistr.h: Update.
3115         * lib/striconveh.c: Update.
3116         * modules/striconveh: Update.
3117         * lib/linebreak.c: Update.
3118         * modules/linebreak: Update.
3119         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
3120         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
3121         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
3122         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
3123         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
3124         * lib/unistr.h: Update.
3125         * lib/striconveh.c: Update.
3126         * modules/striconveh: Update.
3127         * lib/unistr/u8-to-u16.c: Update.
3128         * modules/unistr/u8-to-u16: Update.
3129         * lib/unistr/u8-to-u32.c: Update.
3130         * modules/unistr/u8-to-u32: Update.
3131
3132 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3133
3134         Sync from Libtool.
3135         * lib/argz.c: Do not include strings.h nor memory.h, include
3136         string.h unconditionally.  Patch by Simon Josefsson.
3137
3138 2007-01-27  Bruno Haible  <bruno@clisp.org>
3139
3140         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
3141         from gl_HEADER_STRING_H_BODY.
3142         (gl_HEADER_STRING_H_BODY): Require it.
3143         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
3144         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
3145         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
3146         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
3147         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
3148         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
3149         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
3150         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
3151         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
3152         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
3153         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
3154         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
3155         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
3156         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
3157         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
3158
3159 2007-01-27  Bruno Haible  <bruno@clisp.org>
3160
3161         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
3162         check_PROGRAMS into noinst_PROGRAMS.
3163         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
3164         check_PROGRAMS in this case.
3165         (func_import): Set for_test to false.
3166         (func_create_testdir): Set for_test to true.
3167
3168 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3169             Bruno Haible  <bruno@clisp.org>
3170
3171         * modules/strcasestr (Files): Remove lib/strcasestr.h.
3172         (Depends-on): Add string.
3173         (Includes): Use <string.h> instead of strcasestr.h.
3174         * modules/string (Makefile.am): Also substitute the value of
3175         REPLACE_STRCASESTR.
3176         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
3177         assume strcasestr is declared in <string.h> not <strings.h>. Also
3178         set REPLACE_STRCASESTR.
3179         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
3180         REPLACE_STRCASESTR.
3181         * lib/strcasestr.h: Remove file.
3182         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
3183         * lib/string_.h (strcasestr): New declaration.
3184
3185 2007-01-27  Bruno Haible  <bruno@clisp.org>
3186
3187         * lib/string_.h: Use 'extern'.
3188
3189 2007-01-27  Jim Meyering  <jim@meyering.net>
3190
3191         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
3192         of set-but-not-used local, "q".
3193
3194         * lib/mempcpy.c: Include <config.h> before <string.h>.
3195         This fixes a compilation error on HP-UX, due to the system's
3196         "restrict"-using mempcpy prototype.
3197
3198 2007-01-26  Bruno Haible  <bruno@clisp.org>
3199
3200         Small optimization.
3201         * lib/javacomp.c: Include c-strstr.h.
3202          (is_envjavac_gcj): Use c_strstr instead of strstr.
3203         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
3204
3205 2007-01-26  Bruno Haible  <bruno@clisp.org>
3206
3207         * MODULES.html.sh (Unicode string functions): Add the new modules.
3208
3209         * modules/uniconv/u32-strconv-to-locale: New file.
3210         * lib/uniconv/u32-strconv-to-locale.c: New file.
3211
3212         * modules/uniconv/u16-strconv-to-locale: New file.
3213         * lib/uniconv/u16-strconv-to-locale.c: New file.
3214
3215         * modules/uniconv/u8-strconv-to-locale: New file.
3216         * lib/uniconv/u8-strconv-to-locale.c: New file.
3217
3218         * modules/uniconv/u32-strconv-from-locale: New file.
3219         * lib/uniconv/u32-strconv-from-locale.c: New file.
3220
3221         * modules/uniconv/u16-strconv-from-locale: New file.
3222         * lib/uniconv/u16-strconv-from-locale.c: New file.
3223
3224         * modules/uniconv/u8-strconv-from-locale: New file.
3225         * lib/uniconv/u8-strconv-from-locale.c: New file.
3226
3227         * modules/uniconv/u32-strconv-to-enc: New file.
3228         * lib/uniconv/u32-strconv-to-enc.c: New file.
3229         * modules/uniconv/u32-strconv-to-enc-tests: New file.
3230         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
3231
3232         * modules/uniconv/u16-strconv-to-enc: New file.
3233         * lib/uniconv/u16-strconv-to-enc.c: New file.
3234         * lib/uniconv/u-strconv-to-enc.h: New file.
3235         * modules/uniconv/u16-strconv-to-enc-tests: New file.
3236         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
3237
3238         * modules/uniconv/u8-strconv-to-enc: New file.
3239         * lib/uniconv/u8-strconv-to-enc.c: New file.
3240         * modules/uniconv/u8-strconv-to-enc-tests: New file.
3241         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
3242
3243         * modules/uniconv/u32-strconv-from-enc: New file.
3244         * lib/uniconv/u32-strconv-from-enc.c: New file.
3245         * modules/uniconv/u32-strconv-from-enc-tests: New file.
3246         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
3247
3248         * modules/uniconv/u16-strconv-from-enc: New file.
3249         * lib/uniconv/u16-strconv-from-enc.c: New file.
3250         * modules/uniconv/u16-strconv-from-enc-tests: New file.
3251         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
3252
3253         * modules/uniconv/u8-strconv-from-enc: New file.
3254         * lib/uniconv/u8-strconv-from-enc.c: New file.
3255         * lib/uniconv/u-strconv-from-enc.h: New file.
3256         * modules/uniconv/u8-strconv-from-enc-tests: New file.
3257         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
3258
3259         * modules/uniconv/u32-conv-from-enc: New file.
3260         * lib/uniconv/u32-conv-from-enc.c: New file.
3261         * modules/uniconv/u32-conv-from-enc-tests: New file.
3262         * tests/uniconv/test-u32-conv-from-enc.c: New file.
3263
3264         * modules/uniconv/u16-conv-from-enc: New file.
3265         * lib/uniconv/u16-conv-from-enc.c: New file.
3266         * lib/uniconv/u-conv-from-enc.h: New file.
3267         * modules/uniconv/u16-conv-from-enc-tests: New file.
3268         * tests/uniconv/test-u16-conv-from-enc.c: New file.
3269
3270         * modules/uniconv/u8-conv-from-enc: New file.
3271         * lib/uniconv/u8-conv-from-enc.c: New file.
3272         * modules/uniconv/u8-conv-from-enc-tests: New file.
3273         * tests/uniconv/test-u8-conv-from-enc.c: New file.
3274
3275         * modules/uniconv/base: New file.
3276         * lib/uniconv.h: New file.
3277
3278 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
3279
3280         * doc/gnulib-tool.texi (Initial import): Update to match current
3281         behavior with strdup module.
3282         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
3283         * lib/memmem.h: Remove; all uses removed.  This is now done
3284         by <string.h>.
3285         * lib/mempcpy.h: Likewise.
3286         * lib/memrchr.h: Likewise.
3287         * lib/stpcpy.h: Likewise.
3288         * lib/stpncpy.h: Likewise.
3289         * lib/strcase.h: Likewise.
3290         * lib/strchrnul.h: Likewise.
3291         * lib/strdup.h: Likewise.
3292         * lib/strndup.h: Likewise.
3293         * lib/strnlen.h: Likewise.
3294         * lib/strpbrk.h: Likewise.
3295         * lib/strsep.h: Likewise.
3296         * lib/strstr.h: Likewise.
3297         * lib/strtok_r.h: Likewise.
3298         * lib/string_.h: New file.
3299         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
3300         Rely on <string.h> instead.
3301         * lib/canon-host.c: Likewise.
3302         * lib/chdir-long.c: Likewise.
3303         * lib/concatpath.c: Likewise.
3304         * lib/exclude.c: Likewise.
3305         * lib/fchdir.c: Likewise.
3306         * lib/getaddrinfo.c: Likewise.
3307         * lib/getcwd.c: Likewise.
3308         * lib/getsubopt.c: Likewise.
3309         * lib/glob.c: Likewise.
3310         * lib/hard-locale.c: Likewise.
3311         * lib/iconvme.c: Likewise.
3312         * lib/javacomp.c: Likewise.
3313         * lib/mempcpy.c: Likewise.
3314         * lib/memrchr.c: Likewise.
3315         * lib/regex_internal.h: Likewise.
3316         * lib/stpncpy.c: Likewise.
3317         * lib/strcasecmp.c: Likewise.
3318         * lib/strchrnul.c: Likewise.
3319         * lib/strdup.c: Likewise.
3320         * lib/striconv.c: Likewise.
3321         * lib/striconveh.c: Likewise.
3322         * lib/striconveha.c: Likewise.
3323         * lib/strncasecmp.c: Likewise.
3324         * lib/strndup.c: Likewise.
3325         * lib/strnlen.c: Likewise.
3326         * lib/strsep.c: Likewise.
3327         * lib/strstr.c: Likewise.
3328         * lib/strtok_r.c: Likewise.
3329         * lib/userspec.c: Likewise.
3330         * lib/w32spawn.h: Likewise.
3331         * lib/xstrndup.c: Likewise.
3332         * lib/mountlist.c (strstr): Remove decl.
3333         * m4/string_h.m4: New file.
3334         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
3335         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
3336         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
3337         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
3338         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
3339         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
3340         Set REPLACE_STRCASECMP if necessary.
3341         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
3342         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
3343         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
3344         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
3345         HAVE_DECL_STRDUP if necessary.
3346         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
3347         since gl_FUNC_STRNDUP does that now.
3348         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
3349         Check for decl here...
3350         (gl_PREREQ_STRNLEN): ... not here.
3351         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
3352         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
3353         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
3354         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
3355         necessary.
3356         * modules/string: New file.
3357         * modules/memmem (Files): Remove special-purpose include file.
3358         (Depends-on): Add string.
3359         (Include): Include <string.h>, not the removed file.
3360         * modules/mempcpy: Likewise.
3361         * modules/memrchr: Likewise.
3362         * modules/stpcpy: Likewise.
3363         * modules/stpncpy: Likewise.
3364         * modules/strcase: Likewise.
3365         * modules/strchrnul: Likewise.
3366         * modules/strdup: Likewise.
3367         * modules/strndup: Likewise.
3368         * modules/strnlen: Likewise.
3369         * modules/strpbrk: Likewise.
3370         * modules/strsep: Likewise.
3371         * modules/strstr: Likewise.
3372         * modules/strtok_r: Likewise.
3373         * tests/test-dirname.c: Don't include "strdup.h", since
3374         <string.h> now suffices.
3375         * tests/test-memmem.c: Don't include "memmem.h", since
3376         <string.h> now suffices.
3377
3378 2007-01-25  Bruno Haible  <bruno@clisp.org>
3379
3380         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
3381         *resultp is 0.
3382
3383         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
3384         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
3385         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
3386         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
3387
3388         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
3389         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
3390         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
3391         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
3392         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
3393         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
3394
3395 2007-01-24  Bruno Haible  <bruno@clisp.org>
3396
3397         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
3398         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
3399         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
3400         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
3401         gl_FUNC_FTS_CORE.
3402         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
3403         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
3404         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
3405         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
3406         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
3407         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
3408         gl_FUNC_FCHOWNAT.
3409         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
3410         gl_FUNC_STRFTIME.
3411         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
3412         Reported by Ralf Wildenhues.
3413
3414 2007-01-24  Bruno Haible  <bruno@clisp.org>
3415
3416         Drop AC_REQUIRE calls that are redundant with the module dependencies.
3417         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
3418         gl_GETADDRINFO.
3419         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
3420         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
3421         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
3422
3423 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
3424
3425         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
3426         Don't use 'exit'; just return from 'main'.
3427         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
3428
3429         * lib/fnmatch_.h: Readjust white space and comments to match
3430         glibc, to avoid spurious diffs.
3431
3432 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
3433
3434         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
3435         2004-12-01 change by Jakub Jelinek, since this code won't compile
3436         if !LIBC.  Problem reported by Bob Proulx.
3437
3438 2007-01-23  Bruno Haible  <bruno@clisp.org>
3439
3440         * lib/striconveh.c: Include c-strcaseeq.h.
3441         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
3442         * modules/striconveh (Depends-on): Add c-strcaseeq.
3443
3444 2007-01-23  Bruno Haible  <bruno@clisp.org>
3445
3446         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
3447
3448         * modules/c-strcaseeq: New file.
3449         * lib/c-strcaseeq.h: New file.
3450
3451         * modules/streq: New file.
3452         * lib/streq.h: New file.
3453
3454 2007-01-23  Bruno Haible  <bruno@clisp.org>
3455
3456         * modules/striconveha-tests: New file.
3457         * tests/test-striconveha.c: New file.
3458
3459         * lib/striconveha.h: Include <stdbool.h>.
3460         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
3461         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
3462         (mem_iconveha_notranslit): Renamed from mem_iconveha.
3463         (mem_iconveha): New function.
3464         (str_iconveha_notranslit): Renamed from str_iconveha.
3465         (str_iconveha): New function.
3466         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
3467         c-strcase.
3468
3469 2007-01-23  Bruno Haible  <bruno@clisp.org>
3470
3471         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
3472         encodings without forgiving before trying any encoding with handler.
3473         (str_iconveha): Try all encodings without forgiving before trying any
3474         encoding with handler.
3475
3476 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
3477
3478         Import the following changes from libc.
3479
3480         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
3481
3482         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
3483
3484         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3485
3486         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
3487         normal_bracket label.
3488
3489         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
3490
3491         [BZ #361]
3492         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
3493         to normal_bracket after fetching the next character.
3494
3495 2007-01-22  Bruno Haible  <bruno@clisp.org>
3496
3497         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
3498         argument.
3499         * lib/striconveh.c (iconv_carefully_1): New function.
3500         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
3501         argument.
3502         (str_cd_iconveh): Update.
3503         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
3504         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
3505         * tests/test-striconveh.c (MAGIC): New macro.
3506         (new_offsets): New function.
3507         (main): Test call with and without offsets.
3508
3509 2007-01-22  Bruno Haible  <bruno@clisp.org>
3510
3511         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
3512         * modules/sys_select (Makefile.am): Likewise.
3513         * modules/sys_socket (Makefile.am): Likewise.
3514         * modules/sys_time (Makefile.am): Likewise.
3515
3516 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
3517
3518         * modules/gettimeofday (License): Change from GPL to LGPL, since
3519         gettimeofday is a library function.
3520
3521 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3522
3523         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
3524
3525 2007-01-21  Bruno Haible  <bruno@clisp.org>
3526
3527         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
3528
3529 2007-01-21  Bruno Haible  <bruno@clisp.org>
3530
3531         * modules/striconveha: New file.
3532         * lib/striconveha.h: New file.
3533         * lib/striconveha.c: New file.
3534         * MODULES.html.sh (Internationalization functions): Add striconveha.
3535         * lib/striconv.c (str_iconv): Optimize the case of an empty input
3536         string.
3537         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
3538
3539 2007-01-21  Bruno Haible  <bruno@clisp.org>
3540
3541         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
3542         * lib/striconveh.c (str_iconveh): Likewise.
3543
3544 2007-01-21  Bruno Haible  <bruno@clisp.org>
3545
3546         * lib/striconveh.h (mem_iconveh): New declaration.
3547         * lib/striconveh.c (mem_iconveh): New function.
3548         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
3549
3550 2007-01-21  Bruno Haible  <bruno@clisp.org>
3551
3552         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
3553
3554         * lib/striconveh.h (mem_cd_iconveh): Change specification.
3555         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
3556         original result buffer.
3557         (str_cd_iconveh): Update.
3558         * tests/test-striconveh.c (main): Update.
3559
3560         * lib/striconv.h (mem_cd_iconv): Change specification.
3561         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
3562         result buffer.
3563         (str_cd_iconv): Update.
3564         * tests/test-striconv.c (main): Update.
3565
3566 2007-01-21  Bruno Haible  <bruno@clisp.org>
3567
3568         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
3569
3570 2007-01-20  Jim Meyering  <jim@meyering.net>
3571
3572         * lib/userspec.c (parse_with_separator): If a user or group string
3573         starts with "+", skip the corresponding name-to-ID look-up, since
3574         such a look-up must fail: user and group names may not include "+".
3575
3576 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
3577
3578         * lib/poll.c: Include sys/time.h and time.h unconditionally,
3579         since we now assume the sys_time module.
3580         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
3581         check for sys/time.h; no longer needed.
3582         * modules/poll (Depends-on): Depend on sys_time.
3583
3584 2007-01-18  Bruno Haible  <bruno@clisp.org>
3585
3586         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
3587         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
3588
3589         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
3590         gettimeofday.
3591
3592         * tests/test-gettimeofday.c: Include <time.h>.
3593         (dummy): Remove variable.
3594
3595         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
3596         gl_HEADER_SYS_TIME_H.
3597         (gl_HEADER_SYS_TIME_H): New macro.
3598
3599         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
3600         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3601         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
3602         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
3603         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3604         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
3605         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
3606         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3607         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
3608         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
3609         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3610
3611         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
3612         last change; it caused a compilation error when cross-compiling to
3613         Cygwin.
3614
3615 2007-01-18  Jim Meyering  <jim@meyering.net>
3616
3617         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
3618         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
3619         than the race-prone "test -d sys || mkdir sys".
3620         (configure.ac): Use AC_PROG_MKDIR_P.
3621         * modules/sys_select: Likewise.
3622         * modules/sys_socket: Likewise.
3623         * modules/sys_time: Likewise.
3624
3625 2007-01-18  Eric Blake  <ebb9@byu.net>
3626
3627         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
3628         replace gettimeofday.
3629         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
3630         name, to avoid infinite recursion.
3631
3632 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
3633
3634         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
3635         module sys_time.
3636         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
3637         assume timespec.h defines struct timeval.
3638         * lib/settime.c: Likewise.
3639         * lib/utimens.c: Likewise.
3640         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
3641         since we now assume the gettimeofday module.
3642         * lib/tempname.c (__gen_tempname): Likewise.
3643         * lib/gettimeofday.h: Remove.
3644         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
3645         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
3646         Include <time.h>, for 'time()'.
3647         (localtime_buffer_addr): Also use this workaround if
3648         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
3649         to simplify the uses.  All uses changed.
3650         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
3651         that #undef is inside {}, and 'const' follows type name consistently.
3652         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
3653         (gettimeofday): Do not use the maximum possible value for
3654         tv->tv_usec, since that might break usages other than ls.c.
3655         Instead, we'll leave ls.c alone.  This undoes today's patch
3656         by Bruno.  Add a compile-time warning for 1s-clock resolution;
3657         we've never observed the problem but might as well keep the
3658         canary.
3659         * lib/nanosleep.c: Include timespec.h first, for interface check.
3660         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
3661         now assume the sys_time module.
3662         * lib/tempname.c: Likewise.
3663         * lib/timespec.h: Likewise.
3664         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
3665         needed.
3666         * lib/strftime.c: Likewise.
3667         * lib/timespec.h: Likewise.
3668         * lib/posixtm.c: Include posixtm.h first, for interface check.
3669         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
3670         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
3671         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
3672         * lib/sys_time_.h: New file.
3673         * lib/timespec.h (struct timespec): Use long int, not long.
3674         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
3675         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
3676         Remove obsolescent call to AC_HEADER_TIME.
3677         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
3678         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
3679         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
3680         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
3681         Likewise.
3682         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
3683         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
3684         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
3685         into the sys_time module.  Check for gettimeofday just once.
3686         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
3687         for gettimeofday signature to just check the signature.  Merely
3688         compile it, since linking doesn't test signature.  Improve test for
3689         whether gettimeofday.o is actually needed.
3690         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
3691         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
3692         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
3693         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3694         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
3695         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
3696         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
3697         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
3698         than worrying about sys/time.h.
3699         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3700         Don't bother worrying about TIME_WITH_SYS_TIME.
3701         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
3702         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
3703         * m4/sys_time_h.m4: New file.
3704         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
3705         Don't include sys/time.h.  Return from main rather than exiting.
3706         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
3707         all uses changed.
3708         * modules/gethrxtime (Depends-on): Add sys_time.
3709         * modules/gettime (Depends-on): Likewise.
3710         * modules/gettimeofday (Depends-on): Likewise.
3711         * modules/nanosleep (Depends-on): Likewise.
3712         * modules/settime (Depends-on): Likewise.
3713         * modules/tempname (Depends-on): Likewise.
3714         * modules/utimens (Depends-on): Likewise.
3715         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
3716         (Include:) Change back to <sys/time.h>.
3717         (Maintainer:) Add self.
3718         * modules/sys_time: New file.
3719         * modules/tempname (Depends-on): Add gettimeofday.
3720         * tests/test-gettimeofday.c: Include <sys/time.h>
3721         rather than gettimeofday.h.
3722
3723 2007-01-17  Bruno Haible  <bruno@clisp.org>
3724
3725         * gnulib-tool (func_get_license): Revert last patch. Instead, let
3726         the license default to GPL.
3727         (func_create_testdir): Don't complain if a module is LGPL and its
3728         tests module depends on GPLed modules.
3729
3730 2007-01-17  Bruno Haible  <bruno@clisp.org>
3731
3732         * lib/gettimeofday.c (gettimeofday): Add code for the case
3733         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
3734         maximum possible value for tv->tv_usec, rather than the minimum one.
3735
3736 2005-10-08  Martin Lambers  <marlam@marlam.de>
3737 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3738 2007-01-16  Bruno Haible  <bruno@clisp.org>
3739
3740         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
3741         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
3742         gl_FUNC_GETTIMEOFDAY.
3743         (Include): Add gettimeofday.h.
3744         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
3745         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
3746         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
3747         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
3748         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
3749         * lib/gettimeofday.h: New file.
3750         * lib/gettimeofday.c: Include <sys/timeb.h>.
3751         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
3752         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3753         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
3754         fall back on time().
3755
3756         * tests/test-gettimeofday.c: New file.
3757         * modules/gettimeofday-tests: New file.
3758
3759 2007-01-16  Eric Blake  <ebb9@byu.net>
3760
3761         * modules/fnmatch (Depends-on): Depend on wchar.
3762         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
3763         * m4/fnmatch.m4: Likewise.
3764         * modules/mbchar (Makefile.am): Assume <wchar.h>.
3765         * m4/mbchar.m4: Likewise.
3766         * modules/mbswidth (Depends-on): Depend on wchar.
3767         * lib/mbswidth.c: Assume <wchar.h>.
3768         * m4/mbswidth.m4: Likewise.
3769         * modules/quotearg (Depends-on): Depend on wchar.
3770         * lib/quotearg.c: Assume <wchar.h>.
3771         * m4/quotearg.m4: Likewise.
3772         * modules/regex (Depends-on): Depend on wchar.
3773         * lib/regex_internal.h: Assume <wchar.h>.
3774         * m4/regex.m4: Likewise.
3775         * modules/stdint (Depends-on): Depend on wchar.
3776         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
3777         * m4/stdint.m4: Likewise.
3778         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
3779         * modules/strftime (Depends-on): Depend on wchar.
3780         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
3781         * modules/strtol (Depends-on): Depend on wchar.
3782         * lib/strtol.c: Assume <wchar.h>.
3783         * modules/wcwidth (Depends-on): Depend on wchar.
3784         * lib/wcwidth.h: Assume <wchar.h>.
3785         * m4/wcwidth.m4: Likewise.
3786
3787 2007-01-16  Bruno Haible  <bruno@clisp.org>
3788
3789         * modules/csharpexec-script: New, created from...
3790         * modules/csharpexec: ... this.
3791
3792 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
3793
3794         * modules/javaexec-script: New, created from...
3795         * modules/javaexec: ... this.
3796
3797 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3798
3799         * modules/poll (Dependencies): Add sys_select.
3800
3801 2007-01-15  Jim Meyering  <jim@meyering.net>
3802
3803         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
3804         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
3805         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
3806         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
3807
3808 2007-01-15  Bruno Haible  <bruno@clisp.org>
3809
3810         * modules/striconveh: New file.
3811         * lib/striconveh.h: New file.
3812         * lib/striconveh.c: New file.
3813         * MODULES.html.sh (Internationalization functions): Add striconveh.
3814
3815         * modules/striconveh-tests: New file.
3816         * tests/test-striconveh.c: New file.
3817
3818 2007-01-15  Bruno Haible  <bruno@clisp.org>
3819
3820         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
3821         not from GNU libiconv or GNU libc.
3822
3823 2007-01-15  Bruno Haible  <bruno@clisp.org>
3824
3825         * doc/gnulib-intro.texi (Copyright): Explain the different license
3826         terms for module descriptions, autoconf macros, tests, documentation.
3827
3828 2007-01-14  Bruno Haible  <bruno@clisp.org>
3829
3830         * modules/striconv-tests: New file.
3831         * tests/test-striconv.c: New file.
3832
3833 2007-01-14  Bruno Haible  <bruno@clisp.org>
3834
3835         * modules/iconv-tests: New file.
3836         * tests/test-iconv.c: New file.
3837
3838 2007-01-14  Bruno Haible  <bruno@clisp.org>
3839
3840         * gnulib-tool (func_get_license): For test modules, use the license of
3841         the main module.
3842
3843 2007-01-14  Bruno Haible  <bruno@clisp.org>
3844
3845         * modules/iconv (Include): Clarify that <iconv.h> can only be included
3846         if iconv is found to exist.
3847
3848 2007-01-14  Bruno Haible  <bruno@clisp.org>
3849
3850         * modules/c-ctype-tests: New file.
3851         * tests/test-c-ctype.c: New file.
3852
3853 2007-01-14  Bruno Haible  <bruno@clisp.org>
3854
3855         * modules/binary-io-tests: New file.
3856         * tests/test-binary-io.sh: New file.
3857         * tests/test-binary-io.c: New file.
3858
3859 2007-01-14  Bruno Haible  <bruno@clisp.org>
3860
3861         * modules/array-oset-tests: New file.
3862         * tests/test-array_oset.c: New file.
3863
3864 2007-01-14  Bruno Haible  <bruno@clisp.org>
3865
3866         * modules/array-list-tests: New file.
3867         * tests/test-array_list.c: New file.
3868
3869 2007-01-14  Bruno Haible  <bruno@clisp.org>
3870
3871         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
3872         and make.
3873         Reported by Simon Josefsson in
3874         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
3875
3876 2007-01-14  Bruno Haible  <bruno@clisp.org>
3877
3878         * modules/allocsa-tests: New file.
3879         * tests/test-allocsa.c: New file.
3880
3881 2007-01-14  Bruno Haible  <bruno@clisp.org>
3882
3883         * modules/fchdir (Depends-on): Add absolute-header.
3884         * modules/unistd (Depends-on): Likewise.
3885
3886 2006-12-30  Bruno Haible  <bruno@clisp.org>
3887
3888         * modules/fchdir: New file.
3889         * modules/unistd (Files): Add lib/unistd_.h.
3890         (Makefile.am): Generate unistd.h from unistd_.h.
3891         * lib/fchdir.c: New file.
3892         * lib/dirent_.h: New file.
3893         * lib/unistd_.h: New file.
3894         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
3895         * m4/fchdir.m4: New file.
3896         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
3897         (gl_HEADER_UNISTD): Invoke it.
3898         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
3899         function.
3900         * lib/backupfile.c (opendir, closedir): Undefine.
3901         * lib/chown.c (open, close): Undefine.
3902         * lib/clean-temp.c (open, close): Undefine.
3903         * lib/copy-file.c (open, close): Undefine.
3904         * lib/execute.c (open, close): Undefine.
3905         * lib/fsusage.c (open, close): Undefine.
3906         * lib/gc-gnulib.c (open, close): Undefine.
3907         * lib/getcwd.c (opendir, closedir): Undefine.
3908         * lib/glob.c (opendir, closedir): Undefine.
3909         * lib/javacomp.c (open, close): Undefine.
3910         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
3911         * lib/openat-proc.c (open, close): Undefine.
3912         * lib/pagealign_alloc.c (open, close): Undefine.
3913         * lib/pipe.c (open, close): Undefine.
3914         * lib/progreloc.c (open, close): Undefine.
3915         * lib/savedir.c (opendir, closedir): Undefine.
3916         * lib/utime.c (open, close): Undefine.
3917         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
3918
3919 2007-01-10  Bruno Haible  <bruno@clisp.org>
3920
3921         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
3922
3923 2007-01-12  Eric Blake  <ebb9@byu.net>
3924
3925         Provide a robust <wchar.h>.  Further simplifications are now
3926         possible in other modules, but not included here.
3927         * modules/wchar: New module.
3928         * m4/wchar.m4: New file.
3929         * lib/wchar_.h: Likewise.
3930         * modules/mbchar (Depends-on): Depend on wchar, as the first use
3931         of the new module.
3932         * MODULES.html.sh (Extended multibyte and wide character utilities):
3933         New section.
3934
3935 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
3936
3937         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
3938         to a reasonable default for memory allocation.
3939         (xreadlink): Don't allocate a huge buffer, to work around a buggy
3940         file system that reports garbage st_size values for symlinks.
3941         Problem reported by Liyang Hu.
3942
3943 2007-01-11  Simon Josefsson  <simon@josefsson.org>
3944
3945         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
3946         Emacs .#* auto-save files).
3947
3948 2007-01-11  Bruno Haible  <bruno@clisp.org>
3949
3950         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
3951         directory.
3952
3953 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
3954
3955         Use @...@ consistently in lib/wctype_.h.
3956         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
3957         on it being set to 1 or 0.
3958         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
3959         go back to AC_SUBSTing it.
3960         * modules/wctype (Makefile.am): Undo previous change.
3961
3962 2007-01-10  Eric Blake  <ebb9@byu.net>
3963
3964         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
3965         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
3966         * modules/wctype (Makefile.am): Likewise.
3967         Reported by Chris McGuire.
3968
3969 2007-01-10  Jim Meyering  <jim@meyering.net>
3970
3971         fts.c: a small readability/maintainability improvement
3972         * lib/fts.c (fts_read): Make this code slightly more readable and
3973         maintainable by hoisting the "sp->fts_cur = p" assignments to
3974         immediately follow the statements that set P.  Derived from
3975         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
3976
3977 2007-01-10  Eric Blake  <ebb9@byu.net>
3978
3979         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
3980         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
3981         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
3982         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
3983         Reported by Chris McGuire.
3984
3985 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3986
3987         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
3988         in sed script.
3989
3990 2007-01-09  Bruno Haible  <bruno@clisp.org>
3991
3992         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
3993         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
3994         variables.
3995         (func_module): Use them.
3996
3997 2007-01-09  Bruno Haible  <bruno@clisp.org>
3998
3999         * modules/unistr/base: New file.
4000         * lib/unistr.h: New file.
4001
4002         * modules/unistr/u8-to-u16: New file.
4003         * lib/unistr/u8-to-u16.c: New file.
4004
4005         * modules/unistr/u8-to-u32: New file.
4006         * lib/unistr/u8-to-u32.c: New file.
4007
4008         * modules/unistr/u16-to-u8: New file.
4009         * lib/unistr/u16-to-u8.c: New file.
4010
4011         * modules/unistr/u16-to-u32: New file.
4012         * lib/unistr/u16-to-u32.c: New file.
4013
4014         * modules/unistr/u32-to-u8: New file.
4015         * lib/unistr/u32-to-u8.c: New file.
4016
4017         * modules/unistr/u32-to-u16: New file.
4018         * lib/unistr/u32-to-u16.c: New file.
4019
4020         * modules/unistr/u8-check: New file.
4021         * modules/unistr/u16-check: New file.
4022         * modules/unistr/u32-check: New file.
4023         * lib/unistr/u8-check.c: New file.
4024         * lib/unistr/u16-check.c: New file.
4025         * lib/unistr/u32-check.c: New file.
4026
4027         * modules/unistr/u8-chr: New file.
4028         * modules/unistr/u16-chr: New file.
4029         * modules/unistr/u32-chr: New file.
4030         * lib/unistr/u8-chr.c: New file.
4031         * lib/unistr/u16-chr.c: New file.
4032         * lib/unistr/u32-chr.c: New file.
4033
4034         * modules/unistr/u8-cmp: New file.
4035         * modules/unistr/u16-cmp: New file.
4036         * modules/unistr/u32-cmp: New file.
4037         * lib/unistr/u8-cmp.c: New file.
4038         * lib/unistr/u16-cmp.c: New file.
4039         * lib/unistr/u32-cmp.c: New file.
4040
4041         * modules/unistr/u8-cpy: New file.
4042         * modules/unistr/u16-cpy: New file.
4043         * modules/unistr/u32-cpy: New file.
4044         * lib/unistr/u8-cpy.c: New file.
4045         * lib/unistr/u16-cpy.c: New file.
4046         * lib/unistr/u32-cpy.c: New file.
4047         * lib/unistr/u-cpy.h: New file.
4048
4049         * modules/unistr/u8-cpy-alloc: New file.
4050         * modules/unistr/u16-cpy-alloc: New file.
4051         * modules/unistr/u32-cpy-alloc: New file.
4052         * lib/unistr/u8-cpy-alloc.c: New file.
4053         * lib/unistr/u16-cpy-alloc.c: New file.
4054         * lib/unistr/u32-cpy-alloc.c: New file.
4055         * lib/unistr/u-cpy-alloc.h: New file.
4056
4057         * modules/unistr/u8-endswith: New file.
4058         * modules/unistr/u16-endswith: New file.
4059         * modules/unistr/u32-endswith: New file.
4060         * lib/unistr/u8-endswith.c: New file.
4061         * lib/unistr/u16-endswith.c: New file.
4062         * lib/unistr/u32-endswith.c: New file.
4063         * lib/unistr/u-endswith.h: New file.
4064
4065         * modules/unistr/u8-mblen: New file.
4066         * modules/unistr/u16-mblen: New file.
4067         * modules/unistr/u32-mblen: New file.
4068         * lib/unistr/u8-mblen.c: New file.
4069         * lib/unistr/u16-mblen.c: New file.
4070         * lib/unistr/u32-mblen.c: New file.
4071
4072         * modules/unistr/u8-mbtouc: New file.
4073         * modules/unistr/u16-mbtouc: New file.
4074         * modules/unistr/u32-mbtouc: New file.
4075         * lib/unistr/u8-mbtouc.c: New file.
4076         * lib/unistr/u16-mbtouc.c: New file.
4077         * lib/unistr/u32-mbtouc.c: New file.
4078
4079         * modules/unistr/u8-mbtouc-safe: New file.
4080         * modules/unistr/u16-mbtouc-safe: New file.
4081         * modules/unistr/u32-mbtouc-safe: New file.
4082         * lib/unistr/u8-mbtouc-safe.c: New file.
4083         * lib/unistr/u16-mbtouc-safe.c: New file.
4084         * lib/unistr/u32-mbtouc-safe.c: New file.
4085
4086         * modules/unistr/u8-move: New file.
4087         * modules/unistr/u16-move: New file.
4088         * modules/unistr/u32-move: New file.
4089         * lib/unistr/u8-move.c: New file.
4090         * lib/unistr/u16-move.c: New file.
4091         * lib/unistr/u32-move.c: New file.
4092         * lib/unistr/u-move.h: New file.
4093
4094         * modules/unistr/u8-next: New file.
4095         * modules/unistr/u16-next: New file.
4096         * modules/unistr/u32-next: New file.
4097         * lib/unistr/u8-next.c: New file.
4098         * lib/unistr/u16-next.c: New file.
4099         * lib/unistr/u32-next.c: New file.
4100
4101         * modules/unistr/u8-prev: New file.
4102         * modules/unistr/u16-prev: New file.
4103         * modules/unistr/u32-prev: New file.
4104         * lib/unistr/u8-prev.c: New file.
4105         * lib/unistr/u16-prev.c: New file.
4106         * lib/unistr/u32-prev.c: New file.
4107
4108         * modules/unistr/u8-set: New file.
4109         * modules/unistr/u16-set: New file.
4110         * modules/unistr/u32-set: New file.
4111         * lib/unistr/u8-set.c: New file.
4112         * lib/unistr/u16-set.c: New file.
4113         * lib/unistr/u32-set.c: New file.
4114         * lib/unistr/u-set.h: New file.
4115
4116         * modules/unistr/u8-startswith: New file.
4117         * modules/unistr/u16-startswith: New file.
4118         * modules/unistr/u32-startswith: New file.
4119         * lib/unistr/u8-startswith.c: New file.
4120         * lib/unistr/u16-startswith.c: New file.
4121         * lib/unistr/u32-startswith.c: New file.
4122         * lib/unistr/u-startswith.h: New file.
4123
4124         * modules/unistr/u8-stpcpy: New file.
4125         * modules/unistr/u16-stpcpy: New file.
4126         * modules/unistr/u32-stpcpy: New file.
4127         * lib/unistr/u8-stpcpy.c: New file.
4128         * lib/unistr/u16-stpcpy.c: New file.
4129         * lib/unistr/u32-stpcpy.c: New file.
4130         * lib/unistr/u-stpcpy.h: New file.
4131
4132         * modules/unistr/u8-stpncpy: New file.
4133         * modules/unistr/u16-stpncpy: New file.
4134         * modules/unistr/u32-stpncpy: New file.
4135         * lib/unistr/u8-stpncpy.c: New file.
4136         * lib/unistr/u16-stpncpy.c: New file.
4137         * lib/unistr/u32-stpncpy.c: New file.
4138         * lib/unistr/u-stpncpy.h: New file.
4139
4140         * modules/unistr/u8-strcat: New file.
4141         * modules/unistr/u16-strcat: New file.
4142         * modules/unistr/u32-strcat: New file.
4143         * lib/unistr/u8-strcat.c: New file.
4144         * lib/unistr/u16-strcat.c: New file.
4145         * lib/unistr/u32-strcat.c: New file.
4146         * lib/unistr/u-strcat.h: New file.
4147
4148         * modules/unistr/u8-strchr: New file.
4149         * modules/unistr/u16-strchr: New file.
4150         * modules/unistr/u32-strchr: New file.
4151         * lib/unistr/u8-strchr.c: New file.
4152         * lib/unistr/u16-strchr.c: New file.
4153         * lib/unistr/u32-strchr.c: New file.
4154
4155         * modules/unistr/u8-strcmp: New file.
4156         * modules/unistr/u16-strcmp: New file.
4157         * modules/unistr/u32-strcmp: New file.
4158         * lib/unistr/u8-strcmp.c: New file.
4159         * lib/unistr/u16-strcmp.c: New file.
4160         * lib/unistr/u32-strcmp.c: New file.
4161
4162         * modules/unistr/u8-strcpy: New file.
4163         * modules/unistr/u16-strcpy: New file.
4164         * modules/unistr/u32-strcpy: New file.
4165         * lib/unistr/u8-strcpy.c: New file.
4166         * lib/unistr/u16-strcpy.c: New file.
4167         * lib/unistr/u32-strcpy.c: New file.
4168         * lib/unistr/u-strcpy.h: New file.
4169
4170         * modules/unistr/u8-strcspn: New file.
4171         * modules/unistr/u16-strcspn: New file.
4172         * modules/unistr/u32-strcspn: New file.
4173         * lib/unistr/u8-strcspn.c: New file.
4174         * lib/unistr/u16-strcspn.c: New file.
4175         * lib/unistr/u32-strcspn.c: New file.
4176         * lib/unistr/u-strcspn.h: New file.
4177
4178         * modules/unistr/u8-strdup: New file.
4179         * modules/unistr/u16-strdup: New file.
4180         * modules/unistr/u32-strdup: New file.
4181         * lib/unistr/u8-strdup.c: New file.
4182         * lib/unistr/u16-strdup.c: New file.
4183         * lib/unistr/u32-strdup.c: New file.
4184         * lib/unistr/u-strdup.h: New file.
4185
4186         * modules/unistr/u8-strlen: New file.
4187         * modules/unistr/u16-strlen: New file.
4188         * modules/unistr/u32-strlen: New file.
4189         * lib/unistr/u8-strlen.c: New file.
4190         * lib/unistr/u16-strlen.c: New file.
4191         * lib/unistr/u32-strlen.c: New file.
4192         * lib/unistr/u-strlen.h: New file.
4193
4194         * modules/unistr/u8-strmblen: New file.
4195         * modules/unistr/u16-strmblen: New file.
4196         * modules/unistr/u32-strmblen: New file.
4197         * lib/unistr/u8-strmblen.c: New file.
4198         * lib/unistr/u16-strmblen.c: New file.
4199         * lib/unistr/u32-strmblen.c: New file.
4200
4201         * modules/unistr/u8-strmbtouc: New file.
4202         * modules/unistr/u16-strmbtouc: New file.
4203         * modules/unistr/u32-strmbtouc: New file.
4204         * lib/unistr/u8-strmbtouc.c: New file.
4205         * lib/unistr/u16-strmbtouc.c: New file.
4206         * lib/unistr/u32-strmbtouc.c: New file.
4207
4208         * modules/unistr/u8-strncat: New file.
4209         * modules/unistr/u16-strncat: New file.
4210         * modules/unistr/u32-strncat: New file.
4211         * lib/unistr/u8-strncat.c: New file.
4212         * lib/unistr/u16-strncat.c: New file.
4213         * lib/unistr/u32-strncat.c: New file.
4214         * lib/unistr/u-strncat.h: New file.
4215
4216         * modules/unistr/u8-strncmp: New file.
4217         * modules/unistr/u16-strncmp: New file.
4218         * modules/unistr/u32-strncmp: New file.
4219         * lib/unistr/u8-strncmp.c: New file.
4220         * lib/unistr/u16-strncmp.c: New file.
4221         * lib/unistr/u32-strncmp.c: New file.
4222
4223         * modules/unistr/u8-strncpy: New file.
4224         * modules/unistr/u16-strncpy: New file.
4225         * modules/unistr/u32-strncpy: New file.
4226         * lib/unistr/u8-strncpy.c: New file.
4227         * lib/unistr/u16-strncpy.c: New file.
4228         * lib/unistr/u32-strncpy.c: New file.
4229         * lib/unistr/u-strncpy.h: New file.
4230
4231         * modules/unistr/u8-strnlen: New file.
4232         * modules/unistr/u16-strnlen: New file.
4233         * modules/unistr/u32-strnlen: New file.
4234         * lib/unistr/u8-strnlen.c: New file.
4235         * lib/unistr/u16-strnlen.c: New file.
4236         * lib/unistr/u32-strnlen.c: New file.
4237         * lib/unistr/u-strnlen.h: New file.
4238
4239         * modules/unistr/u8-strpbrk: New file.
4240         * modules/unistr/u16-strpbrk: New file.
4241         * modules/unistr/u32-strpbrk: New file.
4242         * lib/unistr/u8-strpbrk.c: New file.
4243         * lib/unistr/u16-strpbrk.c: New file.
4244         * lib/unistr/u32-strpbrk.c: New file.
4245         * lib/unistr/u-strpbrk.h: New file.
4246
4247         * modules/unistr/u8-strrchr: New file.
4248         * modules/unistr/u16-strrchr: New file.
4249         * modules/unistr/u32-strrchr: New file.
4250         * lib/unistr/u8-strrchr.c: New file.
4251         * lib/unistr/u16-strrchr.c: New file.
4252         * lib/unistr/u32-strrchr.c: New file.
4253
4254         * modules/unistr/u8-strspn: New file.
4255         * modules/unistr/u16-strspn: New file.
4256         * modules/unistr/u32-strspn: New file.
4257         * lib/unistr/u8-strspn.c: New file.
4258         * lib/unistr/u16-strspn.c: New file.
4259         * lib/unistr/u32-strspn.c: New file.
4260         * lib/unistr/u-strspn.h: New file.
4261
4262         * modules/unistr/u8-strstr: New file.
4263         * modules/unistr/u16-strstr: New file.
4264         * modules/unistr/u32-strstr: New file.
4265         * lib/unistr/u8-strstr.c: New file.
4266         * lib/unistr/u16-strstr.c: New file.
4267         * lib/unistr/u32-strstr.c: New file.
4268         * lib/unistr/u-strstr.h: New file.
4269
4270         * modules/unistr/u8-strtok: New file.
4271         * modules/unistr/u16-strtok: New file.
4272         * modules/unistr/u32-strtok: New file.
4273         * lib/unistr/u8-strtok.c: New file.
4274         * lib/unistr/u16-strtok.c: New file.
4275         * lib/unistr/u32-strtok.c: New file.
4276         * lib/unistr/u-strtok.h: New file.
4277
4278         * modules/unistr/u8-uctomb: New file.
4279         * modules/unistr/u16-uctomb: New file.
4280         * modules/unistr/u32-uctomb: New file.
4281         * lib/unistr/u8-uctomb.c: New file.
4282         * lib/unistr/u16-uctomb.c: New file.
4283         * lib/unistr/u32-uctomb.c: New file.
4284
4285         * MODULES.html.sh (Unicode string functions): Add the new modules.
4286
4287 2007-01-08  Bruno Haible  <bruno@clisp.org>
4288
4289         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
4290         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
4291         subdirectories.
4292
4293 2007-01-08  Karl Berry  <karl@gnu.org>
4294
4295         * doc/error.texi: mention that main() fns must set program_name
4296         when progname is used.
4297
4298 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
4299
4300         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
4301         WCTYPE_H is empty, for the benefit of builds from non-distclean
4302         directories.  Problem reported by Eric Blake in
4303         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
4304
4305 2007-01-08  Bruno Haible  <bruno@clisp.org>
4306
4307         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
4308         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
4309         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
4310         PROVIDE_CANONICALIZE_FILENAME_MODE.
4311         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
4312
4313 2007-01-08  Bruno Haible  <bruno@clisp.org>
4314
4315         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
4316         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
4317         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
4318         * lib/fts.c: Likewise.
4319         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
4320
4321 2006-12-25  Bruno Haible  <bruno@clisp.org>
4322
4323         * modules/utf8-ucs4-safe: New file.
4324         * lib/utf8-ucs4-safe.h: New file.
4325         * lib/unistr/utf8-ucs4-safe.c: New file.
4326
4327         * modules/utf16-ucs4-safe: New file.
4328         * lib/utf16-ucs4-safe.h: New file.
4329         * lib/unistr/utf16-ucs4-safe.c: New file.
4330
4331         * MODULES.html.sh (Unicode string functions): Add the new modules.
4332
4333 2007-01-08  Bruno Haible  <bruno@clisp.org>
4334
4335         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
4336         (Depends-on): Add unitypes.
4337         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
4338         (u8_mbtouc_aux): Move out to separate file.
4339         (u8_mbtouc): Use ucs4_t, uint8_t types.
4340         * lib/unistr/utf8-ucs4.c: New file.
4341
4342         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
4343         (Depends-on): Add unitypes.
4344         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
4345         (u16_mbtouc_aux): Move out to separate file.
4346         (u16_mbtouc): Use ucs4_t, uint16_t types.
4347         * lib/unistr/utf16-ucs4.c: New file.
4348
4349         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
4350         (Depends-on): Add unitypes.
4351         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
4352         (u8_uctomb_aux): Move out to separate file.
4353         (u8_uctomb): Use ucs4_t, uint8_t types.
4354         * lib/unistr/ucs4-utf8.c: New file.
4355
4356         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
4357         (Depends-on): Add unitypes.
4358         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
4359         (u16_uctomb_aux): Move out to separate file.
4360         (u16_uctomb): Use ucs4_t, uint16_t types.
4361         * lib/unistr/ucs4-utf16.c: New file.
4362
4363 2006-12-25  Bruno Haible  <bruno@clisp.org>
4364
4365         * modules/unitypes: New file.
4366         * lib/unitypes.h: New file.
4367         * MODULES.html.sh (func_all_modules): New section "Unicode string
4368         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
4369         this section. Add unitypes.
4370
4371 2007-01-08  Bruno Haible  <bruno@clisp.org>
4372
4373         Avoid variable names that conflict with those from libtool.
4374         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
4375         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
4376         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
4377         library_names_spec to acl_library_names_spec, hardcode_* to
4378         acl_hardcode_*.
4379         Reported by Ralf Wildenhues.
4380
4381 2007-01-08  Bruno Haible  <bruno@clisp.org>
4382
4383         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
4384         definition.
4385         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
4386         definition.
4387         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
4388         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
4389         definition.
4390         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
4391         definition.
4392         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
4393         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
4394         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
4395         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
4396         definition.
4397         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
4398         definition.
4399         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
4400         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
4401         GC_USE_<algorithm>.
4402         * lib/gc-libgcrypt.c: Likewise.
4403         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
4404         * modules/gc-arctwo (configure.ac): Likewise.
4405         * modules/gc-des (configure.ac): Likewise.
4406         * modules/gc-hmac-md5 (configure.ac): Likewise.
4407         * modules/gc-hmac-sha1 (configure.ac): Likewise.
4408         * modules/gc-md2 (configure.ac): Likewise.
4409         * modules/gc-md4 (configure.ac): Likewise.
4410         * modules/gc-md5 (configure.ac): Likewise.
4411         * modules/gc-random (configure.ac): Likewise.
4412         * modules/gc-rijndael (configure.ac): Likewise.
4413         * modules/gc-sha1 (configure.ac): Likewise.
4414
4415 2007-01-08  Bruno Haible  <bruno@clisp.org>
4416
4417         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
4418         macro definition.
4419         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
4420         definition.
4421         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
4422         definition.
4423         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
4424         * modules/fcntl-safer (configure.ac): Likewise.
4425         * modules/fopen-safer (configure.ac): Likewise.
4426         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
4427         GNULIB_FWRITEERROR macro definition.
4428
4429 2007-01-08  Bruno Haible  <bruno@clisp.org>
4430
4431         * m4/gnulib-common.m4: New file.
4432         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
4433         (func_get_filelist): Add m4/gnulib-common.m4.
4434
4435 2007-01-08  Bruno Haible  <bruno@clisp.org>
4436
4437         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
4438         command.
4439
4440 2007-01-08  Jim Meyering  <jim@meyering.net>
4441
4442         Use a more robust test for a "can't happen" condition.
4443         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
4444         narrowed the st_size value.  Presuming the "can't happen" condition
4445         is true, that narrowing could conceivably convert an invalid st_size
4446         value into a valid one.  Instead, use a change based on Matthew
4447         Woehlke's original patch.
4448
4449         Slight readability improvement: use an assert-like macro
4450         in place of literal "abort ()" uses.
4451         * lib/fts.c (fts_assert): Define.
4452         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
4453         Use this macro instead of a bare 'abort'.
4454
4455 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
4456
4457         Don't worry about using IRIX 5.3's wctype.h broken definitions;
4458         simply work around them.
4459         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
4460         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
4461         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
4462         declaring.
4463         Don't bother to define as macros, since the standard doesn't require it.
4464         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
4465         longer worry about IRIX 5.3.
4466         (HAVE_WCTYPE_CTMP_BUG): Remove.
4467
4468 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
4469
4470         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
4471         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
4472         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
4473         Problems reported by Georg Schwarz for IRIX 5.3.
4474
4475         * gnulib-tool (autoconf_minversion): Take the maximum version number
4476         found, not the minimum.  Problem reported by James Youngman.
4477
4478 2007-01-03  Karl Berry  <karl@gnu.org>
4479
4480         * doc/error.texi: new file, explaining interaction with progname.
4481         * doc/gnulib.texi: include it.  Update copyright.
4482
4483 2007-01-03  Simon Josefsson  <simon@josefsson.org>
4484
4485         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
4486         AC_CANONICAL_HOST, to improve autobuild outputs.
4487
4488 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
4489             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
4490
4491         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
4492         sockets, server sockets, and other file descriptors.  Count errors
4493         to compute the return value.  Reorder the code a bit to be easier
4494         to follow.  Don't set event bits that were not requested (except
4495         POLLERR and POLLHUP).
4496
4497 2007-01-01  Bruno Haible  <bruno@clisp.org>
4498
4499         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
4500
4501 2007-01-03  Jim Meyering  <jim@meyering.net>
4502
4503         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
4504
4505 2007-01-02  Bruno Haible  <bruno@clisp.org>
4506
4507         * modules/settime (Include): Require timespec.h.
4508         * modules/nanosleep (Include): Likewise.
4509
4510 2007-01-01  Bruno Haible  <bruno@clisp.org>
4511
4512         * gnulib-tool (func_emit_copyright_notice): Bump year.
4513         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
4514
4515 2007-01-01  Bruno Haible  <bruno@clisp.org>
4516
4517         Improve support for OpenBSD.
4518         * build-aux/config.rpath (libname_spec): Export.
4519         (library_names_spec): New variable. Export.
4520         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
4521         library_names_spec from the config.rpath output. Locate shared library
4522         through the name pattern in library_names_spec.
4523
4524 2007-01-01  Eric Blake  <ebb9@byu.net>
4525
4526         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
4527
4528 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
4529
4530         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
4531         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
4532         assume the C locale, and avoid an "eval" that could cause trouble.
4533         Problem with SORT reported by Bob Proulx.
4534
4535         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
4536         Define.  Trivial patch from Henning Nielsen Lund, originally
4537         sent to bug-grep@gnu.org today.
4538
4539 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
4540
4541         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
4542         struct stat.  Problem reported by Henning Nielsen Lund.
4543         * lib/acl.c: Include acl.h first, to check interface.  Don't
4544         bother to include sys/types.h and sys/stat.h again.
4545
4546 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
4547
4548         Import the following change from libc; problem reported by
4549         Sven Verdoolaege.
4550
4551         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
4552
4553         [BZ #1373]
4554         * lib/argp.h: Remove __NTH for __argp_usage inline function.
4555
4556 2006-12-28  Jim Meyering  <jim@meyering.net>
4557
4558         * build-aux/announce-gen: Do not assume that the package
4559         builds any of tar.gz, tar.bz2, and .xdelta files.
4560         Suggestion from Simon Josefsson.
4561
4562 2006-12-28  Simon Josefsson  <simon@josefsson.org>
4563
4564         * modules/announce-gen: New file.
4565
4566 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
4567
4568         * lib/mbchar.h: Just include <wctype.h>; the wctype module
4569         handles its gotchas now.
4570         * lib/mbswidth.c: Likewise.
4571         * lib/wcwidth.h: Likewise.
4572         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
4573         and iswcntrl; the wctype module does this stuff now.
4574         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4575         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
4576         * modules/mbchar (Depends-on): Add wctype.
4577         * modules/mbswidth (Depends-on): Likewise.
4578         * modules/wcwidth (Depends-on): Likewise.
4579
4580 2006-12-27  Eric Blake  <ebb9@byu.net>
4581
4582         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
4583         module uses more than what <wctype.h> is required to provide.
4584
4585 2006-12-26  Eric Blake  <ebb9@byu.net>
4586
4587         * gnulib-tool (sed_extract_prog): Avoid space-tab.
4588
4589 2006-12-26  Eric Blake  <ebb9@byu.net>
4590
4591         * modules/absolute-header: New module.
4592         * modules/fcntl (Depends-on): Depend on it.
4593         * modules/inttypes (Depends-on): Likewise.
4594         * modules/stdint (Depends-on): Likewise.
4595         * modules/sys_stat (Depends-on): Likewise.
4596         * modules/wctype (Depends-on): Likewise.
4597         * MODULES.html.sh (Support for building libraries and
4598         executables): Document it.
4599
4600 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
4601
4602         * gnulib-tool (SED): Remove, undoing previous change.
4603         The problem was that it broke coreutils on Solaris, because
4604         "sed --posix" leaked into a makefile.
4605         (sed): New alias, if 'alias' and GNU sed.
4606
4607 2006-12-24  Jim Meyering  <jim@meyering.net>
4608
4609         Work around an fchownat bug in glibc-2.4:
4610         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
4611         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
4612         in spite of the -P option.
4613         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
4614         New macros.
4615         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
4616         * modules/openat (Files): Add lib/fchownat.c.
4617         * lib/openat.c (fchownat): Don't define here.  Move to...
4618         * lib/fchownat.c: ...this new file.
4619
4620 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
4621
4622         Fix bug reported by Bruno Haible in
4623         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
4624         where quotearg.c didn't compile on Mac OS X 10.2 because it
4625         lacks <wchar.h> and wint_t.
4626         * lib/wctype_.h (__wctype_wint_t): New type.
4627         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
4628         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
4629         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
4630         Arg is now of type __wctype_wint_t, not wint_t.
4631         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
4632         substitute HAVE_WINT_T.
4633         * modules/wctype (Files): Add m4/wint_t.m4.
4634         (wctype.h): Substitute HAVE_WINT_T.
4635
4636 2006-12-23  Bruno Haible  <bruno@clisp.org>
4637
4638         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
4639
4640 2006-12-23  Bruno Haible  <bruno@clisp.org>
4641
4642         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
4643         S_ISLNK.
4644         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
4645         mingw.
4646
4647 2006-12-22  Bruno Haible  <bruno@clisp.org>
4648
4649         * lib/copy-file.c: Include acl.h.
4650         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
4651         Close the file descriptors only after being done with copy_acl.
4652         * modules/copy-file (Depends-on): Add acl.
4653
4654 2006-12-22  Bruno Haible  <bruno@clisp.org>
4655
4656         * gnulib-tool (SED): New variable.
4657         Use $SED instead of sed everywhere.
4658
4659 2006-12-22  Bruno Haible  <bruno@clisp.org>
4660
4661         * modules/no-c++: New file.
4662         * m4/no-c++.m4: New file.
4663         * MODULES.html.sh (Support for building libraries and executables):
4664         Add no-c++.
4665
4666 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
4667
4668         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4669         Include <limits.h>, and use its INT_MAX to rewrite the
4670         j loop so that it does not overflow 'int'.  Problem reported by
4671         Ralf Wildenhues in
4672         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
4673         Play it safe by shifting left by 1 rather than multiplying by 2,
4674         as GCC is less likely to optimize this away when the value
4675         is signed (when it assumes overflow leads to undefined behavior).
4676         Also, don't assume time_t uses two's complement.
4677
4678 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
4679
4680         * MODULES.html.sh: New module wctype.
4681         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
4682         * lib/fnmatch.c: Don't bother to include <wchar.h> before
4683         <wctype.h>, since the new wctype module should fix this.
4684         * lib/quotearg.c: Include <wctype.h> unconditionally, since
4685         the wctype module should arrange for it.
4686         * lib/regex_internal.h: Likewise.
4687         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
4688         since the wctype module should handle this now.
4689         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
4690         * modules/fnmatch (Depends-on): Add wctype.
4691         * modules/quotearg (Depends-on): Likewise.
4692         * modules/regex (Depends-on): Likewise.
4693
4694 2006-12-19  Bruno Haible  <bruno@clisp.org>
4695
4696         * lib/strdup.h [C++]: Wrap definitions in extern "C".
4697         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
4698
4699 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4700
4701         * modules/savewd (Depends-on): Fix dependency on fcntl.
4702
4703 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
4704
4705         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
4706         conforms to C99, rather than relying on the user's environment
4707         setting of STDINT_H.
4708
4709 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
4710         and Eric Blake  <ebb9@byu.net>
4711
4712         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
4713         This is more consistent with the other defines here.
4714         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
4715         Port to z/OS.  Problem reported by Paul Gilmartin.
4716         Change local vars to use gl_ prefix rather than ac_.
4717         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
4718         with other defines.
4719         * modules/double-slash-root: New module.
4720         * modules/dirname (Files): Remove m4/double-slash-root.m4.
4721         (Depends-on): Add double-slash-root.
4722         * MODULES.html.sh (File system functions): Mention new module.
4723
4724 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
4725
4726         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
4727         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
4728         This is for the benefit of gzip, which doesn't do i18n.
4729
4730 2006-12-12  Jim Meyering  <jim@meyering.net>
4731
4732         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
4733         Reported by Andreas Schwab <schwab@suse.de>.
4734
4735 2006-12-12  Bruno Haible  <bruno@clisp.org>
4736
4737         Merge these changes.
4738         2006-09-05  Bruno Haible  <bruno@clisp.org>
4739         * lib/iconvme.c (iconv_string): No need to save and restore errno when
4740         iconv_alloc succeeded.
4741         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
4742         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
4743         test for " && dest " at the end - dest is always != NULL there. Call
4744         iconv with 4xNULL arguments initially, to reset the state. Call iconv
4745         with 2xNULL arguments, also to flush the state storage. Handle the
4746         IRIX iconv behaviour. Realloc the final result, to throw away unused
4747         memory.
4748
4749 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
4750
4751         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
4752         and fchmodat unconditionally, since glibc 2.4 has them.
4753         Problem reported by Arkadiusz Miskiewicz.
4754
4755 2006-12-10  Bruno Haible  <bruno@clisp.org>
4756
4757         * gnulib-tool (func_import): Show the include files only for those
4758         modules that are copied and specified.
4759         Reported by Karl Berry.
4760
4761 2006-12-08  Jim Meyering  <jim@meyering.net>
4762
4763         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
4764         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
4765
4766         * build-aux/announce-gen: Add two new options, both optional:
4767         --bootstrap-tools=TOOL_LIST
4768               a comma-separated list of tools, e.g.,
4769               autoconf,automake,bison,gnulib
4770         --gnulib-snapshot-date=DATE
4771               if gnulib is in the bootstrap tool list,
4772               then report this as the snapshot date.
4773               If not specified, use the current date/time.
4774               If you specify a date here, be sure it's UTC.
4775
4776 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4777
4778         * tests/test-argp-2.sh: Fix test to match actual output.
4779         (func_compare): Fix sed script to be portable.
4780
4781 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
4782
4783         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
4784         workaround for this case.  It is not autoconfigured now; offhand
4785         it's hard to see how to autoconfigure it.
4786
4787 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
4788
4789         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
4790         a directory that is about to be chowned.  Such a directory's
4791         initial file permissions should permit the owner only and this
4792         should not be changed until after the chown, since the group and
4793         other bits would be incorrect if they granted permission before
4794         the chown.
4795
4796         Fix porting problem for iswctype reported by Georg Schwarz in:
4797         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
4798         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
4799         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
4800         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
4801         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
4802
4803 2006-12-03  Jim Meyering  <jim@meyering.net>
4804
4805         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
4806         p->fts_statp may not yet be defined.
4807         (fts_read): Instead, set it in the caller, once p->fts_statp is
4808         sure to be defined, and corresponds to a top-level directory.
4809         This bug made du -x fail.  Here's the coreutils test case:
4810         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
4811         Reported by Mike Frysinger.
4812
4813 2006-12-01  Jim Meyering  <jim@meyering.net>
4814
4815         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
4816         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
4817         Reported by Simon Josefsson.
4818
4819 2006-11-30  Jim Meyering  <jim@meyering.net>
4820
4821         * m4/warning.m4: Use the all-permissive copyright notice
4822         recommended by RMS (rather than LGPL).
4823         * m4/vararrays.m4: Likewise.
4824         * m4/flexmember.m4: Likewise.
4825
4826 2006-11-29  Bruno Haible  <bruno@clisp.org>
4827
4828         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4829         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
4830         using +=.
4831         Reported by Simon Josefsson <simon@josefsson.org>.
4832
4833 2006-11-28  James Youngman <jay@gnu.org>
4834
4835         * README: Advise users that they might find the bug-gnulib@gnu.org
4836         and autotools-announce@gnu.org mailing lists useful.
4837
4838 2006-11-28  Bruno Haible  <bruno@clisp.org>
4839
4840         * m4/ptrdiff_max.m4: Remove file.
4841
4842 2006-11-21  Bruno Haible  <bruno@clisp.org>
4843
4844         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
4845         _AC_COMPUTE_INT.
4846         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4847         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
4848         _AC_COMPUTE_INT.
4849         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4850         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
4851         _AC_COMPUTE_INT.
4852         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4853
4854 2006-11-28  Jim Meyering  <jim@meyering.net>
4855
4856         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
4857         warning from "gcc -Wshadow" about shadowing the builtin.
4858
4859 2006-11-27  Bruno Haible  <bruno@clisp.org>
4860
4861         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
4862         _AC_COMPUTE_INT.
4863         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4864
4865 2006-11-27  Bruno Haible  <bruno@clisp.org>
4866             Paul Eggert  <eggert@cs.ucla.edu>
4867
4868         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
4869
4870 2006-11-26  Bruno Haible  <bruno@clisp.org>
4871
4872         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4873         noinst_LTLIBRARIES.
4874
4875 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
4876             Bruno Haible  <bruno@clisp.org>
4877
4878         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
4879         if compiling with "gcc -ansi".
4880
4881 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
4882
4883         Fix some incompatibilities with gcc -ansi -pedantic.
4884         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
4885         if compiling pedantically with GCC, unless it's C99 or later.
4886         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
4887         it mishandles gcc -ansi -pedantic as well.
4888         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
4889         if gcc -pedantic.
4890         * lib/regexec.c (check_node_accept_bytes): Don't use auto
4891         initializers for struct if -pedantic, unless it's C99 or later.
4892
4893 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
4894
4895         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
4896         Don't close an fd more than once. Identical atimes indicate
4897         success, not failure.
4898
4899 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
4900
4901         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
4902
4903 2006-11-23  Jim Meyering  <jim@meyering.net>
4904
4905         * build-aux/announce-gen: New file.  From coreutils.
4906
4907 2006-11-22  Jim Meyering  <jim@meyering.net>
4908
4909         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
4910         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
4911         (fts_read): Use a temporary to narrow the overused st_size member
4912         before using it in a switch statement.  Reported by Matthew Woehlke.
4913
4914         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
4915         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
4916
4917 2006-11-20  Bruno Haible  <bruno@clisp.org>
4918
4919         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
4920         changequote instead of pairs of brackets.
4921         Reported by Andreas Schwab <schwab@suse.de>.
4922
4923 2006-11-21  Jim Meyering  <jim@meyering.net>
4924
4925         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
4926         so as to remain compatible with older compilers.
4927         Patch from Michael Deutschmann.
4928
4929 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
4930
4931         * MODULES.html.sh (File system functions): Add openat.
4932
4933         * lib/openat.h (rpl_fstatat): New macro, if
4934         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
4935         (fstatat): Define to rpl_fstatat under the same conditions,
4936         unless COMPILING_FSTATAT.
4937         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
4938         seems to have the bug.
4939         * lib/fstatat.c: New file.
4940         * modules/openat (Files): Add it.
4941
4942 2006-11-20  Bruno Haible  <bruno@clisp.org>
4943
4944         * Makefile: New file.
4945
4946 2006-11-20  Jim Meyering  <jim@meyering.net>
4947
4948         The beginnings of syntax-related checks for gnulib.
4949         * lib/Makefile: New file.
4950         * lib/t-idcache: New script.  Ensure that the two halves of
4951         idcache.c stay in sync.
4952
4953         * lib/idcache.c: Adjust comments in user- and group- portions to
4954         be more accurate, and to be consistent with one another.
4955
4956 2006-11-20  Jim Meyering  <jim@meyering.net>
4957
4958         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
4959         continue using the flexible array member (thus, this module performs
4960         half as many malloc calls), with the addition that...
4961         (getgroup, getuser): Consistently record a non-match via an empty
4962         "name" string, and map an empty string match to a NULL return value.
4963         * modules/idcache (Depends-on): Re-add flexmember.
4964
4965         * lib/idcache.c (getuser): Remove all uses of the register keyword.
4966         (getuidbyname, getgroup, getgidbyname): Likewise.
4967
4968         Use cleaner syntax: NULL rather than 0.
4969         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
4970
4971 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
4972
4973         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
4974         It mishandled the case where the group was missing.
4975         Problem reported by Greg Schafer.
4976         * modules/idcache: Likewise.
4977
4978 2006-11-18  Jim Meyering  <jim@meyering.net>
4979
4980         * check-module (%exempt_header): Add exception for some
4981         conditionally-included headers.
4982
4983         * modules/i-ring (Depends-on): Add verify.
4984         (License): Change to LGPL.
4985
4986 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
4987
4988         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
4989         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
4990         and inttostr.h.  Use snprintf rather than uinttostr, so that
4991         LGPLed code doesn't depend on GPLed.
4992
4993 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
4994
4995         * modules/inline (License): Change from GPL to LGPL.
4996
4997 2006-11-17  Jim Meyering  <jim@meyering.net>
4998
4999         * modules/d-type (License): Switch to LGPL.
5000
5001 2006-11-15  Bruno Haible  <bruno@clisp.org>
5002
5003         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
5004
5005 2006-11-15  Eric Blake  <ebb9@byu.net>
5006
5007         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
5008         the module dependency.
5009
5010 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5011             Bruno Haible  <bruno@clisp.org>
5012
5013         * gnulib-tool (func_create_testdir): Add license consistency check.
5014
5015 2006-11-15  Eric Blake  <ebb9@byu.net>
5016
5017         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
5018         random "(cached)" in configure output.
5019
5020 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5021
5022         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
5023         test for conforming inttypes.h is both announced and cached.
5024
5025         * MODULES.html.sh (seen_modules, seen_files): New variables.
5026         (func_module): Rewrite to use a few less gnulib-tool and sed
5027         invocations.  Avoid a couple of quadratic algorithms for ...
5028         (missed_modules, missed_files): ... these, with ...
5029         (func_append, func_tmpdir): ... these new functions, from
5030         gnulib-tool.  Analogously, install traps for cleanup.
5031
5032         * tests/test-gc.c (main): Remove unused variables.
5033         * tests/test-read-file.c: Include stdlib.h, for 'free'.
5034
5035 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
5036
5037         * modules/inttostr (License): Change to LGPL.
5038
5039 2006-11-14  Eric Blake  <ebb9@byu.net>
5040
5041         * modules/tempname (License): Change to LGPL.
5042
5043 2006-11-14  Eric Blake  <ebb9@byu.net>
5044
5045         * doc/functions.texi (Function Portability): *printf functions on
5046         Cygwin now understand all POSIX size specifiers.
5047
5048 2006-11-14  Bruno Haible  <bruno@clisp.org>
5049
5050         * modules/c-ctype (License): Change to LGPL.
5051
5052 2006-11-12  Bruno Haible  <bruno@clisp.org>
5053
5054         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
5055         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
5056         for GNOME libraries, for which the include files are installed in
5057         subdirectories of $prefix/include.
5058
5059 2006-11-12  Bruno Haible  <bruno@clisp.org>
5060
5061         * m4/lib-link.m4: Require at least autoconf-2.54.
5062         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
5063         name to underscores for the --with option.
5064
5065 2006-11-13  Bruno Haible  <bruno@clisp.org>
5066
5067         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
5068         the tests directory.
5069         Reported by Ralf Wildenhues.
5070
5071 2006-11-13  Bruno Haible  <bruno@clisp.org>
5072
5073         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
5074         (func_emit_initmacro_end): Undo the override here.
5075         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
5076         Works around the famous automake error in coreutils.
5077
5078 2006-11-13  Eric Blake  <ebb9@byu.net>
5079
5080         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
5081         element, not its node.
5082
5083 2006-11-12  Bruno Haible  <bruno@clisp.org>
5084
5085         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
5086         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
5087
5088 2006-11-12  Bruno Haible  <bruno@clisp.org>
5089
5090         * gnulib-tool: New option --local-symlink.
5091         (func_usage): Document it.
5092         (lsymbolic): New variable.
5093         (func_import, func_create_testdir): If --symlink was not specified,
5094         test whether --local-symlink was specified and the file comes from
5095         the local_gnulib_dir.
5096
5097 2006-11-12  Bruno Haible  <bruno@clisp.org>
5098
5099         * gnulib-tool (func_ln): New function.
5100         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
5101
5102 2006-11-12  Bruno Haible  <bruno@clisp.org>
5103
5104         Finish support for source files in subdirectories.
5105         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
5106         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
5107         AUTOMAKE_OPTIONS.
5108         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
5109
5110 2006-11-12  Bruno Haible  <bruno@clisp.org>
5111
5112         * gnulib-tool (func_get_automake_snippet): Synthesize also an
5113         EXTRA_lib_SOURCES augmentation.
5114         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
5115
5116 2006-11-12  Jim Meyering  <jim@meyering.net>
5117
5118         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
5119         file descriptors.  This also averts a failure on systems with
5120         native openat support when a traversed directory lacks "x" access.
5121         * lib/fts_.h: Include "i-ring.h"
5122         (struct FTS) [fts_fd_ring]: New member.
5123         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
5124         (FCHDIR): Add parentheses.
5125         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
5126         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
5127         When descending, rather than simply closing the previous
5128         fts_cwd_fd value, push that file descriptor onto the ring.
5129         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
5130         (fts_open): Initialize the new fd_ring member.
5131         (fts_close): Clear the ring.
5132         (fts_safe_changedir): When possible, use our new fd_ring to skip
5133         the diropen and fstat and dev/ino comparison that would normally
5134         accompany a virtual `chdir ("..")'.
5135
5136         * modules/fts (Depends-on): Add i-ring.
5137         * modules/i-ring: New module.
5138         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
5139         * m4/i-ring.m4: New file.
5140
5141 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5142
5143         * gnulib-tool (func_create_testdir): Fix replacement of
5144         `build-aux' in configure.ac.  Run autotools in gltests
5145         subdirectory.
5146         (func_create_testdir, func_create_megatestdir, test): There is
5147         no need for '--force' in most autotool invocations in a new
5148         tree.  Actually fail the whole test if any of the tools, or the
5149         configure or make stages fail.
5150
5151         Sync from Automake.
5152         * build-aux/gnupload: Revert last change.  Add pointer to upload
5153         instructions of the GNU Maintenance Instructions.
5154         Suggestion by Karl Berry.
5155
5156 2006-11-10  Jim Meyering  <jim@meyering.net>
5157
5158         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
5159
5160 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
5161
5162         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
5163         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
5164         (bind_textdomain_codeset) [! ENABLE_NLS]:
5165         Evaluate all the arguments.  That way, callers get compatible behavior
5166         if the arguments have side effects.  Also, it avoids some GCC
5167         diagnostics in some cases; Joel E. Denny reported problems when Bison
5168         was configured with --enable-gcc-warnigs.
5169
5170 2006-11-10  Jim Meyering  <jim@meyering.net>
5171
5172         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
5173         relevant options in CFLAGS (like -O, -fno-inline) are taken into
5174         account.
5175
5176 2006-11-10  Jim Meyering  <jim@meyering.net>
5177
5178         * modules/inline: New file/module.
5179         * modules/xalloc (Files): Remove m4/inline.m4.
5180         (Depends-on): Add inline, instead.
5181         * modules/oset: Likewise.
5182         * modules/list: Likewise.
5183
5184 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
5185
5186         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
5187         Problem reported by Matthew Woehlke.
5188
5189 2006-11-09  Bruno Haible  <bruno@clisp.org>
5190
5191         * lib/tempname.c (gen_tempname): Remove variant that invokes
5192         __gen_tempname.
5193         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
5194         __gen_tempname.
5195
5196 2006-11-08  Bruno Haible  <bruno@clisp.org>
5197
5198         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
5199         to 'yes' instead of 'cross-compiling'.
5200
5201 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
5202
5203         * lib/quotearg.h (quotearg_free): New decl.
5204         * lib/quotearg.c (quotearg_free): New function.
5205         (slot0, nslots, slotvec0, slotvec):
5206         Now file-scope so that quotearg_free can get at them.
5207
5208 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5209
5210         Sync from Automake.
5211         * build-aux/gnupload: Add missing 'gnu' to example URL.
5212         Report by Karl Berry.
5213
5214 2006-11-08  Bruno Haible  <bruno@clisp.org>
5215
5216         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
5217         Suggested by Paul Eggert.
5218
5219 2006-11-08  Jim Meyering  <jim@meyering.net>
5220
5221         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
5222         It's already included if !_LIBC.
5223         (fts_safe_changedir): Add a comment.
5224
5225 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
5226
5227         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
5228         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
5229         Matthew Woehlke.
5230
5231         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
5232         definitions up, to avoid colliding with change below.
5233         (static_inline) [HAVE_INLINE]: New macro.
5234         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
5235         Provide extern decls when !HAVE_INLINE.  Do not define unless
5236         static_inline is defined, either by us or by xmalloc.c.  Use
5237         static_inline rather than static inline.
5238         (XCALLOC): Optimize sizeof(T) = 1 case.
5239         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
5240
5241 2006-11-07  Bruno Haible  <bruno@clisp.org>
5242
5243         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
5244         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
5245         AC_C_INLINE.
5246         * modules/xalloc (Files): Add m4/inline.m4.
5247
5248 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5249
5250         * README: Fix typo.
5251         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
5252         (Miscellanous Notes): ...from this.
5253
5254 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
5255
5256         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
5257         Mention that offsetof should be used instead of sizeof.
5258         From Bruno Haible.
5259
5260 2006-11-07  Bruno Haible  <bruno@clisp.org>
5261
5262         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
5263
5264 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
5265
5266         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
5267         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
5268         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
5269         (gl_tree_add_before, gl_tree_add_after):
5270         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
5271         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
5272         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
5273         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
5274         (gl_linked_add_after, gl_linked_add_at): Likewise.
5275         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
5276         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
5277         (gl_tree_add_before, gl_tree_add_after): Likewise.
5278         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
5279         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
5280         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
5281
5282 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5283
5284         * lib/gl_oset.h: Use C comment style, not C++ comment style.
5285
5286 2006-11-06  Bruno Haible  <bruno@clisp.org>
5287
5288         * m4/inline.m4: New file.
5289         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
5290         * modules/list (Files): Add m4/inline.m4.
5291         * modules/oset (Files): Likewise.
5292
5293 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
5294
5295         * lib/idcache.c: Include <stddef.h>, for offsetof.
5296         (struct userid.name): Change from char * to a flexible array member.
5297         All uses changed.
5298         * modules/idcache (Depends-on): Add flexmember.
5299
5300         * MODULES.html.sh (Core language properties): New module flexmember.
5301         * modules/flexmember, m4/flexmember.m4: New files.
5302
5303         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
5304         inline functions that are identical with the old xnmalloc_inline,
5305         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
5306         that we can avoid some unnecessary integer multiplications and
5307         divisions in the common case where the element size is known at
5308         compile time.
5309         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
5310         needed.
5311         (xnboundedmalloc): Remove.
5312         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
5313         arguments, for consistency with rest of this header.
5314         (xcharalloc): Rewrite using XNMALLOC.
5315         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
5316         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
5317         versions have been moved to lib/xalloc.h and renamed to be the
5318         non-*_inline versions.
5319         (xmalloc, xrealloc): Implement without reference to the xnmalloc
5320         and xnrealloc functions, since those functions are now inline and
5321         now call us.
5322         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
5323         renaming described above.
5324         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
5325         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
5326         captures the dependency in AC_C_INLINE.
5327
5328         New module canonicalize-lgpl, proposed by Charles Wilson in
5329         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
5330         with a few small changes afterwards.
5331         * MODULES.html.sh (File system functions): New module
5332         canonicalize-lgpl.
5333         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
5334         and canonicalize_file_name.
5335         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
5336         * modules/canonicalize-lgpl: New files.
5337
5338 2006-11-05  Bruno Haible  <bruno@clisp.org>
5339
5340         * gnulib-tool (func_import, func_create_testdir): Create directories
5341         also for files in subdirectories of lib/.
5342
5343 2006-11-05  Bruno Haible  <bruno@clisp.org>
5344
5345         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
5346         ANSI C compliant.
5347
5348 2006-11-03  Bruno Haible  <bruno@clisp.org>
5349
5350         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
5351         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
5352         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
5353         (xnboundedmalloc): New inline function.
5354         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
5355         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
5356         xmalloc.
5357         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
5358         xmalloc.
5359         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
5360         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
5361         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
5362         xmalloc.
5363         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
5364         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
5365         xmalloc.
5366         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
5367         gl_tree_add_after): Use XMALLOC instead of xmalloc.
5368         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
5369         xmalloc.
5370         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
5371         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
5372         gl_tree_add_after): Use XMALLOC instead of xmalloc.
5373         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
5374         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
5375         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
5376         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
5377
5378 2006-11-03  Bruno Haible  <bruno@clisp.org>
5379
5380         * lib/c-ctype.h [C++]: Define functions without name mangling.
5381         * lib/fwriteerror.h [C++]: Likewise.
5382         * lib/gcd.h [C++]: Likewise.
5383         * lib/linebreak.h [C++]: Likewise.
5384
5385 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
5386
5387         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
5388         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
5389         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
5390         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5391         Check for functions and headers just once.
5392         Check for declaration of canonicalize_file_name.
5393         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
5394
5395 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5396
5397         * gnulib-tool (func_import): Fix typo in actioncmd.
5398
5399 2006-11-02  Bruno Haible  <bruno@clisp.org>
5400
5401         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
5402         newline sequence in the Makefile.am snippet as a space, like "make"
5403         does.
5404         Reported by Roger Persson <perrog@gmail.com>.
5405
5406 2006-11-01  Bruno Haible  <bruno@clisp.org>
5407
5408         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
5409         already declared in <string.h>.
5410         * lib/strcase.h (strncasecmp): Don't declare it if yes.
5411
5412 2006-11-01  Bruno Haible  <bruno@clisp.org>
5413
5414         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
5415         * lib/strcase.h: Include <string.h>.
5416         (strcasecmp): Define to rpl_strcasecmp here.
5417
5418 2006-11-01  Bruno Haible  <bruno@clisp.org>
5419
5420         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
5421
5422 2006-11-01  Eric Blake  <ebb9@byu.net>
5423
5424         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
5425
5426         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
5427
5428 2006-10-29  Bruno Haible  <bruno@clisp.org>
5429
5430         Make it compile in C++ mode.
5431         * lib/full-write.c (full_rw): Add a cast.
5432
5433 2006-11-01  Bruno Haible  <bruno@clisp.org>
5434
5435         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
5436         be POSIX compliant.
5437         Reported by Roger Persson <perrog@gmail.com>.
5438
5439 2006-11-01  Eric Blake  <ebb9@byu.net>
5440
5441         * lib/getopt_.h: Fix comments.
5442
5443 2006-10-31  Eric Blake  <ebb9@byu.net>
5444
5445         * modules/tmpdir (Depends-on): Add sys_stat.
5446         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
5447         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
5448         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
5449         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
5450         tempname.
5451
5452 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
5453
5454         Avoid some C++ diagnostics reported by Bruno Haible.
5455         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
5456         xmalloc.
5457         (quotearg_alloc): Use xcharalloc rather than xmalloc.
5458         (struct slotvec): Move to top level.
5459         (quotearg_n_options): Rewrite to avoid xmalloc.
5460         * lib/xalloc.h (xcharalloc): New function.
5461         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
5462         [defined __cplusplus]: Add function template that provides result
5463         type propagation.  This part of the change is from Bruno Haible.
5464
5465 2006-10-29  Bruno Haible  <bruno@clisp.org>
5466
5467         Make it compile in C++ mode.
5468         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
5469         * lib/strnlen1.c (strnlen1): Cast memchr result.
5470         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
5471         * lib/clean-temp.c (string_equals, string_hash): Add casts.
5472         (create_temp_dir): Rename local variable 'template'.
5473         (compile_csharp_using_sscli): Add cast.
5474         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
5475         * lib/findprog.c (find_in_path): Likewise.
5476         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
5477         * lib/wait-process.c (register_slave_subprocess): Likewise.
5478
5479 2006-10-22  Bruno Haible  <bruno@clisp.org>
5480
5481         * modules/tsearch: New file.
5482         * lib/tsearch.h: New file.
5483         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
5484         * m4/tsearch.m4: New file.
5485         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
5486
5487 2006-10-29  Eric Blake  <ebb9@byu.net>
5488
5489         * lib/arcfour.c: Assume config.h.
5490         * lib/arctwo.c: Likewise.
5491         * lib/base64.c: Likewise.
5492         * lib/check-version.c: Likewise.
5493         * lib/crc.c: Likewise.
5494         * lib/des.c: Likewise.
5495         * lib/gc-gnulib.c: Likewise.
5496         * lib/gc-libgcrypt.c: Likewise.
5497         * lib/gc-pbkdf2-sha1.c: Likewise.
5498         * lib/getaddrinfo.c: Likewise.
5499         * lib/getdelim.c: Likewise.
5500         * lib/getline.c: Likewise.
5501         * lib/hmac-md5.c: Likewise.
5502         * lib/hmac-sha1.c: Likewise.
5503         * lib/iconvme.c: Likewise.
5504         * lib/md2.c: Likewise.
5505         * lib/md4.c: Likewise.
5506         * lib/memxor.c: Likewise.
5507         * lib/read-file.c: Likewise.
5508         * lib/readline.c: Likewise.
5509         * lib/rijndael-alg-fst.c: Likewise.
5510         * lib/rijndael-api-fst.c: Likewise.
5511         * lib/xgetdomainname.c: Likewise.
5512
5513 2006-10-28  Eric Blake  <ebb9@byu.net>
5514
5515         * lib/xstrndup.c: Assume config.h.
5516
5517 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
5518
5519         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
5520         stat-macros.h is now for our own macros, whereas stat_h is for
5521         macros in the <sys/stat.h> name space.
5522         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
5523         (STAT_MACROS_H): Remove.
5524         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
5525         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
5526         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
5527         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
5528         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
5529         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
5530         Move these macros to ...
5531         * lib/stat_.h: here.  Don't include stat-macros.h.
5532         * lib/canonicalize.c: Don't include stat-macros.h.
5533         * lib/chown.c: Likewise.
5534         * lib/euidaccess.c: Likewise.
5535         * lib/file-type.c: Likewise.
5536         * lib/filemode.c: Likewise.
5537         * lib/glob.c: Likewise.
5538         * lib/isapipe.c: Likewise.
5539         * lib/lchown.c: Likewise.
5540         * lib/lstat.c: Likewise.
5541         * lib/mkdir-p.c: Likewise.
5542         * lib/rmdir.c: Likewise.
5543         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
5544         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
5545         unless mkdir isn't declared, to speed up 'configure'.
5546         Always create sys/stat.h, since it's unlikely any real sys/stat.h
5547         would define all the S_* symbols.
5548         * modules/canonicalize (Depends-on):
5549         Depend on sys_stat, not stat-macros.
5550         * modules/chown: Likewise.
5551         * modules/euidaccess: Likewise.
5552         * modules/filemode: Likewise.
5553         * modules/file-type: Likewise.
5554         * modules/glob: Likewise.
5555         * modules/isapipe: Likewise.
5556         * modules/lchown: Likewise.
5557         * modules/lstat: Likewise.
5558         * modules/mkancesdirs: Likewise.
5559         * modules/rmdir: Likewise.
5560         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
5561         * modules/modechange: Likewise.
5562         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
5563         (configure.ac): Remove gl_STAT_MACROS.
5564         * modules/sys_stat (Depends-on): Remove stat-macros.
5565
5566 2006-10-27  Bruno Haible  <bruno@clisp.org>
5567
5568         * m4/signed.m4: Remove file.
5569         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
5570         invocation.
5571         * modules/vasnprintf (Files): Remove m4/signed.m4.
5572
5573 2006-10-27  Bruno Haible  <bruno@clisp.org>
5574
5575         Update to GNU gettext 0.16.
5576         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
5577         m4/inttypes-h.m4, m4/signed.m4.
5578         * m4/gettext.m4: Update to GNU gettext 0.16.
5579         * m4/intl.m4: New file, from GNU gettext.
5580         * m4/intldir.m4: New file, from GNU gettext.
5581         * config/srclist.txt: Update
5582
5583 2006-10-27  Eric Blake  <ebb9@byu.net>
5584
5585         * MODULES.html.sh: Document tempname.
5586         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
5587         dependencies.
5588         (Files): Move lib/tempname.c...
5589         * modules/tempname: ...to this new module.
5590         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
5591         (gl_PREREQ_TEMPNAME): Move...
5592         * m4/tempname.m4: ...to this new file.
5593         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
5594         * modules/sys_stat (Depends-on): Add stat-macros.
5595         * lib/stat_.h (includes): Pick up stat macros.
5596         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
5597         if stat macros are broken.
5598         * lib/tempname.c (includes): No need to include "stat-macros.h".
5599         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
5600         (direxists, __path_search) [!_LIBC]: Don't compile these in
5601         gnulib; the tmpdir module covers that.
5602         * lib/tempname.h: New file.
5603
5604 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
5605
5606         * COPYING: Explain how gnulib-tool converts licence headers.
5607         Almost all wording by Eric Blake.
5608
5609 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
5610
5611         * lib/mbchar.h (is_basic_table): Make read-only.
5612         * lib/mbchar.c (is_basic_table): Likewise.
5613         Reported by John Darrington.
5614
5615 2006-10-25  Bruno Haible  <bruno@clisp.org>
5616
5617         * lib/progname.h (set_program_name): Undefine before defining.
5618
5619 2006-10-25  Bruno Haible  <bruno@clisp.org>
5620
5621         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
5622         false for non-gcc C++ compilers.
5623         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
5624
5625 2006-10-24  Bruno Haible  <bruno@clisp.org>
5626
5627         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
5628         iconv implementations like Irix iconv.
5629
5630 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5631
5632         * modules/vararrays: New file.
5633         * m4/vararrays.m4: New file, taken from diffutils.
5634         * MODULES.html.sh: New module vararrays.
5635
5636 2006-10-24  Karl Berry  <karl@gnu.org>
5637
5638         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
5639         Don't call GNU Unix.
5640
5641 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5642
5643         * users.txt: Add Libtool.
5644
5645         Sync from Libtool:
5646
5647         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5648
5649         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
5650         to gnulib's policy of including config.h unconditionally.
5651
5652 2006-10-24  Bruno Haible  <bruno@clisp.org>
5653
5654         * modules/wcwidth (Files): Add m4/wint_t.m4.
5655         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
5656         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
5657
5658 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5659
5660         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
5661         to pacify GCC with some -W flags enabled.  Problem reported by
5662         Bruno Haible.
5663
5664 2006-10-24  Jim Meyering  <jim@meyering.net>
5665
5666         * MODULES.html.sh: Remove uinttostr.  It's not a module.
5667         Reported by Karl Berry.
5668
5669 2006-10-23  Bruno Haible  <bruno@clisp.org>
5670
5671         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
5672
5673 2006-10-24  Bruno Haible  <bruno@clisp.org>
5674
5675         * lib/gl_list.h: Use C comment style, not C++ comment style.
5676
5677 2006-10-23  Eric Blake  <ebb9@byu.net>
5678
5679         * lib/getaddrinfo.c (includes): Add missing include.
5680
5681 2006-10-23  Bruno Haible  <bruno@clisp.org>
5682             Paul Eggert  <eggert@cs.ucla.edu>
5683
5684         Ability to rename obstack_free.
5685         * lib/obstack.h (__obstack_free): New macro. Declare instead of
5686         obstack_free.
5687         (obstack_free): Invoke the __obstack_free macro.
5688         * lib/obstack.c (obstack_free): Use __obstack_free macro.
5689
5690 2006-10-23  Bruno Haible  <bruno@clisp.org>
5691             Paul Eggert  <eggert@cs.ucla.edu>
5692
5693         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
5694         __argc, __argv from the declaration. (They are defined as macros on
5695         mingw.)
5696
5697 2006-10-22  Bruno Haible  <bruno@clisp.org>
5698
5699         * doc/gnulib-intro.texi: New file.
5700         * doc/gnulib.texi: Include it.
5701
5702 2006-10-21  Bruno Haible  <bruno@clisp.org>
5703
5704         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
5705         "Introduction", "Miscellanous Notes", "Particular Modules".
5706
5707 2006-10-21  Bruno Haible  <bruno@clisp.org>
5708
5709         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5710         Change mostlyclean-local rule to avoid sh syntax error from bash
5711         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
5712
5713 2006-10-23  Jim Meyering  <jim@meyering.net>
5714
5715         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
5716         in place of snprintf.
5717
5718         * modules/inttostr (Files): Add lib/uinttostr.c.
5719         * lib/uinttostr.c (inttostr): New file/function.
5720         * lib/inttostr.h (uinttostr): Declare.
5721         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
5722         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
5723         Add uinttostr.
5724         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
5725
5726 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
5727
5728         * lib/canonicalize.c (ELOOP): Define if not already defined.
5729         Problem reported by Bruno Haible in
5730         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
5731
5732 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
5733
5734         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
5735         Problem reported by Perry Smith and Ville Laurikari.
5736
5737         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
5738         uses.
5739
5740 2006-10-19  Bruno Haible  <bruno@clisp.org>
5741
5742         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
5743         for mingw.
5744
5745 2006-10-19  Bruno Haible  <bruno@clisp.org>
5746
5747         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
5748         Needed for mingw.
5749
5750 2006-10-19  Bruno Haible  <bruno@clisp.org>
5751
5752         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
5753
5754 2006-10-19  Bruno Haible  <bruno@clisp.org>
5755
5756         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
5757         it.
5758
5759 2006-10-19  Bruno Haible  <bruno@clisp.org>
5760
5761         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
5762         invocation.
5763
5764 2006-10-19  Bruno Haible  <bruno@clisp.org>
5765
5766         * gnulib-tool (func_create_testdir): Don't include ftruncate and
5767         mountlist by default.
5768
5769 2006-10-16  Bruno Haible  <bruno@clisp.org>
5770
5771         * lib/c-strstr.c: Include c-strstr.h.
5772
5773 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5774
5775         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
5776         in a slash.
5777
5778 2006-10-18  Bruno Haible  <bruno@clisp.org>
5779
5780         * lib/lock.h [C++]: Wrap definitions in extern "C".
5781
5782 2006-10-18  Bruno Haible  <bruno@clisp.org>
5783
5784         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
5785         gl_LIBOBJS list.
5786
5787 2006-10-18  Bruno Haible  <bruno@clisp.org>
5788
5789         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
5790
5791 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
5792
5793         * lib/xstrtol.h: Include gettext.h.
5794         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
5795         Problem reported by Eric Blake.
5796         * modules/xstrtol (Depends-on): Add gettext-h.
5797
5798 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
5799
5800         * lib/strftime.c (advance): New macro.
5801         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
5802         incomplete type, so you can't add 0 to it.  Problem and patch
5803         reported by Eelco Dolstra for dietlibc.
5804
5805 2006-10-18  Jim Meyering  <jim@meyering.net>
5806
5807         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
5808         type for a local, and rename it: s/up/user_proc/.
5809
5810 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
5811
5812         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
5813         READ_UTMP_USER_PROCESS.
5814         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
5815
5816 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
5817
5818         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
5819         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
5820
5821 2006-10-17  Eric Blake  <ebb9@byu.net>
5822
5823         * lib/sigprocmask.c (sigprocmask): Fix typo.
5824
5825         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
5826
5827         * modules/clean-temp (Makefile.am): Don't add to make output...
5828         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
5829         config.h.
5830
5831 2006-10-17  Bruno Haible  <bruno@clisp.org>
5832
5833         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
5834         differently if DEFAULT_TEXT_DOMAIN is set.
5835
5836 2006-10-16  Bruno Haible  <bruno@clisp.org>
5837
5838         * lib/clean-temp.c: Include fwriteerror.h.
5839
5840 2006-10-16  Bruno Haible  <bruno@clisp.org>
5841
5842         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
5843
5844 2006-10-16  Bruno Haible  <bruno@clisp.org>
5845
5846         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
5847         * lib/sigprocmask.h: Include <sys/types.h>.
5848         (sigset_t): Use the system's definition if present.
5849
5850 2006-10-17  Eric Blake  <ebb9@byu.net>
5851
5852         * lib/xvasprintf.c (includes): Assume config.h.
5853         * lib/xasprintf.c (includes): Likewise.
5854
5855 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
5856
5857         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
5858         at least as wide as intmax_t.
5859
5860 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
5861
5862         (Imported from Automake.)
5863         * build-aux/gnupload: Update to version 1.1 of directive file.
5864
5865 2006-10-16  Eric Blake  <ebb9@byu.net>
5866
5867         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
5868         match Automake 1.10a.
5869
5870 2006-10-14  Bruno Haible  <bruno@clisp.org>
5871
5872         * modules/sigprocmask: New file.
5873         * lib/sigprocmask.h: New file.
5874         * lib/sigprocmask.c: New file.
5875         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
5876         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
5877         request sigprocmask.o.
5878         (gl_PREREQ_SIGPROCMASK): New macro.
5879         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
5880         (Depends-on): Add sigprocmask.
5881         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
5882         gt_SIGNALBLOCKING. Test for 'raise' only once.
5883         * lib/fatal-signal.c: Include sigprocmask.h.
5884         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
5885         unblock_fatal_signals): Define always.
5886         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
5887         sigprocmask.
5888
5889 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
5890
5891         Sync from Automake.
5892         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
5893         which incorrectly sets the mode of an existing destination
5894         directory.  In some cases the unpatched install-sh could do the
5895         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
5896         system.  We hope this is rare in practice, but it's clearly worth
5897         fixing.  Problem reported by Alex Unleashed in
5898         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
5899         Also, don't bother to check for -m bugs unless we're using -m;
5900         suggested by Stepan Kasal.
5901
5902 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5903
5904         Sync from Automake.
5905         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
5906         `-c' flag, so they appear at the same position as in %FASTDEP%
5907         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
5908         which ignores unknown options only after the first non-option.
5909         Bug report against M4 by Nelson H. F. Beebe.
5910
5911 2006-10-13  Jim Meyering  <jim@meyering.net>
5912
5913         Fix a bug in yesterday's change.
5914         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
5915         p->fts_statp->st_dev would be used uninitialized.
5916         Ensures that we always call fts_stat on the very first entry.
5917         Miklos Szeredi reported that find -xdev stopped working.
5918
5919 2006-10-12  Bruno Haible  <bruno@clisp.org>
5920
5921         * gnulib-tool (func_get_automake_snippet): Append an automatically
5922         computed EXTRA_DIST augmentation.
5923         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
5924         * modules/alloca-opt (Makefile.am): Likewise.
5925         * modules/allocsa (Makefile.am): Likewise.
5926         * modules/arcfour (Makefile.am): Likewise.
5927         * modules/arctwo (Makefile.am): Likewise.
5928         * modules/argmatch (Makefile.am): Likewise.
5929         * modules/argz (Makefile.am): Likewise.
5930         * modules/atexit (Makefile.am): Likewise.
5931         * modules/backupfile (Makefile.am): Likewise.
5932         * modules/byteswap (Makefile.am): Likewise.
5933         * modules/c-strtod (Makefile.am): Likewise.
5934         * modules/c-strtold (Makefile.am): Likewise.
5935         * modules/calloc (Makefile.am): Likewise.
5936         * modules/canon-host (Makefile.am): Likewise.
5937         * modules/canonicalize (Makefile.am): Likewise.
5938         * modules/chdir-long (Makefile.am): Likewise.
5939         * modules/chdir-safer (Makefile.am): Likewise.
5940         * modules/check-version (Makefile.am): Likewise.
5941         * modules/chown (Makefile.am): Likewise.
5942         * modules/cloexec (Makefile.am): Likewise.
5943         * modules/close-stream (Makefile.am): Likewise.
5944         * modules/closeout (Makefile.am): Likewise.
5945         * modules/crc (Makefile.am): Likewise.
5946         * modules/csharpexec (Makefile.am): Likewise.
5947         * modules/cycle-check (Makefile.am): Likewise.
5948         * modules/des (Makefile.am): Likewise.
5949         * modules/dev-ino (Makefile.am): Likewise.
5950         * modules/dirfd (Makefile.am): Likewise.
5951         * modules/dirname (Makefile.am): Likewise.
5952         * modules/dup2 (Makefile.am): Likewise.
5953         * modules/eealloc (Makefile.am): Likewise.
5954         * modules/error (Makefile.am): Likewise.
5955         * modules/euidaccess (Makefile.am): Likewise.
5956         * modules/exclude (Makefile.am): Likewise.
5957         * modules/exitfail (Makefile.am): Likewise.
5958         * modules/fcntl-safer (Makefile.am): Likewise.
5959         * modules/fcntl (Makefile.am): Likewise.
5960         * modules/file-type (Makefile.am): Likewise.
5961         * modules/fileblocks (Makefile.am): Likewise.
5962         * modules/filemode (Makefile.am): Likewise.
5963         * modules/filenamecat (Makefile.am): Likewise.
5964         * modules/fnmatch (Makefile.am): Likewise.
5965         * modules/fopen-safer (Makefile.am): Likewise.
5966         * modules/fpending (Makefile.am): Likewise.
5967         * modules/fprintftime (Makefile.am): Likewise.
5968         * modules/free (Makefile.am): Likewise.
5969         * modules/fsusage (Makefile.am): Likewise.
5970         * modules/ftruncate (Makefile.am): Likewise.
5971         * modules/fts (Makefile.am): Likewise.
5972         * modules/gc-arcfour (Makefile.am): Likewise.
5973         * modules/gc-des (Makefile.am): Likewise.
5974         * modules/gc-hmac-md5 (Makefile.am): Likewise.
5975         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
5976         * modules/gc-md4 (Makefile.am): Likewise.
5977         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
5978         * modules/gc-sha1 (Makefile.am): Likewise.
5979         * modules/gc (Makefile.am): Likewise.
5980         * modules/getaddrinfo (Makefile.am): Likewise.
5981         * modules/getcwd (Makefile.am): Likewise.
5982         * modules/getdelim (Makefile.am): Likewise.
5983         * modules/getdomainname (Makefile.am): Likewise.
5984         * modules/getgroups (Makefile.am): Likewise.
5985         * modules/gethostname (Makefile.am): Likewise.
5986         * modules/gethrxtime (Makefile.am): Likewise.
5987         * modules/getline (Makefile.am): Likewise.
5988         * modules/getloadavg (Makefile.am): Likewise.
5989         * modules/getlogin_r (Makefile.am): Likewise.
5990         * modules/getndelim2 (Makefile.am): Likewise.
5991         * modules/getopt (Makefile.am): Likewise.
5992         * modules/getpagesize (Makefile.am): Likewise.
5993         * modules/getpass-gnu (Makefile.am): Likewise.
5994         * modules/getpass (Makefile.am): Likewise.
5995         * modules/getsubopt (Makefile.am): Likewise.
5996         * modules/gettime (Makefile.am): Likewise.
5997         * modules/gettimeofday (Makefile.am): Likewise.
5998         * modules/getugroups (Makefile.am): Likewise.
5999         * modules/getusershell (Makefile.am): Likewise.
6000         * modules/glob (Makefile.am): Likewise.
6001         * modules/group-member (Makefile.am): Likewise.
6002         * modules/hard-locale (Makefile.am): Likewise.
6003         * modules/hash (Makefile.am): Likewise.
6004         * modules/hmac-md5 (Makefile.am): Likewise.
6005         * modules/hmac-sha1 (Makefile.am): Likewise.
6006         * modules/human (Makefile.am): Likewise.
6007         * modules/idcache (Makefile.am): Likewise.
6008         * modules/imaxabs (Makefile.am): Likewise.
6009         * modules/imaxdiv (Makefile.am): Likewise.
6010         * modules/inet_ntop (Makefile.am): Likewise.
6011         * modules/inet_pton (Makefile.am): Likewise.
6012         * modules/intprops (Makefile.am): Likewise.
6013         * modules/inttostr (Makefile.am): Likewise.
6014         * modules/inttypes (Makefile.am): Likewise.
6015         * modules/isapipe (Makefile.am): Likewise.
6016         * modules/javaversion (Makefile.am): Likewise.
6017         * modules/lchmod (Makefile.am): Likewise.
6018         * modules/lchown (Makefile.am): Likewise.
6019         * modules/localcharset (Makefile.am): Likewise.
6020         * modules/long-options (Makefile.am): Likewise.
6021         * modules/lstat (Makefile.am): Likewise.
6022         * modules/malloc (Makefile.am): Likewise.
6023         * modules/mathl (Makefile.am): Likewise.
6024         * modules/mbchar (Makefile.am): Likewise.
6025         * modules/md2 (Makefile.am): Likewise.
6026         * modules/md4 (Makefile.am): Likewise.
6027         * modules/md5 (Makefile.am): Likewise.
6028         * modules/memcasecmp (Makefile.am): Likewise.
6029         * modules/memchr (Makefile.am): Likewise.
6030         * modules/memcmp (Makefile.am): Likewise.
6031         * modules/memcoll (Makefile.am): Likewise.
6032         * modules/memcpy (Makefile.am): Likewise.
6033         * modules/memmem (Makefile.am): Likewise.
6034         * modules/memmove (Makefile.am): Likewise.
6035         * modules/mempcpy (Makefile.am): Likewise.
6036         * modules/memrchr (Makefile.am): Likewise.
6037         * modules/memset (Makefile.am): Likewise.
6038         * modules/memxor (Makefile.am): Likewise.
6039         * modules/mkancesdirs (Makefile.am): Likewise.
6040         * modules/mkdir-p (Makefile.am): Likewise.
6041         * modules/mkdir (Makefile.am): Likewise.
6042         * modules/mkdtemp (Makefile.am): Likewise.
6043         * modules/mkstemp (Makefile.am): Likewise.
6044         * modules/mktime (Makefile.am): Likewise.
6045         * modules/modechange (Makefile.am): Likewise.
6046         * modules/mountlist (Makefile.am): Likewise.
6047         * modules/nanosleep (Makefile.am): Likewise.
6048         * modules/obstack (Makefile.am): Likewise.
6049         * modules/openat (Makefile.am): Likewise.
6050         * modules/pagealign_alloc (Makefile.am): Likewise.
6051         * modules/pathmax (Makefile.am): Likewise.
6052         * modules/physmem (Makefile.am): Likewise.
6053         * modules/poll (Makefile.am): Likewise.
6054         * modules/posixtm (Makefile.am): Likewise.
6055         * modules/posixver (Makefile.am): Likewise.
6056         * modules/putenv (Makefile.am): Likewise.
6057         * modules/quote (Makefile.am): Likewise.
6058         * modules/quotearg (Makefile.am): Likewise.
6059         * modules/raise (Makefile.am): Likewise.
6060         * modules/read-file (Makefile.am): Likewise.
6061         * modules/readline (Makefile.am): Likewise.
6062         * modules/readlink (Makefile.am): Likewise.
6063         * modules/readtokens (Makefile.am): Likewise.
6064         * modules/readutmp (Makefile.am): Likewise.
6065         * modules/realloc (Makefile.am): Likewise.
6066         * modules/regex (Makefile.am): Likewise.
6067         * modules/rename-dest-slash (Makefile.am): Likewise.
6068         * modules/rename (Makefile.am): Likewise.
6069         * modules/rijndael (Makefile.am): Likewise.
6070         * modules/rmdir (Makefile.am): Likewise.
6071         * modules/rpmatch (Makefile.am): Likewise.
6072         * modules/safe-read (Makefile.am): Likewise.
6073         * modules/safe-write (Makefile.am): Likewise.
6074         * modules/same-inode (Makefile.am): Likewise.
6075         * modules/same (Makefile.am): Likewise.
6076         * modules/save-cwd (Makefile.am): Likewise.
6077         * modules/savedir (Makefile.am): Likewise.
6078         * modules/setenv (Makefile.am): Likewise.
6079         * modules/settime (Makefile.am): Likewise.
6080         * modules/sha1 (Makefile.am): Likewise.
6081         * modules/sig2str (Makefile.am): Likewise.
6082         * modules/snprintf (Makefile.am): Likewise.
6083         * modules/stat-macros (Makefile.am): Likewise.
6084         * modules/stat-time (Makefile.am): Likewise.
6085         * modules/stdbool (Makefile.am): Likewise.
6086         * modules/stdint (Makefile.am): Likewise.
6087         * modules/stdlib-safer (Makefile.am): Likewise.
6088         * modules/stpcpy (Makefile.am): Likewise.
6089         * modules/stpncpy (Makefile.am): Likewise.
6090         * modules/strcase (Makefile.am): Likewise.
6091         * modules/strcasestr (Makefile.am): Likewise.
6092         * modules/strchrnul (Makefile.am): Likewise.
6093         * modules/strcspn (Makefile.am): Likewise.
6094         * modules/strdup (Makefile.am): Likewise.
6095         * modules/strerror (Makefile.am): Likewise.
6096         * modules/strftime (Makefile.am): Likewise.
6097         * modules/strndup (Makefile.am): Likewise.
6098         * modules/strnlen (Makefile.am): Likewise.
6099         * modules/strpbrk (Makefile.am): Likewise.
6100         * modules/strsep (Makefile.am): Likewise.
6101         * modules/strstr (Makefile.am): Likewise.
6102         * modules/strtod (Makefile.am): Likewise.
6103         * modules/strtoimax (Makefile.am): Likewise.
6104         * modules/strtok_r (Makefile.am): Likewise.
6105         * modules/strtol (Makefile.am): Likewise.
6106         * modules/strtoll (Makefile.am): Likewise.
6107         * modules/strtoul (Makefile.am): Likewise.
6108         * modules/strtoull (Makefile.am): Likewise.
6109         * modules/strtoumax (Makefile.am): Likewise.
6110         * modules/strverscmp (Makefile.am): Likewise.
6111         * modules/sys_socket (Makefile.am): Likewise.
6112         * modules/sys_stat (Makefile.am): Likewise.
6113         * modules/sysexits (Makefile.am): Likewise.
6114         * modules/time_r (Makefile.am): Likewise.
6115         * modules/timegm (Makefile.am): Likewise.
6116         * modules/timespec (Makefile.am): Likewise.
6117         * modules/tmpfile-safer (Makefile.am): Likewise.
6118         * modules/trim (Makefile.am): Likewise.
6119         * modules/unistd-safer (Makefile.am): Likewise.
6120         * modules/unlinkdir (Makefile.am): Likewise.
6121         * modules/unlocked-io (Makefile.am): Likewise.
6122         * modules/userspec (Makefile.am): Likewise.
6123         * modules/utime (Makefile.am): Likewise.
6124         * modules/utimecmp (Makefile.am): Likewise.
6125         * modules/utimens (Makefile.am): Likewise.
6126         * modules/vasnprintf (Makefile.am): Likewise.
6127         * modules/vasprintf (Makefile.am): Likewise.
6128         * modules/vsnprintf (Makefile.am): Likewise.
6129         * modules/xalloc (Makefile.am): Likewise.
6130         * modules/xgetcwd (Makefile.am): Likewise.
6131         * modules/xnanosleep (Makefile.am): Likewise.
6132         * modules/xreadlink (Makefile.am): Likewise.
6133         * modules/xstrtod (Makefile.am): Likewise.
6134         * modules/xstrtol (Makefile.am): Likewise.
6135         * modules/xstrtold (Makefile.am): Likewise.
6136         * modules/yesno (Makefile.am): Likewise.
6137         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
6138
6139 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
6140
6141         * modules/error (Makefile.am): Distribute files through
6142         EXTRA_DIST, not lib_SOURCES.
6143
6144 2006-10-12  Eric Blake  <ebb9@byu.net>
6145
6146         * modules/error (Makefile.am): Distribute files in /lib.
6147         * modules/obstack (Makefile.am): Likewise.
6148
6149 2006-10-12  Bruno Haible  <bruno@clisp.org>
6150
6151         * modules/acl (Makefile.am): Distribute all files in lib/ through
6152         EXTRA_DIST.
6153         * modules/arcfour (Makefile.am): Likewise.
6154         * modules/arctwo (Makefile.am): Likewise.
6155         * modules/argmatch (Makefile.am): Likewise.
6156         * modules/argz (Makefile.am): Likewise.
6157         * modules/atexit (Makefile.am): Likewise.
6158         * modules/backupfile (Makefile.am): Likewise.
6159         * modules/c-strtod (Makefile.am): Likewise.
6160         * modules/c-strtold (Makefile.am): Likewise.
6161         * modules/calloc (Makefile.am): Likewise.
6162         * modules/canon-host (Makefile.am): Likewise.
6163         * modules/canonicalize (Makefile.am): Likewise.
6164         * modules/chdir-long (Makefile.am): Likewise.
6165         * modules/chdir-safer (Makefile.am): Likewise.
6166         * modules/check-version (Makefile.am): Likewise.
6167         * modules/chown (Makefile.am): Likewise.
6168         * modules/cloexec (Makefile.am): Likewise.
6169         * modules/close-stream (Makefile.am): Likewise.
6170         * modules/closeout (Makefile.am): Likewise.
6171         * modules/crc (Makefile.am): Likewise.
6172         * modules/cycle-check (Makefile.am): Likewise.
6173         * modules/des (Makefile.am): Likewise.
6174         * modules/dirfd (Makefile.am): Likewise.
6175         * modules/dirname (Makefile.am): Likewise.
6176         * modules/dup2 (Makefile.am): Likewise.
6177         * modules/euidaccess (Makefile.am): Likewise.
6178         * modules/exclude (Makefile.am): Likewise.
6179         * modules/exitfail (Makefile.am): Likewise.
6180         * modules/fcntl-safer (Makefile.am): Likewise.
6181         * modules/file-type (Makefile.am): Likewise.
6182         * modules/fileblocks (Makefile.am): Likewise.
6183         * modules/filemode (Makefile.am): Likewise.
6184         * modules/filenamecat (Makefile.am): Likewise.
6185         * modules/fnmatch (Makefile.am): Likewise.
6186         * modules/fopen-safer (Makefile.am): Likewise.
6187         * modules/fpending (Makefile.am): Likewise.
6188         * modules/fprintftime (Makefile.am): Likewise.
6189         * modules/free (Makefile.am): Likewise.
6190         * modules/fsusage (Makefile.am): Likewise.
6191         * modules/ftruncate (Makefile.am): Likewise.
6192         * modules/fts (Makefile.am): Likewise.
6193         * modules/gc (Makefile.am): Likewise.
6194         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
6195         * modules/getaddrinfo (Makefile.am): Likewise.
6196         * modules/getcwd (Makefile.am): Likewise.
6197         * modules/getdelim (Makefile.am): Likewise.
6198         * modules/getdomainname (Makefile.am): Likewise.
6199         * modules/getgroups (Makefile.am): Likewise.
6200         * modules/gethostname (Makefile.am): Likewise.
6201         * modules/gethrxtime (Makefile.am): Likewise.
6202         * modules/getline (Makefile.am): Likewise.
6203         * modules/getloadavg (Makefile.am): Likewise.
6204         * modules/getlogin_r (Makefile.am): Likewise.
6205         * modules/getopt (Makefile.am): Likewise.
6206         * modules/getpass (Makefile.am): Likewise.
6207         * modules/getpass-gnu (Makefile.am): Likewise.
6208         * modules/getsubopt (Makefile.am): Likewise.
6209         * modules/gettime (Makefile.am): Likewise.
6210         * modules/gettimeofday (Makefile.am): Likewise.
6211         * modules/getugroups (Makefile.am): Likewise.
6212         * modules/getusershell (Makefile.am): Likewise.
6213         * modules/glob (Makefile.am): Likewise.
6214         * modules/group-member (Makefile.am): Likewise.
6215         * modules/hard-locale (Makefile.am): Likewise.
6216         * modules/hash (Makefile.am): Likewise.
6217         * modules/hmac-md5 (Makefile.am): Likewise.
6218         * modules/hmac-sha1 (Makefile.am): Likewise.
6219         * modules/human (Makefile.am): Likewise.
6220         * modules/idcache (Makefile.am): Likewise.
6221         * modules/imaxabs (Makefile.am): Likewise.
6222         * modules/imaxdiv (Makefile.am): Likewise.
6223         * modules/inet_ntop (Makefile.am): Likewise.
6224         * modules/inet_pton (Makefile.am): Likewise.
6225         * modules/inttostr (Makefile.am): Likewise.
6226         * modules/isapipe (Makefile.am): Likewise.
6227         * modules/lchown (Makefile.am): Likewise.
6228         * modules/long-options (Makefile.am): Likewise.
6229         * modules/lstat (Makefile.am): Likewise.
6230         * modules/malloc (Makefile.am): Likewise.
6231         * modules/mathl (Makefile.am): Likewise.
6232         * modules/mbchar (Makefile.am): Likewise.
6233         * modules/md2 (Makefile.am): Likewise.
6234         * modules/md4 (Makefile.am): Likewise.
6235         * modules/md5 (Makefile.am): Likewise.
6236         * modules/memcasecmp (Makefile.am): Likewise.
6237         * modules/memchr (Makefile.am): Likewise.
6238         * modules/memcmp (Makefile.am): Likewise.
6239         * modules/memcoll (Makefile.am): Likewise.
6240         * modules/memcpy (Makefile.am): Likewise.
6241         * modules/memmem (Makefile.am): Likewise.
6242         * modules/memmove (Makefile.am): Likewise.
6243         * modules/mempcpy (Makefile.am): Likewise.
6244         * modules/memrchr (Makefile.am): Likewise.
6245         * modules/memset (Makefile.am): Likewise.
6246         * modules/memxor (Makefile.am): Likewise.
6247         * modules/mkancesdirs (Makefile.am): Likewise.
6248         * modules/mkdir (Makefile.am): Likewise.
6249         * modules/mkdir-p (Makefile.am): Likewise.
6250         * modules/mkdtemp (Makefile.am): Likewise.
6251         * modules/mkstemp (Makefile.am): Likewise.
6252         * modules/mktime (Makefile.am): Likewise.
6253         * modules/modechange (Makefile.am): Likewise.
6254         * modules/mountlist (Makefile.am): Likewise.
6255         * modules/nanosleep (Makefile.am): Likewise.
6256         * modules/openat (Makefile.am): Likewise.
6257         * modules/pagealign_alloc (Makefile.am): Likewise.
6258         * modules/physmem (Makefile.am): Likewise.
6259         * modules/poll (Makefile.am): Likewise.
6260         * modules/posixtm (Makefile.am): Likewise.
6261         * modules/posixver (Makefile.am): Likewise.
6262         * modules/putenv (Makefile.am): Likewise.
6263         * modules/quote (Makefile.am): Likewise.
6264         * modules/quotearg (Makefile.am): Likewise.
6265         * modules/raise (Makefile.am): Likewise.
6266         * modules/read-file (Makefile.am): Likewise.
6267         * modules/readline (Makefile.am): Likewise.
6268         * modules/readlink (Makefile.am): Likewise.
6269         * modules/readtokens (Makefile.am): Likewise.
6270         * modules/readutmp (Makefile.am): Likewise.
6271         * modules/realloc (Makefile.am): Likewise.
6272         * modules/regex (Makefile.am): Likewise.
6273         * modules/rename (Makefile.am): Likewise.
6274         * modules/rename-dest-slash (Makefile.am): Likewise.
6275         * modules/rijndael (Makefile.am): Likewise.
6276         * modules/rmdir (Makefile.am): Likewise.
6277         * modules/rpmatch (Makefile.am): Likewise.
6278         * modules/safe-read (Makefile.am): Likewise.
6279         * modules/safe-write (Makefile.am): Likewise.
6280         * modules/same (Makefile.am): Likewise.
6281         * modules/save-cwd (Makefile.am): Likewise.
6282         * modules/savedir (Makefile.am): Likewise.
6283         * modules/setenv (Makefile.am): Likewise.
6284         * modules/settime (Makefile.am): Likewise.
6285         * modules/sha1 (Makefile.am): Likewise.
6286         * modules/sig2str (Makefile.am): Likewise.
6287         * modules/snprintf (Makefile.am): Likewise.
6288         * modules/stdlib-safer (Makefile.am): Likewise.
6289         * modules/stpcpy (Makefile.am): Likewise.
6290         * modules/stpncpy (Makefile.am): Likewise.
6291         * modules/strcase (Makefile.am): Likewise.
6292         * modules/strcasestr (Makefile.am): Likewise.
6293         * modules/strchrnul (Makefile.am): Likewise.
6294         * modules/strcspn (Makefile.am): Likewise.
6295         * modules/strdup (Makefile.am): Likewise.
6296         * modules/strerror (Makefile.am): Likewise.
6297         * modules/strftime (Makefile.am): Likewise.
6298         * modules/strndup (Makefile.am): Likewise.
6299         * modules/strnlen (Makefile.am): Likewise.
6300         * modules/strpbrk (Makefile.am): Likewise.
6301         * modules/strsep (Makefile.am): Likewise.
6302         * modules/strstr (Makefile.am): Likewise.
6303         * modules/strtod (Makefile.am): Likewise.
6304         * modules/strtoimax (Makefile.am): Likewise.
6305         * modules/strtok_r (Makefile.am): Likewise.
6306         * modules/strtol (Makefile.am): Likewise.
6307         * modules/strtoll (Makefile.am): Likewise.
6308         * modules/strtoul (Makefile.am): Likewise.
6309         * modules/strtoull (Makefile.am): Likewise.
6310         * modules/strtoumax (Makefile.am): Likewise.
6311         * modules/strverscmp (Makefile.am): Likewise.
6312         * modules/time_r (Makefile.am): Likewise.
6313         * modules/timegm (Makefile.am): Likewise.
6314         * modules/tmpfile-safer (Makefile.am): Likewise.
6315         * modules/unistd-safer (Makefile.am): Likewise.
6316         * modules/unlinkdir (Makefile.am): Likewise.
6317         * modules/userspec (Makefile.am): Likewise.
6318         * modules/utime (Makefile.am): Likewise.
6319         * modules/utimecmp (Makefile.am): Likewise.
6320         * modules/utimens (Makefile.am): Likewise.
6321         * modules/vasnprintf (Makefile.am): Likewise.
6322         * modules/vasprintf (Makefile.am): Likewise.
6323         * modules/vsnprintf (Makefile.am): Likewise.
6324         * modules/xalloc (Makefile.am): Likewise.
6325         * modules/xgetcwd (Makefile.am): Likewise.
6326         * modules/xnanosleep (Makefile.am): Likewise.
6327         * modules/xreadlink (Makefile.am): Likewise.
6328         * modules/xstrtod (Makefile.am): Likewise.
6329         * modules/xstrtol (Makefile.am): Likewise.
6330         * modules/xstrtold (Makefile.am): Likewise.
6331         * modules/yesno (Makefile.am): Likewise.
6332
6333 2006-10-12  Jim Meyering  <jim@meyering.net>
6334
6335         * m4/getloadavg.m4: Revert the change below.
6336
6337         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
6338         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
6339         fail with a symlink, which is what coreutils' ./bootstrap now
6340         creates by default.
6341
6342 2006-10-12  Bruno Haible  <bruno@clisp.org>
6343
6344         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
6345         mingw.
6346         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
6347         MSVC and mingw explicitly.
6348
6349 2006-10-11  Simon Josefsson  <jas@extundo.com>
6350             Bruno Haible  <bruno@clisp.org>
6351
6352         Add support for multiple gnulib-tool invocations in the scope of a
6353         single configure.ac file.
6354         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
6355         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
6356         with the same contents as the _LIBADD variable.
6357         (func_emit_initmacro_start, func_emit_initmacro_end,
6358         func_emit_initmacro_done): New functions.
6359         (func_import, func_create_testdir): Invoke them. Allow the identifiers
6360         gl_LIBOBJS and gl_LTLIBOBJS.
6361
6362 2006-10-11  Bruno Haible  <bruno@clisp.org>
6363
6364         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
6365         (func_create_testdir): Don't create po/Makefile.am, don't invoke
6366         autoreconf. Instead, invoke autopoint explicitly but move back the
6367         *.m4 files from gnulib.
6368
6369 2006-10-11  Bruno Haible  <bruno@clisp.org>
6370
6371         * gnulib-tool (func_usage): Make module names after --create-testdir
6372         optional.
6373         (func_create_testdir): If no module was specified, use nearly all
6374         modules.
6375
6376 2006-10-12  Jim Meyering  <jim@meyering.net>
6377
6378         Big performance improvement for fts-based tools that use FTS_NOSTAT.
6379         Avoid spurious inode-mismatch problems on non-POSIX file systems.
6380         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
6381         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
6382         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
6383         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
6384         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
6385         (fts_set_stat_required): New function.
6386         (fts_open): Defer the calls to fts_stat, if possible or requested.
6387         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
6388         into fts_stat itself.
6389         (fts_read): Perform any required (deferred) fts_stat call.
6390         (fts_build): Likewise, for the directory we're about to open and read.
6391         In the readdir loop, carefully decide whether each entry will require
6392         an eventual call to fts_stat, using dirent.d_type info if available.
6393         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
6394         a command line argument into this function.  Update all callers.
6395         Map a return value of FTS_DOT to FTS_D for a command line argument.
6396         * modules/fts (Depends-on): Add d-type.  Alphabetize.
6397         Thanks to Miklos Szeredi for his tenacity and for the initial
6398         bug report about "find" failing on a FUSE-based file system.
6399
6400         * lib/fts.c (fts_open): Use consistent indentation.
6401
6402 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
6403
6404         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
6405         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
6406         reported by Jim Meyering.  All uses of cache variables renamed
6407         to match Autoconf's.
6408         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
6409         the other one.
6410
6411         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
6412         Fix misspelling in diagnostic.
6413
6414 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
6415
6416         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
6417         defined.  Problem reported by Matthew Woehlke.
6418
6419         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
6420         Add support for Tandem NonStop R series.
6421         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
6422         Use new macro.
6423
6424         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
6425         (has_trailing_slash): Omit size arg; all callers changed.
6426         Omit 'inline', since it doesn't help performance and we'd
6427         need to configure it.
6428         Don't count //, ///, etc. as having a trailing slash.
6429         As a side effect, this removes a C99ism reported by Matthew Woehlke.
6430         (rpl_rename_dest_slash): On failure, use rename's errno rather
6431         than (in some cases) an incorrect or junk errno.
6432         Simplify code by removing need to compute length; this does
6433         cause it to make two passes instead of one over the file name,
6434         but it's worth it.
6435
6436         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
6437         change, since Autoconf's version may no longer be appropriate now
6438         that we are using CVS Autoconf's version.  Add support for Tandem.
6439
6440 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
6441             Bruno Haible  <bruno@clisp.org>
6442
6443         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
6444         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
6445         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
6446         gl_AC_TYPE_LONG_LONG.
6447
6448         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
6449         instead of HAVE_LONG_LONG.
6450         * lib/printf-args.c (printf_fetchargs): Likewise.
6451         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
6452         * lib/vasnprintf.c (VASNPRINTF): Likewise.
6453         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
6454         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
6455         gl_AC_TYPE_LONG_LONG.
6456
6457 2006-10-11  Bruno Haible  <bruno@clisp.org>
6458
6459         * m4/longlong.m4: Add comments.
6460         * m4/ulonglong.m4: Likewise.
6461
6462 2006-10-10  Bruno Haible  <bruno@clisp.org>
6463
6464         Make it possible to #define stpcpy, strdup to aliases.
6465         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
6466         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
6467
6468 2006-10-10  Bruno Haible  <bruno@clisp.org>
6469
6470         Make it possible to #define gcd to an alias.
6471         * lib/gcd.c: Include config.h.
6472
6473 2006-10-10  Bruno Haible  <bruno@clisp.org>
6474
6475         Make it possible to #define c_isascii to an alias.
6476         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
6477         defined. Undefine the macros before defining them, to avoid gcc
6478         warnings.
6479         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
6480         define NO_C_CTYPE_MACROS early.
6481
6482 2006-10-10  Bruno Haible  <bruno@clisp.org>
6483
6484         Make it possible to #define set_program_name to an alias.
6485         * lib/progname.c: Don't undefine set_program_name; instead, undefine
6486         ENABLE_RELOCATABLE early.
6487
6488 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
6489
6490         Port to Tandem NSK OSS, which has 64-bit signed int but at most
6491         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
6492         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
6493         More generally, don't assume that 64-bit signed int is available
6494         if unsigned int is, and vice versa.
6495         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
6496         unsigned symbols, not on their signed counterparts.
6497         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
6498         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
6499         (UINT64_C, UINTMAX_C):
6500         Likewise.
6501         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
6502         unsigned counterparts.
6503         (Have_long_long, Unsigned): New macros.
6504         (Int): Renamed from INT.
6505         (strtoimax): Use the new macros.
6506         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
6507         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
6508         * modules/inttypes (inttypes.h): Substitute
6509         HAVE_UNSIGNED_LONG_LONG_INT.
6510         * modules/stdint (stdint.h): Likewise.
6511         (Files): Add m4/ulonglong.m4.
6512
6513 2006-10-10  Bruno Haible  <bruno@clisp.org>
6514
6515         Fix a gcc -Wshadow warning.
6516         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
6517         to 'bucket'.
6518         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
6519         gl_linked_indexof_from_to): Likewise.
6520         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
6521         Likewise.
6522         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
6523         Likewise.
6524         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
6525         Reported by Eric Blake.
6526
6527 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
6528
6529         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
6530         for NetBSD.  Problem reported by Bruno Haible.
6531
6532 2006-10-09  Jim Meyering  <jim@meyering.net>
6533
6534         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
6535         Patch from Bruno Haible.
6536
6537 2006-10-09  Jim Meyering  <jim@meyering.net>
6538
6539         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
6540         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
6541         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
6542
6543 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
6544
6545         Don't include <config.h> twice; this doesn't work in some cases,
6546         e.g., when config.h has "#define intmax_t long long int" and
6547         we include <config.h>, <inttypes.h>, <config.h> in that order.
6548         Problem reported by Matthew Woehlke in:
6549         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
6550         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
6551         * lib/fts-cycle.c: Don't include config.h.
6552         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
6553         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
6554         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
6555         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
6556         inttypes.h.
6557         * lib/xstrtoumax.c: Likewise.
6558         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
6559         __strtol and the like, so that this module is more like its siblings.
6560         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
6561         Remove; no longer needed now that we assume gnulib inttypes.h.
6562
6563 2006-10-08  Bruno Haible  <bruno@clisp.org>
6564
6565         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
6566         option.
6567
6568 2006-10-07  Jim Meyering  <jim@meyering.net>
6569
6570         * modules/inttypes (inttypes.h): Revert what seems to have been
6571         an inadvertent part of today's change: use "|", not "/" in the
6572         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
6573
6574 2006-10-07  Bruno Haible  <bruno@clisp.org>
6575
6576         * modules/sublist: New file.
6577
6578 2006-10-07  Bruno Haible  <bruno@clisp.org>
6579
6580         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
6581         * modules/argz (argz.h): Likewise.
6582         * modules/arpa_inet (arpa/inet.h): Likewise.
6583         * modules/byteswap (byteswap.h): Likewise.
6584         * modules/configmake (configmake.h): Likewise.
6585         * modules/fcntl (fcntl.h): Likewise.
6586         * modules/fnmatch (fnmatch.h): Likewise.
6587         * modules/getopt (getopt.h): Likewise.
6588         * modules/glob (glob.h): Likewise.
6589         * modules/inttypes (inttypes.h): Likewise.
6590         * modules/netinet_in (netinet/in.h): Likewise.
6591         * modules/poll (poll.h): Likewise.
6592         * modules/stdbool (stdbool.h): Likewise.
6593         * modules/stdint (stdint.h): Likewise.
6594         * modules/sys_select (sys/select.h): Likewise.
6595         * modules/sys_socket (sys/socket.h): Likewise.
6596         * modules/sys_stat (sys/stat.h): Likewise.
6597         * modules/sysexits (sysexits.h): Likewise.
6598         * modules/unistd (unistd.h): Likewise.
6599         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6600         Add a "DO NOT EDIT" comment to the generated file.
6601         (func_import): Likewise for gnulib-comp.m4.
6602
6603 2006-10-07  Bruno Haible  <bruno@clisp.org>
6604
6605         * lib/gl_sublist.h: New file.
6606         * lib/gl_sublist.c: New file.
6607
6608 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
6609
6610         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
6611         name (relative to the original working directory) and the file
6612         name component (relative to the temporary working directory).  All
6613         callers changed.
6614         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
6615         * lib/mkdir-p.c (make_dir_parents): Likewise.
6616         * lib/mkdir-p.h (make_dir_parents): Likewise.
6617
6618 2006-10-06  Eric Blake  <ebb9@byu.net>
6619
6620         Define several macros for use by the clean-temp module.
6621         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
6622         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
6623         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
6624
6625         * lib/clean-temp.h (close_stream_temp): New declaration.
6626         * lib/clean-temp.c (includes): Pull in headers according to what
6627         other modules are in use.
6628         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
6629
6630 2006-10-06  Bruno Haible  <bruno@clisp.org>
6631
6632         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
6633         instead of fopen, fwriteerror.
6634
6635 2006-10-06  Bruno Haible  <bruno@clisp.org>
6636
6637         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
6638         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
6639         int.
6640         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
6641         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
6642         Return an error indicator.
6643         Suggested by Eric Blake.
6644
6645 2006-10-06  Bruno Haible  <bruno@clisp.org>
6646
6647         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
6648         Reported by Eric Blake.
6649
6650 2006-10-06  Bruno Haible  <bruno@clisp.org>
6651
6652         * modules/closeout (Description): Mention stderr too.
6653
6654 2006-10-06  Bruno Haible  <bruno@clisp.org>
6655         and Paul Eggert  <eggert@cs.ucla.edu>
6656
6657         * lib/closeout.c (close_stdout): Also close stderr.
6658         * lib/closeout.h: Update comment.
6659
6660 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
6661
6662         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
6663         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
6664         * lib/dirchownmod.c: Include lchown.h.
6665         * lib/lchown.c: Don't include files that lchown.h now includes.
6666         Don't declare chown, since lchown.h now does that.
6667         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
6668         (lchown): Define to rpl_chown if lchown is declared but
6669         does not exist.  Declare using a prototype if lchown is not
6670         declared.  Add a copyright notice.
6671         * lib/mkstemp.h: Include <unistd.h>.
6672         * lib/openat.c: Include lchown.h.
6673
6674         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
6675         we now test for that separately.
6676         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
6677         rather than O_NOFOLLOW, when testing whether it's possible to
6678         avoid a race condition reliably.
6679         * lib/savewd.c (savewd_chdir): Likewise.
6680
6681         Remove macros that are no longer needed now that stdint.h is
6682         reliable.
6683         * lib/fsusage.c (UINTMAX_MAX): Remove.
6684         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
6685         * lib/utimecmp.c (SIZE_MAX): Remove.
6686
6687         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
6688
6689         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
6690         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
6691         O_NOATIME works.
6692
6693 2006-10-05  Bruno Haible  <bruno@clisp.org>
6694
6695         * lib/gl_list.h (gl_sortedlist_search_from_to,
6696         gl_sortedlist_indexof_from_to): New declarations.
6697         (gl_list_implementation): New fields sortedlist_search_from_to,
6698         sortedlist_indexof_from_to.
6699         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
6700         inline functions.
6701         * lib/gl_list.c (gl_sortedlist_search_from_to,
6702         gl_sortedlist_indexof_from_to): New functions.
6703         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
6704         function.
6705         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
6706         (gl_array_sortedlist_search_from_to): New function.
6707         (gl_array_list_implementation): Update.
6708         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
6709         function.
6710         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
6711         (gl_carray_sortedlist_search_from_to): New function.
6712         (gl_carray_list_implementation): Update.
6713         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
6714         gl_linked_sortedlist_indexof_from_to): New functions.
6715         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
6716         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
6717         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
6718         gl_tree_sortedlist_indexof_from_to): New functions.
6719         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
6720         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
6721         Update.
6722         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
6723         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
6724         Update.
6725
6726 2006-10-05  Bruno Haible  <bruno@clisp.org>
6727
6728         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
6729         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
6730         (struct gl_list_implementation): Add fields search_from_to,
6731         indexof_from_to. Remove fields search, indexof.
6732         (gl_list_search): Use the search_from_to method.
6733         (gl_list_search_from, gl_list_search_from_to): New functions.
6734         (gl_list_indexof): Use the indexof_from_to method.
6735         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
6736         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
6737         (gl_list_search_from, gl_list_search_from_to): New functions.
6738         (gl_list_indexof): Use the indexof_from_to method.
6739         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
6740         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
6741         gl_array_indexof. Add start_index, end_index arguments.
6742         (gl_array_search_from_to): Renamed from gl_array_search. Add
6743         start_index, end_index arguments.
6744         (gl_array_remove, gl_array_list_implementation): Update.
6745         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
6746         gl_carray_indexof. Add start_index, end_index arguments.
6747         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
6748         start_index, end_index arguments.
6749         (gl_carray_remove, gl_carray_list_implementation): Update.
6750         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
6751         gl_linked_search. Add start_index, end_index arguments.
6752         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
6753         start_index, end_index arguments.
6754         (gl_linked_remove): Update.
6755         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
6756         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
6757         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
6758         field to 'size_t'.
6759         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
6760         gl_tree_search. Add start_index, end_index arguments.
6761         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
6762         start_index, end_index arguments.
6763         (gl_tree_remove): Update.
6764         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
6765         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
6766         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
6767         function.
6768         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
6769         gl_tree_search. Add start_index, end_index arguments.
6770         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
6771         start_index, end_index arguments.
6772         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
6773         Update.
6774         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
6775
6776 2006-10-05  Bruno Haible  <bruno@clisp.org>
6777
6778         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
6779
6780         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
6781         fwriteerror_temp): New declarations.
6782         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
6783         (descriptors): New variable.
6784         (cleanup): First, close the descriptors.
6785         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
6786         fclose_temp, fwriteerror_temp): New functions.
6787
6788 2006-10-04  Jim Meyering  <jim@meyering.net>
6789
6790         * lib/fts.c (fts_open): Tiny comment change.
6791
6792 2006-10-04  Bruno Haible  <bruno@clisp.org>
6793
6794         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
6795         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
6796         gl_LOCK_BODY.
6797         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
6798         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
6799         gl_LOCK_EARLY_BODY.
6800         (gl_LOCK): Require gl_LOCK_BODY.
6801
6802 2006-10-04  Bruno Haible  <bruno@clisp.org>
6803
6804         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
6805         (gl_oset_search_atleast): New declaration.
6806         (struct gl_oset_implementation): Add field 'search_atleast'.
6807         (gl_oset_search_atleast): New inline function.
6808         * lib/gl_oset.c (gl_oset_search_atleast): New function.
6809         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
6810         (gl_array_oset_implementation): Update.
6811         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
6812         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
6813         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
6814
6815 2006-10-04  Bruno Haible  <bruno@clisp.org>
6816
6817         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
6818
6819 2006-10-03  Bruno Haible  <bruno@clisp.org>
6820
6821         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
6822         from gl_avltreehash_list_implementation.
6823
6824 2006-10-03  Bruno Haible  <bruno@clisp.org>
6825
6826         * lib/gl_oset.c (gl_oset_add): Fix return type.
6827
6828 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
6829
6830         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
6831
6832 2006-10-02  Eric Blake  <ebb9@byu.net>
6833
6834         * modules/strnlen (Depends-on): Add extensions.
6835
6836 2006-10-02  Eric Blake  <ebb9@byu.net>
6837
6838         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
6839         definition in 2.60+.
6840
6841 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
6842
6843         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
6844         checks.
6845
6846 2006-10-02  Bruno Haible  <bruno@clisp.org>
6847
6848         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
6849         to the AUTOMAKE_OPTIONS.
6850         Reported by Jim Meyering.
6851
6852 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
6853
6854         Work around bug in Solaris 10 /proc file system:
6855         /proc/self/fd/NNN/.. isn't the parent directory of
6856         the directory whose file descriptor is NNN.  This needs to
6857         be worked around at run time, not compile time, since a
6858         program might be built on Solaris 8, where things work, and
6859         run on Solaris 10.
6860         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
6861         to use the following interface instead:
6862         (OPENAT_BUFFER_SIZE): New macro.
6863         (openat_proc_name): New function.
6864         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
6865         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
6866         Likewise.
6867         * lib/openat-proc.c: New file.
6868         * modules/openat (Files): Add lib/openat-proc.c.
6869         (Depends-on): Add same-inode, stdbool.
6870         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
6871
6872 2006-09-29  Bruno Haible  <bruno@clisp.org>
6873
6874         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
6875         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
6876         argument. Set stdout_closed before testing for ferror, not after.
6877         (fwriteerror, fwriteerror_no_ebadf): New functions.
6878
6879 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6880
6881         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
6882
6883 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
6884
6885         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
6886         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
6887
6888 2006-09-28  Jim Meyering  <jim@meyering.net>
6889
6890         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
6891         Include <unistd.h>.
6892
6893 2006-09-28  Bruno Haible  <bruno@clisp.org>
6894
6895         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
6896         * modules/linkedhash-list (Depends-on): Likewise.
6897         * modules/rbtreehash-list (Depends-on): Likewise.
6898
6899 2006-09-28  Bruno Haible  <bruno@clisp.org>
6900
6901         * lib/strndup.h: Simplify the redefinition of strndup.
6902         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
6903         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
6904
6905 2006-09-28  Bruno Haible  <bruno@clisp.org>
6906
6907         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
6908         * lib/gl_linkedhash_list.c: Likewise.
6909         * lib/gl_rbtreehash_list.c: Likewise.
6910
6911 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
6912
6913         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
6914         getaddrinfo.
6915
6916         * lib/__fpending.h: Don't include <stdio_ext.h> unless
6917         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
6918         it causes <stdio_ext.h> to cause a compile-time error.
6919         Problem reported by Nelson H. F. Beebe.
6920         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
6921         of HAVE_DECL___PENDING.
6922
6923         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
6924         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
6925         declaration.
6926
6927 2006-09-27  Jim Meyering  <jim@meyering.net>
6928
6929         This file could end up with a definition for a function
6930         named __strndup, rather than rpl_strndup on a system with
6931         incomplete weak_alias support.
6932         * lib/strndup.c (strndup): Rename from __strndup.
6933         Remove #defines that used to map __strndup to strndup.
6934         Don't use K&R prototypes.
6935         Remove LIBC-related code, since this file is not sync'd with glibc.
6936         * lib/strndup.h: Revamp, accordingly.
6937         * m4/strndup.m4: Modernize.
6938
6939 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
6940
6941         * modules/savewd (Depends-on): Add 'raise'.
6942         * lib/savewd.c: Include <signal.h>, for 'raise'.
6943
6944 2006-09-26  Jim Meyering  <jim@meyering.net>
6945
6946         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
6947         when we detect Darwin 8.7.0's acl_get_file bug.
6948         Rearrange to perform the new (below) run-test while $LIBS
6949         contains any acl-related library.  Set USE_ACL at the end.
6950         (gl_ACL_GET_FILE): New function.
6951
6952 2006-09-26  Eric Blake  <ebb9@byu.net>
6953
6954         * lib/verror.c: Include <config.h> unconditionally.
6955
6956 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
6957
6958         * modules/clock-time (Maintainer): Add self.
6959         * modules/getlogin_r (Depends-on): Add extensions.
6960
6961 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6962
6963         * modules/clock-time: New module.
6964         * modules/nanosleep (Depends-on): Add clock-time.
6965         * modules/gethrxtime (Depends-on): Likewise.
6966         * modules/gettime (Depends-on): Likewise.
6967         * modules/settime (Depends-on): Likewise.
6968
6969         * modules/fts-lgpl: Depend on openat.
6970         * modules/mkancesdirs: Depend on savewd.
6971         * modules/mkdir-p: Likewise.
6972
6973 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6974
6975         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
6976
6977         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
6978         `gl_have_arbitrary_file_name_length_limit' to
6979         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
6980         actually works between configure runs.
6981
6982 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6983             Bruno Haible  <bruno@clisp.org>
6984
6985         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
6986
6987 2006-09-25  Jim Meyering  <jim@meyering.net>
6988
6989         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
6990         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
6991
6992 2006-09-25  Eric Blake  <ebb9@byu.net>
6993
6994         * gnulib-tool (func_import, func_create_testdir): Fix typos in
6995         exec's in 2006-09-18 patch when shuffling fds.
6996
6997 2006-09-25  Bruno Haible  <bruno@clisp.org>
6998
6999         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
7000         Reported by Jim Meyering.
7001
7002 2006-09-24  Jim Meyering  <jim@meyering.net>
7003
7004         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
7005         compare a pointer against a literal "0".  That caused failures with
7006         at least HP-UX's hpcc.
7007
7008 2006-09-22  Simon Josefsson  <jas@extundo.com>
7009
7010         * modules/gc-sha1:
7011         * modules/gc-md4:
7012         * modules/gc-hmac-sha1:
7013         * modules/gc-hmac-md5:
7014         * modules/gc-des:
7015         * modules/gc-arcfour: Distribute more files.
7016
7017 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7018
7019         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
7020         (gl_linked_iterator_from_to): Initialize struct completely.
7021         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
7022         (gl_tree_iterator_from_to): Likewise
7023         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
7024         * lib/gl_array_list.c [lint] (gl_array_iterator)
7025         (gl_array_iterator_from_to): Likewise.
7026         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
7027         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
7028         (gl_carray_iterator_from_to): Likewise.
7029
7030         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
7031         * lib/md4.c (md4_process_block): Remove unused variable.
7032         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
7033         parentheses for clarity.
7034
7035 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7036
7037         * modules/bison-i18n (Depends-on): Add gettext.
7038
7039 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7040
7041         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
7042         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
7043         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
7044         also add missing comma that caused broken test.
7045         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
7046         stdlib.h, for `abort'.
7047         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
7048         variables.
7049         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
7050         include unistd.h if present, for `rmdir'.
7051         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
7052         variables.
7053         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
7054         in the process include standard headers for prototypes.
7055         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
7056         gets declared on GNU/Linux.
7057         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
7058         unistd.h, for `rmdir'.
7059         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
7060
7061         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
7062         always true.
7063         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
7064
7065         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
7066
7067 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7068
7069         * gnulib-tool (func_version): Create output all at once.  This
7070         may help avoid triggering unnecessary SIGPIPEs, and at any
7071         rate it doesn't hurt.
7072
7073 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7074             Bruno Haible  <bruno@clisp.org>
7075
7076         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
7077         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
7078         * m4/signed.m4 (bh_C_SIGNED): Likewise.
7079
7080         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
7081         (gl_FUNC_VASPRINTF): Invoke it.
7082
7083 2006-09-22  Bruno Haible  <bruno@clisp.org>
7084
7085         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
7086         getloadavg.c as first argument.
7087
7088 2006-09-22  Bruno Haible  <bruno@clisp.org>
7089
7090         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
7091         at the beginning of the gl_INIT macro.
7092         * modules/getloadavg (configure.ac): Pass $gl_source_base to
7093         gl_GETLOADAVG.
7094
7095 2006-09-22  Bruno Haible  <bruno@clisp.org>
7096
7097         * gnulib-tool (func_create_megatestdir): Don't include the config-h
7098         module.
7099         Suggested by Ralf Wildenhues.
7100
7101 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
7102
7103         Import this patch from libc:
7104
7105         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
7106
7107         * lib/regex_internal.c (re_string_reconstruct): Handle
7108         offset < pstr->valid_raw_len && pstr->offsets_needed case.
7109         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
7110         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
7111         re_string_context_at.
7112
7113         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
7114         now requires it.
7115         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
7116         gl_REGEX now does it for us.
7117         (gl_REGEX): Add test taken from
7118         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
7119
7120         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
7121         Check that large offsets work.  Modernize Autoconf usages.
7122         Prefer "yes" to mean a good thing rather than a bad.
7123         Don't put "#define mkstemp" in config.h, as this might interfere
7124         with standard system headers that "#define mkstemp mkstemp64".
7125
7126         * modules/mkstemp (Depends-on): Add extensions, so that
7127         mkstemp is visible on some platforms.
7128         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
7129         (Include): Change to "mkstemp.h" from <stdlib.h>.
7130         (Files): Add mkstemp.h.
7131
7132         * lib/mkstemp.h: New file, since some standard headers
7133         #define mkstemp.
7134         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
7135         Include "mkstemp.h".
7136         Make the _LIBC code resemble glibc original more,
7137         e.g., use K&R style.
7138         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
7139         (mkstemp): Remove, since mkstemp.h does this for us.
7140         * lib/stdlib--.h: Include mkstemp.h.
7141
7142         Import this patch from libc:
7143
7144         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
7145
7146         * lib/tempname.c (__gen_tempname): Change attempts_min
7147         into a macro.  Use preprocessor to decide how to initialize
7148         attempts [Coverity CID 67].
7149
7150 2006-09-20  Bruno Haible  <bruno@clisp.org>
7151
7152         * lib/mkdtemp.c: Import from libc.
7153         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
7154                 * sysdeps/posix/tempname.c (__gen_tempname): Change
7155                 attempts_min into a macro.  Use preprocessor to decide how to
7156                 initialize attempts [Coverity CID 67].
7157         2001-11-27  Paul Eggert  <eggert@twinsun.com>
7158                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
7159                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
7160
7161 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7162
7163         * gnulib-tool (func_exit): New function, to allow to pass the
7164         exit status portably through the trap.  Use everywhere.
7165         (--help, --version): Signal a write error.
7166         (trap): catch SIGPIPE, for write errors.
7167         Exit at the end of the trap, with the correct exit status.
7168
7169 2006-09-19  Karl Berry  <karl@gnu.org>
7170
7171         * doc/gnulib.texi: note about the license texinfo files.
7172
7173 2006-09-19  Eric Blake  <ebb9@byu.net>
7174
7175         * gnulib-tool: Avoid space-tab.
7176
7177 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
7178
7179         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
7180         that prevented coreutils 6.1 from building.  Problem reported
7181         by Petter Reinholdtsen.
7182
7183 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
7184
7185         * gnulib-tool (avoidlist): Fix typo that broke options like
7186         --avoid=lock that are used by coreutils bootstrap.
7187
7188 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
7189
7190         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
7191         more systematically.
7192
7193 2006-09-18  Jim Meyering  <jim@meyering.net>
7194
7195         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
7196
7197 2006-09-18  Bruno Haible  <bruno@clisp.org>
7198
7199         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
7200
7201 2006-09-18  Bruno Haible  <bruno@clisp.org>
7202
7203         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
7204         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
7205         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
7206         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
7207         * m4/gettext.m4: Require autoconf >= 2.52.
7208         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
7209         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
7210         of gl_cv_header_inttypes_h.
7211
7212 2006-09-18  Bruno Haible  <bruno@clisp.org>
7213
7214         * lib/javaversion.c: Include configmake.h.
7215
7216 2006-09-18  Bruno Haible  <bruno@clisp.org>
7217
7218         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
7219         avoid that the while loops be executed in a subshell.
7220
7221 2006-09-18  Bruno Haible  <bruno@clisp.org>
7222
7223         * MODULES.html.sh (func_module): Break long lines.
7224         Suggested by Bruce Korb <bkorb@gnu.org>.
7225
7226 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7227
7228         Speed up by a factor of 1.12.
7229         * gnulib-tool (nl): New variable.
7230         (func_import): Rewrite include directive extraction to only read each
7231         directive once.
7232
7233 2006-09-17  Bruno Haible  <bruno@clisp.org>
7234
7235         * modules/javaversion (Makefile.am): Remove DEFS setting.
7236         (Depends-on): Add configmake, for PKGDATADIR definition.
7237
7238 2006-09-17  Bruno Haible  <bruno@clisp.org>
7239
7240         * gnulib-tool (func_create_testdir): Rewrite all files at once.
7241
7242 2006-09-17  Bruno Haible  <bruno@clisp.org>
7243
7244         * gnulib-tool (func_append): New function, stolen from libtool.m4.
7245         (func_modules_transitive_closure, func_modules_add_dummy,
7246         func_modules_to_filelist, func_import, func_create_testdir,
7247         func_create_megatestdir, ...): Use it wherever possible.
7248         Suggested by Ralf Wildenhues.
7249
7250 2006-09-16  Karl Berry  <karl@gnu.org>
7251
7252         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
7253         to avoid sectioning errors.
7254         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
7255         [ifinfo]: blank line after @center-ed titles.
7256         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
7257         Spell FSF address consistently with others.
7258         (These changes approved by rms.)
7259
7260 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7261
7262         Speed up by a factor of 1.61.
7263         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
7264         already checked module names again.
7265
7266 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7267
7268         Speed up by a factor of 1.13.
7269         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
7270         for new_files, and the input to func_add_or_update.
7271
7272 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7273
7274         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
7275         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
7276
7277 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7278
7279         * modules/mkancesdirs (Depends-on): Add fcntl.
7280         * modules/savewd: New file.
7281         * MODULES.html.sh (File system functions): Add savewd.
7282
7283         * modules/configmake (Makefile.am): Add support for the
7284         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
7285
7286 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7287
7288         * m4/savewd.m4: New file.
7289
7290 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7291
7292         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
7293         (dirchownmod): New arg FD.  All callers changed.
7294         Use FD rather than opening the directory ourself, as opening is
7295         now the caller's responsibility.
7296         * lib/dirchownmod.h: Likewise.
7297         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
7298         hosts that require <sys/types.h> before <sys/stat.h>.  Include
7299         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
7300         (test_dir): Remove.
7301         (mkancesdirs): Return length of prefix of FILE that has already
7302         been made, or -2 if there is a child doing the work.  Redo
7303         algorithm so that it is O(N) rather than O(N**2).  Optimize away
7304         ".", and treat ".." specially since it might stray back into
7305         already-created areas.  Use a subprocess if necessary.  New arg
7306         WD; all users changed.  MAKE_DIR function should now return 1
7307         if it creates a directory that is not readable.  Return -2 if
7308         a child process is spun off.
7309         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
7310         Adjust signature to match code.
7311         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
7312         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
7313         all users changed.
7314         * lib/savewd.c, lib/savewd.h: New files.
7315
7316 2006-09-15  Jim Meyering  <jim@meyering.net>
7317
7318         * modules/rename-dest-slash: New module.
7319         * MODULES.html.sh (posix_compat): Add it here.
7320
7321         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
7322
7323 2006-09-15  Jim Meyering  <jim@meyering.net>
7324
7325         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
7326         file.
7327
7328         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
7329
7330 2006-09-15  Jim Meyering  <jim@meyering.net>
7331
7332         * lib/rename-dest-slash.c (has_trailing_slash): Use
7333         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
7334         (rpl_rename_dest_slash): Perform the cheaper trailing slash
7335         test before testing whether SRC is a directory.
7336         Suggestions from Bruno Haible.
7337
7338         Avoid a warning about an unused variable.
7339         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
7340         into the #ifdef block where it's used.
7341
7342         * lib/rename-dest-slash.c: New file.
7343
7344 2006-09-14  Bruno Haible  <bruno@clisp.org>
7345
7346         * lib/allocsa.c: Include <config.h> unconditionally.
7347         * lib/asnprintf.c: Likewise.
7348         * lib/asprintf.c: Likewise.
7349         * lib/c-strcasecmp.c: Likewise.
7350         * lib/c-strcasestr.c: Likewise.
7351         * lib/c-strncasecmp.c: Likewise.
7352         * lib/c-strstr.c: Likewise.
7353         * lib/classpath.c: Likewise.
7354         * lib/clean-temp.c: Likewise.
7355         * lib/concatpath.c: Likewise.
7356         * lib/copy-file.c: Likewise.
7357         * lib/csharpcomp.c: Likewise.
7358         * lib/csharpexec.c: Likewise.
7359         * lib/execute.c: Likewise.
7360         * lib/fatal-signal.c: Likewise.
7361         * lib/findprog.c: Likewise.
7362         * lib/fwriteerror.c: Likewise.
7363         * lib/gl_array_list.c: Likewise.
7364         * lib/gl_array_oset.c: Likewise.
7365         * lib/gl_avltree_list.c: Likewise.
7366         * lib/gl_avltree_oset.c: Likewise.
7367         * lib/gl_avltreehash_list.c: Likewise.
7368         * lib/gl_carray_list.c: Likewise.
7369         * lib/gl_linked_list.c: Likewise.
7370         * lib/gl_linkedhash_list.c: Likewise.
7371         * lib/gl_list.c: Likewise.
7372         * lib/gl_oset.c: Likewise.
7373         * lib/gl_rbtree_list.c: Likewise.
7374         * lib/gl_rbtree_oset.c: Likewise.
7375         * lib/gl_rbtreehash_list.c: Likewise.
7376         * lib/imaxabs.c: Likewise.
7377         * lib/imaxdiv.c: Likewise.
7378         * lib/javacomp.c: Likewise.
7379         * lib/javaexec.c: Likewise.
7380         * lib/javaversion.c: Likewise.
7381         * lib/linebreak.c: Likewise.
7382         * lib/localcharset.c: Likewise.
7383         * lib/lock.c: Likewise.
7384         * lib/mbchar.c: Likewise.
7385         * lib/mbswidth.c: Likewise.
7386         * lib/mkdtemp.c: Likewise.
7387         * lib/pipe.c: Likewise.
7388         * lib/printf-args.c: Likewise.
7389         * lib/printf-parse.c: Likewise.
7390         * lib/progname.c: Likewise.
7391         * lib/progreloc.c: Likewise.
7392         * lib/readlink.c: Likewise.
7393         * lib/sh-quote.c: Likewise.
7394         * lib/stpcpy.c: Likewise.
7395         * lib/stpncpy.c: Likewise.
7396         * lib/strcasecmp.c: Likewise.
7397         * lib/strcasestr.c: Likewise.
7398         * lib/strcspn.c: Likewise.
7399         * lib/striconv.c: Likewise.
7400         * lib/strncasecmp.c: Likewise.
7401         * lib/strnlen1.c: Likewise.
7402         * lib/strstr.c: Likewise.
7403         * lib/strtok_r.c: Likewise.
7404         * lib/tls.c: Likewise.
7405         * lib/tmpdir.c: Likewise.
7406         * lib/unicodeio.c: Likewise.
7407         * lib/unsetenv.c: Likewise.
7408         * lib/vasnprintf.c: Likewise.
7409         * lib/vasprintf.c: Likewise.
7410         * lib/wait-process.c: Likewise.
7411         * lib/xallocsa.c: Likewise.
7412         * lib/xsetenv.c: Likewise.
7413         * lib/xstriconv.c: Likewise.
7414
7415 2006-09-13  Simon Josefsson  <jas@extundo.com>
7416
7417         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
7418         that internally, suggested by Ralf Wildenhues
7419         <Ralf.Wildenhues@gmx.de>.
7420
7421 2006-09-13  Simon Josefsson  <jas@extundo.com>
7422
7423         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
7424         @LIBOBJS@.
7425         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7426
7427 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
7428
7429         * lib/_fpending.c: Include <config.h> unconditionally, since we no
7430         longer worry about uses that don't define HAVE_CONFIG_H.
7431         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
7432         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
7433         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
7434         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
7435         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
7436         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
7437         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
7438         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
7439         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
7440         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
7441         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
7442         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
7443         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
7444         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
7445         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
7446         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
7447         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
7448         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
7449         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
7450         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
7451         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
7452         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
7453         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
7454         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
7455         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
7456         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
7457         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
7458         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
7459         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
7460         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
7461         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
7462         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
7463         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
7464         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
7465         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
7466         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
7467         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
7468         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
7469         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
7470         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
7471         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
7472         Likewise.
7473
7474 2006-09-13  Eric Blake  <ebb9@byu.net>
7475
7476         * lib/getopt.c: Fix typo in last commit.
7477
7478 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
7479
7480         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
7481         dgettext.
7482
7483 2006-09-12  Jim Meyering  <jim@meyering.net>
7484
7485         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
7486         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
7487         Reported by Nelson H. F. Beebe.
7488
7489 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7490
7491         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
7492         program_invocation_name and program_invocation_short_name are
7493         initialized.
7494         * lib/argp-namefrob.h: Move declarations of program_invocation_name
7495         and program_invocation_short_name to argp.h, so they are visible
7496         to user programs.
7497         * lib/argp.h: Likewise
7498
7499 2006-09-10  Bruno Haible  <bruno@clisp.org>
7500
7501         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
7502         m4/inttypes_h.m4, m4/uintmax_t.m4.
7503
7504 2006-09-10  Bruno Haible  <bruno@clisp.org>
7505
7506         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
7507         gl_AC_TYPE_UINTMAX_T.
7508
7509 2006-09-10  Bruno Haible  <bruno@clisp.org>
7510
7511         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
7512
7513 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7514
7515         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
7516         convention.  Text proposed by Bruno Haible.
7517         (struct argp_option): Document the use of N_() wrappers.
7518
7519         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
7520         '\v', and translate the two parts separately, instead of feeding
7521         the whole string to gettext.  This allows to exclude
7522         '\v' from the strings visible to the translator by writing doc
7523         strings as N_("..") "\v" N_("..").
7524
7525 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
7526
7527         * config/srclist.txt: Undo latest change; the bug was fixed.
7528
7529 2006-09-09  Bruno Haible  <bruno@clisp.org>
7530
7531         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
7532         assignments if building a library without libtool.
7533         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
7534         in func_emit_lib_Makefile_am.
7535         (func_import): When building a static library libfoo.a, arrange to
7536         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
7537         (func_create_testdir): Likewise.
7538         * modules/gc (configure.ac, Makefile.am): If building statically,
7539         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
7540         * modules/iconvme (configure.ac, Makefile.am): Likewise.
7541         * modules/striconv (configure.ac, Makefile.am): Likewise.
7542         Based on a suggestion by Ralf Wildenhues.
7543
7544 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7545
7546         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
7547         Check for unistd.h too, since Autoconf doesn't assume POSIX.
7548         Also:
7549
7550         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7551         Add year_2050_test to catch glibc bug 2821
7552         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
7553
7554         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7555         Prefer #ifdef to #if.
7556
7557         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
7558         Return from 'main' instead of calling 'exit'.
7559
7560 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7561
7562         * lib/mktime.c (guess_time_tm): Fix bug where mktime
7563         returned the maximum time_t value rather than (time_t) -1.
7564         Problem originally reported by William Bardwell
7565         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
7566
7567         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
7568         Moved to here ...
7569         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
7570         ... from here.
7571
7572 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7573
7574         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
7575         2821 is fixed.
7576
7577 2006-09-08  Jim Meyering  <jim@meyering.net>
7578
7579         Don't make generated files read-only.  That would bother too many
7580         people.  However, do retain the ability to work when targets are
7581         read-only: remove the destination and temporary files before writing
7582         them (when generated via sed or echo), or by using the -f option for
7583         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
7584         * modules/alloca-opt, modules/argz, modules/arpa_inet:
7585         * modules/byteswap, modules/configmake, modules/fcntl:
7586         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
7587         * modules/localcharset, modules/netinet_in, modules/poll:
7588         * modules/stdbool, modules/stdint, modules/sys_select:
7589         * modules/sys_socket, modules/sys_stat, modules/sysexits:
7590
7591 2006-09-08  Jim Meyering  <jim@meyering.net>
7592
7593         Avoid new build failure on FreeBSD 6.0.
7594         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
7595         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
7596         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
7597
7598 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7599
7600         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
7601
7602 2006-09-07  Jim Meyering  <jim@meyering.net>
7603
7604         Fix global typo in last change: use chmod u-w, not chmod u-x.
7605         Spotted by Paul Eggert and Bruce Korb.
7606         * modules/alloca-opt, modules/argz, modules/arpa_inet:
7607         * modules/byteswap, modules/configmake, modules/fcntl:
7608         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
7609         * modules/localcharset, modules/netinet_in, modules/poll:
7610         * modules/stdbool, modules/stdint, modules/sys_select:
7611         * modules/sys_socket, modules/sys_stat, modules/sysexits:
7612
7613 2006-09-06  Jim Meyering  <jim@meyering.net>
7614
7615         Make generated files be read-only.
7616         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
7617         Ensure that each generated file is now read-only.
7618         * modules/argz: Likewise.
7619         * modules/arpa_inet: Likewise.
7620         * modules/byteswap: Likewise.
7621         * modules/configmake: Likewise.
7622         * modules/fcntl: Likewise.
7623         * modules/fnmatch: Likewise.
7624         * modules/getopt: Likewise.
7625         * modules/glob: Likewise.
7626         * modules/inttypes: Likewise.
7627         * modules/netinet_in: Likewise.
7628         * modules/poll: Likewise.
7629         * modules/stdbool: Likewise.
7630         * modules/stdint: Likewise.
7631         * modules/sys_select: Likewise.
7632         * modules/sys_socket: Likewise.
7633         * modules/sys_stat: Likewise.
7634         * modules/sysexits: Likewise.
7635         * modules/localcharset: Same as above, but continue using temporary
7636         file named "t-$@" (why different?) rather than the "$@-t" used
7637         everywhere else.
7638
7639         * modules/sysexits (Makefile.am): Replace literal occurrences
7640         of "sysexit.h" more readable, and more consistent, "$@".
7641
7642 2006-09-06  Bruno Haible  <bruno@clisp.org>
7643
7644         * modules/striconv: New file.
7645         * modules/xstriconv: New file.
7646         * MODULES.html.sh (Internationalization functions): Add striconv,
7647         xstriconv.
7648
7649 2006-09-06  Bruno Haible  <bruno@clisp.org>
7650
7651         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
7652         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
7653         not using libtool correctly.
7654
7655 2006-09-06  Bruno Haible  <bruno@clisp.org>
7656
7657         * lib/striconv.h: New file.
7658         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
7659         iconvstring.c.
7660         * lib/xstriconv.h: New file.
7661         * lib/xstriconv.c: New file.
7662
7663 2006-09-06  Bruno Haible  <bruno@clisp.org>
7664
7665         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
7666         lib_..._LDFLAGS.
7667
7668 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7669
7670         * lib/argz_.h: Sync from Libtool.
7671
7672         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
7673                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7674
7675         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
7676
7677 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
7678
7679         * modules/trim: New file.
7680
7681 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
7682
7683         * lib/trim.h: New file.
7684         * lib/trim.c: New file.
7685
7686 2006-09-05  Bruno Haible  <bruno@clisp.org>
7687
7688         * MODULES.html.sh (String handling): Add trim.
7689
7690 2006-09-04  Karl Berry  <karl@gnu.org>
7691
7692         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
7693         until next release.
7694
7695 2006-09-03  Bruno Haible  <bruno@clisp.org>
7696
7697         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
7698         correctly.
7699
7700 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7701
7702         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
7703         not gl_GETLOADAVG.  Omit unneeded semicolons.
7704         Problems reported by Ralf Wildenhues in
7705         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
7706         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
7707         at the end, which is the usual gnulib style.
7708
7709         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
7710         of doing all the work ourselves.
7711         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
7712         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
7713
7714 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7715
7716         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
7717         Problem reported by Ralf Wildenhues in
7718         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
7719
7720         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
7721         HAVE_STRUCT_STATFS_F_FSTYPENAME.
7722
7723 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7724
7725         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
7726         yesterday's patch by changing test -n to test -z.
7727
7728 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7729
7730         * modules/getloadavg (Files): Add m4/getloadavg.m4.
7731         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
7732         the former is now obsolescent.
7733
7734         * modules/chdir-long (Depends-on): Add fcntl.
7735
7736 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7737
7738         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
7739         obsolescent, and programs should use gnulib instead.
7740         * m4/getloadavg.m4: New file, with contents taken from Autoconf
7741         but with prefixes changed.
7742
7743 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7744
7745         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
7746         or stdbool.h, because they might not exist while configuring.
7747
7748         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
7749         Don't include unistd.h or limits.h; not needed, since chdir-long.h
7750         does that for us.
7751         (O_DIRECTORY): Remove.
7752
7753 2006-08-31  Eric Blake  <ebb9@byu.net>
7754
7755         * gnulib-tool: Don't let emacs change spaces to TAB.
7756
7757 2006-08-31  Bruno Haible  <bruno@clisp.org>
7758
7759         * gnulib-tool: When calling func_import more than once, do it in a
7760         subshell.
7761         Reported by Eric Blake <ebb9@byu.net>.
7762
7763 2006-08-31  Bruno Haible  <bruno@clisp.org>
7764
7765         * gnulib-tool (nl): Remove variable.
7766         (sed_transform_lib_file): Use more robust test for config-h module.
7767         (func_import): Fix typo in 2006-08-25 patch.
7768
7769 2006-08-31  Bruno Haible  <bruno@clisp.org>
7770
7771         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
7772         specified, augment Makefile.am variables instead of assigning them.
7773
7774 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7775
7776         Work around a bug in both the Linux and SunOS 64-bit kernels:
7777         nanosleep mishandles sleeps for longer than 2**31 seconds.
7778         Problem reported by Frank v Waveren in
7779         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
7780         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
7781         Check for nanosleep bug.
7782         (LIB_NANOSLEEP): Append clock_gettime library if needed.
7783
7784 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7785
7786         Work around a bug in both the Linux and SunOS 64-bit kernels:
7787         nanosleep mishandles sleeps for longer than 2**31 seconds.
7788         Problem reported by Frank v Waveren in
7789         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
7790         * lib/nanosleep.c (BILLION): New constant.
7791         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
7792         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
7793         implementation.
7794
7795 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7796
7797         * modules/nanosleep (Depends-on): Add gettime.
7798
7799 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7800         and Simon Josefsson  <jas@extundo.com>
7801         and Oskar Liljeblad  <oskar@osk.mine.nu>
7802
7803         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
7804         * gnulib-tool (func_import): New license type 'unmodifiable license
7805         text'.
7806         * modules/fdl: Use it.  Longer description.
7807         * module/gpl, module/lgpl: New files.
7808
7809 2006-08-30  Jim Meyering  <jim@meyering.net>
7810
7811         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
7812         shadowing the parameter.
7813
7814 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7815
7816         Sync from Libtool:
7817
7818         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7819
7820         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
7821         sharing with gnulib.  Report by Eric Blake.
7822
7823 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7824
7825         * modules/isapipe: New file.
7826         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
7827
7828 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7829
7830         * modules/configmake (Makefile.am): Add a comment, and omit
7831         the CONFIGMAKE_ prefix from generated macro names.  Suggested
7832         by Bruno Haible.
7833
7834 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7835
7836         * m4/isapipe.m4: New file.
7837
7838 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7839
7840         * lib/isapipe.c, lib/isapipe.h: New files.
7841
7842 2006-08-29  Jim Meyering  <jim@meyering.net>
7843
7844         * modules/configmake (Makefile.am): Make configmake.h depend on
7845         Makefile.  Otherwise, a stale configmake.h could hang around.
7846
7847 2006-08-29  Eric Blake  <ebb9@byu.net>
7848
7849         * lib/error.c (error_at_line, print_errno_message): Match libc, after
7850         resolution of upstream bug 3044.
7851
7852 2006-08-29  Bruno Haible  <bruno@clisp.org>
7853
7854         * modules/localcharset (Depends-on): Add configmake.
7855         (Makefile.am): Remove setting of LIBDIR through DEFS.
7856
7857 2006-08-29  Bruno Haible  <bruno@clisp.org>
7858
7859         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
7860         defined.
7861
7862 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7863
7864         * modules/fcntl: New file.
7865         * modules/chdir-safer (Depends-on): Add fcntl.
7866         * modules/fts: Likewise.
7867         * modules/mkdir-p: Likewise.
7868
7869         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
7870         This undoes the most recent change, since we're now addressing the
7871         problem in a different way.
7872
7873         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
7874         into output, since the output might be called Makefile.am even
7875         if $makefile_name is something different.
7876         (func_import): Use $makefile_am rather than
7877         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
7878         empty.
7879
7880         * modules/inttypes (Files): Add m4/inttypes-h.m4.
7881
7882 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7883
7884         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
7885         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
7886         recent change to stdint.m4, since we're now addressing the problem in a
7887         different way.
7888
7889 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7890
7891         * m4/fcntl_h.m4: New file.
7892
7893 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7894
7895         * lib/fcntl_.h: New file.
7896         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
7897         the fcntl module.
7898         * lib/dirchownmod.c: Likewise.
7899         * lib/fts.c: Likewise.
7900
7901         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
7902         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
7903         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
7904         just before including <inttypes.h>, to avoid circular inclusion.
7905
7906 2006-08-28  Jim Meyering  <jim@meyering.net>
7907
7908         * doc/visibility.texi: Actually read and correct the grammar of the
7909         sentence affected by yesterday's change.
7910
7911 2006-08-28  Eric Blake  <ebb9@byu.net>
7912
7913         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
7914         needs wrapper.
7915
7916 2006-08-28  Eric Blake  <ebb9@byu.net>
7917
7918         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
7919
7920 2006-08-28  Eric Blake  <ebb9@byu.net>
7921
7922         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
7923
7924 2006-08-28  Bruno Haible  <bruno@clisp.org>
7925
7926         * modules/c-strstr: New file, from GNU gettext.
7927         * MODULES.html.sh (String handling): Add c-strstr.
7928
7929 2006-08-28  Bruno Haible  <bruno@clisp.org>
7930
7931         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
7932         macros.
7933         Reported by Eric Blake.
7934
7935 2006-08-28  Bruno Haible  <bruno@clisp.org>
7936
7937         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
7938         (VASNPRINTF): Return a string of length > INT_MAX without failing.
7939         * lib/vasprintf.c: Include errno.h, limits.h.
7940         (EOVERFLOW): New fallback definition.
7941         (vasprintf): Test here whether the string length is > INT_MAX.
7942         * lib/vsnprintf.c: Include errno.h, limits.h.
7943         (EOVERFLOW): New fallback definition.
7944         (vsnprintf): Fix bug when generated string was too long for the buffer.
7945         Test here whether the string length is > INT_MAX.
7946
7947 2006-08-28  Bruno Haible  <bruno@clisp.org>
7948
7949         * lib/inttypes_.h (SCNX*): Remove definitions.
7950         Reported by Eric Blake.
7951
7952 2006-08-28  Bruno Haible  <bruno@clisp.org>
7953
7954         * lib/c-strstr.h: New file, from GNU gettext.
7955         * lib/c-strstr.c: New file, from GNU gettext.
7956
7957 2006-08-28  Bruno Haible  <bruno@clisp.org>
7958
7959         * gnulib-tool: Reorder some statements.
7960
7961 2006-08-28  Bruno Haible  <bruno@clisp.org>
7962
7963         * gnulib-tool: New option --makefile-name.
7964         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
7965         $makefile_name.
7966         (func_import): Write $makefile_name to the cache file, and read it from
7967         there unless explicitly specified. Use $makefile_name as file name
7968         instead of Makefile.am. Adjust the recommendations accordingly.
7969
7970 2006-08-28  Bruno Haible  <bruno@clisp.org>
7971
7972         * gnulib-tool (func_verify_module): Check against misapplying patch.
7973
7974 2006-08-28  Bruno Haible  <bruno@clisp.org>
7975
7976         * gnulib-tool (func_relativize, func_relconcat): New functions.
7977         Give an error if --local-dir is given with --update.
7978         Remove trailing slashes from $local_gnulib_dir.
7979         (func_import): Store the relativized $local_gnulib_dir in
7980         gnulib-cache.m4, and read it from there if not specified explicitly.
7981
7982 2006-08-28  Bruno Haible  <bruno@clisp.org>
7983
7984         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
7985         is the current directory. Respect also $local_gnulib_dir.
7986
7987 2006-08-28  Bruno Haible  <bruno@clisp.org>
7988             Simon Josefsson  <jas@extundo.com>
7989
7990         BeOS portability.
7991         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
7992
7993 2006-08-27  Jim Meyering  <jim@meyering.net>
7994
7995         * doc/visibility.texi: Remove duplicate word: "pointer".
7996
7997 2006-08-26  Bruno Haible  <bruno@clisp.org>
7998
7999         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
8000         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
8001         (Makefile.am): Create inttypes.h from inttypes_.h.
8002         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
8003
8004         * modules/imaxabs: New file.
8005
8006         * modules/imaxdiv: New file.
8007
8008 2006-08-26  Bruno Haible  <bruno@clisp.org>
8009
8010         * m4/inttypes.m4: New file.
8011         * m4/_inttypes_h.m4: Remove file.
8012         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
8013         PRI_MACROS_BROKEN.
8014         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
8015
8016         * m4/imaxabs.m4: New file.
8017
8018         * m4/imaxdiv.m4: New file.
8019
8020 2006-08-26  Bruno Haible  <bruno@clisp.org>
8021
8022         * lib/inttypes_.h: New file.
8023         * lib/inttypes.h: Remove file.
8024         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
8025
8026         * lib/imaxabs.c: New file.
8027
8028         * lib/imaxdiv.c: New file.
8029
8030 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8031
8032         New config-h module, so that "make" output needn't be cluttered
8033         by -DHAVE_CONFIG_H.
8034         * MODULES.html.sh (Support for building libraries and executables):
8035         Add config-h.
8036         * modules/config-h: New file.
8037         * gnulib-tool (nl, sed_transform_lib_file): New vars.
8038         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
8039         the config-h module is used.
8040
8041         New configmake module, so that "make" output needn't be cluttered
8042         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
8043         * MODULES.html.sh (Support for building libraries and executables):
8044         Add configmake.
8045         * modules/configmake: New file.
8046
8047 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8048
8049         * m4/config-h.m4: New file.
8050
8051 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8052
8053         * config/srclist.txt: Add elisp-comp.
8054
8055 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8056
8057         * MODULES.html.sh (Support for building libraries and executables):
8058         Add elisp-comp.
8059         * build-aux/elisp-comp: New file.
8060         * modules/elisp-comp: New file.
8061
8062 2006-08-24  Bruno Haible  <bruno@clisp.org>
8063
8064         * gnulib-tool (func_create_testdir): Use non-default values of
8065         sourcebase and m4base.
8066
8067 2006-08-24  Bruno Haible  <bruno@clisp.org>
8068
8069         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
8070         HTML structure.
8071
8072 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
8073
8074         * modules/openat (Depends-on): Add lchown.
8075
8076 2006-08-23  Bruno Haible  <bruno@clisp.org>
8077
8078         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
8079         of gl_LOCK_EARLY instead of gl_LOCK.
8080
8081 2006-08-23  Bruno Haible  <bruno@clisp.org>
8082
8083         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
8084         on OSF/1 to no.
8085         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
8086
8087 2006-08-23  Bruno Haible  <bruno@clisp.org>
8088
8089         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
8090         as unusable.
8091
8092         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
8093         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
8094         (gl_LOCK): New macro.
8095
8096 2006-08-22  Simon Josefsson  <jas@extundo.com>
8097
8098         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
8099         to md5 module.
8100
8101 2006-08-22  Simon Josefsson  <jas@extundo.com>
8102
8103         * MODULES.html.sh: Add "Support for maintaining and release
8104         projects".
8105
8106         * build-aux/gnupload: New file, from coreutils.
8107
8108 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8109
8110         Avoid the need for AC_LIBSOURCES in m4 macros.
8111         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
8112         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
8113         * modules/check-version (EXTRA_DIST): Add check-version.h.
8114         * modules/crc (EXTRA_DIST): Add crc.h.
8115         * modules/des (EXTRA_DIST): Add des.h.
8116         * modules/gc (EXTRA_DIST): Add gc.h.
8117         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
8118         * modules/getline (EXTRA_DIST): Add getline.h.
8119         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
8120         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
8121         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
8122         * modules/md2 (EXTRA_DIST): Add md2.h.
8123         * modules/md4 (EXTRA_DIST): Add md4.h.
8124         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
8125         * modules/read-file (EXTRA_DIST): Add read-file.h.
8126         * modules/readline (EXTRA_DIST): Add readline.h.
8127         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
8128         rijndael-api-fst.h.
8129
8130 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8131
8132         * m4/rijndael.m4 (gl_ARCFOUR):
8133         * m4/arctwo.m4 (gl_ARCTWO):
8134         * m4/check-version.m4 (gl_CHECK_VERSION):
8135         * m4/crc.m4 (gl_CRC):
8136         * m4/des.m4 (gl_DES):
8137         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
8138         * m4/gc.m4 (gl_GC):
8139         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
8140         * m4/getline.m4 (gl_FUNC_GETLINE):
8141         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
8142         * m4/hmac-md5.m4 (gl_HMAC_MD5):
8143         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
8144         * m4/md2.m4 (gl_MD2):
8145         * m4/md4.m4 (gl_MD4):
8146         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
8147         * m4/read-file.m4 (gl_FUNC_READ_FILE):
8148         * m4/readline.m4 (gl_FUNC_READLINE):
8149         * m4/rijndael.m4 (gl_RIJNDAEL):
8150         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
8151         to get the necessary .h files and whatnot.
8152
8153 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8154
8155         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
8156         gnulib rather than the other way around.
8157         * config/srclistvars.sh (COREUTILS): Remove.
8158
8159 2006-08-22  Jim Meyering  <jim@meyering.net>
8160
8161         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
8162
8163         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
8164
8165 2006-08-22  Eric Blake  <ebb9@byu.net>
8166
8167         * modules/regexprops-generic: New file.
8168         * MODULES.html.sh (Support for building documentation): List it.
8169
8170 2006-08-22  Eric Blake  <ebb9@byu.net>
8171
8172         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
8173         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
8174         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
8175         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
8176
8177 2006-08-22  Bruno Haible  <bruno@clisp.org>
8178
8179         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
8180         and lib_LTLIBRARIES like the other lib_* variables.
8181
8182 2006-08-22  Bruno Haible  <bruno@clisp.org>
8183
8184         * build-aux/x-to-1.in: New file, from GNU gettext.
8185
8186 2006-08-22  Bruno Haible  <bruno@clisp.org>
8187
8188         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
8189         <utmpx.h> exists.
8190
8191 2006-08-22  Bruno Haible  <bruno@clisp.org>
8192
8193         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
8194         <utmpx.h> exists.
8195
8196 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8197
8198         BeOS portability.
8199         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
8200         exist.
8201         Problem reported by Bruno Haible.
8202
8203 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8204
8205         Avoid the need for AC_LIBSOURCES in m4 macros.
8206         * modules/acl (EXTRA_DIST): Add acl.h.
8207         * modules/argmatch (Files): Add m4/argmatch.m4.
8208         (configure.ac): Add gl_ARGMATCH.
8209         (EXTRA_DIST): Renamed from lib_SOURCES, for
8210         consistency with the other modules.  Remove argmatch.c.
8211         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
8212         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
8213         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
8214         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
8215         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
8216         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
8217         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
8218         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
8219         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
8220         * modules/closeout (EXTRA_DIST): Add closeout.h.
8221         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
8222         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
8223         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
8224         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
8225         dirname.h; remove basename.c and stripslash.c.
8226         * modules/exclude (EXTRA_DIST): Add exclude.h.
8227         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
8228         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
8229         * modules/file-type (EXTRA_DIST): Add file-type.h.
8230         * modules/filemode (EXTRA_DIST): Add filemode.h.
8231         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
8232         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
8233         * modules/fpending (EXTRA_DIST): Add __fpending.h.
8234         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
8235         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
8236         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
8237         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
8238         * modules/getdate (EXTRA_DIST): Add getdate.c.
8239         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
8240         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
8241         * modules/getpass (EXTRA_DIST): Add getpass.h.
8242         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
8243         * modules/group-member (EXTRA_DIST): Add group-member.h.
8244         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
8245         * modules/hash (EXTRA_DIST): Add hash.h.
8246         * modules/human (EXTRA_DIST): Add human.h.
8247         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
8248         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
8249         * modules/lchown (EXTRA_DIST): Add lchown.h.
8250         * modules/long-options (EXTRA_DIST): Add long-options.h.
8251         * modules/lstat (EXTRA_DIST): Add lstat.h.
8252         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
8253         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
8254         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
8255         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
8256         * modules/memxor (EXTRA_DIST): Add memxor.h.
8257         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
8258         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
8259         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
8260         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
8261         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
8262         * modules/physmem (EXTRA_DIST): Add physmem.h.
8263         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
8264         * modules/posixver (EXTRA_DIST): Add posixver.h.
8265         * modules/quote (EXTRA_DIST): Add quote.h.
8266         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
8267         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
8268         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
8269         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
8270         regex_internal.h regexec.c.
8271         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
8272         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
8273         * modules/same (EXTRA_DIST): Add same.h.
8274         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
8275         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
8276         * modules/savedir (EXTRA_DIST): Add savedir.h.
8277         * modules/sha1 (EXTRA_DIST): Add sha1.h.
8278         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
8279         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
8280         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
8281         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
8282         * modules/strdup (EXTRA_DIST): Add strdup.h.
8283         * modules/strftime (EXTRA_DIST): Add strftime.h.
8284         * modules/strndup (EXTRA_DIST): Add strndup.h.
8285         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
8286         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
8287         * modules/time_r (EXTRA_DIST): Add time_r.h.
8288         * modules/timespec (EXTRA_DIST): Add timespec.h.
8289         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
8290         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
8291         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
8292         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
8293         * modules/userspec (EXTRA_DIST): Add userspec.h.
8294         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
8295         * modules/utimens (EXTRA_DIST): Add utimens.h.
8296         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
8297         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
8298         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
8299         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
8300         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
8301         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
8302         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
8303         * modules/yesno (EXTRA_DIST): Add yesno.h.
8304
8305 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8306
8307         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
8308
8309         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
8310         * m4/dev-ino.m4, same-inode.m4: Remove.
8311
8312         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
8313         * m4/acl.m4 (AC_FUNC_ACL):
8314         * m4/backupfile.m4 (gl_BACKUPFILE):
8315         * m4/c-strtod.m4 (gl_C99_STRTOLD):
8316         * m4/canon-host.m4 (gl_CANON_HOST):
8317         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
8318         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
8319         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
8320         * m4/cloexec.m4 (gl_CLOEXEC):
8321         * m4/close-stream.m4 (gl_CLOSE_STREAM):
8322         * m4/closeout.m4 (gl_CLOSEOUT):
8323         * m4/dirfd.m4 (gl_FUNC_DIRFD):
8324         * m4/dirname.m4 (gl_DIRNAME):
8325         * m4/exclude.m4 (gl_EXCLUDE):
8326         * m4/exitfail.m4 (gl_EXITFAIL):
8327         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
8328         * m4/file-type.m4 (gl_FILE_TYPE):
8329         * m4/filemode.m4 (gl_FILEMODE):
8330         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
8331         * m4/fpending.m4 (gl_FUNC_FPENDING):
8332         * m4/fprintftime.m4 (gl_FPRINTFTIME):
8333         * m4/fts.m4 (gl_FUNC_FTS):
8334         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
8335         * m4/getdate.m4 (gl_GETDATE):
8336         * m4/gethrxtime.m4 (gl_GETHRXTIME):
8337         * m4/getpagesize.m4 (gl_GETPAGESIZE):
8338         * m4/getpass.m4 (gl_FUNC_GETPASS):
8339         * m4/gettime.m4 (gl_GETTIME):
8340         * m4/getugroups.m4 (gl_GETUGROUPS):
8341         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
8342         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
8343         * m4/hard-locale.m4 (gl_HARD_LOCALE):
8344         * m4/hash.m4 (gl_HASH):
8345         * m4/idcache.m4 (gl_IDCACHE):
8346         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
8347         * m4/lchown.m4 (gl_FUNC_LCHOWN):
8348         * m4/long-options.m4 (gl_LONG_OPTIONS):
8349         * m4/lstat.m4 (gl_FUNC_LSTAT):
8350         * m4/md5.m4 (gl_MD5):
8351         * m4/memcasecmp.m4 (gl_MEMCASECMP):
8352         * m4/memcoll.m4 (gl_MEMCOLL):
8353         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
8354         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
8355         * m4/memxor.m4 (gl_MEMXOR):
8356         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
8357         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
8358         * m4/modechange.m4 (gl_MODECHANGE):
8359         * m4/mountlist.m4 (gl_MOUNTLIST):
8360         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
8361         * m4/openat.m4 (gl_FUNC_OPENAT):
8362         * m4/pathmax.m4 (gl_PATHMAX):
8363         * m4/physmem.m4 (gl_PHYSMEM):
8364         * m4/posixtm.m4 (gl_POSIXTM):
8365         * m4/posixver.m4 (gl_POSIXVER):
8366         * m4/quote.m4 (gl_QUOTE):
8367         * m4/quotearg.m4 (gl_QUOTEARG):
8368         * m4/readtokens.m4 (gl_READTOKENS):
8369         * m4/readutmp.m4 (gl_READUTMP):
8370         * m4/regex.m4 (gl_REGEX):
8371         * m4/safe-read.m4 (gl_SAFE_READ):
8372         * m4/safe-write.m4 (gl_SAFE_WRITE):
8373         * m4/same.m4 (gl_SAME):
8374         * m4/save-cwd.m4 (gl_SAVE_CWD):
8375         * m4/savedir.m4 (gl_SAVEDIR):
8376         * m4/settime.m4 (gl_SETTIME):
8377         * m4/sha1.m4 (gl_SHA1):
8378         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
8379         * m4/stat-macros.m4 (gl_STAT_MACROS):
8380         * m4/stat-time.m4 (gl_STAT_TIME):
8381         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
8382         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
8383         * m4/strdup.m4 (gl_FUNC_STRDUP):
8384         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
8385         * m4/strndup.m4 (gl_FUNC_STRNDUP):
8386         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
8387         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
8388         * m4/time_r.m4 (gl_TIME_R):
8389         * m4/timespec.m4 (gl_TIMESPEC):
8390         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
8391         * m4/unlinkdir.m4 (gl_UNLINKDIR):
8392         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
8393         * m4/userspec.m4 (gl_USERSPEC):
8394         * m4/utimecmp.m4 (gl_UTIMECMP):
8395         * m4/utimens.m4 (gl_UTIMENS):
8396         * m4/xalloc.m4 (gl_XALLOC):
8397         * m4/xgetcwd.m4 (gl_XGETCWD):
8398         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
8399         * m4/xreadlink.m4 (gl_XREADLINK):
8400         * m4/xstrtod.m4 (gl_XSTRTOD):
8401         * m4/yesno.m4 (gl_YESNO):
8402         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
8403         to get the necessary .h files and whatnot.
8404
8405 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
8406             Bruno Haible  <bruno@clisp.org>
8407
8408         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
8409         /bin/sh understanding of '!' conditional negation.
8410
8411 2006-08-21  Jim Meyering  <jim@meyering.net>
8412
8413         * modules/openat (Depends-on): Really alphabetize.
8414
8415         * modules/acl (Depends-on): Add error and quote.
8416
8417         * check-module (find_included_lib_files): Add at-func.c to the
8418         ok-to-include-more-than-once white list.
8419
8420         * modules/openat (Depends-on): Add lstat.  Alphabetize.
8421
8422 2006-08-21  Bruno Haible  <bruno@clisp.org>
8423
8424         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8425         Emit a pkgdata_DATA variable only if some snippets add contents to it.
8426         Reported by Martin Lambers <marlam@marlam.de>.
8427
8428 2006-08-21  Bruno Haible  <bruno@clisp.org>
8429
8430         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
8431         specify an installation location, don't emit a noinst_LIBRARIES or
8432         noinst_LTLIBRARIES assignment.
8433
8434 2006-08-21  Bruno Haible  <bruno@clisp.org>
8435
8436         BeOS portability.
8437         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
8438         BeOS has mbrtowc() but no <wctype.h>.
8439
8440 2006-08-21  Bruno Haible  <bruno@clisp.org>
8441
8442         BeOS portability.
8443         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
8444         exist.
8445
8446 2006-08-21  Bruno Haible  <bruno@clisp.org>
8447
8448         BeOS portability.
8449         * lib/mbchar.h: Include <wctype.h> only if it exists.
8450
8451 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8452
8453         Remove files that are no longer needed by their respective modules.
8454         * m4/obstack.m4: Remove.
8455         * m4/strerror_r.m4: Remove.
8456         * m4/uint32_t.m4: Remove.
8457         * m4/uintptr_t.m4: Remove.
8458         * m4/ullong_max.m4: Remove.
8459         * m4/xstrtoimax.m4: Remove.
8460         * m4/xstrtoumax.m4: Remove.
8461
8462         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
8463         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
8464         dependencies now capture this.
8465
8466         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
8467         Do not use AC_LIBSOURCES, since gnulib modules now do this.
8468         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
8469         * m4/human.m4 (gl_HUMAN): Likewise.
8470         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
8471         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
8472
8473         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
8474
8475         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
8476         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
8477         stdint.
8478         * m4/human.m4 (gl_HUMAN): Likewise.
8479         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
8480         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
8481         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
8482         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
8483         * m4/xstrtol (gl_XSTRTOL): Likewise.
8484
8485         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
8486         AC_TYPE_LONG_LONG_INT.
8487         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
8488         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
8489         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
8490         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
8491
8492         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
8493         on stdbool.
8494
8495         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
8496         (gl_PREREQ_XSTRTOUL): Remove.
8497
8498         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
8499
8500         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
8501         mode.
8502
8503 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8504
8505         Add and change modules to make it easier for coreutils to use
8506         gnulib-tool.
8507         * modules/backupfile (Files): Remove m4/d-ino.m4.
8508         (Depends-on): Add d-ino.
8509         * modules/cycle-check (Depends-on): Add stdint.
8510         (lib_SOURCES): Add cycle-check.h.
8511         * modules/d-ino: New module.
8512         * modules/d-type: New module.
8513         * modules/error (Files): Remove m4/strerror_r.m4.
8514         * modules/filemode (Files): Add m4/st_dm_mode.m4.
8515         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
8516         m4/inttypes_h.m4, m4/uintmax_t.m4.
8517         (Depends-on): Add stdint.
8518         (lib_SOURCES): Add fsusage.h.
8519         * modules/getcwd (Files): Remove d-ino.m4.
8520         (Depends-on): Add d-ino.
8521         * modules/getndelim2 (Depends-on): Add stdint.
8522         * modules/glob (Files): Remove m4/d-type.m4.
8523         (Depends-on): Add d-type.
8524         * modules/host-os: New module.
8525         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
8526         m4/inttypes_h.m4, m4/uintmax_t.m4.
8527         * Depends-on: Add stdint.
8528         (lib_SOURCES): Add human.h.
8529         * modules/inttostr (Files): Remove m4/intmax_t.m4,
8530         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
8531         m4/uintmax_t.m4, m4/ulonglong.m4.
8532         (Depends-on): Add stdint.
8533         (EXTRA_DIST): Add inttostr.h.
8534         * modules/lchmod: New module.
8535         * modules/link-follow: New module.
8536         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
8537         (Depends-on): Add lchmod.
8538         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
8539         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
8540         (Depends-on): Add stdint.
8541         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
8542         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8543         (Depends-on): Add stdint.
8544         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
8545         * modules/perl: New module.
8546         * modules/regex (Depends-on): Add stdint.
8547         * modules/rmdir-errno: New module.
8548         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
8549         m4/intmax_t.m4.
8550         (Depends-on): Add stdint.
8551         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
8552         m4/uintmax_t.m4.
8553         (Depends-on): Add stdint.
8554         * modules/unlink-busy: New module.
8555         * modules/utimecmp (Depends-on): Add stdint.
8556         * modules/uptime: New module.
8557         * modules/winsz-ioctl: New module.
8558         * modules/winsz-termios: New module.
8559         * modules/xnanosleep (Depends-on): Add nanosleep.
8560         * modules/ullong_max: Remove.
8561         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
8562         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
8563         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
8564         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
8565         (Depends-on): Add inttypes.
8566         (lib_SOURCES): Add xstrtol.h.
8567         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
8568         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
8569         * MODULES.html.sh: Move 'assert' into the assert section.
8570         Move 'dummy' into the linking section.
8571         Remove ullong_max.
8572         Add section for compatibility checks for POSIX:2001 functions,
8573         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
8574         winsz-ioctl, and winsz-termios into it.
8575         Add lchmod.
8576         Add top-level Misc section and put host-os, perl, and uptime
8577         into it.
8578
8579 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8580
8581         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
8582         now assume the stdint module.  Do not include inttypes.h.
8583         * lib/fsusage.h: Likewise.
8584         * lib/getndelim2.c: Likewise.
8585         * lib/human.h: Likewise.
8586         * lib/inttostr.h: Likewise.
8587         * lib/obstack.c: Likewise.
8588         * lib/regex_internal.h: Likewise.
8589         * lib/tempname.c: Likewise.
8590         * lib/utimecmp.c: Likewise.
8591         * lib/xstrtol.h: Likewise.
8592
8593         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
8594
8595         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
8596         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
8597         * lib/xtime.h: Likewise.
8598
8599 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
8600
8601         * modules/openat (Files): Add lib/fchmodat.c.
8602         Fixes problem reported by Jay Youngman.
8603
8604 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
8605
8606         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
8607         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
8608
8609 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
8610             Bruno Haible  <bruno@clisp.org>
8611
8612         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
8613         and is a script that invokes bison. Tighten the code. Add comments.
8614
8615 2006-08-18  Jim Meyering  <jim@meyering.net>
8616
8617         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
8618         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
8619         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
8620         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
8621
8622 2006-08-18  Bruno Haible  <bruno@clisp.org>
8623
8624         * modules/bison-i18n: New file.
8625         * MODULES.html.sh (Internationalization functions): Add it.
8626
8627 2006-08-18  Bruno Haible  <bruno@clisp.org>
8628
8629         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
8630         sys/statvfs.h. When getmntinfo was found, check its declaration and
8631         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
8632
8633 2006-08-18  Bruno Haible  <bruno@clisp.org>
8634
8635         * m4/bison-i18n.m4: New file, from bison.
8636
8637 2006-08-18  Bruno Haible  <bruno@clisp.org>
8638
8639         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
8640         (ME_DUMMY): Treat "kernfs" as a dummy.
8641         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
8642
8643 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
8644
8645         Update from coreutils.
8646
8647         2006-08-15  Jim Meyering  <jim@meyering.net>
8648
8649         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
8650
8651         2006-01-17  Jim Meyering  <jim@meyering.net>
8652
8653         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
8654
8655         2006-01-11  Jim Meyering  <jim@meyering.net>
8656
8657         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
8658         Check for the lchmod function.
8659
8660 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
8661
8662         Update from coreutils.
8663
8664         * lib/__fpending.h: Add copyright notice.
8665         * lib/fprintftime.h: Likewise.
8666         * lib/savedir.c: Use (C) in copyright notice.
8667         * lib/savedir.h: Likewise.
8668
8669         2006-08-15  Jim Meyering  <jim@meyering.net>
8670
8671         * lib/at-func.c: New file, with the logic of all emulated at-functions.
8672         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
8673         in support of the EXPECTED_ERRNO macro.
8674         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
8675         definitions.  Instead, define the appropriate symbols and include
8676         "at-func.c".
8677         * lib/mkdirat.c (mkdirat): Likewise.
8678         * lib/fchmodat.c (fchmodat): Likewise.
8679         (ENOSYS): Remove definition.
8680         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
8681         it.  Don't include "unistd--.h" -- it wasn't ever used.
8682
8683         2006-01-17  Jim Meyering  <jim@meyering.net>
8684
8685         Rewrite fts.c not to change the current working directory,
8686         by using openat, fstatat, fdopendir, etc..
8687
8688         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
8689         (HAVE_OPENAT_SUPPORT): Define.
8690         [_LIBC] (fchdir): Don't undef or define; no longer used.
8691         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
8692         Now, this `function' always succeeds, and consumes its file descriptor
8693         parameter -- so callers must not close such FDs.  Update callers.
8694         (diropen_fd, opendirat, cwd_advance_fd): New functions.
8695         (diropen): Add parameter, SP.  Adjust all callers.
8696         Implement using diropen_fd, rather than open.
8697         (fts_open): Initialize new member, fts_cwd_fd.
8698         Remove fts_rft-setting code.
8699         (fts_close): Close fts_cwd_fd, if necessary.
8700         (__opendir2): Define in terms of opendir or opendirat,
8701         depending on whether the FST_NOCHDIR flag is set.
8702         (fts_build): Since fts_safe_changedir consumes its FD, and since
8703         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
8704         and close the dup'd file descriptor upon failure.
8705         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
8706         (fts_safe_changedir): Tweak semantics to reflect that this function
8707         now calls cwd_advance_fd and hence consumes its FD argument.
8708         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
8709         [struct FTS] (fts_rft): Remove now-unused member.
8710         [struct FTS] (fts_cycle.state): Improve comment.
8711
8712         * lib/openat.c (openat_needs_fchdir): New function.
8713         * lib/openat.h (openat_needs_fchdir): Declare it.
8714
8715 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
8716
8717         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
8718         Problem and fix reported by Pádraig Brady in
8719         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
8720
8721 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8722
8723         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
8724
8725 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8726
8727         * lib/memcoll.c (memcoll): Optimize for the common case where the
8728         arguments are bytewise equal.
8729
8730 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8731
8732         * doc/regexprops-generic.texi: Add a copyright notice.
8733
8734 2006-08-15  Bruno Haible  <bruno@clisp.org>
8735
8736         * modules/tmpdir (License): Change to LGPL.
8737
8738 2006-08-15  Bruno Haible  <bruno@clisp.org>
8739
8740         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
8741         module.
8742
8743 2006-08-14  Simon Josefsson  <jas@extundo.com>
8744
8745         * config/srclist.txt: Add gnupload.
8746
8747 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8748
8749         Change copyright notice from LGPL 2 to GPL 2, since that's the
8750         standard form used in the gnulib repository.
8751         * tests/test-lock.c: Likewise.
8752         * tests/test-stdint.c: Likewise.
8753         * tests/test-tls.c: Likewise.
8754
8755         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
8756         prelude-manager.  User shorter URLs for GNU projects, without '?'.
8757         Add copyright notice.
8758
8759         * check-module: Add copyright notice.  Output a copyright
8760         notice if "--version" is specified.
8761         * modules/COPYING: New file.
8762         * tests/test-getaddrinfo.c: Add copyright notice.
8763         * tests/test-verify.c: Likewise.
8764
8765 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8766
8767         Change copyright notice from LGPL 2 to GPL 2, since that's the
8768         standard form used in the gnulib repository.
8769         * lib/lock.c: LGPL -> GPL.
8770         * lib/lock.h: Likewise.
8771         * lib/strnlen1.c: Likewise.
8772         * lib/strnlen1.h: Likewise.
8773         * lib/tls.c: Likewise.
8774         * lib/tls.h: Likewise.
8775         * lib/tmpdir.c: Likewise.
8776
8777         * lib/TODO: Remove; this belongs only in coreutils.
8778
8779 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8780
8781         Add copyright notices to long-enough files that lack them, since
8782         otherwise the files aren't clearly free.  Use the same notice that
8783         getdate.texi already uses.
8784         * doc/alloca-opt.texi: Add copyright notice.
8785         * doc/alloca.texi: Likewise.
8786         * doc/ctime.texi: Likewise.
8787         * doc/functions.texi: Likewise.
8788         * doc/gcd.texi: Likewise.
8789         * doc/gnulib-tool.texi: Likewise.
8790         * doc/inet_ntoa.texi: Likewise.
8791         * doc/visibility.texi: Likewise.
8792
8793         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
8794         * doc/quote.texi: Add copyright notice.
8795
8796         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
8797         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
8798         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
8799         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
8800         is now obsolete, and give a pointer to the Sun list.
8801         Add copyright notice.
8802
8803 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8804
8805         * config/srclistvars.sh: Add copyright notice.
8806
8807 2006-08-14  Eric Blake  <ebb9@byu.net>
8808
8809         Import the following change from libc:
8810
8811         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
8812
8813         Upstream bug 2997.
8814         * lib/misc/error.c: Add space between program name and message if file
8815         name is missing.
8816
8817 2006-08-12  Karl Berry  <karl@gnu.org>
8818
8819         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
8820         remove, these originate in gnulib now.
8821
8822 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8823
8824         * doc/Makefile (standards.info standards.html standards.dvi):
8825         Also depend on make-stds.texi.
8826
8827 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
8828
8829         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
8830         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
8831
8832         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
8833         in wchar_t.  Problem reported by Eric Blake.
8834
8835         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
8836         LEN is smaller than SIZE.  Suggested by Bruno Haible.
8837         Also, help the compiler to keep LEN in a register.
8838
8839 2006-08-11  Eric Blake  <ebb9@byu.net>
8840
8841         * users.txt: Sort.  Add tar.
8842
8843 2006-08-11  Bruno Haible  <bruno@clisp.org>
8844
8845         * users.txt: New file.
8846
8847 2006-08-11  Bruno Haible  <bruno@clisp.org>
8848
8849         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
8850         before <wchar.h>. Needed for OSF/1 and BSD/OS.
8851
8852 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
8853
8854         * modules/snprintf (Depends-on): Remove minmax.
8855         (Maintainer): Add self and Bruno.
8856
8857 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
8858
8859         * lib/.cppi-disable: Add snprintf.h, socket_.h.
8860         * lib/snprintf.c: Include <errno.h> and <limits.h>.
8861         (EOVERFLOW): Define if the system does not.
8862         Do not include "minmax.h"; it wasn't used.
8863         (snprintf): Don't assume size_t promotes to an unsigned type.
8864         Fix bug when generated string was too long for the buffer: the
8865         buffer's contents are supposed to be the initial prefix of the
8866         output.  Don't assume vasnprintf returns EOVERFLOW if the size
8867         exceeds INT_MAX; do the check ourselves.
8868
8869         Import the following changes from libc:
8870
8871         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
8872
8873         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
8874         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
8875         set wc to the byte which couldn't be converted.
8876         (re_string_reconstruct): Don't clear valid_raw_len before calling
8877         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
8878         tip_context using re_string_context_at.
8879
8880         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
8881
8882         * lib/posix/regex.h: g++ still cannot handled [restrict].
8883
8884         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
8885
8886         * lib/posix/regex.h: Remove special handling for VMS.
8887
8888 2006-08-10  Jim Meyering  <jim@meyering.net>
8889
8890         * modules/same-inode: New module.
8891         * modules/dev-ino: New module.
8892         * modules/cycle-check: Depend on these modules, rather than simply
8893         including their .h files.
8894         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
8895         required via m4/cycle-check.m4.
8896         * modules/same: Depend on new same-inode module, rather than
8897         including same-inode.h.
8898         * modules/chdir-safer: New file.
8899
8900         * modules/chown (Depends-on): Add stat-macros.
8901
8902 2006-08-10  Jim Meyering  <jim@meyering.net>
8903
8904         * m4/cycle-check.m4: New file.
8905         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
8906         * m4/dev-ino.m4, m4/same-inode.m4: New files.
8907
8908 2006-08-10  Eric Blake  <ebb9@byu.net>
8909
8910         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
8911         in from original proposal.
8912
8913 2006-08-10  Eric Blake  <ebb9@byu.net>
8914         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8915
8916         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
8917         namespace.
8918
8919 2006-08-10  Bruno Haible  <bruno@clisp.org>
8920
8921         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
8922         as well.
8923
8924 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8925
8926         Sync from coreutils.
8927
8928         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
8929
8930         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
8931         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
8932
8933 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8934
8935         * modules/restrict: Remove; no longer needed now that we assume
8936         Autoconf 2.59 or later.
8937         * MODULES.html.sh: Remove 'restrict'.
8938         * modules/argp (Depends-on): Remove 'restrict'.
8939         * modules/base64 (Depends-on): Likewise.
8940         * modules/gc (Depends-on): Likewise.
8941         * modules/getaddrinfo (Depends-on): Likewise.
8942         * modules/glob (Depends-on): Likewise.
8943         * modules/inet_ntop (Depends-on): Likewise.
8944         * modules/inet_pton (Depends-on): Likewise.
8945         * modules/memxor (Depends-on): Likewise.
8946         * modules/regex (Depends-on): Likewise.
8947         * modules/strtok_r (Depends-on): Likewise.
8948         * modules/time_r (Depends-on): Likewise.
8949
8950 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8951
8952         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
8953         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
8954         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8955         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
8956         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
8957         * m4/memxor.m4 (gl_MEMXOR): Likewise.
8958         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
8959         gl_C_RESTRICT replaced by AC_C_RESTRICT.
8960
8961         Merge from coreutils.
8962         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
8963         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
8964         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
8965         * m4/time_r.m4 (gl_TIME_R): Likewise.
8966
8967 2006-08-09  Karl Berry  <karl@gnu.org>
8968
8969         * config/srclist.txt: no more gettext-tools, per Bruno.
8970
8971 2006-08-08  Eric Blake  <ebb9@byu.net>
8972
8973         * modules/verror: New module.
8974         * MODULES.html.sh: Document it.
8975
8976 2006-08-08  Eric Blake  <ebb9@byu.net>
8977
8978         * lib/verror.h, lib/verror.c: New files.
8979
8980 2006-08-08  Eric Blake  <ebb9@byu.net>
8981
8982         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
8983         verror_at_line output complies with GNU Coding Standards even when
8984         file is NULL.
8985
8986 2006-08-07  Bruno Haible  <bruno@clisp.org>
8987
8988         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
8989         versions of AIX.
8990         Reported by Ralf Wildenhues.
8991
8992 2006-08-07  Bruno Haible  <bruno@clisp.org>
8993
8994         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
8995         in an AC_DEFUN. Needed so that the autoconf snippets can use
8996         AC_REQUIRE.
8997
8998 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8999
9000         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9001         Initialize pkgdata_DATA.
9002         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
9003         overriding it.
9004
9005 2006-08-06  Eric Blake  <ebb9@byu.net>
9006
9007         * lib/error.h: Fold in some upstream changes from glibc.
9008         * lib/error.c: Likewise.
9009
9010 2006-08-04  Bruno Haible  <bruno@clisp.org>
9011
9012         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9013         Make the mostlyclean-local rule depend on mostlyclean-generic.
9014         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
9015
9016 2006-07-31  Bruno Haible  <bruno@clisp.org>
9017
9018         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
9019         <stdlib.h>, <string.h>.
9020
9021 2006-07-30  Bruno Haible  <bruno@clisp.org>
9022
9023         * modules/readlink (License): Change to LGPL.
9024
9025 2006-07-30  Bruno Haible  <bruno@clisp.org>
9026
9027         * modules/javaversion (Makefile.am): Distribute javaversion.java and
9028         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
9029         set PKGDATADIR to point to it.
9030
9031 2006-07-30  Bruno Haible  <bruno@clisp.org>
9032
9033         * modules/csharpexec (configure.ac): Comment out macro invocation.
9034         * modules/javaexec (configure.ac): Likewise.
9035         * modules/javacomp-script (configure.ac): Likewise.
9036
9037         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
9038
9039 2006-07-30  Bruno Haible  <bruno@clisp.org>
9040
9041         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
9042         linked-list.
9043
9044 2006-07-30  Bruno Haible  <bruno@clisp.org>
9045
9046         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
9047
9048 2006-07-30  Bruno Haible  <bruno@clisp.org>
9049
9050         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9051         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
9052         get removed.
9053
9054 2006-07-29  Bruno Haible  <bruno@clisp.org>
9055
9056         Make it possible for gnulib-tool to work with locally modified or
9057         augmented gnulib repositories.
9058         * gnulib-tool (func_usage): Document --local-dir option.
9059         (local_gnulib_dir): New variable.
9060         Handle --local-dir option.
9061         (func_lookup_file): New function.
9062         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
9063         (func_get_description, func_get_filelist, func_get_description,
9064         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
9065         func_get_automake_snippet, func_get_include_directive,
9066         func_get_license, func_get_maintainer): Use func_lookup_file.
9067         (func_import, func_create_testdir): Use func_lookup_file.
9068
9069 2006-07-29  Bruno Haible  <bruno@clisp.org>
9070
9071         * modules/setenv (Depends-on): Add unistd.
9072
9073 2006-07-29  Bruno Haible  <bruno@clisp.org>
9074
9075         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
9076
9077 2006-07-29  Bruno Haible  <bruno@clisp.org>
9078
9079         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
9080
9081 2006-07-29  Bruno Haible  <bruno@clisp.org>
9082
9083         * gnulib-tool (import, update): If there is no Makefile.am, look at
9084         aclocal.m4, instead of bailing out.
9085
9086 2006-07-29  Bruno Haible  <bruno@clisp.org>
9087
9088         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
9089         Categorize the options by when they are useful.
9090
9091 2006-07-29  Bruno Haible  <bruno@clisp.org>
9092
9093         * gnulib-tool (func_usage): Document option --no-libtool.
9094         Handle option --no-libtool.
9095         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
9096         for changed semantics of $libtool variable.
9097         (func_import): Likewise. If libtool is not used, show this through
9098         an option --no-libtool.
9099         (func_create_testdir): Update.
9100
9101 2006-07-29  Bruno Haible  <bruno@clisp.org>
9102
9103         * gnulib-tool (func_import): Extend error message about missing
9104         --doc-base.
9105
9106 2006-07-29  Bruno Haible  <bruno@clisp.org>
9107
9108         * gnulib-tool (func_import): Don't create the $docbase directory if
9109         there is no file to store there.
9110
9111 2006-07-29  Bruno Haible  <bruno@clisp.org>
9112
9113         * gnulib-tool (autoconf_minversion): If a --dir option is given and
9114         relevant, look for configure.ac there, not in the current directory.
9115         Also use a simple search for AC_PREREQ, not "autoconf --trace".
9116
9117 2006-07-29  Bruno Haible  <bruno@clisp.org>
9118
9119         * gnulib-tool (SORT): New variable.
9120         (func_usage): Undocument --assume-autoconf option.
9121         Remove --assume-autoconf option handling.
9122         (autoconf_minversion): Determine from the contents of configure.ac.
9123         (func_import): Remove autoconf_minversion handling.
9124         Suggested by Eric Blake.
9125
9126 2006-07-29  Bruno Haible  <bruno@clisp.org>
9127
9128         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
9129
9130 2006-07-29  Bruno Haible  <bruno@clisp.org>
9131
9132         * config/srclist.txt (*setenv.[ch]): Remove rules.
9133
9134 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9135
9136         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
9137
9138 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9139
9140         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
9141         arpa/inet.h.
9142
9143 2006-07-28  Simon Josefsson  <jas@extundo.com>
9144
9145         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
9146         * modules/inet_pton (Depends-on): Likewise.
9147
9148 2006-07-28  Simon Josefsson  <jas@extundo.com>
9149
9150         * m4/netinet_in_h.m4: New file.
9151
9152 2006-07-28  Simon Josefsson  <jas@extundo.com>
9153
9154         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
9155         #include's.
9156
9157 2006-07-28  Simon Josefsson  <jas@extundo.com>
9158
9159         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
9160         #include's.
9161
9162 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
9163
9164         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
9165         setgid on directories only if they set these bits.
9166         * lib/modechange.h: Remove obsolete comment about masks.
9167
9168 2006-07-28  Eric Blake  <ebb9@byu.net>
9169
9170         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
9171         macro expansion.
9172
9173 2006-07-28  Bruno Haible  <bruno@clisp.org>
9174
9175         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
9176
9177 2006-07-28  Bruno Haible  <bruno@clisp.org>
9178
9179         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
9180
9181 2006-07-28  Bruno Haible  <bruno@clisp.org>
9182
9183         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
9184         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
9185         Define fallbacks.
9186         Avoids link error on FreeBSD 4.x.
9187         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9188
9189         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
9190         encoding.
9191         * lib/mbswidth.c (iswcntrl): Likewise.
9192
9193 2006-07-27  Bruno Haible  <bruno@clisp.org>
9194
9195         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
9196         test.
9197
9198 2006-07-27  Bruno Haible  <bruno@clisp.org>
9199
9200         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
9201         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
9202         defined.
9203
9204 2006-07-26  Eric Blake  <ebb9@byu.net>
9205
9206         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
9207
9208 2006-07-26  Eric Blake  <ebb9@byu.net>
9209
9210         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
9211         like mingw that lack mkstemp.
9212         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
9213         avoid compilation warning on mingw.
9214
9215 2006-07-26  Bruno Haible  <bruno@clisp.org>
9216
9217         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
9218         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
9219         INT_FAST*_MIN, INTPTR_MIN.
9220
9221 2006-07-25  Bruno Haible  <bruno@clisp.org>
9222
9223         * modules/version-etc (Depends-on): Add stdarg.
9224
9225 2006-07-25  Bruno Haible  <bruno@clisp.org>
9226
9227         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
9228         complex commands.
9229
9230 2006-07-25  Bruno Haible  <bruno@clisp.org>
9231
9232         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
9233         defined in <stdarg.h> or config.h.
9234
9235 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
9236
9237         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
9238         (gl_STDIO_SAFER): Remove.
9239
9240 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
9241
9242         * MODULES.html.sh (File stream based Input/Output):
9243         Add fopen-safer, tmpfile-safer; remove stdio-safer.
9244         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
9245         * modules/fopen-safer, modules/tmpfile-safer: New files.
9246         * modules/stdio-safer: Remove.
9247
9248 2006-07-24  Bruno Haible  <bruno@clisp.org>
9249
9250         * modules/tmpdir: New file.
9251         * MODULES.html.sh (File system functions): Add it.
9252
9253 2006-07-24  Bruno Haible  <bruno@clisp.org>
9254
9255         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
9256         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
9257
9258 2006-07-24  Bruno Haible  <bruno@clisp.org>
9259
9260         * modules/clean-temp: New file.
9261
9262 2006-07-24  Bruno Haible  <bruno@clisp.org>
9263
9264         * m4/tmpdir.m4: New file, from GNU gettext.
9265
9266 2006-07-24  Bruno Haible  <bruno@clisp.org>
9267
9268         * lib/tmpdir.h: New file, from GNU gettext.
9269         * lib/tmpdir.c: New file, from GNU gettext.
9270
9271 2006-07-24  Bruno Haible  <bruno@clisp.org>
9272
9273         * lib/clean-temp.h: New file, from GNU gettext.
9274         * lib/clean-temp.c: New file, from GNU gettext.
9275
9276 2006-07-23  Eric Blake  <ebb9@byu.net>
9277
9278         * modules/stdio-safer (Files): Add tmpfile-safer.c.
9279         (Depends-on): Add binary-io.
9280
9281 2006-07-23  Eric Blake  <ebb9@byu.net>
9282
9283         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
9284
9285 2006-07-23  Eric Blake  <ebb9@byu.net>
9286
9287         * lib/tmpfile-safer.c: New file.
9288         * lib/stdio-safer.h (fopen_safer): Add prototype.
9289         * lib/stdio--.h (tmpfile): Make safer.
9290
9291 2006-07-23  Bruno Haible  <bruno@clisp.org>
9292
9293         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
9294         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
9295         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
9296         gl_linked_remove_at): Use it.
9297
9298 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9299         and Simon Josefsson <jas@extundo.com>
9300
9301         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
9302
9303         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
9304
9305 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9306
9307         * modules/close-stream: New file.
9308         * modules/closeout (Description): Make it clear that it exits
9309         with a diagnostic on error.
9310         (Depends-on): Add close-stream.  Remove fpending, stdbool.
9311         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
9312
9313 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9314
9315         * m4/close-stream.m4: New file.
9316
9317 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9318
9319         * lib/close-stream.c, lib/close-stream.h: New files.
9320
9321 2006-07-22  Bruno Haible  <bruno@clisp.org>
9322
9323         Merge from GNU gettext 0.15.
9324
9325         2006-05-01  Bruno Haible  <bruno@clisp.org>
9326
9327                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
9328
9329         2006-07-22  Bruno Haible  <bruno@clisp.org>
9330
9331                 * modules/javaversion: New file.
9332                 * MODULES.html.sh (Java): Add javaversion.
9333
9334         2006-03-12  Bruno Haible  <bruno@clisp.org>
9335
9336                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
9337
9338         2005-12-04  Bruno Haible  <bruno@clisp.org>
9339
9340                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
9341                 (untested).
9342
9343         2006-06-21  Bruno Haible  <bruno@clisp.org>
9344
9345                 Avoid warnings from recent versions of mcs.
9346                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
9347                 -o, -L, -r any more. Use options documented since mcs-1.0
9348                 instead. Similarly for -g.
9349
9350         2005-12-04  Bruno Haible  <bruno@clisp.org>
9351
9352                 * build-aux/csharpcomp.sh.in: Suffix for resources is
9353                 .resources, not .resource.
9354
9355         2005-07-09  Bruno Haible  <bruno@clisp.org>
9356
9357                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
9358                 add a .dll suffix.
9359                 Reported by Mark Junker <mjscod@gmx.de>.
9360
9361         2006-07-22  Bruno Haible  <bruno@clisp.org>
9362
9363                 * modules/gettext: Upgrade to gettext-0.15.
9364                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
9365                 m4/visibility.m4.
9366                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
9367
9368 2006-07-22  Bruno Haible  <bruno@clisp.org>
9369
9370         Merge from GNU gettext 0.15.
9371
9372         2006-03-25  Bruno Haible  <bruno@clisp.org>
9373
9374                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
9375
9376         2006-07-21  Bruno Haible  <bruno@clisp.org>
9377
9378                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
9379                 "1.1".
9380
9381         2006-05-09  Bruno Haible  <bruno@clisp.org>
9382
9383                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
9384                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
9385                 for the conftestver execution.
9386
9387         2006-05-01  Bruno Haible  <bruno@clisp.org>
9388
9389                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
9390                 optional target-version argument. Verify that the compiler
9391                 groks source of the specified source-version, or add -source
9392                 option as necessary. Verify that the compiler produces
9393                 bytecode in the specified target-version, or add -target and
9394                 -source options as necessary. Make the result of the test
9395                 available as variable CONF_JAVAC. Also log error output in
9396                 config.log.
9397
9398         2006-03-11  Bruno Haible  <bruno@clisp.org>
9399
9400                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
9401
9402         2006-05-09  Bruno Haible  <bruno@clisp.org>
9403
9404                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
9405                 CLASSPATH_SEPARATOR to a semicolon.
9406
9407         2006-03-12  Bruno Haible  <bruno@clisp.org>
9408
9409                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
9410                 available as variable CONF_JAVA, for subsequent autoconf
9411                 tests. Also log error output in config.log.
9412
9413         2006-07-19  Bruno Haible  <bruno@clisp.org>
9414
9415                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
9416                 that getline works on glibc2 systems. Needed to avoid trouble
9417                 in relocatable.c.
9418                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
9419
9420         2005-12-04  Bruno Haible  <bruno@clisp.org>
9421
9422                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
9423                 launcher (untested).
9424
9425         2005-12-04  Bruno Haible  <bruno@clisp.org>
9426
9427                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
9428
9429         2006-07-22  Bruno Haible  <bruno@clisp.org>
9430
9431                 * gettext.m4: Update from GNU gettext-0.15.
9432                 * nls.m4: Likewise.
9433                 * po.m4: Likewise.
9434                 * inttypes-pri.m4: Likewise.
9435                 * inttypes-h.m4: Renamed from inttypes.m4.
9436                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
9437
9438 2006-07-22  Bruno Haible  <bruno@clisp.org>
9439
9440         Merge from GNU gettext 0.15.
9441
9442         2005-07-05  Bruno Haible  <bruno@clisp.org>
9443
9444                 * printf-args.c (printf_fetchargs): Work around broken
9445                 definition of wint_t on mingw.
9446
9447         2005-02-12  Bruno Haible  <bruno@clisp.org>
9448
9449                 * xallocsa.h: Add extern "C" for C++.
9450
9451         2006-05-17  Bruno Haible  <bruno@clisp.org>
9452
9453                 Cygwin portability.
9454                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
9455
9456         2006-04-30  Bruno Haible  <bruno@clisp.org>
9457
9458                 * progreloc.c: Include <mach-o/dyld.h> if available.
9459                 (find_executable): Use _NSGetExecutablePath when possible.
9460
9461         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9462
9463                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
9464                 function.
9465
9466         2005-12-29  Bruno Haible  <bruno@clisp.org>
9467
9468                 * progreloc.c (set_program_name_and_installdir): Fix
9469                 compilation error.
9470
9471         2005-12-04  Bruno Haible  <bruno@clisp.org>
9472
9473                 Cygwin portability.
9474                 * progreloc.c: Include <windows.h> also on Cygwin.
9475                 (find_executable): Add support for Cygwin.
9476                 (set_program_name_and_installdir): Handle also platforms with
9477                 nonempty EXEEXT.
9478
9479         2006-07-11  Bruno Haible  <bruno@clisp.org>
9480
9481                 * javacomp.c: Fix a comment.
9482                 Reported by Jim Meyering.
9483
9484         2006-04-30  Bruno Haible  <bruno@clisp.org>
9485
9486                 * javacomp.h (compile_java_class): Add source_version,
9487                 target_version arguments.
9488                 * javacomp.c: Rewritten to choose only a compiler that
9489                 respects the specified source_version and target_version.
9490
9491         2006-06-27  Bruno Haible  <bruno@clisp.org>
9492
9493                 Assume correct S_ISDIR macro.
9494                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
9495
9496         2006-07-22  Bruno Haible  <bruno@clisp.org>
9497
9498                 * javaversion.h: New file, from GNU gettext.
9499                 * javaversion.c: New file, from GNU gettext.
9500                 * javaversion.java: New file, from GNU gettext.
9501                 * javaversion.class: New file, from GNU gettext.
9502
9503         2006-05-17  Bruno Haible  <bruno@clisp.org>
9504
9505                 Cygwin portability.
9506                 * javaexec.c (execute_java_class): Test for jview program
9507                 also on Cygwin.
9508
9509         2006-04-09  Bruno Haible  <bruno@clisp.org>
9510
9511                 * fatal-signal.c: Don't include string.h.
9512                 (at_fatal_signal): Use a copying loop instead of memcpy.
9513
9514         2005-12-04  Bruno Haible  <bruno@clisp.org>
9515
9516                 * csharpexec.c: Add support for 'clix' launcher (untested).
9517                 (execute_csharp_using_sscli): New function.
9518                 (execute_csharp_program): Call it.
9519
9520         2006-06-21  Bruno Haible  <bruno@clisp.org>
9521
9522                 Avoid warnings from recent versions of mcs.
9523                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
9524                 -o, -L, -r any more. Use options documented since mcs-1.0
9525                 instead. Similarly for -g.
9526
9527         2005-07-09  Bruno Haible  <bruno@clisp.org>
9528
9529                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
9530                 add a .dll suffix.
9531                 Reported by Mark Junker <mjscod@gmx.de>.
9532
9533         2006-06-17  Bruno Haible  <bruno@clisp.org>
9534
9535                 * config.charset: Update for NetBSD 3.0.
9536
9537         2006-05-17  Bruno Haible  <bruno@clisp.org>
9538
9539                 Cygwin portability.
9540                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
9541
9542         2006-05-16  Bruno Haible  <bruno@clisp.org>
9543
9544                 * localcharset.c [CYGWIN]: Include <windows.h>.
9545                 (get_charset_aliases): For Cygwin, return the same CPxxx
9546                 aliases list as under WIN32.
9547                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
9548                 the environment variables. Fall back to GetACP().
9549
9550         2006-04-05  Bruno Haible  <bruno@clisp.org>
9551
9552                 * config.charset: Update Juan Manuel Guerrero's address.
9553
9554         2005-02-12  Bruno Haible  <bruno@clisp.org>
9555
9556                 * allocsa.h: Add extern "C" for C++.
9557
9558         2005-02-10  Bruno Haible  <bruno@clisp.org>
9559
9560                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
9561                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
9562
9563         2006-07-22  Bruno Haible  <bruno@clisp.org>
9564
9565                 * gettext.h: Update to GNU gettext-0.15.
9566
9567 2006-07-22  Bruno Haible  <bruno@clisp.org>
9568
9569         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
9570         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
9571         lib-prefix.m4, longdouble.m4, ssize_t.m4.
9572
9573 2006-07-21  Eric Blake  <ebb9@byu.net>
9574
9575         * modules/stdlib-safer: New file.
9576         * MODULES.html.sh (File stream based Input/Output): Add
9577         stdlib-safer.
9578
9579 2006-07-21  Eric Blake  <ebb9@byu.net>
9580
9581         * lib/stdlib-safer.h: New file from coreutils, required by
9582         stdlib--.h.
9583
9584 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
9585
9586         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
9587
9588 2006-07-20  Bruno Haible  <bruno@clisp.org>
9589
9590         * gnulib-tool: Recognize new option --assume-autoconf.
9591         (autoconf_minversion): New variable.
9592         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
9593
9594 2006-07-20  Bruno Haible  <bruno@clisp.org>
9595
9596         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
9597
9598 2006-07-19  Derek R. Price  <derek@ximbiot.com>
9599
9600         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
9601         Reindent and repaginate.
9602
9603 2006-07-19  Derek Price  <derek@ximbiot.com>
9604
9605         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
9606         Correct grammar.
9607
9608 2006-07-17  Bruno Haible  <bruno@clisp.org>
9609
9610         * modules/list: New file.
9611         * modules/array-list: New file.
9612         * modules/carray-list, modules/carray-list-tests: New files.
9613         * modules/linked-list, modules/linked-list-tests: New files.
9614         * modules/avltree-list, modules/avltree-list-tests: New files.
9615         * modules/rbtree-list, modules/rbtree-list-tests: New files.
9616         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
9617         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
9618         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
9619         * modules/oset: New file.
9620         * modules/array-oset: New file.
9621         * modules/avltree-oset, modules/avltree-oset-tests: New files.
9622         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
9623         * tests/test-carray_list.c: New file.
9624         * tests/test-linked_list.c: New file.
9625         * tests/test-avltree_list.c: New file.
9626         * tests/test-rbtree_list.c: New file.
9627         * tests/test-linkedhash_list.c: New file.
9628         * tests/test-avltreehash_list.c: New file.
9629         * tests/test-rbtreehash_list.c: New file.
9630         * tests/test-avltree_oset.c: New file.
9631         * tests/test-rbtree_oset.c: New file.
9632         * MODULES.html.sh (Container data structures): New section.
9633
9634 2006-07-17  Bruno Haible  <bruno@clisp.org>
9635
9636         * m4/gl_list.m4: New file.
9637
9638 2006-07-17  Bruno Haible  <bruno@clisp.org>
9639
9640         * lib/gl_list.h: New file.
9641         * lib/gl_list.c: New file.
9642         * lib/gl_array_list.h: New file.
9643         * lib/gl_array_list.c: New file.
9644         * lib/gl_carray_list.h: New file.
9645         * lib/gl_carray_list.c: New file.
9646         * lib/gl_linked_list.h: New file.
9647         * lib/gl_linked_list.c: New file.
9648         * lib/gl_anylinked_list1.h: New file.
9649         * lib/gl_anylinked_list2.h: New file.
9650         * lib/gl_avltree_list.h: New file.
9651         * lib/gl_avltree_list.c: New file.
9652         * lib/gl_anyavltree_list1.h: New file.
9653         * lib/gl_anyavltree_list2.h: New file.
9654         * lib/gl_rbtree_list.h: New file.
9655         * lib/gl_rbtree_list.c: New file.
9656         * lib/gl_anyrbtree_list1.h: New file.
9657         * lib/gl_anyrbtree_list2.h: New file.
9658         * lib/gl_anytree_list1.h: New file.
9659         * lib/gl_anytree_list2.h: New file.
9660         * lib/gl_linkedhash_list.h: New file.
9661         * lib/gl_linkedhash_list.c: New file.
9662         * lib/gl_anyhash_list1.h: New file.
9663         * lib/gl_anyhash_list2.h: New file.
9664         * lib/gl_avltreehash_list.h: New file.
9665         * lib/gl_avltreehash_list.c: New file.
9666         * lib/gl_rbtreehash_list.h: New file.
9667         * lib/gl_rbtreehash_list.c: New file.
9668         * lib/gl_anytreehash_list1.h: New file.
9669         * lib/gl_anytreehash_list2.h: New file.
9670
9671         * lib/gl_oset.h: New file.
9672         * lib/gl_oset.c: New file.
9673         * lib/gl_array_oset.h: New file.
9674         * lib/gl_array_oset.c: New file.
9675         * lib/gl_avltree_oset.h: New file.
9676         * lib/gl_avltree_oset.c: New file.
9677         * lib/gl_rbtree_oset.h: New file.
9678         * lib/gl_rbtree_oset.c: New file.
9679         * lib/gl_anytree_oset.h: New file.
9680
9681 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9682
9683         * m4/mkancesdirs.m4: New file.
9684         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
9685         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
9686         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
9687         it.
9688
9689 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9690
9691         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
9692         * lib/mkancesdirs.h: New files.
9693         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
9694         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
9695         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
9696         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
9697         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
9698         callers changed.  Revamp internals significantly, by not
9699         attempting to create directories that are temporarily more
9700         permissive than the final results.  Do not attempt to use
9701         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
9702         This removes some race conditions, fixes some bugs, and simplifies
9703         things.  Use new dirchownmod function to do owner and mode changes.
9704         * lib/mkdir-p.h: Likewise.
9705         * lib/modechange.c (octal_to_mode): New function.
9706         (struct mode_change): New member mentioned.
9707         (make_node_op_equals): New arg mentioned.  All callers changed.
9708         (mode_compile): Keep track of which mode bits the user has explicitly
9709         mentioned.
9710         (mode_adjust): New arg DIR, so that we implement the X op correctly.
9711         New arg PMODE_BITS, to keep track of which mode bits the user
9712         mentioned; it treats S_ISUID and S_ISGID speciall.
9713         All callers changed.
9714         * lib/modechange.h: Likewise.
9715
9716 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9717
9718         * MODULES.html.sh: Add mkancestors.
9719         * modules/mkancesdirs: New module.
9720         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
9721         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
9722         The chdir-safer and afs files are now orphans; I'll remove them
9723         unless someone speaks up.
9724         Add lib/dirchownmod.c, lib/dirchownmod.h.
9725         (Depends-on): Remove alloca, chown, save-cwd, dirname.
9726         Add lchown, mkancesdirs.
9727         (Maintainer): Add self.
9728
9729 2006-07-15  Karl Berry  <karl@gnu.org>
9730
9731         * gnulib-tool: help message wording/arrangement.
9732
9733 2006-07-14  Simon Josefsson  <jas@extundo.com>
9734
9735         * doc/gnulib.texi (Libtool and Windows): New section.
9736
9737 2006-07-12  Simon Josefsson  <jas@extundo.com>
9738
9739         * modules/gendocs (License): Fix license, approved by Karl.
9740
9741 2006-07-12  Eric Blake  <ebb9@byu.net>
9742
9743         * MODULES.html.sh: Add gendocs.
9744
9745 2006-07-11  Eric Blake  <ebb9@byu.net>
9746
9747         * modules/fdl: New module, to install doc/fdl.texi.
9748         * MODULES.html.sh: Add new section for documentation modules.
9749         * gnulib-tool: Avoid space-tab.
9750         (--doc-base): New option, to manage files from doc.
9751
9752 2006-07-11  Eric Blake  <ebb9@byu.net>
9753
9754         * m4/absolute-header.m4: Fix comments to match recent change.
9755
9756 2006-07-11  Eric Blake  <ebb9@byu.net>
9757
9758         * gnulib-tool: List --doc-base before --tests-base.
9759
9760 2006-07-11  Derek R. Price  <derek@ximbiot.com>
9761
9762         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
9763
9764 2006-07-11  Bruno Haible  <bruno@clisp.org>
9765
9766         * README: Mention where to put documentation.
9767
9768 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9769
9770         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
9771
9772 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
9773
9774         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
9775         to stdint.m4.
9776
9777 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
9778
9779         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
9780         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
9781         "no/such/file/stdint.h" when there is no such file, so that
9782         the resulting C code can be parsed by dodgy compilers.
9783         Problems reported by Bob Proulx.
9784
9785 2006-07-10  Derek R. Price  <derek@ximbiot.com>
9786
9787         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
9788         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
9789         macros into the GNU _D_EXACT_NAMLEN.
9790         * lib/savedir.c:  Likewise.
9791         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
9792
9793 2006-07-10  Derek R. Price  <derek@ximbiot.com>
9794         and Paul Eggert  <eggert@cs.ucla.edu>
9795
9796         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
9797         * m4/savedir.m4:
9798         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
9799         macros into the GNU _D_EXACT_NAMLEN.
9800
9801 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9802
9803         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
9804         around the absolute name, to work around a problem with the HP-UX
9805         11.23 native C compiler, reported by Bob Proulx.
9806
9807 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9808
9809         * doc/maintain.texi, make-stds.texi: Sync from
9810         <http://savannah.gnu.org/projects/gnustandards>.
9811
9812 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9813
9814         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
9815
9816 2006-07-09  Jim Meyering  <jim@meyering.net>
9817
9818         * m4/glob.m4: Remove a doubled word in a comment.
9819
9820 2006-07-09  Jim Meyering  <jim@meyering.net>
9821
9822         * lib/argp-pv.c: Remove a doubled word in a comment.
9823         * lib/check-version.c (check_version): Likewise.
9824         * lib/javacomp.c (compile_java_class): Likewise.
9825
9826 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
9827
9828         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
9829         for the benefit of people using Autoconf 2.60.  If you want to
9830         support older Autoconf versions you can copy m4/onceonly_2_57.m4
9831         (or m4/onceonly.m4, if pre-2.57) manually.
9832
9833 2006-07-08  Jim Meyering  <jim@meyering.net>
9834
9835         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
9836         comment.
9837         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
9838         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
9839         comment.
9840
9841 2006-07-08  Jim Meyering  <jim@meyering.net>
9842
9843         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
9844
9845 2006-07-07  Simon Josefsson  <jas@extundo.com>
9846
9847         * tests/test-crc.c: Change expected crc value, the test vector
9848         were probably computed using the old broken crc.c?
9849
9850 2006-07-06  Simon Josefsson  <jas@extundo.com>
9851
9852         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
9853         now the canonical place for the M4 file).
9854
9855         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
9856         from the sys_socket dependency now.
9857
9858         * modules/inet_pton (Files): Ditto.
9859
9860         * modules/inet_ntop (Files): Ditto.
9861
9862 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9863
9864         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
9865         not gl_PREREQ_GETUSERSHELL.
9866
9867 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9868
9869         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
9870         with only one argument, for Autoconf 2.60.
9871         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
9872         expand to nothing, so add a shell command to avoid syntax error.
9873         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9874
9875 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9876
9877         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
9878
9879 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9880
9881         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
9882         no longer needed.  Check for isblank decl.
9883         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
9884         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
9885         of existence.
9886
9887 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9888
9889         * lib/getloadavg.c: Use __VMS, not VMS.
9890         * lib/getopt.c: Likewise.
9891         * lib/getpagesize.h: Likewise.
9892         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
9893         and probably does not work.
9894
9895 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9896
9897         * lib/.cppi-disable: Add wcwidth.
9898         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
9899         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
9900         (ISGRAPH): Remove.  All uses changed to isgraph.
9901         (FOLD) [!defined _LIBC]: Remove special case.
9902         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
9903         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
9904         HAVE_ISBLANK.
9905         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
9906         case.
9907
9908 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
9909
9910         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
9911         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
9912         brackets.  Other minor changes to suppress some compiler
9913         warnings.
9914
9915 2006-07-06  Derek R. Price  <derek@ximbiot.com>
9916         and Paul Eggert  <eggert@cs.ucla.edu>
9917
9918         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
9919         of invoking obsolescent AC_HEADER_DIRENT macro.
9920         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
9921         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
9922         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
9923         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
9924         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
9925         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
9926         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
9927         * m4/readdir.m4: Remove; no longer needed.
9928
9929 2006-07-06  Derek R. Price  <derek@ximbiot.com>
9930         and Paul Eggert  <eggert@cs.ucla.edu>
9931
9932         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
9933         Don't worry about this obsolete case any more.
9934         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
9935         directories.
9936         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
9937         worry about this obsolete case any more.
9938         * lib/fts.c: Likewise.
9939         * lib/getcwd.c: Likewise.
9940         * lib/glob.h: Likewise.
9941         * lib/savedir.c: Likewise.
9942
9943 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9944
9945         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
9946         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
9947         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
9948         needed.
9949         All uses removed.
9950         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9951         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
9952         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
9953         needed.
9954         * m4/getdate.m4 (gl_GETDATE): Likewise.
9955         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
9956         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
9957         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
9958         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9959         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
9960         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
9961         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
9962         needed.
9963
9964 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9965
9966         * lib/memcasecmp.c: Include <limits.h>.
9967         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
9968         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
9969         Don't assume isdigit succeeds only on '0' through '9'.
9970
9971 2006-07-05  Eric Blake  <ebb9@byu.net>
9972
9973         * modules/getaddrinfo (Depends-on): Add snprintf.
9974
9975 2006-07-05  Eric Blake  <ebb9@byu.net>
9976
9977         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
9978         to avoid 'header present but could not be compiled' on cygwin.
9979
9980 2006-07-05  Eric Blake  <ebb9@byu.net>
9981
9982         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
9983         missing from netdb.h.
9984         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
9985
9986 2006-07-05  Derek R. Price  <derek@ximbiot.com>
9987
9988         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
9989         no longer needed.
9990         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
9991         * m4/getdate.m4 (gl_GETDATE): Likewise.
9992         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
9993         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
9994         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
9995         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9996         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
9997
9998 2006-07-05  Derek R. Price  <derek@ximbiot.com>
9999
10000         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
10001         All uses of is_space replaced by isspace.
10002         * lib/exit.h: Don't talk about STDC_HEADERS.
10003         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
10004         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
10005         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
10006         replaced by isprint etc.
10007         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
10008         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10009         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
10010         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
10011         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
10012         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10013
10014 2006-07-05  Bruno Haible  <bruno@clisp.org>
10015
10016         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
10017         the function exists, before testing against AIX.
10018         Reported by Martin Lambers <marlam@marlam.de>.
10019
10020 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10021
10022         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
10023         From Mark D. Baushke.
10024
10025 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10026
10027         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
10028         to the absolute name, not just one, to bypass Sun C 5.8's
10029         "warning: #include of /usr/include/... may be non-portable".
10030
10031 2006-07-04  Eric Blake  <ebb9@byu.net>
10032
10033         * modules/dirname-tests: New test module.
10034         * tests/test-dirname.c: New file, replacing dirname.c
10035         TEST_DIRNAME section that was recently deleted.
10036
10037 2006-07-04  Bruno Haible  <bruno@clisp.org>
10038
10039         Assume ANSI C header files and <ctype.h> functions.
10040         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
10041         (mbsnwidth): Use isprint, iscntrl instead.
10042
10043 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10044
10045         Merge from coreutils.
10046         * MODULES.html.sh: Add xstrtold.
10047         * modules/xstrtold: New file.
10048         * modules/cycle-check (Files): Add lib/same-inode.h.
10049         * modules/dirname (Files): Add m4/double-slash-root.m4.
10050         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
10051         * modules/mkdir-p (Files): Add lib/same-inode.h.
10052         * modules/same (Files): Add lib/same-inode.h.
10053
10054 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10055
10056         * m4/absolute-header.m4: Renamed from full-header-path.m4.
10057         This is to keep the terminology clean; POSIX talks about
10058         "absolute pathnames", not "full pathnames", but the GNU
10059         Coding Standards say to use "path" for something else;
10060         so use "absolute" to keep both sides happy.
10061         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
10062         Set gl_absolute_header, not gl_full_header_path.
10063         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
10064         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
10065         All uses changed.
10066
10067         Merge from coreutils.
10068
10069         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
10070
10071         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
10072         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
10073         want to require the building of c-strtod.o.
10074         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
10075         needs -lm directly.
10076         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
10077
10078         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
10079
10080         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
10081         --as-needed option if available.  Problem reported by Albert Chin in
10082         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
10083         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
10084         cc merely issues a bunch of annoying warnings for --as-needed
10085         (this problem was reported by Bob Proulx).  Also, try linking with
10086         -lm to detect a bug in binutils 2.16 (this problem was reported
10087         by Ralf Wildenhues).
10088
10089         2006-06-18  Jim Meyering  <jim@meyering.net>
10090
10091         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
10092         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
10093         macro.
10094         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
10095         also check for glibc-2.4's abort-inducing bug.
10096
10097         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
10098         Low-probability clean-up should be to use rmdir to get rid of
10099         the just-created directory, not unlink.
10100
10101         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
10102         configure fail, and request a bug report to inform us about it.
10103         Add a comment that, barring reports to the contrary, in 2007 we'll
10104         assume ftruncate is universally available.
10105
10106         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
10107
10108         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
10109
10110         2006-03-12  Jim Meyering  <jim@meyering.net>
10111
10112         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
10113         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
10114         * m4/same.m4 (gl_SAME): Likewise.
10115         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
10116
10117         2006-03-11  Eric Blake  <ebb9@byu.net>
10118
10119         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
10120         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
10121         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
10122         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
10123
10124 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10125
10126         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
10127         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
10128         reported by Mark D. Baushke, one in
10129         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
10130
10131         Merge from coreutils.
10132
10133         * lib/.cppi-disable: Add stdint_.h.
10134         * lib/.cvsignore: Add stdint.h.
10135
10136         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
10137
10138         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
10139         both double and long double versions.
10140         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
10141         * lib/xstrtold.c: New file.
10142         * lib/xstrtod.h (xstrtold): New decl.
10143
10144         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
10145
10146         * lib/filemode.c (setst): Remove.
10147         (strmode): Rewrite to avoid setst.  This makes the code shorter,
10148         (arguably) clearer, and the generated code is a bit smaller on my
10149         Debian GNU/Linux stable x86 host.
10150
10151         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
10152
10153         * lib/filemode.c: Include "filemode.h" first, to test the interface.
10154         Assume that filemode.h includes sys/types.h and sys/stat.h.
10155         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
10156         (ftypelet): Reorder to put common cases first, for efficiency.
10157         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
10158         to do 'M'.
10159         (strmode): Renamed from mode_string, and now stores 12 bytes instead
10160         of 10, for compatibility with FreeBSD.  All callers changed.
10161         (filemodestring): Now stores 12 bytes instead of 10, and sets file
10162         types that can't be deduced solely from st_mode.  First arg is now a
10163         const pointer.
10164         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
10165         (strmode): Renamed from mode_string.
10166         (filemodestring): New decl.
10167         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
10168         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
10169         needed.
10170         (S_ISPORT, S_ISWHT): New macros, if not already defined.
10171
10172         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
10173
10174         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
10175         fsusage.h now does that.  Include fsusage.h first, to test interface.
10176         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
10177         at most one method (the old code could have generated decls that
10178         didn't conform to C89, not that this was ever exercised).
10179         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
10180
10181         2006-03-19  Jim Meyering  <jim@meyering.net>
10182
10183         Work even in a chroot where d_ino values for entries in "/"
10184         don't match the stat.st_ino values for the same names.
10185         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
10186         number, iterate through all entries again, using lstat instead.
10187         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
10188         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
10189
10190         * lib/getcwd.c (__getcwd): Clarify a comment.
10191         Use memcpy in place of a call to strcpy.
10192
10193         2006-03-12  Jim Meyering  <jim@meyering.net>
10194
10195         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
10196         matches that of the current directory (which we're about to chdir ".."
10197         out of), then save the dev-ino of the parent, instead.
10198
10199         * lib/same-inode.h (SAME_INODE): New file/macro.
10200         * lib/chdir-safer.c (SAME_INODE): Remove definition.
10201         Include "same-inode.h", instead.
10202         * lib/same.c: Likewise.
10203         * lib/cycle-check.h: Include "same-inode.h".
10204         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
10205         * lib/cycle-check.c (SAME_INODE): Remove definition.
10206         * lib/root-dev-ino.h: Include "same-inode.h".
10207
10208         2006-03-11  Eric Blake  <ebb9@byu.net>
10209
10210         * lib/same.c (same_name): s/base_name/last_component/
10211         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
10212         * lib/filenamecat.c (file_name_concat): Likewise.
10213
10214         2006-03-11  Eric Blake  <ebb9@byu.net>,
10215                     Paul Eggert  <eggert@cs.ucla.edu>
10216
10217         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
10218         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
10219         drive prefix.
10220         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
10221         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
10222         (last_component): New method.
10223         * lib/dirname.c (dir_len): Determine when drive letters need a
10224         subsequent slash.  Preserve // when it is special.
10225         (dir_name): Don't append dot when drive letter is absolute.
10226         [TEST_DIRNAME]: Move into a full-blown gnulib test.
10227         * lib/basename.c (base_name): New semantics - malloc the result.
10228         Preserve // when it is special.  Preserve relative files that look
10229         like drive letters.
10230         (base_len): Preserve // when it is special.
10231         (last_component): New method, similar to old base_name semantics.
10232         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
10233         base_name.  Strip redundant slashes from ///.
10234
10235 2006-07-03  Jim Meyering  <jim@meyering.net>
10236
10237         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
10238         macro is used before the first cycle_check call.
10239
10240 2006-07-03  Eric Blake  <ebb9@byu.net>
10241
10242         * modules/dirname (Depends-on): Add xstrndup.
10243
10244 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
10245
10246         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
10247         test cases, so that config.log is a bit easier to follow.
10248
10249 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
10250
10251         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
10252         both are 64 bits, since this seems to be the tradition, and this
10253         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
10254         we ever run into a host that prefers long long to long in this
10255         case, we'll need another configure-time test.  Problem reported by
10256         Jim Meyering.
10257
10258 2006-07-02  Eric Blake  <ebb9@byu.net>
10259
10260         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
10261
10262 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10263
10264         * modules/inttypes (Depends-on): No longer depends on stdint.
10265         * modules/stdint (Description): Say more about assumptions.
10266         Say that the fast types might differ.  Say macros are used.
10267         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
10268         (Makefile.am): Revise list of substituted symbols to match
10269         new stdint.m4.
10270         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
10271         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
10272         * tests/test-stdint.c (verify_same_types)
10273         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
10274         the code conforms to C99/C89.
10275         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
10276         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
10277
10278 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10279
10280         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
10281         but fix a bug, by requiring at least 64 bits.
10282         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
10283         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
10284         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
10285         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
10286
10287         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
10288         changes.  Make 2.59 a prerequisite.  Check and substitute for
10289         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
10290         inttypes.h.  Do not use special include files; just use the
10291         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
10292         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
10293         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
10294         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
10295         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
10296         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
10297         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
10298         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
10299         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
10300         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
10301         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
10302         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
10303         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
10304         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
10305         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
10306         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
10307         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
10308         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
10309         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
10310         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
10311         WINT_MAX.  Check for C99 conformance more strictly, by detecting
10312         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
10313         not check for things that C99 does not require, e.g., int8_t.  If
10314         a test isn't needed unless <stdint.h> isn't working, and is
10315         unlikely to be needed for any other reason, then don't do it
10316         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
10317         size_t, since we assume C89 freestanding at least.  Do not check
10318         for sig_atomic_t, wchar_t, or wint_t, since the code now does
10319         the right thing even if the types are not defined.  Instead use:
10320         (gl_STDINT_TYPE_PROPERTIES): New macro.
10321         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
10322         testing whether <sys/types.h> clashes, as Autoconf does this for
10323         us now.  All uses removed.
10324         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
10325         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
10326         (gl_CHECK_TYPE_SAME):
10327         Remove; no longer needed.
10328         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
10329         exists, since we'll return 0 anyway in that case.
10330         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
10331
10332 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10333
10334         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
10335         possible collision with system files.
10336         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
10337         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
10338         WCHAR_MIN and WCHAR_MAX in this case.
10339         (<stddef.h>): Do not include; no longer needed.
10340         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
10341         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
10342         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
10343         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
10344         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
10345         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
10346         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
10347         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
10348         !defined(__c99))]: Include in this case too, since it's harmless
10349         now.
10350         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
10351         dangerous to do so.
10352         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
10353         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
10354         (_STDINT_MIN, _STDINT_MAX): New macros.
10355         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
10356         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
10357         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
10358         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
10359         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
10360         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
10361         macros, not typedefs; this simplifies things quite a bit.
10362         Use long int for all types narrower than int64_t.
10363         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
10364         Define in terms of long long int or int64_t or long int,
10365         not int64_t or int32_t.  This saves some compile-time testing.
10366         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
10367         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
10368         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
10369         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
10370         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
10371         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
10372         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
10373         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
10374         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
10375         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
10376         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
10377         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
10378         undef any previous version and define our own version, for
10379         simplicity and consistency with the new macros for types.
10380         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
10381         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
10382         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
10383         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
10384         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
10385         @WINT_T_SUFFIX@ to keep things simple here.
10386         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
10387         Simplify by assuming typical 8/16/32/64 host, since we're
10388         already doing that elsewhere anyway.
10389         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
10390         and assume long long int is 64 bits if available.  This
10391         speeds up 'configure'.
10392
10393 2006-07-01  Eric Blake  <ebb9@byu.net>
10394
10395         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
10396         Reported by Andreas Buening.
10397
10398 2006-07-01  Eric Blake  <ebb9@byu.net>
10399
10400         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
10401
10402 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
10403
10404         * lib/getaddrinfo.c: fixed typo
10405
10406 2006-06-29  Jim Meyering  <jim@meyering.net>
10407
10408         * modules/strftime (Maintainer): Add my name, since with the
10409         FPRINTFTIME changes strftime.c has forked from glibc.
10410
10411 2006-06-29  Eric Blake  <ebb9@byu.net>
10412
10413         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
10414
10415 2006-06-29  Eric Blake  <ebb9@byu.net>
10416
10417         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
10418
10419 2006-06-29  Eric Blake  <ebb9@byu.net>
10420
10421         * lib/stat_.h: New file.
10422
10423 2006-06-29  Eric Blake  <ebb9@byu.net>
10424
10425         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
10426         unused static function.
10427
10428 2006-06-29  Eric Blake  <ebb9@byu.net>
10429
10430         * doc/functions.texi (Function Portability): Document missing lstat
10431         on mingw.
10432
10433 2006-06-29  Eric Blake  <ebb9@byu.net>
10434
10435         * MODULES.html.sh: Add sys_stat.
10436         * modules/sys_stat: New module.
10437         * modules/mkstemp (Depends-on): Add sys_stat.
10438
10439 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10440
10441         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
10442
10443 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10444
10445         * m4/c-bs-a.m4: Removed.
10446
10447 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10448
10449         * lib/strftime.c: Assume strftime() exists.
10450
10451 2006-06-29  Derek Price  <derek@ximbiot.com>
10452
10453         * modules/c-bs-a: Removed - \a is C89.
10454         * MODULES.html.sh: Remove c-bs-a.
10455
10456 2006-06-29  Bruno Haible  <bruno@clisp.org>
10457
10458         * modules/wcwidth (License): Change to LGPL.
10459
10460 2006-06-28  Simon Josefsson  <jas@extundo.com>
10461
10462         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
10463         on _WIN32.
10464
10465         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
10466         getnameinfo.
10467
10468 2006-06-28  Simon Josefsson  <jas@extundo.com>
10469
10470         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
10471
10472 2006-06-28  Simon Josefsson  <jas@extundo.com>
10473
10474         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
10475         functions there.  It will succeed on Windows XP, but on Windows
10476         2000 and (presumably) earlier, it will fail, and use the internal
10477         re-implementation.
10478         (use_win32_p): New function.
10479         (getaddrinfo): Use strtoul on servname, to support numeric ports.
10480         Support AI_NUMERICSERV to disable getservbyname.
10481         (getnameinfo): New function, only supports
10482         NI_NUMERICHOST|NI_NUMERICSERV for now.
10483
10484         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
10485         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
10486         getnameinfo.
10487
10488 2006-06-28  Eric Blake  <ebb9@byu.net>
10489
10490         * modules/wcwidth: New file.
10491         * modules/mbchar (Depends-on): Add wcwidth.
10492         * modules/mbswidth (Depends-on): Add wcwidth.
10493         * MODULES.html.sh: Add wcwidth.
10494
10495 2006-06-28  Eric Blake  <ebb9@byu.net>
10496
10497         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
10498         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
10499
10500 2006-06-28  Eric Blake  <ebb9@byu.net>
10501
10502         * lib/xvasprintf.h: Fix comments.
10503
10504 2006-06-28  Eric Blake  <ebb9@byu.net>
10505
10506         * lib/mbchar.h (wcwidth): Include wcwidth.h.
10507         * lib/mbswidth.c (wcwidth): Move from here...
10508         * lib/wcwidth.h: ...to this new file.
10509
10510 2006-06-28  Derek R. Price  <derek@ximbiot.com>
10511
10512         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
10513
10514         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
10515         it's obsolete.
10516         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
10517
10518 2006-06-28  Derek R. Price  <derek@ximbiot.com>
10519
10520         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
10521         Autoconf 2.60 says this stuff was obsolete.
10522
10523 2006-06-28  Bruno Haible  <bruno@clisp.org>
10524
10525         * modules/wcwidth (Files): Add m4/wchar_t.m4.
10526
10527 2006-06-28  Bruno Haible  <bruno@clisp.org>
10528
10529         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
10530         gt_TYPE_WCHAR_T.
10531
10532 2006-06-28  Bruno Haible  <bruno@clisp.org>
10533
10534         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
10535         declaration for wcwidth.
10536         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
10537
10538 2006-06-28  Bruno Haible  <bruno@clisp.org>
10539
10540         * lib/mkdtemp.c [MINGW]: Include <io.h>.
10541         (mkdir): Define using _mkdir.
10542
10543 2006-06-28  Bruno Haible  <bruno@clisp.org>
10544
10545         * lib/getaddrinfo.h: Fix POSIX URL.
10546         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
10547         _WIN32.
10548         (use_win32_p): Make static.
10549         (getaddrinfo): Reject service name if it is empty or does not consist
10550         solely of decimal digits, or if its value is > 65535.
10551         (getnameinfo): Remove useless casts.
10552
10553 2006-06-27  Simon Josefsson  <jas@extundo.com>
10554
10555         * modules/sys_select: New file, suggested by Bruno Haible, Paul
10556         Eggert and Martin Lambers.
10557
10558 2006-06-27  Simon Josefsson  <jas@extundo.com>
10559
10560         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
10561         Eggert and Martin Lambers.
10562
10563 2006-06-27  Bruno Haible  <bruno@clisp.org>
10564
10565         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
10566         result to 0, not to empty.
10567         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
10568
10569 2006-06-27  Bruno Haible  <bruno@clisp.org>
10570
10571         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
10572
10573 2006-06-26  Simon Josefsson  <jas@extundo.com>
10574
10575         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
10576         present.
10577
10578 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
10579
10580         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
10581         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
10582         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
10583
10584 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
10585
10586         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
10587
10588 2006-06-26  Bruno Haible  <bruno@clisp.org>
10589
10590         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
10591
10592 2006-06-26  Bruno Haible  <bruno@clisp.org>
10593
10594         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
10595
10596 2006-06-26  Bruno Haible  <bruno@clisp.org>
10597
10598         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
10599         SGI C compiler in pre-C99 mode.
10600         Suggested by Mark D. Baushke and Larry Jones.
10601
10602 2006-06-26  Bruno Haible  <bruno@clisp.org>
10603
10604         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
10605         WCHAR_MAX.
10606         Reported by Mark D. Baushke and Larry Jones.
10607
10608 2006-06-26  Bruno Haible  <bruno@clisp.org>
10609
10610         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
10611         in pre-C99 mode.
10612         Suggested by Mark D. Baushke and Larry Jones.
10613
10614 2006-06-23  Simon Josefsson  <jas@extundo.com>
10615             Bruno Haible  <bruno@clisp.org>
10616
10617         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
10618         Emit mostlyclean-local rule.
10619         (func_emit_tests_Makefile_am): Likewise.
10620         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
10621
10622 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
10623
10624         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
10625
10626 2006-06-23  Bruno Haible  <bruno@clisp.org>
10627
10628         * tests/test-stdint.c: Update to match ISO C 99 Technical
10629         Corrigendum 1.
10630
10631 2006-06-23  Bruno Haible  <bruno@clisp.org>
10632
10633         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
10634
10635 2006-06-23  Bruno Haible  <bruno@clisp.org>
10636
10637         * lib/stdint_.h: Treat IRIX like OpenBSD.
10638
10639 2006-06-23  Bruno Haible  <bruno@clisp.org>
10640
10641         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
10642         ISO C 99 Technical Corrigendum 1.
10643
10644 2006-06-22  Simon Josefsson  <jas@extundo.com>
10645
10646         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
10647         MinGW.
10648
10649 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
10650
10651         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
10652         needed.  Some compiler complained about some of them.  Problem reported
10653         by Larry Jones in
10654         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
10655
10656 2006-06-21  Simon Josefsson  <jas@extundo.com>
10657
10658         * tests/test-getaddrinfo.c: New file.
10659
10660         * modules/getaddrinfo-tests: New file.
10661
10662         * MODULES.html.sh: Add inet_pton.
10663
10664         * modules/inet_pton: New file.
10665
10666 2006-06-21  Simon Josefsson  <jas@extundo.com>
10667
10668         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
10669         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
10670         of using the (limited) gnulib implementation on Windows XP.
10671
10672         * m4/inet_pton.m4: New file.
10673
10674 2006-06-21  Simon Josefsson  <jas@extundo.com>
10675
10676         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
10677         variable.
10678
10679         * lib/socket_.h: Don't define WINVER.
10680
10681         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
10682         slightly modified to work in gnulib.
10683
10684 2006-06-21  Simon Josefsson  <jas@extundo.com>
10685
10686         * doc/gnulib.texi (Windows sockets): Add.
10687
10688 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
10689
10690         * lib/read-file.c (fread_file): Start with buffer allocation of
10691         0 bytes rather than 1 byte; this simplifies the code.
10692         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
10693         code to free buffer and save/restore errno.
10694         (internal_read_file): Remove unused local.
10695
10696 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
10697
10698         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
10699         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
10700         Problem reported by Denis Excoffier in
10701         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
10702
10703 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10704
10705         * modules/sys_socket, modules/socklen: Include sys/types since
10706         FreeBSD 4.x's sys/socket.h needs it.
10707
10708 2006-06-19  Simon Josefsson  <jas@extundo.com>
10709
10710         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
10711
10712 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
10713
10714         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
10715
10716 2006-06-19  Bruno Haible  <bruno@clisp.org>
10717
10718         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
10719         and FULL_PATH_INTTYPES_H in angle brackets.
10720         Reported by Mark D. Baushke <mdb@gnu.org>.
10721
10722 2006-06-17  Eric Blake  <ebb9@byu.net>
10723
10724         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
10725         errno.
10726
10727 2006-06-17  Bruno Haible  <bruno@clisp.org>
10728
10729         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
10730         <sys/inttypes.h>.
10731
10732 2006-06-17  Bruno Haible  <bruno@clisp.org>
10733
10734         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
10735         whether errno is declared. Assume <errno.h> declares errno.
10736
10737 2006-06-17  Bruno Haible  <bruno@clisp.org>
10738
10739         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
10740
10741 2006-06-17  Bruno Haible  <bruno@clisp.org>
10742
10743         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
10744         problem on Solaris 2.5.1.
10745
10746 2006-06-16  Eric Blake  <ebb9@byu.net>
10747
10748         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
10749         * lib/unicodeio.c [!defined errno]: Likewise.
10750         * lib/strtol.c [!defined errno]: Likewise.
10751         * lib/strtod.c [!defined errno]: Likewise.
10752
10753 2006-06-15  Eric Blake  <ebb9@byu.net>
10754
10755         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
10756
10757 2006-06-15  Eric Blake  <ebb9@byu.net>
10758
10759         * config/srclist.txt (ssize_t.m4): Lose sync.
10760
10761 2006-06-15  Bruno Haible  <bruno@clisp.org>
10762
10763         * modules/stdint (Files): Include m4/full-header-path.m4,
10764         m4/size_max.m4, m4/wchar_t.m4.
10765         (Makefile.am): Many more substitutions.
10766         * modules/stdint-tests: New file.
10767         * tests/test-stdint.c: New file.
10768
10769 2006-06-15  Bruno Haible  <bruno@clisp.org>
10770
10771         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
10772         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
10773         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
10774         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
10775         gl_CHECK_TYPE_SAME): New macros.
10776
10777 2006-06-15  Bruno Haible  <bruno@clisp.org>
10778
10779         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
10780
10781 2006-06-15  Bruno Haible  <bruno@clisp.org>
10782
10783         * lib/stdint_.h: Rewritten to be fully auto-configured.
10784         Fixes bug on HP-UX/IA64.
10785
10786 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
10787
10788         * lib/getdate.y (__attribute__): Don't define if already defined.
10789         Problem reported by Larry Jones.
10790         * lib/utimens.c (__attribute__): Likewise.
10791
10792 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
10793
10794         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
10795         reported by Andreas Schwab.
10796
10797 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10798             Bruno Haible  <bruno@clisp.org>
10799
10800         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
10801         check for the declaration of strnlen and a run test that exposes the
10802         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
10803         rpl_strndup.
10804
10805 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10806             Bruno Haible  <bruno@clisp.org>
10807
10808         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
10809
10810 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10811
10812         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
10813         compile test, for Tru64 4.0D.
10814
10815 2006-05-28  Karl Berry  <karl@gnu.org>
10816
10817         * config/srclist.txt (printf-args.c): lose sync.
10818
10819 2006-05-26  Martin Lambers  <marlam@marlam.de>
10820
10821         * lib/getpass.c: Updates the test for the native W32 API, and adds
10822         missing includes, thus fixing compilation warnings.
10823
10824 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10825
10826         * lib/exclude.c (exclude_fnmatch): New function.
10827         (excluded_file_name): Call exclude_fnmatch.
10828         * lib/exclude.h (excluded_file_name): New prototype
10829
10830 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
10831
10832         * lib/tempname.c (small_open, large_open): New macros.
10833         (__open, __open64) [!_LIBC]: Remove.
10834         (__gen_tempname): Use small_open and large_open instead of __open
10835         and __open64.  This fixes a portability bug on HP-UX 11.11i
10836         reported by Simon Wing-Tang in
10837         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
10838
10839 2006-05-24  Bruno Haible  <bruno@clisp.org>
10840
10841         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
10842         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
10843         Reported by Thorsten Maerz <torte@netztorte.de> via
10844         Aaron Stone <aaron@serendipity.cx>.
10845
10846 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
10847
10848         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
10849         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
10850         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
10851         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
10852         not really conditional on the cache.
10853         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
10854
10855 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
10856
10857         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
10858         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
10859         (my_usleep): Don't mishandle maximum value.
10860
10861 2006-05-19  Jim Meyering  <jim@meyering.net>
10862
10863         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
10864
10865 2006-05-17  Bruno Haible  <bruno@clisp.org>
10866
10867         Cygwin portability.
10868         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
10869
10870 2006-05-17  Bruno Haible  <bruno@clisp.org>
10871
10872         * lib/stdint_.h: Fix recognition of Cygwin.
10873
10874 2006-05-15  Bruno Haible  <bruno@clisp.org>
10875
10876         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
10877         on libtool patch by Ralf Wildenhues.
10878
10879 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10880
10881         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
10882         test for C99 conformance; (bool) 0.5 is an integer constant
10883         expression, but (bool) -0.5 is not.  Problem reported by Fedor
10884         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
10885
10886 2006-05-11  Simon Josefsson  <jas@extundo.com>
10887
10888         * m4/xvasprintf.m4: Fix obvious typo.
10889
10890 2006-05-11  Jim Meyering  <jim@meyering.net>
10891
10892         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
10893         James Lemley.
10894
10895 2006-05-10  Simon Josefsson  <jas@extundo.com>
10896
10897         * lib/md4.c: Typo fix, update copyright years.
10898         (K1, K2): Don't use L because it turn computations into 64-bit on
10899         64-bit platforms.
10900
10901 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
10902
10903         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
10904         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
10905         unwanted sign propagation, e.g., on hosts with 64-bit int.
10906         There still are some problems with reeelly weird theoretical hosts
10907         (e.g., 33-bit int) but it's not worth worrying about now.
10908         * lib/sha1.c (rol): Likewise.
10909         (K1, K2, K3, K4): Remove unnecessary L suffix.
10910
10911 2006-05-10  Bruno Haible  <bruno@clisp.org>
10912
10913         * lib/des.c: Cast to avoid warnings.
10914
10915 2006-05-09  Bruno Haible  <bruno@clisp.org>
10916
10917         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
10918         (Depends-on): Depend also on xsize, stdarg.
10919         (configure.ac): Add gl_XVASPRINTF.
10920
10921 2006-05-09  Bruno Haible  <bruno@clisp.org>
10922
10923         * m4/xvasprintf.m4: New file.
10924
10925 2006-05-09  Bruno Haible  <bruno@clisp.org>
10926
10927         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
10928         (EOVERFLOW): Define fallback value.
10929         (xstrcat): New function.
10930         (xvasprintf): Recognize the special case of a string concatenation.
10931
10932 2006-05-08  Eric Blake  <ebb9@byu.net>
10933
10934         * gnulib-tool (func_version): Base copyright year on CVS date.
10935         (func_emit_copyright_notice): New function.
10936         (func_emit_lib_Makefile_am): Use it.
10937         (func_emit_tests_Makefile_am): Likewise.
10938         (func_import): Likewise.
10939
10940 2006-05-08  Bruno Haible  <bruno@clisp.org>
10941
10942         * modules/stdarg: New file.
10943         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
10944
10945 2006-05-08  Bruno Haible  <bruno@clisp.org>
10946
10947         * m4/stdarg.m4: New file, from GNU gettext.
10948
10949 2006-05-08  Bruno Haible  <bruno@clisp.org>
10950
10951         * config/srclist.txt (build-aux/config.rpath): different from latest
10952         release.
10953
10954 2006-05-08  Bruno Haible  <bruno@clisp.org>
10955
10956         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
10957
10958 2006-05-05  Jim Meyering  <jim@meyering.net>
10959
10960         * m4/warning.m4: New file, derived from bison's file by the same name.
10961
10962 2006-05-03  Bruno Haible  <bruno@clisp.org>
10963
10964         * lib/stdint_.h: Shorter URL.
10965         * lib/inttypes.h: Likewise.
10966
10967 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10968
10969         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
10970
10971 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10972
10973         * lib/verify.h: Document the internals better.  Most of this change
10974         was written by Bruno Haible.
10975
10976 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10977
10978         * doc/verify.texi: New file, partly based on a proposal by
10979         Bruno Haible.
10980
10981 2006-05-02  Bruno Haible  <bruno@clisp.org>
10982
10983         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
10984         test from here...
10985         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
10986
10987 2006-04-29  Bruno Haible  <bruno@clisp.org>
10988
10989         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
10990         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
10991
10992 2006-04-29  Bruno Haible  <bruno@clisp.org>
10993
10994         * gnulib-tool: Make --update option actually work.
10995
10996 2006-04-29  Bruno Haible  <bruno@clisp.org>
10997
10998         * doc/gcd.texi: New file.
10999         * doc/gnulib.texi: Include it.
11000
11001 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
11002
11003         * lib/getdate.y (get_date): When adding relative date, start with the
11004         initial time, not with the result of the first mktime call.
11005
11006 2006-04-25  Bruno Haible  <bruno@clisp.org>
11007
11008         * gnulib-tool (func_import): Output the include directives in three
11009         blocks, sorted separately.
11010         Reported by Ben Pfaff <blp@cs.stanford.edu>.
11011
11012 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11013
11014         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
11015         to define main with arguments, for C++.  Reported by Eric Blake.
11016         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
11017         Prefer 'int main ()' to 'int main (void)', for C++.
11018         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
11019         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
11020         for 'main', for C99 and C++.
11021
11022 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11023
11024         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
11025         Don't assume that exit status -1 is valid.
11026         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
11027         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
11028         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
11029         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
11030         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
11031         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
11032         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
11033         functions can be used without declaring them, or that you can
11034         exit with status -1.
11035         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
11036
11037 2006-04-24  Karl Berry  <karl@gnu.org>
11038
11039         * config/srclist.txt (longdouble.m4): sync lost.
11040
11041 2006-04-24  Eric Blake  <ebb9@byu.net>
11042
11043         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
11044
11045 2006-04-24  Bruno Haible  <bruno@clisp.org>
11046
11047         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
11048         poll() implementation in AIX.
11049         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11050
11051 2006-04-24  Bruno Haible  <bruno@clisp.org>
11052
11053         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
11054         assigned exactly once.
11055
11056 2006-04-23  Claudio Fontana  <claudio@gnu.org>
11057             Bruno Haible  <bruno@clisp.org>
11058
11059         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
11060         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
11061         for AM_CPPFLAGS.
11062
11063 2006-04-23  Bruno Haible  <bruno@clisp.org>
11064
11065         * modules/copy-file: Depend on unistd.
11066         * modules/execute: Likewise.
11067         * modules/fatal-signal: Likewise.
11068         * modules/findprog: Likewise.
11069         * modules/mkdtemp : Likewise.
11070         * modules/pipe: Likewise.
11071         * modules/wait-process: Likewise.
11072
11073 2006-04-23  Bruno Haible  <bruno@clisp.org>
11074
11075         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
11076         condition was already detected.
11077         Reported by Ben Pfaff <blp@cs.stanford.edu>.
11078
11079 2006-04-23  Bruno Haible  <bruno@clisp.org>
11080
11081         * lib/copy-file.c: Include <unistd.h> unconditionally.
11082         * lib/execute.c: Likewise.
11083         * lib/fatal-signal.c: Likewise.
11084         * lib/findprog.c: Likewise.
11085         * lib/mkdtemp.c: Likewise.
11086         * lib/pipe.h: Likewise.
11087         * lib/pipe.c: Likewise.
11088         * lib/wait-process.h: Likewise.
11089
11090 2006-04-23  Bruno Haible  <bruno@clisp.org>
11091
11092         * gnulib-tool (func_usage): Fix --import description. Document
11093         --update.
11094         (func_import): Create temporary file in a temporary directory, if
11095         --dry-run is specified. Silence errors from 'grep' when there are no
11096         m4 files in $m4dir.
11097         (func_create_testdir): Silence errors from 'grep' when there are no
11098         m4 files in $m4dir.
11099         Reported by Karl Berry <karl@freefriends.org>.
11100
11101 2006-04-20  Bruno Haible  <bruno@clisp.org>
11102
11103         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
11104         one argument, so that the code will be portable to Autoconf 2.60.
11105         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
11106         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
11107         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
11108
11109 2006-04-19  Derek Price  <derek@ximbiot.com>
11110             Eric Blake  <ebb9@byu.net>
11111
11112         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
11113         rather than "/full/path.h".  Update comment to match.  Shorten &
11114         generalize m4_translit call via AS_TR_CPP.
11115
11116 2006-04-19  Derek Price  <derek@ximbiot.com>
11117             Eric Blake  <ebb9@byu.net>
11118
11119         * lib/inttypes.h: Correct grammar in comment.
11120
11121 2006-04-18  Derek Price  <derek@ximbiot.com>
11122             Paul Eggert  <eggert@cs.ucla.edu>
11123
11124         * modules/inttypes: New file.
11125         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
11126
11127 2006-04-18  Derek Price  <derek@ximbiot.com>
11128             Paul Eggert  <eggert@cs.ucla.edu>
11129
11130         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
11131         New files.
11132
11133 2006-04-18  Derek Price  <derek@ximbiot.com>
11134             Paul Eggert  <eggert@cs.ucla.edu>
11135
11136         * lib/inttypes.h: New file.
11137         * lib/strtoimax.c: Assume <inttypes.h>.
11138
11139 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
11140
11141         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
11142         isn't mounted.  Problem reported by Kir Kolyshkin.
11143
11144 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
11145
11146         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
11147         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
11148         Derek R. Price.
11149         * lib/regex.h (RE_DUP_MAX): Update comment to match current
11150         implementation.
11151
11152 2006-04-12  Eric Blake  <ebb9@byu.net>
11153
11154         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
11155         is now done automatically by the corresponding Autoconf macro.
11156
11157 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
11158
11159         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
11160         time_r.h.
11161
11162 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11163
11164         Merge regex changes from libc, removing some of our
11165         POSIX-conformance changes that were rejected and redoing them in a
11166         less-intrusive way.
11167
11168         * lib/regcomp.c (re_compile_internal, init_dfa):
11169         Length arg is now size_t, not Idx.  All uses changed.
11170         (peek_token): Forward decl now says internal_function.
11171         (__re_error_msgid, __re_error_msgid_idx):
11172         Now static rather than extern with attribute_hidden.
11173         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
11174         For some reason libc prefers K&R style defns for external functions.
11175         (regerror) [!defined _LIBC]: Likewise.
11176         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
11177         (seek_collating_symbol_entry, lookup_collation_sequence_value):
11178         (build_range_exp, build_collating_symbol):
11179         Use K&R-style defn.
11180         (re_compile_fastmap): Use '\0' to memset, not 0.
11181         (utf8_sb_map): Make the calculations more obvious.
11182         (init_dfa, parse_bracket_exp, build_charclass_op):
11183         Call calloc and cast result, as glibc does.
11184         (init_word_char, fetch_token, peek_token, peek_token_bracket):
11185         (build_range_exp, build_collating_symbol):
11186         Now internal functions.
11187
11188         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
11189
11190         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
11191         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
11192         Don't depend on VMS; depend on __VMS instead, for POSIX
11193         namespace cleanness.
11194         (regoff_t): Define to ssize_t, not long int.
11195
11196         Remove the REG_ macros named below.  Instead, make the old names
11197         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
11198         __USE_GNU_REGEX.
11199         (REG_BACKSLASH_ESCAPE_IN_LISTS):
11200         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
11201         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
11202         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
11203         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
11204         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
11205         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
11206         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
11207         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
11208         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
11209         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
11210         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
11211         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
11212         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
11213         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
11214         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
11215         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
11216         (REG_NREGS):
11217         Remove.  All uses replaced by the old RE_* names.
11218         (RE_BACKSLASH_ESCAPE_IN_LISTS):
11219         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
11220         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
11221         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
11222         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
11223         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
11224         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
11225         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
11226         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
11227         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
11228         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
11229         Don't bother having these macros be independent of each others'
11230         values, since they no longer exist in the POSIX name space.
11231
11232         Rename the following member names back to their old names,
11233         unless !__USE_GNU_REGEX.  All uses changed back.
11234         (buffer): Renamed from re_buffer.
11235         (allocated): Renamed from re_allocated.
11236         (used): Renamed from re_used.
11237         (syntax): Renamed from re_syntax.
11238         (fastmap): Renamed from re_fastmap.
11239         (translate): Renamed from re_translate.
11240         (can_be_null): Renamed from re_can_be_null.
11241         (regs_allocated): Renamed from re_regs_allocated.
11242         (fastmap_accurate): Renamed from re_fastmap_accurate.
11243         (no_sub): Renamed from re_no_sub.
11244         (not_bol): Renamed from re_not_bol.
11245         (not_eol): Renamed from re_not_eol.
11246         (newline_anchor): Renamed from re_newline_anchor.
11247         (num_regs): Renamed from rm_num_regs.
11248         (start): Renamed from rm_start.
11249         (end): Renamed from rm_end.
11250
11251         (free_state): Move up a bit.
11252
11253         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
11254         #define to be empty.
11255         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
11256         when that is what is intended.
11257         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
11258         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
11259         (MAX): New macro.
11260         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
11261         All uses changed back to re_malloc, etc.  It's now the caller's
11262         responsibility to check for overflow; all callers changed.
11263         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
11264         (re_x2nrealloc): Remove.
11265         (free_state): Remove decl.
11266
11267         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
11268         (re_set_registers, re_exec):
11269         Use K&R-style defn.
11270
11271         2006-01-31  Roland McGrath  <roland@redhat.com>
11272
11273         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
11274         Reported by Mike Frysinger <vapier@gentoo.org>.
11275
11276         2006-01-15  Andreas Jaeger  <aj@suse.de>
11277
11278         [BZ #1950]
11279         * lib/regex_internal.c (re_string_reconstruct): Adjust for
11280         build_wcs_upper_buffer change.
11281         (build_wcs_upper_buffer): Change return type.
11282
11283         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
11284
11285         * lib/regex_internal.h: Include <stdint.h> if available.
11286
11287         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
11288
11289         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
11290
11291         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
11292
11293         * lib/regcomp.c: Adjust for changed secondary hash function.
11294
11295         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
11296
11297         * lib/regex.h: Pretty printing.
11298         Clean up namespace a bit.
11299
11300         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
11301
11302         * lib/regexec.c (update_cur_sifted_state, check_arrival,
11303         check_arrival_add_next_nodes): Avoid using uninitialized variable.
11304
11305         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11306                     Ulrich Drepper  <drepper@redhat.com>
11307
11308         [BZ #1302]
11309         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
11310         changed.
11311         (bitset_word_t): Renamed from bitset_word.  All uses changed.
11312
11313         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
11314
11315         [BZ #281]
11316         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
11317         * lib/regcomp.c: Remove unnecessary uses of
11318         unsigned RE_TRANSLATE_TYPE.
11319         * lib/regex_internal.h: Likewise.
11320         * lib/regex_internal.c: Likewise.
11321         * lib/regexec.c: Likewise.
11322         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
11323
11324         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
11325
11326         * lib/regexec.c (find_recover_state): Remove unnecessary
11327         initialization.
11328         (transit_state_bkref): Make DFA a const pointer.
11329         (get_subexp): Likewise.
11330         (check_arrival): Likewise.
11331         (update_cur_sifted_state): Likewise.
11332         (re_search_internal): Likewise.
11333         (prune_impossible_nodes): Likewise.
11334         (acquire_init_state_context): Likewise.
11335         (proceed_next_node): Likewise.
11336         (set_regs): Likewise.
11337         (free_fail_stack_return): Likewise.
11338         (check_arrival_expand_ecl): Mark DFA parameter as const.
11339         (check_arrival_expand_ecl_sub): Likewise.
11340         (check_subexp_limits): Likewise.
11341         (sub_epsilon_src_nodes):  Likewise.
11342         (add_epsilon_src_nodes):  Likewise.
11343         (merge_state_array): Likewise.
11344         (update_regs): Likewise.
11345         (build_trtable): Likewise.
11346         (sift_states_backward): Mark MCTX parameter as const.
11347         (build_sifted_states): Likewise.
11348         (update_cur_sifted_state): Likewise.
11349         (sift_states_mkref): Likewise.
11350         (check_arrival_expand_ecl): Mark eclosure as const.
11351         (check_dst_limits_calc_pos_1): Likewise.
11352         * lib/regex_internal.h (re_match_context_t): Make dfa a const
11353         pointer.
11354
11355         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
11356
11357         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
11358         (transit_state_sb): Likewise.
11359         (transit_state_mb): Likewise.
11360         (sift_states_iter_mb): Likewise.
11361         (check_arrival_add_next_nodes): Likewise.
11362         (check_node_accept_bytes): Change first parameter to pointer-to-const.
11363         [_LIBC] (re_search_2_stub): Use mempcpy.
11364
11365         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
11366         mbrtowc for very simple UTF-8 case.
11367
11368         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
11369         a pointer-to-const.
11370         (re_acquire_state_context): Likewise.
11371         * lib/regex_internal.h: Adjust prototypes.
11372
11373         * lib/regex.c: Prevent using C++ compilers.
11374
11375         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
11376         (re_acquire_state_context): Likewise.
11377
11378 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11379
11380         * modules/regex (Depends-on): Add ssize_t.
11381
11382 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11383
11384         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
11385         translation table.
11386
11387 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11388
11389         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
11390
11391 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
11392             Bruno Haible  <bruno@clisp.org>
11393
11394         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
11395         <sys/types.h> and <inttypes.h>.
11396
11397 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11398
11399         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
11400         `__error_t_defined', so argp.h will not typedef the former.
11401
11402 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
11403
11404         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
11405         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
11406         glibc names.  Even if glibc is changed to conform to POSIX, the
11407         traditional names will be available anyway, since regex depends on
11408         the extensions module.  Also, fix a longstanding typo in the
11409         implementation of Spencer ERE test #75 from grep 2.3.  Problems
11410         reported by Emanuele Giaquinta.  Also, change sense of cached
11411         variable, so that the message makes sense.
11412
11413 2006-03-24  Simon Josefsson  <jas@extundo.com>
11414
11415         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
11416         including some doc fixes.
11417         (base64_encode_alloc): Fix +1 bug on allocation failures.
11418
11419 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11420
11421         * lib/base64.c (base64_encode): Do not read past end of array with
11422         unsanitized input on systems with CHAR_BIT > 8.
11423
11424 2006-03-24  Eric Blake  <ebb9@byu.net>
11425
11426         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
11427
11428 2006-03-22  Karl Berry  <karl@gnu.org>
11429
11430         * config/srclist.txt (*setenv.[ch]): get from coreutils.
11431         * config/srclistvars.sh (COREUTILS): new var.
11432
11433 2006-03-17  Jim Meyering  <jim@meyering.net>
11434
11435         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
11436         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
11437
11438 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
11439
11440         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
11441         no longer needs it.  Instead, check that regoff_t is as least
11442         as wide as ptrdiff_t.
11443
11444         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
11445         so that our regex.h stays compatible with the installed regex.
11446         This is helpful for installers who configure --without-included-regex.
11447         Problem reported by Emanuele Giaquinta.
11448
11449 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
11450
11451         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
11452         Typedef to long int, not to off_, as POSIX will likely change
11453         in that direction.
11454
11455 2006-03-15  Eric Blake  <ebb9@byu.net>
11456
11457         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
11458
11459 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11460
11461         * lib/argp-help.c (validate_uparams): Fix typo
11462         * lib/argp-parse.c (argp_default_options): Consistently begin help
11463         messages with a lowercase letter.
11464
11465 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
11466
11467         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
11468         overrun buffers and shouldn't be used (much as gets shouldn't be
11469         used).
11470         * lib/time_r.c (asctime_r, ctime_r): Likewise.
11471
11472 2006-03-08  Simon Josefsson  <jas@extundo.com>
11473
11474         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
11475         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11476
11477 2006-03-08  Simon Josefsson  <jas@extundo.com>
11478
11479         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
11480         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11481
11482 2006-03-08  Simon Josefsson  <jas@extundo.com>
11483
11484         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
11485         signal that configure disabled the device.
11486
11487 2006-03-08  Simon Josefsson  <jas@extundo.com>
11488
11489         * build-aux/maint.mk: Fix refresh-po, to handle no translated
11490         languages.
11491
11492 2006-03-07  Simon Josefsson  <jas@extundo.com>
11493
11494         * modules/getopt (Depends-on): Add unistd.
11495
11496         * modules/unistd: New file.
11497
11498 2006-03-07  Simon Josefsson  <jas@extundo.com>
11499
11500         * modules/gc-random: New file.
11501
11502 2006-03-07  Simon Josefsson  <jas@extundo.com>
11503
11504         * m4/unistd_h.m4: New file.
11505
11506 2006-03-07  Simon Josefsson  <jas@extundo.com>
11507
11508         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
11509         test to be side-effect free by storing the result in the cache
11510         variable gl_cv_lib_readline, and moving the assignment of
11511         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
11512         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11513
11514 2006-03-07  Simon Josefsson  <jas@extundo.com>
11515
11516         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
11517         error on missing devices (the functions will return an error).
11518
11519         * m4/gc.m4: Move random stuff to gc-random.m4
11520
11521 2006-03-07  Simon Josefsson  <jas@extundo.com>
11522
11523         * lib/unistd_.h: New file.
11524
11525 2006-03-07  Simon Josefsson  <jas@extundo.com>
11526
11527         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
11528
11529 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11530
11531         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
11532         Problem reported by Juan Manuel Guerrero.
11533
11534 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11535
11536         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
11537         the unistd module.
11538         * lib/getlogin_r.c: Likewise.
11539         * lib/getlogin_r.h: Likewise.
11540         * lib/glob.c: Likewise.
11541         * lib/pagealign_alloc.c: Likewise.
11542         * lib/unistd_.h: Remove; no longer needed.
11543
11544 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11545
11546         * MODULES.html.sh (Support for systems lacking POSIX:2001):
11547         Add unistd.
11548         * modules/c-stack (Depends-on): Add unistd.
11549         * modules/getlogin_r: Likewise.
11550         * modules/glob: Likewise.
11551         * modules/pagealign_alloc: Likewise.
11552         * modules/unistd (Files): Remove lib/unistd_.h.
11553         (EXTRA_DIST): Remove.
11554         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
11555         need unistd_.h.
11556         (MOSTLYCLEANFILES): Remove unistd.h-t.
11557
11558 2006-03-03  Simon Josefsson  <jas@extundo.com>
11559
11560         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
11561
11562 2006-03-03  Simon Josefsson  <jas@extundo.com>
11563
11564         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
11565         libidn and bison.
11566
11567 2006-03-03  Simon Josefsson  <jas@extundo.com>
11568
11569         * build-aux/maint.mk: Add indent target.
11570
11571 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
11572
11573         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
11574         our replacement poll.h in any case, to avoid a differing
11575         declaration from a system header.  Seen on AIX.
11576
11577 2006-03-01  Simon Josefsson  <jas@extundo.com>
11578
11579         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
11580         <kasal@ucw.cz>.
11581
11582 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11583
11584         * modules/gettime (Depends-on): Add extensions module.
11585         * modules/nanosleep (Depends-on): Likewise.
11586         * modules/settime (Depends-on): Likewise.
11587
11588 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11589
11590         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
11591         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
11592         pedantically.
11593         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
11594         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
11595
11596         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
11597         not "==".  Reported by Ralf Wildenhues.
11598
11599 2006-03-01  Karl Berry  <karl@gnu.org>
11600
11601         * doc/Copyright/request-*: new files, synced from gnuorg.
11602
11603 2006-03-01  Karl Berry  <karl@gnu.org>
11604
11605         * config/srclist.txt (Copyright/*): new entries.
11606
11607 2006-02-28  Simon Josefsson  <jas@extundo.com>
11608
11609         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
11610
11611 2006-02-27  Simon Josefsson  <jas@extundo.com>
11612
11613         * lib/base64.h: Indent #define's.  From Jim Meyering
11614         <jim@meyering.net>.
11615
11616 2006-02-27  Jim Meyering  <jim@meyering.net>
11617
11618         Revert the change of 2006-02-24, so these files can continue
11619         to be sync'd from gettext.
11620         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
11621         of `config.h'.
11622
11623 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
11624
11625         * modules/intprops: New file.
11626         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
11627         Add intprops.
11628         * modules/getloadavg (Files): Remove lib/intprops.h.
11629         (Depends-on): Add intprops.
11630         * modules/human: Likewise.
11631         * modules/inttostr: Likewise.
11632         * modules/openat: Likewise.
11633         * modules/sig2str: Likewise.
11634         * modules/userspec: Likewise.
11635         * modules/utimecmp: Likewise.
11636         * modules/xnanosleep: Likewise.
11637         * modules/xstrtol: Likewise.
11638
11639 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
11640
11641         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
11642         * modules/lock-tests (TESTS): Use $(EXEEXT).
11643         * modules/tls-tests: Likewise.
11644         * modules/argp-tests: Likewise.
11645         (check_PROGRAMS): New var, replacing...
11646         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
11647
11648 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11649
11650         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
11651         `config.h'.
11652
11653 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
11654
11655         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
11656
11657 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11658
11659         Sync from coreutils.
11660         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
11661         gl_CHDIR_SAFER.
11662
11663 2006-02-22  Jim Meyering  <jim@meyering.net>
11664
11665         Sync from coreutils.
11666         * m4/chdir-safer.m4: New file.
11667
11668 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
11669
11670         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
11671         AT_FDCWD exceeds INT_MAX.
11672         * lib/openat.h (AT_FDCWD): Likewise.
11673
11674 2006-02-17  Eric Blake  <address@hidden>
11675
11676         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
11677
11678 2006-02-16  Simon Josefsson  <jas@extundo.com>
11679
11680         * modules/getaddrinfo (Depends-on): Add sys_socket.
11681
11682 2006-02-15  Simon Josefsson  <jas@extundo.com>
11683
11684         * build-aux/maint.mk: Add dsyntax-check rule.
11685
11686 2006-02-15  Eric Blake  <ebb9@byu.net>
11687
11688         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
11689         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
11690         'present but cannot compile' warnings on cygwin.
11691         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
11692         use ws2tcpip.h if sys/socket.h works.
11693         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
11694         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
11695
11696 2006-02-14  Simon Josefsson  <jas@extundo.com>
11697
11698         * modules/maintainer-makefile (Files): Rename.
11699
11700         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
11701         and (the local) Makefile.cfg to maint-cfg.mk.
11702
11703         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
11704         to the latter.
11705
11706         * modules/maintainer-makefile: New module.
11707
11708         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
11709         severaly stripped to make it possible to build it up from scratch
11710         with reliable tests.
11711
11712         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
11713         fixes to permit overriding the default actions when configure and
11714         makefile are not available.
11715
11716 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
11717
11718         Sync from coreutils.
11719         * modules/lstat (Depends-on): Don't depend on xalloc.
11720         (License): Change from GPL to LGPL, since this is now simply a
11721         replacement for a libc function.
11722
11723 2006-02-14  Jim Meyering  <jim@meyering.net>
11724
11725         Sync from coreutils.
11726
11727         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
11728         failure on deficient systems, and simplify gnulib lgpl dependencies.
11729         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
11730         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
11731
11732         * lib/xalloc-die.c: Remove unused definition of N_.
11733
11734 2006-02-14  Jim Meyering  <jim@meyering.net>
11735
11736         Sync from coreutils.
11737         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
11738         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
11739         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
11740         double-quote uses of that variable, to accommodate the rare case in
11741         which getmntent is available in none of the libraries checked.  This
11742         happens at least on FreeBSD 5.0.
11743
11744 2006-02-13  Simon Josefsson  <jas@extundo.com>
11745
11746         * gnulib-tool (Usage): Fix --import, from
11747         karl@freefriends.org (Karl Berry).
11748
11749 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11750
11751         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
11752
11753 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11754
11755         * lib/argp-namefrob.h: Restore changes accidentally lost during the
11756         "autoupdate" on 2005-12-12.
11757
11758 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
11759
11760         * modules/closeout (Depends-on): Remove atexit.
11761
11762 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
11763
11764         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
11765         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
11766
11767 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
11768
11769         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
11770         __EXTENSIONS__ if this causes compilation to fail.  Problem
11771         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
11772         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
11773
11774 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
11775
11776         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
11777         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
11778         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
11779         All uses changed.
11780
11781 2006-01-26  Simon Josefsson  <jas@extundo.com>
11782
11783         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
11784         prototype is visible on mingw32.
11785
11786         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
11787         for mingw32.
11788
11789         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
11790         mingw32).
11791
11792 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
11793
11794         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
11795         attempt to open for write; this always fails, at least on POSIX
11796         hosts.  This reinstates the 2006-01-09 change, which was
11797         inadvertently removed.
11798
11799 2006-01-26  Bruno Haible  <bruno@clisp.org>
11800
11801         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
11802         Reported by Paul Eggert.
11803
11804 2006-01-26  Bruno Haible  <bruno@clisp.org>
11805             Paul Eggert  <eggert@cs.ucla.edu>
11806
11807         * lib/stdbool_.h (_Bool)
11808         [(! (defined __cplusplus || defined __BEOS__)
11809           && !defined __GNUC__
11810           && !(defined __HP_cc || defined __xlc__
11811                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
11812                || defined __sgi))]:
11813         #define to signed char in these cases too; this simplifies
11814         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
11815         etc., separately) and makes it more conservative.
11816
11817 2006-01-25  Simon Josefsson  <jas@extundo.com>
11818
11819         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
11820         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
11821         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
11822
11823 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11824
11825         * lib/argp-namefrob.h: Bugfix. Remove stray #
11826
11827 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
11828
11829         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
11830         so that we test the test.
11831         Check for yet another HP-UX cc bug involving *bool |= bool.
11832
11833 2006-01-25  Karl Berry  <karl@gnu.org>
11834
11835         * config/srclist.txt (vasnprintf.c): sync lost.
11836
11837 2006-01-25  Jim Meyering  <jim@meyering.net>
11838
11839         Sync from the stable (b5) branch of coreutils:
11840
11841         * lib/fts.c (fts_children): Don't let close() clobber errno from
11842         failed fchdir().
11843
11844         * lib/fts.c (fts_stat): When following a symlink-to-directory,
11845         don't necessarily interpret stat-fails+lstat-succeeds as indicating
11846         a dangling symlink.  That can also happen at least for ELOOP.
11847         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
11848         FYI, this bug predates the inclusion of fts.c in coreutils.
11849
11850         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
11851         in their own block, so pre-c99 compilers don't object.
11852
11853         Avoid the double-free (first in fts_read, second in fts_close) that
11854         would occur when an `active' directory is made inaccessible (e.g.,
11855         via chmod a-x) during a traversal.
11856         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
11857         before returning.  Reproduce this failure by
11858         mkdir -p a/b; cd a; chmod a-x . b
11859         Reported by Stavros Passas.
11860
11861 2006-01-25  Jim Meyering  <jim@meyering.net>
11862
11863         * lib/fileblocks.c: Remove more useless parentheses.
11864         * lib/readutmp.h: Likewise.
11865
11866 2006-01-25  Bruno Haible  <bruno@clisp.org>
11867
11868         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
11869         warnings.
11870         Reported by Paul Eggert.
11871
11872 2006-01-25  Bruno Haible  <bruno@clisp.org>
11873
11874         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
11875         rid of a trap command. For Solaris sh.
11876         Reported by Mark D. Baushke <mdb@gnu.org>.
11877
11878 2006-01-24  Simon Josefsson  <jas@extundo.com>
11879
11880         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
11881         Bruno.
11882
11883 2006-01-24  Karl Berry  <karl@gnu.org>
11884
11885         * config/srclist.txt (argp-namefrob.h): sync lost.
11886
11887 2006-01-24  Jim Meyering  <jim@meyering.net>
11888
11889         * modules/openat (Files): Add lib/intprops.h.
11890         From Mark D. Baushke.
11891
11892 2006-01-24  Jim Meyering  <jim@meyering.net>
11893
11894         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
11895         Reported by Mark D. Baushke.
11896
11897 2006-01-24  Jim Meyering  <jim@meyering.net>
11898
11899         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
11900
11901 2006-01-24  Bruno Haible  <bruno@clisp.org>
11902
11903         * modules/strnlen (Maintainer): Change from glibc to all.
11904
11905 2006-01-24  Bruno Haible  <bruno@clisp.org>
11906
11907         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
11908         Patch by Paul Eggert.
11909
11910 2006-01-24  Bruno Haible  <bruno@clisp.org>
11911
11912         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
11913         already has it.
11914         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
11915         2005-11-26.
11916
11917         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
11918         'signed char' to avoid problems with the built-in _Bool type.
11919         Reported by Paul Eggert on 2005-11-26.
11920
11921 2006-01-24  Bruno Haible  <bruno@clisp.org>
11922
11923         * gnulib-tool (func_import): Avoid constructing complicated sed
11924         expressions inside backquote.
11925         Report and solution by Mark D. Baushke <mdb@gnu.org>.
11926
11927 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
11928
11929         These changes imported from libc.
11930         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
11931         test and two separate function calls.
11932         * lib/strndup.c (__strndup): Add libc_hidden_def.
11933
11934 2006-01-23  Simon Josefsson  <jas@extundo.com>
11935
11936         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
11937         Remove the test_*_SOURCES variable: automake infers it by default.
11938         * modules/tls-tests: Likewise.
11939
11940 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11941
11942         Work around porting bugs reported by Dieter in
11943         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
11944         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
11945         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
11946         Include "getopt.h" first, to check interface.
11947         (getenv): Declare only if defined HAVE_DECL_GETENV &&
11948         !HAVE_DECL_GETENV.
11949         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
11950         (__strndup): Revert to K&R-style function dfns, the glibc style.
11951         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
11952         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
11953         Include strnlen.h first, to get prototype properly.
11954         (strnlen): Renamed from __strnlen.
11955         Remove weak alias.
11956
11957 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11958
11959         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
11960
11961 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11962
11963         * config/srclist.txt: Adjust to reflect glibc reorganization.
11964         This affects only comments.
11965
11966 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11967
11968          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
11969          Reported by Bruce Korb <bkorb@gnu.org>.
11970
11971 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
11972
11973         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
11974         to pacify gcc -Wswitch-default.
11975
11976 2006-01-22  Bruno Haible  <bruno@clisp.org>
11977
11978         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
11979         temporary buffer for sprintf, take into account the precision also
11980         for 'd', 'i', 'u', 'o', 'x', 'X'.
11981
11982 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11983
11984         * modules/argp-tests: New module
11985         * tests/test-argp.c: New file
11986         * tests/test-argp-2.sh: New file
11987
11988 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11989
11990         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
11991         (__argp_base_name): Removed
11992         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
11993         typo.
11994         (__argp_base_name): Provide macro definition or extern declaration
11995         depending on the configuration
11996
11997 2006-01-20  Simon Josefsson  <jas@extundo.com>
11998
11999         * modules/inet_ntop (Depends-on): Depend on sys_socket.
12000
12001 2006-01-20  Simon Josefsson  <jas@extundo.com>
12002
12003         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
12004
12005 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12006
12007         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
12008         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
12009         Suggested by Bruno Haible.
12010
12011 2006-01-20  Karl Berry  <karl@gnu.org>
12012
12013         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
12014         until changes propagate, I guess.
12015
12016 2006-01-19  Simon Josefsson  <jas@extundo.com>
12017
12018         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
12019
12020 2006-01-19  Simon Josefsson  <jas@extundo.com>
12021
12022         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
12023
12024 2006-01-19  Simon Josefsson  <jas@extundo.com>
12025
12026         * gnulib-tool: Set check_PROGRAMS.
12027
12028         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
12029         modules/des-tests, modules/gc-arcfour-tests,
12030         modules/gc-arctwo-tests, modules/gc-des-tests,
12031         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
12032         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
12033         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
12034         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
12035         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
12036         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
12037         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
12038         test_*_SOURCES.
12039
12040 2006-01-18  Simon Josefsson  <jas@extundo.com>
12041
12042         * modules/socklen (Depends-on): Depend on sys_socket.
12043
12044 2006-01-18  Simon Josefsson  <jas@extundo.com>
12045
12046         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
12047         modules/des-tests, modules/gc-arcfour-tests,
12048         modules/gc-arctwo-tests, modules/gc-des-tests,
12049         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
12050         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
12051         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
12052         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
12053         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
12054         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
12055         $(EXEEXT) to automake TESTS variable, for mingw32.
12056
12057 2006-01-17  Simon Josefsson  <jas@extundo.com>
12058
12059         * modules/socklen (Include): Need sys/socket.h.
12060
12061 2006-01-17  Bruno Haible  <bruno@clisp.org>
12062
12063         * modules/ssize_t (Include): Add <sys/types.h>.
12064
12065 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
12066
12067         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
12068         it's not portable and it doesn't work with cross-compiles.
12069         Problem reported by Bruno Haible.  Fix missing-$ typo in
12070         'test "gl_cv_ignore_unused_libraries" ...' that prevented
12071         -zignore from being used with Sun's C compiler.
12072
12073 2006-01-12  Simon Josefsson  <jas@extundo.com>
12074
12075         * lib/base64.c: Fix warning, reported by Bruno Haible
12076         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
12077
12078 2006-01-12  Bruno Haible  <bruno@clisp.org>
12079
12080         * modules/ldd: New file.
12081         * build-aux/ldd.sh.in: New file.
12082         * MODULES.html.sh (Support for building libraries and executables): Add
12083         ldd.
12084
12085 2006-01-12  Bruno Haible  <bruno@clisp.org>
12086
12087         * m4/ldd.m4: New file.
12088
12089 2006-01-12  Bruno Haible  <bruno@clisp.org>
12090
12091         * gnulib-tool (func_import, func_create_testdir): Don't go into an
12092         endless loop while replacing $auxdir with build-aux.
12093
12094 2006-01-11  Simon Josefsson  <jas@extundo.com>
12095
12096         * lib/stdint_.h (SIZE_MAX): Add missing (.
12097
12098 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
12099
12100         Sync from coreutils.
12101         * lib/md5.c: Fix commentary typos.
12102         (alignof, UNALIGNED_P): No need for a GCC-specific version.
12103         * lib/md5.h (__attribute__): Remove; unused.
12104         * lib/sha1.c: Fix commentary to match md5 better.
12105         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
12106         so that we don't need to worry about alignment.  All uses changed.
12107         This merges the 2005-10-28 md5 change into sha1.
12108
12109 2006-01-11  Jim Meyering  <jim@meyering.net>
12110
12111         Sync from coreutils.
12112         * lib/md5.c (OP): Fix spacing.
12113
12114 2006-01-11  Bruno Haible  <bruno@clisp.org>
12115
12116         Ensure automatic ordering between gl_LOCK and gl_ARGP.
12117         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
12118         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
12119
12120 2006-01-11  Bruno Haible  <bruno@clisp.org>
12121
12122         Ensure automatic ordering between gl_LOCK and gl_ARGP.
12123         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
12124         the "early" section as well.
12125
12126 2006-01-11  Bruno Haible  <bruno@clisp.org>
12127
12128         Avoid "ar: no archive members specified" error on MacOS X.
12129         * gnulib-tool (func_modules_add_dummy): New function.
12130         (func_import, func_create_testdir): Invoke it.
12131
12132 2006-01-11  Bruno Haible  <bruno@clisp.org>
12133
12134         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
12135         with $auxdir in AC_CONFIG_FILES statements.
12136
12137 2006-01-11  Bruno Haible  <bruno@clisp.org>
12138
12139         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12140         Initialize also noinst_HEADERS to empty.
12141
12142 2006-01-11  Bruno Haible  <bruno@clisp.org>
12143
12144         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
12145         variables.
12146         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
12147         autoreconf.
12148
12149 2006-01-11  Bruno Haible  <bruno@clisp.org>
12150
12151         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
12152         overridable by the user.
12153         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12154
12155 2006-01-10  Simon Josefsson  <jas@extundo.com>
12156
12157         * modules/sys_socket: New file.
12158
12159 2006-01-10  Simon Josefsson  <jas@extundo.com>
12160
12161         * m4/sys_socket_h.m4: New file.
12162
12163 2006-01-10  Simon Josefsson  <jas@extundo.com>
12164
12165         * lib/socket_.h: New file.
12166
12167 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12168
12169         * modules/readutmp (Maintainer): Add myself.
12170
12171 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12172
12173         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
12174         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
12175         People who are still concerned with buggy memcmp implementations
12176         can invoke gl_FUNC_MEMCMP themselves.
12177
12178 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12179
12180         * lib/regex_internal.h (BITSET_WORD_BITS):
12181         Work around a bug in 64-bit PGC (before version 6.1-2), where the
12182         preprocessor mishandles large unsigned values as if they were signed.
12183         Problem reported by Claudio Fontana in
12184         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
12185
12186 2006-01-10  Jim Meyering  <jim@meyering.net>
12187
12188         Avoid the double-free (first in fts_read, second in fts_close) that
12189         would occur when an `active' directory is made inaccessible (e.g.,
12190         via chmod a-x) during a traversal.
12191         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
12192         before returning.  Reproduce this failure by
12193         mkdir -p a/b; cd a; chmod a-x . b
12194         Reported by Stavros Passas.
12195
12196         Sync from coreutils.
12197         * lib/sha1.c: Tweak grammar in a comment.
12198
12199 2006-01-10  Jim Meyering  <jim@meyering.net>
12200
12201         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
12202         Patch by Joerg Sonnenberger.
12203
12204 2006-01-10  Bruno Haible  <bruno@clisp.org>
12205
12206         * modules/readutmp: Depend on module free.
12207         * modules/strtok_r: Depend on module restrict.
12208
12209 2006-01-10  Bruno Haible  <bruno@clisp.org>
12210
12211         * modules/gettext (configure.ac): Add an invocation of
12212         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
12213
12214 2006-01-10  Bruno Haible  <bruno@clisp.org>
12215
12216         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
12217         Reported by Werner Lemberg <wl@gnu.org>.
12218
12219 2006-01-10  Bruno Haible  <bruno@clisp.org>
12220
12221         * lib/localcharset.c: Update from GNU gettext.
12222
12223 2006-01-10  Bruno Haible  <bruno@clisp.org>
12224
12225         * lib/argp.h (__const): Remove macro. Use const instead.
12226         * lib/argp-fmtstream.h (__const): Likewise.
12227         * lib/glob_.h (__const): Remove macro.
12228         * lib/glob-libc.h: Use const instead of __const.
12229
12230 2006-01-10  Bruno Haible  <bruno@clisp.org>
12231
12232         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
12233         variable.
12234         Needed to avoid an automake error regarding the 'gettext' module.
12235
12236 2006-01-09  Simon Josefsson  <jas@extundo.com>
12237
12238         * modules/inet_ntop (Depends-on): Add restrict.
12239
12240 2006-01-09  Simon Josefsson  <jas@extundo.com>
12241
12242         * modules/gc-rijndael-tests (License): Put under LGPL.
12243
12244         * modules/gc-des-tests (License): Likewise.
12245
12246         * modules/gc-arcfour-tests (License): Likewise.
12247
12248         * modules/gc-arctwo-tests (License): Likewise.
12249
12250         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
12251
12252         * modules/gc-hmac-sha1-tests (Files): Likewise.
12253
12254         * modules/gc-hmac-md5-tests (License): Likewise.
12255
12256         * modules/gc-sha1-tests (License): Likewise.
12257
12258         * modules/gc-md5-tests (License): Likewise.
12259
12260         * modules/gc-md4-tests (License): Likewise.
12261
12262         * modules/gc-md2-tests (License): Likewise.
12263
12264         * modules/gc-tests (License): Likewise.
12265
12266         * modules/des-tests (License): Likewise.
12267
12268         * modules/md4-tests (License): Likewise.
12269
12270         * modules/md2-tests (License): Likewise.
12271
12272 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12273
12274         Sync from coreutils:
12275
12276         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
12277         * modules/lib-ignore: New file.
12278         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
12279         chdir-safer.m4, lchmod.m4.
12280         * modules/openat: Add mkdirat.c, openat-priv.h.
12281
12282 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12283
12284         Sync from coreutils.
12285         * m4/lib-ignore.m4: New file.
12286         * m4/lchmod.m4: New file.
12287
12288 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12289
12290         Sync from coreutils.
12291         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
12292         for write access: POSIX says that must fail.
12293         * lib/fts.c (diropen): Likewise.
12294         * lib/save-cwd.c (save_cwd): Likewise.
12295         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
12296         well, for minor improvements on hosts that lack O_DIRECTORY.
12297         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
12298         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
12299         Fall back on chown if open failed with EACCES.
12300
12301         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
12302         Report an error at compile-time if only a 1-second nominal clock
12303         resolution is found.
12304
12305         * lib/lchmod.h: New file.
12306         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
12307         (make_dir_parents): Use lchown rather than chown, and
12308         lchmod rather than chmod.
12309
12310         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
12311         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
12312         "proc" reported by n0dalus.
12313
12314         * lib/mountlist.c: Include <limits.h>.
12315         (dev_from_mount_options)
12316         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
12317         New function.  It no longer assumes "dev=" has the System V meaning
12318         on Linux (since it doesn't).  It also parses "dev=" more carefully.
12319         (read_file_system_list)
12320         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
12321         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
12322         dev= in that case.
12323
12324         * lib/posixtm.h (PDS_PRE_2000): New macro.
12325         * lib/posixtm.c (year): Arg is now syntax_bits rather than
12326         allow_century.  All usages changed.  Reject dates outside the range
12327         1969-1999 if PDS_PRE_2000 is used.
12328
12329 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12330
12331         Sync from coreutils.
12332         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
12333         (Time of day items): Mention the possibility of leap seconds.
12334         Problem reported by Dr. David Alan Gilbert.
12335
12336 2006-01-09  Jim Meyering  <jim@meyering.net>
12337
12338         Sync from coreutils.
12339
12340         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
12341
12342         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
12343
12344         * lib/modechange.c (mode_compile): Reject an invalid mode string
12345         that starts with an octal digit.  From Andreas Gruenbacher.
12346
12347         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
12348         and dup to open_safer and dup_safer, respectively.
12349         (openat_permissive): Fix typo in comment.
12350
12351         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
12352         "gettext.h"; either no longer needed or are guaranteed by openat.h.
12353         (_): Remove; no longer needed.
12354         (openat): Renamed from rpl_openat; no need for rpl_openat
12355         since openat.h renames openat for us.
12356         Replace most of the body with a call to openat_permissive,
12357         to avoid duplicate code.
12358         Port to (probably hypothetical) environments were mode_t is
12359         wider than int.
12360         (openat_permissive): Require mode arg, so that we can check
12361         types better.  Put it just after flags.  Change cwd failure
12362         indicator from pointer-to-bool to pointer-to-errno-value.
12363         All callers changed.
12364         Invoke openat_save_fail and/or openat_restore_fail if
12365         cwd_errno is null, so that openat can call us.
12366         (openat_permissive, fdopendir, fstatat, unlinkat):
12367         Simplify errno handling to avoid some duplicate code,
12368         as it's OK to set errno on success.
12369         * lib/openat.h: Revamp code so that function macros depend on
12370         __OPENAT_PREFIX only, not also on AT_FDCWD.
12371         (openat_ro): Remove.  Caller changed to use openat_permissive.
12372         (openat_permissive): Now a macro, if not a function.
12373         (openat_restore_fail, openat_save_fail): Now always functions,
12374         since mkdirat needs them even if __OPENAT_PREFIX is defined.
12375
12376         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
12377         and openat.c.
12378         * lib/mkdirat.c: Include openat-priv.h.
12379         Remove definitions of macros defined therein.
12380         * lib/openat.c: Likewise.
12381
12382         * lib/mkdirat.c (mkdirat): New file and function.
12383         * lib/openat.h (mkdirat): Declare.
12384
12385         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
12386
12387         * lib/openat.h (openat_permissive): Declare.
12388         (openat_ro): Define.
12389
12390         * lib/openat.c (EXPECTED_ERRNO): New macro.
12391         (openat_permissive): New function -- used in remove.c rewrite.
12392         (all functions): Set errno just before returning, only if there
12393         was an actual failure.
12394         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
12395
12396         Emulate openat-family functions using Linux's procfs, if possible.
12397         Idea and some code based on Ulrich Drepper's glibc changes.
12398
12399         * lib/openat.c: (BUILD_PROC_NAME): New macro.
12400         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
12401         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
12402         before falling back on save_cwd and restore_cwd.
12403         (fdopendir, fstatat, unlinkat): Likewise.
12404
12405         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
12406         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
12407
12408         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
12409         as second argument to va_arg.  Otherwise, some versions of gcc
12410         warn that `if this code is reached, the program will abort'.
12411
12412 2006-01-09  Jim Meyering  <jim@meyering.net>
12413
12414         Sync from coreutils.
12415         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
12416         Require openat-priv.h.
12417
12418 2006-01-09  Bruno Haible  <bruno@clisp.org>
12419
12420         * modules/strnlen (Include): Use strnlen.h.
12421
12422 2006-01-09  Bruno Haible  <bruno@clisp.org>
12423
12424         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
12425
12426 2006-01-09  Bruno Haible  <bruno@clisp.org>
12427
12428         * lib/sysexit_.h (EX_OK): New macro.
12429         Suggested by Martin Lambers <marlam@marlam.de>.
12430
12431 2006-01-09  Bruno Haible  <bruno@clisp.org>
12432
12433         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
12434         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
12435
12436 2006-01-09  Bruno Haible  <bruno@clisp.org>
12437
12438         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
12439         numbers.
12440
12441 2006-01-09  Bruno Haible  <bruno@clisp.org>
12442
12443         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
12444         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
12445         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
12446         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
12447
12448 2006-01-09  Bruno Haible  <bruno@clisp.org>
12449
12450         * build-aux/javacomp.sh.in: New file, moved from lib/.
12451         * modules/javacomp-script (Files): Update.
12452         (configure.ac): Add AC_CONFIG_FILES invocation.
12453         (EXTRA_DIST): Remove variable.
12454
12455         * build-aux/javaexec.sh.in: New file, moved from lib/.
12456         * modules/javaexec (Files): Update.
12457         (configure.ac): Add AC_CONFIG_FILES invocation.
12458         (EXTRA_DIST): Remove javaexec.sh.in.
12459
12460         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
12461         * modules/csharpcomp-script (Files): Update.
12462         (configure.ac): Add AC_CONFIG_FILES invocation.
12463         (EXTRA_DIST): Remove variable.
12464
12465         * build-aux/csharpexec.sh.in: New file, moved from lib/.
12466         * modules/csharpexec (Files): Update.
12467         (configure.ac): Add AC_CONFIG_FILES invocation.
12468         (EXTRA_DIST): Remove csharpexec.sh.in.
12469
12470 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
12471
12472         Sync from coreutils.
12473
12474         Add POSIX ACL support
12475         * lib/acl.h (copy_acl, set_acl): Add declarations.
12476         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
12477         systems other than Linux.
12478         (chmod_or_fchmod): New function: use fchmod when possible,
12479         and chmod otherwise.
12480         (file_has_acl): Add a POSIX ACL implementation, with a
12481         Linux-specific subcase.
12482         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
12483         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
12484         acls are unsupported.
12485         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
12486         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
12487         are unsupported.
12488
12489 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
12490
12491         Sync from coreutils.
12492         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
12493
12494 2006-01-07  Bruno Haible  <bruno@clisp.org>
12495
12496         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
12497         gl_EARLY.
12498
12499 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12500
12501         * lib/strftime.c (tzname): Don't declare if it is already #defined.
12502         Problem reported for Mingw by Mark Junker.
12503
12504 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12505
12506         * README: Gnulib normally doesn't generate a tarball.
12507
12508 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
12509
12510         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
12511         long int, not int, for nanosecond counts, so that people who are
12512         used to POSIX struct timespec won't be surprised.  Reported by Jim
12513         Meyering.
12514
12515 2005-12-28  Bruno Haible  <bruno@clisp.org>
12516
12517         * build-aux/config.rpath: Update from GNU gettext.
12518
12519 2005-12-16  Jim Meyering  <jim@meyering.net>
12520
12521         * modules/fprintftime: New module.
12522         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
12523
12524 2005-12-16  Jim Meyering  <jim@meyering.net>
12525
12526         * m4/fprintftime.m4: New file.
12527
12528 2005-12-16  Jim Meyering  <jim@meyering.net>
12529
12530         * lib/fprintftime.c, lib/fprintftime.h: New files.
12531
12532 2005-12-15  Simon Josefsson  <jas@extundo.com>
12533
12534         * modules/socklen (configure.ac): Fix M4 macro name, to align with
12535         new m4/socklen.m4.
12536
12537 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
12538
12539         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
12540         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
12541
12542 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
12543
12544         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
12545         * lib/argp-help.c (fill_in_uparams): Check if the constructed
12546         struct uparams is valid. Fall back to the default values if it is
12547         not.
12548
12549 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12550
12551         * modules/argp (Files): Add argp-pin.c
12552         (Depends-on): dirname
12553         (lib_SOURCES): Add argp-pin.c
12554
12555 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12556
12557         * m4/argp.m4:  Check if program_invocation_name and
12558         program_invocation_short_name are declared and define appropriate
12559         macros if they are not.
12560
12561 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12562
12563         * lib/argp-help.c (__argp_base_name): New function
12564         (__argp_short_program_name): Rewrite using __argp_base_name
12565         * lib/argp-namefrob.h: Define program_invocation_name and
12566         program_invocation_short_name if requested
12567         (__argp_base_name): Add prototype
12568         * lib/argp-parse.c (argp_def): Use gettext wrappers
12569         (argp_default_parser): Use __argp_base_name
12570         * lib/argp-pin.c: New file. Defines program_invocation_name and
12571         program_invocation_short_name on systems that lack them.
12572
12573 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
12574
12575         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
12576         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
12577         porting problem reported by Georg Schwarz in
12578         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
12579
12580 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
12581
12582         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
12583         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
12584         porting problem reported by Georg Schwarz in
12585         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
12586
12587 2005-12-05  Bruno Haible  <bruno@clisp.org>
12588
12589         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
12590         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
12591         Reported by Mark Junker <mjscod@gmx.de>.
12592
12593 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
12594
12595         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
12596         Use implementation from Albert Chin, with some
12597         comments/corrections by Stepan Kasal and myself.
12598
12599 2005-12-02  Bruno Haible  <bruno@clisp.org>
12600
12601         * gnulib-tool (func_import): Accept GPLed build tool modules when
12602         --lgpl is given.
12603         * modules/csharpcomp-script: New file.
12604         * modules/csharpcomp: Depend on it.
12605         * modules/javacomp-script: New file.
12606         * modules/javacomp: Depend on it.
12607         Suggested by Simon Josefsson.
12608
12609 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
12610
12611         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
12612         statement, to work around an HP-UX 10.20 compiler bug reported by
12613         Peter O'Gorman.
12614
12615 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
12616
12617         * modules/savedir (Depends-on): Add openat.
12618
12619 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
12620
12621         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
12622         (uintmax_t) [defined uintmax_t]: Do not declare.
12623         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
12624         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
12625         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
12626         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
12627         sake of portability to weird hosts that C allows (though we don't
12628         know of any practical examples).
12629
12630         * lib/savedir.h (fdsavedir): New decl.
12631         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
12632         contains most of the former guts of savedir.
12633         (savedir): Use savedirstream.
12634         Include "openat.h".
12635
12636 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12637
12638         * modules/obstack (Files): Add m4/ulonglong.m4.
12639         Problem reported by Davide Angelocola.
12640
12641 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
12642
12643         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
12644         coreutils no longer futzes with rounding modes.
12645
12646 2005-11-14  Jim Meyering  <jim@meyering.net>
12647
12648         * lib/mkstemp-safer.c: Include <config.h>, required for possible
12649         replacement of mkstemp.
12650
12651 2005-11-10  Simon Josefsson  <jas@extundo.com>
12652
12653         * lib/readline.c: Remove EOL.
12654
12655 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12656
12657         * modules/gethrxtime (Depends-on): Add gettime.
12658
12659 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12660
12661         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
12662         or gettimeofday; no longer needed.
12663
12664 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12665
12666         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
12667         time business.
12668         (gethrxtime) [! (HAVE_NANOUPTIME
12669         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
12670         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
12671         our own approximation.
12672
12673 2005-11-08  Eric Blake  <ebb9@byu.net>
12674
12675         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
12676
12677 2005-11-08  Eric Blake  <ebb9@byu.net>
12678
12679         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
12680
12681 2005-11-04  Bruno Haible  <bruno@clisp.org>
12682
12683         * gnulib-tool: Implement --update mode.
12684
12685 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
12686
12687         Fix porting problem reported by Theodoros V. Kalamatianos.
12688         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
12689         Don't assume that futimes failing means we must fail.
12690
12691 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
12692
12693         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
12694         variables to suggest the intended function of the PATH_MAX check.
12695
12696 2005-10-30  Kean Johnston  <jkj@sco.com>
12697
12698         Trivial changes to support SCO systems.
12699         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
12700         as PATH_MAX.
12701         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
12702         where __ptr is null when no I/O is pending.
12703
12704 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12705
12706         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
12707         leave errno alone.  Problem reported by Dmitry V. Levin.
12708
12709 2005-10-28  Simon Josefsson  <jas@extundo.com>
12710
12711         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
12712         Test more.
12713
12714         * tests/test-gc-md2.c, tests/test-md2.c: New files.
12715
12716         * modules/md2, modules/md2-tests: New files.
12717
12718 2005-10-28  Simon Josefsson  <jas@extundo.com>
12719
12720         * m4/inet_ntop.m4: More tests.
12721
12722         * m4/gc-md2.m4, md2.m4: New file.
12723
12724 2005-10-28  Simon Josefsson  <jas@extundo.com>
12725
12726         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
12727         "restrict" keywords, as per POSIX.  Protect the function
12728         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
12729         Don't use K&R prototypes.  Check the sprintf return values.
12730         Re-define EAFNOSUPPORT if not present.  Indent.
12731
12732         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
12733         suggested by Bruno Haible <bruno@clisp.org>.
12734
12735         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
12736
12737         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
12738
12739         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
12740         libgcrypt).
12741
12742         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
12743
12744         * lib/md2.h, lib/md2.c: New files.
12745
12746 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
12747
12748         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
12749         errno alone.  Problem reported by Frederic Jolliton.
12750
12751 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
12752
12753         * modules/verify (License): Change from GPL to LGPL.  This is a
12754         tiny module and there are apparently near-equivalents that are
12755         under the BSD license.
12756
12757 2005-10-24  Simon Josefsson  <jas@extundo.com>
12758
12759         * modules/sha1: Relicense to LGPL.
12760
12761 2005-10-24  Simon Josefsson  <jas@extundo.com>
12762
12763         * lib/md4.h: Shrink buffer size, now that we changed the type.
12764
12765 2005-10-23  Simon Josefsson  <jas@extundo.com>
12766
12767         * gnulib-tool (func_import): Fix --tests-base.
12768
12769 2005-10-22  Simon Josefsson  <jas@extundo.com>
12770
12771         * modules/arcfour (Depends-on): Need stdint.
12772
12773 2005-10-22  Simon Josefsson  <jas@extundo.com>
12774
12775         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
12776         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
12777
12778 2005-10-22  Simon Josefsson  <jas@extundo.com>
12779
12780         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
12781         suggested by Bruno Haible <bruno@clisp.org>.
12782
12783 2005-10-22  Simon Josefsson  <jas@extundo.com>
12784
12785         * lib/crc.h: Include stddef.h, for size_t.
12786
12787 2005-10-22  Simon Josefsson  <jas@extundo.com>
12788
12789         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
12790         arcfour_context struct (simplify test vector testing in GNU
12791         Shishi).
12792
12793 2005-10-21  Simon Josefsson  <jas@extundo.com>
12794
12795         * modules/des, modules/des-tests: New files.
12796
12797         * modules/gc-des, modules/gc-des-tests: New files.
12798
12799         * tests/test-des.c, tests/test-gc-des.c: New file.
12800
12801 2005-10-21  Simon Josefsson  <jas@extundo.com>
12802
12803         * modules/arctwo, modules/arctwo-tests: New files.
12804
12805         * tests/test-arctwo.c: New file.
12806
12807         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
12808
12809         * tests/test-gc-arctwo.c: New file.
12810
12811 2005-10-21  Simon Josefsson  <jas@extundo.com>
12812
12813         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
12814         Bruno Haible <bruno@clisp.org>.
12815
12816         * m4/gc-des.m4: New file.
12817
12818 2005-10-21  Simon Josefsson  <jas@extundo.com>
12819
12820         * m4/arctwo.m4: New file.
12821
12822         * m4/gc-arctwo.m4: New file.
12823
12824 2005-10-21  Simon Josefsson  <jas@extundo.com>
12825
12826         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
12827         block.
12828
12829 2005-10-21  Simon Josefsson  <jas@extundo.com>
12830
12831         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
12832         <bruno@clisp.org>.
12833
12834         * lib/hmac-sha1.c (hmac_sha1): Likewise.
12835
12836         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
12837         Bruno Haible <bruno@clisp.org>.
12838
12839         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
12840         <bruno@clisp.org>.
12841
12842 2005-10-21  Simon Josefsson  <jas@extundo.com>
12843
12844         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
12845
12846 2005-10-21  Simon Josefsson  <jas@extundo.com>
12847
12848         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
12849
12850 2005-10-21  Simon Josefsson  <jas@extundo.com>
12851
12852         * lib/des.h, lib/des.c: New files.
12853
12854         * lib/gc-gnulib.c: Support DES.c
12855
12856 2005-10-21  Simon Josefsson  <jas@extundo.com>
12857
12858         * lib/arctwo.h, lib/arctwo.c: New files.
12859
12860         * lib/gc-gnulib.c: Support ARCTWO.
12861
12862 2005-10-21  Simon Josefsson  <jas@extundo.com>
12863
12864         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
12865         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12866
12867 2005-10-21  Simon Josefsson  <jas@extundo.com>
12868
12869         * gnulib-tool (func_import, func_create_testdir): Define automake
12870         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
12871         Makefile.am snippet),
12872         suggested by Bruno Haible <bruno@clisp.org>.
12873
12874         * modules/gc (Makefile.am): Use it.
12875
12876 2005-10-21  Bruno Haible  <bruno@clisp.org>
12877
12878         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
12879         patch.
12880
12881 2005-10-19  Simon Josefsson  <jas@extundo.com>
12882
12883         * tests/test-gc-rijndael.c: New file.
12884
12885         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
12886
12887 2005-10-19  Simon Josefsson  <jas@extundo.com>
12888
12889         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
12890         interface too.
12891
12892 2005-10-19  Simon Josefsson  <jas@extundo.com>
12893
12894         * tests/test-gc-arcfour.c: New file.
12895
12896         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
12897
12898 2005-10-19  Simon Josefsson  <jas@extundo.com>
12899
12900         * modules/gc-md4, modules/gc-md4-tests: New file.
12901
12902         * tests/test-gc-md4.c: New file.
12903
12904 2005-10-19  Simon Josefsson  <jas@extundo.com>
12905
12906         * m4/gc-md4.m4: New file.
12907
12908 2005-10-19  Simon Josefsson  <jas@extundo.com>
12909
12910         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
12911         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
12912         <kasal@ucw.cz>.
12913
12914 2005-10-19  Simon Josefsson  <jas@extundo.com>
12915
12916         * m4/gc-arcfour.m4: New file.
12917
12918         * m4/gc-rijndael.m4: New file.
12919
12920 2005-10-19  Simon Josefsson  <jas@extundo.com>
12921
12922         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
12923
12924 2005-10-19  Simon Josefsson  <jas@extundo.com>
12925
12926         * lib/gc-gnulib.c: Support ARCFOUR.
12927
12928 2005-10-19  Simon Josefsson  <jas@extundo.com>
12929
12930         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
12931         support.
12932
12933         * lib/gc.h: Add ECB enum type.
12934
12935         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
12936
12937 2005-10-18  Simon Josefsson  <jas@extundo.com>
12938
12939         * tests/test-md5.c: New file.
12940
12941         * modules/md5-tests: New file.
12942
12943 2005-10-18  Simon Josefsson  <jas@extundo.com>
12944
12945         * tests/test-md4.c: New file.
12946
12947         * modules/md4, modules/md4-tests: New files.
12948
12949 2005-10-18  Simon Josefsson  <jas@extundo.com>
12950
12951         * m4/md4.m4: New file.
12952
12953 2005-10-18  Simon Josefsson  <jas@extundo.com>
12954
12955         * lib/md4.h, lib/md4.c: New files, based on md5.?.
12956
12957 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
12958
12959         * gnulib-tool (func_create_testdir): Omit the second check whether
12960         BUILT_SOURCES in nonempty.
12961
12962 2005-10-17  Simon Josefsson  <jas@extundo.com>
12963
12964         * tests/test-rijndael.c: New file.
12965
12966 2005-10-17  Simon Josefsson  <jas@extundo.com>
12967
12968         * modules/sha1: Depend on stdint instead of md5.
12969
12970         * modules/md5: Depend on stdint, remove uint32_t.
12971
12972 2005-10-17  Simon Josefsson  <jas@extundo.com>
12973
12974         * modules/gc-sha1-tests: New file.
12975
12976         * tests/test-gc-sha1.c: New file.
12977
12978 2005-10-17  Simon Josefsson  <jas@extundo.com>
12979
12980         * m4/md5.m4: Remove call to uint32_t.m4.
12981
12982 2005-10-17  Simon Josefsson  <jas@extundo.com>
12983
12984         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
12985
12986         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
12987         md5.h.
12988
12989         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
12990
12991         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
12992
12993 2005-10-17  Simon Josefsson  <jas@extundo.com>
12994
12995         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
12996
12997 2005-10-17  Simon Josefsson  <jas@extundo.com>
12998
12999         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
13000
13001 2005-10-17  Simon Josefsson  <jas@extundo.com>
13002
13003         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
13004
13005         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
13006
13007 2005-10-17  Bruno Haible  <bruno@clisp.org>
13008
13009         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
13010         that it can also be used in a test.
13011
13012 2005-10-16  Bruno Haible  <bruno@clisp.org>
13013
13014         * gnulib-tool (func_emit_tests_Makefile_am): Also define
13015         TESTS_ENVIRONMENT, so that individual tests can augment it.
13016
13017         * gnulib-tool (func_create_testdir): Use an intermediate target for
13018         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
13019         macros, like $(ALLOCA_H), which cannot be passed through the command
13020         line.
13021
13022 2005-10-15  Simon Josefsson  <jas@extundo.com>
13023
13024         * modules/rijndael-tests: New file.
13025
13026         * modules/rijndael: New file.
13027
13028 2005-10-15  Simon Josefsson  <jas@extundo.com>
13029
13030         * m4/rijndael.m4: New file.
13031
13032 2005-10-15  Simon Josefsson  <jas@extundo.com>
13033
13034         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
13035
13036         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
13037
13038 2005-10-14  Simon Josefsson  <jas@extundo.com>
13039
13040         * tests/test-arcfour.c: New file.
13041
13042         * modules/arcfour, modules/arcfour-tests: New files.
13043
13044 2005-10-14  Simon Josefsson  <jas@extundo.com>
13045
13046         * m4/arcfour.m4: New file.
13047
13048 2005-10-14  Simon Josefsson  <jas@extundo.com>
13049
13050         * lib/arcfour.h, lib/arcfour.c: New files.
13051
13052 2005-10-14  Roland McGrath  <roland@redhat.com>
13053
13054         Import from libc.  [BZ #1331]
13055         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
13056         macro argument.
13057         Reported by Matej Vela <vela@debian.org>.
13058
13059 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
13060
13061         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
13062         include <wchar.h>; no longer needed.
13063
13064 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
13065
13066         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
13067
13068 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
13069         and  Ulrich Drepper  <drepper@redhat.com>
13070
13071         Import from libc.
13072         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
13073         instead of inline stream orientation test and two separate
13074         function calls.  Pay no attention to USE_IN_LIBIO.
13075
13076 2005-10-13  Simon Josefsson  <jas@extundo.com>
13077
13078         * modules/gc-hmac-md5-tests: New file.
13079
13080         * tests/test-gc-hmac-sha1.c: New file.
13081
13082         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
13083
13084         * modules/gc-hmac-md5-tests: New file.
13085
13086         * tests/test-gc-md5.c: New file.
13087
13088         * modules/gc-md5-tests: New file.
13089
13090 2005-10-13  Simon Josefsson  <jas@extundo.com>
13091
13092         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
13093         Move memory allocation outside of loop.
13094
13095 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
13096
13097         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
13098         intermediate directory is in a read-only file system.  Problem
13099         reported by Eric Blake.
13100
13101 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
13102
13103         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
13104
13105 2005-10-12  Simon Josefsson  <jas@extundo.com>
13106
13107         * tests/test-hmac-sha1.c: New file.
13108
13109         * modules/hmac-sha1-tests: New file.
13110
13111         * modules/hmac-sha1: New file.
13112
13113 2005-10-12  Simon Josefsson  <jas@extundo.com>
13114
13115         * modules/gc-sha1: New file.
13116
13117 2005-10-12  Simon Josefsson  <jas@extundo.com>
13118
13119         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
13120
13121         * tests/test-gc-pbkdf2-sha1.c: New file.
13122
13123 2005-10-12  Simon Josefsson  <jas@extundo.com>
13124
13125         * modules/gc-md5, modules/gc-hmac-md5: New files.
13126
13127         * modules/gc (Files): Remove md5, memxor and hmac files.
13128
13129 2005-10-12  Simon Josefsson  <jas@extundo.com>
13130
13131         * m4/gc-pbkdf2-sha1.m4: New file.
13132
13133         * m4/gc-hmac-sha1.m4: New file.
13134
13135         * m4/gc-sha1: New file.
13136
13137         * m4/hmac-sha1.m4: New file.
13138
13139 2005-10-12  Simon Josefsson  <jas@extundo.com>
13140
13141         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
13142
13143         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
13144
13145 2005-10-12  Simon Josefsson  <jas@extundo.com>
13146
13147         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
13148         suggested by Bruno Haible <bruno@clisp.org>.
13149
13150 2005-10-12  Simon Josefsson  <jas@extundo.com>
13151
13152         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
13153
13154 2005-10-12  Simon Josefsson  <jas@extundo.com>
13155
13156         * lib/gc-pbkdf2-sha1.c: New file.
13157
13158         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
13159
13160 2005-10-12  Simon Josefsson  <jas@extundo.com>
13161
13162         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
13163
13164         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
13165
13166 2005-10-12  Simon Josefsson  <jas@extundo.com>
13167
13168         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
13169         GC_USE_HMAC_MD5, respectively.
13170
13171         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
13172         (gc_md5): Fix typo.
13173
13174         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
13175
13176         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
13177
13178         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
13179
13180 2005-10-12  Bruno Haible  <bruno@clisp.org>
13181
13182         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
13183         Reported by Stepan Kasal <kasal@ucw.cz>.
13184
13185 2005-10-11  Simon Josefsson  <jas@extundo.com>
13186
13187         * tests/test-crc.c: New file.
13188
13189         * modules/crc, modules/crc-tests: New files.
13190
13191 2005-10-11  Simon Josefsson  <jas@extundo.com>
13192
13193         * m4/crc.m4: New file.
13194
13195 2005-10-11  Simon Josefsson  <jas@extundo.com>
13196
13197         * lib/gc.h: Add gc_hash and gc_hash_buffer.
13198
13199         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
13200
13201         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
13202
13203 2005-10-11  Simon Josefsson  <jas@extundo.com>
13204
13205         * lib/crc.h, lib/crc.c: New files.
13206
13207         * lib/gc.h (gc_hash_buffer): Add doc.
13208
13209 2005-10-11  Bruno Haible  <bruno@clisp.org>
13210
13211         * modules/c-strcasestr: New file.
13212         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
13213
13214 2005-10-11  Bruno Haible  <bruno@clisp.org>
13215
13216         * modules/c-strcase: New file.
13217         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
13218
13219 2005-10-11  Bruno Haible  <bruno@clisp.org>
13220
13221         * lib/strcasecmp.c: Include limits.h.
13222         (strcasecmp): Avoid integer overflow on exotic platforms.
13223         * lib/strncasecmp.c: Include limits.h.
13224         (strncasecmp): Avoid integer overflow on exotic platforms.
13225         Reported by Paul Eggert.
13226
13227 2005-10-11  Bruno Haible  <bruno@clisp.org>
13228
13229         * lib/c-strcasestr.h: New file, from GNU gettext.
13230         * lib/c-strcasestr.c: New file, from GNU gettext.
13231
13232 2005-10-11  Bruno Haible  <bruno@clisp.org>
13233
13234         * lib/c-strcase.h: New file, from GNU gettext.
13235         * lib/c-strcasecmp.c: New file, from GNU gettext.
13236         * lib/c-strncasecmp.c: New file, from GNU gettext.
13237
13238 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
13239
13240         * modules/mempcpy (License): GPL -> LGPL.
13241         * modules/strchrnul (License): Likewise.
13242         * modules/sysexits (License): Likewise.
13243
13244 2005-10-08  Simon Josefsson  <jas@extundo.com>
13245
13246         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
13247
13248 2005-10-07  Simon Josefsson  <jas@extundo.com>
13249
13250         * m4/memxor.m4: Remove gl_C_RESTRICT call.
13251
13252 2005-10-06  Simon Josefsson  <jas@extundo.com>
13253
13254         * tests/test-hmac-md5.c: New file.
13255
13256         * modules/hmac-md5-tests: New file.
13257
13258         * modules/hmac-md5: New file.
13259
13260 2005-10-06  Simon Josefsson  <jas@extundo.com>
13261
13262         * m4/hmac-md5.m4: New file.
13263
13264         * m4/memxor.m4: Require gl_C_RESTRICT.
13265
13266 2005-10-06  Simon Josefsson  <jas@extundo.com>
13267
13268         * lib/memxor.c (memxor): Avoid casts and warnings.
13269
13270 2005-10-06  Simon Josefsson  <jas@extundo.com>
13271
13272         * lib/hmac-md5.c: New file.
13273
13274         * lib/hmac.h: New file.
13275
13276 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
13277
13278         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
13279         promotes to int, not unsigned int, to catch the AIX 5.3
13280         compiler bug.
13281
13282 2005-10-05  Simon Josefsson  <jas@extundo.com>
13283
13284         * modules/memxor: New file.
13285
13286         * modules/iconv (Files): Move config.rpath to havelib, it is used
13287         there.
13288
13289         * modules/havelib (Files): Add config.rpath.
13290
13291 2005-10-05  Simon Josefsson  <jas@extundo.com>
13292
13293         * m4/memxor.m4: New file.
13294
13295 2005-10-05  Simon Josefsson  <jas@extundo.com>
13296
13297         * lib/memxor.c (memxor): Fix compiler error.
13298
13299         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
13300         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
13301
13302         * lib/memxor.h, lib/memxor.c: New files.
13303
13304         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
13305         we assume all systems have it, suggested by Jim Meyering
13306         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
13307         any systems lack sys/socket.h; mingw32 is known to lack it, but we
13308         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
13309         same reasons.
13310
13311 2005-10-05  Simon Josefsson  <jas@extundo.com>
13312
13313         * config/srclist.txt: Add glibc bug 1423 for md5.h.
13314
13315 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
13316
13317         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
13318         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
13319         needed, since the source code now assumes these .h files.
13320
13321 2005-10-05  Derek Price  <derek@ximbiot.com>
13322
13323         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
13324
13325 2005-10-05  Bruno Haible  <bruno@clisp.org>
13326
13327         * modules/stdint (License): Change to LGPL.
13328
13329 2005-10-04  Simon Josefsson  <jas@extundo.com>
13330
13331         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
13332         D. Baushke" <mdb@gnu.org>.
13333
13334 2005-10-04  Bruno Haible  <bruno@clisp.org>
13335
13336         * lib/verify.h (verify_true): Provide alternative definition for C++.
13337
13338 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
13339
13340         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
13341         (SSIZE_MAX): New macro, if not already defined.
13342         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
13343         than 2 GiB.
13344
13345 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13346
13347         Sync from coreutils.
13348         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
13349         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
13350         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
13351         ULLONG_MAX doesn't work with 2.7.2.1.
13352
13353 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13354
13355         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
13356         From Ben Pfaff.
13357
13358         * modules/exclude (Depends-on): Depend on verify.
13359         * modules/strtoimax (Depends-on): Likewise.
13360         * modules/utimecmp (Depends-on): Likewise.
13361
13362 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13363
13364         * lib/exclude.c: Include verify.h.
13365         (verify): Remove.  All callers changed to use verify.h's version.
13366         * lib/strtoimax.c: Likewise.
13367         * lib/utimecmp.c: Likewis.e
13368
13369         Sync from coreutils.
13370         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
13371         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
13372         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
13373         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
13374         bother returning ENOSYS if settimeofday or stime fails; just let
13375         them return whatever errno they want to return.
13376         * lib/utimens.c: Include unistd.h, for dup2.
13377         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
13378         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
13379
13380 2005-10-02  Jim Meyering  <jim@meyering.net>
13381
13382         Sync from coreutils.
13383         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
13384         from glibc-2.2.5 that fails for read-only files.
13385
13386 2005-10-02  Jim Meyering  <jim@meyering.net>
13387
13388         Sync from coreutils.
13389         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
13390         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
13391         `#if HAVE_CONFIG_H'.
13392         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
13393         Remove AT_FDCWD test.
13394         Do not consume the fd unless successful.
13395         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
13396         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
13397         block, so that we don't even try to compile it if settimeofday is
13398         available.  This works around a compilation failure on OSF1 V5.1,
13399         due to stime requiring a `long int*' while tv_sec is `int'.
13400
13401 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
13402
13403         Sync from coreutils.
13404         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
13405         against `yes', rather than just testing for nonempty.
13406
13407 2005-10-01  Simon Josefsson  <jas@extundo.com>
13408
13409         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
13410         and Darwin.
13411
13412         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
13413         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
13414         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
13415         freeaddrinfo and gai_strerror are declared by the POSIX headers.
13416         Check if struct addrinfo is declared.
13417
13418 2005-10-01  Simon Josefsson  <jas@extundo.com>
13419
13420         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
13421         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
13422         AI_* and EAI_* definitions.  Protect function declarations.
13423
13424 2005-10-01  Jim Meyering  <jim@meyering.net>
13425
13426         Sync from coreutils.
13427
13428         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
13429         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
13430         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
13431         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
13432         in the inet and nsl libraries.  Required on Solaris 5.7.
13433
13434 2005-10-01  Jim Meyering  <jim@meyering.net>
13435
13436         Sync from coreutils.
13437         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
13438         in the inet and nsl libraries.  Required on Solaris 5.7.
13439
13440 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
13441
13442         * lib/getdelim.c (getdelim): Remove unused variables.
13443
13444 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
13445
13446         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
13447         so that the code works even with ancient cpp.  Portability problem
13448         with GCC 2.7.2.1 reported by Thomas M.Ott.
13449
13450 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
13451
13452         * modules/regex (Depends-on): Add strcase.
13453
13454         * modules/gethostname (Licence): Change from GPL to LGPL, since
13455         gethostname.c is a trivial implementation of a standard library
13456         function.
13457         * modules/poll (License): Change from GPL to LGPL, since it's
13458         derived from LGPL code.
13459
13460 2005-09-27  Jim Meyering  <jim@meyering.net>
13461
13462         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
13463         HAVE_CONFIG_H.
13464
13465         * lib/intprops.h (signed_type_or_expr__): Define.
13466         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
13467         for unsigned types.
13468
13469 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
13470
13471         * lib/verify.h (verify_expr): Remove, replacing with:
13472         (verify_true): New macro that returns true instead of void.
13473         (verify_type__): Remove.
13474         (verify): Use verify_true rather than verify_type__.
13475
13476 2005-09-26  Bruno Haible  <bruno@clisp.org>
13477
13478         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
13479         is necessary.
13480         (lib_SOURCES): Remove mbchar.c.
13481         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
13482         (Files): Add m4/mbrtowc.m4.
13483         * modules/mbiter: Likewise.
13484         * modules/mbuiter: Likewise.
13485
13486 2005-09-26  Bruno Haible  <bruno@clisp.org>
13487
13488         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
13489         compile mbchar.c if they are not both present.
13490         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
13491         * m4/mbiter.m4 (gl_MBITER): Likewise.
13492         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
13493         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
13494         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
13495
13496 2005-09-25  Jim Meyering  <jim@meyering.net>
13497
13498         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
13499         also uses socklen_t.
13500
13501 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
13502
13503         * lib/utimens.c (ENOSYS): Define if not already defined.
13504         (futimens): Support having a null PATH if the file descriptor
13505         is nonnegative.
13506
13507         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
13508         Remove.
13509         (__attribute): Define to empty unless GCC 3.1 or later.
13510         This works around a core dump on OpenBSD 3.4, which has GCC
13511         2.95.3, which dumps core when given __attribute__(()).  It also
13512         simplifies other tests, since we really don't want to bother with
13513         worrying about which ancient version of GCC supported what.
13514         Original problem reported by Yoann Vandoorselaere, with part of
13515         the fix suggested by Derek Price.
13516
13517 2005-09-24  Jim Meyering  <jim@meyering.net>
13518
13519         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
13520         so we can once again use a positive bitfield width of 1 -- now we
13521         don't have to explain why we were using a bitfield width of 2.
13522
13523 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
13524
13525         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
13526         and similarly for the other external symbols.  Problem reported
13527         by James Gallager.
13528
13529         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
13530         bug reported by Jim Meyering.
13531
13532         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
13533         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
13534         not needed, since socklen is a prerequisite module.
13535
13536 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
13537
13538         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
13539         Problem reported by Eric Blake.
13540         (getaddrinfo): Initialize se so that it's not garbage.
13541         Redo internal storage allocation so that it doesn't make unportable
13542         assumptions about alignment.
13543         Fix a memory leak.
13544
13545         * lib/utimens.c (futimens): Use futimesat if available.
13546         Prefer it to futimes since it doesn't have the futimes bug.
13547
13548         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
13549         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
13550         Instead, declare a function that returns a pointer to an array,
13551         and use verify_type__ to declare the size of the array.
13552         Problem and germ of a solution reported by Bruno Haible.
13553         (verify_type__): Use 2, not 1, for bitfield size, to avoid
13554         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
13555
13556 2005-09-23  Jim Meyering  <jim@meyering.net>
13557
13558         Sync from coreutils.
13559         Correct build failure (socklen_t not defined) on at least
13560         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
13561         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
13562
13563 2005-09-23  Jim Meyering  <jim@meyering.net>
13564
13565         * modules/getaddrinfo (Depends-on): Add socklen.
13566
13567 2005-09-23  Bruno Haible  <bruno@clisp.org>
13568
13569         * tests/test-verify.c: New file.
13570
13571 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13572
13573         Sync from coreutils.
13574
13575         * modules/argmatch (Depends-on): Add verify.
13576         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
13577         unistd-safer.
13578         * modules/save-cwd (Depends-on): Likewise.
13579
13580         * modules/openat (Files): Add lib/openat-die.c.
13581         (Depends-on): Remove error, exitfail.
13582         Add dirname.
13583
13584         * modules/verify: New file.
13585         * MODULES.html.sh (Diagnostics <assert.h>): New section,
13586         with "verify" module.
13587
13588 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13589
13590         Sync from coreutils.
13591
13592         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
13593         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
13594         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
13595         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
13596         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
13597         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
13598         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
13599         Don't bother checking for string.h, stdlib.h, unistd.h.
13600         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
13601         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
13602         module's job.
13603         * m4/jm-macros.m4 (gl_MACROS): Likewise.
13604         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
13605
13606         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
13607         (gl_GETDATE): Use it.
13608
13609         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
13610
13611 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13612
13613         Sync from coreutils.
13614
13615         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
13616         stat-time.h.
13617         * lib/argmatch.h: Include verify.h
13618         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
13619         (ARGMATCH_ASSERT): Remove; unused.
13620         * lib/canonicalize.c: Assume STDC_HEADERS.
13621         * lib/exclude.c: Include "strcase.h".
13622         * lib/regex_internal.h [!defined _LIBC]: Likewise.
13623         * lib/getusershell.c: Include stdio--.h rather than stdio.h
13624         and stdio-safer.h.
13625         (getusershell): Call fopen, not fopen_safer.
13626         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
13627         Do not include unistd-safer.h.
13628         (save_cwd): Don't call fd_safer; no longer needed
13629         now that we include fcntl--.h.
13630
13631         * lib/getdate.y (relative_time): New type.
13632         (RELATIVE_TIME_0): New constant.
13633         (parser_control): Use relative_time instead of doing it ourselves.
13634         (%union): Add new relative_time rel member.
13635         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
13636         Now typeless.
13637         (relunit, relunit_snumber): Now of type rel.
13638         (zone, rel, relunit, get_date): Adjust to above changes.
13639
13640         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
13641         Do not include unistd-safer.h.
13642         (getloadavg): Don't call fd_safer; no longer needed
13643         now that we include fcntl--.h.
13644
13645         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
13646         (make_dir_parents): Treat ENOSYS like EEXIST.
13647
13648         Improve quality of diagnostics on restore_cwd failure.
13649         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
13650         (make_dir_parents): Last arg is now int * (for errno), not bool *.
13651         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
13652         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
13653         each time through the loop.  Do not diagnose restore_cwd failure;
13654         that is the caller's job (and perhaps the caller does not care).
13655
13656         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
13657         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
13658         If the file already exists but is not a directory, don't bother
13659         to try to make its parents.
13660         Close potential file descriptor leak if we can't chdir("/") (!).
13661         Don't always return true if chdir($PWD) fails; return true only
13662         if the requested action was done successfully (except for the
13663         chdir($PWD)).
13664         Don't log final directory unless we actually made it.
13665         Refactor to avoid duplicate code to fix up permissions.
13666         Don't attempt to fix up parent permissions if chdir($PWD) fails.
13667
13668         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
13669         to make it a bit faster and (I hope) clearer.
13670         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
13671         Fix bug in formats like %2N.
13672
13673         * lib/verify.h: New file.
13674
13675 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13676
13677         Sync from coreutils.
13678         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
13679
13680 2005-09-22  Jim Meyering  <jim@meyering.net>
13681
13682         Sync from coreutils.
13683
13684         * m4/lstat.m4 (gl_FUNC_LSTAT):
13685         Use AC_LIBSOURCES to require lstat.c and lstat.h.
13686         Remove obsolete comment.
13687         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
13688         * m4/xstrtod.m4: Likewise.
13689
13690         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
13691
13692 2005-09-22  Jim Meyering  <jim@meyering.net>
13693
13694         Sync from coreutils.
13695
13696         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
13697
13698         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
13699         the .tm_year member, since otherwise gcc-4.0 would now warn about
13700         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
13701
13702         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
13703         order to avoid an unsuppressible warning from gcc on 64-bit systems.
13704
13705         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
13706         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
13707         when run in a time zone for which daylight savings time is in effect
13708         for the starting date.
13709
13710         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
13711         stop us from restricting permissions of just-created absolute-named
13712         directories.
13713         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
13714         to restore initial working directory.
13715         * lib/mkdir-p.c (make_dir_parents): New parameter:
13716         different_working_dir, to tell caller if/when we change the working
13717         directory and are unable to return to the initial one.
13718         * lib/mkdir-p.h (make_dir_parents): Update prototype.
13719         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
13720         `return false'.  This fixes a bug introduced on 2004-07-30.
13721
13722         * lib/openat.c (fdopendir): Be sure to close the supplied
13723         file descriptor before returning.  This makes our replacement
13724         implementation a little closer to Solaris's, where fdopendir
13725         ties the file descriptor to the returned DIR* pointer.
13726         * lib/openat.c (unlinkat): New function.
13727         * lib/openat.h (unlinkat): Add prototype.
13728         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
13729         (openat_restore_fail): Rename from openat_restore_die.
13730         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
13731
13732         Provide an alternative to exiting immediately upon save_cwd or
13733         restore_cwd failure.  Now, an application can arrange e.g.,
13734         to perform a longjump in that case.
13735         * lib/openat.c: Include dirname.h.
13736         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
13737         (rpl_openat, fdopendir, fstatat): Call openat_save_die
13738         and openat_restore_die rather than calling error directly.
13739         Don't include "error.h" or "exitfail.h"; they're no longer needed.
13740
13741         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
13742         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
13743         define.
13744
13745         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
13746         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
13747                             int utc, int nanoseconds);
13748         Background:
13749         date should not have to allocate a megabyte of virtual memory to
13750         handle a format argument like +%1048575T.  When implemented with
13751         strftime, it must allocate such a buffer, use strftime to fill it
13752         in, print it, then free it.
13753         With fprintftime, it simply prints everything and exits.
13754         With no need for memory allocation, that's one fewer way to fail.
13755         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
13756         optional field width, not before, so we accept %9:z, not %:9z.
13757         (my_strftime): Be sure to use L_('x') for literals.
13758
13759         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
13760         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
13761         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
13762         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
13763         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
13764         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
13765         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
13766         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
13767         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
13768         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
13769         * lib/xgethostname.c, lib/xreadlink.c:
13770         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
13771
13772         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
13773         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
13774         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
13775         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13776         and don't include <sys/file.h>).
13777
13778 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
13779
13780         Sync from coreutils.
13781
13782         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
13783         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
13784         [!LDAV_DONE]: Avoid unused variable warning.
13785
13786 2005-09-21  Bruno Haible  <bruno@clisp.org>
13787
13788         * lib/unicodeio.h (unicode_to_mb): New declaration.
13789
13790 2005-09-20  Derek Price  <derek@ximbiot.com>
13791
13792         * lib/getaddrinfo.c: Don't include <netdb.h> included from
13793         getaddrinfo.h.
13794
13795 2005-09-20  Bruno Haible  <bruno@clisp.org>
13796
13797         * gnulib-tool: Remove trailing slashes from the values specified for
13798         --source-base, --m4-base, --tests-base, --aux-dir.
13799         Suggested by Simon Josefsson <jas@extundo.com>.
13800
13801 2005-09-20  Bruno Haible  <bruno@clisp.org>
13802
13803         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
13804         func_modules_to_filelist, func_import, func_create_testdir): Make all
13805         sorting results locale-independent, so that gnulib-cache.m4 doesn't
13806         change when gnulib-tool is invoked in a different locale.
13807
13808 2005-09-19  Simon Josefsson  <jas@extundo.com>
13809
13810         * m4/socklen.m4: Fix typo.
13811
13812 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13813
13814         Use a consistent style for including <config.h>.
13815         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
13816         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
13817         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
13818         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
13819         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
13820         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
13821         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
13822         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
13823         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
13824         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
13825         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
13826         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
13827         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
13828         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
13829         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
13830         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
13831         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
13832         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
13833         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
13834         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
13835         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
13836         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
13837         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
13838         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
13839         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
13840         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
13841         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
13842         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
13843         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
13844         lib/xstrtoumax.c, lib/yesno.c:
13845         Standardize inclusion of config.h.
13846         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
13847         lib/inttostr.h:  Removed inclusion of config.h from header files.
13848         * lib/inttostr.c:  Adjusted in-tree users.
13849         * lib/timespec.h: Remove superfluous warning to include config.h.
13850         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
13851         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
13852         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
13853         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
13854         config.h with HAVE_CONFIG_H.
13855
13856 2005-09-19  Jim Meyering  <jim@meyering.net>
13857
13858         * modules/pathmax (License): Change to LGPL.
13859
13860 2005-09-19  Derek Price  <derek@ximbiot.com>
13861
13862         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
13863
13864 2005-09-19  Bruno Haible  <bruno@clisp.org>
13865
13866         * gnulib-tool (import): Provide default for --tests-base.
13867
13868 2005-09-19  Bruno Haible  <bruno@clisp.org>
13869
13870         * doc/quote.texi: New file, extracted from gnulib.texi.
13871         * doc/ctime.texi: New file, extracted from gnulib.texi.
13872         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
13873         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
13874         * doc/gnulib.texi: Include them.
13875
13876 2005-09-18  Bruno Haible  <bruno@clisp.org>
13877
13878         Portability fix.
13879         * gnulib-tool (func_readlink): New function.
13880         (func_ln_if_changed): Use it.
13881
13882 2005-09-18  Bruno Haible  <bruno@clisp.org>
13883
13884         * gnulib-tool: Support --with-tests also with --import.
13885         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
13886         (func_import): Use variables $testsbase and $inctests. Emit a
13887         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
13888         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
13889         SUBDIRS += $testsdir.
13890         (func_create_testdir): Update.
13891
13892 2005-09-18  Bruno Haible  <bruno@clisp.org>
13893
13894         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
13895         instead of $dry_run.
13896         (func_cp_if_changed, func_mv_if_changed): Remove functions.
13897         (func_ln_if_changed): Don't handle dry-run here.
13898         (func_import): In dry-run mode, detect more precisely which actions
13899         would be performed, and don't use "...ing" verbs.
13900
13901 2005-09-18  Bruno Haible  <bruno@clisp.org>
13902
13903         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
13904         (func_import): Use join on two temporary files instead of three nested
13905         loops, in order to determine which files are new or old.
13906
13907 2005-09-18  Bruno Haible  <bruno@clisp.org>
13908
13909         * gnulib-tool (func_import): Comment out code that spits out the
13910         new files with --dry-run.
13911
13912 2005-09-18  Bruno Haible  <bruno@clisp.org>
13913
13914         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
13915
13916 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13917
13918         * lib/stat-time.h: New file.
13919         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
13920         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
13921         in a different way.
13922         (timespec_cmp): New function.
13923         * lib/utimecmp.c: Include stat-time.h.
13924         (SYSCALL_RESOLUTION): Depend on whether various struct stat
13925         members exist, not on the obsolescent ST_MTIM_NSEC.
13926         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
13927
13928 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13929
13930         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
13931
13932 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13933
13934         * MODULES.html.sh (File system functions): Add stat-time.
13935         * modules/stat-time: New file.
13936         * modules/timespec (Files): Remove m4/st_mtim.m4; this
13937         is now done in a different way, by the stat-time module.
13938         * modules/utimecmp (Depends-on): Add stat-time.
13939
13940 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
13941
13942         * m4/st_mtim.m4: Remove.  Superseded by...
13943         * m4/stat-time.m4: New file.
13944         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
13945         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
13946
13947 2005-09-15  Derek Price  <derek@ximbiot.com>
13948
13949         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
13950
13951 2005-09-15  Derek Price  <derek@ximbiot.com>
13952
13953         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
13954         * lib/regex_internal.c: Ditto, using this...
13955         (__GNUC_PREREQ): ...new macro.
13956         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
13957         using...
13958         (__GNUC_PREREQ): ...this new macro.
13959
13960         * lib/strstr.h: Include string.h. Define strstr as a macro here.
13961
13962 2005-09-15  Derek Price  <derek@ximbiot.com>
13963             Paul Eggert  <eggert@cs.ucla.edu>
13964
13965         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
13966         changes, consolidating in...
13967         * lib/regex_internal.h: ...this file.
13968
13969 2005-09-13  Jim Meyering  <jim@meyering.net>
13970
13971         * lib/canon-host.c: Filter through gnu indent and reword comments
13972         slightly.
13973         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
13974
13975 2005-09-13  Derek Price  <derek@ximbiot.com>
13976
13977         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
13978         failure.
13979         Reported by Jim Meyering  <jim@meyering.net>.
13980
13981 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13982
13983         * lib/base64.c: Typo.
13984         (base64_encode): Put b64str in initialized data section.
13985
13986 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
13987
13988         Merge glibc and coreutils changes into gnulib, plus a few
13989         extra fixes.
13990         * lib/md5.c: Use #error rather than a string.
13991         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
13992         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
13993         (__attribute__): Define to empty for non recent-GCC.
13994         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
13995         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
13996         Renamed from their non-__ counterparts, with new macros replacing
13997         them if not _LIBC.  Add __THROW attribute.
13998         (rol): Remove.
13999         (struct md5_ctx): Align buffer if using GCC.
14000         * lib/sha1.h (struct sha1_ctx): Likewise.
14001         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
14002         The old name was backwards.
14003         (NOTSWAP): Remove; not used.
14004         (rol): New macro, moved here from md5.h.
14005         (sha1_process_block): Remove a FIXME that doesn't make sense.
14006
14007 2005-09-12  Derek Price  <derek@ximbiot.com>
14008
14009         Return usable errors from canon-host.
14010         * lib/canon-host.h: New file.
14011         * lib/canon-host.c (canon_host): Wrap...
14012         (canon_host_r): ...this new function, which now relies exclusively on
14013         getaddrinfo.
14014         (ch_strerror): New function.
14015         (last_cherror): New global.
14016         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
14017         interface.
14018         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
14019         void *.
14020         (freeaddrinfo): Free ai->ai_canonname when set.
14021
14022 2005-09-12  Derek Price  <derek@ximbiot.com>
14023
14024         Make canon-host require getaddrinfo.
14025         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
14026         AC_LIBSOURCE canon-host.h.  Call...
14027         (gl_PREREQ_CANON_HOST): ...this new function, which requires
14028         gl_GETADDRINFO.
14029         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
14030
14031 2005-09-12  Derek Price  <derek@ximbiot.com>
14032
14033         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
14034         LGPL.
14035         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
14036
14037 2005-09-12  Derek Price  <derek@ximbiot.com>
14038
14039         * lib/gai_strerror.c: Include config.h when available.  Include
14040         getaddrinfo.h before other headers to test interface.
14041         Reported by Larry Jones <lawrence.jones@ugs.com>.
14042
14043 2005-09-12  Derek Price  <derek@ximbiot.com>
14044             Paul Eggert  <eggert@cs.ucla.edu>
14045
14046         * modules/glob (Files): Add glob-libc.h.
14047
14048 2005-09-12  Derek Price  <derek@ximbiot.com>
14049             Paul Eggert  <eggert@cs.ucla.edu>
14050
14051         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
14052         glob_.h, glob-libc.h.
14053         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
14054
14055 2005-09-12  Derek Price  <derek@ximbiot.com>
14056             Paul Eggert  <eggert@cs.ucla.edu>
14057
14058         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
14059         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
14060         protecting things that should be done only in gnulib contexts.
14061         * lib/glob_.h: New file, containing only the glob things needed for
14062         gnulib.
14063         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
14064         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
14065         (glob, globfree, glob_pattern_p): Now defined simply in terms of
14066         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
14067         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
14068         and to respect the namespace rules better.
14069
14070 2005-09-08  Simon Josefsson  <jas@extundo.com>
14071
14072         * modules/socklen: New file.
14073
14074 2005-09-08  Simon Josefsson  <jas@extundo.com>
14075
14076         * m4/socklen.m4: New file.
14077
14078 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14079
14080         * modules/utimens (Files): Add m4/utimbuf.m4, since
14081         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
14082         Reported by Sergey Poznyakoff.
14083
14084 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14085
14086         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
14087         definitions, since that's the preferred style in glibc.
14088         Fix a minor spacing issue, and update copyright notice to match
14089         glibc's.
14090
14091 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14092
14093         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
14094
14095 2005-09-06  Simon Josefsson  <jas@extundo.com>
14096
14097         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
14098         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
14099
14100 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14101
14102         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
14103         warning.
14104
14105 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14106
14107         * config/srclist.txt: Add glibc bug 1302.
14108
14109 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
14110
14111         Change bitset word type from unsigned int to unsigned long int,
14112         as this has better performance on typical 64-bit hosts.
14113         Port bitset code to hosts with unusual word sizes.
14114         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
14115         (build_collating_symbol):
14116         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
14117         argument is a bitset.  This is merely a style issue, but it makes
14118         it clearer that an entire array is expected.
14119         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
14120         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
14121         Port to the case where bitset_word is not the same as unsigned int.
14122         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
14123         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
14124         Likewise.
14125         * lib/regexec.c (check_dst_limits_calc_pos_1,
14126         check_subexp_matching_top):
14127         (build_trtable, group_nodes_into_DFAstates):
14128         Likewise.
14129         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
14130         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
14131         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
14132         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
14133         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
14134         * lib/regcomp.c (optimize_subexps, lower_subexp):
14135         Work even if bitset_word has holes in its bitwise representation.
14136         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
14137         * lib/regexec.c (check_dst_limits_calc_pos_1,
14138         check_subexp_matching_top):
14139         Likewise.
14140         * lib/regex_internal.c (re_string_reconstruct):
14141         Don't assume UCHAR_MAX == 255.
14142         * lib/regex_internal.h (bitset_set_all): Likewise.
14143         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
14144         All uses changed.
14145         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
14146         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
14147         All uses changed.
14148         (BITSET_WORD_MAX): New macro.
14149         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
14150         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
14151         (bitset_empty, bitset_copy):
14152         Prefer sizeof (bitset) to multiplying it out ourselves.
14153         (bitset_not_merge): Remove; unused.
14154         (bitset_contain): Return bool, not unsigned int with one bit on.
14155         All callers changed.
14156         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
14157         alignment than re_node_set; do this by defining a new internal
14158         type struct dests_alloc and using it to allocate memory.
14159
14160 2005-09-05  Bruno Haible  <bruno@clisp.org>
14161
14162         * gnulib-tool (func_import): Fix comparison in handling of symbolic
14163         links.
14164
14165 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
14166
14167         * modules/size_max (Makefile.am): Add size_max.h
14168
14169 2005-09-04  Derek Price  <derek@ximbiot.com>
14170
14171         * gnulib-tool (func_import): Fix reversed $symbolic logic.
14172
14173 2005-09-03  Simon Josefsson  <jas@extundo.com>
14174
14175         * gnulib-tool: Fix typo.
14176
14177 2005-09-03  Simon Josefsson  <jas@extundo.com>
14178
14179         * config/srclist.txt: Add glibc bug 1293.
14180
14181 2005-09-03  Derek Price  <derek@ximbiot.com>
14182
14183         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
14184         From Larry Jones <lawrence.jones@ugs.com>.
14185
14186 2005-09-02  Simon Josefsson  <jas@extundo.com>
14187
14188         * modules/socklen: New file.
14189
14190 2005-09-02  Simon Josefsson  <jas@extundo.com>
14191
14192         * modules/havelib: New module.
14193
14194         * modules/gettext, modules/iconv, modules/lock, modules/readline:
14195         Use havelib.
14196
14197 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
14198
14199         Check for arithmetic overflow when calculating sizes, to prevent
14200         some buffer-overflow issues.  These patches are conservative, in the
14201         sense that when I couldn't determine whether an overflow was possible,
14202         I inserted a run-time check.
14203         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
14204         macros.
14205         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
14206         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
14207         (re_xnrealloc, re_x2nrealloc): New inline functions.
14208         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
14209         parse_bracket_exp):
14210         (build_equiv_class, build_charclass): Check for arithmetic overflow
14211         in size expression calculations.
14212         * lib/regex_internal.c (re_string_realloc_buffers):
14213         (build_wcs_upper_buffer, re_node_set_add_intersect):
14214         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
14215         (re_dfa_add_node, register_state): Likewise.
14216         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
14217         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
14218         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
14219         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
14220
14221 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
14222
14223         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
14224         m4/ulonglong.m4.  Problem reported by Martin Lambers.
14225
14226 2005-09-02  Bruno Haible  <bruno@clisp.org>
14227
14228         Support for lib vs. lib64 distinction on biarch platforms.
14229         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
14230         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
14231         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
14232
14233 2005-09-02  Bruno Haible  <bruno@clisp.org>
14234
14235         * gnulib-tool (import): In the other first-use case, provide defaults
14236         as well.
14237
14238 2005-09-02  Bruno Haible  <bruno@clisp.org>
14239
14240         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
14241         patches not yet found in the latest gettext release.
14242
14243 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
14244
14245         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
14246         to avoid a collision with bits/local_lim.h in glibc.
14247         All uses changed.  Problem reported by Dmitry V. Levin in
14248         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
14249
14250         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
14251         bugs in int versus size_t comparisons.
14252         (re_string_context_at): Fix bug where the code assumed that
14253         Idx is signed.
14254
14255         Use bool where appropriate.
14256         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
14257         All callers changed.
14258         (calc_eclosure_iter): Likewise, for ROOT arg.
14259         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
14260         (build_charclass_op): Likewise, for NON_MATCH arg.
14261         * lib/regex_internal.c (re_string_allocate, re_string_construct):
14262         (re_string_construct_common): Likewise, for ICASE arg.
14263         * lib/regexec.c (re_search_2_stub, re_search_stub):
14264         Likewise, for RET_LEN arg.
14265         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
14266         (set_regs): Likewise, for FL_BACKTRACK arg.
14267         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
14268         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
14269         (calc_eclosure_iter, parse_bracket_exp):
14270         Use bool for internal variables that are booleans.
14271         * lib/regexec.c (re_search_internal, check_matching,
14272         proceed_next_node):
14273         (set_regs, build_sifted_states, sift_states_bkref):
14274         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
14275         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
14276         (find_collation_sequence_value):
14277         Likewise.
14278         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
14279         (re_node_set_compare):
14280         Return bool, not int. All callers changed.
14281         * lib/regexec.c (check_halt_node_context, check_dst_limits):
14282         (build_trtable, check_node_accept): Likewise.
14283         * lib/regex_internal.h: Include stdbool.h.
14284
14285         Fix bugs uncovered when converting to bool.
14286         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
14287         failure instead of charging ahead blindly.
14288         * lib/regex_internal.c (register_state): Likewise.
14289         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
14290         for freeing internal storage.
14291         (group_nodes_into_DFA_states): Use unsigned int, not int, for
14292         bitset pieces used as boolean, to avoid undefined behavior
14293         on hosts that do int overflow checking.
14294
14295 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
14296
14297         * config/srclist.txt: Add glibc bugs 1285-1287.
14298
14299 2005-09-01  Jim Meyering  <jim@meyering.net>
14300
14301         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
14302         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
14303         Require gl_STAT_MACROS, too.
14304
14305 2005-09-01  Bruno Haible  <bruno@clisp.org>
14306
14307         * gnulib-tool (import): In the first-use case, provide defaults.
14308
14309 2005-09-01  Bruno Haible  <bruno@clisp.org>
14310
14311         * gnulib-tool (func_import): Remove the .tmp files.
14312
14313 2005-09-01  Bruno Haible  <bruno@clisp.org>
14314
14315         * gnulib-tool (func_import): Fix handling of symbolic links.
14316
14317 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14318
14319         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
14320         old glibc regex code mishandles strings longer than 2**31 bytes.
14321         This patch fixes this when the regex code is used in gnulib
14322         (i.e., outside glibc).
14323
14324         This patch should not affect the use of the regex code inside
14325         glibc.  No doubt this problem also needs to be handled for glibc
14326         as well, but the result will be an incompatible change to the
14327         glibc ABI, and the old ABI will have to be supported too.  That
14328         can be the the subject for another patch.
14329
14330         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
14331         governing whether the rest of this patch is active.  By default,
14332         the macro is disabled and the patch has no effect.
14333         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
14334         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
14335         (struct re_pattern_buffer, re_search, re_search_2, re_match):
14336         (re_match_2, re_set_registers): Use the new types.
14337         * lib/regex_internal.h (Idx, re_hashval_t): New types.
14338         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
14339         New macros.
14340         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
14341         (re_string_context_at, bin_tree_t, re_dfastate_t):
14342         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
14343         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
14344         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
14345         (re_string_char_size_at, re_string_wchar_at):
14346         (re_string_elem_size_at):
14347         Use the new types and macros to port to 64-bit hosts.
14348         Use unsigned types for internal values, so that the code
14349         mostly works even for arrays larger than SSIZE_MAX.
14350         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
14351         (search_duplicated_node, calc_eclosure_iter, fetch_number):
14352         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
14353         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
14354         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
14355         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
14356         (calc_inveclosure, parse_dup_op, build_range_exp):
14357         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
14358         (fetch_number, create_token_tree, mark_opt_subexp):
14359         Likewise.
14360         * lib/regex_internal.c (re_string_construct_common,
14361         create_ci_newstate):
14362         (create_cd_newstate, re_string_allocate, re_string_construct):
14363         (re_string_realloc_buffers, build_wcs_upper_buffer):
14364         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
14365         (re_string_reconstruct, re_string_peek_byte_case):
14366         (re_string_fetch_byte_case, re_string_context_at):
14367         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
14368         (re_node_set_init_copy, re_node_set_add_intersect):
14369         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14370         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14371         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
14372         (re_acquire_state, re_acquire_state_context, register_state):
14373         Likewise.
14374         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
14375         search_cur_bkref_entry):
14376         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
14377         (re_search_internal, re_search_2_stub, re_search_stub)
14378         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
14379         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
14380         (update_cur_sifted_state, check_dst_limits):
14381         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
14382         (check_subexp_limits, sift_states_bkref, merge_state_array):
14383         (check_subexp_matching_top, get_subexp, get_subexp_sub):
14384         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
14385         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
14386         (expand_bkref_cache, check_node_accept_bytes):
14387         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
14388         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
14389         (acquire_init_state_context, check_halt_node_context):
14390         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
14391         (sift_states_backward, clean_state_log_if_needed):
14392         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
14393         (find_recover_state, transit_state_sb, transit_state_mb):
14394         (transit_state_bkref, build_trtable, match_ctx_clean):
14395         Likewise.
14396         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
14397         to work around an assumption that REG_MISSING is negative.
14398
14399         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
14400         (seek_collating_symbol_entry) [defined _LIBC]:
14401         (lookup_collation_sequence_value) [defined _LIBC]:
14402         (build_range_exp, build_collating_symbol) [defined _LIBC]:
14403         Use prototypes rather than old-style function definitions.
14404         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
14405         (transit_state_sb) [0]:
14406         (find_collation_sequence_value) [defined _LIBC]: Likewise.
14407
14408         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
14409         rm_eo.
14410
14411         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
14412         (optimize_subexps, lower_subexp):
14413         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
14414         since the signed shift might overflow.  Use 1u<<31 instead.
14415         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
14416         Likewise.
14417         * lib/regexec.c (check_dst_limits_calc_pos_1,
14418         check_subexp_matching_top): Likewise.
14419
14420         * lib/regcomp.c (optimize_subexps, lower_subexp):
14421         Use CHAR_BIT rather than 8, for clarity.
14422         * lib/regexec.c (check_dst_limits_calc_pos_1):
14423         (check_subexp_matching_top): Likewise.
14424         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
14425         have to worry about portability issues when shifting it left.
14426         Remove no-longer-needed test for table_size > 0.
14427         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
14428         in a word, as the resulting behavior is undefined.
14429         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
14430         in one case, a <= should have been an <, and in another case the
14431         whole test was missing.
14432         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
14433         the standard name CHAR_BIT.
14434         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
14435         this is not true on one's complement and signed-magnitude hosts.
14436
14437         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
14438         next_last_offset.
14439         (struct re_dfa_t): Remove unused member states_alloc.
14440         * lib/regcomp.c (init_dfa): Don't initialize unused members.
14441
14442 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14443
14444         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
14445         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
14446         and large-file glibc and in 32-bit large-file Solaris.
14447
14448 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14449
14450         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
14451         lengths fit in regoff_t; this isn't true if regoff_t is the same
14452         width as size_t.
14453         * lib/regex.c (re_search_internal): 5th arg is LAST_START
14454         (= START + RANGE) instead of RANGE.  This avoids overflow
14455         problems when regoff_t is the same width as size_t.
14456         All callers changed.
14457         (re_search_2_stub): Check for overflow when adding the
14458         sizes of the two strings.
14459         (re_search_stub): Check for overflow when adding START
14460         to RANGE; if it occurs, substitute the extreme value.
14461
14462 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14463
14464         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
14465
14466 2005-08-31  Jim Meyering  <jim@meyering.net>
14467
14468         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
14469         a pointer-to-const.
14470         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
14471         (register_state): Likewise.
14472         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
14473         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
14474         (group_nodes_into_DFAstates): Likewise.
14475
14476 2005-08-31  Jim Meyering  <jim@meyering.net>
14477
14478         * check-module: Add a FIXME comment.
14479
14480 2005-08-31  Eric Blake  <ebb9@byu.net>
14481
14482         * modules/unistd-safer (Files): Add unistd--.h.
14483         * modules/stdio-safer (Files): Add stdio--.h.
14484
14485 2005-08-31  Derek Price  <derek@ximbiot.com>
14486
14487         * lib/getdelim.c (getdelim): Return EOF on EOF.
14488         Reported by Larry Jones <lawrence.jones@ugs.com>.
14489
14490 2005-08-31  Bruno Haible  <bruno@clisp.org>
14491
14492         Avoid unnecessary diffs in the generated lib/Makefile.am.
14493         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
14494         the generated files.
14495         (func_import): Don't set cmd.
14496
14497 2005-08-31  Bruno Haible  <bruno@clisp.org>
14498
14499         * lib/strstr.c: Include <stddef.h>, for NULL.
14500         * lib/strcasestr.c: Likewise.
14501         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14502
14503 2005-08-31  Bruno Haible  <bruno@clisp.org>
14504
14505         * gnulib-tool: New option --macro-prefix.
14506         (func_import): Use macro_prefix.
14507         (import): Handle option --macro-prefix.
14508
14509 2005-08-31  Bruno Haible  <bruno@clisp.org>
14510
14511         * gnulib-tool (import): Rename most ac_* variables to cached_*.
14512         Also use new variables cached_lgpl, cached_libtool.
14513
14514 2005-08-31  Bruno Haible  <bruno@clisp.org>
14515
14516         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
14517         always instantiating them.
14518
14519 2005-08-31  Bruno Haible  <bruno@clisp.org>
14520
14521         * gnulib-tool (func_import): Read the previous cached settings
14522         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
14523         earlier added by gnulib but are now dropped. Warn when a gnulib file
14524         overwrites a non-gnulib file.
14525
14526 2005-08-31  Bruno Haible  <bruno@clisp.org>
14527
14528         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
14529         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
14530         projects that don't keep autogenerated files in CVS. Put into
14531         actioncmd only the specified modules, not the transitive closure.
14532
14533 2005-08-31  Bruno Haible  <bruno@clisp.org>
14534
14535         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
14536         Create directories that shall be filled.
14537         (import): Don't look for gl_* macros in configure.ac. Recurse across
14538         all directories containing a gnulib-cache.m4 files, if meaningful.
14539
14540 2005-08-31  Bruno Haible  <bruno@clisp.org>
14541
14542         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
14543         (import): Set seen_libtool when we see gl_LIBTOOL.
14544
14545 2005-08-31  Bruno Haible  <bruno@clisp.org>
14546
14547         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
14548         declaration macro definitions from generated gnulib.m4.
14549
14550 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
14551
14552         * lib/iconvme.h: Add prototype for iconv_alloc.
14553
14554 2005-08-29  Simon Josefsson  <jas@extundo.com>
14555
14556         * lib/iconvme.c: Fix errno.
14557
14558 2005-08-29  Bruno Haible  <bruno@clisp.org>
14559
14560         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
14561         that it works when the directory contains spaces.
14562
14563 2005-08-29  Bruno Haible  <bruno@clisp.org>
14564
14565         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
14566
14567 2005-08-29  Bruno Haible  <bruno@clisp.org>
14568
14569         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
14570         Emit more advice.
14571
14572 2005-08-29  Bruno Haible  <bruno@clisp.org>
14573         and Stepan Kasal  <kasal@ucw.cz>
14574
14575         * check-module: If more parameters are given, check each of them
14576         separately; add more exceptions, as noted by Jim Meyering.
14577         (check_module): New procedure.
14578         (%exempt_header): Now contains all exceptions.
14579
14580 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
14581
14582         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
14583
14584 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14585
14586         * lib/iconvme.c: Split iconv_string into iconv_alloc.
14587
14588 2005-08-28  Bruno Haible  <bruno@clisp.org>
14589
14590         * m4/gnulib-tool.m4: New file.
14591
14592 2005-08-27  Jim Meyering  <jim@meyering.net>
14593
14594         * modules/unistd-safer (Files): Add pipe-safer.c.
14595         * modules/fcntl-safer (Files): Add creat-safer.c.
14596
14597 2005-08-27  Jim Meyering  <jim@meyering.net>
14598
14599         * m4/stdlib-safer.m4: New file.  From coreutils.
14600         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
14601         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
14602         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
14603         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
14604         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
14605
14606 2005-08-27  Jim Meyering  <jim@meyering.net>
14607
14608         * lib/fopen-safer.c: Merge minor changes from coreutils.
14609         * lib/dup-safer.c: Likewise.
14610         * lib/fd-safer.c: Likewise.
14611
14612         Merge from coreutils.
14613         * lib/stdio--.h: New file.
14614         * lib/stdlib--.h: New file.
14615         * lib/mkstemp-safer.c: New file.
14616
14617         GNU tar needs these.
14618         * lib/pipe-safer.c: New file.
14619         * lib/creat-safer.c: New file.
14620         * lib/fcntl--.h (creat): Define to creat_safer.
14621         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
14622         * lib/unistd--.h (pipe): Define to pipe_safer.
14623         * lib/unistd-safer.h: Declare pipe_safer.
14624
14625 2005-08-26  Simon Josefsson  <jas@extundo.com>
14626
14627         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
14628         Haible <bruno@clisp.org>.
14629
14630 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
14631
14632         * lib/regex_internal.h: Remove all references to
14633         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
14634         or better.
14635         (bitset_not, bitset_merge, bitset_not_merge):
14636         (bitset_mask, re_string_allocate, re_string_construct):
14637         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
14638         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
14639         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
14640         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
14641         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14642         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14643         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
14644         (re_acquire_state_context):
14645         Remove unnecessary forward decls.
14646         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
14647         Put __attribute at function definition,
14648         now that the function decl has been removed.
14649         * lib/regex_internal.c (re_string_peek_byte_case):
14650         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
14651         Likewise.
14652
14653 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
14654
14655         * m4/regex.m4: Add AC_PREREQ(2.50).
14656         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
14657
14658 2005-08-25  Simon Josefsson  <jas@extundo.com>
14659
14660         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
14661         __fsetlocking.
14662
14663 2005-08-25  Simon Josefsson  <jas@extundo.com>
14664
14665         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
14666         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
14667         GLIBC specific code.
14668
14669 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14670
14671         Make regex safe for g++.  This fixes one real bug (an "err"
14672         that should have been "*err").  g++ problem reported by
14673         Sam Steingold.
14674         * lib/regex_internal.h (re_calloc): New macro, consistent with
14675         re_malloc etc.  All callers of calloc changed to use re_calloc.
14676         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
14677         not int.  All callers changed.
14678         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
14679         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
14680         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
14681         (find_recover_state): Change "err" to "*err"; this fixes what
14682         appears to be a real bug.
14683         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
14684         versus int.
14685
14686 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14687
14688         * modules/regex (Depends-on): Add malloc, since the code
14689         assumes that !malloc(0) means failure.
14690
14691 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14692
14693         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
14694
14695         alloca modernization/simplification for regex.
14696         * lib/regex.c: Remove portability cruft for alloca.  This no longer
14697         needs to be at the start of the file, and can be moved into
14698         regex_internal.h and simplified.
14699         * lib/regex_internal.h: Include <alloca.h>.
14700         (__libc_use_alloca) [!defined _LIBC]: New macro.
14701         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
14702         now works outside glibc.
14703
14704 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14705
14706         * config/srclist.txt: Add glibc bugs 1241, 1245.
14707
14708 2005-08-25  Jim Meyering  <jim@meyering.net>
14709
14710         * lib/open-safer.c: Include <config.h>.
14711         Otherwise, we'd lose LARGEFILE support in any file using
14712         e.g. "fcntl--.h"
14713
14714 2005-08-25  Bruno Haible  <bruno@clisp.org>
14715
14716         * m4/minmax.m4: Require autoconf 2.52.
14717         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
14718         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
14719         alternatives of translit over the alphabet.
14720         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
14721
14722 2005-08-24  Simon Josefsson  <jas@extundo.com>
14723
14724         * tests/test-getpass.c: New file.
14725
14726 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14727
14728         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
14729         for GNU regex features.
14730
14731 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14732
14733         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
14734         * lib/regex.h (regerror): Likewise.
14735
14736         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
14737         requires this.  (The code never needed it.)
14738
14739         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
14740         All uses of recently-renamed identifiers changed to use the new,
14741         POSIX-compliant names.  The code will build and run just fine
14742         without these changes, but it's better to eat our own dog food
14743         and use the standard-conforming names.
14744
14745         * lib/regex.h: Fix a multitude of POSIX name space violations.
14746         These changes have an effect only for programs that define
14747         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
14748         do not change anything for programs compiled in the normal way.
14749         Also, there is no effect on the ABI.
14750
14751         (_REGEX_SOURCE): New macro.
14752         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
14753         defined and _GNU_SOURCE is not; this fixes a name space violation.
14754
14755         Rename the following macros to obey POSIX requirements.
14756         The old names are still visible as macros if _REGEX_SOURCE is defined.
14757         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
14758         RE_BACKSLASH_ESCAPE_IN_LISTS.
14759         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
14760         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
14761         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
14762         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
14763         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
14764         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
14765         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
14766         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
14767         (REG_INTERVALS): renamed from RE_INTERVALS.
14768         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
14769         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
14770         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
14771         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
14772         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
14773         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
14774         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
14775         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
14776         RE_UNMATCHED_RIGHT_PAREN_ORD.
14777         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
14778         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
14779         (REG_DEBUG): renamed from RE_DEBUG.
14780         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
14781         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
14782         unusual, since we can't clash with the POSIX REG_ICASE.
14783         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
14784         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
14785         (REG_NO_SUB): renamed from RE_NO_SUB.
14786         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
14787         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
14788         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
14789         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
14790         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
14791         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
14792         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
14793         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
14794         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
14795         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
14796         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
14797         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
14798         RE_SYNTAX_POSIX_MINIMAL_BASIC.
14799         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
14800         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
14801         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
14802         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
14803         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
14804         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
14805         (REG_FIXED): Renamed from REGS_FIXED.
14806         (REG_NREGS): Renamed from RE_NREGS.
14807
14808         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
14809         of other REG_* macros, since POSIX says the user is allowed to
14810         #undef these macros selectively.
14811
14812         (reg_errcode_t): Update comment stating what other tables need
14813         to be consistent.
14814
14815         Rename the following enum values to obey POSIX requirements.
14816         The old names are still visible as macros.
14817         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
14818         is not defined, since GNU is supposed to be a superset of POSIX as
14819         much as possible, and since we want reg_errcode_t to be a signed
14820         type for implementation consistency.
14821         (_REG_NOERROR): Renamed from REG_NOERROR.
14822         (_REG_NOMATCH): Renamed from REG_NOMATCH.
14823         (_REG_BADPAT): Renamed from REG_BADPAT.
14824         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
14825         (_REG_ECTYPE): Renamed from REG_ECTYPE.
14826         (_REG_EESCAPE): Renamed from REG_EESCAPE.
14827         (_REG_ESUBREG): Renamed from REG_ESUBREG.
14828         (_REG_EBRACK): Renamed from REG_EBRACK.
14829         (_REG_EPAREN): Renamed from REG_EPAREN.
14830         (_REG_EBRACE): Renamed from REG_EBRACE.
14831         (_REG_BADBR): Renamed from REG_BADBR.
14832         (_REG_ERANGE): Renamed from REG_ERANGE.
14833         (_REG_ESPACE): Renamed from REG_ESPACE.
14834         (_REG_BADRPT): Renamed from REG_BADRPT.
14835         (_REG_EEND): Renamed from REG_EEND.
14836         (_REG_ESIZE): Renamed from REG_ESIZE.
14837         (_REG_ERPAREN): Renamed from REG_ERPAREN.
14838         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
14839         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
14840         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
14841         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
14842
14843         (_REG_RE_NAME, _REG_RM_NAME): New macros.
14844         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
14845         changed.  But support the old name if the new one is not defined
14846         and if _REGEX_SOURCE.
14847
14848         Change the following member names in struct re_pattern_buffer.
14849         The old names are still supported if !_REGEX_SOURCE.
14850         The new names are always supported, regardless of _REGEX_SOURCE.
14851         (re_buffer): Renamed from buffer.
14852         (re_allocated): Renamed from allocated.
14853         (re_used): Renamed from used.
14854         (re_syntax): Renamed from syntax.
14855         (re_fastmap): Renamed from fastmap.
14856         (re_translate): Renamed from translate.
14857         (re_can_be_null): Renamed from can_be_null.
14858         (re_regs_allocated): Renamed from regs_allocated.
14859         (re_fastmap_accurate): Renamed from fastmap_accurate.
14860         (re_no_sub): Renamed from no_sub.
14861         (re_not_bol): Renamed from not_bol.
14862         (re_not_eol): Renamed from not_eol.
14863         (re_newline_anchor): Renamed from newline_anchor.
14864
14865         Change the following member names in struct re_registers.
14866         The old names are still supported if !_REGEX_SOURCE.
14867         The new names are always supported, regardless of _REGEX_SOURCE.
14868         (rm_num_regs): Renamed from num_regs.
14869         (rm_start): Renamed from start.
14870         (rm_end): Renamed from end.
14871
14872         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
14873         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
14874         Prepend __ to parameter names.
14875
14876         Undo yesterday's changes.
14877
14878 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14879
14880         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
14881         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
14882         lib/regex.c.
14883
14884 2005-08-24  Jim Meyering  <jim@meyering.net>
14885
14886         Sync from coreutils.
14887         * m4/fcntl-safer.m4: New file.
14888
14889         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
14890         and object files for this module.
14891
14892 2005-08-24  Jim Meyering  <jim@meyering.net>
14893
14894         Sync from coreutils.
14895         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
14896
14897 2005-08-24  Jim Meyering  <jim@meyering.net>
14898
14899         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
14900         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
14901
14902 2005-08-24  Jim Meyering  <jim@meyering.net>
14903
14904         * modules/fcntl-safer: New module.
14905         * modules/fts (Depends-on): Add fcntl-safer.
14906         * MODULES.html.sh (File descriptor based Input/Output):
14907         Add fcntl-safer.
14908
14909 2005-08-24  Bruno Haible  <bruno@clisp.org>
14910
14911         Support for unit test modules.
14912         * modules/README: Mention tests modules.
14913         * modules/TEMPLATE-TESTS: New file.
14914         * gnulib-tool: New options --extract-tests-module, --with-tests and
14915         --tests-base (unused for the moment).
14916         (testsbase, inctests): New variables.
14917         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
14918         (func_verify_module): Exclude TEMPLATE-TESTS.
14919         (func_verify_nontests_module, func_verify_tests_module): New functions.
14920         (func_get_dependencies): Add implicit dependency for tests modules.
14921         (func_get_tests_module): New function.
14922         (func_modules_transitive_closure): When --with-tests was specified,
14923         include the unit tests as well, unless explicitly avoided.
14924         (func_emit_lib_Makefile_am): Ignore the tests modules here.
14925         (func_emit_tests_Makefile_am): New function.
14926         (func_create_testdir): When --with-tests was specified, emit a
14927         tests/ directory.
14928         * MODULES.html.sh (Future developments): Update.
14929
14930 2005-08-24  Bruno Haible  <bruno@clisp.org>
14931
14932         * modules/tls-tests: New file.
14933         * tests/test-tls.c: New file, from GNU gettext.
14934
14935 2005-08-24  Bruno Haible  <bruno@clisp.org>
14936
14937         * modules/lock-tests: New file.
14938         * tests/test-lock.c: New file, from GNU gettext.
14939
14940 2005-08-24  Bruno Haible  <bruno@clisp.org>
14941
14942         * lib/lock.h: Add multiple inclusion guard.
14943         * lib/tls.h: Add multiple inclusion guard.
14944
14945 2005-08-24  Bruno Haible  <bruno@clisp.org>
14946
14947         * gnulib-tool: Add support for the --aux-dir option to
14948         --create-testdir, --create-megatestdir, --test, --megatest.
14949         (func_create_testdir, func_create_megatestdir): Optionally emit a
14950         AC_CONFIG_AUX_DIR directive.
14951         (create-testdir, create-megatestdir, test, megatest): Provide a
14952         default value for $auxdir.
14953
14954 2005-08-24  Bruno Haible  <bruno@clisp.org>
14955
14956         * gnulib-tool (import): Use compound statement instead of subshell
14957         where possible.
14958
14959 2005-08-24  Bruno Haible  <bruno@clisp.org>
14960
14961         * gnulib-tool (import): Change --aux-dir default to "build-aux".
14962
14963 2005-08-24  Bruno Haible  <bruno@clisp.org>
14964
14965         * gnulib-tool (func_version): Update.
14966
14967 2005-08-24  Bruno Haible  <bruno@clisp.org>
14968
14969         * gnulib-tool (func_import, func_create_testdir,
14970         func_create_megatestdir): Quote all autoconf macro arguments.
14971
14972 2005-08-24  Bruno Haible  <bruno@clisp.org>
14973
14974         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
14975         option --force, because --force causes the aclocal.m4 of each
14976         subdirectory to be newer than the corresponding config.h.in.
14977
14978 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14979
14980         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
14981         All contents moved to gl_REGEX.
14982         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
14983         assume that it does.
14984
14985 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14986
14987         * lib/regex.h (REG_NOSYS)
14988         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
14989         Define, since POSIX requires it as of 2001.
14990         (_REG_ENOSYS)
14991         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
14992         New private symbol, used to keep the enum signed in all cases.
14993         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
14994         Youngman in
14995         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
14996
14997         * lib/regex_internal.c (re_string_skip_chars, register_state):
14998         (calc_state_hash):
14999         Remove forward decls; no longer needed now that we use prototypes.
15000         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
15001         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
15002         (clean_state_log_if_needed): Likewise.
15003
15004 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15005
15006         * config/srclist.txt: Add glibc bugs 1231-1233.
15007
15008 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15009
15010         Fix problems reported by Sam Steingold in
15011         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
15012         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
15013         assumed that reg_errcode_t is a signed type, which is not
15014         necessarily true if _XOPEN_SOURCE is not defined.
15015         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
15016         since some compilers warn about it otherwise.
15017
15018 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15019
15020         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
15021         (init_word_char, create_initial_state, duplicate_node_closure):
15022         (fetch_token, peek_token_bracket, build_range_exp):
15023         (build_collating_symbol): Remove forward decls; no longer needed
15024         now that we use prototypes.
15025
15026         * lib/regcomp.c:
15027         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
15028         (re_compile_fastmap_iter, regcomp, regerror, regfree):
15029         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
15030         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
15031         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
15032         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
15033         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
15034         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
15035         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
15036         (build_range_exp, build_collating_symbol, parse_bracket_exp):
15037         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
15038         (build_charclass, build_charclass_op, fetch_number, create_tree):
15039         (create_token_tree, mark_opt_subexp, duplicate_tree):
15040         Use prototypes rather than old-style definitions.
15041
15042         * lib/regex_internal.c:
15043         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
15044         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
15045         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
15046         (re_string_reconstruct, re_string_peek_byte_case):
15047         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
15048         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
15049         (re_node_set_init_copy, re_node_set_add_intersect):
15050         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15051         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15052         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
15053         (re_acquire_state, re_acquire_state_context, register_state):
15054         (create_ci_newstate, create_cd_newstate, free_state):
15055         Likewise.
15056         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
15057         re_search_2):
15058         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
15059         (re_search_internal, prune_impossible_nodes):
15060         (acquire_init_state_context, check_matching, static):
15061         (check_halt_node_context, check_halt_state_context, proceed_next_node):
15062         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
15063         (update_regs, sift_states_backward, build_sifted_states):
15064         (clean_state_log_if_needed, merge_state_array):
15065         (update_cur_sifted_state, add_epsilon_src_nodes):
15066         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
15067         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
15068         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
15069         (find_recover_state, check_subexp_matching_top, transit_state_mb):
15070         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
15071         (check_arrival, check_arrival_add_next_nodes):
15072         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
15073         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
15074         (check_node_accept_bytes, check_node_accept, extend_buffers):
15075         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
15076         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
15077         (sift_ctx_init):
15078         Likewise.
15079
15080         * lib/regex_internal.h:
15081         (re_string_allocate, re_string_construct, re_string_reconstruct):
15082         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
15083         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
15084         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
15085         (re_string_context_at, re_string_peek_byte_case):
15086         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
15087         is defined, since we now use prototypes always.
15088
15089         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
15090         C89 or better.  All uses removed.
15091
15092 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15093
15094         * config/srclist.txt: Add glibc bugs 1220-1227.
15095
15096 2005-08-20  Jim Meyering  <jim@meyering.net>
15097
15098         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
15099         of unused local, dfa.
15100
15101 2005-08-20  Bruno Haible  <bruno@clisp.org>
15102
15103         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
15104
15105 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15106
15107         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
15108         (re_node_set_insert_last, re_dfa_add_node):
15109         Rename local variables to avoid GCC shadowing warnings.
15110
15111 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15112
15113         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
15114         [defined lint]: Suppress bogus uninitialized-variable warnings.
15115
15116         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
15117         and let the caller return REG_ESPACE if out of space.  This
15118         removes an uninitialied-variable warning with GCC 4.0.1, and also
15119         avoids taking the address of a local variable.  All callers
15120         changed.
15121
15122 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15123
15124         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
15125         $LIBCSRC/posix/regexec.c.
15126         Add glibc bug 1217 for regcomp.c.
15127
15128 2005-08-19  Jim Meyering  <jim@meyering.net>
15129
15130         * lib/regexec.c (proceed_next_node): Redo local variables to
15131         avoid GCC shadowing warnings.
15132
15133 2005-08-18  Bruno Haible  <bruno@clisp.org>
15134
15135         * lib/strstr.c (strstr): Fix return value in multibyte case.
15136         * lib/strcasestr.c (strcasestr): Likewise.
15137
15138 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15139
15140         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
15141
15142 2005-08-17  Jim Meyering  <jim@meyering.net>
15143
15144         Make the %s format (seconds since the epoch) work for a negative
15145         number and when used with a zero-padded field width, e.g. %015s.
15146
15147         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
15148         label so that it precedes the code to set `digits'.  Otherwise,
15149         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
15150         print `00-22'.  Now, it prints `-0022', as it should.
15151
15152 2005-08-17  Bruno Haible  <bruno@clisp.org>
15153
15154         * modules/strstr (Files): Add m4/mbrtowc.m4.
15155         (Depends-on): Add mbuiter.
15156
15157 2005-08-17  Bruno Haible  <bruno@clisp.org>
15158
15159         * modules/strcasestr: New file.
15160         * MODULES.html.sh (String handling, based on ANSI C 89): Add
15161         strcasestr.
15162
15163 2005-08-17  Bruno Haible  <bruno@clisp.org>
15164
15165         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
15166
15167 2005-08-17  Bruno Haible  <bruno@clisp.org>
15168
15169         * modules/mbuiter: New file.
15170         * MODULES.html.sh (Extended multibyte and wide character utilities):
15171         Add mbuiter.
15172
15173 2005-08-17  Bruno Haible  <bruno@clisp.org>
15174
15175         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
15176         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
15177
15178 2005-08-17  Bruno Haible  <bruno@clisp.org>
15179
15180         * m4/strcasestr.m4: New file.
15181
15182 2005-08-17  Bruno Haible  <bruno@clisp.org>
15183
15184         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
15185         * lib/strstr.c: Completely rewritten, with multibyte locale support.
15186
15187 2005-08-17  Bruno Haible  <bruno@clisp.org>
15188
15189         * lib/strcasestr.h: New file.
15190         * lib/strcasestr.c: New file.
15191
15192 2005-08-17  Bruno Haible  <bruno@clisp.org>
15193
15194         * lib/strcasecmp.c: Use mbuiter.h.
15195
15196 2005-08-17  Bruno Haible  <bruno@clisp.org>
15197
15198         * lib/mbuiter.h: New file.
15199
15200 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
15201
15202         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
15203         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
15204         and gl_GETOPT are both invoked via different paths (as happens
15205         with GNU tar CVS because it uses both argp and getopt), the former
15206         wins.
15207
15208 2005-08-16  Bruno Haible  <bruno@clisp.org>
15209
15210         * modules/tls: New file.
15211         * MODULES.html.sh (Multithreading): Add tls.
15212
15213 2005-08-16  Bruno Haible  <bruno@clisp.org>
15214
15215         * modules/strnlen1: New file.
15216         * MODULES.html.sh (String handling): Add strnlen1.
15217
15218 2005-08-16  Bruno Haible  <bruno@clisp.org>
15219
15220         * modules/strcase (Files): Add m4/mbrtowc.m4.
15221         (Depends-on): Add strnlen1, mbchar.
15222
15223 2005-08-16  Bruno Haible  <bruno@clisp.org>
15224
15225         * modules/mbiter: New file.
15226         * MODULES.html.sh (Extended multibyte and wide character utilities):
15227         Add mbiter.
15228
15229 2005-08-16  Bruno Haible  <bruno@clisp.org>
15230
15231         * modules/mbfile: New file.
15232         * MODULES.html.sh (Extended multibyte and wide character utilities):
15233         Add mbfile.
15234
15235 2005-08-16  Bruno Haible  <bruno@clisp.org>
15236
15237         * modules/mbchar: New file.
15238         * MODULES.html.sh (Extended multibyte and wide character utilities):
15239         New section.
15240
15241 2005-08-16  Bruno Haible  <bruno@clisp.org>
15242
15243         * m4/tls.m4: New file, from GNU gettext.
15244
15245 2005-08-16  Bruno Haible  <bruno@clisp.org>
15246
15247         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
15248         always.
15249         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
15250
15251 2005-08-16  Bruno Haible  <bruno@clisp.org>
15252
15253         * m4/mbiter.m4: New file.
15254
15255 2005-08-16  Bruno Haible  <bruno@clisp.org>
15256
15257         * m4/mbfile.m4: New file.
15258
15259 2005-08-16  Bruno Haible  <bruno@clisp.org>
15260
15261         * m4/mbchar.m4: New file.
15262
15263 2005-08-16  Bruno Haible  <bruno@clisp.org>
15264
15265         * lib/tls.h: New file, from GNU gettext.
15266         * lib/tls.c: New file, from GNU gettext.
15267
15268 2005-08-16  Bruno Haible  <bruno@clisp.org>
15269
15270         * lib/strnlen1.h: New file.
15271         * lib/strnlen1.c: New file.
15272
15273 2005-08-16  Bruno Haible  <bruno@clisp.org>
15274
15275         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
15276         (mbi_init): Update.
15277         (mbi_avail, mbi_advance): Let the iteration end before the terminating
15278         NUL byte, not after it.
15279
15280 2005-08-16  Bruno Haible  <bruno@clisp.org>
15281
15282         * lib/strcase.h (strcasecmp): Add note in comments.
15283         * lib/strncasecmp.c: Use code from strcasecmp.c.
15284         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
15285         (strcasecmp): Work correctly in multibyte locales.
15286
15287 2005-08-16  Bruno Haible  <bruno@clisp.org>
15288
15289         * lib/mbiter.h: New file.
15290
15291 2005-08-16  Bruno Haible  <bruno@clisp.org>
15292
15293         * lib/mbfile.h: New file.
15294
15295 2005-08-16  Bruno Haible  <bruno@clisp.org>
15296
15297         * lib/mbchar.h: New file.
15298         * lib/mbchar.c: New file.
15299
15300 2005-08-16  Bruno Haible  <bruno@clisp.org>
15301
15302         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
15303         the valid ones. Makes the comparison operations transitive:
15304         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
15305         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
15306
15307 2005-08-15  Simon Josefsson  <jas@extundo.com>
15308
15309         * modules/ssize_t (License): Change to 'unlimited'.
15310
15311         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
15312
15313 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
15314
15315         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
15316         Add comments for each pending glibc patch.
15317
15318 2005-08-15  Bruno Haible  <bruno@clisp.org>
15319
15320         * lib/regex.h (__restrict_arr): Don't define to __restrict if
15321         __cplusplus is defined.
15322
15323 2005-08-14  Jim Meyering  <jim@meyering.net>
15324
15325         Sync from coreutils.
15326
15327         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
15328         Use the hash-table-based cycle-detection code not just when
15329         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
15330         Reported by James Youngman in
15331         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
15332         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
15333         FTS_TIGHT_CYCLE_CHECK.
15334         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
15335         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
15336         once again.
15337         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
15338         * lib/fts.c (fd_safer): Remove decl.
15339         Include fcntl--.h rather than unistd-safer.h
15340         (fts_safe_changedir): Don't call fd_safer; no longer needed
15341         now that we include fcntl--.h.
15342
15343 2005-08-12  Simon Josefsson  <jas@extundo.com>
15344
15345         * modules/getndelim2: Use ssize_t module.
15346         * modules/getnline: Likewise.
15347         * modules/safe-read: Likewise.
15348         * modules/xreadlink: Likewise.
15349
15350         * modules/ssize_t: New file.
15351
15352 2005-08-12  Simon Josefsson  <jas@extundo.com>
15353
15354         * m4/readline.m4: Look for termcap, curses or ncurses if required.
15355
15356 2005-08-12  Simon Josefsson  <jas@extundo.com>
15357
15358         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15359         ssize_t.
15360
15361 2005-08-12  Simon Josefsson  <jas@extundo.com>
15362
15363         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
15364         readline, getdelim and check_version.
15365         (Support for systems lacking ISO C 99: Sizes of integer types):
15366         Add size_max.
15367
15368 2005-08-12  Bruno Haible  <bruno@clisp.org>
15369
15370         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
15371
15372 2005-08-11  Simon Josefsson  <jas@extundo.com>
15373
15374         * modules/readline: New file.
15375
15376         * modules/strnlen (Files): Add strnlen.h.
15377
15378 2005-08-11  Simon Josefsson  <jas@extundo.com>
15379
15380         * m4/readline.m4: New file.
15381
15382 2005-08-11  Simon Josefsson  <jas@extundo.com>
15383
15384         * lib/readline.h, readline.c: New file.
15385
15386 2005-08-11  Simon Josefsson  <jas@extundo.com>
15387
15388         * doc/gnulib.texi (Initial import, Finishing touches): Mention
15389         gl_AVOID.
15390
15391 2005-08-11  Bruno Haible  <bruno@clisp.org>
15392
15393         * lib/strnlen.h (strnlen): Change parameter name to match comment.
15394
15395 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
15396
15397         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
15398
15399 2005-08-10  Simon Josefsson  <jas@extundo.com>
15400
15401         * tests/test-iconvme.c: New file.
15402
15403 2005-08-10  Simon Josefsson  <jas@extundo.com>
15404
15405         * m4/strnlen.m4: New file.
15406
15407         * m4/strndup.m4: Don't check for strnlen declaration, done in
15408         strnlen.m4.
15409
15410 2005-08-10  Simon Josefsson  <jas@extundo.com>
15411
15412         * lib/strndup.c: Use strnlen.h.
15413
15414         * lib/strnlen.h: New file.
15415
15416 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
15417
15418         * README: Typos.
15419
15420 2005-08-02  Simon Josefsson  <jas@extundo.com>
15421
15422         * modules/readline: New file.
15423
15424 2005-08-02  Simon Josefsson  <jas@extundo.com>
15425
15426         * modules/getdelim: New file.
15427
15428         * modules/getline: Rewrite, don't use getndelim2.
15429
15430 2005-08-02  Simon Josefsson  <jas@extundo.com>
15431
15432         * m4/getline.m4: Separate out getdelim stuff into separate module.
15433
15434         * m4/getdelim.m4: New file.
15435
15436 2005-08-02  Simon Josefsson  <jas@extundo.com>
15437
15438         * lib/getline.h, getline.c: Rewrite.
15439
15440         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
15441
15442 2005-07-31  Bruno Haible  <bruno@clisp.org>
15443
15444         * lib/lock.h (gl_lock_initializer): New macro.
15445         (gl_lock_define_initialized): Use it.
15446         (gl_rwlock_initializer): New macro.
15447         (gl_rwlock_define_initialized): Use it.
15448         (gl_recursive_lock_initializer): New macro.
15449         (gl_recursive_lock_define_initialized): Use it.
15450
15451 2005-07-30  Karl Berry  <karl@gnu.org>
15452
15453         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
15454         Report from Ben Pfaff, regarding getopt.
15455
15456 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
15457
15458         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
15459         normal way.
15460         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
15461         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
15462         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
15463         (gl_GETOPT): Use the new macros.  Most of the implementation
15464         is moved to the new macros.  This is for programs like Emacs
15465         that don't want all the functionality of gl_GETOPT.
15466
15467 2005-07-26  Bruno Haible  <bruno@clisp.org>
15468
15469         * m4/lock.m4: Update from GNU gettext.
15470
15471 2005-07-26  Bruno Haible  <bruno@clisp.org>
15472
15473         * lib/lock.h: Update from GNU gettext.
15474         * lib/lock.c: Update from GNU gettext.
15475
15476 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
15477
15478         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
15479         obsolescent AC_TRY_RUN.  Include the default includes files, for
15480         'exit'.
15481
15482 2005-07-24  Bruno Haible  <bruno@clisp.org>
15483
15484         * modules/visibility: New file.
15485         * MODULES.html.sh (Misc): Add visibility.
15486
15487 2005-07-24  Bruno Haible  <bruno@clisp.org>
15488
15489         * m4/visibility.m4: New file.
15490
15491 2005-07-24  Bruno Haible  <bruno@clisp.org>
15492
15493         * doc/visibility.texi: New file.
15494
15495 2005-07-22  Bruno Haible  <bruno@clisp.org>
15496
15497         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
15498         $(ALLOCA_H), redundant through BUILT_SOURCES.
15499         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
15500         redundant through BUILT_SOURCES.
15501         * modules/byteswap (Makefile.am): Remove explicit dependency on
15502         $(BYTESWAP_H), redundant through BUILT_SOURCES.
15503         * modules/fnmatch (Makefile.am): Remove explicit dependency on
15504         $(FNMATCH_H), redundant through BUILT_SOURCES.
15505         * modules/getopt (Makefile.am): Remove explicit dependency on
15506         $(GETOPT_H), redundant through BUILT_SOURCES.
15507         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
15508         redundant through BUILT_SOURCES.
15509         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
15510         redundant through BUILT_SOURCES.
15511         * modules/stdbool (Makefile.am): Remove explicit dependency on
15512         $(STDBOOL_H), redundant through BUILT_SOURCES.
15513         * modules/stdint (Makefile.am): Remove explicit dependency on
15514         $(STDINT_H), redundant through BUILT_SOURCES.
15515         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
15516         Remove explicit dependency on $(SYSEXITS_H).
15517         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
15518
15519 2005-07-18  Simon Josefsson  <jas@extundo.com>
15520
15521         * lib/check-version.c (check_version): Accept identical versions too.
15522
15523 2005-07-18  Bruno Haible  <bruno@clisp.org>
15524
15525         * modules/lock: New file.
15526         * MODULES.html.sh (Multithreading): New section.
15527
15528 2005-07-18  Bruno Haible  <bruno@clisp.org>
15529
15530         * m4/lock.m4: New file, from GNU gettext.
15531
15532 2005-07-18  Bruno Haible  <bruno@clisp.org>
15533
15534         * lib/lock.h: New file, from GNU gettext.
15535         * lib/lock.c: New file, from GNU gettext.
15536
15537 2005-07-18  Bruno Haible  <bruno@clisp.org>
15538
15539         * lib/lock.h (gl_once_t): New type.
15540         (gl_once_define, gl_once): New macros.
15541         * lib/lock.c (fresh_once): New variable.
15542         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
15543         functions.
15544
15545 2005-07-16  Simon Josefsson  <jas@extundo.com>
15546
15547         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
15548         workaround, suggested by Bruno.
15549
15550 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
15551
15552         * modules/xalloc (Depends-on): Add xalloc-die.
15553         * modules/xvasprintf (Depends-on): Add xalloc-die.
15554
15555 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
15556
15557         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
15558         with a minor change.
15559
15560 2005-07-15  Bruno Haible  <bruno@clisp.org>
15561
15562         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
15563         When using lib/poll.c, define poll as rpl_poll.
15564
15565 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
15566
15567         * modules/argp (Depends-on): Remove unlocked-io.
15568
15569 2005-07-14  Derek Price  <derek@ximbiot.com>
15570
15571         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
15572         for glob symlink bug.
15573
15574 2005-07-14  Bruno Haible  <bruno@clisp.org>
15575
15576         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
15577         Instead, test for *_unlocked function declarations directly.
15578
15579 2005-07-11  Simon Josefsson  <jas@extundo.com>
15580
15581         * modules/size_max: New file.
15582
15583         * modules/xsize: Depend on size_max module for size_max.m4.
15584
15585 2005-07-11  Simon Josefsson  <jas@extundo.com>
15586
15587         * lib/size_max.h: New file.
15588
15589 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
15590
15591         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
15592         copyright symbol and the year.
15593         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
15594         (version_etc_va): Use parameterized copyright notice.
15595         Reword to conform to the current GNU coding standards.
15596
15597 2005-07-11  Karl Berry  <karl@gnu.org>
15598
15599         * doc/gnulib.texi (Quoting): new node.
15600         (Initial import): more info, from Patrice.
15601
15602 2005-07-11  Bruno Haible  <bruno@clisp.org>
15603
15604         * gnulib-tool (func_usage): Document option --avoid.
15605         (Command line options): Handle --avoid.
15606         (func_acceptable): New function.
15607         (func_modules_transitive_closure): Use it.
15608
15609 2005-07-11  Bruno Haible  <bruno@clisp.org>
15610
15611         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
15612         Reported by Jim Meyering.
15613
15614 2005-07-10  Bruno Haible  <bruno@clisp.org>
15615
15616         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
15617         Needed when size_t is smaller than 'unsigned int'.
15618         Reported by Paul Eggert.
15619
15620 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15621
15622         * modules/argp (Depends-on): Add unlocked-io
15623
15624 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15625
15626         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
15627         block of defines.
15628
15629 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
15630
15631         * config/srclist.txt: Comment out regcomp.c, since we have a porting
15632         fix now.
15633
15634 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
15635         and Paul Eggert  <eggert@cs.ucla.edu>
15636
15637         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
15638         in wint_t, not wchar_t.  Remove now-unnecessary cast.
15639
15640 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15641
15642         * modules/regex (Files): Add lib/regex_internal.c,
15643         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
15644         (Depends-on): Add extensions.
15645         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
15646
15647 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15648
15649         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
15650         pathconf.
15651         * m4/same.m4 (gl_SAME): Likewise.
15652         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
15653
15654         * m4/regex.m4: Adjust to new libc regex implementation.
15655         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
15656         all the .c and .h parts of (the new) regex.
15657         Quote the m4 stuff better.
15658         Check for RE_ICASE bug of old gnulib.
15659         Check for REG_STARTEND of recent libc.
15660         Rename local variables from jm_* to gl_*.
15661         Quote operand of "test -f".
15662         Say "recent enough" version of libc, not "version 2".
15663         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
15664         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
15665         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
15666         Remove check for btowc, isascii.
15667         Require AM_LANGINFO_CODESET.
15668
15669 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15670
15671         * lib/regex.c, regex.h: Sync from libc.
15672         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
15673         * lib/regexec.c:
15674         New files, synced from libc, except that regex_internal.h
15675         currently has a small porting fix.
15676
15677 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15678
15679         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
15680         regex_internal.c, regexec.c.
15681         Add regex_internal.h too, but as a comment, since the libc version
15682         is currently broken in gnulib mode.
15683
15684 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
15685
15686         Support programs like Emacs that use gnulib but not gettext.
15687         * MODULES.html.sh (Internationalization functions): Add gettext-h.
15688         * modules/gettext-h: New file.
15689         * modules/gettext (Files): Remove lib/gettext.h.
15690         (Depends-on): Add gettext-h.
15691         (Makefile.am): Remove lib_SOURCES.
15692         * modules/argmatch, modules/c-stack, modules/closeout:
15693         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
15694         * modules/execute, modules/file-type, modules/getaddrinfo:
15695         * modules/getopt, modules/human, modules/javacomp:
15696         * modules/javaexec, modules/mkdir-p, modules/obstack:
15697         * modules/openat, modules/pagealign_alloc, modules/pipe:
15698         * modules/quotearg, modules/regex, modules/rpmatch:
15699         * modules/unicodeio, modules/userspec, modules/version-etc:
15700         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
15701         * modules/xsetenv:
15702         Depend on gettext-h, not gettext.
15703
15704 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
15705
15706         * gnulib-tool (func_import): Add support for 'public domain' license.
15707         * modules/alloca, modules/atexit, modules/memmove:
15708         Now public domain, not GPL.
15709         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
15710         * modules/realloc, modules/strerror, modules/strtod:
15711         Now LGPL, not GPL.
15712
15713 2005-07-05  Bruno Haible  <bruno@clisp.org>
15714
15715         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
15716         autoconf CVS. Needed for mingw.
15717
15718 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15719
15720         Remove the dependency of the strftime module on the tzset module.
15721         * modules/strftime (Depends-on): Remove dependency on tzset.
15722
15723 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15724
15725         Remove the dependency of the strftime module on the tzset module.
15726         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
15727         gl_FUNC_TZSET_CLOBBER.
15728
15729 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15730
15731         Remove the dependency of the strftime module on the tzset module.
15732         * lib/strftime.c (my_strftime)
15733         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
15734         Copy the input structure, to work around some of the bug with
15735         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
15736         Solaris releases, you should also use the tzset module, but we won't
15737         require it as a dependency any more since we don't want LGPLed code
15738         to depend on GPLed code.
15739
15740 2005-07-02  Jim Meyering  <jim@meyering.net>
15741
15742         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
15743         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
15744         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
15745         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
15746
15747 2005-07-02  Jim Meyering  <jim@meyering.net>
15748
15749         * lib/backupfile.c (backup_args): Change a `0' to NULL.
15750
15751 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
15752
15753         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
15754         declares only 'struct timespec;' (!).
15755
15756 2005-07-01  Jim Meyering  <jim@meyering.net>
15757
15758         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
15759         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
15760         * lib/save-cwd.c, tempname.c:
15761         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
15762         and don't include <sys/file.h>).
15763
15764 2005-06-29  Jim Meyering  <jim@meyering.net>
15765
15766         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
15767         type name.  Use the variable name instead.
15768         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
15769         Likewise.
15770
15771 2005-06-28  Simon Josefsson  <jas@extundo.com>
15772
15773         * modules/check-version (Files): Add check-version.m4.
15774
15775 2005-06-28  Simon Josefsson  <jas@extundo.com>
15776
15777         * m4/check-version.m4: New file, suggested by Jim Meyering
15778         <jim@meyering.net>.
15779
15780 2005-06-28  Simon Josefsson  <jas@extundo.com>
15781
15782         * lib/check-version.h, lib/check-version.c: New files.
15783
15784 2005-06-28  Simon Josefsson  <jas@extundo.com>
15785
15786         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
15787         collision with global variable.  Better indentation.  Don't
15788         increment buffer pointer beyond buffer end.  Based on comments
15789         from Paul Eggert <eggert@cs.ucla.edu>.
15790
15791         * lib/base64.h: Indent.
15792
15793 2005-06-28  Simon Josefsson  <jas@extundo.com>
15794
15795         * doc/gnulib.texi (Library version handling): New section.
15796
15797 2005-06-28  Jim Meyering  <jim@meyering.net>
15798
15799         * check-module (find_included_lib_files): Hard-code another
15800         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
15801         but modules/fts-lgpl (correctly) does not list those files.
15802
15803         * modules/canonicalize (Files): Add lib/pathmax.h.
15804
15805 2005-06-25  Simon Josefsson  <jas@extundo.com>
15806
15807         * modules/check-version: New file.
15808
15809 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
15810
15811         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
15812         initializer of struct addrinfo, as an indication that we don't
15813         care how many members the structure has.
15814
15815 2005-06-24  Derek Price  <derek@ximbiot.com>
15816         and Bruno Haible  <bruno@clisp.org>
15817
15818         Remove stat module & update lstat.
15819         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
15820         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
15821         * m4/stat.m4: Remove this file.
15822
15823 2005-06-24  Derek Price  <derek@ximbiot.com>
15824         and Bruno Haible  <bruno@clisp.org>
15825
15826         Remove stat module & update lstat.
15827         * lib/stat.c: Remove this file...
15828         (slash_aware_lstat): ...moving this content and its support...
15829         * lib/lstat.c (rpl_lstat): ...into here.
15830         * lib/lstat.h: New file.
15831
15832 2005-06-24  Derek Price  <derek@ximbiot.com>
15833         and Bruno Haible  <bruno@clisp.org>
15834
15835         Remove stat module & update lstat.
15836         * config/srclist.txt (libc sources): Remove stat.
15837
15838 2005-06-24  Derek Price  <derek@ximbiot.com>
15839         and Bruno Haible  <bruno@clisp.org>
15840
15841         Remove stat module & update lstat.
15842         * MODULES.html.sh (stat): Remove.
15843         * MODULES.html: Regenerated.
15844         * modules/lstat (Description): Correct function name.
15845         (Files): Add "lstat.h".
15846         (Depends-on): Remove stat, add xalloc, stat-macros.
15847         * modules/stat: Remove this file.
15848         (Include): Add "lstat.h", remove <sys/stat.h>.
15849
15850 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
15851
15852         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
15853         (ranged_convert): Don't save conversion in a temporary struct.
15854         This causes a warning with GCC 4.0.0, and anyway in the typical
15855         case it's not worth the extra 100 bytes or so of code.
15856         (ranged_convert, __mktime_internal): When calling a function via a
15857         pointer P, use P () rather than (*P) (), as we now assume C89 or
15858         better.
15859
15860 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15861
15862         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
15863         "who -r" failed to give output.  Problem reported by Tim Waugh.
15864
15865         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
15866         (xcalloc): Use it to avoid needless tests.
15867         Problem reported by Jim Meyering.
15868
15869 2005-06-20  Derek Price  <derek@ximbiot.com>
15870
15871         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
15872         unnecessary for Autoconfs > 2.59c.
15873
15874 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15875
15876         * lib/argp.h (__option_is_short): Check upper limit of
15877         __key. Isprint() requires its argument to have the value
15878         of an unsigned char or EOF.
15879
15880 2005-06-16  Jim Meyering  <jim@meyering.net>
15881
15882         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
15883         when either N or S is zero.
15884
15885 2005-06-16  Derek Price  <derek@ximbiot.com>
15886
15887         * m4/bison.m4: Declare YACC & YFLAGS precious.
15888
15889 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
15890
15891         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
15892         multibyte string or pattern, fall back on unibyte matching.
15893         Problem reported by James Youngman.
15894
15895 2005-06-08  Bruno Haible  <bruno@clisp.org>
15896
15897         * modules/csharpcomp: New file.
15898         * MODULES.html.sh (C#): Add csharpcomp.
15899
15900 2005-06-08  Bruno Haible  <bruno@clisp.org>
15901
15902         * m4/csharpcomp.m4: New file, from GNU gettext.
15903
15904 2005-06-08  Bruno Haible  <bruno@clisp.org>
15905
15906         * lib/csharpcomp.h: New file, from GNU gettext.
15907         * lib/csharpcomp.c: New file, from GNU gettext.
15908         * lib/csharpcomp.sh.in: New file, from GNU gettext.
15909
15910 2005-06-08  Bruno Haible  <bruno@clisp.org>
15911
15912         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
15913         warning on mingw.
15914
15915 2005-06-07  Derek Price  <derek@ximbiot.com>
15916
15917         Sync from CVS.
15918         * lib/glob_.h: Indent nested #ifdef.
15919
15920 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15921
15922         Sync from coreutils.
15923         Use "file name" when talking about file names, instead of "filename"
15924         or "path", as per the GNU coding standards.
15925         * lib/mkdir-p.c: Renamed from makepath.c.
15926         (make_dir_parents): Renamed from make_path.  All callers changed.
15927         * lib/mkdir-p.h: Likewise.  All includers changed.
15928         * lib/filenamecat.c: Renamed from path-concat.c.
15929         (file_name_concat): Renamed from path_concat.  All callers changed.
15930         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
15931         * lib/filenamecat.h: Likewise.  All includers changed.
15932         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
15933         in comments or local variable names.
15934         * lib/basename.c: Likewise.
15935         * lib/canonicalize.c, canonicalize.h: Likewise.
15936         * lib/dirname.c, dirname.h: Likewise.
15937         * lib/euidaccess.c: Likewise.
15938         * lib/exclude.c: Likewise
15939         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
15940         * lib/fsusage.c, fsuage.h: Likewise.
15941         * lib/fts.c, fts_.h: Likewise.
15942         * lib/getcwd.c: Likewise.
15943         * lib/getloadavg.c: Likewise.
15944         * lib/mkstemp.c: Likewise.
15945         * lib/mountlist.c, mountlist.h: Likewise.
15946         * lib/openat.c, openat.h: Likewise.
15947         * lib/readlink-stub.c: Likewise.
15948         * lib/readutmp.c, readutmp.h: Likewise.
15949         * lib/rename.c: Likewise.
15950         * lib/rmdir.c: Likewise.
15951         * lib/same.c: Likewise.
15952         * lib/savedir.c: Likewise.
15953         * lib/stripslash.c: Likewise.
15954         * lib/tempname.c: Likewise.
15955         * lib/xreadlink.c: Likewise.
15956         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
15957         All uses changed.
15958         * lib/exclude.h: Likewise.
15959
15960         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
15961         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15962         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
15963         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15964         * lib/pathmax.h: Include <limits.h> unconditionally, since other
15965         files have been getting away with it for years (MORE/BSD 4.3
15966         is extinct now).
15967         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
15968         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15969
15970         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
15971         Define to 256, not 255, as per modern POSIX.
15972
15973 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15974
15975         Sync from coreutils.
15976         Use "file name" when talking about file names, instead of "filename"
15977         or "path", as per the GNU coding standards.
15978         * MODULES.html.sh: mkdir-p renamed from makepath.
15979         filenamecat renamed from path-concat.
15980         * modules/filenamecat: Renamed from modules/path-concat.
15981         (Files): filenamecat.h and filenamecat.c renamed from
15982         path-concat.h and path-concat.c.
15983         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
15984         (Include): filenamecat.h, not path-concat.h.
15985         * modules/mkdir-p: Renamed from modules/makepath.
15986         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
15987         makepath.c.
15988         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
15989         (Include): mkdir-p.h, not makepath.h.
15990
15991 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15992
15993         Sync from coreutils.
15994         * m4/mkdir-p.m4: Renamed from makepath.m4.
15995         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
15996         Rename files from makepath.c to mkdir-p.c, and from
15997         makepath.h to mkdir-p.h.
15998         * m4/filenamecat.m4: Renamed from path-concat.m4.
15999         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
16000         Rename files from path-concat.c to filenamecat.c,
16001         and from path-concat.h to filenamecat.h.
16002         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
16003         "file name" in local variables or comments.
16004         * m4/rename.m4: Likewise.
16005
16006 2005-06-01  Bruno Haible  <bruno@clisp.org>
16007
16008         * modules/csharpexec: New file.
16009         * MODULES.html.sh (C#): New section.
16010
16011 2005-06-01  Bruno Haible  <bruno@clisp.org>
16012
16013         * m4/csharp.m4: New file, from GNU gettext.
16014         * m4/csharpexec.m4: New file, from GNU gettext.
16015
16016 2005-06-01  Bruno Haible  <bruno@clisp.org>
16017
16018         * lib/csharpexec.h: New file, from GNU gettext.
16019         * lib/csharpexec.c: New file, from GNU gettext.
16020         * lib/csharpexec.sh.in: New file, from GNU gettext.
16021
16022 2005-05-31  Derek Price  <derek@ximbiot.com>
16023             Paul Eggert  <eggert@cs.ucla.edu>
16024
16025         Sync from cvs.
16026         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
16027
16028 2005-05-31  Derek Price  <derek@ximbiot.com>
16029             Paul Eggert  <eggert@cs.ucla.edu>
16030
16031         Sync from cvs.
16032         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
16033
16034 2005-05-29  Derek Price  <derek@ximbiot.com>
16035
16036         * config/srclist.txt (glob_.h, glob.c): Add these files.
16037
16038 2005-05-29  Derek Price  <derek@ximbiot.com>
16039
16040         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
16041         * modules/glob: New file.
16042         * modules/getlogin_r: Add link to POSIX spec in description.
16043
16044 2005-05-29  Derek Price  <derek@ximbiot.com>
16045             Paul Eggert  <eggert@cs.ucla.edu>
16046
16047         * m4/glob.m4: New file.
16048
16049 2005-05-29  Derek Price  <derek@ximbiot.com>
16050             Paul Eggert  <eggert@cs.ucla.edu>
16051
16052         * lib/glob_.h, lib/glob.c: New files.
16053
16054 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16055
16056         * modules/fts (Files): Remove m4/inttypes-pri.m4.
16057         * modules/fts-lgpl (Depends-on): Remove gettext.
16058
16059 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16060
16061         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
16062         and don't require gt_INTTYPES_PRI.
16063
16064 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16065
16066         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
16067
16068         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
16069         the configuration hassle isn't worth it.
16070         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
16071         (LONGEST_MODIFIER, PRIuMAX): Remove.
16072
16073 2005-05-27  Bruno Haible  <bruno@clisp.org>
16074
16075         * lib/getlogin_r.h: Remove second include of <stddef.h>.
16076
16077 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
16078
16079         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
16080         _POSIX_PTHREAD_SEMANTICS for Solaris.
16081
16082 2005-05-25  Derek Price  <derek@ximbiot.com>
16083
16084         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
16085
16086 2005-05-25  Derek Price  <derek@ximbiot.com>
16087             Paul Eggert  <eggert@cs.ucla.edu>
16088
16089         * modules/getlogin_r, m4/getlogin_r.m4: New files.
16090         * lib/getlogin_r.c, getlogin_r.h: New files.
16091
16092 2005-05-25  Bruno Haible  <bruno@clisp.org>
16093             Derek Price  <derek@ximbiot.com>
16094
16095         * lib/getlogin_r.h: Simplify API documentation.
16096
16097 2005-05-23  Derek Price  <derek@ximbiot.com>
16098
16099         * modules/minmax (Files): Add m4/minmax.m4.
16100         (configure.ac): Add gl_MINMAX.
16101
16102 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
16103
16104         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
16105         so that unistd-safer.h (GPL'ed code) need not be included.
16106
16107 2005-05-22  Bruno Haible  <bruno@clisp.org>
16108
16109         * m4/minmax.m4: New file.
16110         Based on a patch by Derek Price <derek@ximbiot.com>.
16111
16112 2005-05-22  Bruno Haible  <bruno@clisp.org>
16113
16114         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
16115         (INT64_MIN): Fix definition.
16116         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
16117
16118         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
16119         NEED_SIGNED_INT_TYPES.
16120
16121         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
16122         HAVE_SYSTEM_INTTYPES.
16123
16124 2005-05-22  Bruno Haible  <bruno@clisp.org>
16125
16126         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
16127         Also include <sys/param.h> if it defines MIN, MAX.
16128         Based on a patch by Derek Price <derek@ximbiot.com>.
16129
16130 2005-05-21  Jim Meyering  <jim@meyering.net>
16131
16132         * modules/fts (Files): Add m4/inttypes-pri.m4.
16133         (Depends-on): Add lstat and remove gettext.  Alphabetize.
16134
16135 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16136
16137         New fts module.
16138         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
16139         (setup_dir, free_dir): New functions.
16140         (enter_dir, leave_dir): Define trivial
16141         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
16142         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
16143         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
16144         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
16145         Move to fts-cycle.c.
16146         (fts_open): Use setup_dir.
16147         (fts_close): Use free_dir.
16148         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
16149         This adds a label and some gotos, but the alternatives were messier.
16150         Check for memory allocation failure when entering a dir.
16151         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
16152         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
16153         (FTS): New member fts_cycle, that is a union that contains the
16154         old active_dir_ht and cycle_state.  All uses changed to mention
16155         fts_cycle.ht and fts_cycle.state.
16156         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
16157         fts.c, with the following changes:
16158         (setup_dir, free_dir): New functions.
16159         (enter_dir): Now returns bool.  Return true if successful, false
16160         if memory exhausted.  All callers changed.
16161         Do not bother partly cleaning up on
16162         memory allocation failure; that is free_dir's job.
16163         However, free ad if hash_insert fails, to avoid memory leak.
16164         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
16165         fts->fts_options to see which union member to use.
16166
16167 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16168
16169         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
16170         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
16171
16172 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16173
16174         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
16175
16176 2005-05-20  Jim Meyering  <jim@meyering.net>
16177
16178         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
16179         Now a macro, to pacify GCC.
16180
16181 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
16182
16183         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
16184         of -1.
16185
16186 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
16187
16188         * lib/chown.c (rpl_chown): Return -1 on failure.
16189
16190 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
16191
16192         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
16193         Don't check for stddef.h.
16194         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
16195         don't use its results.
16196         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
16197         since we include them unconditionally.  Don't require
16198         AM_STDBOOL_H, since stdbool is a prerequisite.
16199         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
16200         since we assume C89 or better.
16201         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
16202         as we don't use their results.
16203         Don't check for fchdir, memmove, memset, strrchr, as we use
16204         them unconditionally.
16205         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
16206         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
16207
16208 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
16209
16210         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
16211         Include <stddef.h> unconditionally, since we assume C89 now.
16212         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
16213         * lib/fts.c: Include fts_.h first, to check interface.
16214         Do not include intprops.h; no longer needed.
16215         Include cycle-check.h and hash.h, since fts_.h no longer does.
16216         Remove unnecessary casts of closedir to void.
16217         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
16218         decide whether to decrement nlinks.
16219         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
16220         (FTS): Use struct hash_table * instead of Hash_table, so that
16221         we no longer need to include hash.h here.
16222
16223 2005-05-18  Jim Meyering  <jim@meyering.net>
16224
16225         * modules/dirfd (License): Change to LGPL.  Most of the code
16226         is already in the public domain.
16227
16228 2005-05-18  Jim Meyering  <jim@meyering.net>
16229
16230         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
16231         Reported by Yoann Vandoorselaere.
16232
16233 2005-05-17  Jim Meyering  <jim@meyering.net>
16234
16235         * m4/fts.m4: New file, from coreutils.
16236
16237 2005-05-17  Jim Meyering  <jim@meyering.net>
16238
16239         * lib/fts.c, lib/fts_.h: New files, from coreutils.
16240
16241 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16242
16243         Sync from coreutils.
16244         * m4/unlinkdir.m4: New file.
16245
16246 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16247
16248         Sync from coreutils.
16249         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
16250         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
16251         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
16252         White space changes only.
16253         * lib/makepath.c (make_path): Port to hosts where leading "//" is
16254         special.
16255         * lib/yesno.c: Include getline.h, not ctype.h.
16256         (yesno): Don't remove leading white space; POSIX doesn't allow it.
16257         Use getline to remove arbitrary restriction on response length.
16258
16259 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16260
16261         * config/srclist-update: Spell out "Street" in FSF postal
16262         mail address; this is the style the FSF seems to prefer.
16263
16264         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
16265         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
16266         this updates FSF postal mail address.
16267
16268         Sync from coreutils.
16269         * modules/unlinkdir: New file.
16270         * modules/yesno (Depends-on): Add getline.
16271         * MODULES.html.sh (File system functions): Add unlinkdir.
16272
16273 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16274
16275         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
16276         lib/strsep.h:
16277         Change the initial comment to refer to GPL, not LGPL.
16278         gnulib-tool will change it to LGPL as needed.
16279
16280         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
16281         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
16282         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
16283         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
16284         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
16285         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
16286         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
16287         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
16288         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
16289         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
16290         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
16291         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
16292         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
16293         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
16294         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
16295         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
16296         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
16297         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
16298         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
16299         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
16300         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
16301         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
16302         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
16303         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
16304         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
16305         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
16306         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
16307         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
16308         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
16309         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
16310         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
16311         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
16312         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
16313         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
16314         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
16315         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
16316         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
16317         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
16318         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
16319         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
16320         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
16321         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
16322         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
16323         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
16324         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
16325         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
16326         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
16327         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
16328         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
16329         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
16330         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16331         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
16332         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
16333         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
16334         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
16335         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
16336         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
16337         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
16338         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
16339         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
16340         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
16341         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
16342         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
16343         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
16344         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
16345         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
16346         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
16347         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
16348         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
16349         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
16350         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
16351         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
16352         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
16353         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
16354         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
16355         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
16356         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
16357         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
16358         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
16359         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
16360         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
16361         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
16362         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
16363         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
16364         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
16365         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
16366         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
16367         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
16368         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
16369         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
16370         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
16371         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
16372         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
16373         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
16374         lib/yesno.c, lib/yesno.h:
16375         Update FSF postal mail address.
16376
16377 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16378
16379         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
16380         tests/test-memmem.c, tests/test-stpncpy.c:
16381         Update FSF postal mail address.
16382
16383 2005-05-13  Bruno Haible  <bruno@clisp.org>
16384
16385         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
16386         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
16387         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
16388         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
16389         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
16390         Add support for 64-bit integers in the MSVC compiler.
16391
16392 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16393
16394         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
16395
16396 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
16397
16398         * gnulib-tool (func_import): Sort and uniquify recommended includes.
16399
16400 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
16401
16402         * doc/getdate.texi (General date syntax): Don't say that date
16403         date --iso-8601=ns generates acceptable dates; it doesn't yet.
16404         Problem reported by Nic Ferrier.
16405
16406 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16407
16408         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
16409         specified in ai_socktype. Fix invalid ai_protocol
16410         check. ai_protocol is usually set to 0 or depending on
16411         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
16412         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
16413         ai_socktype / ai_protocol in the returned addrinfo structure.
16414
16415 2005-05-10  Simon Josefsson  <jas@extundo.com>
16416
16417         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
16418         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
16419
16420 2005-05-10  Karl Berry  <karl@gnu.org>
16421
16422         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
16423         (from http://www.gnu.org/licenses).
16424         * doc/COPYING.LIB: also rename to COPYING.LESSER.
16425         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
16426         fdl.texi suffices.
16427
16428 2005-05-10  Karl Berry  <karl@gnu.org>
16429
16430         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
16431         (COPYING.DOC): remove.
16432
16433         * config/srclist-update: new FSF address.
16434
16435 2005-05-10  Derek Price  <derek@ximbiot.com>
16436
16437         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
16438         possible.
16439
16440 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16441             Bruno Haible  <bruno@clisp.org>
16442
16443         * modules/inet_ntop: New file.
16444         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16445         inet_ntop.
16446
16447 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16448             Bruno Haible  <bruno@clisp.org>
16449
16450         * m4/inet_ntop.m4: New file.
16451
16452 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16453             Bruno Haible  <bruno@clisp.org>
16454
16455         * lib/inet_ntop.h: New file.
16456         * lib/inet_ntop.c: New file, from glibc with modifications.
16457
16458 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
16459
16460         * modules/time_r (License): Change to LGPL.
16461         * modules/extensions (License): Change to LGPL.  Actually,
16462         the license is more permissive than that, but currently gnulib-tool
16463         doesn't know how to handle more-permissive licenses.
16464
16465         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
16466         Problem reported by Dave Love.
16467
16468 2005-05-08  Jim Meyering  <jim@meyering.net>
16469
16470         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
16471         blank.
16472
16473 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16474
16475         * modules/argmatch (Depends-on): Add stdbool.
16476         * modules/backupfile (Depends-on): Likewise.
16477         * modules/chdir-long (Depends-on): Likewise.
16478         * modules/closeout (Depends-on): Likewise.
16479         * modules/cycle-check (Depends-on): Likewise.
16480         * modules/dirname (Depends-on): Likewise.
16481         * modules/fnmatch (Depends-on): Likewise.
16482         * modules/fsusage (Depends-on): Likewise.
16483         * modules/fwriteerror (Depends-on): Likewise.
16484         * modules/getcwd (Depends-on): Likewise.
16485         * modules/getloadavg (Depends-on): Likewise.
16486         * modules/hard-locale (Depends-on): Likewise.
16487         * modules/makepath (Depends-on): Likewise.
16488         * modules/mountlist (Depends-on): Likewise.
16489         * modules/nanosleep (Depends-on): Likewise.
16490         * modules/posixtm (Depends-on): Likewise.
16491         * modules/quotearg (Depends-on): Likewise.
16492         * modules/readtokens (Depends-on): Likewise.
16493         * modules/readtokens0 (Depends-on): Likewise.
16494         * modules/readutmp (Depends-on): Likewise.
16495         * modules/save-cwd (Depends-on): Likewise.
16496         * modules/strftime (Depends-on): Likewise.
16497         * modules/userspec (Depends-on): Likewise.
16498         * modules/utimecmp (Depends-on): Likewise.
16499         * modules/xgetcwd (Depends-on): Likewise.
16500         * modules/xnanosleep (Depends-on): Likewise.
16501         * modules/xstrtod (Depends-on): Likewise.
16502         * modules/yesno (Depends-on): Likewise.
16503
16504 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
16505
16506         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
16507         needless checks.
16508
16509 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16510
16511         Merge from coreutils.  Among other things,
16512         add bulletproofing for cases where stdin, stdout, or stderr are closed.
16513         * lib/fd-safer.c: New file.
16514         * lib/fcntl-safer.h, open-safer.c: Remove.
16515         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
16516         * lib/dup-safer.c: Include unistd-safer.h first.
16517         Don't include errno.h.
16518         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
16519         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
16520         * lib/file-type.c: Rely on file-type.h change.
16521         * lib/getloadavg.c: Include unistd-safer.h.
16522         (getloadavg): Use safer open.
16523         * lib/getusershell.c: Include "stdio-safer.h".
16524         (getusershell): Use safer fopen.
16525         * lib/long-options.c (long_options): Use NULL rather than 0.
16526         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
16527         'free'.
16528         * lib/modechange.c: Likewise.
16529         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
16530         (MODE_DONE): New constant.
16531         (struct mode_change): Remove 'next' member.
16532         (make_node_op_equals): New function; like the old one of the
16533         same name, except it allocates an array.
16534         (mode_compile, mode_create_from_ref): Use it.
16535         (mode_compile): Allocate result as an array, not a linked list.
16536         Parse octal string ourself, so that we catch mistakes like "+0".
16537         (mode_adjust): Arg is an array, not a linked list.
16538         * lib/modechange.c: Include stat-macros.h, xalloc.h.
16539         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
16540         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
16541         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
16542         Remove.  This is now stat-macros.h's job.
16543         (talloc): Remove.  All callers replaced by xalloc, so that
16544         our invokers don't have to worry about reporting memory failures.
16545         (make_node_op_equals): Remove.
16546         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
16547         New constants.
16548         (struct mode_change): Moved here from modechange.h.
16549         (mode_append_entry): Remove.
16550         (mode_compile): Remove MASKED_OPS arg, since it encouraged
16551         apps to have incorrect behavior.  Use simpler algorithm for head
16552         and tail.  Don't futz with umask; that's now the job of mode_adjust.
16553         Detect more invalid usages rather than having somewhat-random behavior.
16554         Don't insert an "a=" action, as that leads to incorrect behavior.
16555         (mode_compile, mode_create_from_ref): Return NULL on error instead
16556         of an enum, since now there's only one way to have an error.  All
16557         callers changed.
16558         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
16559         at the correct time.  Simplify calculation of "+u" and its ilk.
16560         Don't mishandle "+X".
16561         (mode_free): Remove "register" and localize decls.
16562         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
16563         (struct mode_change): Move to modechange.c; callers don't
16564         need to see this stuff.
16565         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
16566         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
16567         (mode_change, mode_adjust): Reflect the new signatures noted above.
16568         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
16569         that might redefine system include files.
16570         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
16571         (my_usleep): Use NULL rather than (void *) 0.
16572         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
16573         Use siginterrupt to specify that system calls should be interrupted.
16574         (rpl_nanosleep): Move initialization of suspended closer to call of
16575         my_usleep.
16576         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
16577         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
16578         (desirable_utmp_entry): New function.
16579         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
16580         using x2nrealloc, to simplify logic.
16581         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
16582         size calculation.  Do not assume utmp file is a regular file.
16583         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
16584         (READ_UTMP_CHECK_PIDS): New constant.
16585         * lib/save-cwd.c: Include unistd-safer.h.
16586         (save_cwd): Use fd_safer.
16587         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
16588         [!_LIBC] Include "stat-macros.h" instead.
16589         * lib/unistd-safer.h (fd_safer): New decl.
16590
16591 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16592
16593         * modules/getloadavg (Depends-on): Add unistd-safer.
16594         * modules/getusershell (Depends-on): Add stdio-safer.
16595         * modules/lstat (Depends-on): Remove xalloc.
16596         * modules/mkstemp (Depends-on): Add stat-macros.
16597         * modules/modechange (Depends-on): Remove xstrtol.
16598         Add stat-macros, xalloc.
16599         * modules/save-cwd (Depends-on): Add unistd-safer.
16600         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
16601         * modules/unistd-safer (Files): Add lib/fd-safer.c
16602         (Makefile.am): Remove lib_SOURCES.
16603
16604         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
16605         Remove fcntl-safer; unistd-safer supersedes it.
16606
16607 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16608
16609         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
16610         AC_HEADER_STAT.
16611         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
16612         (gl_PREREQ_CHOWN): Remove.
16613         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
16614         it.  Don't require AC_HEADER_STAT.
16615         (gl_PREREQ_LSTAT): Remove.
16616         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
16617         Don't require AC_HEADER_STAT.
16618         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
16619         (gl_PREREQ_RMDIR): Remove.
16620         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
16621         mention stat-macros.h or AC_HEADER_STAT, since we'll make
16622         the stat-macros module a prerequisite.
16623         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
16624         * m4/filemode.m4 (gl_FILEMODE): Likewise.
16625         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
16626         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
16627         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
16628         variable names.
16629         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
16630         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
16631         variable prefixes.
16632         * m4/fcntl-safer.m4: Remove.
16633         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
16634         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
16635         Invoke gl_PREREQ_FD_SAFER.
16636         (gl_PREREQ_FD_SAFER): New macro.
16637         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
16638         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
16639         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
16640         Remove duplicate call to AC_LIBOBJ(readutmp).
16641         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
16642
16643         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
16644         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
16645
16646 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16647
16648         * MODULES.html.sh (Misc): Add byteswap.
16649
16650 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16651
16652         * modules/getcwd (Depends-on): Add extensions.
16653         * modules/openat (Depends-on): Likewise.
16654
16655 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16656
16657         * modules/byteswap: New file.
16658
16659 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16660
16661         * m4/byteswap.m4: New file.
16662
16663 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16664
16665         * lib/byteswap_.h: New file.
16666
16667 2005-04-25  Karl Berry  <karl@gnu.org>
16668
16669         * m4/gettext.m4: Update from GNU gettext 0.14.4.
16670
16671 2005-04-25  Albert Chin  <china@thewrittenword.com>
16672
16673         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
16674         Toolkit C bug.
16675
16676 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
16677
16678         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
16679         (func_ln_if_changed) Remove forcibly for no error message
16680         in case file does not exist.
16681
16682 2005-04-19  Simon Josefsson  <jas@extundo.com>
16683
16684         * gnulib-tool (Options): Make --symlink mean --symbolic.
16685
16686 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
16687
16688         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
16689
16690 2005-04-16  Simon Josefsson  <jas@extundo.com>
16691
16692         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
16693
16694 2005-04-15  Simon Josefsson  <jas@extundo.com>
16695
16696         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
16697
16698 2005-04-15  Simon Josefsson  <jas@extundo.com>
16699
16700         * gnulib-tool: Rename --symlink to --symbolic.
16701
16702 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
16703
16704         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
16705         symbolic links to files instead of copying/moving.  Add --aux-dir,
16706         specifying directory relative --dir where auxiliary build tools
16707         are placed.
16708
16709 2005-04-14  Bruno Haible  <bruno@clisp.org>
16710
16711         * modules/allocsa (License): Change to LGPL.
16712         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
16713
16714 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
16715
16716         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
16717         that "UTC +1 second" continues to work.  Problem reported
16718         by Dmitry V. Levin.
16719         (relunit_snumber): New rule.
16720         (relunit): Use it.
16721
16722 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
16723
16724         * lib/getdate.y (universal_time_zone_table): New constant.
16725         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
16726         universal_time_zone_table.
16727         (lookup_zone): Prefer universal_time_zone_table to
16728         local_time_zone_table, so that "GMT" time stamps are allowed in
16729         London during the summer.  Problem reported by Ian Abbott.
16730
16731 2005-04-12  Jim Meyering  <jim@meyering.net>
16732
16733         * lib/human.c (humblock): Set *options even when returning due to
16734         xstrtoumax conversion failure.  Thanks to a used-uninitialized
16735         warning from gcc-4.
16736
16737 2005-04-09  Jim Meyering  <jim@meyering.net>
16738
16739         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
16740         -Wuninitialized: initialize tm0.tm_year.
16741
16742 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
16743
16744         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
16745         count, since there's no maximum.  All uses changed.
16746         Add member dsts_seen.
16747         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
16748         not being INT_MAX.
16749         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
16750         Use pc_rels_seen to decide whther a date is absolute.
16751
16752         * lib/getdate.y (number): Don't overwrite year.
16753         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
16754         check.
16755
16756 2005-04-02  Simon Josefsson  <jas@extundo.com>
16757
16758         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
16759         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
16760
16761 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
16762
16763         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
16764         where no absolute path name can be longer than PATH_MAX.
16765
16766 2005-03-27  Jim Meyering  <jim@meyering.net>
16767
16768         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
16769
16770 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
16771
16772         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
16773         "one's complement" -> "ones' complement" in comment, as per Knuth.
16774         "value of type" -> "type or expression" in comment.
16775         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
16776
16777 2005-03-26  Jim Meyering  <jim@meyering.net>
16778
16779         Comment nits.
16780         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
16781         Correct typos: s/or/of/.
16782
16783 2005-03-26  Jim Meyering  <jim@meyering.net>
16784
16785         * modules/check-include-files: Move to ../ and rename to...
16786         * check-module: ...this.
16787
16788 2005-03-25  Jim Meyering  <jim@meyering.net>
16789
16790         * modules/xvasprintf (Files): Add xalloc.h.
16791
16792 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
16793
16794         * modules/gettext (Files): config/config.rpath ->
16795         build-aux/config.rpath
16796         * modules/iconv (Files): Likewise.
16797         Problem reported by Oskar Liljeblad.
16798
16799 2005-03-23  Jim Meyering  <jim@meyering.net>
16800
16801         * modules/check-include-files: New script to check for
16802         missing dependencies, multiple includes, etc.
16803
16804         * modules/c-strtold (Depends-on): Add xalloc.
16805         * modules/c-strtod (Depends-on): Add xalloc.
16806         * modules/hash (Depends-on): Add xalloc.
16807         (Files): Remove lib/xalloc.h.
16808
16809         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
16810         * modules/userspec (Files): Add lib/inttostr.h.
16811
16812 2005-03-23  Jim Meyering  <jim@meyering.net>
16813
16814         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
16815
16816 2005-03-22  Jim Meyering  <jim@meyering.net>
16817
16818         * modules/stat-macros: New module.
16819         * modules/canonicalize, modules/euidaccess, modules/file-type,
16820         * modules/filemode, modules/lchown, modules/makepath,
16821         * modules/rmdir, modules/stat: Depend on new stat-macros module
16822         rather than listing lib/stat-macros.h manually.
16823         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
16824
16825 2005-03-22  Jim Meyering  <jim@meyering.net>
16826
16827         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
16828
16829 2005-03-22  Bruno Haible  <bruno@clisp.org>
16830
16831         * config/srclist.txt: Replace target directory 'config' with
16832         'build-aux'.
16833         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
16834         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
16835         ../build-aux/.
16836
16837 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
16838
16839         * modules/chdir-long (Depends-on): Add mempcpy.
16840
16841         * modules/acl, modules/backupfile, modules/c-strtod,
16842         modules/c-strtold, modules/canon-host, modules/canonicalize,
16843         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
16844         modules/exclude, modules/exitfail, modules/file-type,
16845         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
16846         modules/getdate, modules/getline, modules/getpagesize,
16847         modules/getpass, modules/getugroups, modules/group-member,
16848         modules/hard-locale, modules/hash, modules/human, modules/idcache,
16849         modules/inttostr, modules/long-options, modules/makepath,
16850         modules/md5, modules/memcasecmp, modules/memcoll,
16851         modules/modechange, modules/mountlist, modules/path-concat,
16852         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
16853         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
16854         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
16855         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
16856         modules/strftime, modules/strndup, modules/strverscmp,
16857         modules/timespec, modules/unlocked-io, modules/userspec,
16858         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
16859         modules/yesno:
16860         Remove lib_SOURCES line from Makefile.am section, as this is now
16861         done automatically by the corresponding Autoconf macro.
16862
16863 2005-03-21  Jim Meyering  <jim@meyering.net>
16864
16865         Changes imported from coreutils.
16866
16867         * lib/cycle-check.c: Don't include xalloc.h.
16868
16869         * lib/path-concat.c: Don't include assert.h.
16870         (path_concat): Remove assertion that would have triggered
16871         for ABASE starting with more than one slash.
16872         Reported by Andreas Schwab.
16873
16874         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
16875         properly when ABASE is an absolute file name.
16876         Correct the description of this function.
16877         Include <assert.h>.
16878         Add an assertion and a test driver.
16879         This fixes a bug introduced on 2004-07-02.
16880         Andreas Schwab reported the resulting failure of cp --parents:
16881         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
16882
16883 2005-03-21  Jim Meyering  <jim@meyering.net>
16884
16885         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
16886         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
16887
16888 2005-03-21  Jim Meyering  <jim@meyering.net>
16889         and  Paul Eggert  <eggert@cs.ucla.edu>
16890
16891         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
16892         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
16893         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
16894         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
16895         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
16896         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
16897         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
16898         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
16899         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
16900         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
16901         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
16902         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
16903         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
16904         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
16905         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
16906         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
16907         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
16908         for these modules.
16909
16910 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
16911
16912         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
16913         (which shouldn't happen), generate nothing instead of returning 0
16914         immediately, so that nstrftime (NULL, ...) doesn't return 0.
16915
16916 2005-03-16  Bruno Haible  <bruno@clisp.org>
16917
16918         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
16919         HAVE_LONGLONG_64BIT.
16920
16921 2005-03-16  Bruno Haible  <bruno@clisp.org>
16922
16923         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
16924         HAVE_LONGLONG_64BIT.
16925
16926 2005-03-16  Bruno Haible  <bruno@clisp.org>
16927
16928         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
16929         HAVE_LONGLONG_64BIT.
16930
16931 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
16932
16933         * lib/strftime.c (my_strftime): Prepend space to format so that we can
16934         reliably distinguish strftime failure from empty output on POSIX
16935         hosts.
16936
16937 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
16938
16939         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
16940         (iconv_string): Don't guess a size-zero buffer, as that might cause
16941         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
16942         result would be 'too large', where 'too large' is (heuristically)
16943         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
16944         overflow concerns.  This will prevent some unwanted malloc failures
16945         when the inputs are very large.
16946
16947 2005-03-15  Karl Berry  <karl@gnu.org>
16948
16949         * config/srclist.txt (config.rpath): from gettext.
16950         * config/config.rpath: update.
16951
16952 2005-03-15  Bruno Haible  <bruno@clisp.org>
16953
16954         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
16955         to 'negate'.
16956
16957         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
16958         variable.
16959
16960         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
16961         results.
16962
16963 2005-03-14  Simon Josefsson  <jas@extundo.com>
16964
16965         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
16966         <fx@gnu.org>.
16967
16968 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
16969
16970         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
16971         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
16972         intprops.h.
16973         * lib/strtol.c: Likewise.
16974
16975 2005-03-14  Jim Meyering  <jim@meyering.net>
16976
16977         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
16978         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
16979         to be nonzero so that we (and caller) can detect the difference
16980         between a valid zero-length expansion and an error return, even
16981         when the underlying strftime fails before writing anything into
16982         that location.
16983
16984 2005-03-14  Bruno Haible  <bruno@clisp.org>
16985
16986         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
16987         Update from GNU gettext 0.14.3.
16988
16989 2005-03-10  Jim Meyering  <jim@meyering.net>
16990
16991         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
16992
16993 2005-03-10  Jim Meyering  <jim@meyering.net>
16994
16995         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
16996         so that this module works on systems without fchdir.
16997
16998 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
16999
17000         Factor int-properties macros into a single file, except for
17001         glibc-related files.
17002         * lib/intprops.h: New file.
17003         * lib/getloadavg.c: Include it instead of limits.h.
17004         (INT_STRLEN_BOUND): Remove.
17005         * lib/human.c: Include intprops.h.
17006         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
17007         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
17008         302/1000.
17009         * lib/inttostr.h: Include intprops.h instead of limits.h.
17010         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
17011         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
17012         for consistency with intprops.h.
17013         (time_t_is_integer, twos_complement_arithmetic): Use them.
17014         * lib/sig2str.h: Include <signal.h>, intprops.h.
17015         (INT_STRLEN_BOUND): Remove.
17016         * lib/strftime.c (TYPE_SIGNED): Remove.
17017         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
17018         * lib/strtol.c: Adjust comments to match intprops.h.
17019         * lib/userspec.c: Include intprops.h.
17020         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
17021         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
17022         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
17023         instead of rolling our own expressions.
17024         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
17025
17026         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
17027         instead of int.
17028         (my_strftime): Do not mishandle years close to INT_MAX, by doing
17029         the right thing even if adding 1900 would overflow.  Similarly
17030         for tm_mon + 1 and tm_yday + 1.
17031         Make %Y always equivalent to %C%y, and similarly for %G and %g.
17032         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
17033         (DO_SIGNED_NUMBER): New macro.
17034         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
17035
17036 2005-03-07  Bruno Haible  <bruno@clisp.org>
17037
17038         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
17039
17040 2005-03-07  Bruno Haible  <bruno@clisp.org>
17041
17042         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
17043
17044 2005-03-04  Derek R. Price  <derek@ximbiot.com>
17045
17046         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
17047         (func_import): Only replace files via --import when they have actually
17048         changed.
17049
17050 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17051
17052         * m4/mmap-anon.m4: New file.
17053         * m4/pagealign_alloc.m4: New file.
17054
17055 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17056             Bruno Haible  <bruno@clisp.org>
17057
17058         * modules/pagealign_alloc: New file.
17059         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
17060
17061 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17062             Bruno Haible  <bruno@clisp.org>
17063
17064         * lib/pagealign_alloc.h: New file.
17065         * lib/pagealign_alloc.c: New file.
17066
17067 2005-03-03  Bruno Haible  <bruno@clisp.org>
17068
17069         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
17070         Use an all-permissive copyright notice, recommended by RMS.
17071
17072 2005-03-02  Bruno Haible  <bruno@clisp.org>
17073
17074         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
17075         of AIX, the replacement has to be done only after <string.h> is
17076         included, therefore not in config.h. stpncpy.h does the replacement,
17077         and stpncpy.c uses it.
17078
17079 2005-03-02  Bruno Haible  <bruno@clisp.org>
17080
17081         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
17082         stpncpy.c uses it.
17083
17084 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17085
17086         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
17087         The workaround isn't strictly needed for POSIX conformance, and
17088         it's too much of a pain to configure and maintain.  We'll ask
17089         people to fix their kernels instead.
17090         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
17091         (NANOSLEEP_BUG_WORKAROUND): Remove.
17092         (xnanosleep): Remove the workaround.
17093
17094 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17095
17096         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
17097         Reported by Derek Price.
17098         (Include): Add "timespec.h".
17099
17100         * modules/xnanosleep (Depends-on): Remove gethrxtime.
17101
17102 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17103
17104         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
17105         to detect nanosleep bug.
17106
17107 2005-03-01  Bruno Haible  <bruno@clisp.org>
17108
17109         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
17110
17111 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
17112
17113         * modules/gethrxtime: New file.
17114         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
17115         (Depends-on): Add gethrxtime.
17116         (configure.ac): Add gl_XNANOSLEEP.
17117         (Makefile.am): Remove lib_SOURCES line.
17118
17119 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
17120
17121         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
17122         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
17123
17124 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
17125
17126         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
17127         * lib/timespec.h (gettime): Return void, since it always
17128         succeeds now.  All uses changed.
17129         * lib/gettime.c (gettime) Likewise.
17130         [HAVE_NANOTIME]: Prefer nanotime.
17131         Assume gettimeofday succeeds, as POSIX requires.
17132         Assime time () succeeds, since other code already does.
17133         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
17134         (timespec_subtract): Remove.
17135         (NANOSLEEP_BUG_WORKAROUND): New constant.
17136         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
17137         things considerably.  Use it only on GNU/Linux hosts, since the
17138         workaround shouldn't be needed elsewhere.
17139
17140 2005-02-24  Bruno Haible  <bruno@clisp.org>
17141
17142         * modules/gettext (Files): Add m4/glibc2.m4.
17143
17144 2005-02-24  Bruno Haible  <bruno@clisp.org>
17145
17146         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
17147         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
17148         * m4/progtest.m4:
17149         Update from GNU gettext 0.14.2.
17150         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
17151
17152 2005-02-24  Bruno Haible  <bruno@clisp.org>
17153
17154         * lib/localcharset.c: Update from GNU gettext 0.14.2.
17155         * lib/config.charset: Update from GNU gettext 0.14.2.
17156
17157 2005-02-24  Bruno Haible  <bruno@clisp.org>
17158
17159         * lib/gettext.h: Update from GNU gettext 0.14.2.
17160
17161 2005-02-23  Simon Josefsson  <jas@extundo.com>
17162
17163         * m4/iconvme.m4: New file.
17164
17165 2005-02-23  Jim Meyering  <jim@meyering.net>
17166
17167         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
17168         change.
17169         Thanks to Bruno Haible for catching it.
17170
17171 2005-02-22  Simon Josefsson  <jas@extundo.com>
17172
17173         * modules/iconvme: New file.
17174
17175         * MODULES.html.sh: Add iconvme.
17176
17177 2005-02-22  Simon Josefsson  <jas@extundo.com>
17178
17179         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
17180
17181 2005-02-22  Simon Josefsson  <jas@extundo.com>
17182
17183         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
17184
17185 2005-02-22  Jim Meyering  <jim@meyering.net>
17186
17187         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
17188         s/ifndef/ifdef/.
17189
17190 2005-02-20  Neil Conway  <neilc@samurai.com>
17191
17192         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
17193         returned by OSX/Darwin if the specified buffer is not large
17194         enough for the hostname.
17195
17196 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17197
17198         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
17199         pass it to _help, otherwise the latter coredumps trying to
17200         dereference state.root_argp.
17201
17202 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17203
17204         * modules/chdir-long (Depends-on): Add memrchr.
17205         * modules/memrchr (Files): Add lib/memrchr.h.
17206         (Include): "memrchr.h".
17207
17208 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17209
17210         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
17211
17212 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17213
17214         * lib/memrchr.h: New file.
17215         * lib/chdir-long.c: Include it.
17216         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
17217         Don't bother including stddef.h.
17218
17219 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
17220
17221         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
17222         inclusion.
17223         Include <sys/types.h>, for dev_t.
17224         (ME_DUMMY, ME_REMOTE): Move from here....
17225         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
17226         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
17227         Dmitry V. Levin.
17228         Include mountlist.h first, to test the interface.
17229
17230 2005-01-29  Bruno Haible  <bruno@clisp.org>
17231
17232         * lib/progname.c (program_name): Initialize.
17233         Needed when linking statically on MacOS X.
17234
17235 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
17236
17237         Sync from coreutils.
17238         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
17239         (Depends-on): Add c-strtod.
17240         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
17241
17242 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
17243
17244         Sync from coreutils.
17245         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
17246
17247         Remove files that are specific to coreutils.
17248         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
17249
17250 2005-01-28  Bruno Haible  <bruno@clisp.org>
17251
17252         * modules/javacomp: New file.
17253         * MODULES.html.sh (Java): Add javacomp.
17254
17255 2005-01-28  Bruno Haible  <bruno@clisp.org>
17256
17257         * m4/javacomp.m4: New file, from GNU gettext.
17258
17259 2005-01-28  Bruno Haible  <bruno@clisp.org>
17260
17261         * lib/javacomp.sh.in: New file, from GNU gettext.
17262         * lib/javacomp.h: New file, from GNU gettext.
17263         * lib/javacomp.c: New file, from GNU gettext.
17264
17265 2005-01-26  Simon Josefsson  <jas@extundo.com>
17266
17267         * lib/gai_strerror.c: Use GPL in header.
17268
17269 2005-01-26  Bruno Haible  <bruno@clisp.org>
17270
17271         * modules/javaexec: New file.
17272         * MODULES.html.sh (Java): Add javaexec.
17273
17274 2005-01-26  Bruno Haible  <bruno@clisp.org>
17275
17276         * m4/javaexec.m4: New file, from GNU gettext.
17277
17278 2005-01-26  Bruno Haible  <bruno@clisp.org>
17279
17280         * lib/javaexec.sh.in: New file, from GNU gettext.
17281         * lib/javaexec.h: New file, from GNU gettext.
17282         * lib/javaexec.c: New file, from GNU gettext.
17283
17284 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17285
17286         * modules/lchown (Depends-on): Remove lchown.h
17287
17288 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17289
17290         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
17291         must be defined if the header file was not found, in order
17292         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
17293
17294 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17295
17296         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
17297         initializers for struct pentry_state.
17298         (__argp_error): Check return value of __asprintf
17299         (__argp_failure): Translate error message
17300
17301         * lib/argp-parse.c: Removed braces around the expansion of N_()
17302
17303 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
17304
17305         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
17306         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
17307         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
17308         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
17309         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
17310         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
17311         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
17312         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
17313         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
17314         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
17315         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
17316         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
17317         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
17318         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
17319         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
17320         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
17321         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
17322         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
17323         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
17324         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
17325         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
17326         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
17327         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
17328         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
17329         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
17330         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
17331         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
17332         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
17333         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
17334         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
17335         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
17336         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
17337         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
17338         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
17339         xstrtol.m4, xstrtoumax.m4, yesno.m4:
17340         Use an all-permissive copyright notice, recommended by RMS.
17341
17342 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
17343
17344         * modules/chdir-long (Depends-on): Remove mempcpy.
17345
17346 2005-01-21  Jim Meyering  <jim@meyering.net>
17347
17348         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
17349         same value as for Solaris 9.
17350
17351         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
17352         component length.  This included changing the parameter to be
17353         of type `char *' rather than `char const *'.
17354         * lib/chdir-long.h (chdir_long): Update prototype.
17355
17356         * lib/openat.c (fdopendir, fstatat): New functions.
17357         * lib/openat.h: Include headers required for use of DIR and struct
17358         stat.
17359         [AT_SYMLINK_NOFOLLOW]: Define.
17360         (fdopendir, fstatat): Add prototypes.
17361
17362 2005-01-21  Bruno Haible  <bruno@clisp.org>
17363
17364         * modules/classpath: New file.
17365         * MODULES.html.sh (Java): Add classpath.
17366
17367 2005-01-21  Bruno Haible  <bruno@clisp.org>
17368
17369         * lib/classpath.h: New file, from GNU gettext.
17370         * lib/classpath.c: New file, from GNU gettext.
17371
17372 2005-01-20  Simon Josefsson  <jas@extundo.com>
17373
17374         * modules/version-etc-fsf: New file.
17375
17376 2005-01-20  Simon Josefsson  <jas@extundo.com>
17377
17378         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
17379         * lib/version-etc.c: Remove version_etc_copyright.
17380         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
17381         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
17382
17383 2005-01-20  Simon Josefsson  <jas@extundo.com>
17384
17385         * lib/base64.h (isbase64): Add.
17386
17387         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
17388         using a unsigned prototype, don't inline.
17389         (base64_decode): Use it.
17390
17391 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17392
17393         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
17394         it.
17395
17396 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17397
17398         * lib/save-cwd.c (save_cwd): Remove code to support the case
17399         where fchdir is missing or flaky.
17400
17401 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17402
17403         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
17404
17405 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
17406
17407         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
17408         AC_LIBSOURCES now does this.
17409         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
17410         with new ullong_max module.
17411
17412 2005-01-19  Bruno Haible  <bruno@clisp.org>
17413
17414         * modules/sh-quote: New file.
17415         * MODULES.html.sh (Executing programs): Add sh-quote.
17416
17417 2005-01-19  Bruno Haible  <bruno@clisp.org>
17418
17419         * lib/sh-quote.h: New file, from GNU gettext.
17420         * lib/sh-quote.c: New file, from GNU gettext.
17421
17422 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17423
17424         Merge from coreutils.
17425         * m4/ullong_max.m4: New file.
17426         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
17427         (gl_MACROS): Assume localeconv exists.
17428
17429 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17430
17431         Merge changes from coreutils, as described below in several
17432         changelogs dated today.
17433
17434         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
17435         (O_DIRECTORY): Remove; not needed here, since "." must be
17436         a directory.  All uses removed.
17437         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
17438         universal on Suns, and we also need to test for IRIX.
17439         Revamp code to use 'if' rather than '#if'.
17440         Avoid unnecessary comparison of cwd->desc to 0.
17441
17442         * lib/utimens.c (futimens): Robustify the previous patch, by checking
17443         for known valid error numbers rather than observed invalid ones.
17444
17445 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17446
17447         * modules/ullong_max: New file.
17448
17449         * modules/chdir-long, modules/openat: New files.
17450         * modules/save-cwd (Depends-on): Depend on chdir-long.
17451         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
17452
17453 2005-01-18  Jim Meyering  <jim@meyering.net>
17454
17455         Merge from coreutils.
17456         * m4/chdir-long.m4, m4/openat.m4: New files.
17457         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
17458         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
17459         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
17460         is sane and DOES follow symlinks.  Besides, testing 20 different
17461         systems found no broken chown implementations.
17462         Prompted by a change in rsync's copy of this macro.
17463         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
17464
17465         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
17466
17467         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
17468         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
17469         NULL-means-set-to-current-time semantics.
17470         Remove temporary file immediately, rather than waiting
17471         for configure's at-exit trap code to do it.
17472
17473 2005-01-18  Jim Meyering  <jim@meyering.net>
17474
17475         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17476
17477         * lib/utimens.c (futimens): Account for the fact that futimes
17478         can also fail with errno == ENOSYS or errno == ENOENT.
17479         Patch from Dmitry V. Levin.
17480
17481         Change the name of the robust chdir function from chdir to chdir_long.
17482         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
17483         (restore_cwd): Use chdir_long, not chdir.
17484         * lib/chdir-long.c: Renamed from chdir.c.
17485         * lib/chdir-long.h: Renamed from chdir.h.
17486         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
17487         Hurd.
17488
17489 2005-01-18  Bruno Haible  <bruno@clisp.org>
17490
17491         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
17492         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
17493         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
17494         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
17495         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
17496         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
17497         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
17498         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
17499         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
17500         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
17501         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
17502         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
17503         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
17504         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
17505         Use an all-permissive copyright notice, recommended by RMS.
17506
17507 2005-01-18  Bob Proulx  <bob@proulx.com>
17508
17509         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
17510         simplify offsetof() macro construct to avoid compile failure with
17511         native HP-UX 11.0 ANSI C compiler.
17512
17513 2005-01-17  Bruno Haible  <bruno@clisp.org>
17514
17515         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
17516         redundant because stpncpy.m4 takes care of it.
17517
17518 2005-01-17  Bruno Haible  <bruno@clisp.org>
17519
17520         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
17521
17522 2005-01-17  Bruno Haible  <bruno@clisp.org>
17523
17524         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
17525         used.
17526
17527 2005-01-17  Bruno Haible  <bruno@clisp.org>
17528
17529         * lib/fwriteerror.h (fwriteerror): Change specification to include
17530         fclose.
17531         * lib/fwriteerror.c: Include <stdbool.h>.
17532         (fwriteerror): At the end, close the file stream. Record whether
17533         stdout was already closed.
17534
17535 2005-01-17  Bruno Haible  <bruno@clisp.org>
17536
17537         * lib/execute.c (environ): Declare if needed.
17538         * lib/pipe.c (environ): Likewise.
17539         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
17540
17541 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17542
17543         * modules/argp: Depend on vsnprintf
17544
17545 2005-01-10  Jim Meyering  <jim@meyering.net>
17546
17547         * modules/closeout (Depends-on): Add atexit.
17548
17549 2005-01-06  Bruno Haible  <bruno@clisp.org>
17550
17551         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
17552
17553 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
17554
17555         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
17556         definitions to be after all include files, to avoid collisions.
17557         Problem reported by Bob Proulx.
17558
17559 2005-01-04  Jim Meyering  <jim@meyering.net>
17560
17561         Changes imported from coreutils.
17562         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
17563         as the mkstemp template, use a temporary directory and an
17564         8.3-friendly template to avoid trouble on systems like DJGPP.
17565         Reported by Juan M. Guerrero via Stepan Kasal.
17566         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
17567         close. Remove the temporary directory right away, rather than waiting
17568         for configure's at-exit trap code to do it.
17569         Suggestion from Stepan Kasal.
17570
17571 2005-01-01  Simon Josefsson  <jas@extundo.com>
17572
17573         * gnulib-tool: Print #include directives when --import'ing.
17574
17575 2004-12-28  Simon Josefsson  <jas@extundo.com>
17576
17577         * tests/test-base64.c: Include required header files.  Remove
17578         unused variables.
17579
17580 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
17581
17582         * modules/error (Depends-on): Remove gettext.
17583
17584 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
17585
17586         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
17587         not needed.  This removes a dependency on the gettext module.
17588         [defined _LIBC]: Do not include <libintl.h>; not needed.
17589
17590 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
17591
17592         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
17593         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
17594
17595 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
17596
17597         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
17598         HAVE_DECL_STRTOLD.
17599
17600 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17601
17602         * modules/getdate (Depends-on): Remove alloca-opt.
17603
17604 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17605
17606         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
17607
17608 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17609
17610         * lib/argp-parse.c: Include <stddef.h>.
17611         (alignof, alignto): New macros.
17612         (parser_init): Don't assume that void * is aligned sufficiently
17613         for struct option.
17614
17615         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
17616         need to extend the stack.
17617         (YYINITDEPTH): New macro, so that the initial stack isn't overly
17618         large.
17619
17620 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17621
17622         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
17623
17624 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
17625
17626         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
17627         (2004-10-24) change.  Apparently this was a false alarm.
17628
17629         * modules/getdate: Depend on alloca-opt, not alloca.
17630
17631 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
17632
17633         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
17634         Remove now-obsolete comment about AIX.
17635         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
17636         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
17637         (YYMAXDEPTH): New macro.
17638
17639 2004-12-18  Simon Josefsson  <jas@extundo.com>
17640
17641         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
17642
17643 2004-12-18  Bruno Haible  <bruno@clisp.org>
17644
17645         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
17646
17647 2004-12-18  Bruno Haible  <bruno@clisp.org>
17648
17649         * lib/fatal-signal.c (fatal_signals): Make non-const.
17650         (init_fatal_signals): New function.
17651         (uninstall_handlers, install_handlers): Ignore signals that were set to
17652         SIG_IGN.
17653         (at_fatal_signal): Call init_fatal_signals.
17654         (init_fatal_signal_set): Likewise. Ignore signals that were set to
17655         SIG_IGN.
17656         Reported by Paul Eggert.
17657
17658 2004-12-18  Bruno Haible  <bruno@clisp.org>
17659
17660         * doc/alloca.texi: New file.
17661         * doc/alloca-opt.texi: New file.
17662
17663 2004-12-17  Jim Meyering  <jim@meyering.net>
17664
17665         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
17666         Otherwise, install-sh could exit with improper exit status when
17667         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
17668
17669 2004-12-16  Simon Josefsson  <jas@extundo.com>
17670
17671         * tests/test-base64.c: Add license.
17672
17673 2004-12-15  Stepan Kasal  <address@hidden>
17674
17675         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
17676
17677 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
17678
17679         * modules/getcwd (Files): Add m4/d-ino.m4.
17680         Suggested by Mark D. Baushke.
17681
17682 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
17683
17684         * lib/getdate.y (textint): New member "negative".
17685         (time_zone_hhmm): New function.
17686         Expect 14 shift-reduce conflicts, not 13.
17687         (o_colon_minutes): New rule.
17688         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
17689         (yylex): Set the "negative" member of signed numbers.
17690
17691 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
17692
17693         * doc/getdate.texi (Time of day items, Time zone items):
17694         Describe new formats +00:00, UTC+00:00.
17695
17696 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
17697
17698         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
17699         spurious "-l"s.  Problem reported by Stepan Kasal.
17700
17701 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
17702
17703         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
17704         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
17705
17706 2004-12-04  Simon Josefsson  <jas@extundo.com>
17707
17708         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
17709         Vandoorselaere <yoann@prelude-ids.org>.
17710
17711 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17712
17713         Changes imported from coreutils.
17714         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
17715         exist.
17716         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
17717
17718 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17719
17720         Changes imported from coreutils.
17721         * lib/hard-locale.c: Assume <locale.h> exists.
17722         Include "strdup.h".
17723         (GLIBC_VERSION): New macro.
17724         (hard_locale): Assume setlocale exists.
17725         Rewrite to avoid #ifdef.
17726         Use strdup rather than malloc + strcpy.
17727         * lib/human.c: Assume <locale.h> exists.
17728         (human_readable): Assume localeconv exists.
17729
17730 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17731
17732         * modules/hard-locale (Depends-on): Add strdup.
17733
17734 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
17735
17736         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
17737         convert T2, not T.  (Imported from libc.)
17738
17739 2004-11-30  Simon Josefsson  <jas@extundo.com>
17740
17741         * modules/restrict (License): Change to LGPL.
17742
17743 2004-11-30  Simon Josefsson  <jas@extundo.com>
17744
17745         * m4/restrict.m4: Add copyright and copying conditions.
17746
17747 2004-11-30  Simon Josefsson  <jas@extundo.com>
17748
17749         * m4/base64.m4: New file.
17750
17751 2004-11-30  Simon Josefsson  <jas@extundo.com>
17752
17753         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
17754         base64.
17755
17756         * tests/test-base64.c: New file.
17757
17758         * modules/base64: New file.
17759
17760 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
17761
17762         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
17763         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
17764
17765         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
17766
17767 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
17768
17769         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
17770         (__getcwd.c): Don't restore errno; glibc doesn't.
17771         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
17772         first, falling back to our code only if its results look suspicious.
17773         Ensure that the resulting buffer is only as large as necessary.
17774
17775         * lib/readutmp.c: Include readutmp.h first.
17776         Include <errno.h>, since readutmp.h no longer does that.
17777         * lib/readutmp.h: Don't include <errno.h>,
17778         <sys/param.h>, <time.h>; not needed to establish interface.
17779         (errno): Remove decl.
17780         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
17781         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
17782         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
17783
17784 2004-11-28  Simon Josefsson  <jas@extundo.com>
17785
17786         * lib/base64.h, base64.c: New file.
17787
17788 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
17789
17790         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
17791
17792 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
17793
17794         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
17795         (Depends-on): Remove pathmax, same.  Add mempcpy.
17796         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
17797         (Makefile.am): Append getcwd.h to lib_SOURCES.
17798         (Include): Add getcwd.h.
17799         (Maintainer): Change from Jim Meyering to "all, glibc",
17800         since getdate now uses intended-for-glibc code.
17801         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
17802         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
17803
17804 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
17805
17806         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
17807         HP's ANSI C compiler.
17808         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
17809         Declaring int functions causes warnings on some modern systems and
17810         shouldn't be needed to compile on ancient ones.
17811         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
17812         defined.
17813
17814         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
17815         with the following changes.
17816         (__set_errno): Parenthesize properly.
17817         Include <stdbool.h>.
17818         (MIN, MAX, MATCHING_INO): New macros.
17819         (__getcwd): Define with prototype, not K&R form.
17820         Use heuristics to allocate default buffer on stack if possible.
17821         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
17822         behavior, and to avoid the PATH_MAX limit when computing
17823         ../../../../...
17824         Use MATCHING_INO to compare inode number to file.
17825         Check for arithmetic overflow in size calculations.
17826         Fix bug in reallocation of dot array that caused getcwd to fail
17827         on directories nested deeper than 75.
17828         Be more careful about saving errno on error.
17829         Do not use realloc; use only free+malloc, as this is a bit
17830         more flexible and avoids a needless copy operation.
17831         Do not inspect st_dev and st_ino for symbolic links; POSIX
17832         doesn't specify the latter.
17833         Check for closedir errors.
17834         Avoid needless casts.
17835         Use "#ifdef weak_alias" around weak_alias, to be like other
17836         glibc code.
17837         The following changes to getcwd.c have effect only when used in
17838         gnulib; they have no effect inside glibc proper.
17839         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
17840         as alloca isn't used.
17841         (alloca, __alloca): Likewise.
17842         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
17843         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17844         unconditionally, as gnulib assumes C89 or better.
17845         Do not include <sys/param.h>.
17846         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
17847         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
17848         better.
17849         (NULL) [!defined NULL]: Remove; we assume C89 or better.
17850         Include <dirent.h> in a way that is compatible with modern Autoconf.
17851         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
17852         New macros, if not already defined.
17853         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
17854         Use "_LIBC", not "defined _LIBC", for consistency.
17855         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
17856         a mempcpy module.
17857         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
17858         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
17859         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
17860         credit only to Jim Meyering and adjust the copyright dates.
17861         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
17862         <stdlib.h>, <unistd.h>, "pathmax.h".
17863         Instead, include "xgetcwd.h" (first) and "getcwd.h".
17864         (INITIAL_BUFFER_SIZE): Remove.
17865         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
17866
17867 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
17868
17869         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
17870         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
17871         Use the _ONCE methods, for efficiency.
17872         Check for fcntl.h.  In test program, include <errno.h>
17873         and <fcntl.h> if available.  Remove old K&R cruft from
17874         test program.  Check for common errors in GNU/Linux,
17875         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
17876         don't do AC_LIBOBJ, as that's getcwd.m4's job.
17877         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
17878         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
17879         name accordingly.
17880         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
17881         accommodate new getcwd.c.
17882         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
17883         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
17884         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
17885         that's all we need now.
17886
17887 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17888
17889         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
17890         argp-parse.c depends on getopt internals, that means we should
17891         always use our getopt, to be on the safe side.
17892         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
17893         order not to spoil the result of an eventual previous invocation
17894         of gl_GETOPT_SUBSTITUTE.
17895
17896 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17897
17898         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
17899         redefinition warnings. To avoid them, include the defines
17900         in `#if !defined __need_getopt ... #endif'. The only place
17901         where __getopt_argv_const is used is in definitions
17902         of getopt_long and getopt_long_only below, which are as well
17903         protected by `#ifndef __need_getopt'.
17904         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
17905         __need_getopt after including <stdio.h> and <unistd.h> These
17906         headers might have defined it.
17907
17908 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
17909
17910         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
17911
17912 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
17913
17914         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
17915         (futimens): New function, which uses futimes if available.
17916         (futimens, utimens): Support timespec==NULL, with same semantics
17917         as utime and utimens.
17918         * lib/utimens.h (futimens): New decl.
17919
17920 2004-11-23  Jim Meyering  <jim@meyering.net>
17921
17922         * lib/getopt_.h: Remove trailing blanks.
17923
17924 2004-11-23  Jim Meyering  <jim@meyering.net>
17925
17926         * lib/__fpending.c: Add comment.
17927
17928 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
17929
17930         * modules/canonicalize (Depends-on): Add xreadlink.
17931         Problem reported by James Youngman.
17932
17933 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
17934
17935         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
17936         New macros.
17937         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
17938         optopt): Use them instead of invoking ## directly; otherwise, the
17939         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
17940
17941 2004-11-19  Bruno Haible  <bruno@clisp.org>
17942
17943         * lib/strtok_r.c: Move comments from here...
17944         * lib/strtok_r.h: ... to here.
17945
17946 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
17947
17948         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
17949         implementations that mishandle size_t overflow.
17950
17951 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
17952
17953         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
17954         might fail.  Problem reported by Yoann Vandoorselaere.
17955         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
17956         implementations that mishandle size_t overflow.
17957
17958 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17959
17960         * modules/canon-host (Depends-on): Add strdup.
17961
17962 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17963
17964         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
17965
17966 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17967
17968         * lib/canon-host.c: Include "strdup.h".
17969         (canon_host): Use getaddrinfo if available, so that IPv6 works.
17970         Use strdup instead of malloc/strcpy to duplicate strings.
17971
17972         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
17973         (human_space_before_unit): New constant.
17974         * lib/human.c (human_readable): Support it.
17975
17976         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
17977         (xgetcwd): Set errno correctly when failing.
17978         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
17979         the failure is actually due to a PATH_MAX problem.
17980
17981         Further getopt changes to make it more likely that glibc will
17982         buy the changes back.
17983         * lib/getopt.c (POSIXLY_CORRECT): New constant.
17984         (getopt): Use it, so to preserve glibc semantic
17985         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
17986         when compiling for libc.
17987         * lib/getopt_.h (__getopt_argv_const): Bring it back.
17988         (getopt_long, getopt_long_only): Use it.
17989
17990         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
17991         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
17992         (getopt): Argv is now char * const *, as per standard.
17993         (_getopt_internal_r, _getopt_internal): Argv is now char **,
17994         not char *__getopt_argv_const *.
17995         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
17996         _getopt_long_only_r): Likewise.
17997         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
17998         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
17999         _getopt_long_r, _getopt_long_only_r): Likewise.
18000         * lib/getopt_.h (__getopt_argv_const): Remove.
18001         (getopt): Argv is now char * const *, as per standard.
18002
18003         * lib/getdate.y (tORDINAL): New token.
18004         (day, relunit): Allow it for relative times.
18005         (relative_time_table): Use tORDINAL for ordinals.
18006
18007 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18008
18009         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
18010         Document that "second" isn't allowed as an ordinal number.
18011
18012 2004-11-16  Jim Meyering  <jim@meyering.net>
18013
18014         * modules/closeout (Depends-on): Add fpending.
18015
18016 2004-11-15  Jim Meyering  <jim@meyering.net>
18017
18018         * lib/closeout.c: Include "__fpending.h" once again.
18019         Include <stdbool.h>.
18020         (close_stdout): Don't fail just because stdout was closed initially,
18021         since some programs don't write to stdout in the normal course of
18022         operation (other than --version and --help), and we don't want this
18023         function to make e.g. `touch file >&-' fail.
18024         But do fail if it was closed and someone has tried to write to it.
18025         E.g., `printf foo >&-' must fail.
18026
18027 2004-11-13  Jim Meyering  <jim@meyering.net>
18028
18029         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
18030
18031 2004-11-12  Simon Josefsson  <jas@extundo.com>
18032
18033         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
18034         small doc fix is still pending.
18035
18036 2004-11-11  Simon Josefsson  <jas@extundo.com>
18037
18038         * modules/strtok_r: New file.
18039
18040         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18041         strtok_r.
18042
18043 2004-11-11  Simon Josefsson  <jas@extundo.com>
18044
18045         * m4/strtok_r.m4: New file.
18046
18047         * m4/getopt.m4: Replace opterr.
18048
18049 2004-11-11  Simon Josefsson  <jas@extundo.com>
18050
18051         * lib/strtok_r.h, strtok_r.c: New file.
18052
18053 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
18054
18055         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
18056         of replacing opterr, getopt, etc.  This should handle the
18057         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
18058
18059 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
18060
18061         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
18062         we can stop lying to compilers about the constness of argv when we
18063         are compiled outside glibc.
18064         (getopt, getopt_long, getopt_long_only): Use it.
18065         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
18066         _getopt_internal, getopt): Likewise.
18067         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
18068         _getopt_long_only_r): Likewise.
18069         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
18070         _getopt_long_r, _getopt_long_only_r): Likewise.
18071
18072         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
18073         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
18074         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
18075         the other external symbols.
18076         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
18077         declaration, since the above renaming now works around collisions.
18078
18079 2004-11-11  Jim Meyering  <jim@meyering.net>
18080
18081         * lib/linebreak.c: Remove trailing blanks.
18082         * lib/alloca_.h: Likewise.
18083         * lib/acosl.c: Likewise.
18084         * lib/euidaccess.c: Likewise.
18085         * lib/allocsa.h: Likewise.
18086
18087 2004-11-10  Simon Josefsson  <jas@extundo.com>
18088
18089         * m4/getaddrinfo.m4: New file.
18090
18091 2004-11-10  Simon Josefsson  <jas@extundo.com>
18092
18093         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
18094
18095 2004-11-10  Simon Josefsson  <jas@extundo.com>
18096
18097         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18098         getaddrinfo.
18099
18100         * modules/getaddrinfo: New file.
18101
18102 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
18103
18104         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
18105
18106 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
18107
18108         * lib/mktime.c (SHR): New macro, which is a portable
18109         substitute for >> that should work even on Crays.
18110         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
18111         Problem reported by Mark D. Baushke in
18112         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
18113         * lib/getdate.y (SHR): Likewise.
18114         (tm_diff): Use it.
18115         * lib/strftime.c (SHR): Likewise.
18116         (tm_diff): Use it.
18117         * lib/quotearg.c (struct quoting_options): Use unsigned int for
18118         quote_these_too, so that right shifts are well defined.  All uses
18119         changed.
18120
18121 2004-11-10  Jim Meyering  <jim@meyering.net>
18122
18123         Ensure that no close failure goes unreported.
18124         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
18125         return early when it seems there's nothing to flush.
18126         Don't include __fpending.h.
18127
18128 2004-11-10  Jim Meyering  <jim@meyering.net>
18129
18130         * modules/closeout (Depends-on): Remove fpending.
18131
18132 2004-11-10  Jim Meyering  <jim@meyering.net>
18133
18134         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
18135
18136 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
18137
18138         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
18139         gl_FUNC_STRFTIME.
18140         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
18141         and AC_REQUIRE when possible, to avoid duplicate checks.
18142         Check for <wchar.h>.
18143
18144 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
18145
18146         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
18147
18148 2004-11-09  Bruno Haible  <bruno@clisp.org>
18149
18150         * m4/sockpfaf.m4: New file.
18151
18152 2004-11-05  Bruno Haible  <bruno@clisp.org>
18153
18154         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
18155         Reported by Mark D. Baushke <mdb@cvshome.org>.
18156
18157 2004-11-04  Bruno Haible  <bruno@clisp.org>
18158
18159         2004-09-11  Bruno Haible  <bruno@clisp.org>
18160                 * allocsa.valgrind: New file.
18161         2004-02-06  Bruno Haible  <bruno@clisp.org>
18162                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
18163                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
18164                 Reported by Christopher Seip <chris.seip@hp.com>.
18165
18166 2004-11-04  Bruno Haible  <bruno@clisp.org>
18167
18168         * modules/allocsa (Files): Add lib/allocsa.valgrind.
18169         (Makefile.am): Distribute it.
18170
18171 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
18172
18173         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
18174         with errno == ERANGE if the buffer is too small.
18175         Problem reported by Mark D. Baushke.
18176
18177 2004-11-03  Albert Chin  <china@thewrittenword.com>
18178             Paul Eggert  <eggert@cs.ucla.edu>
18179
18180         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
18181         equivalent, substitute $ac_type for equivalent type rather than
18182         blindly using uint32_t *always* which won't work if uint32_t is not
18183         available.  Define _UINT32_T to work around typedef of uint32_t if
18184         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
18185         2.5.1.
18186
18187 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18188
18189         * m4/jm-macros.m4: Sync from coreutils.
18190         (gl_MACROS): Check for mbrlen, for pathchk.
18191         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
18192
18193 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18194
18195         * lib/xreadlink.c (MAXSIZE): New macro.
18196         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
18197         size does not exceed MAXSIZE.  Avoid cast.
18198         As suggested by Mark D. Baushke in
18199         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
18200         if readlink fails with buffer size just under MAXSIZE, try again
18201         with MAXSIZE.
18202
18203 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18204
18205         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
18206
18207 2004-11-02  Derek R. Price  <derek@ximbiot.com>
18208         and  Paul Eggert  <eggert@cs.ucla.edu>
18209
18210         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
18211         (get_date): Overparenthesize to avoid GCC warning.
18212
18213 2004-11-02  Bruno Haible  <bruno@clisp.org>
18214
18215         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
18216         returns void.
18217
18218 2004-11-02  Bruno Haible  <bruno@clisp.org>
18219
18220         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
18221         function returns void.
18222
18223 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
18224
18225         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
18226         fflush_unlocked, flockfile, funlockfile, funlockfile,
18227         fputs_unlocked, putc_unlocked.
18228
18229 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
18230
18231         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
18232         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
18233         already declared.
18234
18235 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18236
18237         * modules/getdate (Files): Add doc/getdate.texi.
18238         (Depends-on): Add setenv, xalloc.
18239
18240 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18241
18242         * lib/getdate.y: Add support for TZ="foo" within a date string.
18243         Fix some bugs near time_t boundaries.  Reject dates with
18244         out-of-range components, e.g., "Sept 31".
18245         Include <stdlib.h>, "setenv.h", "xalloc.h".
18246         (ISDIGIT_LOCALE): Remove; unused.
18247         Note that the TZ and time functions used here are not reentrant.
18248         (mktime_ok, get_tz): New functions.
18249         (TZBUFSIZE): New constant.
18250         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
18251         This requires that we sometimes generate our own TZ="XXX..." setting.
18252
18253 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18254
18255         * doc/getdate.texi: New file, from coreutils with modifications for
18256         the new TZ parsing.
18257
18258 2004-10-27  Derek R. Price  <derek@ximbiot.com>
18259
18260         * lib/mktime.c (not_equal_tm): Remove redundant check.
18261
18262 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
18263
18264         * modules/regex (lib_SOURCES): Add regex.c.
18265         Reported by James Youngman in
18266         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
18267
18268 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
18269
18270         * lib/getdate.y: Use Bison 1.875 features, and some minor
18271         code cleanups.  This change does not affect semantics.
18272         Don't include <stdlib.h>; no longer needed.
18273         Don't include unlocked-io.h; only the "#if TEST" code uses
18274         stdio, and performance isn't crucial there.
18275         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
18276         Bison 1.875 features as described below.
18277         All uses of "PC." replaced by "pc->".
18278         (YYSTYPE): Add a forward declaration.
18279         (yylex, yyerror): Use full prototypes in forward decls.
18280         Use "%pure-parser" rather than obsolescent "%pure_parser".
18281         Use %parse-param and %lex-param instead of obsolescent
18282         YYPARSE_PARAM and YYLEX_PARAM.
18283         (meridian_table, month_and_day_table, time_units_table,
18284         relative_time_table, time_zone_table, military_table,
18285         lookup_zone, lookup_word, get_date):
18286         Use NULL instead of 0 where appropriate.
18287         (to_hour): Avoid abort (), to avoid a dependency on
18288         stdlib.h.
18289         (yyerror, yylex): Now accepts parser_control * arg.
18290         (main) [TEST]: Use '\0' rather than 0 for char.
18291
18292 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
18293
18294         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
18295
18296 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
18297
18298         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
18299         It's now the caller's responsibility to handle the case where
18300         !HAVE_GETPAGESIZE && !defined getpagesize.
18301
18302         * lib/mktime.c (leapyear): Arg is long int, not int.
18303
18304 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
18305
18306         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
18307
18308 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
18309
18310         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
18311         missing.  Problem reported by James Youngman.
18312
18313 2004-10-16  Simon Josefsson  <jas@extundo.com>
18314
18315         * gnulib-tool: Fix comments.  Fix parse problem.
18316         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
18317
18318 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
18319
18320         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
18321         implementation of getopt_long.  Problem reported by Alexander Taler in:
18322         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
18323
18324 2004-10-15  Bruno Haible  <bruno@clisp.org>
18325
18326         * gnulib-tool: Untabify. Initialize supplied_libname.
18327         (func_usage): More homogenous output.
18328         (func_modules_transitive_closure, func_modules_to_filelist,
18329         func_emit_lib_Makefile_am): New functions.
18330         (func_import): New function, extracted from big case statement. Use
18331         func_get_license, func_modules_transitive_closure,
18332         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
18333         opt_lgpl. Don't use test -a, as it's not portable.
18334         (func_create_testdir): Use func_modules_transitive_closure,
18335         func_modules_to_filelist, func_emit_lib_Makefile_am.
18336
18337 2004-10-15  Bruno Haible  <bruno@clisp.org>
18338
18339         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
18340
18341 2004-10-15  Bruno Haible  <bruno@clisp.org>
18342
18343         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
18344         the portions belonging to each module.
18345         Suggested by Derek Robert Price <derek@ximbiot.com>.
18346
18347 2004-10-12  Simon Josefsson  <jas@extundo.com>
18348
18349         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
18350         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
18351         to real functions.
18352
18353 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18354
18355         * modules/vsnprintf: New file.
18356
18357 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18358
18359         * m4/vsnprintf.m4: New file.
18360
18361 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18362
18363         * lib/vsnprintf.h: New file.
18364         * lib/vsnprintf.c: New file.
18365
18366 2004-10-11  Bruno Haible  <bruno@clisp.org>
18367
18368         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
18369         vsnprintf.
18370
18371 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
18372
18373         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
18374
18375 2004-10-07  Bruno Haible  <bruno@clisp.org>
18376
18377         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
18378         fits into the provided buffer.
18379
18380 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
18381
18382         * lib/diacrit.c, diacrit.h: Add GPL notice.
18383
18384         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
18385         notice.
18386         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
18387         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
18388         This avoids a potential constant-folding bug.
18389
18390 2004-10-05  Bruno Haible  <bruno@clisp.org>
18391
18392         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
18393         for the declaration of strsep.
18394
18395 2004-10-05  Bruno Haible  <bruno@clisp.org>
18396
18397         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
18398
18399 2004-10-04  Simon Josefsson  <jas@extundo.com>
18400
18401         * modules/memmem: New file.
18402         * tests/test-memmem.c: New file.
18403         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
18404
18405 2004-10-04  Simon Josefsson  <jas@extundo.com>
18406
18407         * m4/memmem.m4: New file.
18408
18409 2004-10-04  Simon Josefsson  <jas@extundo.com>
18410
18411         * lib/memmem.h: New file.
18412         * lib/memmem.c: New file, taken from glibc.
18413
18414 2004-10-04  Simon Josefsson  <jas@extundo.com>
18415
18416         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
18417         '#ifdef USE_UNLOCKED_IO'.
18418
18419 2004-10-04  Simon Josefsson  <jas@extundo.com>
18420
18421         * config/srclist.txt: Add memmem from glibc.
18422
18423 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18424
18425         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
18426
18427         * modules/argmatch, modules/argp, modules/closeout, modules/error,
18428         modules/exclude, modules/getdate, modules/getline,
18429         modules/getndelim2, modules/getpass, modules/getpass-gnu,
18430         modules/getusershell, modules/linebuffer, modules/md5,
18431         modules/mountlist, modules/posixtm, modules/readtokens,
18432         modules/readutmp, modules/regex, modules/sha1,
18433         modules/version-etc, modules/yesno:
18434         Remove dependency on unlocked-io.
18435
18436 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18437
18438         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
18439
18440         * m4/unlocked-io.m4: Add copyright notice.
18441         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
18442
18443 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18444
18445         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
18446         * lib/xmalloc.c (xmemdup): Likewise.
18447         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
18448         XFREE): Remove these long-obsolescent macros.
18449         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
18450         * lib/xstrdup.c: Remove.
18451
18452         * lib/regex.c (re_comp): Cast gettext return value to char *,
18453         Problem reported by Martin Neitzel via Mark D. Baushke.
18454
18455 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18456
18457         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
18458         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
18459         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
18460         regex.c, sha1.c, version-etc.c, yesno.c:
18461         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
18462         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
18463         the includer's responsibility.
18464
18465         Sync from coreutils.
18466
18467         * lib/modechange.c (mode_compile): Don't decrement a pointer that
18468         points to the start of a string, as the C Standard says the
18469         resulting behavior is undefined.
18470
18471         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
18472         simple -> simple_backups, numbered_existing ->
18473         numbered_existing_backups, numbered -> numbered_backups
18474         to avoid shadowing problems.  All uses changed.
18475         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
18476         * lib/backupfile.c (check_extension, numbered_backup):
18477         Rename locals to avoid shadowing 'basename'.
18478         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
18479         once.
18480
18481         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
18482         * lib/.cvsignore: Add getopt.h.
18483
18484 2004-10-04  Bruno Haible  <bruno@clisp.org>
18485
18486         * modules/README: New file.
18487         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
18488         not a module.
18489
18490 2004-10-02  Jim Meyering  <jim@meyering.net>
18491
18492         * lib/dirfd.h, getpagesize.h: Add copyright notice.
18493
18494 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18495
18496         * modules/strsep: New file.
18497
18498 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18499
18500         * m4/strsep.m4: New file.
18501
18502 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18503
18504         * lib/strsep.h: New file.
18505         * lib/strsep.c: New file.
18506
18507 2004-10-01  Simon Josefsson  <jas@extundo.com>
18508
18509         * lib/snprintf.c (snprintf): Handle size==0.
18510
18511 2004-10-01  Simon Josefsson  <jas@extundo.com>
18512             Bruno Haible  <bruno@clisp.org>
18513
18514         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
18515         (snprintf): Declare 'args'.
18516
18517 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
18518
18519         * lib/snprintf.c: Remove comments as to why each header is needed.
18520
18521 2004-10-01  Bruno Haible  <bruno@clisp.org>
18522
18523         * MODULES.html.sh: Add strsep.
18524
18525 2004-09-30  Simon Josefsson  <jas@extundo.com>
18526
18527         * modules/snprintf: New file.
18528
18529 2004-09-30  Simon Josefsson  <jas@extundo.com>
18530
18531         * m4/snprintf.m4: New file.
18532
18533 2004-09-30  Simon Josefsson  <jas@extundo.com>
18534
18535         * lib/snprintf.h, lib/snprintf.c: New files.
18536
18537 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18538
18539         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
18540         (hol_entry_help): Never translate an empty string.
18541         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
18542         * lib/argp.h (OPTION_NO_TRANS): New option.
18543
18544 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18545
18546         * modules/argp (Maintainer): Replace Simon Josefsson
18547         by Sergey Poznyakoff.
18548
18549 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18550
18551         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
18552         changes merged back into glibc.
18553
18554 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18555
18556         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
18557
18558 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18559
18560         * lib/xvasprintf.c: Include xalloc.h.
18561         (xvasprintf): Use xalloc_die, not xmalloc_die.
18562
18563 2004-09-29  Bruno Haible  <bruno@clisp.org>
18564
18565         * modules/alloca-opt: New file, derived from modules/alloca.
18566         * modules/allocsa: Depend on alloca-opt instead of alloca.
18567         * modules/setenv: Likewise.
18568         * modules/vasnprintf: Likewise.
18569         * MODULES.html.sh: Add alloca-opt.
18570
18571 2004-09-28  Simon Josefsson  <jas@extundo.com>
18572
18573         * gnulib-tool: New parameter --lgpl, to asseert that modules are
18574         LGPL, and to replace license template from GPL to LGPL.
18575
18576 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
18577
18578         * modules/dummy: Change license to LGPL.
18579
18580 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
18581
18582         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
18583
18584 2004-09-24  Simon Josefsson  <jas@extundo.com>
18585
18586         * modules/minmax (License): Change from GPL to LGPL.
18587
18588 2004-09-23  Simon Josefsson  <jas@extundo.com>
18589
18590         * gnulib-tool (--import): Typo.
18591
18592 2004-09-23  Simon Josefsson  <jas@extundo.com>
18593
18594         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
18595
18596 2004-09-22  Bruno Haible  <bruno@clisp.org>
18597
18598         * modules/*: Add 'License' field.
18599         * gnulib-tool: Accept --extract-license option.
18600         (func_get_license): New function.
18601
18602 2004-09-21  Bruno Haible  <bruno@clisp.org>
18603
18604         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
18605         Reported by Simon Josefsson.
18606
18607 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
18608
18609         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
18610         gl_AC_TYPE_LONG_LONG.
18611
18612 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
18613
18614         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
18615
18616 2004-09-18  Simon Josefsson  <jas@extundo.com>
18617         and  Paul Eggert  <eggert@cs.ucla.edu>
18618
18619         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
18620         calls with autoreconf.  Define GL_LIB.
18621
18622 2004-09-14  Karl Berry  <karl@gnu.org>
18623
18624         * config/srclist.txt: unsync setenv.c, sigh.
18625
18626 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
18627
18628         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
18629         Problem reported by Bruno Haible in:
18630         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
18631
18632 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
18633
18634         * config/srclist.txt: Comment out argp-pvh.c.
18635
18636 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
18637
18638         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
18639         in case some system header has #define'd it.  Problem reported by
18640         Soeren D. Schulze in
18641         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
18642
18643 2004-09-09  Karl Berry  <karl@gnu.org>
18644
18645         * regex.[ch]: delete from the root.  These were supposed to be
18646                 synced with emacs cvs, but this has not happened for about
18647                 a year, and anyway nothing else uses emacs regex.[ch].
18648                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
18649                 lib/regex[.ch] is untouched.
18650
18651 2004-09-09  Bruno Haible  <bruno@clisp.org>
18652
18653         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
18654
18655 2004-09-09  Bruno Haible  <bruno@clisp.org>
18656
18657         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
18658         modifications.
18659         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
18660
18661 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
18662
18663         * modules/xvasprintf: New file.
18664         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
18665
18666 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
18667
18668         * lib/xvasprintf.h: New file.
18669         * lib/xvasprintf.c: New file.
18670         * lib/xasprintf.c: New file.
18671
18672 2004-09-08  Bruno Haible  <bruno@clisp.org>
18673
18674         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
18675
18676 2004-09-08  Bruno Haible  <bruno@clisp.org>
18677
18678         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
18679         length is > INT_MAX.
18680         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
18681         more.
18682
18683 2004-09-08  Bruno Haible  <bruno@clisp.org>
18684
18685         * lib/stdint_.h: New file, taken from GNU clisp.
18686
18687 2004-09-08  Bruno Haible  <bruno@clisp.org>
18688             Oskar Liljeblad  <oskar@osk.mine.nu>
18689
18690         * modules/stdint: New file.
18691         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
18692
18693 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18694
18695         Import from coreutils.
18696         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
18697         strings on unbounded length.  alloca's performance benefits aren't
18698         that important here.
18699         (V_STRDUP): Remove.
18700         (parse_with_separator): New function, with most of the internals
18701         of the old parse_user_spec.  Allow user to omit both user and group,
18702         for compatibility with FreeBSD.
18703         Clone only the user name, not the entire spec.
18704         Do not set *uid, *gid unless entirely successful.
18705         Avoid memory leak in some failing cases.
18706         Fix regression for USER.GROUP reported by Dmitry V. Levin in
18707         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
18708         (parse_user_spec): Rewrite to use parse_with_separator.
18709
18710 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18711
18712         * modules/userspec: Don't depend on alloca.
18713
18714 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18715
18716         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
18717
18718 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18719
18720         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
18721         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
18722         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
18723
18724 2004-08-16  Simon Josefsson  <jas@extundo.com>
18725
18726         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
18727         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
18728         Add --dry-run for --import.
18729         Let user provided command line parameters override configure.ac
18730         settings.
18731
18732 2004-08-12  Simon Josefsson  <jas@extundo.com>
18733
18734         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
18735         as discussed with Paul Eggert in threads rooted at
18736         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
18737         and
18738         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
18739         Before, the test was empty, and relied on ELIDE_CODE in source
18740         code.)
18741         (gl_PREREQ_GETOPT): New macro.
18742         (gl_GETOPT): Use them.
18743
18744 2004-08-12  Simon Josefsson  <jas@extundo.com>
18745
18746         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
18747         * lib/getopt_.h: Renamed from getopt.h.
18748
18749 2004-08-12  Simon Josefsson  <jas@extundo.com>
18750
18751         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
18752         Change default library name from libfoo to libgnu.
18753         Now, if you have a configure.ac that says:
18754                 gl_SOURCE_BASE(gl)
18755                 gl_M4_BASE(gl/m4)
18756                 gl_MODULES(error getopt etcetera)
18757                 gl_INIT
18758         you can import all you need by running:
18759                 ../gnulib/gnulib-tool --import
18760
18761         * modules/getopt (Files): Rename getopt.h to getopt_.h.
18762         (Makefile.am): Rewrite, use logic from argz.
18763         (Include): Use <getopt.h> instead of "getopt.h".
18764
18765 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18766
18767         * modules/argp (Files): Add m4/unlocked-io.m4.
18768         (Depends-on): Add extensions.
18769
18770 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18771
18772         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
18773         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
18774         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
18775         Check for program_invocation_name, program_invocation_short_name,
18776         flockfile, funlockfile, features.h, _getopt_long_only_r.
18777
18778 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18779
18780         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
18781         its complicated substitute.
18782         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
18783         and program_invocation_name.
18784         (__argp_basename) [!_LIBC]: Remove; the only use was
18785         replaced by its body.
18786         (__argp_short_program_name): Change condition from
18787         !defined __argp_short_program_name to
18788         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
18789         to match argp-namefrob.h.
18790         (__argp_failure): Don't assume strerror_r returns char *.
18791         * lib/argp-parse.c (N_): Define unconditionally.
18792         (argp_default_options): Fill out initializers with 0 to avoid
18793         gcc warnings.
18794
18795 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18796
18797         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
18798         getopt1.c.
18799
18800 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18801
18802         Merge from coreutils.
18803
18804         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
18805
18806         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
18807         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
18808
18809 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18810
18811         Merge from coreutils.
18812
18813         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
18814         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
18815         for Reliant Unix 5.43.
18816
18817         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
18818         (union fooround): Use uintmax_t, not long int.
18819         The rest is a merge from libc:
18820         [defined _LIBC]: Include <shlib-compat.h>.
18821         (_obstack) [defined _LIBC]: Remove after 2.3.4.
18822
18823         * lib/settime.c (settime): Recode to avoid warning with
18824         Sun Forte C 6U2.
18825
18826         * lib/strverscmp.c: Convert to UTF-8.
18827
18828 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18829
18830         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
18831         m4/uintmax_t.m4.
18832
18833 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18834
18835         * modules/xalloc-die: New file.
18836         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
18837
18838         * modules/md5 (Files): Add m4/uint32_t.m4.
18839         * modules/sha1: Renamed from modules/sha.
18840         (Files):
18841         Rename lib/sha.h to lib/sha1.h.
18842         Rename lib/sha.c to lib/sha1.c.
18843         Rename m4/sha.m4 to m4/sha1.m4.
18844         (lib_SOURCES): Likewise.
18845         (configure.ac): Rename gl_SHA to gl_SHA1.
18846         (Include): sha.h -> sha1.h.
18847
18848 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18849
18850         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
18851         * m4/sha1.m4: Renamed from sha.m4.
18852         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
18853
18854 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18855
18856         * lib/obstack.h (obstack_empty_p):
18857         Don't assume that chunk->contents is suitably aligned.
18858         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
18859         Likewise. Problem reported by Benno in
18860         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
18861
18862         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
18863         readable.  This could be improved further but it'd take some work.
18864
18865 2004-08-08  Simon Josefsson  <jas@extundo.com>
18866
18867         * modules/xgethostname (Depends-on): Remove exit and error (not
18868         used).
18869
18870         * modules/getpass-gnu: Add getpass.h.
18871         (Depends-on): Add stdbool.
18872         * modules/getpass: Add getpass.h.
18873
18874 2004-08-08  Simon Josefsson  <jas@extundo.com>
18875
18876         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
18877         Check getpass declaration.
18878
18879 2004-08-08  Simon Josefsson  <jas@extundo.com>
18880
18881         * lib/xgethostname.c: Don't include error.h (not used).
18882
18883         * lib/getpass.h: Add.
18884         * lib/getpass.c: Include getpass.h first.
18885
18886 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
18887
18888         * lib/xalloc-die.c: New file.
18889         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
18890         All uses removed.
18891         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
18892         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
18893         xalloc-die.c.
18894         (_, N_, xalloc_die): Move to xalloc-die.c.
18895         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
18896         so that we needn't mess with xalloc_msg_memory_exhausted.
18897
18898         * lib/sha1.h: Renamed from sha.h.
18899         (SHA1_H): Renamed from _SHA_H.
18900         (sha1_ctx): Renamed from sha_ctx.
18901         (sha1_init_ctx): Renamed from sha_init_ctx.
18902         (sha1_process_block): Renamed from sha_process_block.
18903         (sha1_process_bytes): Renamed from sha_process_bytes.
18904         (sha1_finish_ctx): Renamed from sha_finish_ctx.
18905         (sha1_read_ctx): Renamed from sha_read_ctx.
18906         (sha1_stream): Renamed from sha_stream.
18907         (sha1_buffer): Renamed from sha_buffer.
18908         * lib/sha1.c: Likewise; renamed from sha.c.
18909         Do not include <sys/types.h>.
18910         Include <stddef.h> rather than <stdlib.h>.
18911
18912 2004-08-08  Bruno Haible  <bruno@clisp.org>
18913
18914         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
18915         FILESYSTEM_PREFIX_LEN.
18916         * lib/progreloc.c: Likewise.
18917         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
18918
18919 2004-08-06  Simon Josefsson  <jas@extundo.com>
18920
18921         * modules/progname (Depends-on): Don't depend on stdbool.
18922
18923 2004-08-06  Simon Josefsson  <jas@extundo.com>
18924
18925         * modules/getsubopt: New file.
18926         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18927         getsubopt.
18928
18929 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18930
18931         More merge from coreutils.
18932
18933         * m4/utimens.m4, m4/utimecmp.m4: New files.
18934         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
18935         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
18936         prereq.m4, sha.m4: Import changes from coreutils.
18937
18938 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18939
18940         More merge from coreutils.
18941         * modules/raise, modules/readtokens0, modules/utimens:
18942         * modules/utimecmp, module/xnanosleep: New files.
18943         * modules/strftime: Add lib/strftime.h.
18944         Change include from <time.h> to "strftime.h".
18945         * modules/yesno: Add lib/yesno.h.
18946         * modules/backupfile: Remove lib/addext.c.
18947         * modules/euidaccess: Add stat-macros.h.
18948         * modules/canonicalize, modules/euidaccess,
18949         modules/filemode, modules/lchown, modules/makepath,
18950         modules/rmdir, modules/stat: Likewise.
18951
18952 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18953
18954         Merge from tar.
18955         * lib/argp-help.c (make_hol, hol_append): Don't assume that
18956         SIZE_MAX is a valid preprocessor constant.
18957         (__argp_basename): Change from "#ifndef _LIBC"
18958         to "#ifndef __argp_short_program_name", so that
18959         we don't compile these functions for tar.
18960
18961         More merges from coreutils.
18962         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
18963         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
18964         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
18965         * lib/addext.c: Remove; no longer needed.
18966         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
18967         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
18968         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
18969         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
18970         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
18971         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
18972         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
18973         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
18974         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
18975         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
18976         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
18977         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
18978         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
18979         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
18980         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
18981         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
18982         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
18983         Import changes from coreutils.
18984
18985 2004-08-05  Simon Josefsson  <jas@extundo.com>
18986
18987         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
18988
18989 2004-08-05  Simon Josefsson  <jas@extundo.com>
18990
18991         * m4/getsubopt.m4: New file.
18992
18993 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18994
18995         Merge from coreutils.
18996
18997         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
18998         * m4/getcwd-path-max.m4: New files.
18999
19000         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
19001         FILESYSTEM_PREFIX_LEN ->
19002         FILE_SYSTEM_PREFIX_LEN.
19003         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
19004         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
19005         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
19006         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
19007
19008         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
19009         prerequisite modules now handle the DOS stuff.
19010         Don't check for unistd.h.
19011
19012 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19013
19014         Merge from coreutils.
19015
19016         * lib/.gdb-history: Remove; this doesn't belong here.
19017
19018         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
19019         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
19020         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
19021         * lib/getcwd.c: New files.
19022
19023         * lib/dirname.h: Include <stdbool.h>.
19024         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
19025         for consistency with POSIX terminology.  All uses changed.
19026         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
19027         (strip_trailing_slashes): Use bool for booleans.
19028         * lib/stripslash.c (strip_trailing_slashes): Likewise.
19029
19030         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
19031         sometimes returns a positive errno value even when it succeeds.
19032         (print_errno_message) [!LIBC]: Fall back on strerror if
19033         __strerror_r fails.
19034
19035         * lib/path-concat.c (mempcpy): Don't define if a system header defines
19036         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
19037         (longest_relative_suffix): New function.
19038         (path_concat): Use it.  Assume first argument is not NULL.
19039         Port to DOS.  Omit redundant separators.
19040         Report an error instead of returning NULL.
19041         Use mempcpy instead of memcpy.
19042         (xpath_concat): Remove: not declared or used.
19043
19044         * lib/same.h: Include <stdbool.h>
19045         (same_name): Return bool, not int.
19046         * lib/same.c (same_name): Likewise.
19047         (errno): Don't declare; we assume C89 or better now.
19048
19049         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
19050         if not already defined.
19051
19052         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
19053         * lib/dup-safer.c (errno): Likewise.
19054
19055 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19056
19057         Merge from coreutils.
19058         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
19059         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
19060         * modules/path-concat: Don't depend on strdup.
19061
19062 2004-08-03  Simon Josefsson  <jas@extundo.com>
19063
19064         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
19065         * lib/progname.h: Don't include stdbool.h.
19066
19067 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19068
19069         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
19070         * MODULES.html.sh (func_all_modules): Remove fatal.
19071
19072 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19073
19074         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
19075
19076 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19077
19078         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
19079         working.
19080
19081 2004-08-02  Simon Josefsson  <jas@extundo.com>
19082
19083         * lib/getsubopt.h: New file, with comments from Bruno Haible.
19084         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
19085         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
19086
19087 2004-08-01  Simon Josefsson  <jas@extundo.com>
19088
19089         * lib/xgetdomainname.c: Include stdlib.h, for free().
19090
19091 2004-07-19  Bruno Haible  <bruno@clisp.org>
19092
19093         * MODULES.html.sh (func_all_modules): Add dummy.
19094
19095 2004-07-16  Simon Josefsson  <jas@extundo.com>
19096
19097         * modules/dummy: New file.
19098
19099 2004-07-16  Simon Josefsson  <jas@extundo.com>
19100
19101         * lib/dummy.c: New file.
19102
19103 2004-07-16  Bruno Haible  <bruno@clisp.org>
19104
19105         * lib/backupfile.h: Add extern "C" for C++.
19106         * lib/closeout.h: Likewise.
19107         * lib/copy-file.h: Likewise.
19108         * lib/findprog.h: Likewise.
19109         * lib/full-write.h: Likewise.
19110         * lib/pathname.h: Likewise.
19111         * lib/progname.h: Likewise.
19112         * lib/stpcpy.h: Likewise.
19113         * lib/stpncpy.h: Likewise.
19114         * lib/strcase.h: Likewise.
19115         * lib/strstr.h: Likewise.
19116         * lib/xalloc.h: Likewise.
19117
19118         * lib/mbswidth.h: Add extern "C" for C++.
19119         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
19120
19121 2004-07-13  Robert Millan  <robertmh@gnu.org>
19122
19123         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
19124
19125 2004-07-09  Simon Josefsson  <jas@extundo.com>
19126
19127         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
19128         failed without this.)
19129
19130 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
19131
19132         * modules/chown (Files): Add lib/fchown-stub.c, since
19133         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
19134
19135 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
19136
19137         * lib/fchown-stub.c: New file.
19138
19139 2004-06-24  Jim Meyering  <jim@meyering.net>
19140
19141         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
19142
19143 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19144
19145         * modules/argz: Omit "#include".
19146
19147         * MODULES.html.sh (func_all_modules): Add calloc, to match
19148         2004-06-01 addition of calloc module.
19149
19150 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19151
19152         * m4/argz.m4: New file, which is autoupdated from libtool.
19153
19154 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19155
19156         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
19157         libtool.
19158
19159 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19160
19161         * config/srclist-update: Don't insist on "USA." before the
19162         close-comment, as libtool omits the period and puts the */ on a
19163         separate line.
19164         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
19165         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
19166
19167 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
19168
19169         * modules/argz: New file.
19170         * MODULES.html.sh (func_all_modules): Add argz.
19171
19172 2004-06-12  Jim Meyering  <jim@meyering.net>
19173         and  Paul Eggert  <eggert@cs.ucla.edu>
19174
19175         * modules/hash (Files): Add lib/xalloc.h.
19176         * modules/pipe (Depends-on): Add wait-process.
19177         * modules/stat (Depends-on): Add xalloc.
19178         * modules/userspec (Files): Add lib/userspec.h.
19179         * modules/xstrto
19180
19181         Upgrade from gettext-0.13.
19182         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
19183         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
19184         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
19185
19186 2004-06-10  Jim Meyering  <jim@meyering.net>
19187
19188         * lib/calloc.c: New file.
19189
19190 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
19191
19192         * lib/getdate.y (yylex): Allow space between sign and number.
19193         Problem reported by Dan Jacobson.
19194
19195 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
19196
19197         Merge from coreutils CVS.
19198
19199         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
19200         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
19201         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
19202         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
19203         xstrtol.m4: Fix copyright date and/or serial number.
19204
19205         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
19206         See if we need an fchown replacement.
19207         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
19208         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
19209         and use the replacement function if we detect either defect.
19210
19211         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
19212         gl_UTIMECMP.
19213
19214 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
19215         and  Jim Meyering  <jim@meyering.net>
19216
19217         Merge from coreutils CVS.
19218
19219         * lib/stat-macros.h: New file, with contents from file-type.h
19220         and coreutils' system.h.
19221         * lib/file-type.c: Include "stat-macros.h".
19222         * lib/file-type.h (file_type): Move all macro definitions to new file,
19223         stat-macros.h.
19224
19225         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
19226         Wrap old code with this conditional.
19227         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
19228         function that does not dereference symlinks.
19229         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
19230
19231         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
19232         dependency problems.
19233         (xreadlink): Accept new arg SIZE, for efficiency.
19234         All decls and uses changed.
19235         * lib/xreadlink.h: Include <stddef.h>, for size_t.
19236
19237         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
19238         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
19239
19240         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
19241         sysexits.h.
19242
19243 2004-06-01  Jim Meyering  <jim@meyering.net>
19244
19245         * m4/calloc.m4: New file.
19246
19247 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
19248
19249         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
19250         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
19251         Also, fix a typo in a diagnostic.
19252
19253 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
19254
19255         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
19256         or AC_FUNC_REALLOC.
19257
19258 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
19259
19260         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
19261         macros to be defined.
19262         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
19263         the allocator returns NULL because the requested size is zero.
19264
19265 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19266
19267         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
19268         var.  Add comment explaining why libc still defines it.  This
19269         merges the following patch from glibc:
19270         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
19271
19272 2004-05-20  Andreas Schwab  <schwab@suse.de>
19273
19274         * m4/free.m4: Replace free if it not known to work, not the other
19275         way round.
19276
19277 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
19278
19279         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
19280         present in glibc since revision 1.1 of this file.
19281         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
19282         obstack_alignment_mask, obstack_alloc, obstack_base,
19283         obstack_blank, obstack_blank_fast, obstack_chunk_size,
19284         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
19285         obstack_grow0, obstack_init, obstack_int_grow,
19286         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
19287         obstack_next_free, obstack_object_size, obstack_ptr_grow,
19288         obstack_ptr_grow_fast, obstack_room): Remove declarations of
19289         nonexistent functions.
19290
19291 2004-05-18  Karl Berry  <karl@gnu.org>
19292
19293         * config/srclist.txt: break link for vasnprintf.c.
19294
19295 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
19296
19297         Port obstack to the AS/400, where pointers are 16 bytes wide and
19298         you cannot cast an integer to a valid pointer.  This patch is
19299         currently waiting to be integrated into glibc; see
19300         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
19301
19302         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
19303         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
19304         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
19305         (struct obstack): temp member is now a union of a pointer and
19306         an integer, instead of an integer.  All integer uses changed.
19307         This does not affect the physical layout of struct obstack,
19308         except on hosts (like the AS/400) where the size or alignment of
19309         void * is greater than that of ptrdiff_t.
19310         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
19311         __STDC__)]: Store temporary in pointer member of union, not
19312         integer member.
19313         * lib/obstack.c: Include <stddef.h>, for offsetof.
19314         (struct fooalign): Remove; it doesn't need a name.
19315         (union fooround): Change double to long double, and add void *.
19316         (DEFAULT_ALIGNMENT): Use offsetof to compute.
19317         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
19318         not a macro.  Hence the values are always int; so remove all
19319         casts-to-int in uses.
19320
19321 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
19322
19323         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
19324         we can get this patch merged into glibc.
19325
19326 2004-05-17  Derek R. Price  <derek@ximbiot.com>
19327             Paul Eggert  <eggert@cs.ucla.edu>
19328
19329         * m4/argp: Depend on alloca.
19330
19331 2004-05-17  Derek R. Price  <derek@ximbiot.com>
19332             Paul Eggert  <eggert@cs.ucla.edu>
19333
19334         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
19335         freecoding.
19336
19337 2004-05-17  Bruno Haible  <bruno@clisp.org>
19338
19339         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
19340         precision that consists of a '.' followed by an empty digit string.
19341         Patch by Tor Lillqvist <tml@iki.fi>.
19342
19343 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
19344
19345         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
19346         for backward compatibility with older code.  We need our own
19347         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
19348         it under some other name, and our alloca.h will define it.
19349
19350 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
19351             Derek Price  <derek@ximbiot.com>
19352
19353         * lib/alloca.c: Include <alloca.h>, to get our interface.
19354         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
19355         include <alloca.h> first.  Use C89 prototype for alloca; this
19356         requires including <stddef.h> for size_t.  Use extern "C" if C++.
19357         Use #elif for simplicity, since we can assume C89 now.
19358         Don't try to source the system alloca.h since it will not be found
19359         and to prevent recursively including its replacement.
19360         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
19361         * lib/regex.c: Likewise.
19362
19363 2004-05-16  Derek Price  <derek@ximbiot.com>
19364             Paul Eggert  <eggert@cs.ucla.edu>
19365
19366         getline cleanup.  This changes the getndelim2 API: both order of
19367         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
19368         no delimiter).
19369
19370         * lib/getline.c: Don't include stddef.h or stdio.h, since our
19371         interface does that.
19372         (getline): Always use getdelim, so that we don't have two
19373         copies of this code.
19374         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
19375         if available.
19376         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
19377         (GETNDELIM2_MAXIMUM): New macro.
19378         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
19379         instead of the old practice of delim2==0.  All callers changed.
19380         Return -1 on overflow, instead of returning junk.
19381         Do not set *linesize unless allocation succeeds.
19382         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
19383         that we include sys/types.h.
19384         * lib/getnline.h: Likewise.
19385         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
19386         (getndelim2): Reorder arguments.
19387         * lib/getnline.c (getnline, getndelim):
19388         Don't discard the NMAX argument.
19389         (getnline): Invoke getndelim, to avoid code duplication.
19390         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
19391         of (size_t) -1 by callers of the getnline family.
19392
19393 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19394
19395         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
19396         Check for gettimeofday.
19397         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
19398         Check for settimeofday, stime.
19399
19400 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19401
19402         * lib/nanosleep.c (suspended): Change its type from int to
19403         sig_atomic_t volatile.
19404         (first_call): Make it private to rpl_nanosleep, and have it
19405         be zero initially as that's a bit faster.
19406         (my_usleep): Round up fractional times instead of truncating them,
19407         as this is the usual meaning for 'sleep'.
19408
19409         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
19410         doesn't work.
19411         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
19412         (ENOSYS): Define if not defined.
19413         (settime): Fall back on stime if it exists and settimeofday fails.
19414         But don't bother with fallbacks if a method fails with errno == EPERM.
19415
19416 2004-05-11  Jim Meyering  <jim@meyering.net>
19417
19418         Prior to this change, the save_cwd caller required read access to the
19419         current directory on most systems (ones with the fchdir function).
19420
19421         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
19422         fails, try write-only, and finally, resort to using xgetcwd.
19423
19424 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
19425
19426         * lib/obstack.c, obstack.h: Import changes from libc.
19427
19428 2004-04-28  Bruno Haible  <bruno@clisp.org>
19429
19430         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
19431         also implicitly appends .exe to executables.
19432         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
19433         accepts Windows pathnames.
19434         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
19435         Treat Cygwin like Windows, since it now accepts Windows pathnames.
19436         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
19437         Treat Cygwin like Windows, since it now accepts Windows pathnames.
19438         Reported by Derek Robert Price <derek@ximbiot.com>.
19439
19440 2004-04-21  Karl Berry  <karl@gnu.org>
19441
19442         * config/srclist.txt (localcharset.c): break sync.
19443
19444 2004-04-20  Paul Eggert  <eggert@twinsun.com>
19445
19446         * m4/host-os.m4: Add a copyright notice.
19447
19448 2004-04-20  Jim Meyering  <jim@meyering.net>
19449
19450         Change UTILS_ to gl_ in AC_DEFINE'd names.
19451         Change utils_- and jm_-prefixed variables, too.
19452         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
19453         UTILS_FUNC_MKDIR_TRAILING_SLASH.
19454         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
19455
19456         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
19457         Don't emit trailing blanks.
19458         Also rename jm_-prefixed variables to have gl_ prefix.
19459
19460         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
19461         Also rename jm_-prefixed variables to have gl_ prefix.
19462
19463         * m4/jm-macros.m4: Reflect the renamings.
19464         * m4/prereq.m4: Likewise.
19465
19466 2004-04-20  Jim Meyering  <jim@meyering.net>
19467
19468         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
19469         memory.
19470
19471 2004-04-20  Jim Meyering  <jim@meyering.net>
19472             Bruno Haible  <bruno@clisp.org>
19473
19474         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
19475         memory when realloc fails.
19476
19477 2004-04-19  Jim Meyering  <jim@meyering.net>
19478
19479         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
19480         now that readutmp.c may call `free (0)'.
19481
19482 2004-04-19  Bruno Haible  <bruno@clisp.org>
19483
19484         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
19485         * m4/inttypes_h.m4: Likewise.
19486         * m4/stdint_h.m4: Likewise.
19487         * m4/intmax_t.m4: Likewise.
19488         * m4/uintmax_t.m4: Likewise.
19489
19490 2004-04-18  Jim Meyering  <jim@meyering.net>
19491
19492         * m4/prereq.m4: Don't forbid jm_ prefix.
19493
19494         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
19495         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
19496         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
19497         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
19498         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
19499         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
19500         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
19501         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
19502         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
19503         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
19504         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
19505         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
19506         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
19507         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
19508         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
19509         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
19510         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
19511         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
19512         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
19513
19514 2004-04-18  Jim Meyering  <jim@meyering.net>
19515
19516         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
19517         failure, don't leak memory and do call END_UTMP_ENT.
19518
19519 2004-04-16  Jim Meyering  <jim@meyering.net>
19520
19521         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
19522         coreutils' stat program.
19523         (gl_PREREQ): Don't require jm_PREREQ_STAT.
19524
19525 2004-04-11  Paul Eggert  <eggert@twinsun.com>
19526
19527         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
19528         C89.
19529         (CHAR_BIT): Remove, since we assume C89.
19530         Include <stdint.h> if available, as per current Autoconf CVS advice.
19531
19532 2004-03-31  Jim Meyering  <jim@meyering.net>
19533
19534         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
19535         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
19536         * m4/xalloc.m4: Likewise.
19537
19538 2004-03-30  Paul Eggert  <eggert@twinsun.com>
19539
19540         Merge from coreutils.
19541
19542         * m4/inttostr.m4: New file.
19543         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
19544         Require AM_STDBOOL_H and gl_TIMESPEC instead.
19545         Require gl_CLOCK_TIME.
19546         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
19547
19548 2004-03-30  Paul Eggert  <eggert@twinsun.com>
19549
19550         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
19551         not bool, to be more consistent with Unix conventions.
19552         Suggested by Bruno Haible.
19553
19554         Merge from coreutils.
19555
19556         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
19557         * lib/umaxtostr.c: New files.
19558
19559         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
19560         the usual <time.h> dance.
19561         (get_date): Change signature to support fractional time stamps.
19562         All callers changed.
19563         * lib/getdate.y: Include "getdate.h" first, as we can now
19564         assume C89 and don't need to worry about 'const'.
19565         Similarly, include "unlocked-io.h" near start, not in middle.
19566         Include <limits.h>.
19567         (textint.value): Use long int rather than int.
19568         (textint.digits): Use size_t rather than int.
19569         (BILLION, LOG10_BILLION): New constants.
19570         (parser_control): New member rel_ns.  Members day_ordinal,
19571         time_zone, month, day, hour, minutes, rel_year, rel_month,
19572         rel_day, rel_hour, rel_minutes, rel_seconds
19573         are now long int, not int.  Member seconds is now struct timespec,
19574         not int.  New member timespec_seen.  Members dates_seen, days_seen,
19575         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
19576         not int.
19577         (%union.intval): Now long int, not int.
19578         New member timespec.
19579         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
19580         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
19581         (spec): Now is a timespec or an item list.
19582         (timespec, items): New nonterminals.
19583         (time, rel, relunit, number, get_date):
19584         Add support for fractional seconds.
19585         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
19586         (gmtime, localtime, mktime): Remove decls; not needed with C89.
19587         (to_hour): First arg is now long int, not int.
19588         (to_year): Returns long int, not int.
19589         Don't treat year -70 like 70.
19590         (tm_diff): Returns long int, not int.
19591         (lookup_word): Use bool instead of int when appropriate.
19592         (yylex): Use size_t for count, not int.
19593         Detect overflow when parsing large integer constants.
19594         Add support for fractions.
19595         (get_date): Make pointers 'const' if possible.
19596         Use more-portable code to detect integer overflow.
19597         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
19598         Don't use ctime; it's not reliable if the year has >4 digits.
19599
19600         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
19601         This is for compatibility with BSD.
19602
19603         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
19604         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
19605         From coreutils' system.h.
19606
19607         * lib/userspec.c: Don't include "posixver.h".
19608         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
19609         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
19610         compatible extension.  Simplify code by removing a boolean int
19611         that was always nonzero if a string was nonnull.
19612
19613 2004-03-30  Jim Meyering  <jim@meyering.net>
19614
19615         Merge from coreutils.
19616
19617         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
19618         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
19619         on some systems one must include <grp.h> before it.
19620         Reported by Christian Krackowizer.
19621
19622 2004-03-30  Jim Meyering  <jim@meyering.net>
19623
19624         Merge from coreutils.
19625
19626         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
19627
19628         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
19629         an empty input stream.
19630
19631         * lib/readtokens.c: Include <stdbool.h>.
19632         (readtoken): Use `size_t' rather than int/long.
19633         All callers adjusted.
19634         Use `bool' rather than `int' where appropriate.
19635         Use memset rather than an explicit loop.
19636         Use x2nrealloc rather than xrealloc.
19637         Allow the use of `\0' as a delimiter.
19638         (readtokens): Likewise.
19639         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
19640
19641 2004-03-30  Jim Meyering  <jim@meyering.net>
19642
19643         * m4/realloc.m4: Remove file, since now it does no more than
19644         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
19645         the `configure.ac' section of module/realloc.
19646         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
19647
19648 2004-03-30  Bruno Haible  <bruno@clisp.org>
19649
19650         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
19651         nonnull.
19652
19653 2004-03-29  Paul Eggert  <eggert@twinsun.com>
19654
19655         Merge changes to getloadavg.c from coreutils and Emacs.
19656
19657         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
19658         Define to an expression, not to the empty string.
19659         Include cloexec.h and xalloc.h.
19660         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
19661         Use set_cloexec_flag rather than rolling our own.
19662         * lib/cloexec.c, lib/cloexec.h: New files.
19663
19664 2004-03-29  Paul Eggert  <eggert@twinsun.com>
19665
19666         * m4/cloexec.m4: New file.
19667
19668 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19669
19670         * lib/getopt.h: Sync with libc CVS.
19671
19672 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19673             Bruno Haible  <bruno@clisp.org>
19674
19675         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
19676         mbswidth.
19677
19678 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19679             Bruno Haible  <bruno@clisp.org>
19680
19681         * lib/mbswidth.h: Include <wchar.h> only if
19682         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
19683         <wchar.h>.
19684         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
19685
19686 2004-03-09  Paul Eggert  <eggert@twinsun.com>
19687
19688         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
19689         Sync with libc CVS.
19690         * lib/getopt_int.h: New file, also synced from libc.
19691
19692 2004-03-09  Paul Eggert  <eggert@twinsun.com>
19693
19694         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
19695         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
19696         Bring back getopt.c, getopt.h, getopt1.c.
19697
19698 2004-03-07  Paul Eggert  <eggert@twinsun.com>
19699
19700         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
19701         All uses changed.  Check for sa_sigaction member; this fixes
19702         a bug first reported by Jason Andrade in
19703         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
19704
19705 2004-03-07  Paul Eggert  <eggert@twinsun.com>
19706
19707         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
19708         '#if' expressions.  Unlike the code it replaces, it does not
19709         depend on (defined _SC_PAGESIZE).  However, it does depend on
19710         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
19711         first reported by Jason Andrade in
19712         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
19713
19714 2004-02-25  Simon Josefsson  <jas@extundo.com>
19715
19716         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
19717
19718 2004-02-25  Simon Josefsson  <jas@extundo.com>
19719
19720         * lib/strdup.h: New file.
19721         * lib/strdup.c: Include it.
19722         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
19723         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
19724
19725 2004-02-23  Karl Berry  <karl@gnu.org>
19726
19727         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
19728         (from fencepost.gnu.org:/gd/gnuorg).
19729
19730 2004-02-23  Karl Berry  <karl@gnu.org>
19731
19732         * config/srclistvars.sh (GNUORG) [karl]: redefine.
19733         * config/srclist.txt: add maintain/standards documents.
19734
19735 2004-02-18  Bruno Haible  <bruno@clisp.org>
19736
19737         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
19738         Reported by Derek Robert Price <derek@ximbiot.com>.
19739
19740 2004-02-16  Karl Berry  <karl@gnu.org>
19741
19742         * config/mkinstalldirs, install-sh: update from automake.
19743
19744 2004-02-06  Karl Berry  <karl@gnu.org>
19745
19746         * m4/po.m4: update from gettext 0.14.1.
19747
19748 2004-02-06  Karl Berry  <karl@gnu.org>
19749
19750         * lib/config.charset: update from gettext 0.14.1.
19751
19752 2004-02-05  Paul Eggert  <eggert@twinsun.com>
19753
19754         Add comments and code, prompted by suggestions from Bruno Haible
19755         for sh-quote.
19756         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
19757         describing the enum quoting_style values.
19758         * lib/quotearg.c (quotearg_alloc): New function.
19759         (quotearg_buffer_restyled): Treat lone { and } as special.
19760         Treat = as special.  Work around bug with older shells
19761         that "see" a '\' that is really the 2nd byte of a multibyte char.
19762         Quote empty string with shell_quoting_style.
19763
19764 2004-02-03  Bruno Haible  <bruno@clisp.org>
19765
19766         * m4/pipe.m4: New file, from GNU gettext.
19767
19768 2004-02-03  Bruno Haible  <bruno@clisp.org>
19769
19770         * lib/pipe.h: New file, from GNU gettext.
19771         * lib/pipe.c: New file, from GNU gettext.
19772
19773 2004-01-27  Bruno Haible  <bruno@clisp.org>
19774
19775         * m4/execute.m4: New file, from GNU gettext.
19776
19777 2004-01-27  Bruno Haible  <bruno@clisp.org>
19778
19779         * lib/execute.h: New file, from GNU gettext.
19780         * lib/execute.c: New file, from GNU gettext.
19781         * lib/w32spawn.h: New file, from GNU gettext.
19782
19783 2004-01-24  Paul Eggert  <eggert@twinsun.com>
19784
19785         Merge from diffutils.
19786
19787         * lib/file-type.c (file_type): Add typed memory objects.
19788         * lib/file-type.h (S_TYPEISTMO): New macro.
19789
19790         * lib/c-stack.h (c_stack_action): Remove argv argument.
19791         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
19792         (die): Don't calculate message unless segv_action returns.
19793         (get_stack_location, min_address_from_argv, max_address_from_argv,
19794         volatile stack_base, volatile_stack_size): Remove.
19795         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
19796         that every segmentation violation is a stack overflow.  (Ouch!)
19797         See Debian bug 136249 (still outstanding) for more info about why
19798         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
19799
19800 2004-01-24  Paul Eggert  <eggert@twinsun.com>
19801
19802         Exit-status fix from coreutils.
19803
19804         Use exit_failure consistently in place of EXIT_FAILURE,
19805         so that program exit statuses are consistent on failure.
19806
19807         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
19808         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
19809         * lib/argmatch.h: Comment fix to match the above.
19810         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
19811         Now a macro referring to exit_failure, instead of a separate
19812         variable.  Include "exitfail.h" to get it.
19813         * lib/xstrtol.h: Include "exitfail.h".
19814         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
19815
19816         * lib/long-options.c (parse_long_options): Use prototype
19817         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
19818         for clarity.
19819
19820 2004-01-21  Jim Meyering  <jim@meyering.net>
19821
19822         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
19823         so as not to conflict with a different-sized __mktime_internal
19824         function in GNU libc.
19825         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
19826         Problem building statically-linked `ls' reported by Michael Brunnbauer.
19827
19828 2004-01-20  Karl Berry  <karl@gnu.org>
19829
19830         * config/config.guess: update from config.
19831
19832         * config/srclistvars.sh: GNUWWWLICENSES for karl.
19833
19834 2004-01-20  Bruno Haible  <bruno@clisp.org>
19835
19836         Safer stack allocation.
19837         * lib/setenv.c: Include allocsa.h.
19838         (alloca): Remove fallback definition.
19839         (freea): Remove macro.
19840         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
19841         instead of freea.
19842
19843 2004-01-20  Bruno Haible  <bruno@clisp.org>
19844
19845         * m4/eealloc.m4: New file, from GNU gettext.
19846
19847 2004-01-20  Bruno Haible  <bruno@clisp.org>
19848
19849         * m4/allocsa.m4: New file, from GNU gettext.
19850
19851 2004-01-20  Bruno Haible  <bruno@clisp.org>
19852
19853         * lib/xallocsa.h: New file, from GNU gettext.
19854         * lib/xallocsa.c: New file, from GNU gettext.
19855
19856 2004-01-20  Bruno Haible  <bruno@clisp.org>
19857
19858         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
19859
19860 2004-01-20  Bruno Haible  <bruno@clisp.org>
19861
19862         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
19863         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
19864         specially.
19865
19866 2004-01-20  Bruno Haible  <bruno@clisp.org>
19867
19868         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
19869         patch.
19870
19871 2004-01-20  Bruno Haible  <bruno@clisp.org>
19872
19873         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
19874
19875 2004-01-20  Bruno Haible  <bruno@clisp.org>
19876
19877         * lib/eealloc.h: New file.
19878
19879 2004-01-20  Bruno Haible  <bruno@clisp.org>
19880
19881         * lib/binary-io.h: Avoid warnings on Cygwin.
19882
19883 2004-01-20  Bruno Haible  <bruno@clisp.org>
19884
19885         * lib/allocsa.h: New file, from GNU gettext.
19886         * lib/allocsa.c: New file, from GNU gettext.
19887
19888 2004-01-18  Karl Berry  <karl@gnu.org>
19889
19890         * doc/gpl.texi, doc/lgpl.texi: new files.
19891
19892 2004-01-18  Karl Berry  <karl@gnu.org>
19893
19894         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
19895         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
19896
19897 2004-01-15  Paul Eggert  <eggert@twinsun.com>
19898
19899         Merge from coreutils.
19900
19901         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
19902         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
19903         (gl_DEFAULT_POSIX2_VERSION): Move
19904         the documentation from 'configure' into 'config.hin',
19905         so that 'configure --help' isn't burdened by it and
19906         we don't have to worry about its formatting there.
19907         Reword the documentation so that it's more succinct
19908         and can be run together into a single paragraph.
19909         * m4/same.m4 (gl_SAME): Check for pathconf.
19910
19911 2004-01-15  Paul Eggert  <eggert@twinsun.com>
19912
19913         Merge from coreutils.
19914
19915         * lib/posixver.c: Include posixver.h.
19916
19917         * lib/same.c: Include <stdbool.h>, <limits.h>.
19918         (_POSIX_NAME_MAX): Define if not defined.
19919         (MIN): New macro.
19920         (same_name): If file names are silently truncated, report
19921         that the file names are the same if they are the same after
19922         the silent truncation.
19923
19924         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
19925         conversion function.
19926         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
19927         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
19928         longer needed.
19929
19930 2004-01-15  Jim Meyering  <jim@meyering.net>
19931
19932         Merge from coreutils.
19933
19934         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
19935         if no library is required.
19936         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
19937         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
19938         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
19939         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
19940         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
19941         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
19942         value, $ac_cv_search_crypt, if it's "none required".
19943         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
19944         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
19945         not gl_FUNC_GETLOADAVG.
19946         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
19947         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
19948
19949 2004-01-15  Jim Meyering  <jim@meyering.net>
19950
19951         Merge from coreutils.
19952
19953         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
19954         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
19955         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
19956
19957         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
19958         optional configure-time default.
19959
19960         * lib/version-etc.c (version_etc_copyright): Update copyright date.
19961
19962         * lib/xreadlink.c (xreadlink): Correct outdated comment.
19963
19964 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
19965
19966         Merge from coreutils.
19967
19968         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
19969         value, $ac_cv_search_nanosleep, if it's "none required".
19970
19971 2004-01-14  Paul Eggert  <eggert@twinsun.com>
19972
19973         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
19974         with like-named macro in fnmatch.c.
19975         (EXT): Use an internal constant instead.
19976
19977         Merge fnmatch patches from glibc.
19978         * lib/fnmatch.c (mbsinit): Remove define.
19979         Add libc_hidden_ver (__fnmatch, fnmatch).
19980         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
19981         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
19982
19983 2004-01-14  Karl Berry  <karl@gnu.org>
19984
19985         * config/install-sh: update from automake.
19986
19987 2004-01-13  Karl Berry  <karl@gnu.org>
19988
19989         * config/install-sh: update from automake.
19990
19991 2004-01-09  Karl Berry  <karl@gnu.org>
19992
19993         * config/install-sh: update from automake.
19994
19995 2004-01-05  Karl Berry  <karl@gnu.org>
19996
19997         * config/config.{sub,guess}: update from config.
19998
19999 2003-12-31  Karl Berry  <karl@gnu.org>
20000
20001         * config/depcomp: update from automake.
20002
20003 2003-12-14  Karl Berry  <karl@gnu.org>
20004
20005         * lib/config.charset: update from gettext-runtime.
20006
20007 2003-12-03  Paul Eggert  <eggert@twinsun.com>
20008
20009         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
20010         Bug reported by Alfred M. Szmidt.
20011
20012 2003-12-03  Bruno Haible  <bruno@clisp.org>
20013
20014         * m4/gettext.m4: Upgrade from gettext-0.13.
20015         * m4/po.m4: Upgrade from gettext-0.13.
20016         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
20017         * m4/intmax.m4: New file, from gettext-0.13.
20018         * m4/printf-posix.m4: New file, from gettext-0.13.
20019
20020 2003-11-29  Karl Berry  <karl@gnu.org>
20021
20022         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
20023
20024 2003-11-25  Paul Eggert  <eggert@twinsun.com>
20025             Bruno Haible  <bruno@clisp.org>
20026
20027         * lib/printf-parse.h: Don't include sys/types.h.
20028         (ARG_NONE): New macro.
20029         (char_directive): Change type of *arg_index fields to size_t.
20030         * lib/printf-parse.c: Don't include sys/types.h.
20031         (SSIZE_MAX): Remove macro.
20032         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
20033         Remove unnecessary overflow check.
20034         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
20035         fields.
20036
20037 2003-11-25  Bruno Haible  <bruno@clisp.org>
20038
20039         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
20040
20041 2003-11-25  Bruno Haible  <bruno@clisp.org>
20042
20043         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
20044         gt_TYPE_SSIZE_T.
20045
20046 2003-11-24  Paul Eggert  <eggert@twinsun.com>
20047
20048         * modules/alloca: Remove dependency on xalloc.
20049
20050 2003-11-24  Paul Eggert  <eggert@twinsun.com>
20051
20052         * lib/alloca.c: Remove dependency on xalloc module.
20053         (xalloc_die): Remove.
20054         (memory_full) [!defined emacs]: New macro.
20055         [!defined emacs]: Don't include xalloc.h.
20056         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
20057         address arithmetic overflows.  Change datatypes a bit to avoid
20058         unnecessary casts.
20059
20060 2003-11-22  Jim Meyering  <jim@meyering.net>
20061
20062         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
20063         s/size/size_t/.
20064
20065 2003-11-21  Karl Berry  <karl@gnu.org>
20066
20067         * config/config.{sub,guess}: update from config.
20068
20069 2003-11-18  Karl Berry  <karl@gnu.org>
20070
20071         * config/config.{sub,guess}: update from config.
20072
20073         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
20074
20075 2003-11-17  Paul Eggert  <eggert@twinsun.com>
20076
20077         * README: Mention that S+T cannot overflow if S is the size of
20078         an existing object and T is sufficiently small.
20079
20080 2003-11-17  Jim Meyering  <jim@meyering.net>
20081
20082         On systems without utime and without a utimes function capable of
20083         dealing with a NULL struct utimbuf* argument, this utime replacement
20084         could -- in unusual circumstances -- leak a file descriptor.
20085         * lib/utime.c: Include <unistd.h> and <errno.h>.
20086         (utime_null): Be sure to close `fd' and to preserve errno.
20087         Reported by Geoff Collyer via Arnold Robbins.
20088
20089 2003-11-17  Bruno Haible  <bruno@clisp.org>
20090
20091         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
20092         (Depends-on): Add xsize.
20093
20094 2003-11-17  Bruno Haible  <bruno@clisp.org>
20095
20096         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
20097
20098 2003-11-17  Bruno Haible  <bruno@clisp.org>
20099
20100         * lib/vasnprintf.c (alloca): Remove fallback definition.
20101         (freea): Remove definition.
20102         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
20103         Reported by Paul Eggert.
20104
20105 2003-11-16  Paul Eggert  <eggert@twinsun.com>
20106             Bruno Haible  <bruno@clisp.org>
20107
20108         Protect against address arithmetic overflow.
20109         * lib/printf-args.h: Include stddef.h.
20110         (arguments): Change type of field 'count' to size_t.
20111         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
20112         'unsigned int' where appropriate.
20113         * lib/printf-parse.h: Include sys/types.h.
20114         (char_directive): Change type of *arg_index fields to ssize_t.
20115         (char_directives): Change type of fields 'count', max_*_length to
20116         size_t.
20117         * lib/printf-parse.c: Include sys/types.h and xsize.h.
20118         (SSIZE_MAX): Define fallback value.
20119         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
20120         instead of 'int' where appropriate. Check a_allocated, d_allocated
20121         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
20122         * lib/vasnprintf.c: Include xsize.h.
20123         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
20124         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
20125         overflow. Avoid wraparound when converting a width or precision from
20126         decimal to binary.
20127
20128 2003-11-16  Bruno Haible  <bruno@clisp.org>
20129
20130         Update from GNU gettext.
20131         * lib/printf-parse.c: Generalize to it can be compiled for wide
20132         strings.
20133         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
20134         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
20135         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
20136         SNPRINTF): New macros.
20137         Don't include <alloca.h> if the file is used inside libintl.
20138         (local_wcslen): New function, for Solaris 2.5.1.
20139         (VASNPRINTF): Use it instead of wcslen.
20140
20141 2003-11-16  Bruno Haible  <bruno@clisp.org>
20142
20143         * lib/xsize.h (xmax): New function.
20144         (xsum, xsum3, xsum4): Declare as "pure" functions.
20145
20146 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20147
20148         * modules/xalloc (Files): Undo latest change, since xalloc.h
20149         no longer needs SIZE_MAX or PTRDIFF_MAX.
20150
20151 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20152
20153         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
20154         gl_PTRDIFF_MAX.
20155
20156 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20157
20158         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
20159         "return", to pacify some unknown compiler.  Problem reported
20160         by Joerg Schilling.
20161
20162 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20163
20164         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
20165         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
20166         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
20167         heuristic is just as accurate as far as we know, and it removes a
20168         dependency on size_max.m4 and ptrdiff_max.m4.
20169
20170 2003-11-11  Bruno Haible  <bruno@clisp.org>
20171
20172         * modules/xsize (Files): Add m4/size_max.m4.
20173         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
20174
20175 2003-11-11  Bruno Haible  <bruno@clisp.org>
20176
20177         * m4/size_max.m4: New file.
20178         * m4/ptrdiff_max.m4: New file.
20179         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
20180         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
20181         (gl_XALLOC): Invoke it.
20182
20183 2003-11-11  Bruno Haible  <bruno@clisp.org>
20184
20185         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
20186         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
20187         defined.
20188
20189 2003-11-10  Paul Eggert  <eggert@twinsun.com>
20190
20191         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
20192         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
20193         rejected some allocations of exactly SIZE_MAX - 2 bytes.
20194         From Bruno Haible.
20195         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
20196         not (size_t) -1, since it's defined here.
20197
20198 2003-11-09  Karl Berry  <karl@gnu.org>
20199
20200         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
20201
20202 2003-11-06  Paul Eggert  <eggert@twinsun.com>
20203
20204         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
20205         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
20206         Reject sizes of exactly SIZE_MAX bytes.
20207         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
20208         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
20209
20210 2003-11-05  Bruno Haible  <bruno@clisp.org>
20211
20212         * lib/xsize.h: Include limits.h, to avoid a possible collision with
20213         SIZE_MAX defined in <limits.h> on Solaris.
20214
20215 2003-11-04  Jim Meyering  <jim@meyering.net>
20216
20217         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
20218         variable names, rather than @VAR@.
20219         * modules/poll: Likewise.
20220
20221 2003-11-04  Bruno Haible  <bruno@clisp.org>
20222
20223         * modules/xsize: New file.
20224         * modules/linebreak: Depend on xsize.
20225         * MODULES.html.sh (func_all_modules): Add xsize.
20226
20227 2003-11-04  Bruno Haible  <bruno@clisp.org>
20228
20229         * m4/xsize.m4: New file.
20230
20231 2003-11-04  Bruno Haible  <bruno@clisp.org>
20232
20233         * lib/xsize.h: New file.
20234         * lib/linebreak.c: Include xsize.h.
20235         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
20236         argument for overflow.
20237         Suggested by Paul Eggert.
20238
20239 2003-11-03  Karl Berry  <karl@gnu.org>
20240
20241         * config/config.{guess,sub}: update from config.
20242
20243 2003-11-03  Jim Meyering  <jim@meyering.net>
20244
20245         * modules/userspec (lib_SOURCES): Add userspec.h.
20246         (Include): Add "userspec.h".
20247         Improve description.
20248
20249 2003-11-03  Jim Meyering  <jim@meyering.net>
20250
20251         * lib/userspec.c: Include "userspec.h".
20252         * lib/userspec.h: New file.
20253
20254 2003-11-03  Bruno Haible  <bruno@clisp.org>
20255
20256         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
20257
20258 2003-11-03  Bruno Haible  <bruno@clisp.org>
20259
20260         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
20261         available, to avoid (extremely rare) race condition.
20262         Suggested by Paul Eggert.
20263
20264 2003-11-02  Karl Berry  <karl@gnu.org>
20265
20266         * config/srclist.txt (vasprintf.c): sync broken, sigh.
20267
20268 2003-10-31  Paul Eggert  <eggert@twinsun.com>
20269
20270         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
20271         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
20272         (read_filesystem_list): Set and use me_type_malloced.
20273         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
20274         whatever the type happens to be), for brevity and consistency.
20275         Check for size calculation overflow on Alphas running OSF/1.
20276
20277 2003-10-31  Jim Meyering  <jim@meyering.net>
20278
20279         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
20280
20281         * lib/linebuffer.c: Include <string.h> for declaration of memset.
20282
20283 2003-10-30  Paul Eggert  <eggert@twinsun.com>
20284             Bruno Haible  <bruno@clisp.org>
20285
20286         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
20287         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
20288
20289 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
20290
20291         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
20292         netbsd*-gnu*.  Suggested by Robert Millan.
20293
20294 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20295
20296         * modules/group-member: Depend on stdbool.
20297
20298 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20299
20300         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
20301
20302 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20303
20304         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
20305         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
20306         after the 'gnu' in these cases.  This fixes some bugs in the
20307         previous change, and is based on suggestions by Robert Millan.
20308
20309 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20310
20311         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
20312         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
20313         no longer needed.
20314         * lib/quotearg.c (quotearg_n_options): Use it.
20315         * lib/group-member.c: Include <stdbool.h>.
20316         (free_group_info): Arg is now const *; don't free arg.
20317         (get_group_info): Now returns bool and accepts struct group_info *,
20318         rather than returning a malloc'ed struct group_info *.
20319         All uses changed.  Check for overflow in internal size calculation.
20320
20321         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
20322         rather than xmalloc/xrealloc.
20323         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
20324         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
20325         conformance bug: the old code used a pointer after freeing the
20326         storage that it addressed.
20327         * lib/hash.c (hash_initialize): Simplify the code by using
20328         xalloc_oversized rather than doing it by hand.
20329         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
20330         the buffer preserved.  Use free and xmalloc instead.
20331         * lib/quotearg.c (quotearg_n_options): Likewise.
20332         Use a simpler test for size overflow.  Don't use xalloc_oversized
20333         because unsigned int might be wider than size_t (!); this suggests
20334         that we should switch from unsigned int to size_t for slot numbers.
20335
20336 2003-10-28  Paul Eggert  <eggert@twinsun.com>
20337
20338         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
20339         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
20340         NetBSD kernels.  Requested by Richard Stallman.
20341
20342 2003-10-27  Paul Eggert  <eggert@twinsun.com>
20343
20344         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
20345         to allocate the returned structure.  Do not allocate a subarray,
20346         as x2nrealloc will do that.
20347         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
20348         instead of xnrealloc.
20349         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
20350
20351 2003-10-27  Bruno Haible  <bruno@clisp.org>
20352
20353         * lib/stdbool_.h: Better support for BeOS.
20354
20355 2003-10-26  Paul Eggert  <eggert@twinsun.com>
20356
20357         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
20358         now uses inline.
20359
20360 2003-10-26  Paul Eggert  <eggert@twinsun.com>
20361
20362         * lib/xalloc.h (xalloc_oversized): New static inline function, for
20363         callers that want to do their own size-overflow checking.  Include
20364         <stdbool.h>, since xalloc_oversized returns bool.
20365         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
20366         to use xalloc_oversized.
20367
20368         Add two functions x2realloc, x2nrealloc, for programs that grow
20369         arrays dynamically by doubling their sizes.
20370         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
20371         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
20372         New functions.
20373
20374         Port to C99 semantics for 'inline' of external functions.
20375         Bug reported by Bruno Haible.
20376         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
20377         with the old contents of xnmalloc.
20378         (xnmalloc, xmalloc): Use it.
20379         (xnrealloc_inline): New static inline function,
20380         with the old contents of xnrealloc.
20381         (xnrealloc, xrealloc): Use it.
20382
20383         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
20384         that.
20385
20386 2003-10-26  Karl Berry  <karl@gnu.org>
20387
20388         * config/srclist.txt (COPYING.DOC): no longer available from
20389         /gd/gnuorg; don't know where the ultimate source is.
20390
20391 2003-10-25  Paul Eggert  <eggert@twinsun.com>
20392
20393         Fix several address-calculation bugs in the hash modules,
20394         plus some minor code cleanup.
20395
20396         * lib/hash.h: Include <stdbool.h>, for bool.
20397         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
20398         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
20399         hash_get_n_entries, hash_get_max_bucket_length,
20400         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
20401         hash_rehash): Use size_t rather than unsigned.
20402         * lib/hash.c (struct hash_table, hash_get_n_buckets,
20403         hash_get_n_buckets_used, hash_get_n_entries,
20404         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
20405         hash_get_entries, hash_do_for_each, hash_string, is_prime,
20406         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
20407         Likewise.
20408         (SIZE_MAX): Define if not defined.
20409         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
20410         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
20411         hash_print):
20412         Use const * when possible.
20413         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
20414         (check_tuning): Fix bug: if tuning parameters were very close to
20415         0 or 1, rounding errors could have caused subscript violations.
20416         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
20417         (hash_initialize): Add 'fail:' label
20418         to free table and return NULL, and use it to simplify code.
20419         Use calloc rather than clearing the storage ourself.
20420         (hash_initialize, hash_rehash): Check for arithmetic overflow in
20421         buffer size calculations.
20422         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
20423         Include <stddef.h>, for size_t.
20424         * lib/hash-pjw.c (hash_pjw): Likewise.
20425         Switch to method described by Bruno Haible.
20426         Include <limits.h>, for CHAR_BIT.
20427         (SIZE_BITS): New macro.
20428
20429 2003-10-23  Paul Eggert  <eggert@twinsun.com>
20430
20431         * m4/getline.m4 (AM_FUNC_GETLINE):
20432         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
20433         hosts.  Problem reported by Derek Robert Price in
20434         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
20435         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
20436         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
20437
20438 2003-10-21  Paul Eggert  <eggert@twinsun.com>
20439
20440         * lib/getndelim2.c (getndelim2): When size calculation overflows,
20441         ceiling the allocation at NMAX bytes rather than silently
20442         discarding input bytes before NMAX is reached.  This makes
20443         a difference only if NMAX exceeds SIZE_MAX / 2.
20444
20445         * lib/obstack.c: Merge from glibc.
20446         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
20447         Add libc_hidden_def (_obstack_newchunk).
20448         (_obstack_free) [! defined _LIBC]: Remove.
20449         [defined _LIBC]: Make a strong alias from obstack_free, rather than
20450         a clone of the function body.
20451         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
20452         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
20453
20454         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
20455         glibc.
20456         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
20457         arg to memcpy.
20458
20459         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
20460         (obstack_ptr_grow_fast, obstack_int_grow_fast):
20461         Don't use lvalue casts, as GCC plans to remove support for them
20462         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
20463         was also present in the non-GCC version, indicating that this
20464         code had always been buggy and had never been widely used.
20465         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
20466         Use the fast variant of each macro, rather than copying the
20467         definiens of the fast variant; that way, we'll be more likely to
20468         catch future bugs in the fast variants.
20469
20470 2003-10-20  Bruno Haible  <bruno@clisp.org>
20471
20472         * modules/wait-process: New file.
20473         * MODULES.html.sh (func_all_modules): Add wait-process.
20474
20475 2003-10-20  Bruno Haible  <bruno@clisp.org>
20476
20477         * m4/wait-process.m4: New file.
20478
20479 2003-10-20  Bruno Haible  <bruno@clisp.org>
20480
20481         * lib/wait-process.h: New file, from GNU gettext.
20482         * lib/wait-process.c: New file, from GNU gettext.
20483
20484 2003-10-19  Jim Meyering  <jim@meyering.net>
20485
20486         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
20487         HPUX 10.20.
20488
20489 2003-10-18  Karl Berry  <karl@gnu.org>
20490
20491         * config/config.guess: update from config.
20492
20493 2003-10-16  Paul Eggert  <eggert@twinsun.com>
20494
20495         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
20496         (getgroups): First arg is int, not size_t.
20497         Don't let 'free' mangle errno.
20498
20499 2003-10-16  Paul Eggert  <eggert@twinsun.com>
20500
20501         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
20502
20503 2003-10-16  Karl Berry  <karl@gnu.org>
20504
20505         * config/config.{guess,sub}: update from config.
20506
20507 2003-10-16  Jim Meyering  <jim@meyering.net>
20508
20509         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
20510         memcpy.
20511
20512 2003-10-15  Paul Eggert  <eggert@twinsun.com>
20513
20514         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
20515         (SIZE_MAX): Remove.
20516         (new_exclude, add_exclude_file): Initial size no longer needs to
20517         be a power of 2.
20518         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
20519         our own address arithmetic overflow checking.
20520
20521         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
20522         (fnmatch): Do not alloca more than 2000 wide characters;
20523         instead, use malloc for large buffers.
20524         Check for address arithmetic overflow, and return -1
20525         with errno set to ENOMEM in that case.
20526         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
20527         (NEW_PATTERN): Do not alloca more than 8000 bytes;
20528         instead, return -1.  Check for address arithmetic overflow.
20529
20530 2003-10-14  Paul Eggert  <eggert@twinsun.com>
20531
20532         Handle invalid suffixes and overflow independently, so that
20533         callers can treat them independently as needed.  Fix some bugs in
20534         suffix handling, e.g., "100k@" was not diagnosed as an invalid
20535         suffix for a human-readable blocksize.  The major caller-visible
20536         change is the addition of a new
20537         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
20538         that both overflow and suffix chars were found.
20539
20540         * lib/human.c (humblock): Don't check separately for invalid suffix
20541         char; that is xstrtoumax's job (now that its bug is fixed).
20542         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
20543         INTMAX_MAX]: New macros.
20544         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
20545         TYPE_MAXIMUM): New macros.
20546         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
20547         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
20548         if overflow occurs, as it's what __strtol does and it's more useful
20549         in practice.
20550         (__xstrtol): If __strtol reports some error other than ERANGE,
20551         reflect it to the caller as LONGINT_INVALID.  If it reports
20552         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
20553         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
20554         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
20555         value.
20556         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
20557         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
20558         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
20559         [defined UINTMAX_MAX]: New macros.
20560
20561 2003-10-14  Bruno Haible  <bruno@clisp.org>
20562
20563         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
20564
20565 2003-10-14  Bruno Haible  <bruno@clisp.org>
20566
20567         * m4/sig_atomic_t: New file, from GNU gettext.
20568         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
20569
20570 2003-10-14  Bruno Haible  <bruno@clisp.org>
20571
20572         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
20573         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
20574         Also use volatile where needed.
20575
20576 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20577
20578         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
20579         Change maintainer from Bruno Haible to 'all'.
20580
20581 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20582
20583         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
20584
20585 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20586
20587         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
20588         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
20589         and define in terms of the other primitives.
20590         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
20591         (SIZE_MAX): Define if not already defined.
20592         (array_size_overflow): New function.
20593         (xalloc_die): Abort instead of exiting if 'error' returns.
20594         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
20595         (xmalloc, xrealloc): Use them.
20596         (xcalloc): Check for address arithmetic overflow.
20597         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
20598         a bit faster than strcpy.
20599
20600 2003-10-10  Simon Josefsson  <jas@extundo.com>
20601
20602         * modules/argp (Depends-on): Add restrict and strcase.
20603
20604 2003-10-10  Simon Josefsson  <jas@extundo.com>
20605
20606         * m4/argp.m4: Add AC_C_INLINE.
20607
20608 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20609
20610         Merge getpass from libc, plus a few fixes.
20611
20612         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
20613         Include <stdbool.h>.
20614         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
20615         __fsetlocking to empty.
20616         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
20617         do include <bits/libc-lock.h>.
20618         Do not include <fcntl.h>; not needed.
20619         [_LIBC]: Include <wchar.h>.
20620         (NOTCANCEL_MODE): New macro.
20621         (flockfile, funlockfile) [_LIBC]: New macros.
20622         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
20623         [!_LIBC]: New macros.
20624         (call_fclose): New function.
20625         (getpass): Use it.  Save tty stream separately; this simplifies the
20626         code and makes it more reliable if stdin happens to equal stdout.
20627         Invoke __fsetlocking on tty.
20628         Handle thread cancellation if needed.
20629         Namespace cleanup (use __tcgetattr, __getline).
20630         Use bool for Booleans.
20631         [USE_IN_LIBIO]: Handle wide streams.
20632         [!_LIBC]: Unconditionally do the fseek, since we don't know what
20633         stream might go where.
20634
20635         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
20636         doesn't have to include <stdio.h> before us.
20637         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
20638         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
20639         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
20640         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
20641         if not declared, so that we can use getpass.c code from libc without
20642         rewriting it.
20643         (flockfile, ftrylockfile, funlockfile): New macros.
20644
20645 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20646
20647         * modules/getpass: Depend on stdbool.
20648
20649 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20650
20651         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
20652
20653 2003-10-07  Karl Berry  <karl@gnu.org>
20654
20655         * config/config.{guess,sub}: update from config.
20656
20657 2003-10-06  Jim Meyering  <jim@meyering.net>
20658             Bruno Haible  <bruno@clisp.org>
20659
20660         This lets translators provide better translations for the
20661         "Written by ..." part of --version output.
20662         * lib/version-etc.h: Include stdarg.h.
20663         (version_etc_copyright): Declare as readonly.
20664         (version_etc): Make this function variadic with a NULL-terminated list
20665         of author name strings.
20666         (version_etc_va): New declaration.
20667         * lib/version-etc.c: Include stdarg.h, stdlib.h.
20668         (version_etc_copyright): Declare as readonly.
20669         (version_etc_va): New function. Provide a different translatable string
20670         for each possible number of authors < 10. Abbreviate when there are 10
20671         authors or more.
20672         (version_etc): Make this function variadic. Call version_etc_va.
20673         Suggestion from Gary V. Vaughan.
20674
20675         * lib/long-options.h (parse_long_options): Change prototype: the
20676         authors string is moved to the end and becomes variadic.
20677         * lib/long-options.c: Include stdarg.h.
20678         (parse_long_options): Make this function variadic, too.
20679         Call version_etc_va, not version_etc.
20680
20681 2003-10-06  Bruno Haible  <bruno@clisp.org>
20682
20683         * modules/version-etc-2: Remove file.
20684         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
20685
20686 2003-10-06  Bruno Haible  <bruno@clisp.org>
20687
20688         * modules/fatal-signal: New file.
20689         * MODULES.html.sh (func_all_modules): Add fatal-signal.
20690
20691 2003-10-06  Bruno Haible  <bruno@clisp.org>
20692
20693         * m4/fatal-signal.m4: New file.
20694         * m4/signalblocking.m4: New file, from GNU gettext.
20695
20696 2003-10-06  Bruno Haible  <bruno@clisp.org>
20697
20698         * lib/version-etc-2.h: Remove file.
20699         * lib/version-etc-2.c: Remove file.
20700
20701 2003-10-06  Bruno Haible  <bruno@clisp.org>
20702
20703         * lib/fatal-signal.h: New file, from GNU gettext.
20704         * lib/fatal-signal.c: New file, from GNU gettext.
20705
20706 2003-10-05  Paul Eggert  <eggert@twinsun.com>
20707
20708         * README: Rework advice for preventing empty .o files.
20709         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
20710         not <sys/types.h>.
20711
20712 2003-10-04  Karl Berry  <karl@gnu.org>
20713
20714         * lib/argp*: update from libc.
20715
20716 2003-10-04  Karl Berry  <karl@gnu.org>
20717
20718         * config/config.{guess,sub}: update from config.
20719
20720 2003-10-02  Bruno Haible  <bruno@clisp.org>
20721
20722         * modules/lchown (Include): Add lchown.h.
20723         * modules/time_r (Include): Use "..." syntax.
20724         * modules/xgetdomainname (Include): Add xgetdomainname.h.
20725
20726 2003-10-01  Simon Josefsson  <jas@extundo.com>
20727
20728         * MODULES.html.sh (func_all_modules): Move gethostname from section
20729         'based on' to section 'lacking' POSIX:2001.
20730
20731 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
20732
20733         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
20734         to output mode on the same stream.
20735
20736 2003-09-29  Paul Eggert  <eggert@twinsun.com>
20737
20738         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
20739         Fix arg typo in previous patch.
20740
20741 2003-09-28  Jim Meyering  <jim@meyering.net>
20742
20743         * lib/error.c: Correct cpp indentation.
20744
20745 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20746
20747         * modules/free: New file.
20748
20749 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20750
20751         * m4/free.m4: New file.
20752
20753 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20754
20755         * lib/minmax.h (MIN, MAX)
20756         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
20757         Omit the special code that used __typeof__, since we worry that
20758         it could be more trouble than it's worth.  See:
20759         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
20760         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
20761
20762         * lib/free.c: New file.
20763
20764 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
20765
20766         Trivial fixes to Makefile.am parts of module listings.
20767         * modules/strstr: Append strstr.h to lib_SOURCES.
20768         * modules/strcase: Likewise, for strcase.h.
20769
20770 2003-09-27  Karl Berry  <karl@gnu.org>
20771
20772         * config/mkinstalldirs: update from automake.
20773
20774 2003-09-26  Paul Eggert  <eggert@twinsun.com>
20775
20776         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
20777         (error_tail): Do not loop, reallocating temporary buffer, since
20778         the output cannot contain more wide characters than the input
20779         contains bytes, the size must be big enough already.  This avoids
20780         one potential size overflow calculation.  Check for size overflow
20781         when calculating temporary buffer size.  Free temporary buffer
20782         when done, if it was allocated with malloc; this plugs a memory
20783         leak.  Remove casts from void * to pointers, that are no longer
20784         needed now that we're assuming C89 or better.
20785
20786         Merge error changes from glibc.
20787
20788         * lib/error.c, error.h: Update copyright notice header to match glibc.
20789         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
20790         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
20791         Disable cancellation while printing error.
20792         * lib/error.h: Prepend __ to parameter names.
20793
20794 2003-09-26  Jim Meyering  <jim@meyering.net>
20795
20796         * lib/error.c (error_tail): Move some declarations
20797         into inner scope where the local variables are used.
20798
20799 2003-09-26  Bruno Haible  <bruno@clisp.org>
20800
20801         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
20802         stpncpy().
20803         Don't define stpncpy through config.h; it's now done through stpncpy.h.
20804
20805 2003-09-26  Bruno Haible  <bruno@clisp.org>
20806
20807         * lib/stpncpy.h (gnu_stpncpy): New declaration.
20808         (stpncpy): Define as alias for gnu_stpncpy.
20809         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
20810
20811 2003-09-25  Simon Josefsson  <jas@extundo.com>
20812
20813         * lib/xgetdomainname.h: New file.
20814         * lib/xgetdomainname.c: New file.
20815
20816 2003-09-25  Simon Josefsson  <jas@extundo.com>
20817             Bruno Haible  <bruno@clisp.org>
20818
20819         * modules/getdomainname: New file.
20820         * modules/xgetdomainname: New file.
20821         * MODULES.html.sh (func_all_modules): Add getdomainname,
20822         xgetdomainname.
20823
20824 2003-09-25  Simon Josefsson  <jas@extundo.com>
20825             Bruno Haible  <bruno@clisp.org>
20826
20827         * m4/getdomainname.m4: New file.
20828
20829 2003-09-25  Simon Josefsson  <jas@extundo.com>
20830             Bruno Haible  <bruno@clisp.org>
20831
20832         * lib/getdomainname.h: New file.
20833         * lib/getdomainname.c: New file.
20834
20835 2003-09-25  Karl Berry  <karl@gnu.org>
20836
20837         * lib/argp-fmtstream.c, argp-help.c: update from libc.
20838
20839 2003-09-25  Karl Berry  <karl@gnu.org>
20840
20841         * config/install-sh: update from automake.
20842
20843 2003-09-25  Bruno Haible  <bruno@clisp.org>
20844
20845         * modules/version-etc-2: New file, from modules/version-etc with
20846         modifications.
20847         * MODULES.html.sh (func_all_modules): Add version-etc-2.
20848
20849 2003-09-25  Bruno Haible  <bruno@clisp.org>
20850
20851         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
20852         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
20853
20854 2003-09-24  Simon Josefsson  <jas@extundo.com>
20855
20856         * modules/xgethostname: Add xgethostname.h.
20857
20858 2003-09-24  Paul Eggert  <eggert@twinsun.com>
20859
20860         * lib/linebuffer.c (freebuffer): Don't free the argument, just
20861         the buffer associated with the argument.  Bug reported by
20862         Simon Josefsson.
20863
20864 2003-09-24  Paul Eggert  <eggert@twinsun.com>
20865
20866         * README: Document assumptions that 'int' is at least 32 bits
20867         wide, that integer arithmetic is 2's complement without overflow,
20868         that there are no holes in integer values, that adding sizes of
20869         two nonoverlapping objects can't overflow, and that all-bits-zero
20870         yields scalar zero.  Fix spelling and capitalization typos.
20871
20872 2003-09-19  Karl Berry  <karl@gnu.org>
20873
20874         * lib/argp.h: update from libc.
20875
20876 2003-09-17  Paul Eggert  <eggert@twinsun.com>
20877
20878         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
20879         to avoid spurious warnings like "AC_RUN_IFELSE was called before
20880         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
20881
20882 2003-09-17  Paul Eggert  <eggert@twinsun.com>
20883
20884         * gnulib-tool: Use "test -h", not "test -L", for portability
20885         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
20886         (tags_regexp): Remove, since \| doesn't conform to POSIX.
20887         (sed_extract_prog): Issue s commands one-by-one, rather than
20888         using \| in one s command.
20889
20890 2003-09-16  Paul Eggert  <eggert@twinsun.com>
20891
20892         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
20893         input error, instead of returning NULL the next time we are called
20894         (and therefore losing track of errno).
20895
20896 2003-09-16  Bruno Haible  <bruno@clisp.org>
20897
20898         * gnulib-tool (func_create_testdir): Warn about duplicated
20899         dependencies.
20900
20901 2003-09-15  Paul Eggert  <eggert@twinsun.com>
20902
20903         * modules/argmatch, modules/fatal, modules/obstack,
20904         modules/xalloc, modules/xgethostname: Sort dependencies by
20905         importance, not alphabetically.
20906
20907 2003-09-15  Paul Eggert  <eggert@twinsun.com>
20908
20909         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
20910         fails, so that the caller gets the proper errno.
20911
20912         * lib/readutmp.c (read_utmp): Likewise.
20913         Check for fstat error.  Close stream and free storage
20914         when failing.
20915
20916 2003-09-14  Karl Berry  <karl@gnu.org>
20917
20918         * config/srclist.txt (strdup.c): disable for c89 changes.
20919
20920 2003-09-14  Jim Meyering  <jim@meyering.net>
20921
20922         * lib/getloadavg.c: Correct cpp indentation.
20923         * lib/strdup.c: Likewise.
20924         * lib/vasnprintf.c: Likewise.
20925
20926 2003-09-14  Bruno Haible  <bruno@clisp.org>
20927
20928         * modules/fwriteerror: New file.
20929         * MODULES.html.sh (func_all_modules): Add fwriteerror.
20930
20931 2003-09-14  Bruno Haible  <bruno@clisp.org>
20932
20933         * lib/fwriteerror.h: New file.
20934         * lib/fwriteerror.c: New file.
20935
20936 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20937
20938         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
20939         modules/xgethostname, modules/xalloc: Depend on exit.
20940
20941 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20942
20943         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
20944
20945         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
20946         and AC_MINIX, too, so that their extensions are available.
20947
20948         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
20949         This macro has been superseded by gl_BACKUPFILE.
20950
20951         More patches to assume C89 or better.
20952
20953         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
20954
20955         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
20956         unconditionally.
20957         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
20958         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
20959         Include <string.h>, <stdlib.h> unconditionally.
20960         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
20961         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
20962         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
20963         headers or for string.h.
20964         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
20965         or strtoul.
20966
20967         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
20968         headers.
20969         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
20970         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20971         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
20972         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
20973         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20974         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
20975         memcpy, memset.
20976         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
20977         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
20978         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
20979         strtol.
20980         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
20981         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
20982         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
20983         strtoul.
20984
20985 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20986
20987         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
20988         * lib/obstack.c [!defined _LIBC]: Likewise.
20989         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
20990         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
20991         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
20992
20993         More changes to assume C89 or better.
20994
20995         * lib/error.c (error_tail): Assume vprintf.
20996
20997         * lib/argmatch.c (getenv): Remove decl.
20998         * lib/progreloc.c (get_full_program_name): Define via prototype.
20999         * lib/setenv.c (clearenv): Likewise.
21000         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
21001         needed.
21002         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
21003         (malloc, memcpy): Remove decls.
21004         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
21005         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
21006         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
21007         (memcpy): Remove macro.
21008         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
21009         (__P): Remove.  All uses removed.
21010         (PTR): Remove.  All uses changed to void *.
21011         (CHAR_BIT, NULL): Remove.
21012         (spaces, zeros, memset_space, memset_zero)
21013         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
21014         Remove.
21015         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
21016         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
21017         Define with prototype.
21018         Remove now-unnecessary prototype decl.
21019         (extra_args_spec): Assume ANSI C.  All uses changed.
21020         (extra_args_spec_iso): Remove.
21021         (my_strftime, emacs_strftimeu): Define via prototype.
21022         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
21023         unconditionally.
21024         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
21025         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
21026         (strtoul, strtol): Remove decls.
21027         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
21028         LONG_MAX): Remove.
21029         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
21030         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
21031         (LOCALE_PARAM_PROTO): New macro.
21032         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
21033         (INTERNAL (strtol), strtol): Define with a prototype.
21034         (PARAMS): Remove.  All uses removed.
21035         * lib/tempname.c: Include <string.h> unconditionally.
21036         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
21037         * lib/xgethostname.c (main): Define with a prototype.
21038         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
21039         Include <stdlib.h> unconditionally.
21040         (calloc, malloc, realloc, free): Remove decls.
21041         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
21042         Include <stdlib.h> unconditionally.  Sort include file names.
21043         (strtod): Remove.
21044         (xstrtod): Define with a prototype.
21045         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
21046         (strtol, strtoul): Remove decls.
21047
21048 2003-09-11  Paul Eggert  <eggert@twinsun.com>
21049
21050         More patches to assume C89 or better.
21051         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
21052         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
21053         string.h, memchr, STDC_HEADERS.
21054
21055 2003-09-11  Paul Eggert  <eggert@twinsun.com>
21056
21057         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
21058         Include <stdlib.h>, <string.h> unconditionally.
21059         Remove now-unnecessary cast to char *.
21060         * lib/strnlen.c: Include <string.h> unconditionally.
21061         * lib/yesno.c (yesno): Define with a prototype.
21062
21063 2003-09-11  Bruno Haible  <bruno@clisp.org>
21064
21065         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
21066
21067 2003-09-10  Jim Meyering  <jim@meyering.net>
21068
21069         * lib/error.c: Correct indentation of cpp directives.
21070
21071 2003-09-10  Bruno Haible  <bruno@clisp.org>
21072
21073         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
21074         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
21075         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
21076         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
21077         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
21078         <stdlib.h> and <string.h> checks.
21079         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
21080         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
21081
21082 2003-09-10  Bruno Haible  <bruno@clisp.org>
21083
21084         * lib/strcspn.c: Include <string.h> unconditionally.
21085         * lib/strpbrk.c: Include <string.h> unconditionally.
21086         * lib/strstr.c: Include <string.h> unconditionally.
21087         * lib/unicodeio.c: Include <string.h> unconditionally.
21088         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
21089         * lib/unsetenv.c: Likewise.
21090         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
21091         * lib/yesno.c: Include <stdlib.h> unconditionally.
21092         (rpmatch): Add prototype.
21093
21094 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21095
21096         More patches to assume C89 or better.
21097         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
21098         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
21099         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
21100         or for string.h.
21101         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
21102         stdlib.h.
21103         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
21104         C headers.
21105         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
21106         string.h.
21107         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
21108         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
21109         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
21110         or for string.h.
21111         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
21112         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
21113         C headers.
21114         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
21115         memcpy.
21116         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
21117         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
21118         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
21119         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
21120         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
21121         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
21122         string.h, free.
21123         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
21124         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
21125         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
21126         C headers, or for string.h.
21127         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
21128         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
21129         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
21130         headers, memory.h, stdlib.h, string.h, strings.h.
21131         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
21132         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
21133         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
21134         strchr.
21135         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
21136         headers, memory.h, string.h.
21137         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
21138         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
21139         free.
21140         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
21141         headers.
21142         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
21143         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
21144         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
21145         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
21146         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
21147
21148 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21149
21150         More K&R removal.
21151
21152         * lib/acosl.c (main): Use a prototype.
21153         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
21154         tanl.c: Likewise.
21155
21156         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
21157
21158         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
21159         (getopt, etopt_long, getopt_long_only, _getopt_internal)
21160         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
21161         with a prototype.
21162         * lib/getopt.c (const): Remove macro.
21163         Include <string.h> unconditionally.
21164         (my_index): Remove; all uses changed to strchr.
21165         (strlen): Remove decl.
21166         (exchange): Remove forward decl; no longer needed.
21167         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
21168         Define with prototype.
21169         * lib/getopt1.c (const): Remove macro.
21170         (getopt_long, getopt_long_only, main): Define with prototype.
21171
21172         * lib/getugroups.c: Include <string.h> unconditionally.
21173
21174         * lib/getusershell.c: Include <stdlib.h> unconditionally.
21175         (getusershell, setusershell, endusershell, readname, main):
21176         Define with prototypes.
21177
21178         * lib/group-member.c: Include group-member.h first.
21179         Include <stdlib.h> unconditionally.
21180
21181         * lib/hard-locale.c: Include hard-locale.h first.
21182         Include <stdlib.h>, <string.h> unconditionally.
21183
21184         * lib/hash.c (free, malloc): Remove decls.
21185         Include <stdlib.h> unconditionally.
21186
21187         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
21188         (getenv): Do not declare.
21189
21190         * lib/idcache.c: Include <string.h> unconditionally.
21191
21192         * lib/long-options.c: Include long-options.h first, to test interface.
21193         Include <stdlib.h> unconditionally.
21194
21195         * lib/makepath.c: Include makepath.h first, to test interface.
21196         Include <stdlib.h> and <string.h> unconditionally.
21197
21198         * lib/linebuffer.c: Include <stdlib.h>.
21199         (free): Remove decl.
21200
21201         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
21202         stddef.h. rpl_malloc returns void *, not char *.
21203         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
21204         prototype.
21205
21206         * lib/md5.h: Include <limits.h> unconditionally.
21207         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
21208         (__P): Remove; all uses removed.
21209         * lib/md5.c: Include "md5.h" first.
21210         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
21211         md5_buffer, md5_process_bytes, md5_process_block):
21212         Define with prototypes.
21213         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
21214         * lib/sha.c: Include "sha.h" first.
21215         Include <stdlib.h>, <string.h> unconditionally.
21216
21217         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
21218         * lib/memcmp.c (__ptr_t): Likewise.
21219         * lib/memrchr.c (__ptr_t): Likewise.
21220         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
21221         Include <string.h> unconditionally.
21222         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
21223         * lib/memchr.c: Include <stdlib.h> unconditionally.
21224         * lib/memchr.c (LONG_MAX): Remove.
21225         * lib/memrchr.c (LONG_MAX): Likewise.
21226         * lib/memchr.c (__memchr): Define via a prototype.
21227         * lib/memrchr.c (__memrchr): Likewise.
21228         * lib/memcmp.c (__P): Remove, and remove all uses.
21229         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
21230         Remove forward decls; no longer needed.
21231         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
21232         Use types required by C89 in prototype.
21233
21234         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
21235         * lib/savedir.c: Likewise.
21236         * lib/mkdir.c (free): Remove decl.
21237         * lib/rmdir.c (rmdir): Define with a prototype.
21238         * lib/savedir.c: Include savedir.h first, to test interface.
21239
21240         * lib/mktime.c (STDC_HEADERS): Remove.
21241         Include <stdlib.h>, <string.h> unconditionally.
21242
21243         * lib/modechange.c: Include <stdlib.h> unconditionally.
21244         (malloc): Remove decl.
21245
21246         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
21247         (free): Remove decl.
21248
21249         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
21250         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
21251         (This type really should be intptr_t, but that's a C99ism.)
21252         (_obstack_memcpy): Remove: all uses changed to memcpy.
21253         Include <string.h> unconditionally.
21254         (struct obstack): Assume __STDC__ for types of members
21255         chunkfun, freefun, extra_arg.
21256         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
21257         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
21258         obstack_begin, obstack_specify_allocation,
21259         obstack_specify_allocation_with_arg, obstack_chunkfun,
21260         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
21261         Remove unprototyped decls and the macros that use them.
21262         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
21263         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
21264         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
21265         (defined __STDC__ && __STDC__)]:
21266         Remove nonprototyped code.
21267         Include <stdlib.h> unconditionally.
21268         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
21269         _obstack_allocated_p, _obstack_free, obstack_free,
21270         _obstack_memory_used, print_and_abort):
21271         Define using prototypes.
21272         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
21273         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
21274         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
21275         obstack_next_free, obstack_object_size, obstack_room) [0]:
21276         Remove unused, unprototyped code.
21277
21278         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
21279
21280         * lib/physmem.c (physmem_total, physmem_available, main): Define
21281         with prototypes.
21282
21283         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
21284         (main): Define with a prototype.
21285
21286         * lib/posixver.c (getenv): Remove decl.
21287
21288         * lib/putenv.c (malloc): Returns void *, not char *.
21289         Include <string.h> unconditionally.
21290         (strchr, memcpy, NULL): Do not define.
21291
21292         * lib/readtokens.c: Include readtokens.h first, to test interface.
21293         Include <stdlib.h>, <string.h> unconditionally.
21294         (init_tokenbuffer): Define with a prototype.
21295
21296         * lib/regex.c (PARAMS): Remove.  All uses removed.
21297         All uses of _RE_ARGS removed, too.
21298         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21299         unconditionally.
21300         (bzero): Assume memset exists.
21301         (memcmp, memcpy, NULL): Remove.
21302         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
21303         char, or assignments to local vars of type signed char.
21304         (init_syntax_once, PREFIX(extract_number_and_incr),
21305         PREFIX(print_partial_compiled_pattern),
21306         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
21307         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
21308         PREFIX(regex_grow_registers), PREFIX(regex_compile),
21309         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
21310         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
21311         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
21312         wcs_compile_range, byte_compile_range, truncate_wchar,
21313         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
21314         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
21315         count_mbs_length, wcs_re_match_2_internal,
21316         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
21317         PREFIX(alt_match_null_string_p),
21318         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
21319         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
21320         regfree, PREFIX(extract_number)): Define with prototype.  Remove
21321         now-unnecessary declaration, if any.
21322         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
21323         regcomp, regexec):
21324         Remove now-unnecessary casts among pointer types.
21325         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
21326
21327         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
21328         (free): Remove decl.
21329
21330         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
21331
21332         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
21333         (free): Remove decl.
21334
21335         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
21336         * lib/xgetcwd.c: Likewise.
21337
21338         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
21339         (free): Remove decl.
21340
21341         * lib/strchrnul.c (strchrnul): Define with a prototype.
21342         Fix bug: c_in was not converted to char before searching.
21343
21344         The following changes are not K&R related:
21345
21346         * lib/group-member.h: Include <sys/types.h>, so that this file is
21347         self-contained.
21348         * lib/makepath.h: Likewise.
21349
21350         * lib/getusershell.c (readname, default_index, line_size, readname):
21351         Use size_t, not int, for sizes.
21352         (readname): If the size overflows, report an error instead of
21353         looping forever.
21354
21355 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21356
21357         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
21358         libc.
21359
21360 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21361
21362         * README: New section: portability guidelines.
21363
21364 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
21365
21366         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
21367         C89 spec.
21368
21369 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
21370
21371         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
21372
21373 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21374
21375         Assume C89 or better; remove K&R cruft.
21376         A few of these changes were first proposed by Derek Robert Price
21377         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
21378
21379         * lib/addext.c: Include <string.h> unconditionally.
21380         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
21381         Don't declare getenv or malloc.
21382
21383         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
21384         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
21385         (NULL): Remove.
21386         (find_stack_direction, alloca): Use prototypes.
21387
21388         * lib/atexit.c (atexit): Define using a prototype.
21389
21390         * lib/basename.c, dirname.c, stripslash.c:
21391         Include <string.h> unconditionally.
21392
21393         * lib/bcopy.c: Include <stddef.h>.
21394         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
21395
21396         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
21397
21398         * lib/error.h (error, error_at_line, error_print_progname)
21399         [! (defined (__STDC__) && __STDC__)]: Remove decls.
21400         * lib/error.c: Include error.h first, to check interface.
21401         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
21402         (VA_START): Remove; all uses changeed to va_start.
21403         (exit, strerror): Remove decls.
21404         (error_print_progname): Prototype uncondionally.
21405         Don't include <errno.h>; no longer needed.
21406         (private_strerror): Remove.
21407         (error_tail): Always define.
21408         (error, error_at_line): Assume C89 or better; always use prototypes.
21409         * lib/fatal.c: Include "fatal.h" first, to test interface.
21410         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
21411         (VA_START): Remove; all uses changed to va_start.
21412         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
21413         this case.
21414         (exit): Remove decl.
21415         (fatal): Prototype unconditionally.  Assume va_start works.
21416         Abort at end, to pacify gcc.
21417
21418         * lib/euidaccess.c (main): Define with a prototype.
21419
21420         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
21421
21422         * lib/exitfail.c: Include <stdlib.h> unconditionally.
21423
21424         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
21425         prototypes.
21426         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
21427         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
21428         (getenv): Remove decl.
21429         (fnmatch): Define using a prototype.
21430         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
21431         (FCT): Define using a prototype.
21432
21433         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
21434
21435         * lib/gethostname.c: Include <stddef.h>.
21436         (gethostname): Define with prototype.  Length is size_t, not int.
21437
21438 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21439
21440         Assume C89 or better; remove K&R cruft.
21441         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
21442         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
21443         string.h, getenv, malloc.
21444         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
21445         headers.
21446         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
21447         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
21448         do not check for strerror.
21449         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
21450         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
21451         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
21452         do not check for doprnt or vprintf.
21453         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
21454         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
21455
21456 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21457
21458         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
21459         getversion.c should have been removed then, but was accidentally
21460         preserved.
21461
21462         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
21463         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
21464
21465 2003-09-08  Karl Berry  <karl@gnu.org>
21466
21467         * config/config.sub, config.guess, srclistvars.sh: update from savannah
21468                 config, forget about prep.
21469
21470         * config/depcomp, missing: update from automake.
21471
21472 2003-09-07  Paul Eggert  <eggert@twinsun.com>
21473
21474         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
21475         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
21476
21477 2003-09-07  Paul Eggert  <eggert@twinsun.com>
21478
21479         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
21480         copy_tm_result.  Bug reported by Simon Josefsson in
21481         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
21482
21483 2003-09-06  Paul Eggert  <eggert@twinsun.com>
21484
21485         * m4/time_r.m4: New file.
21486         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
21487         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
21488         is. Check for timegm declaration.
21489         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
21490         Do not check for gmtime_r.
21491         Replace mktime if __mktime_internal does not exist and if mktime
21492         hasn't been replaced already.
21493
21494 2003-09-06  Paul Eggert  <eggert@twinsun.com>
21495
21496         * lib/time_r.c, lib/time_r.h: New files.
21497
21498         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
21499         __localtime_r.
21500         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
21501         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
21502
21503         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
21504         __gmtime_r.
21505         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
21506         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
21507         Include <time_r.h>.
21508
21509         * lib/timegm.c: Switch to glibc implementation, with the following
21510         changes:
21511         [defined HAVE_CONFIG_H]: Include <config.h>.
21512         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
21513         (__mktime_internal) [!defined _LIBC]: New decl.
21514         (__gmtime_r) [!defined _LIBC]: New macro and function.
21515         (timegm): Use a prototype, since gnulib assumes C89.
21516         Do not bother declaring tmp to be const, as it's not really usefu.
21517         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
21518         (timegm): Declare only if HAVE_DECL_TIMEGM.
21519
21520 2003-09-06  Paul Eggert  <eggert@twinsun.com>
21521
21522         * MODULES.html.sh (func_all_modules): Add time_r.
21523         * modules/time_r: New file.
21524         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
21525         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
21526
21527 2003-09-03  Paul Eggert  <eggert@twinsun.com>
21528
21529         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
21530         Bug reported by Lute Kamstra in
21531         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
21532
21533         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
21534         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
21535         course with correspondingly smaller numbers for tomorrow and
21536         yesterday.  From Tadayoshi Funaba.  Originally installed into
21537         sh-utils on 1999-08-07, but the patch got lost (I guess during the
21538         coreutils merge?).
21539
21540 2003-08-31  Simon Josefsson  <jas@extundo.com>
21541
21542         * modules/timegm: New file.
21543         * MODULES.html.sh (func_all_modules): Add timegm.
21544
21545 2003-08-31  Simon Josefsson  <jas@extundo.com>
21546
21547         * m4/timegm.m4: New file.
21548
21549 2003-08-31  Simon Josefsson  <jas@extundo.com>
21550
21551         * lib/timegm.h: New file.
21552         * lib/timegm.c: New file.  Based on
21553         wget-1.8.2/src/http.c:mktime_from_utc.
21554
21555 2003-08-31  Karl Berry  <karl@gnu.org>
21556
21557         * lib/argp.h: update from libc.
21558
21559 2003-08-28  Bruno Haible  <bruno@clisp.org>
21560
21561         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
21562         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
21563         followed by '#define fnmatch fnmatch_posix' gives an error.
21564
21565 2003-08-28  Bruno Haible  <bruno@clisp.org>
21566
21567         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
21568         warning on QNX, which defines O_BINARY to 000000.
21569
21570 2003-08-27  Jim Meyering  <jim@meyering.net>
21571
21572         * m4/mkstemp.m4: Require that the system mkstemp be able to create
21573         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
21574         would fail after 32.  Reported by Danny Levinson.  Details here:
21575         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
21576
21577 2003-08-24  Bruno Haible  <bruno@clisp.org>
21578
21579         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
21580         MSVC7 <stdio.h> is included later.
21581
21582 2003-08-22  Simon Josefsson  <jas@extundo.com>
21583
21584         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
21585
21586 2003-08-20  Karl Berry  <karl@gnu.org>
21587
21588         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
21589
21590 2003-08-20  Bruno Haible  <bruno@clisp.org>
21591
21592         * modules/progname: New file.
21593         * MODULES.html.sh (func_all_modules): Add progname.
21594
21595 2003-08-20  Bruno Haible  <bruno@clisp.org>
21596
21597         * lib/progname.h: New file, from GNU gettext.
21598         * lib/progname.c: New file, from GNU gettext.
21599         * lib/progreloc.c: New file, from GNU gettext.
21600
21601 2003-08-19  Jim Meyering  <jim@meyering.net>
21602
21603         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
21604         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
21605
21606 2003-08-19  Bruno Haible  <bruno@clisp.org>
21607
21608         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
21609         more.
21610
21611 2003-08-19  Bruno Haible  <bruno@clisp.org>
21612
21613         * lib/xstrdup.c: Assume <string.h> exists.
21614
21615 2003-08-18  Paul Eggert  <eggert@twinsun.com>
21616
21617         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
21618         in makefile rules.
21619
21620 2003-08-18  Jim Meyering  <jim@meyering.net>
21621
21622         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
21623         * m4/lib-ld.m4: Likewise.
21624
21625 2003-08-18  Jim Meyering  <jim@meyering.net>
21626
21627         * lib/setenv.h: Indent nested cpp directive.
21628         * lib/vasnprintf.c: Remove trailing blanks.
21629
21630 2003-08-17  Simon Josefsson  <jas@extundo.com>
21631
21632         * modules/xstrndup: New file.
21633         * MODULES.html.sh (func_all_modules): Add xstrndup.
21634
21635 2003-08-17  Simon Josefsson  <jas@extundo.com>
21636
21637         * modules/argp: Fix autoconf macro name. Add more dependencies.
21638
21639 2003-08-17  Simon Josefsson  <jas@extundo.com>
21640
21641         * m4/xstrndup.m4: New file.
21642
21643 2003-08-17  Simon Josefsson  <jas@extundo.com>
21644
21645         * m4/argp.m4: New file.
21646
21647 2003-08-17  Simon Josefsson  <jas@extundo.com>
21648             Bruno Haible  <bruno@clisp.org>
21649
21650         * lib/xstrndup.h: New file.
21651         * lib/xstrndup.c: New file.
21652
21653 2003-08-17  Bruno Haible  <bruno@clisp.org>
21654
21655         * modules/strndup (Files, Include): Add lib/strndup.h.
21656
21657 2003-08-17  Bruno Haible  <bruno@clisp.org>
21658
21659         * modules/euidaccess (Files): Add lib/euidaccess.h.
21660
21661 2003-08-17  Bruno Haible  <bruno@clisp.org>
21662
21663         * lib/strndup.h: New file.
21664
21665 2003-08-17  Bruno Haible  <bruno@clisp.org>
21666
21667         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
21668         like AC_GNU_SOURCE.
21669         * modules/extensions (configure.ac): Comment out the invocation of
21670         gl_USE_SYSTEM_EXTENSIONS.
21671
21672 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21673
21674         Merges from coreutils, etc.
21675         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
21676         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
21677         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
21678         fixing a typo.
21679         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
21680         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
21681
21682 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21683
21684         Document merge from coreutils.
21685         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
21686         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
21687         * modules/utime: Add m4/utimes-null.m4.
21688
21689 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21690
21691         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
21692         space, undoing this 2003-08-12 change:
21693         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
21694
21695 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21696
21697         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
21698         strtoul.c from libc, undoing this 2003-08-12 change:
21699         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
21700
21701 2003-08-16  Jim Meyering  <jim@meyering.net>
21702
21703         Merges from coreutils.
21704         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
21705         prefix.  Adjust cache variables similarly.  Create 500 rather than
21706         just 300 files, to exercise bug on Darwin6.5, too.
21707         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
21708         $missing_dir.
21709         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
21710         AM_SYS_POSIX_TERMIOS.
21711         Reported by mkc@mathdogs.com.
21712         Also change use of $am_cv_sys_posix_termios
21713         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
21714         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
21715         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
21716         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
21717         in /proc/mounts until it finds one with matching device number.  This
21718         is unnecessary when the FILE argument *is* a mount point.  No stat call
21719         is necessary in that case.  So, disable the statvfs-testing code on
21720         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
21721         as RedHat bug# 84846.
21722         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
21723         to 1MB, so as not to render systems with no stack size limit (e.g.,
21724         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
21725         Include <unistd.h>.  On some systems,
21726         it is required for the definition of _SC_PAGESIZE.
21727
21728 2003-08-16  Jim Meyering  <jim@meyering.net>
21729
21730         Merge from coreutils.
21731         * lib/xstrtoimax.c: #else #if -> #elif.
21732         * lib/xstrtoumax.c: Likewise.
21733
21734 2003-08-16  Jim Meyering  <jim@meyering.net>
21735
21736         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
21737         * m4/utimes.m4: Removed.
21738         * m4/utimes-null.m4: Renamed from utimes.m4.
21739
21740         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
21741         to 1MB, so as not to render systems with no stack size limit (e.g.,
21742         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
21743         Include <unistd.h>.  On some systems,
21744         it is required for the definition of _SC_PAGESIZE.
21745
21746 2003-08-16  Jim Meyering  <jim@meyering.net>
21747         and Paul Eggert  <eggert@cs.ucla.edu>
21748
21749         Merges from coreutils, etc.
21750
21751         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
21752         using the latest version from cvs.  This avoids problems with #line
21753         directives using a vendor (Sun) compiler.
21754         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
21755         Don't set GETGROUPS_LIB here; now it's
21756         done via getgroups.m4's wrapper function.
21757         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
21758         rather than just in sh-util/configure.in, so that the
21759         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
21760         same.
21761         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
21762         AC_FUNC_GETLOADAVG where to find getloadavg.c.
21763         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
21764         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
21765         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
21766         Remove code that is now done by the newly-required macros.
21767         Append $(EXEEXT) to DF_PROG.
21768         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
21769         Do not invoke or require the following here,
21770         since prereq.m4 or some gnulib .m4 now does this for us:
21771         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
21772         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
21773         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
21774         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
21775         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
21776         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
21777         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
21778         AC_FUNC_OBSTACK.
21779         Do not replace the following functions, as this is now the job
21780         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
21781         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
21782         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
21783         atexit getpass, strdup, getpagesize.
21784         Replace 'raise'.
21785         Do not check for the following functions, as this is now the job
21786         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
21787         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
21788         setregid.
21789         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
21790         Check for sys/sysctl.h.
21791         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
21792         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
21793         of checking for ssize_t ourselves.
21794
21795         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
21796         Require every macro that gnulib/modules/* suggests for us.
21797         (jm_PREREQ_ADDEXT): New macro.
21798         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
21799         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
21800
21801         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
21802         (gl_PHYSMEM): Use it.
21803         Also check for `table' function.
21804         Check for new headers and functions.
21805         Add check for sys/sysmp.h.
21806         With suggestions from Kaveh Ghazi.
21807         Ignore headers that are present but cannot be compiled.  This
21808         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
21809         C 5.4.
21810
21811 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21812
21813         Document merge from coreutils.
21814         * modules/userspec: Depend on posixver.
21815         * modules/strftime: Depend on tzset.
21816
21817 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21818
21819         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
21820         rather than tab, after '#' in shell-script copyright notices.
21821         Suggested by Bruno Haible.
21822
21823 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21824
21825         * config/srclist-update: Use three spaces, rather than tab, after '#'
21826         in shell-script copyright notices.  Suggested by Bruno Haible.
21827         Remove unnecessary parenthesization in regular expression.
21828
21829 2003-08-15  Jim Meyering  <jim@meyering.net>
21830
21831         Merge from coreutils.
21832         * lib/xgethostname.c: Include <stdlib.h>.
21833         (xghostname): Don't exit for anything other than memory-related
21834         failure; just return NULL.
21835         * lib/userspec.c: Include "posixver.h".
21836         (parse_user_spec): Accept `.' as a separator only
21837         in pre-POSIX-200112 mode.
21838         * lib/strtoimax.c: Use #elif rather than #else #if.
21839         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
21840         Remove function, now that we can rely on a working tzset function.
21841         [!_LIBC]: Ensure that the required autoconf test has been run.
21842         [!defined _NL_CURRENT && HAVE_STRFTIME]:
21843         Use underlying_strftime for %r.
21844         * lib/sha.c: Merge in some clean-up and optimization changes from
21845         glibc.
21846         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
21847         Ensure that it is a multiple of 64.
21848         Rearrange loop exit tests so as to avoid performing an
21849         additional fread after encountering an error or EOF.
21850         * lib/realloc.c: Update copyright date.
21851
21852 2003-08-15  Jim Meyering  <jim@meyering.net>
21853         and Paul Eggert  <eggert@twinsun.com>
21854
21855         Merge from coreutils.
21856         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
21857         member but strut utmpx does not.  Needed for AIX 4.3.3.
21858         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
21859
21860 2003-08-15  Jim Meyering  <jim@meyering.net>
21861         and Paul Eggert  <eggert@cs.ucla.edu>
21862
21863         Merges from coreutils, etc.
21864         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
21865         Require gl_FUNC_TZSET_CLOBBER.
21866         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
21867         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
21868         members.
21869
21870 2003-08-14  Paul Eggert  <eggert@twinsun.com>
21871
21872         Help the merge from coreutils.
21873         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
21874         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
21875         * m4/tzset.m4: Use it too.
21876
21877 2003-08-14  Paul Eggert  <eggert@twinsun.com>
21878
21879         * modules/tzset: New file.
21880
21881 2003-08-14  Jim Meyering  <jim@meyering.net>
21882
21883         Merges from coreutils.
21884         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
21885         variable names, rather than @FNMATCH_H@.
21886         * modules/alloca: Likewise for $(ALLOCA_H).
21887
21888         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
21889         the three copies of the literal target, `fnmatch.h'.
21890         * modules/alloca (alloca.h): Likewise.
21891
21892 2003-08-14  Jim Meyering  <jim@meyering.net>
21893
21894         Merge from coreutils.
21895         * m4/tzset.m4: New file.
21896         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
21897         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
21898         otherwise, AIX 5.1 systems would end up using the latter.
21899         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
21900         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
21901         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
21902         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
21903
21904 2003-08-14  Jim Meyering  <jim@meyering.net>
21905
21906         Merge from coreutils.
21907         * lib/obstack.h: Whitespace changes.
21908         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
21909         and xcalloc return values.
21910         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
21911         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
21912         hang on OSF/1 5.1 for DIR on both local and remote file systems.
21913         Reported by (and fix confirmed by) Nelson H. F. Beebe.
21914         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21915         error from mntctl.
21916         Use mntctl's return value to drive the entry-processing loop, since
21917         we can't rely on the value of the vmt_length member in the last
21918         entry.  On some systems doing so could result in exhausting
21919         virtual memory.  Based in part on a patch from Mike Jetzer.
21920
21921 2003-08-14  Jim Meyering  <jim@meyering.net>
21922         and Paul Eggert  <eggert@twinsun.com>
21923
21924         Merges from coreutils, plus other fixes.
21925         * lib/physmem.c: Merge in portability changes from gcc/libiberty
21926         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
21927         for credits and details.  Thanks to Kaveh Ghazi for helping
21928         to keep these files in sync.
21929         (ARRAY_SIZE): Define it.
21930         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
21931         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
21932         (memcasecmp): Don't assume size_t fits in unsigned int.
21933         Remove casts and duplicate code.
21934         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
21935         (memcpy): Remove definition.
21936         Merge in some clean-up and optimization changes from glibc.
21937         [BLOCKSIZE]: Move definition to top of file.
21938         Ensure that it is a multiple of 64.
21939         Rearrange loop exit tests so as to avoid performing an
21940         additional fread after encountering an error or EOF.
21941         * lib/md5.h (md5_uintptr): Define.
21942         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
21943         return to the initial working directory.  Preserve errno
21944         for caller.
21945         * lib/idcache.c: Include "xalloc.h".
21946         (xmalloc, xrealloc): Remove decls.
21947         (getuser): Remove casts no longer required in C89.
21948         * lib/human.c: Include stdio.h, for sprintf.
21949         * lib/group-member.c: Include "xalloc.h".
21950         (xmalloc, xrealloc): Remove decls.
21951         (get_group_info): Remove casts no longer required in C89.
21952         * lib/getusershell.c (readname): Remove casts no longer required in
21953         C89.
21954         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
21955         * lib/getline.c: Whitespace fix, from coreutils.
21956
21957 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21958
21959         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
21960         Check for isascii.
21961
21962         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
21963         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
21964         Undo previous (whitespace-only) change.
21965
21966 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21967
21968         * lib/exclude.c: Include <ctype.h>
21969         (IN_CTYPE_DOMAIN): New macro.
21970         (is_space): New fn.
21971         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
21972         and empty lines.
21973
21974         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
21975         Undo previous (whitespace-only) change.
21976
21977 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21978
21979         * config/srclist-update: Change update back to the old behavior,
21980         leaving whitespace alone.  Use one 'sed' command rather than a
21981         pipeline.
21982         (fixlicense): Now a variable, not a function.
21983         (remove_trailing_blanks): Remove.
21984         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
21985         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
21986         Undo previous (whitespace-only) change.
21987
21988 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21989
21990         Merge from coreutils.
21991         * modules/euidaccess: Add lib_SOURCES, include for new
21992         file euidaccess.h
21993
21994 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21995
21996         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
21997         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
21998         Normalize leading white space and remove trailing white space.
21999
22000         Merge from coreutils
22001         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
22002
22003         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
22004         0.12.1.  These files are now being upgraded automatically by
22005         ../config/srclist-update.
22006
22007 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22008
22009         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
22010         Normalize leading white space and remove trailing white space.
22011         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
22012         notice, as per ../config/srclist-update.
22013
22014         Merge from coreutils.
22015         * lib/euidaccess.h: New file.
22016         * lib/euidaccess.c: Include it.
22017         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
22018         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
22019         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
22020
22021 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22022
22023         * config/srclist-update: Add copyright notice.
22024         (remove_id_lines, remove_trailing_blanks): New constants.
22025         (fixfile): Use them to normalize spacing a bit in copied files.
22026         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
22027         Normalize leading white space and remove trailing white space.
22028
22029         * config/texinfo.tex: Sync with texinfo.
22030
22031         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
22032         strtoul.c from libc, to merge coreutils whitespace changes.
22033
22034         * config/srclist.txt: Get the following m4 files from gettext:
22035         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
22036         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
22037         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
22038         wint_t.m4.
22039
22040 2003-08-12  Karl Berry  <karl@gnu.org>
22041
22042         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
22043         been made.
22044
22045 2003-08-11  Paul Eggert  <eggert@twinsun.com>
22046
22047         * modules/gnu-source, m4/gnu-source.m4:
22048         Remove; we're assuming Autoconf 2.54 or later now.
22049         Suggested by Bruno Haible.
22050         * MODULES.html.sh (func_all_modules): Remove gnu-source.
22051
22052 2003-08-11  Bruno Haible  <bruno@clisp.org>
22053
22054         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
22055
22056 2003-08-11  Bruno Haible  <bruno@clisp.org>
22057
22058         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
22059         (vasnprintf): Use it instead of wcslen.
22060
22061 2003-08-11  Bruno Haible  <bruno@clisp.org>
22062
22063         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
22064         value to ensure that _Bool promotes to int. Use #define for _Bool when
22065         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
22066
22067 2003-08-10  Karl Berry  <karl@gnu.org>
22068
22069         * lib/regex.h: update from libc (whitespace fix).
22070
22071 2003-08-09  Paul Eggert  <eggert@twinsun.com>
22072
22073         Merge some files from coreutils.  These changes were
22074         originally made by Jim Meyering.
22075         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
22076         many older Unixes require this.
22077         * lib/alloca.c (alloca): Remove cast to argument of free;
22078         no longer needed in C89.
22079         * lib/alloca_.h, regex.h: Fix white space to match
22080         what GNU indent does.
22081
22082 2003-08-09  Paul Eggert  <eggert@twinsun.com>
22083
22084         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
22085         apparently Emacs's Unicode mode got confused before my 2003-08-05
22086         checkin.
22087
22088 2003-08-08  Paul Eggert  <eggert@twinsun.com>
22089
22090         * m4/extensions.m4: New file.
22091         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
22092         Require gl_USE_SYSTEM_EXTENSIONS.
22093         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
22094         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
22095
22096 2003-08-08  Paul Eggert  <eggert@twinsun.com>
22097
22098         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
22099         * modules/extensions, modules/gnu-source: New files.
22100         * modules/timespec, modules/unlocked-io: Depend on extensions.
22101
22102 2003-08-07  Paul Eggert  <eggert@twinsun.com>
22103
22104         * modules/restrict: New file.
22105         * MODULES.html.sh (func_all_modules): Add restrict.
22106         * modules/regex: Depend on restrict.
22107
22108 2003-08-07  Paul Eggert  <eggert@twinsun.com>
22109
22110         * m4/restrict.m4: New file.
22111         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
22112
22113 2003-08-07  Bruno Haible  <bruno@clisp.org>
22114
22115         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
22116         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
22117
22118 2003-08-07  Bruno Haible  <bruno@clisp.org>
22119
22120         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
22121         makes the module 'getndelim2' compatible with the module 'getline'.
22122
22123 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22124
22125         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
22126         byte with "\201" to avoid glitches when editing that source file
22127         with multi-gnome-terminal.
22128
22129 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22130
22131         * lib/bumpalloc.h: Remove.
22132
22133 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22134
22135         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
22136         * modules/bumpalloc: Remove.
22137
22138 2003-08-04  Paul Eggert  <eggert@twinsun.com>
22139
22140         * lib/getloadavg.c: Change copyright notice and spacing to conform to
22141         GNU coding style.
22142
22143         Merge from coreutils.
22144         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
22145         1. From glibc.
22146         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
22147         from Karl Berry, implemented by Jim Meyering.
22148         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
22149         from Dmitry V. Levin.
22150         Remove anachronistic cast of xrealloc.
22151         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
22152         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
22153         type. Otherwise, it wouldn't compile with at least /bin/cc on
22154         ymp-cray-unicos9.0.2.X.
22155         Combine two mostly-identical uses of alloca into one.
22156         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
22157
22158 2003-08-04  Dave Love  <d.love@dl.ac.uk>
22159
22160         [From Emacs.]
22161
22162         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
22163         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
22164         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
22165         obsolete NLIST_NAME_UNION.
22166         [__GNU__]: Undef BSD and FSCALE.
22167         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
22168
22169 2003-08-03  Paul Eggert  <eggert@twinsun.com>
22170
22171         * lib/stdbool_.h (_Bool): Make it signed char, instead of
22172         an enum type, so that it's guaranteed to promote to int.  See:
22173         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
22174
22175 2003-08-03  Karl Berry  <karl@gnu.org>
22176
22177         * config/depcomp: update from automake.
22178
22179 2003-07-31  Paul Eggert  <eggert@twinsun.com>
22180
22181         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
22182         (strerror): Don't assume that a printable int fits in 14 bytes.
22183
22184 2003-07-31  Bruno Haible  <bruno@clisp.org>
22185
22186         * modules/getpass-gnu: New file.
22187         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
22188
22189 2003-07-31  Bruno Haible  <bruno@clisp.org>
22190
22191         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
22192
22193 2003-07-24  Karl Berry  <karl@gnu.org>
22194
22195         * config/missing: update from automake.
22196
22197 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
22198             Bruno Haible  <bruno@clisp.org>
22199
22200         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
22201         * lib/getline.c (getline, getdelim): Likewise.
22202         Remove _GNU_SOURCE define; now it's defined in config.h through
22203         m4/getline.m4.
22204
22205 2003-07-23  Karl Berry  <karl@gnu.org>
22206
22207         * config/config.sub: update from prep.
22208
22209 2003-07-22  Paul Eggert  <eggert@twinsun.com>
22210
22211         * modules/xalloc (Depends-on): Add exitfail.
22212         * modules/xmemcoll: Likewise.
22213
22214 2003-07-22  Paul Eggert  <eggert@twinsun.com>
22215
22216         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
22217         over-parenthesization in macros.
22218
22219         Sync with coreutils.
22220
22221         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
22222         required by C99.
22223
22224         Use `exit_failure' for xalloc and xmemcoll instead of their own
22225         private exit-failure variables.
22226         * lib/xalloc.h (xalloc_exit_failure): Remove.
22227         * lib/xmalloc.c: Likewise.  Include exitfail.h.
22228         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
22229         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
22230         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
22231         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
22232
22233 2003-07-20  Jim Meyering  <jim@meyering.net>
22234
22235         * modules/closeout (Depends-on): Add exitfail.
22236         Suggestion from Bruno Haible.
22237
22238 2003-07-19  Karl Berry  <karl@gnu.org>
22239
22240         * config/config.sub: update from prep.
22241
22242 2003-07-18  Paul Eggert  <eggert@twinsun.com>
22243
22244         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
22245         Remove.
22246         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
22247         to test that it can stand by itself.  Include "exitfail.h".
22248         Clients should set exit_failure instead.
22249         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
22250
22251 2003-07-18  Bruno Haible  <bruno@clisp.org>
22252
22253         * modules/getndelim2: New file.
22254         * modules/getline: Share files with module getndelim2.
22255         * modules/getnline: Depend on getndelim2 instead of sharing files with
22256         it. Add getnline.c to lib_SOURCES.
22257         * MODULES.html.sh (func_all_modules): Add getndelim2.
22258
22259 2003-07-18  Bruno Haible  <bruno@clisp.org>
22260
22261         * m4/getndelim2.m4: New file.
22262         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
22263         invoke gl_PREREQ_GETNDELIM2.
22264         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
22265         gl_PREREQ_GETNDELIM2.
22266         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
22267         gl_GETNDELIM2.
22268
22269 2003-07-18  Bruno Haible  <bruno@clisp.org>
22270
22271         * lib/getndelim2.h: New file.
22272         * lib/getndelim2.c: Make into a module of its own. Include config.h,
22273         getndelim2.h.
22274         (getndelim2): Make non-static. Change return type to ssize_t.
22275         * lib/getline.h: Change argument names.
22276         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
22277         * lib/getnline.c: Include getndelim2.h.
22278
22279 2003-07-18  Andreas Schwab  <schwab@suse.de>
22280
22281         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
22282
22283 2003-07-17  Karl Berry  <karl@gnu.org>
22284
22285         * config/config.sub: update from prep.
22286
22287 2003-07-17  Bruno Haible  <bruno@clisp.org>
22288
22289         * modules/getnline: New file.
22290         * modules/getline: Add lib/getndelim2.c to source file list.
22291         * MODULES.html.sh (func_all_modules): Add getnline.
22292
22293 2003-07-17  Bruno Haible  <bruno@clisp.org>
22294
22295         * m4/getnline.m4: New file.
22296
22297 2003-07-17  Bruno Haible  <bruno@clisp.org>
22298
22299         * m4/Makefile.am.in: Remove file.
22300         * m4/Makefile.am: Remove file.
22301         * m4/Makefile.in: Remove file.
22302
22303 2003-07-17  Bruno Haible  <bruno@clisp.org>
22304
22305         * lib/getnline.h: New file.
22306         * lib/getnline.c: New file.
22307         * lib/getndelim2.c: New file, extracted from getline.c.
22308         (getndelim2): Renamed from getdelim2, with added nmax argument.
22309         * lib/getline.c: Include getndelim2.c.
22310         (getdelim2): Moved out to getndelim2.c.
22311         (getline, getdelim): Update.
22312
22313 2003-07-17  Bruno Haible  <bruno@clisp.org>
22314
22315         * lib/Makefile.am: Remove file.
22316         * lib/Makefile.in: Remove file.
22317
22318 2003-07-17  Bruno Haible  <bruno@clisp.org>
22319
22320         * configure.in: Remove file.
22321         * Makefile.in: Remove file.
22322
22323 2003-07-17  Bruno Haible  <bruno@clisp.org>
22324
22325         * MODULES.html.sh: Put the </BODY> right before </HTML>.
22326
22327 2003-07-16  Karl Berry  <karl@gnu.org>
22328
22329         * config/srclist-update: was running fixlicense twice, which caused
22330                 texinfo.tex to be nullified for some reason.  Simplify,
22331                 $gplsrc is no longer needed as far as I can see?
22332
22333 2003-07-16  Jim Meyering  <jim@meyering.net>
22334
22335         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
22336
22337 2003-07-15  Paul Eggert  <eggert@twinsun.com>
22338
22339         * config/srclist.txt: Get the following files from gettext-runtime/intl
22340         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
22341         ref-del.sin.  From Bruno Haible.
22342         * config/srclist-update (fixfile): Change grep pattern again, since the
22343         previous fix didn't work (there was another trailing $).  Use
22344         '[$]' to escape the $s.
22345
22346 2003-07-15  Karl Berry  <karl@gnu.org>
22347
22348         * lib/vasnprintf.c: update from gettext.
22349
22350 2003-07-15  Karl Berry  <karl@gnu.org>
22351
22352         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
22353         gets expanded when surrounded by '$'.
22354
22355 2003-07-15  Jim Meyering  <jim@meyering.net>
22356
22357         * modules/save-cwd: Don't depend on error.  From Derek Price.
22358
22359 2003-07-15  Jim Meyering  <jim@meyering.net>
22360
22361         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
22362
22363 2003-07-14  Simon Josefsson  <jas@extundo.com>
22364
22365         * modules/mempcpy: New file.
22366         * MODULES.html.sh (func_all_modules): Add mempcpy.
22367
22368 2003-07-14  Simon Josefsson  <jas@extundo.com>
22369
22370         * m4/mempcpy.m4: New file.
22371
22372 2003-07-14  Simon Josefsson  <jas@extundo.com>
22373
22374         * lib/mempcpy.h: New file.
22375         * lib/mempcpy.c: New file.
22376
22377 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22378
22379         * modules/getdate, modules/posixtm: Depend on mktime.
22380
22381 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22382
22383         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
22384         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
22385         unicodeio.c, unicodeio.h, unlocked-io.h:
22386         Switch from LGPL to GPL.
22387
22388 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22389
22390         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
22391         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
22392         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
22393         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
22394         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
22395         updated automatically by ../config/srclist-update.  This changes
22396         their license from LPGL to GPL.
22397
22398 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22399
22400         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
22401         assumed to refer to the root of the most recent stable gettext version.
22402         * config/srclistvars.sh: Add defaults for eggert.
22403         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
22404         Match "This program" as well as "The program".  This is needed
22405         for gettext.
22406
22407 2003-07-14  Jim Meyering  <jim@meyering.net>
22408
22409         Don't emit diagnostics.  Let callers do that.
22410         * lib/save-cwd.c: Don't include "error.h".
22411         (save_cwd): Don't call error.  Ensure that errno is valid
22412         when returning nonzero.
22413
22414         * lib/save-cwd.h (restore_cwd): Update prototype.
22415         * lib/save-cwd.c (restore_cwd): Remove two parameters.
22416         Simplify.  Don't call error upon failure.  Let callers do that.
22417         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
22418         when auditing is enabled.  But don't bother updating the #if.
22419
22420 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
22421
22422         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
22423         it breaks C++ compilation.
22424         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
22425
22426 2003-07-10  Simon Josefsson  <jas@extundo.com>
22427
22428         * modules/strchrnul (Makefile.am): Add strchrnul.h.
22429
22430 2003-07-10  Jim Meyering  <jim@meyering.net>
22431
22432         * m4/clock_time.m4: Remove trailing blank.
22433         * m4/intmax_t.m4: Likewise.
22434
22435 2003-07-10  Jim Meyering  <jim@meyering.net>
22436
22437         * lib/vasnprintf.c: Remove trailing blanks.
22438         Make cpp indentation consistent.
22439
22440 2003-07-09  Paul Eggert  <eggert@twinsun.com>
22441
22442         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
22443         posixver.c, strftime.c, strnlen.c, strverscmp.c:
22444         Switch from LGPL to GPL.
22445
22446 2003-07-09  Paul Eggert  <eggert@twinsun.com>
22447
22448         * config/srclist.txt: Sort sublists.  Add
22449         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
22450         that differ from gnulib for one reason or another; we'd like this list
22451         to be smaller but for now let's document what we have.
22452
22453 2003-07-08  Paul Eggert  <eggert@twinsun.com>
22454
22455         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
22456         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
22457         and sweeter "eval x=$x".
22458         * config/srclist.txt: Get lib/argp* from glibc.
22459
22460 2003-07-07  Paul Eggert  <eggert@twinsun.com>
22461
22462         * lib/mktime.c: Fix some boundary cases and remove need for floating
22463         point.
22464
22465         Issue a compile-time diagnostic if time_t is floating point, or if
22466         two's complement arithmetic is not in effect, or if arithmetic
22467         right shift does not propagate the sign.  These assumptions were
22468         all in the original code but they weren't checked.
22469
22470         (TIME_T_MIDPOINT, verify): New macros.
22471         (__isleap): Remove; it has integer overflow problems.
22472         (leapyear): New function, without those problems.
22473         (ydhms_tm_diff): Remove; splitting into two parts.
22474         (ydhms_diff): New function, containing the arithmetic part of
22475         the old ydhms_tm_diff function.  Issue a compile-time
22476         diagnostic if we are not using C99 integer division.
22477         Avoid casts when possible.
22478         (guess_time_tm): New function, containing the checking part of
22479         the old ydhms_tm_diff function.  Return the new value, rather than
22480         the difference between it and the old.  Accept a new argument T
22481         so that *T specifies the old value.  Check for overflow in the result.
22482
22483         (__mktime_internal): Use a time_t offset, not a long int offset.
22484         This undoes the 2003-06-04 change, which is no longer needed now
22485         that we have better overflow checking.
22486         (localtime_offset): Likewise.
22487
22488         (__mktime_internal): Avoid harmful overflow on hosts where time_t
22489         and long are 64-bit but int is only 32-bit.
22490         (ydhms_diff): Use long int to store year1 and yday1.
22491         Issue a compile-time diagnostic if long int is not wide enough.
22492
22493         (__mktime_internal): Use long int to store adjusted year and yday.
22494         Use plain C rather than preprocessor commands, if that doesn't
22495         affect efficiency.
22496         Check for overflow (and try to repair) after each probe
22497         rather than checking only at the very end.  This avoids some bugs
22498         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
22499         does not equal GMT offset at maximum time).
22500         Use integer to check for overflow rather than floating point; this
22501         is more portable to non-IEEE hosts, and is a tad faster.
22502         When we detect that we are oscillating between two values,
22503         don't check whether tm_isdst has the requested value, since
22504         we already know the answer.  When tm_isdst has the wrong value,
22505         use a different heuristic to find the right one, based on the
22506         extreme values actually observed in practice in tz2003a,
22507         rather than the (overly optimistic) "previous 3 calendar quarters".
22508
22509         (not_equal_tm, print_tm, check_result): Use "const T" rather than
22510         "T const" to accommodate glibc style.
22511         (check_result): Use less-confusing report format.  "long" -> "long int.
22512         (main): Likewise.
22513         Don't loop if the iteration overflows time_t.
22514         Allow a negative step in the iteration.
22515
22516 2003-07-06  Karl Berry  <karl@gnu.org>
22517
22518         * config/depcomp: update from automake.
22519         * config/config.sub: update from prep.
22520
22521 2003-07-03  Karl Berry  <karl@gnu.org>
22522
22523         * config/config.guess: update from prep.
22524
22525 2003-07-01  Paul Eggert  <eggert@twinsun.com>
22526
22527         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
22528         xreadlink.c now includes it unconditionally.
22529
22530 2003-07-01  Paul Eggert  <eggert@twinsun.com>
22531
22532         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
22533         having it depend on HAVE_SYS_TYPES_H.
22534
22535 2003-07-01  Bruno Haible  <bruno@clisp.org>
22536
22537         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
22538         <sys/types.h> should be sufficient.
22539         Reported by Paul Eggert.
22540
22541 2003-06-26  Karl Berry  <karl@gnu.org>
22542
22543         * config/depcomp: update from automake.
22544
22545 2003-06-26  Bruno Haible  <bruno@clisp.org>
22546
22547         * modules/human: Depend on module stdbool.
22548
22549 2003-06-25  Bruno Haible  <bruno@clisp.org>
22550
22551         * modules/readlink: New file.
22552         * modules/xreadlink: Depend on it.
22553         * MODULES.html.sh (func_all_modules): Add readlink.
22554
22555 2003-06-25  Bruno Haible  <bruno@clisp.org>
22556
22557         * m4/readlink.m4: New file.
22558
22559 2003-06-25  Bruno Haible  <bruno@clisp.org>
22560
22561         * lib/readlink.c: New file.
22562
22563 2003-06-22  Karl Berry  <karl@gnu.org>
22564
22565         * config/srclist.txt: update mkinstalldirs from automake.
22566         * config/mkinstalldirs: update.
22567
22568 2003-06-22  Bruno Haible  <bruno@clisp.org>
22569
22570         Portability to mingw32.
22571         * m4/ssize_t.m4: New file, from GNU gettext.
22572         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
22573         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
22574
22575 2003-06-22  Bruno Haible  <bruno@clisp.org>
22576
22577         * modules/safe-read: Add m4/ssize_t.m4.
22578         * modules/xreadlink: Add m4/ssize_t.m4.
22579
22580 2003-06-20  Bruno Haible  <bruno@clisp.org>
22581
22582         Assume C89, so PARAMS isn't needed.
22583         * lib/unicodeio.h (PARAMS): Remove.
22584         * lib/unicodeio.c: Don't use PARAMS.
22585
22586 2003-06-18  Karl Berry  <karl@gnu.org>
22587
22588         * config/config.{guess,sub}: update from prep.
22589
22590 2003-06-18  Jim Meyering  <jim@meyering.net>
22591
22592         Merge changes from coreutils.
22593         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
22594         Remove explicit declarations of xmalloc and realloc.
22595         Include xalloc.h.
22596         (read_utmp): Remove anachronistic cast of xmalloc.
22597
22598 2003-06-17  Paul Eggert  <eggert@twinsun.com>
22599
22600         Assume C89, so PARAMS isn't needed.
22601         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
22602         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
22603         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
22604         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
22605         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
22606         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
22607         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
22608         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
22609         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
22610         lib/xstrtod.h, lib/xstrtol.h: Likewise.
22611         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
22612         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
22613         no longer needed. Anyway, config.h should always be included before any
22614         other file.
22615
22616 2003-06-11  Simon Josefsson  <jas@extundo.com>
22617
22618         * modules/sysexits: New file.
22619         * MODULES.html.sh (func_all_modules): Add sysexits.
22620
22621 2003-06-11  Simon Josefsson  <jas@extundo.com>
22622
22623         * lib/sysexit_.h: New file.
22624
22625 2003-06-11  Derek Price  <derek@ximbiot.com>
22626
22627         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
22628         necessary.
22629
22630 2003-06-11  Bruno Haible  <bruno@clisp.org>
22631
22632         * m4/sysexits.m4: New file.
22633
22634 2003-06-10  Simon Josefsson  <jas@extundo.com>
22635
22636         * lib/argp.h: New file, from glibc.
22637         * lib/argp-ba.c: New file, from glibc.
22638         * lib/argp-eexst.c: New file, from glibc.
22639         * lib/argp-fmtstream.c: New file, from glibc.
22640         * lib/argp-fmtstream.h: New file, from glibc.
22641         * lib/argp-fs-xinl.c: New file, from glibc.
22642         * lib/argp-help.c: New file, from glibc.
22643         * lib/argp-namefrob.h: New file, from glibc.
22644         * lib/argp-parse.c: New file, from glibc.
22645         * lib/argp-pv.c: New file, from glibc.
22646         * lib/argp-pvh.c: New file, from glibc.
22647         * lib/argp-xinl.c: New file, from glibc.
22648
22649 2003-06-10  Simon Josefsson  <jas@extundo.com>
22650
22651         * modules/strchrnul: New file.
22652
22653 2003-06-10  Simon Josefsson  <jas@extundo.com>
22654
22655         * modules/argp: New file.
22656
22657 2003-06-10  Simon Josefsson  <jas@extundo.com>
22658
22659         * m4/strchrnul.m4: New file.
22660
22661 2003-06-10  Simon Josefsson  <jas@extundo.com>
22662
22663         * lib/strchrnul.h: New file.
22664         * lib/strchrnul.c: New file.
22665
22666 2003-06-10  Bruno Haible  <bruno@clisp.org>
22667
22668         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
22669
22670 2003-06-07  Karl Berry  <karl@gnu.org>
22671
22672         * config/config.{guess,sub}: update from prep.
22673
22674 2003-06-07  Jim Meyering  <jim@meyering.net>
22675
22676         * modules/strtod: Use $(...) notation, not @...@ for
22677         AC_REPLACE'd variables.
22678         * modules/localcharset: Likewise.
22679
22680 2003-06-07  Jim Meyering  <jim@meyering.net>
22681
22682         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
22683         in place of my name in the copyright comment.
22684         Remove definition and uses of __P.
22685
22686         From coreutils.
22687         * lib/stat.c: Don't declare xmalloc explicitly.
22688         Instead, include "xalloc.h".
22689         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
22690         xrealloc, and xcalloc return values.
22691         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
22692         Improve comment.
22693         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
22694
22695 2003-06-07  Bruno Haible  <bruno@clisp.org>
22696
22697         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
22698         avoid AC_CONFIG_LINKS.
22699         * modules/fnmatch (Makefile.am): Use explicit creation rule for
22700         fnmatch.h, to avoid AC_CONFIG_LINKS.
22701         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
22702
22703 2003-06-07  Bruno Haible  <bruno@clisp.org>
22704
22705         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
22706         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
22707         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
22708         directory.
22709         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
22710         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
22711         directory.
22712
22713 2003-06-06  Jim Meyering  <jim@meyering.net>
22714
22715         Merge from coreutils.
22716         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
22717         Consolidate declarations and initializations of *_base* locals.
22718
22719         Merge from coreutils.
22720         This avoids a core dump on systems without GNU putenv,
22721         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
22722         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
22723         (unsetenv): New static function, from GNU libc.
22724         (rpl_putenv): Use it.
22725
22726         * lib/modechange.c: Remove trailing blanks.
22727
22728         Merge from coreutils.
22729         * lib/fsusage.c: Remove declaration of statfs.
22730         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
22731
22732         * lib/posixtm.c: Include <stdbool.h> unconditionally.
22733
22734 2003-06-06  Jim Meyering  <jim@meyering.net>
22735
22736         * lib/stdbool_.h: Renamed from stdbool.h.in.
22737
22738 2003-06-06  Jim Meyering  <jim@meyering.net>
22739             Bruno Haible  <bruno@clisp.org>
22740
22741         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
22742         Adjust Makefile.am snippet not to redirect directly to target.
22743         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
22744
22745 2003-06-05  Paul Eggert  <eggert@twinsun.com>
22746
22747         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
22748         mismatch, look in future quarters as well as past.  This fixes a
22749         bug when processing fall-backwards gaps immediately after a long
22750         period of daylight-saving time.
22751
22752         * lib/mktime.c: Assume freestanding C89 or better.
22753         (HAVE_LIMITS_H): Remove.  Assume it's 1.
22754         (__P): Remove; not used.
22755         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
22756         (mktime, not_equal_tm, print_tm, check_result,
22757         main): Use prototypes.  Use const * where appropriate.
22758         (main): Fix typo in testing code that uncovered by above changes.
22759         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
22760
22761 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22762
22763         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
22764         locale.h, localeconv.  This merges changes from coreutils.
22765
22766         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
22767         It can be removed after the next Autoconf is released.
22768         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
22769         needed.
22770
22771 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22772
22773         * lib/mktime.c: Fix Debian bug 177940
22774         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
22775         (localtime_offset): Now long int, not time_t, because we want it
22776         to be guaranteed to be signed.  All uses changed.
22777         (__mktime_internal): If overflow would occur when adding offset,
22778         don't add it.
22779
22780         Merge 'human' changes from coreutils.  Rewrite to support
22781         locale-specific notations like thousands separators.
22782         * lib/human.c: Simplify authorship notice.
22783         Include human.h immediately after config.h.
22784         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
22785         <limits.h>: Do not include, since human.h does.
22786         (SIZE_MAX, UINTMAX_MAX): New macros.
22787         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
22788         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
22789         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
22790         (power_letter): Renamed from suffixes.
22791         (generate_suffix_backwards): Remove.
22792         (adjust_value): Now takes int style (because of human.h changes)
22793         and long double value (for greater precision on some platforms).
22794         (group_number): New function.
22795         (human_readable): Use it.  Use integer options, not enum.
22796         Put the options before the sizes in the arg list.
22797         Support all the new options.
22798         The old human_readable function has been removed;
22799         use inttostr.h instead.
22800         (human_readable, default_block_size, humblock):
22801         Use uintmax_t, not int, for block sizes.
22802         (human_readable_inexact, block_size_types): Remove.
22803         (block_size_opts): New constant.
22804         (human_options): Renamed from human_block_size, with new signature
22805         that allows block sizes up to UINTMAX_MAX.  All callers changed.
22806         * lib/human.h: Add copyright and authorship notice.
22807         Include <limits.h> and <stdbool.h> unconditionally.
22808         (PARAMS): Remove.  All uses removed.
22809         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
22810         (enum human_inexact_style): Remove tag; now a nameless enum.
22811         (human_floor, human_ceiling, human_round_to_even): Now have
22812         values 2, 0, 1 rather than -1, 1, 0.
22813         (human_group_digits, human_suppress_point_zero, human_autoscale,
22814         human_base_1024, human_SI, human_B): New constants.
22815         (human_readable_inexact, human_block_size): Remove.
22816         (human_readable): Size args are now uintmax_t, not int.
22817         (human_options): New decl.
22818
22819         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
22820         unnecessary now that we assume C89 or better.  This change
22821         imported from coreutils.
22822
22823         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
22824         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
22825         in the 2003-05-30 sync from glibc.
22826
22827         .h files should stand alone, but we shouldn't include <sys/types.h>
22828         if we can get away with just <stddef.h>.
22829
22830         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
22831         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
22832         rather than <sys/types.h>, as we merely need size_t.
22833         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
22834         to get size_t.
22835         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
22836         Include <stdio.h>, to get FILE.
22837         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
22838         memcasecmp.h has included <stddef.h> and all we need is size_t.
22839         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
22840         our interface, instead of including <sys/types.h>
22841
22842 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22843
22844         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
22845         now, as glibc mktime is buggy on non-glibc systems.
22846
22847 2003-06-03  Karl Berry  <karl@gnu.org>
22848
22849         * config/config.sub: update from prep.
22850
22851 2003-06-02  Paul Eggert  <eggert@twinsun.com>
22852
22853         [from coreutils]
22854         Fix some minor time-related bugs with POSIX time arguments.
22855         Some valid time stamps were being rejected (notably -1, and
22856         time stamps before 1900 on 64-bit hosts).  And some invalid
22857         time stamps were being accepted, e.g. September 31.
22858
22859         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
22860         that we can return (time_t) -1 successfully.
22861         * lib/posixtm.c: Likewise.
22862         [HAVE_STDBOOL_H]: Include <stdbool.h>.
22863         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
22864         (t): Remove static var.
22865         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
22866         of static var.  All uses changed.
22867         (year): Do not reject years before 1900; they can occur with
22868         64-bit time_t.
22869         (posix_time_parse): Do not check for out-of-range components;
22870         that is now the caller's responsibility, since our checks were
22871         only approximations.
22872         (posixtime): Use mktime to check for out-of-range components,
22873         since it knows them exactly.
22874         If mktime returns (time_t) -1, check whether an error actually occurred
22875         by invoking localtime on -1.
22876         (main) [TEST_POSIXTIME]: Check for input data errors, and report
22877         posixtime failures better.
22878         Improve the test data (in comments only).
22879
22880 2003-06-02  Karl Berry  <karl@gnu.org>
22881
22882         * config/mkinstalldirs (version): new variable.
22883         (--version): new option.
22884         (usage): improve message.
22885
22886 2003-05-30  Karl Berry  <karl@gnu.org>
22887
22888         * lib/mktime.c: update from libc.
22889
22890 2003-05-30  Bruno Haible  <bruno@clisp.org>
22891
22892         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
22893         * config/config.rpath: Upgrade to gettext-0.12.1.
22894
22895 2003-05-30  Bruno Haible  <bruno@clisp.org>
22896
22897         * m4/gettext.m4: Upgrade to gettext-0.12.1.
22898         * m4/nls.m4: New file, from gettext-0.12.1.
22899         * m4/po.m4: New file, from gettext-0.12.1.
22900         * m4/progtest.m4: Upgrade to gettext-0.12.1.
22901
22902 2003-05-30  Bruno Haible  <bruno@clisp.org>
22903
22904         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
22905         * lib/localcharset.h: Likewise.
22906         * lib/localcharset.c: Likewise.
22907
22908 2003-05-29  Karl Berry  <karl@gnu.org>
22909
22910         * config/config.rpath: update from gettext.
22911
22912 2003-05-28  Paul Eggert  <eggert@twinsun.com>
22913
22914         Assume the headers required for C89 freestanding compilers.
22915         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
22916         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
22917         * m4/human.m4 (gl_HUMAN): Likewise.
22918         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
22919         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
22920         * m4/userspec.m4 (gl_USERSPEC): Likewise.
22921         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
22922         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
22923         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
22924
22925 2003-05-28  Paul Eggert  <eggert@twinsun.com>
22926
22927         Assume the headers required for C89 freestanding compilers.
22928         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
22929         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
22930         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
22931         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
22932         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
22933         define, since <limits.h> is guaranteed to do that.
22934         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
22935         * lib/exclude.c: Include <stdbool.h> unconditionally.
22936         * lib/tempname.c: Include <stddef.h> unconditionally.
22937         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
22938         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
22939         <stddef.h> does that.
22940         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
22941         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
22942         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
22943         needed.
22944         * lib/xstrtol.c: Likewise.
22945         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
22946         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
22947
22948         * lib/addext.c (addext): Use assignment rather than cast, to avoid
22949         warnings on some platforms.
22950
22951         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
22952         arbitrarily.
22953
22954 2003-05-26  Jim Meyering  <jim@meyering.net>
22955
22956         Merge in a change from coreutils:
22957         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
22958         that is guaranteed to be `no'.  Use `no_such_member' to indicate
22959         that condition, rather than `-1' which is slightly misleading.
22960         Change the name of the cache variable to have the gl_ prefix.
22961         Prompted by a patch from Richard Dawe for DJGPP.
22962
22963 2003-05-24  Karl Berry  <karl@gnu.org>
22964
22965         * config/config.guess: update from prep.
22966
22967 2003-05-22  Karl Berry  <karl@gnu.org>
22968
22969         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
22970
22971 2003-05-20  Karl Berry  <karl@gnu.org>
22972
22973         * config/config.guess: update from prep.
22974
22975 2003-05-18  Karl Berry  <karl@gnu.org>
22976
22977         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
22978         might actually be set by the user.
22979
22980         * config/depcomp, install-sh, mdate-sh: update from automake.
22981
22982 2003-05-17  Bruno Haible  <bruno@clisp.org>
22983
22984         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
22985         invalid expansion for AC_EGREP_CPP.
22986         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
22987         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
22988         Suggested by Akim Demaille <akim@epita.fr> in
22989         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
22990
22991 2003-05-12  Jim Meyering  <jim@meyering.net>
22992
22993         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
22994         the space-padded-by-default conversion specifiers, %e, %k, %l.
22995
22996 2003-05-12  Bruno Haible  <bruno@clisp.org>
22997
22998         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
22999         the string is longer than 4 KB.
23000
23001 2003-05-11  Karl Berry  <karl@gnu.org>
23002
23003         * config/config.{guess,sub}: update from prep.
23004
23005 2003-05-09  Bruno Haible  <bruno@clisp.org>
23006
23007         * modules/error: Add m4/strerror_r.m4 to file list.
23008
23009 2003-05-03  Bruno Haible  <bruno@clisp.org>
23010
23011         Upgrade to Unicode-4.0.
23012         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
23013         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
23014         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
23015         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
23016         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
23017         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
23018         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
23019         Change width of U+E0100..U+E01EF from 1 to 0.
23020
23021 2003-04-25  Jim Meyering  <jim@meyering.net>
23022
23023         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
23024         of type size_t, not int.
23025
23026 2003-04-25  Bruno Haible  <bruno@clisp.org>
23027
23028         * lib/copy-file.c: Include <stddef.h>, for size_t.
23029
23030 2003-04-21  Paul Eggert  <eggert@twinsun.com>
23031
23032         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
23033         code which expansion is under static control.  Patch imported from
23034         Akim Demaille's patch to Bison; see
23035         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
23036
23037 2003-04-14  Bruno Haible  <bruno@clisp.org>
23038
23039         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
23040
23041 2003-04-11  Jim Meyering  <jim@meyering.net>
23042
23043         Merge changes from Coreutils.
23044
23045         2003-03-22  Jim Meyering  <jim@meyering.net>
23046
23047         * lib/strftime.c (widen): Cast alloca return value to proper type.
23048
23049         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
23050
23051         From GNU libc.
23052         * lib/strftime.c (my_strftime): Handle very large width
23053         specifications for numeric values correctly.  Improve checks for
23054         overflow.
23055
23056         2003-01-19  Jim Meyering  <jim@meyering.net>
23057
23058         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
23059         definitions.
23060         (nl_get_alt_digit) [! defined my_strftime]: Define.
23061         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
23062         _nl_get_alt_digit and _nl_get_walt_digit.
23063
23064         * lib/strftime.c (my_strftime): Merge in locale-related changes from
23065         libc. These changes have no effect outside of _LIBC.
23066
23067 2003-04-10  Bruno Haible  <bruno@clisp.org>
23068
23069         * modules/findprog: New file.
23070         * MODULES.html.sh (func_all_modules): Add it.
23071
23072 2003-04-10  Bruno Haible  <bruno@clisp.org>
23073
23074         * m4/findprog.m4: New file.
23075         * m4/eaccess.m4: New file.
23076
23077 2003-04-10  Bruno Haible  <bruno@clisp.org>
23078
23079         * lib/findprog.h: New file, from GNU gettext.
23080         * lib/findprog.c: New file, from GNU gettext.
23081
23082 2003-04-05  Jim Meyering  <jim@meyering.net>
23083
23084         Merge changes from Coreutils.
23085
23086         * lib/exclude.h (PARAMS): Remove definition and uses.
23087         * lib/exclude.c: Remove uses of `PARAMS'.
23088
23089         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
23090         Add test-cases for DOS filenames. Declare program_name.
23091         (main): Set up program_name.  Patch by Rich Dawe.
23092
23093         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
23094         error from mntctl.
23095         Use mntctl's return value to drive the entry-processing loop, since
23096         we can't rely on the value of the vmt_length member in the last
23097         entry.  On some systems doing so could result in exhausting
23098         virtual memory.  Based in part on a patch from Mike Jetzer.
23099
23100 2003-04-04  Bruno Haible  <bruno@clisp.org>
23101
23102         * modules/linebreak: New file.
23103         * MODULES.html.sh (func_all_modules): Add it.
23104
23105 2003-04-04  Bruno Haible  <bruno@clisp.org>
23106
23107         * m4/linebreak.m4: New file.
23108
23109 2003-04-04  Bruno Haible  <bruno@clisp.org>
23110
23111         * lib/linebreak.h: New file, from GNU gettext.
23112         * lib/linebreak.c: New file, from GNU gettext with slight
23113         modifications.
23114         * lib/lbrkprop.h: New file, from GNU gettext.
23115
23116 2003-04-03  Bruno Haible  <bruno@clisp.org>
23117
23118         * modules/utf8-ucs4: New file.
23119         * modules/utf16-ucs4: New file.
23120         * modules/ucs4-utf8: New file.
23121         * modules/ucs4-utf16: New file.
23122         * MODULES.html.sh (func_all_modules): Add them.
23123
23124 2003-04-03  Bruno Haible  <bruno@clisp.org>
23125
23126         * m4/utf-ucs4.m4: New file.
23127         * m4/ucs4-utf.m4: New file.
23128
23129 2003-04-03  Bruno Haible  <bruno@clisp.org>
23130
23131         * lib/utf8-ucs4.h: New file, from GNU gettext.
23132         * lib/utf16-ucs4.h: New file, from GNU gettext.
23133         * lib/ucs4-utf8.h: New file, from GNU gettext.
23134         * lib/ucs4-utf16.h: New file, from GNU gettext.
23135
23136 2003-04-02  Bruno Haible  <bruno@clisp.org>
23137
23138         * modules/binary-io: New file.
23139         * MODULES.html.sh (func_all_modules): Add it.
23140
23141 2003-04-02  Bruno Haible  <bruno@clisp.org>
23142
23143         * lib/binary-io.h: New file, from GNU gettext.
23144
23145 2003-04-01  Bruno Haible  <bruno@clisp.org>
23146
23147         * modules/pathname: New file.
23148         * MODULES.html.sh (func_all_modules): Add it.
23149
23150 2003-04-01  Bruno Haible  <bruno@clisp.org>
23151
23152         * lib/pathname.h: New file, from GNU gettext.
23153         * lib/concatpath.c: New file, from GNU gettext.
23154
23155 2003-03-30  Bruno Haible  <bruno@clisp.org>
23156
23157         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
23158
23159 2003-03-30  Bruno Haible  <bruno@clisp.org>
23160
23161         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
23162         function chown() doesn't exist.
23163
23164 2003-03-28  Bruno Haible  <bruno@clisp.org>
23165
23166         * modules/copy-file: New file.
23167         * MODULES.html.sh (func_all_modules): Add it.
23168
23169 2003-03-28  Bruno Haible  <bruno@clisp.org>
23170
23171         * m4/copy-file.m4: New file.
23172
23173 2003-03-28  Bruno Haible  <bruno@clisp.org>
23174
23175         * lib/copy-file.h: New file, from GNU gettext.
23176         * lib/copy-file.c: New file, from GNU gettext.
23177
23178 2003-03-18  Jim Meyering  <jim@meyering.net>
23179
23180         * lib/quote.c (quote_n): Fix typo in comment.
23181
23182 2003-03-18  Bruno Haible  <bruno@clisp.org>
23183
23184         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
23185         checking.
23186         * m4/onceonly_2_57.m4: Likewise.
23187
23188 2003-03-17  Bruno Haible  <bruno@clisp.org>
23189
23190         * m4/onceonly.m4: Require autoconf 2.54 or newer.
23191         (m4_quote): Remove macro.
23192         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
23193
23194 2003-03-14  Jim Meyering  <jim@meyering.net>
23195
23196         Merge changes from Coreutils.
23197         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
23198         to be const, in order to avoid warnings.
23199         (obstack_room): Likewise.
23200         (obstack_empty_p): Likewise.
23201
23202 2003-03-14  Bruno Haible  <bruno@clisp.org>
23203
23204         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
23205         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
23206
23207 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23208
23209         Merge changes from Bison.
23210         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
23211         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
23212         when compiling Bison 1.875's `bitset bset = obstack_alloc
23213         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
23214         * lib/hash.c: Include <stdbool.h> unconditionally.
23215
23216 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23217
23218         * m4/onceonly.m4 (m4_quote): New macro.
23219         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
23220         Quote AC_FOREACH variable-expansions properly.
23221
23222 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23223
23224         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
23225
23226 2003-03-09  Paul Eggert  <eggert@twinsun.com>
23227
23228         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
23229         Reported by Bruce Becker; see:
23230         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
23231
23232 2003-03-03  Paul Eggert  <eggert@twinsun.com>
23233             Bruno Haible  <bruno@clisp.org>
23234
23235         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
23236         Reported by John Hughes, see
23237         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
23238
23239 2003-02-20  Bruno Haible  <bruno@clisp.org>
23240
23241         * MODULES.html.sh (func_all_modules): Add poll.
23242
23243 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23244
23245         * modules/poll: New file.
23246
23247 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23248
23249         * lib/poll_.h: New file.
23250         * lib/poll.c: New file.
23251
23252 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23253
23254         * m4/poll.m4: New file.
23255
23256 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23257
23258         * modules/mathl: New file.
23259
23260 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23261
23262         * lib/mathl.h: New file.
23263         * lib/acosl.c: New file.
23264         * lib/asinl.c: New file.
23265         * lib/atanl.c: New file.
23266         * lib/ceill.c: New file.
23267         * lib/cosl.c: New file.
23268         * lib/expl.c: New file.
23269         * lib/floorl.c: New file.
23270         * lib/frexpl.c: New file.
23271         * lib/ldexpl.c: New file.
23272         * lib/logl.c: New file.
23273         * lib/sincosl.c: New file.
23274         * lib/sinl.c: New file.
23275         * lib/sqrtl.c: New file.
23276         * lib/tanl.c: New file.
23277         * lib/trigl.c: New file.
23278         * lib/trigl.h: New file.
23279
23280 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23281
23282         * m4/mathl.m4: New file.
23283
23284 2003-02-18  Bruno Haible  <bruno@clisp.org>
23285
23286         * MODULES.html.sh (func_all_modules): Add mathl.
23287
23288 2003-02-17  Bruno Haible  <bruno@clisp.org>
23289
23290         * modules/mkdtemp: New module.
23291         * MODULES.html.sh (func_all_modules): Add it.
23292
23293 2003-02-17  Bruno Haible  <bruno@clisp.org>
23294
23295         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
23296
23297 2003-02-17  Bruno Haible  <bruno@clisp.org>
23298
23299         * lib/mkdtemp.h: New file, from GNU gettext.
23300         * lib/mkdtemp.c: New file, from GNU gettext.
23301
23302 2003-02-02  Jim Meyering  <jim@meyering.net>
23303
23304         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
23305         e.g. glibc-2.2.93.
23306
23307 2003-01-31  Bruno Haible  <bruno@clisp.org>
23308
23309         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
23310         'rpl_rename'.
23311         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
23312         'rpl_strnlen'.
23313         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
23314         'rpl_strtod'.
23315         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
23316         'rpl_utime'.
23317
23318 2003-01-31  Bruno Haible  <bruno@clisp.org>
23319
23320         * lib/rename.c: #undef rename before defining rpl_rename.
23321         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
23322
23323 2003-01-30  Bruno Haible  <bruno@clisp.org>
23324
23325         * modules/vasnprintf, modules/vasprintf: New modules.
23326         * MODULES.html.sh (func_all_modules): Add them.
23327
23328 2003-01-30  Bruno Haible  <bruno@clisp.org>
23329
23330         * m4/signed.m4: New file, from GNU gettext.
23331         * m4/longdouble.m4: New file, from GNU gettext.
23332         * m4/wchar_t.m4: New file, from GNU gettext.
23333         * m4/wint_t.m4: New file, from GNU gettext.
23334         * m4/vasnprintf.m4: New file.
23335         * m4/vasprintf.m4: New file.
23336
23337 2003-01-30  Bruno Haible  <bruno@clisp.org>
23338
23339         * lib/printf-args.h: New file, from GNU gettext.
23340         * lib/printf-args.c: New file, from GNU gettext.
23341         * lib/printf-parse.h: New file, from GNU gettext.
23342         * lib/printf-parse.c: New file, from GNU gettext.
23343         * lib/vasnprintf.h: New file, from GNU gettext.
23344         * lib/vasnprintf.c: New file, from GNU gettext.
23345         * lib/asnprintf.c: New file, from GNU gettext.
23346         * lib/vasprintf.h: New file, from GNU gettext with modifications.
23347         * lib/vasprintf.c: New file, from GNU gettext.
23348         * lib/asprintf.c: New file, from GNU gettext.
23349
23350 2003-01-29  Bruno Haible  <bruno@clisp.org>
23351
23352         * modules/stpncpy: New module.
23353         * MODULES.html.sh (func_all_modules): Add it.
23354
23355 2003-01-29  Bruno Haible  <bruno@clisp.org>
23356
23357         * m4/stpncpy.m4: New file.
23358
23359 2003-01-29  Bruno Haible  <bruno@clisp.org>
23360
23361         * lib/stpncpy.h: New file, from GNU gettext with modifications.
23362         * lib/stpncpy.c: New file, from GNU gettext with modifications.
23363
23364 2003-01-28  Bruno Haible  <bruno@clisp.org>
23365
23366         * modules/c-ctype: New module.
23367         * MODULES.html.sh (func_all_modules): Add it.
23368
23369 2003-01-28  Bruno Haible  <bruno@clisp.org>
23370
23371         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
23372         Paul Eggert.
23373         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
23374         Paul Eggert.
23375
23376 2003-01-27  Bruno Haible  <bruno@clisp.org>
23377
23378         * modules/xsetenv: New module.
23379         * MODULES.html.sh (func_all_modules): Add it.
23380
23381 2003-01-27  Bruno Haible  <bruno@clisp.org>
23382
23383         * lib/xsetenv.h: New file, from GNU gettext.
23384         * lib/xsetenv.c: New file, from GNU gettext.
23385
23386 2003-01-23  Jim Meyering  <jim@meyering.net>
23387
23388         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
23389         from working on systems without dirfd (at least Irix and OSF1/Tru64).
23390
23391 2003-01-23  Bruno Haible  <bruno@clisp.org>
23392
23393         * modules/minmax: New module.
23394         * MODULES.html.sh (func_all_modules): Add it.
23395
23396 2003-01-23  Bruno Haible  <bruno@clisp.org>
23397
23398         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
23399         Eggert.
23400
23401 2003-01-22  Bruno Haible  <bruno@clisp.org>
23402
23403         * modules/exit: New module.
23404         * MODULES.html.sh (func_all_modules): Add it.
23405
23406 2003-01-22  Bruno Haible  <bruno@clisp.org>
23407
23408         * lib/exit.h: New file, from GNU gettext.
23409
23410 2003-01-19  Bruno Haible  <bruno@clisp.org>
23411
23412         * gnulib-tool: Recognize option --extract-maintainer.
23413         (func_get_maintainer): New function.
23414         * modules/*: Add Maintainer entry.
23415
23416 2003-01-16  Jim Meyering  <jim@meyering.net>
23417
23418         * m4/regex.m4: The `regex' struct is both input and output.
23419         Initialize it before each use.  Patch by Tim Waugh.
23420
23421 2003-01-16  Bruno Haible  <bruno@clisp.org>
23422
23423         * MODULES.html.sh: Add a table of contents. Add the module name as
23424         leftmost column. Add hyperlinks.
23425
23426 2003-01-15  Bruno Haible  <bruno@clisp.org>
23427
23428         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
23429
23430 2003-01-15  Bruno Haible  <bruno@clisp.org>
23431
23432         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
23433         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
23434         suffix.
23435
23436 2003-01-15  Bruno Haible  <bruno@clisp.org>
23437
23438         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
23439
23440 2003-01-15  Bruno Haible  <bruno@clisp.org>
23441
23442         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
23443         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
23444
23445 2003-01-14  Jim Meyering  <jim@meyering.net>
23446
23447         * lib/same.c (same_name): Tweak a comment.
23448
23449 2003-01-14  Bruno Haible  <bruno@clisp.org>
23450
23451         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
23452         when a string comparison is sufficient.
23453
23454 2003-01-14  Bruno Haible  <bruno@clisp.org>
23455
23456         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
23457         'unsigned int'.
23458
23459 2003-01-14  Bruno Haible  <bruno@clisp.org>
23460
23461         * lib/hash-pjw.c: Add comment about low quality of this function.
23462
23463 2003-01-13  Bruno Haible  <bruno@clisp.org>
23464
23465         * modules/stpcpy: Distribute lib/stpcpy.h.
23466         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
23467
23468 2003-01-13  Bruno Haible  <bruno@clisp.org>
23469
23470         * modules/*: Add a description.
23471         * modules/strpbrk: Fix Makefile.am snippet.
23472         * modules/strtoimax: Fix dependencies.
23473         * modules/strtoumax: Likewise.
23474
23475 2003-01-13  Bruno Haible  <bruno@clisp.org>
23476
23477         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
23478         * modules/alloca (Makefile.am): All object files depend on alloca.h.
23479         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
23480
23481 2003-01-13  Bruno Haible  <bruno@clisp.org>
23482
23483         * gnulib-tool (func_create_testdir): Store config/* files in the main
23484         directory.
23485         * config.rpath: Move to ...
23486         * config/config.rpath: ... here.
23487         * modules/gettext: Contains config/config.rpath, not config.rpath.
23488         * modules/iconv: Likewise.
23489
23490 2003-01-12  Paul Eggert  <eggert@twinsun.com>
23491
23492         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23493         to avoid collisions with libcurses and libreadline.
23494
23495         * m4/getstr.m4: Remove.
23496         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
23497
23498 2003-01-12  Paul Eggert  <eggert@twinsun.com>
23499
23500         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23501         to avoid collisions with libcurses and libreadline.
23502
23503         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
23504         * lib/getstr.h, getstr.c: Remove.
23505         * lib/getline.c: Include "getline.h", to check interface.
23506         Move body of old getstr.c here: this defines MIN_CHUNK and
23507         declares getdelim2, which is renamed from getstr.
23508         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
23509
23510         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
23511         All uses changed.
23512         * lib/linebuffer.h: Likewise.
23513         (readline): Remove backward-compatibility macro.
23514
23515 2003-01-12  Paul Eggert  <eggert@twinsun.com>
23516
23517         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23518         to avoid collisions with libcurses and libreadline.
23519         * getstr: Remove.
23520         * MODULES.html.sh: Remove getstr.
23521         * modules/getline: Depend on unlocked-io, not getstr.
23522
23523 2003-01-12  Jim Meyering  <jim@meyering.net>
23524
23525         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
23526
23527 2003-01-10  Bruno Haible  <bruno@clisp.org>
23528
23529         * modules/alloca: Change Makefile.am requirements. Simplify Include
23530         requirements. Add lib/alloca_.h to file list.
23531
23532 2003-01-10  Bruno Haible  <bruno@clisp.org>
23533
23534         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
23535
23536 2003-01-10  Bruno Haible  <bruno@clisp.org>
23537
23538         * lib/alloca_.h: New file.
23539         * lib/getdate.y: Unconditionally include alloca.h.
23540         * lib/makepath.c: Likewise.
23541         * lib/setenv.c: Likewise.
23542         * lib/userspec.c: Likewise.
23543
23544 2003-01-09  Karl Berry  <karl@gnu.org>
23545
23546         * MODULES.html.sh: include `dirname $0` in PATH, to find
23547         gnulib-tool.
23548
23549 2003-01-09  Bruno Haible  <bruno@clisp.org>
23550
23551         * modules/stdbool: Change configure.ac, Makefile.am requirements.
23552         Simplify Include requirements. Add lib/stdbool.h.in to file list.
23553
23554 2003-01-09  Bruno Haible  <bruno@clisp.org>
23555
23556         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
23557
23558 2003-01-09  Bruno Haible  <bruno@clisp.org>
23559
23560         * lib/stdbool.h.in: New file.
23561
23562 2003-01-09  Bruno Haible  <bruno@clisp.org>
23563
23564         * gnulib-tool (func_all_modules): Ignore files ending in ~.
23565         * MODULES.html.sh: Likewise.
23566
23567 2003-01-08  Jim Meyering  <jim@meyering.net>
23568
23569         * lib/full-write.c: Undefine and define-away `const' after inclusion
23570         of errno.h, not before.  Suggestion from Bruno Haible.
23571
23572 2003-01-08  Bruno Haible  <bruno@clisp.org>
23573
23574         * modules/full-read: Depend on full-write.
23575
23576 2003-01-08  Bruno Haible  <bruno@clisp.org>
23577
23578         * lib/safe-read.c: Include specification header first, to ensure its
23579         selfcontainedness.
23580         * lib/full-write.c: Likewise.
23581
23582 2003-01-07  Jim Meyering  <jim@meyering.net>
23583
23584         * lib/full-write.c: Rework so that it may serve to define full_read,
23585         too.
23586         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
23587
23588 2003-01-07  Bruno Haible  <bruno@clisp.org>
23589
23590         * lib/strtoimax.c: Include <stdint.h> as an alternative to
23591         <inttypes.h>.
23592         * lib/xstrtol.h: Likewise.
23593         * lib/xstrtoimax.c: Likewise.
23594         * lib/xstrtoumax.c: Likewise.
23595         * lib/human.h: Likewise.
23596
23597         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
23598         on systems that have <inttypes.h> but not <stdint.h>.
23599
23600 2003-01-07  Bruno Haible  <bruno@clisp.org>
23601
23602         * MODULES.html.sh: Add copyright notice.
23603         (missed_files): Omit CVS directory entries.
23604         (func_module): Make it work with sed-3.02.
23605         * MODULES.txt: Remove file.
23606
23607 2003-01-06  Jim Meyering  <jim@meyering.net>
23608
23609         * lib/version-etc.c: Update year in translatable copyright string.
23610
23611 2003-01-03  Karl Berry  <karl@gnu.org>
23612
23613         * config/config.{guess,sub}: update from prep.
23614
23615 2003-01-02  Karl Berry  <karl@gnu.org>
23616
23617         * doc/COPYING.DOC: belatedly updated to 1.2.
23618
23619 2003-01-01  Karl Berry  <karl@gnu.org>
23620
23621         * gnulib-tool (func_verify_module): report module name $module in
23622         error message, not $1.
23623         * gnulib-tool (create-testdir): don't complain if destdir couldn't
23624         be created, only if it doesn't exist.
23625         * gnulib-tool (last_checkin_date): don't expand the $Date here.
23626
23627 2002-12-31  Paul Eggert  <eggert@twinsun.com>
23628
23629         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
23630
23631 2002-12-31  Paul Eggert  <eggert@twinsun.com>
23632
23633         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
23634         memcmp if strcoll doesn't work.
23635
23636 2002-12-31  Bruno Haible  <bruno@clisp.org>
23637
23638         * lib/utime.c (utime_null): No need to call ftruncate if the file was
23639         nonempty.
23640
23641 2002-12-31  Bruno Haible  <bruno@clisp.org>
23642
23643         * lib/memcoll.c (STRCOLL): New macro.
23644         (memcoll): Use it.
23645
23646 2002-12-31  Bruno Haible  <bruno@clisp.org>
23647
23648         * lib/localcharset.h: New file.
23649         * lib/localcharset.c: Include it.
23650         * lib/unicodeio.c: Likewise.
23651
23652 2002-12-31  Bruno Haible  <bruno@clisp.org>
23653
23654         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
23655         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
23656
23657 2002-12-31  Bruno Haible  <bruno@clisp.org>
23658
23659         * lib/getline.h: Include <stddef.h>, for size_t.
23660
23661         * lib/unicodeio.h: Include <stddef.h>, for size_t.
23662         * lib/unicodeio.c: Don't include <stddef.h>.
23663
23664 2002-12-31  Bruno Haible  <bruno@clisp.org>
23665
23666         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
23667         HAVE_TM_ZONE.
23668
23669 2002-12-24  Karl Berry  <karl@gnu.org>
23670
23671         * config/config.guess: update from prep.
23672
23673 2002-12-24  Bruno Haible  <bruno@clisp.org>
23674
23675         General infrasructure.
23676         * m4/README: Rewritten.
23677         * m4/onceonly.m4: New file.
23678         * m4/onceonly_2_57.m4: New file.
23679
23680         Module atexit.
23681         * m4/atexit.m4: New file.
23682
23683         Module strtod.
23684         * m4/strtod.m4: New file.
23685
23686         Module strtol.
23687         * m4/strtol.m4: New file.
23688
23689         Module strtoul.
23690         * m4/strtoul.m4: New file.
23691
23692         Module memchr.
23693         * m4/memchr.m4: New file.
23694
23695         Module memcmp.
23696         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
23697         (jm_FUNC_MEMCMP): Invoke it.
23698
23699         Module memcpy.
23700         * m4/memcpy.m4: New file.
23701
23702         Module memmove.
23703         * m4/memmove.m4: New file.
23704
23705         Module memset.
23706         * m4/memset.m4: New file.
23707
23708         Module strcspn.
23709         * m4/strcspn.m4: New file.
23710
23711         Module strpbrk.
23712         * m4/strpbrk.m4: New file.
23713
23714         Module strstr.
23715         * m4/strstr.m4: New file.
23716
23717         Module strerror.
23718         * m4/strerror.m4: New file.
23719
23720         Module mktime.
23721         * m4/mktime.m4: Renamed from jm-mktime.m4.
23722         (gl_PREREQ_MKTIME): New macro.
23723         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
23724
23725         Module malloc.
23726         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
23727         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
23728         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
23729
23730         Module realloc.
23731         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
23732         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
23733         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
23734
23735         Module strftime.
23736         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
23737         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
23738         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
23739         gl_TM_GMTOFF.
23740         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
23741
23742         Module xalloc.
23743         * m4/xalloc.m4: New file.
23744
23745         Module alloca.
23746         * m4/alloca.m4: New file.
23747
23748         Module putenv.
23749         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
23750         (jm_FUNC_PUTENV): Invoke it.
23751
23752         Module setenv.
23753         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
23754         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
23755         when invoked twice.
23756         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
23757         gt_FUNC_SETENV.
23758
23759         Module memrchr.
23760         * m4/memrchr.m4: New file.
23761
23762         Module stpcpy.
23763         * m4/stpcpy.m4: New file.
23764
23765         Module strcase.
23766         * m4/strcase.m4: New file.
23767
23768         Module strdup.
23769         * m4/strdup.m4: New file.
23770
23771         Module strnlen.
23772         * m4/strnlen.m4: New file.
23773
23774         Module strndup.
23775         * m4/strndup.m4: New file.
23776
23777         Module xstrtod.
23778         * m4/xstrtod.m4: New file.
23779
23780         Module xstrtol.
23781         * m4/xstrtol.m4: New file.
23782
23783         Module getdate.
23784         * m4/getdate.m4: New file.
23785
23786         Module unlocked-io.
23787         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
23788         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
23789         * m4/jm-glibc-io.m4n: Remove file.
23790
23791         Module long-options.
23792         * m4/long-options.m4: New file.
23793
23794         Module md5.
23795         * m4/md5.m4: New file.
23796
23797         Module sha.
23798         * m4/sha.m4: New file.
23799
23800         Module getstr.
23801         * m4/getstr.m4: New file.
23802
23803         Module getline.
23804         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
23805         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
23806         <sys/types.h>, for size_t. Use the function name gnu_getline, not
23807         simply getline. Infoke gl_PREREQ_GETLINE.
23808
23809         Module obstack.
23810         * m4/obstack.m4: New file.
23811
23812         Module hash.
23813         * m4/hash.m4: New file.
23814
23815         Module readtokens.
23816         * m4/readtokens.m4: New file.
23817
23818         Module strverscmp.
23819         * m4/strverscmp.m4: New file.
23820
23821         Module stdbool.
23822         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
23823         OSF/1.
23824
23825         Module strtoll.
23826         * m4/strtoll.m4: New file.
23827
23828         Module strtoull.
23829         * m4/strtoull.m4: New file.
23830
23831         Module strtoimax.
23832         * m4/strtoimax.m4: New file.
23833
23834         Module strtoumax.
23835         * m4/strtoumax.m4: New file.
23836
23837         Module xstrtoimax.
23838         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
23839         jm_AC_PREREQ_XSTRTOIMAX.
23840         Moved the strtol prerequisites to strtol.m4.
23841         Moved the strtoll prerequisites to strtoll.m4.
23842         Moved the strtoimax prerequisites to strtoimax.m4.
23843
23844         Module xstrtoumax.
23845         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
23846         jm_AC_PREREQ_XSTRTOUMAX.
23847         Moved the strtoul prerequisites to strtoul.m4.
23848         Moved the strtoull prerequisites to strtoull.m4.
23849         Moved the strtoumax prerequisites to strtoumax.m4.
23850
23851         Module chown.
23852         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
23853         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
23854
23855         Module dup2.
23856         * m4/dup2.m4: New file.
23857
23858         Module ftruncate.
23859         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
23860         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
23861
23862         Module getgroups.
23863         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
23864         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
23865
23866         Module gettimeofday.
23867         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
23868         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
23869         gl_PREREQ_GETTIMEOFDAY.
23870
23871         Module mkdir.
23872         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
23873         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
23874
23875         Module mkstemp.
23876         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
23877         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
23878         jm_AC_TYPE_UINTMAX_T.
23879         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
23880
23881         Module stat.
23882         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
23883         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
23884
23885         Module lstat.
23886         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
23887         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
23888
23889         Module timespec.
23890         * m4/timespec.m4 (gl_TIMESPEC): New macro.
23891         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
23892         * m4/st_mtim.m4: Indentation.
23893
23894         Module nanosleep.
23895         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
23896         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
23897         gl_PREREQ_NANOSLEEP.
23898
23899         Module regex.
23900         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
23901         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
23902         (gl_REGEX): New macro.
23903
23904         Module rename.
23905         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
23906         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
23907
23908         Module rmdir.
23909         * m4/rmdir.m4: New file.
23910
23911         Module utime.
23912         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
23913         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
23914         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
23915
23916         Module dirname.
23917         * m4/dirname.m4: New file.
23918
23919         Module getopt.
23920         * m4/getopt.m4: New file.
23921
23922         Module unistd-safer.
23923         * m4/unistd-safer.m4: New file.
23924
23925         Module fnmatch.
23926         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
23927         declaration.
23928         (gl_PREREQ_FNMATCH_EXTRA): New macro.
23929         (gl_FUNC_FNMATCH_POSIX): New macro.
23930         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
23931         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
23932         simply fnmatch.
23933
23934         Module exclude.
23935         * m4/exclude.m4: New file.
23936
23937         Module human.
23938         * m4/human.m4: New file.
23939
23940         Module acl.
23941         * m4/acl.m4: Nop.
23942
23943         Module backupfile.
23944         * m4/backupfile.m4: New file.
23945         * m4/d-ino.m4: Indentation.
23946
23947         Module fsusage.
23948         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
23949         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
23950         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
23951
23952         Module dirfd.
23953         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
23954         requirements.
23955
23956         Module euidaccess.
23957         * m4/euidaccess.m4: New file.
23958
23959         Module file-type.
23960         * m4/file-type.m4: New file.
23961
23962         Module fileblocks.
23963         * m4/fileblocks.m4: New file.
23964
23965         Module filemode.
23966         * m4/filemode.m4: New file.
23967
23968         Module isdir.
23969         * m4/isdir.m4: New file.
23970
23971         Module lchown.
23972         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
23973         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
23974
23975         Module makepath.
23976         * m4/makepath.m4: New file.
23977
23978         Module modechange.
23979         * m4/modechange.m4: New file.
23980
23981         Module mountlist.
23982         * m4/mountlist.m4: New file.
23983         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
23984         Indentation.
23985
23986         Module path-concat.
23987         * m4/path-concat.m4: New file.
23988
23989         Module pathmax.
23990         * m4/pathmax.m4: New file.
23991
23992         Module same.
23993         * m4/same.m4: New file.
23994
23995         Module save-cwd.
23996         * m4/save-cwd.m4: New file.
23997
23998         Module savedir.
23999         * m4/savedir.m4: New file.
24000
24001         Module xgetcwd.
24002         * m4/xgetcwd.m4: New file.
24003         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
24004
24005         Module xreadlink.
24006         * m4/xreadlink.m4: New file.
24007
24008         Module safe-read.
24009         * m4/safe-read.m4: New file.
24010
24011         Module safe-write.
24012         * m4/safe-write.m4: New file.
24013
24014         Module closeout.
24015         * m4/closeout.m4: New file.
24016
24017         Module stdio-safer.
24018         * m4/stdio-safer.m4: New file.
24019
24020         Module getpass.
24021         * m4/getpass.m4: New file.
24022
24023         Module getugroups.
24024         * m4/getugroups.m4: New file.
24025
24026         Module group-member.
24027         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
24028         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
24029
24030         Module idcache.
24031         * m4/idcache.m4: New file.
24032
24033         Module userspec.
24034         * m4/userspec.m4: New file.
24035
24036         Module gettime.
24037         * m4/clock_time.m4: New file.
24038         * m4/gettime.m4: New file.
24039
24040         Module settime.
24041         * m4/settime.m4: New file.
24042
24043         Module posixtm.
24044         * m4/posixtm.m4: New file.
24045
24046         Module gethostname.
24047         * m4/gethostname.m4: New file.
24048
24049         Module canon-host.
24050         * m4/canon-host.m4: New file.
24051
24052         Module gettext.
24053         * m4/codeset.m4: New file, from gettext-0.11.5.
24054         * m4/gettext.m4: New file, from gettext-0.11.5.
24055         * m4/glibc21.m4: New file, from gettext-0.11.5.
24056         * m4/iconv.m4: New file, from gettext-0.11.5.
24057         * m4/intdiv0.m4: New file, from gettext-0.11.5.
24058         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
24059         * m4/inttypes.m4: New file, from gettext-0.11.5.
24060         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
24061         * m4/isc-posix.m4: New file, from gettext-0.11.5.
24062         * m4/lcmessage.m4: New file, from gettext-0.11.5.
24063         * m4/lib-ld.m4: New file, from gettext-0.11.5.
24064         * m4/lib-link.m4: New file, from gettext-0.11.5.
24065         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
24066         * m4/progtest.m4: New file, from gettext-0.11.5.
24067         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
24068         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
24069         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
24070
24071         Module localcharset.
24072         * m4/localcharset.m4: New file.
24073
24074         Module hard-locale.
24075         * m4/hard-locale.m4: New file.
24076
24077         Module mbswidth.
24078         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
24079         onceonly macros.
24080         * m4/mbrtowc.m4: Add comment.
24081
24082         Module memcasecmp.
24083         * m4/memcasecmp.m4: New file.
24084
24085         Module memcoll.
24086         * m4/memcoll.m4: New file.
24087
24088         Module unicodeio.
24089         * m4/unicodeio.m4: New file.
24090
24091         Module rpmatch.
24092         * m4/rpmatch.m4: New file.
24093
24094         Module yesno.
24095         * m4/yesno.m4: New file.
24096
24097         Module exitfail.
24098         * m4/exitfail.m4: New file.
24099
24100         Module c-stack.
24101         * m4/c-stack.m4 (gl_C_STACK): New macro.
24102         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
24103
24104         Module error.
24105         * m4/error.m4 (gl_ERROR): New macro.
24106         (jm_PREREQ_ERROR): Use onceonly macros.
24107
24108         Module fatal.
24109         * m4/fatal.m4: New file.
24110
24111         Module getloadavg.
24112         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
24113         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
24114
24115         Module getpagesize.
24116         * m4/getpagesize.m4: New file.
24117
24118         Module getusershell.
24119         * m4/getusershell.m4: New file.
24120
24121         Module physmem.
24122         * m4/physmem.m4: New file.
24123
24124         Module posixver.
24125         * m4/posixver.m4: New file.
24126
24127         Module quotearg.
24128         * m4/quotearg.m4: New file.
24129
24130         Module quote.
24131         * m4/quote.m4: New file.
24132
24133         Module readutmp.
24134         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
24135
24136         Module sig2str.
24137         * m4/sig2str.m4: New file.
24138
24139         Other.
24140         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
24141         ulonglong.m4.
24142         * m4/intmax_t.m4: New file.
24143         * m4/d-type.m4: Indentation.
24144         * m4/jm-macros.m4: Update.
24145         * m4/prereq.m4 (jm_PREREQ): Update.
24146         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
24147         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
24148         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
24149         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
24150         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
24151         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
24152         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
24153         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
24154         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
24155         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
24156         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
24157         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
24158         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
24159         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
24160         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
24161         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
24162         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
24163         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
24164         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
24165
24166 2002-12-24  Bruno Haible  <bruno@clisp.org>
24167
24168         * MODULES.txt: Update according to m4/ changes.
24169
24170         Module gettext.
24171         * config.rpath: New file, from gettext-0.11.5.
24172
24173         * modules/*: New module descriptions.
24174         * gnulib-tool: New file.
24175         * MODULES.html.sh: New file.
24176
24177 2002-12-21  Karl Berry  <karl@gnu.org>
24178
24179         * doc/fdl.texi: update to version 1.2.
24180
24181 2002-12-19  Karl Berry  <karl@gnu.org>
24182
24183         * config/config.guess: update from prep.
24184
24185 2002-12-18  Bruno Haible  <bruno@clisp.org>
24186
24187         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
24188         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
24189
24190 2002-12-17  Bruno Haible  <bruno@clisp.org>
24191
24192         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
24193         stdlib.h, string.h.
24194
24195 2002-12-17  Bruno Haible  <bruno@clisp.org>
24196
24197         * lib/canon-host.c (strdup): Remove unused declaration.
24198
24199         * lib/fsusage.c: Include full_read.h.
24200         (get_fs_usage): Use full_read instead of safe_read.
24201
24202         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
24203
24204 2002-12-12  Karl Berry  <karl@gnu.org>
24205
24206         * config/config.guess: update from prep.
24207
24208 2002-12-11  Bruno Haible  <bruno@clisp.org>
24209
24210         * m4/setenv.m4: New file, from gettext-0.11.5.
24211
24212 2002-12-11  Bruno Haible  <bruno@clisp.org>
24213
24214         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
24215         not unsetenv().
24216         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
24217         modifications:
24218
24219         2002-12-11  Bruno Haible  <bruno@clisp.org>
24220
24221                 * setenv.c (alloca): Fall back to malloc.
24222                 (freea): New macro.
24223                 (setenv): Use freea() to free memory allocated with alloca().
24224
24225         2002-11-13  Bruno Haible  <bruno@clisp.org>
24226
24227                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
24228                 function declarations.
24229                 * unsetenv.c (unsetenv): Likewise.
24230
24231         2002-03-04  Bruno Haible  <bruno@clisp.org>
24232
24233                 Portability to AIX 4.3.3.
24234                 * unsetenv.c: New file, extracted from setenv.c.
24235                 * setenv.c: Move the unsetenv() function to unsetenv.c.
24236
24237         2001-12-20  Bruno Haible  <bruno@clisp.org>
24238
24239                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
24240                 use malloc instead. For SunOS 4.
24241
24242         2001-12-11  Bruno Haible  <bruno@clisp.org>
24243
24244                 * setenv.c: Declare alloca.
24245                 (compar_fn_t): New typedef.
24246                 (KNOWN_VALUE, STORE_VALUE): Use it.
24247
24248         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
24249         setenv.h.
24250
24251 2002-12-10  Paul Eggert  <eggert@twinsun.com>
24252
24253         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
24254         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
24255         Choose values that are less likely to collide with system fnmatch
24256         options.
24257         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
24258         defined (e.g., a pure POSIX system).
24259         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
24260         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
24261
24262 2002-12-06  Paul Eggert  <eggert@twinsun.com>
24263
24264         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
24265         a pain in practice to deal with generated m4 files.  This change
24266         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
24267
24268         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
24269         and jm-glibc-io.m4, as they are no longer a special case.
24270         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
24271         kludge and the auto-generation stuff.  Check only whether the
24272         functions are declared, not whether they exist, since older hosts
24273         that don't declare the functions can't use the optimization anyway.
24274
24275 2002-12-06  Jim Meyering  <jim@meyering.net>
24276
24277         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
24278
24279         Merge in changes from libc's misc/error.c, in preparation
24280         for the merge of gnulib's changes back into libc.
24281
24282         * lib/error.c (_): Define only if not already defined.
24283         Move definition to follow all #include directives.
24284         Include unlocked-io.h only if !_LIBC.
24285         [_LIBC]: Include <libio/libioP.h>.
24286         [USE_IN_LIBIO]: Include <libio/iolibio.h>
24287         (fflush): Tweak definition to use INTUSE.
24288         (putc): Define.
24289
24290 2002-12-05  Paul Eggert  <eggert@twinsun.com>
24291
24292         * lib/alloca.c [defined emacs]: Include "lisp.h".
24293         (xalloc_die) [defined emacs]: New macro.
24294         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
24295         [! defined emacs]: Include <xalloc.h>.
24296         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
24297         (pointer): Typedef to POINTER_TYPE *.
24298         (malloc): Remove decl; we now always use xmalloc.
24299         (alloca): Use old-style definition, since Emacs needs this.
24300         Check for arithmetic overflow when computing combined size.
24301
24302 2002-12-04  Paul Eggert  <eggert@twinsun.com>
24303
24304         Do not generate unlocked-io.h automatically, since it's easier to
24305         maintain it by hand.
24306
24307         * lib/unlocked-io.h: New file, from GNU diffutils,
24308         but with proper copyright notice and attribution.
24309         * lib/gen-uio: Remove.
24310         * lib/Makefile.am: Add copyright notice.
24311         (libfetish_a_SOURCES): Add unlocked-io.h.
24312         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
24313         (DISTCLEANFILES, io_functions): Remove macros.
24314         (EXTRA_DIST): Remove gen_uio.
24315         (unlocked-io.h): Remove rule.
24316
24317 2002-12-04  Jim Meyering  <jim@meyering.net>
24318
24319         Reflect the fact that stat.c and lstat.c are no longer generated.
24320         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
24321         (DISTCLEANFILES): Likewise.
24322         (EXTRA_DIST): Likewise.
24323         (all_local): Don't depend on stat.c or lstat.c.
24324         (stat.c, lstat.c): Remove rules.
24325         (EXTRA_DIST): Remove xstat.in.
24326
24327         * lib/xstat.in: Remove file.  Contents moved into stat.c.
24328         * lib/stat.c: New file.  Contents mostly from xstat.in.
24329         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
24330         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
24331
24332         * lib/safe-read.c: Rework so that it may serve to define safe_write,
24333         too.
24334         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
24335
24336 2002-12-03  Jim Meyering  <jim@meyering.net>
24337
24338         * lib/safe-read.c, safe-write.c: Change variable names and comments,
24339         but not semantics, to minimize the differences between these two files.
24340         (safe_read): Change comment to mention SAFE_READ_ERROR.
24341
24342         * lib/safe-read.c (IS_EINTR): Define.
24343         (safe_read): Use IS_EINTR in place of in-function cpp directives.
24344
24345 2002-12-02  Jim Meyering  <jim@meyering.net>
24346
24347         * lib/safe-read.c (EINTR): Define.
24348         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24349         (INT_MAX): Provide fallback.
24350         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
24351
24352         * lib/safe-read.h (SAFE_READ_ERROR): Define.
24353
24354 2002-12-02  Bruno Haible  <bruno@clisp.org>
24355
24356         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
24357         Define, taken from safe-read.c.
24358         (INT_MAX): Provide fallback.
24359         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
24360         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
24361
24362         * lib/safe-read.c (EINTR): Remove definition.
24363         (safe_read): Don't use EINTR if it is absent.
24364
24365 2002-12-01  Jim Meyering  <jim@meyering.net>
24366
24367         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
24368         zero.
24369         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
24370
24371 2002-11-27  Paul Eggert  <eggert@twinsun.com>
24372
24373         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
24374         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
24375         with `if (! (value < limit)) abort ();', for readability.
24376
24377 2002-11-26  Karl Berry  <karl@gnu.org>
24378
24379         * lib/strdup.c: copy from libc again, with jim's ok.
24380         * lib/.cppi-disable: re-add strdup.c
24381
24382 2002-11-25  Karl Berry  <karl@gnu.org>
24383
24384         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
24385         instead of "strtol.c".
24386
24387 2002-11-25  Karl Berry  <karl@gnu.org>
24388
24389         * config/install-sh: update from automake for variable quoting, $0 in
24390         error msgs, etc.
24391
24392         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
24393         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
24394         entry.
24395
24396 2002-11-25  Jim Meyering  <jim@meyering.net>
24397
24398         * lib/mktime.c: Sync from libc, now that it has the latest fix.
24399
24400 2002-11-24  Karl Berry  <karl@gnu.org>
24401
24402         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
24403         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
24404
24405 2002-11-24  Jim Meyering  <jim@meyering.net>
24406
24407         Update from coreutils:
24408
24409         * lib/mktime.c: Merge in changes from libc.
24410
24411         Avoid a link-time failure on some Linux systems.
24412         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
24413         (otherwise).
24414         (__mon_yday): Declare with the STATIC attribute.
24415         (__mktime_internal): Likewise.
24416         Based on a report from Greg Schafer.
24417
24418 2002-11-23  Jim Meyering  <jim@meyering.net>
24419
24420         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
24421         Use `unsigned', not `int', as type of index.
24422
24423         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
24424
24425         * lib/fsusage.c: Remove unneeded parentheses around operands of
24426         `defined'.
24427
24428 2002-11-22  Paul Eggert  <eggert@twinsun.com>
24429
24430         * lib/quotearg.h: Allow multiple inclusion by surrounding with
24431         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
24432         so that we can be included first.
24433         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
24434         * lib/quotearg.c: Include quotearg.h immediately after config.h.
24435         No need to include stddef.h or sys/types.h any more.
24436         Surround local include files with "", not "<>".
24437         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
24438         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
24439         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
24440         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
24441         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
24442         (ISPRINT): Remove; no longer needed now that we assume C89.
24443
24444         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
24445         Preserve errno.
24446
24447         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
24448         quotearg_char): Use SIZE_MAX rather than
24449         (size_t) -1 when we are talking about "infinity".
24450
24451         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
24452
24453 2002-11-22  Paul Eggert  <eggert@twinsun.com>
24454
24455         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
24456         hint that one should use `if (! x) abort ();' rather than `assert
24457         (x);', and anyway it's one less thing to worry about configuring.
24458         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
24459         hash_rehash, hash_insert): Use abort rather than assert.
24460
24461 2002-11-22  Bruno Haible  <bruno@clisp.org>
24462
24463         * lib/safe-read.h: Assume C89. Add comments.
24464         (safe_read): Change return type to size_t.
24465         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
24466         byte counts > SSIZE_MAX correctly.
24467         * lib/safe-write.h: New file.
24468         * lib/safe-write.c: New file.
24469         * lib/full-read.h: New file.
24470         * lib/full-read.c: New file.
24471         * lib/full-write.h: Assume C89. Add comments.
24472         * lib/full-write.c: Include safe-write.h.
24473         (full_write): Rewritten to use safe_write.
24474         Suggested by Jim Meyering and Paul Eggert.
24475
24476 2002-11-21  Jim Meyering  <jim@meyering.net>
24477
24478         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
24479
24480         Merge in changes from the coreutils.
24481
24482         2002-09-25  Paul Eggert  <eggert@twinsun.com>
24483         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
24484         <stdint.h>.
24485         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
24486         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
24487         int.  Work more efficiently if X is the same width as uintmax_t.
24488         Do not compare X to -1, to avoid bogus compiler warning.
24489         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
24490         Don't assume that f_frsize and f_bsize are the same type.
24491
24492         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
24493         warning on FreeBSD.
24494
24495         * lib/makepath.c (make_path): Restore umask *before* creating the final
24496         component.
24497         (make_path): Minor reformatting.
24498
24499         * lib/xmalloc.c: Adjust to work with new autoconf macros,
24500         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
24501         HAVE_MALLOC/HAVE_REALLOC.
24502
24503         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
24504         dummy ones.  At least on GNU/Linux systems, `auto' means something
24505         else.
24506         From Michael Stone.
24507
24508 2002-11-21  Bruno Haible  <bruno@clisp.org>
24509
24510         Remove case insensitive option matching.
24511         * lib/argmatch.h (argcasematch): Remove declaration.
24512         (ARGCASEMATCH): Remove macro.
24513         (__xargmatch_internal): Remove case_sensitive argument.
24514         (XARGMATCH): Update.
24515         (XARGCASEMATCH): Remove macro.
24516         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
24517         case_sensitive argument.
24518         (argcasematch): Remove function.
24519         (__xargmatch_internal): Remove case_sensitive argument.
24520         (main): Use XARGMATCH instead of XARGCASEMATCH.
24521
24522         * lib/xmalloc.c: Change compile-time error message. Add comment about
24523         required autoconf version.
24524
24525 2002-11-20  Paul Eggert  <eggert@twinsun.com>
24526
24527         Merge argmatch cleanups from Bison.  Assume C89.
24528
24529         * lib/argmatch.c: Include config.h here, not in argmatch.h.
24530         Include stdlib.h, for EXIT_FAILURE.
24531         Always include <string.h>, since we assume C89.
24532         (EXIT_FAILURE): Remove pre-C89 bug workaround.
24533         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
24534         Include <stddef.h> instead, since it's all we need for size_t.
24535         (PARAMS): Remove.  All uses removed.
24536         (ARRAY_CARDINALITY): Do not bother to #undef.
24537         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
24538         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
24539         Remove unnecessary parentheses.
24540         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
24541         Insert necessary parentheses.
24542         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
24543         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
24544
24545 2002-11-19  Bruno Haible  <bruno@clisp.org>
24546
24547         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
24548         * lib/mbswidth.h: Include <stddef.h>, for size_t.
24549
24550         * lib/mbswidth.h (PARAMS): Remove macro.
24551         (mbswidth, mbsnwidth): Use ANSI C function declarations.
24552         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
24553
24554         * lib/gcd.h (PARAMS): Remove macro.
24555         (gcd): Use ANSI C function declarations.
24556         * lib/gcd.c (gcd): Likewise.
24557
24558 2002-11-15  Bruno Haible  <bruno@clisp.org>
24559
24560         * lib/strcspn.c: Include <stddef.h>.
24561         (strcspn): Use ANSI C function declaration. Change return type to
24562         size_t. Use NULL.
24563         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
24564         (strpbrk): Use NULL.
24565         * lib/strpbrk.h (PARAMS): Remove macro.
24566         (strpbrk): Use ANSI C function declaration.
24567         * lib/strstr.c: Don't include <sys/types.h>.
24568         * lib/strstr.h (PARAMS): Remove macro.
24569         (strstr): Use ANSI C function declarations.
24570
24571 2002-11-14  Karl Berry  <karl@gnu.org>
24572
24573         * config/mkinstalldirs: `do' on separate line, instead of
24574         `for var; do'.
24575
24576 2002-11-06  Bruno Haible  <bruno@clisp.org>
24577
24578         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
24579         * lib/gcd.c (gcd): Likewise.
24580
24581 2002-11-05  Bruno Haible  <bruno@clisp.org>
24582
24583         * lib/gcd.h: New file, from gettext-0.11.5.
24584         * lib/gcd.c: New file, from gettext-0.11.5.
24585
24586 2002-11-05  Bruno Haible  <bruno@clisp.org>
24587
24588         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24589         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24590         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24591         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24592
24593         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
24594         <libintl.h>.
24595         * lib/makepath.c: Include gettext.h instead of <locale.h> and
24596         <libintl.h>.
24597
24598         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
24599         * lib/human.c: Include gettext.h instead of <libintl.h>.
24600         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
24601         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
24602         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
24603         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
24604         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
24605         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
24606         (textdomain): Remove definition.
24607         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
24608
24609         * lib/long-options.c: Remove include of <libintl.h> and definition of
24610         _.
24611         * lib/same.c: Remove include of <libintl.h> and definition of _.
24612
24613 2002-11-04  Owen Taylor  <otaylor@redhat.com>
24614
24615         * lib/config.charset: A few additions for Solaris.
24616
24617 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
24618
24619         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
24620         * lib/localcharset.c (locale_charset): Declare as extern "C".
24621
24622 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
24623
24624         * lib/config.charset: msdos in uk_UA uses CP1125.
24625
24626 2002-11-04  Bruno Haible  <bruno@clisp.org>
24627
24628         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
24629         * lib/strcase.h: New file, from GNU gettext-0.11.5.
24630         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
24631         * lib/strstr.h: New file, from GNU gettext-0.11.5.
24632         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
24633
24634 2002-11-04  Bruno Haible  <bruno@clisp.org>
24635
24636         * lib/localcharset.c (locale_charset): Don't return an empty string.
24637
24638 2002-11-04  Bruno Haible  <bruno@clisp.org>
24639
24640         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
24641         aliases.
24642
24643 2002-11-04  Bruno Haible  <bruno@clisp.org>
24644
24645         * lib/config.charset: Update for newest glibc. Add canonical names
24646         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
24647
24648 2002-11-04  Bruno Haible  <bruno@clisp.org>
24649
24650         * lib/config.charset: Add support for NetBSD.
24651
24652 2002-11-04  Bruno Haible  <bruno@clisp.org>
24653
24654         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
24655
24656 2002-11-01  Bruno Haible  <bruno@clisp.org>
24657
24658         * configure.in: Add AC_CONFIG_AUX_DIR call.
24659         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
24660         test/Makefile.
24661         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
24662
24663 2002-09-28  Karl Berry  <karl@gnu.org>
24664
24665         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
24666         installed automake until the next release, since changes have been
24667         made.
24668
24669 2002-09-25  Karl Berry  <karl@gnu.org>
24670
24671         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
24672         * lib/getopt*: copy from libc/posix.
24673         * lib/gettext.h: copy from gettext.
24674         * lib/.cppi-disable: add strdup.c, gettext.h.
24675
24676 2002-09-25  Karl Berry  <karl@gnu.org>
24677
24678         * config/srclist.txt: enable gettext.h check.
24679         * config/config.{guess,sub}: update from prep.
24680         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
24681                 from automake 1.6.3.
24682         See srclist*.
24683
24684 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
24685
24686         * regex.c (PATFETCH): Remove the translating fetch.
24687         (PATFETCH_RAW): Rename to PATFETCH.
24688         (set_image_of_range): New fun.
24689         (SET_RANGE_TABLE_WORK_AREA): Use it.
24690         (regex_compile): Don't translate the pattern chars so eagerly.
24691         Only do it when inserting an `exactn' bytecode or when handling
24692         a char-range.
24693         (mutually_exclusive_p): Avoid empty statement.
24694
24695 2002-07-06  Jim Meyering  <meyering@lucent.com>
24696
24697         * m4/README: Don't mention Makefile.am.in.
24698         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
24699
24700 2002-07-01  Jim Meyering  <meyering@lucent.com>
24701
24702         * lib/c-stack.c: Include sys/time.h.
24703         From Volker Borchert.
24704
24705 2002-06-26  Paul Eggert  <eggert@twinsun.com>
24706
24707         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
24708
24709 2002-06-26  Paul Eggert  <eggert@twinsun.com>
24710
24711         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
24712         New macro.  Use it uniformly instead of
24713         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
24714         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
24715         reported by Vin Shelton.
24716
24717 2002-06-22  Paul Eggert  <eggert@twinsun.com>
24718
24719         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
24720         Do not assume SA_SIGINFO behavior.
24721         Bug reported by Jim Meyering on NetBSD 1.5.2.
24722
24723 2002-06-22  Jim Meyering  <meyering@lucent.com>
24724
24725         * m4/c-stack.m4: New file, from diffutils-2.8.2.
24726         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
24727
24728         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
24729         now that configure.ac uses AC_GNU_SOURCE.
24730         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
24731         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
24732
24733         Update to latest tools.  Suggestions from Paul Eggert.
24734         * m4/stdbool.m4: New file, from diffutils-2.8.2.
24735         * m4/gnu-source.m4: Update from diffutils-2.8.2.
24736         * m4/fnmatch.m4: Likewise.
24737         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
24738         to AC_HEADER_STDBOOL
24739
24740 2002-06-22  Jim Meyering  <meyering@lucent.com>
24741
24742         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
24743         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
24744
24745 2002-06-22  Jim Meyering  <meyering@lucent.com>
24746
24747         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
24748
24749         * lib/exitfail.c, exitfail.h: Likewise.
24750         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
24751
24752         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
24753         of fnmatch.h.
24754         (EXTRA_DIST): Add fnmatch_loop.c.
24755         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
24756
24757         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
24758         * lib/fnmatch.c: Update from diffutils-2.8.2.
24759         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
24760         * lib/fnmatch.h: Remove file.
24761
24762 2002-06-21  Jim Meyering  <meyering@lucent.com>
24763
24764         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
24765         * m4/mbrtowc.m4: Likewise.
24766
24767         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
24768         * m4/mbswidth.m4: Reflect name change:
24769         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
24770         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24771
24772         * m4/lib-link.m4: Update from gettext-0.11.2.
24773         * m4/gettext.m4: Likewise.
24774
24775         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
24776         From Alfred M. Szmidt.
24777
24778 2002-06-18  Paul Eggert  <eggert@twinsun.com>
24779
24780         * lib/file-type.h: Report an error if neither S_ISREG nor
24781         S_IFREG is defined, instead of using a test specific to glibc
24782         2.2.  This should be safe, since POSIX requires S_ISREG and
24783         Unix Version 7 had S_IFREG.  We don't need to check for
24784         <sys/types.h> since we don't use any symbols that it defines.
24785
24786 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
24787
24788         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
24789         $@-t, so that each temporary file name is unique and valid in the first
24790         8 characters, for operation under DOS.
24791
24792 2002-06-15  Paul Eggert  <eggert@twinsun.com>
24793
24794         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
24795
24796 2002-06-15  Jim Meyering  <meyering@lucent.com>
24797
24798         Work even with DJGPP 2.03, which lacks support for symlinks.
24799         From Richard Dawe.
24800         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
24801         is defined.
24802         * lib/lchown.c (S_ISLNK): Likewise.
24803
24804 2002-06-15  Jim Meyering  <meyering@lucent.com>
24805
24806         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
24807         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
24808         have been included before this file.
24809
24810 2002-06-14  Jim Meyering  <meyering@lucent.com>
24811
24812         * lib/file-type.h: Use the version from diffutils-2.8.2.
24813         * lib/file-type.c: Likewise.
24814
24815 2002-06-07  Jim Meyering  <meyering@lucent.com>
24816
24817         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
24818         They're needed at least for NetBSD 1.5.2.
24819         ($statxfs_includes): Include those same headers.
24820         ($statxfs_includes): Include sys/vfs.h if available.
24821         ($statxfs_includes): Likewise for sys/statvfs.h.
24822         Check for the following members in both structs statfs and statvfs:
24823         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
24824
24825 2002-06-01  Jim Meyering  <meyering@lucent.com>
24826
24827         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
24828         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
24829
24830 2002-05-28  Jim Meyering  <meyering@lucent.com>
24831
24832         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
24833         Reported by Volker Borchert.
24834
24835 2002-05-27  Jim Meyering  <meyering@lucent.com>
24836
24837         Fix a problem seen only on nonconforming systems whereby ls.c's
24838         use of localtime, and then of gettimeofday would cause trouble:
24839         the localtime call used to initialize rpl_gettimeofday's save
24840         mechanism would clobber ls's current local time information so
24841         that in any long listing the first file would always be listed
24842         with date 1970-01-01.  Analysis by Volker Borchert.
24843
24844         * lib/gettimeofday.c (localtime): Undefine.
24845         (rpl_localtime): New function.
24846
24847 2002-05-27  Jim Meyering  <meyering@lucent.com>
24848
24849         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
24850         localtime.
24851
24852         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
24853         use the replacement function; it wouldn't resolve at link time.
24854         Reported by Volker Borchert.
24855
24856 2002-05-22  Jim Meyering  <meyering@lucent.com>
24857
24858         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
24859         file-type.h.
24860         * lib/file-type.h: New file.
24861         * lib/file-type.c (file_type): New file/function.  Extracted from
24862         diffutils.
24863
24864 2002-04-30  Jim Meyering  <meyering@lucent.com>
24865
24866         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
24867
24868 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24869
24870         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
24871
24872 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24873
24874         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
24875         Do not check for alloca.h (no longer used) or stdbool.h (was never
24876         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
24877
24878 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24879
24880         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
24881
24882 2002-04-29  Jim Meyering  <meyering@lucent.com>
24883
24884         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
24885         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
24886         Use AC_FUNC_STRNLEN here instead.
24887
24888         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
24889         With autoconf-2.53a, it's part of AC_PROG_CC.
24890
24891 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24892
24893         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
24894         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
24895
24896 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24897
24898         * lib/sig2str.h, lib/sig2str.c: New files.
24899         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
24900
24901 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24902
24903         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
24904         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
24905         of 127, since 64 is the largest conceivable number for ancient
24906         nonstandard hosts.
24907         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
24908
24909 2002-04-28  Jim Meyering  <meyering@lucent.com>
24910
24911         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
24912
24913 2002-04-24  Jim Meyering  <meyering@lucent.com>
24914
24915         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
24916         (jm_PREREQ): Use it.
24917
24918         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
24919         mach/mach.h fcntl.h.
24920         Check for this function: setlocale.
24921
24922 2002-04-24  Jim Meyering  <meyering@lucent.com>
24923
24924         * lib/gettext.h: New file, from Gettext.
24925         * lib/Makefile.am (INCLUDES): Remove -I../intl.
24926         (libfetish_a_SOURCES): Add gettext.h.
24927
24928 2002-04-16  Jim Meyering  <meyering@lucent.com>
24929
24930         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
24931         ut_pid, ut_id, ut_exit.
24932
24933 2002-04-16  Jim Meyering  <meyering@lucent.com>
24934
24935         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
24936         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
24937         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
24938
24939 2002-04-12  Jim Meyering  <meyering@lucent.com>
24940
24941         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
24942         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
24943         existence of the getmntinfo function.  Needed for Darwin 5.3.
24944
24945         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
24946         This is necessary at least on Darwin 5.3.
24947
24948         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
24949         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
24950         strnlen.o in the library, and that makes some versions of ranlib
24951         object.
24952
24953 2002-04-12  Jim Meyering  <meyering@lucent.com>
24954
24955         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
24956
24957 2002-04-09  Jim Meyering  <meyering@lucent.com>
24958
24959         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
24960         to be more precise.  Rather than saying we're checking whether the
24961         function `works', say what we're testing.
24962         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
24963         Reported by Bruno Haible.
24964
24965 2002-03-10  Jim Meyering  <meyering@lucent.com>
24966
24967         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
24968         Suggestion from Santiago Vila.
24969
24970 2002-03-08  Jim Meyering  <meyering@lucent.com>
24971
24972         * lib/rename.c: Mention that this wrapper is needed also on
24973         mips-dec-ultrix4.4 systems.
24974
24975 2002-03-02  Jim Meyering  <meyering@lucent.com>
24976
24977         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
24978         not HAVE_CLOCK_SETTIME.
24979
24980 2002-02-27  Paul Eggert  <eggert@twinsun.com>
24981
24982         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
24983         Check for clock_settime.
24984
24985 2002-02-27  Paul Eggert  <eggert@twinsun.com>
24986
24987         * lib/nanosleep.h: Rename to....
24988         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
24989
24990         * lib/gettime.c: New file.
24991         * lib/settime.c: New file.
24992         * lib/stime.c: Remove.
24993
24994         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
24995         timespec.h.  Remove nanosleep.h.
24996
24997 2002-02-25  Paul Eggert  <eggert@twinsun.com>
24998
24999         * m4/acl.m4: New file.
25000         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
25001         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
25002
25003 2002-02-25  Paul Eggert  <eggert@twinsun.com>
25004
25005         * lib/acl.c, lib/acl.h: New files.
25006         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
25007
25008 2002-02-24  Jim Meyering  <meyering@lucent.com>
25009
25010         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
25011         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
25012         cause trouble.  Reported by Nelson Beebe.
25013
25014 2002-02-23  Paul Eggert  <eggert@twinsun.com>
25015
25016         * lib/path-concat.c (xpath_concat): Reorder code to pacify
25017         compilers that don't know that xalloc_die never returns.
25018
25019 2002-02-20  Jim Meyering  <meyering@lucent.com>
25020
25021         * lib/getdate.c: Regenerate using bison-1.33.
25022
25023 2002-02-17  Jim Meyering  <meyering@lucent.com>
25024
25025         * config/config.guess (main): Don't use `head -1'; it's no longer
25026         portable. Use `sed 1q' instead.
25027
25028 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
25029
25030         * m4/codeset.m4: Upgrade to gettext-0.11.
25031         * m4/gettext.m4: Upgrade to gettext-0.11.
25032         * m4/glibc21.m4: Upgrade to gettext-0.11.
25033         * m4/iconv.m4: Upgrade to gettext-0.11.
25034         * m4/isc-posix.m4: Upgrade to gettext-0.11.
25035         * m4/lcmessage.m4: Upgrade to gettext-0.11.
25036         * m4/lib-ld.m4: New file, from gettext-0.11.
25037         * m4/lib-link.m4: New file, from gettext-0.11.
25038         * m4/lib-prefix.m4: New file, from gettext-0.11.
25039         * m4/progtest.m4: Upgrade to gettext-0.11.
25040
25041 2002-02-15  Paul Eggert  <eggert@twinsun.com>
25042
25043         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
25044         (jm_PREREQ): Use it.
25045
25046 2002-02-15  Paul Eggert  <eggert@twinsun.com>
25047
25048         * lib/posixver.c, lib/posixver.h: New files.
25049         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
25050
25051 2002-02-02  Paul Eggert  <eggert@twinsun.com>
25052             Bruno Haible  <bruno@clisp.org>
25053
25054         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
25055         (fwrite_success_callback): New declaration.
25056         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
25057         print_unicode_char. Call failure callback instead of error.
25058         (fwrite_success_callback): New function.
25059         (exit_failure_callback): New function.
25060         (fallback_failure_callback): New function.
25061         (print_unicode_char): Call unicode_to_mb.
25062
25063 2002-01-26  Jim Meyering  <meyering@lucent.com>
25064
25065         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
25066         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
25067
25068 2002-01-26  Jim Meyering  <meyering@lucent.com>
25069
25070         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
25071
25072 2002-01-22  Paul Eggert  <eggert@twinsun.com>
25073
25074         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
25075
25076 2002-01-22  Jim Meyering  <meyering@lucent.com>
25077
25078         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
25079         Otherwise, some versions of automake would omit the rule that makes
25080         Makefile from Makefile.in.
25081
25082 2002-01-21  Paul Eggert  <eggert@twinsun.com>
25083
25084         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
25085         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
25086         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
25087         (memcoll): Set errno to zero if there is no error.
25088
25089         * lib/quotearg.c (quotearg_buffer_restyled):
25090         Fix bug with quoting buffers containing NUL when backslashing escapes.
25091         This bug was exposed by the other changes in this patch.
25092         (quotearg_n_options): New arg ARGSIZE.
25093         All callers changed.
25094         (quoting_options_from_style): New function.
25095         (quotearg_n_style): Use it.
25096         (quotearg_n_style_mem): New function.
25097
25098         * lib/quotearg.h (quotearg_n_style_mem): New function.
25099
25100 2002-01-19  Jim Meyering  <meyering@lucent.com>
25101
25102         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
25103         Remove useless quotes: DF_PROG="df".
25104         * m4/strnlen.m4: New file.
25105
25106 2002-01-16  Paul Eggert  <eggert@twinsun.com>
25107
25108         * lib/backupfile.c (ISDIGIT): Comment fix.
25109         * lib/getdate.y (ISDIGIT): Likewise.
25110         * lib/posixtm.c (ISDIGIT, year): Likewise.
25111         * lib/strverscmp.c (ISDIGIT): Likewise.
25112         * lib/userspec.c (ISDIGIT): Likewise.
25113
25114 2002-01-16  Jim Meyering  <meyering@lucent.com>
25115
25116         * lib/getdate.y: Add three semicolons, each just before a closing
25117         brace. Bison (as of version 1.31) no longer papers over that mistake.
25118
25119 2002-01-05  Jim Meyering  <meyering@lucent.com>
25120
25121         * lib/version-etc.c (version_etc_copyright): Update copyright year.
25122
25123 2001-12-19  Paul Eggert  <eggert@twinsun.com>
25124
25125         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
25126         not silently exit merely because the output buffer happens to
25127         have nothing pending.
25128
25129 2001-12-18  Paul Eggert  <eggert@twinsun.com>
25130
25131         See the big note in ../ChangeLog.
25132         * lib/human.c (suffixes): Prefer K to k for 1024.
25133         (generate_suffix_backwards): New function.
25134         (human_readable_inexact): Use it.
25135         * lib/xstrtol.c (__xstrtol): If there is no number but there
25136         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
25137         Accept 'K' as well as 'k'.
25138
25139 2001-12-15  Jim Meyering  <meyering@lucent.com>
25140
25141         * lib/regex.h (__restrict_arr): Update from libc.
25142
25143         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
25144         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
25145         (STREQ): Define.
25146
25147 2001-12-14  Jim Meyering  <meyering@lucent.com>
25148
25149         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
25150         Suggestion from Bruno Haible.
25151
25152 2001-12-10  Jim Meyering  <meyering@lucent.com>
25153
25154         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
25155         xrealloc, Instead, include "xalloc.h".
25156         (initbuffer): Don't cast xmalloc return value to char*.
25157         (readline): Reword comment.
25158         Don't cast xrealloc return value to char*
25159         Return NULL, not 0.
25160
25161 2001-12-09  Jim Meyering  <meyering@lucent.com>
25162
25163         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
25164         about `signed and unsigned type in conditional expression'.
25165         * lib/posixtm.c (posix_time_parse): Likewise.
25166
25167         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
25168
25169         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
25170         to avoid a pedantic warning.
25171
25172         * lib/getstr.c: Don't include assert.h.
25173         (getstr): Remove warning-evoking assertions.
25174         Return -1 if offset parameter is out of bounds.
25175         Change the type of a local from int to size_t.
25176
25177         * lib/strftime.c (my_strftime_localtime_r): Include this function
25178         definition in the `#if ! HAVE_TM_GMTOFF' block.
25179
25180         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
25181         Include xalloc.h instead.
25182
25183 2001-12-02  Jim Meyering  <meyering@lucent.com>
25184
25185         * lib/tempname.c: Don't declare getenv, thus reverting the change of
25186         2001-11-18.  It's no longer necessary, now that stdlib.h is always
25187         included.
25188
25189         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
25190         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
25191
25192 2001-11-30  Akim Demaille  <akim@epita.fr>
25193
25194         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
25195         before being defined.
25196
25197 2001-11-27  Paul Eggert  <eggert@twinsun.com>
25198
25199         * lib/quotearg.h (quotearg_n, quotearg_n_style):
25200         First arg is int, not unsigned.
25201         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
25202         (SIZE_MAX, UINT_MAX): New macros.
25203         (quotearg_n_options): Abort if N is negative.
25204         Avoid overflow check on hosts where size_t is 64 bits and int
25205         is 32 bits, as overflow is impossible there.
25206         Fix off-by-one typo that caused unnecessary reallocation.
25207
25208 2001-11-27  Jim Meyering  <meyering@lucent.com>
25209
25210         * lib/tempname.c: Merge with version from libc.
25211         * lib/regex.c: Likewise.
25212
25213         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
25214         systems for which STDC_HEADERS is 0, it was not included, resulting in
25215         a warning about an integer-to-pointer conversion problem with getenv.
25216         Reported by Volker Borchert.
25217
25218 2001-11-26  Jim Meyering  <meyering@lucent.com>
25219
25220         * lib/gtod.h: Remove file.
25221         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
25222         * lib/gettimeofday.c: Don't include gtod.h.
25223         (GTOD_init): Remove function.
25224         (rpl_gettimeofday): Do its job here instead, rather than aborting.
25225         Suggestion from Volker Borchert.
25226
25227 2001-11-23  Jim Meyering  <meyering@lucent.com>
25228
25229         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
25230         it.
25231         * lib/hash.c (struct hash_table): Define it here instead.
25232
25233 2001-11-22  Jim Meyering  <meyering@lucent.com>
25234
25235         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
25236
25237 2001-11-20  Jim Meyering  <meyering@lucent.com>
25238
25239         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
25240         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
25241
25242 2001-11-19  Jim Meyering  <meyering@lucent.com>
25243
25244         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
25245         directory.  Use "conftestXXXXXX" as the template.
25246         Suggestion from Paul Eggert.
25247
25248         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
25249         immediately, so the test doesn't mistakenly hit the max-open-files
25250         limit.
25251
25252 2001-11-18  Paul Eggert  <eggert@twinsun.com>
25253
25254         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
25255         (TEMPORARIES): New macro.
25256         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
25257         removes an artificial limitation (e.g. HP-UX 10.20, where
25258         TMP_MAX is 17576).
25259
25260 2001-11-18  Jim Meyering  <meyering@lucent.com>
25261
25262         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
25263
25264 2001-11-18  Jim Meyering  <meyering@lucent.com>
25265
25266         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
25267         on SunOS 4.
25268
25269         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
25270         files will be created before anything else.
25271
25272 2001-11-17  Paul Eggert  <eggert@twinsun.com>
25273
25274         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
25275         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
25276
25277 2001-11-17  Jim Meyering  <meyering@lucent.com>
25278
25279         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
25280         Prompted by a report from Bob Proulx.
25281
25282         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
25283         Instead, require UTILS_FUNC_MKSTEMP.
25284
25285 2001-11-17  Jim Meyering  <meyering@lucent.com>
25286
25287         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
25288         Now, that's done as part of AC_FUNC_STRTOD.
25289
25290 2001-11-17  Jim Meyering  <meyering@lucent.com>
25291
25292         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
25293         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
25294         rather than group writable.  Patch by Juan F. Codagnone.
25295
25296         * lib/readtokens.c: Remove explicit declarations of xmalloc and
25297         xrealloc, Instead, include "xalloc.h".
25298
25299         * lib/mountlist.c: Include unlocked-io.h after all system headers.
25300         Remove explicit declarations of xmalloc, xrealloc,
25301         and xstrdup.  Instead, include "xalloc.h".
25302
25303         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
25304         unlocked-io.h.
25305         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
25306         Likewise.
25307         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
25308
25309         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
25310         Reported by Padraig Brady.
25311
25312         * lib/mkstemp.c: #undef mkstemp.
25313         Include config.h.
25314         (rpl_mkstemp): Rename from mkstemp.
25315         Protoize.
25316
25317 2001-11-16  Jim Meyering  <meyering@lucent.com>
25318
25319         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
25320         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
25321         determine the amount of total physical memory, use pstat_getstatic.
25322         HPUX-11 doesn't define _SC_PHYS_PAGES.
25323         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
25324         If sysconf couldn't be used to determine the amount of available
25325         physical memory, use both pstat_getstatic and pstat_getdynamic.
25326         Based on a patch from Bob Proulx.
25327
25328 2001-11-10  Jim Meyering  <meyering@lucent.com>
25329
25330         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
25331         (jm_PREREQ): Use it.
25332
25333 2001-11-09  Jim Meyering  <meyering@lucent.com>
25334
25335         * m4/jm-macros.m4: Require autoconf-2.52f.
25336         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
25337         Use these AC_-prefixed names, not the AM_-prefixed ones.
25338
25339         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
25340
25341 2001-11-05  Jim Meyering  <meyering@lucent.com>
25342
25343         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
25344
25345 2001-11-04  Jim Meyering  <meyering@lucent.com>
25346
25347         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
25348         $DEFS.
25349
25350 2001-11-03  Jim Meyering  <meyering@lucent.com>
25351
25352         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
25353         of AC_DEFUN.
25354
25355         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
25356         know the name of the variable in the macro definition.
25357
25358 2001-11-03  Jim Meyering  <meyering@lucent.com>
25359
25360         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
25361         in argmatch_to_argument call.
25362
25363         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
25364         argument.
25365
25366         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
25367         e.g., a fault due to an attempt to free a NULL pointer.
25368
25369 2001-11-01  Jim Meyering  <meyering@lucent.com>
25370
25371         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
25372         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
25373
25374 2001-11-01  Jim Meyering  <meyering@lucent.com>
25375
25376         * lib/dirfd.c, lib/dirfd.h: New files.
25377         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
25378
25379         * lib/hash.c (hash_print) [TESTING]: Clean up.
25380
25381 2001-10-22  Paul Eggert  <eggert@twinsun.com>
25382
25383         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
25384         to avoid a warning if -Wall.
25385
25386 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
25387
25388         * README: New file
25389         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
25390         (per RMS's instructions, this is now the canonical source)
25391         * lgpl/, gpl/: New directories.
25392
25393 2001-10-21  Paul Eggert  <eggert@twinsun.com>
25394
25395         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
25396
25397 2001-10-21  Jim Meyering  <meyering@lucent.com>
25398
25399         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
25400         this code would end up calling gettext even in packages built
25401         with --disable-nls.
25402         * lib/getopt.c (_): Likewise.
25403         * lib/regex.c (_): Likewise.
25404
25405 2001-10-20  Paul Eggert  <eggert@twinsun.com>
25406
25407         * m4/error.m4 (jm_PREREQ_ERROR):
25408         Do not invoke AC_CHECK_FUNCS with strerror_r, as
25409         AC_FUNC_STRERROR_R does that.
25410         Check for strerror declaration.
25411
25412         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
25413         are supposed to have them these days.
25414         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
25415         Merge changes from latest Autoconf CVS.
25416         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
25417         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
25418         POSIX decided to standardize on the int flavor of strerror_r.
25419
25420 2001-10-20  Paul Eggert  <eggert@twinsun.com>
25421
25422         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
25423         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
25424         Use strerror_r that is only a macro, even if it is not a function.
25425         (strerror): Check for HAVE_DECL_STRERROR before declaring.
25426         (private_strerror): Use prototypes, not old-style function definition.
25427         (print_errno_message): New function.
25428         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
25429         char*-flavored one.
25430         (error_tail, error, error_at_line): Use it.
25431
25432 2001-10-11  Jim Meyering  <meyering@lucent.com>
25433
25434         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
25435         and quote_n (1, ... to avoid clobbering a buffer.
25436
25437 2001-10-05  Jim Meyering  <meyering@lucent.com>
25438
25439         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
25440         hash-pjw.h.
25441         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
25442         * lib/hash-pjw.h: New file.
25443
25444 2001-09-30  Jim Meyering  <meyering@lucent.com>
25445
25446         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
25447         `struct fsstat' has the `f_fstypename' member.
25448         Use that to define FS_TYPE, which is now used to make
25449         the getfsstat link test tighter.
25450
25451 2001-09-30  Jim Meyering  <meyering@lucent.com>
25452
25453         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
25454         Include <sys/ucred.h>, for Apple Darwin.
25455         Include sys/mount.h and sys/fs_types.h only if available.
25456         (FS_TYPE): Define.
25457         (read_filesystem_list): Use FS_TYPE.
25458
25459 2001-09-29  Paul Eggert  <eggert@twinsun.com>
25460
25461         * lib/exclude.c (excluded_filename): 0 -> false, since it's
25462         a boolean context.
25463
25464 2001-09-29  Jim Meyering  <meyering@lucent.com>
25465
25466         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
25467         [one-argument getmntent function]): Include stdio.h before mntent.h.
25468         SunOS 4.1.x needs it for the declaration of `FILE'.
25469         Patch by Volker Borchert.
25470
25471         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
25472         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
25473         sys/fs_types.h, and make the link-test for getfsstat guard #include
25474         directives with appropriate #if HAVE_*_H tests so that we can
25475         detect getfsstat on Apple Darwin1.3.7 systems.
25476         Reported by Nelson Beebe.
25477         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
25478
25479 2001-09-28  Paul Eggert  <eggert@twinsun.com>
25480
25481         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
25482         #defines strtoimax.  Also treat the other strto* functions
25483         like strtoimax.
25484
25485         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
25486         Check for strtoul and strtoumax,
25487         as those declarations are made even in the signed case.
25488         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
25489         Likewise, for strtol and strtoimax.
25490
25491 2001-09-28  Paul Eggert  <eggert@twinsun.com>
25492
25493         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
25494         #defines strtoimax.  Also treat the other strto* functions
25495         like strtoimax.
25496
25497         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
25498         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
25499         (strtoimax, strtoumax): Do not declare if already defined as a macro.
25500
25501 2001-09-26  Jim Meyering  <meyering@lucent.com>
25502
25503         Most macros in unlocked-io.h had the wrong number of arguments.
25504         * lib/gen-uio: New script.
25505         (USE_UNLOCKED_IO): Define to 1 if not already defined.
25506         * lib/unlocked-io.hin: Remove file.
25507         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
25508         rather than trying to embed it here.
25509         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
25510         Reported by Padraig Brady.
25511
25512 2001-09-25  Volker Borchert  <bt@teknon.de>
25513
25514         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
25515         `result'.
25516
25517 2001-09-24  Jim Meyering  <meyering@lucent.com>
25518
25519         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
25520
25521 2001-09-23  Jim Meyering  <meyering@lucent.com>
25522
25523         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
25524         instead of the mere test for existence of mntent.h.  The latter
25525         would get a false-positive on AIX 3.4 systems.
25526         In the outer getmntent if-block, don't die if neither of the getmntent
25527         tests succeeds.  Instead, just fall through and continue with the
25528         remaining tests.
25529
25530 2001-09-23  Jim Meyering  <meyering@lucent.com>
25531
25532         * lib/mountlist.c: Remove useless parentheses in #if directives.
25533         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
25534         the deprecated MOUNTED symbol is no longer defined in mntent.h.
25535
25536 2001-09-22  Jim Meyering  <meyering@lucent.com>
25537
25538         * m4/gettext.m4: New file.  From gettext.
25539         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
25540         * m4/progtest.m4: Likewise
25541         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
25542         * m4/glibc21.m4: Likewise.
25543
25544         * m4/libintl.m4: Remove.  No longer used.
25545
25546 2001-09-22  Jim Meyering  <meyering@lucent.com>
25547
25548         * lib/localcharset.c: Update from latest gettext.
25549         * lib/config.charset: Likewise.
25550
25551 2001-09-20  Jim Meyering  <meyering@lucent.com>
25552
25553         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
25554         strtoimax.
25555         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
25556         strtoumax.
25557
25558 2001-09-20  Jim Meyering  <meyering@lucent.com>
25559
25560         * lib/xstrtol.c (strtoimax): Guard declaration with
25561         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
25562         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
25563         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
25564         (strtoumax): Likewise, for completeness (it wasn't necessary).
25565
25566 2001-09-17  Paul Eggert  <eggert@twinsun.com>
25567
25568         * lib/strtoimax.c (HAVE_LONG_LONG):
25569         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
25570         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
25571         to work around bug in IBM C compiler.
25572
25573 2001-09-17  Jim Meyering  <meyering@lucent.com>
25574
25575         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
25576         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
25577         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
25578         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
25579         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
25580         whenever the right hand side need not be expanded by the shell.
25581
25582 2001-09-16  Paul Eggert  <eggert@twinsun.com>
25583
25584         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
25585         library.  It's not correct, as some older glibcs are buggy.
25586         fnmatch wasn't fixed until glibc 2.2.
25587
25588         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
25589         special shell magic here.
25590
25591 2001-09-16  Jim Meyering  <meyering@lucent.com>
25592
25593         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
25594         * m4/jm-macros.m4: Require it.
25595
25596 2001-09-16  Jim Meyering  <meyering@lucent.com>
25597
25598         * lib/mkdir.c: New file.
25599
25600 2001-09-15  Jim Meyering  <meyering@lucent.com>
25601
25602         * m4/jm-macros.m4: Check for help2man.
25603
25604 2001-09-11  Jim Meyering  <meyering@lucent.com>
25605
25606         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
25607         The body, by Paul Eggert, was moved here from configure.in.
25608         * m4/jm-macros.m4: Require UTILS_HOST_OS.
25609
25610 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25611
25612         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
25613         (jm_PREREQ): Use it.
25614
25615 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25616
25617         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
25618         Use ssize_t, not int, to store result of readlink.
25619         Check for ssize_t overflow as well as size_t overflow,
25620         as POSIX says the result of readlink is implementation-defined
25621         when ssize_t overflows.
25622         Remove unnecessary cast to char*.
25623         Use free+malloc instead of realloc, as the storage doesn't need
25624         to be preserved and it's clearer and can be more efficient that way.
25625         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
25626         * lib/xreadlink.h (xreadlink): Update prototype.
25627
25628 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25629
25630         * lib/xgetcwd.c: Revert some of the previous change; intead,
25631         fix the HAVE_GETCWD_NULL code to behave more like the
25632         !HAVE_GETCWD_NULL code used to.
25633
25634         Include "xalloc.h".
25635         (xgetcwd): Do not return NULL when memory is exhausted; instead,
25636         invoke xalloc_die.
25637
25638 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25639
25640         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
25641         sys/param.h, as pathmax.h includes them.
25642
25643 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25644
25645         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
25646         (jm_PREREQ_XGETCWD): New macro.
25647
25648         * m4/getcwd.m4: New file.
25649
25650 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25651
25652         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
25653         like the HAVE_GETCWD_NULL code.
25654         Include pathmax.h if not HAVE_GETCWD.
25655         Do not include xalloc.h.
25656         (INITIAL_BUFFER_SIZE): New symbol.
25657         Do not use xmalloc / xrealloc, since the caller is responsible for
25658         handling errors.  Preserve errno around `free' during failure.
25659         Do not overrun buffer when using getwd.
25660
25661 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25662
25663         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
25664         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
25665         getcwd (NULL, 0).
25666
25667 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25668
25669         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
25670         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
25671         spotted by Jim Meyering.
25672
25673 2001-09-03  Jim Meyering  <meyering@lucent.com>
25674
25675         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
25676         failure.
25677
25678 2001-09-02  Jim Meyering  <meyering@lucent.com>
25679
25680         * lib/error.c: Update from GNU libc.
25681
25682 2001-09-01  Jim Meyering  <meyering@lucent.com>
25683
25684         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
25685         Used by df.
25686
25687 2001-09-01  Jim Meyering  <meyering@lucent.com>
25688
25689         * lib/xreadlink.c: New file.
25690         * lib/xreadlink.h: New file.
25691         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
25692         xreadlink.h.
25693
25694         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
25695         doesn't conflict with sparc Solaris 7's definition in
25696         /usr/include/sys/int_types.h.
25697
25698         * lib/exclude.c: Use `""', not `<>' to #include non-system header
25699         files.
25700         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
25701         and strncasecmp as r-values.  Unixware didn't have declarations.
25702
25703 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25704
25705         * lib/xstrtol.h: Add copyright notice.
25706         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
25707         LONGINT_INVALID_SUFFIX_CHAR.
25708
25709 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25710
25711         * lib/xstrtol.c (strtoimax): New decl.
25712
25713 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25714
25715         * lib/xgetcwd.c: Don't include pathmax.h.
25716         Include stdlib.h and unistd.h if available.
25717         Include xalloc.h.
25718         (xmalloc, xstrdup, free): Remove decls.
25719         (xgetcwd): Don't assume sizes fit in unsigned.
25720         Check for overflow when computing sizes.
25721         Simplify reallocation code.
25722
25723 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25724
25725         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
25726         a directory's st_size can have an arbitrary value, so the old
25727         usage could waste an arbitrary amount of memory.  All uses
25728         changed.
25729         * lib/savedir.h: Update prototype.
25730
25731 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25732
25733         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
25734
25735         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
25736         old strtoimax.c.
25737
25738         Also, make the following further changes to make this file's
25739         configuration more similar to that of strtol.c:
25740         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
25741         (strtoumax, uintmax_t, strtoull, strtol): Remove.
25742         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
25743         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
25744         changed to signed values.
25745
25746         And make the following changes as well:
25747         Fix copyright notice, as 1999 was missing.
25748         (verify): New macro.
25749         (strtoimax): Check sizes at compile-time, not run-time.
25750         Prefer strtol to strtoll if both work.
25751         (main): Remove; it was not that useful and was a pain to maintain.
25752
25753         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
25754
25755 2001-08-31  Jim Meyering  <meyering@lucent.com>
25756
25757         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
25758         Use an initial, malloc'd, buffer of length 128 rather than
25759         a statically allocated one of length 1024.
25760
25761 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25762
25763         Simplify code, partly by assuming autoconf 2.52 semantics.
25764
25765         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
25766
25767         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
25768         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
25769         All uses removed.
25770         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
25771         Move AC_REQUIRE to next-to-top level, to avoid confusion.
25772         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
25773         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
25774         jm_AC_HEADER_INTTYPES_H.
25775         * m4/jm-macros.m4 (jm_MACROS): Likewise.
25776
25777         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
25778
25779         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
25780         Quote first arg of AC_DEFUN.
25781         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
25782         since they are needed to parse the include file even if we need
25783         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
25784         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
25785         but with opposite signedness.
25786
25787 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25788
25789         Merge 'exclude' changes from tar 1.13.22.
25790         This fixes one or two unlikely storage allocation overflow bugs,
25791         but doesn't change user-visible behavior otherwise.
25792
25793 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25794
25795         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
25796         (jm_PREREQ_EXCLUDE): New macro.
25797
25798 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25799
25800         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
25801         tm to be declared.
25802
25803 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25804
25805         * lib/hash.c: Remove '2001' from copyright notice.
25806
25807 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25808
25809         * lib/full-write.h: New file.
25810         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
25811         * lib/full-write.c: Correct credits, as cccp.c no longer
25812         exists and anyway it was so heavily changed from the old cccp
25813         code as to be unrecognizable.  Include full-write.h.
25814         (full_write) Return size_t, with short writes meaning failure.
25815         All callers changed.  This fixes a bug with large buffers
25816         on 64-bit hosts.
25817         * lib/utime.c: Include full-write.h.
25818
25819 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25820
25821         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
25822         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
25823         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
25824         Include if available.
25825         (<xalloc.h>): Include
25826         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
25827         (verify): New macro.  Use it to verify that EXCLUDE macros do not
25828         collide with FNM macros.
25829         (struct patopts): New struct.
25830         (struct exclude): Use it, as exclude patterns now come with options.
25831         (new_exclude): Support above changes.
25832         (new_exclude, add_exclude_file):
25833         Initial size must now be a power of two to simplify overflow checking.
25834         (free_exclude, fnmatch_no_wildcards): New function.
25835         (excluded_filename): No longer requires options arg, as the options
25836         are determined by add_exclude.  Now returns bool, not int.
25837         (excluded_filename, add_exclude):
25838         Add support for the fancy new exclusion options.
25839         (add_exclude, add_exclude_file): Now takes int options arg.
25840         Check for arithmetic overflow when computing sizes.
25841         (add_exclude_file): xrealloc might modify errno, so don't
25842         realloc until after errno might be used.
25843
25844         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
25845         New macros.
25846         (free_exclude): New decl.
25847         (add_exclude, add_exclude_file): Now takes int options arg.
25848         (excluded_filename): No longer requires options arg, as the options
25849         are determined by add_exclude.  Now returns bool, not int.
25850
25851 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25852
25853         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
25854
25855 2001-08-27  Jim Meyering  <meyering@lucent.com>
25856
25857         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
25858
25859         * lib/version-etc.c (N_): Remove definition.
25860         Revert most of last change.
25861         Instead, simply don't mark the `Copyright...' string for translation.
25862         Based on advice from Paul Eggert.
25863
25864         * lib/strtoxmax.c: Tweak comment.
25865
25866 2001-08-26  Jim Meyering  <meyering@lucent.com>
25867
25868         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
25869
25870         * m4/xstrtoimax.m4: New file.
25871         * m4/xstrtoumax.m4: Add comments explaining why we
25872         AC_REPLACE_FUNCS(strtol).
25873
25874 2001-08-26  Jim Meyering  <meyering@lucent.com>
25875
25876         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
25877         of copyright with `%s' so translators don't get an untranslated
25878         message in 2002.
25879         (COPYRIGHT_YEAR): Define.
25880         (version_etc): Use fprintf rather than fputs.
25881         Suggestion from Ulrich Drepper.
25882
25883         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
25884
25885         * lib/strtoll.c: New file, from GNU libc.
25886         * lib/xstrtoimax.c: New file.
25887
25888         * lib/xstrtol.h: Add xstrtoimax.
25889         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
25890         * lib/strtoimax.c: New file.  Likewise, but first define
25891         STRTOUXMAX_SIGNED.
25892
25893         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
25894         ...
25895         * lib/strtoxmax.c: ... then renamed to this.
25896
25897 2001-08-18  Paul Eggert  <eggert@twinsun.com>
25898
25899         * m4/inttypes.m4: Add AC_PREREQ(2.13).
25900         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
25901         (jm_AC_TYPE_INTMAX_T): New macro.
25902         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
25903
25904         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
25905
25906         * m4/longlong.m4: Renamed from ulonglong.m4.
25907         * m4/inttypes.m4: Renamed from inttypes_h.m4.
25908         * m4/uintmax_t.m4: Removed.
25909
25910 2001-08-13  Paul Eggert  <eggert@twinsun.com>
25911
25912         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
25913         Port to Solaris 8, where 'sed' requires a space after the 'r'
25914         command, and where sh dislikes "$/".  Clean up the spacing a bit.
25915         Redirect output to $tmp just once.
25916
25917 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
25918
25919         * lib/addext.c (<errno.h>): Include.
25920         (errno): Declare if not defined.
25921         (addext): Work correctly when pathconf returns -1 and leaves
25922         errno alone because there is no limit.  Also, work even if
25923         pathconf returns a value greater than SIZE_MAX.
25924
25925 2001-08-12  Jim Meyering  <meyering@lucent.com>
25926
25927         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
25928         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
25929         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
25930         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
25931         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
25932         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
25933         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
25934         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
25935         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
25936         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
25937         utime.m4, utimes.m4, xstrtoumax.m4:
25938         Quote the first argument in each use of AC_DEFUN.
25939
25940 2001-08-12  Jim Meyering  <meyering@lucent.com>
25941
25942         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
25943         Simply `return getcwd (NULL, 0);'.
25944         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
25945         Use 1300 as initial value for length, not PATH_MAX.
25946
25947         * lib/pathmax.h: Clean up cpp syntax.
25948
25949 2001-08-12  Jim Meyering  <meyering@lucent.com>
25950
25951         * lib/gettimeofday.c: New file.
25952         * lib/gtod.h: New file.
25953         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
25954
25955 2001-08-05  Jim Meyering  <meyering@lucent.com>
25956
25957         * m4/jm-macros.m4: Require autoconf-2.52.
25958
25959 2001-08-04  Jim Meyering  <meyering@lucent.com>
25960
25961         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
25962         stmt, to get in sync with glibc.
25963
25964 2001-08-03  Paul Eggert  <eggert@twinsun.com>
25965
25966         The following changes are from gettext 0.10.39 as maintained by
25967         Bruno Haible.
25968
25969         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
25970         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
25971         with inverted sense.  All uses changed.
25972
25973         * lib/mbswidth.c: Don't include <limits.h>.
25974         Include <stdlib.h> and <string.h> unconditionally.
25975         (iswcntrl, mbsinit, ISCNTRL): New macros.
25976         (mbsnwidth): Use K&R style function declarations.
25977         Don't bother checking for MB_LEN_MAX == 1, since the compiler
25978         can optimize it when MB_CUR_MAX == 1.
25979         The width of control characters is zero, not 1.
25980
25981 2001-08-03  Paul Eggert  <eggert@twinsun.com>
25982
25983         The following changes are from gettext 0.10.39 as maintained by
25984         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
25985
25986         * m4/codeset.m4: Upgrade to serial AM1.
25987         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
25988         all uses changed.  Quote first arg of AC_DEFUN.
25989         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
25990
25991         * m4/iconv.m4: Upgrade to serial AM2.
25992         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
25993         Add --with-libconv-prefix.
25994         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
25995         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
25996         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
25997         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
25998         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
25999
26000         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
26001         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
26002         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
26003         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
26004         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
26005         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
26006         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
26007         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
26008         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
26009
26010         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
26011         string.h any more.
26012
26013         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
26014         not the default value.
26015
26016         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
26017         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
26018         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
26019         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
26020         Also check for iswcntrl, used for wcwidth fallback.
26021         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
26022         to Autoconf 2.13.
26023
26024 2001-08-03  Jim Meyering  <meyering@lucent.com>
26025
26026         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
26027         as it was in the original.  Reported by Paul Eggert.
26028
26029 2001-07-16  Jim Meyering  <meyering@lucent.com>
26030
26031         * m4/gettimeofday.m4: New file.
26032         Prompted by a report from Bernhard Baehr.
26033
26034 2001-07-15  Jim Meyering  <meyering@lucent.com>
26035
26036         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
26037         stuff. Now it's in ../Makefile.cfg.
26038
26039 2001-07-15  Jim Meyering  <meyering@lucent.com>
26040
26041         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
26042         (BUILT_SOURCES): Add unlocked-io.h.
26043         (io_functions): Define.
26044         (unlocked-io.h): New rule.
26045         (DISTCLEANFILES): Add unlocked-io.h.
26046         (all-local): Depend on unlocked-io.h, to ensure it is created.
26047
26048         * lib/unlocked-io.hin: New file
26049
26050         * lib/regex.c: Update from glibc.
26051
26052 2001-07-05  Jim Meyering  <meyering@lucent.com>
26053
26054         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
26055         recommendation.
26056         (libfetish_a_SOURCES): Put all .h files here instead.
26057         Remove a thus-exposed (better checks in automake) duplicate and
26058         two unnecessary .h files.
26059
26060 2001-07-04  Jim Meyering  <meyering@lucent.com>
26061
26062         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
26063         that generates jm-glibc-io.m4 so that it doesn't trigger any make
26064         distcheck failure.
26065
26066 2001-07-02  Jim Meyering  <meyering@lucent.com>
26067
26068         The following changes were prompted by suggestions from Bruno Haible.
26069
26070         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
26071         is now generated.
26072         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
26073         definition of EXTRA_DIST.
26074         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
26075         ensure that the generated file is created/updated whenever the list
26076         of $(unlocked_functions) is changed.
26077         (jm-glibc-io.m4): New rule.
26078         (unlocked-io.h): New rule -- currently unused.
26079
26080 2001-06-24  Jim Meyering  <meyering@lucent.com>
26081
26082         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
26083         unmatched right bracket, rather than kludging it with an extra,
26084         falsely-matching quote in a comment.  Patch by Akim Demaille.
26085
26086 2001-06-11  Jim Meyering  <meyering@lucent.com>
26087
26088         * lib/regex.c: Update from GNU libc.
26089
26090 2001-05-27  Jim Meyering  <meyering@lucent.com>
26091
26092         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
26093         Check for ut_type in struct utmp.
26094
26095 2001-05-27  Jim Meyering  <meyering@lucent.com>
26096
26097         * lib/readutmp.h (UT_TYPE): Define.
26098
26099 2001-05-24  Jim Meyering  <meyering@lucent.com>
26100
26101         * lib/argmatch.c: Include "quote.h".
26102         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
26103         quote function.  Reported by Göran Uddeborg.
26104
26105 2001-05-22  Jim Meyering  <meyering@lucent.com>
26106
26107         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
26108         now that we use the package-supplied version unconditionally.
26109         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
26110
26111 2001-05-21  Jim Meyering  <meyering@lucent.com>
26112
26113         * m4/regex.m4: Change a couple backticks to single quotes to avoid
26114         shell syntax errors.
26115
26116 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
26117
26118         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
26119
26120 2001-05-20  Paul Eggert  <eggert@twinsun.com>
26121
26122         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
26123         Don't bother to check library strftime, since
26124         we'll be using our own my_strftime function anyway.
26125         Define my_strftime instead of strftime.
26126
26127 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
26128
26129         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
26130         which is not yet declared.
26131
26132 2001-05-15  Jim Meyering  <meyering@lucent.com>
26133
26134         * m4/regex.m4: Use proper quoting so brackets appear in the test
26135         program.
26136         Reported by, and with help from, Bruno Haible.
26137
26138 2001-05-13  Jim Meyering  <meyering@lucent.com>
26139
26140         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
26141         undefined.
26142
26143 2001-05-11  Paul Eggert  <eggert@twinsun.com>
26144
26145         dirname code cleanup.  base_name now behaves more compatibly
26146         with POSIX basename when given file names that have trailing
26147         slashes, and similarly for dir_name.  Add new primitives
26148         base_len and dir_len.  Put the directory-name-related decls
26149         into dirname.h.
26150
26151         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
26152         * lib/backupfile.c (base_name): Likewise.
26153         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
26154         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
26155         * lib/makepath.c (strip_trailing_slashes): Likewise.
26156         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
26157         ISSLASH): Likewise.
26158         * lib/rename.c (strip_trailing_slashes): Likewise.
26159         * lib/same.c (base_name): Likewise.
26160         * lib/stripslash.c (ISSLASH): Likewise.
26161
26162         * lib/addext.c: Include <dirname.h> after size_t is defined.
26163         * lib/backupfile.c: Likewise.
26164
26165         * lib/addext.c (addext): Use base_len to trim redundant
26166         trailing slashes instead of doing it ourselves.
26167         But do not trim the last slash if it is not redundant.
26168
26169         * lib/backupfile.c (find_backup_file_name,
26170         max_backup_version): Use base_len instead of rolling it ourselves.
26171         Handle the case of "" and (on DOS) "C:" correctly.
26172
26173         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
26174         needed. Include <string.h>, <dirname.h>.
26175         (base_name): Allow file names ending in slashes, other than names
26176         that are all slashes.  In this case, return the basename followed
26177         by the slashes.  This is more general, and can be used in places
26178         where the original base_name purposely had an assertion failure.
26179         (base_len): New function.
26180
26181         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
26182         Do not include <assert.h>; no longer needed.
26183         Include xalloc.h.
26184         (memrchr): Remove decl.
26185         (dir_name_r): Remove.
26186         (dir_len): Renamed from dirlen.  All callers changed.
26187         Rewrite in terms of base_name, for simplicity and consistency.
26188         (dir_name): Never return NULL.  All callers changed.
26189         Do not include <stdlib.h> in test program; no longer needed.
26190         return 0; is fine for test program.
26191
26192         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
26193         New macros.
26194         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
26195
26196         * lib/path-concat.c (path_concat): Use base_len to compute
26197         base length, not strlen; this means we cannot rely on memcpy
26198         to null-terminate.
26199
26200         * lib/same.c (STREQ): Remove.
26201         (same_name): Handle the case where the basename ends in trailing '/'.
26202
26203         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
26204         a slash was stripped.  Do not strip the last slash after a
26205         file system prefix.
26206
26207 2001-05-11  Paul Eggert  <eggert@twinsun.com>
26208
26209         * lib/Makefile.am (libfetish_a_SOURCES):
26210         Add strftime.c, since we now compile it on all hosts.
26211
26212         * lib/strftime.c (my_strftime):
26213         Define to nstrftime if emacs, but only if my_strftime is not defined.
26214         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
26215         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
26216         Add one more extra argument: a nanoseconds value.
26217         All uses changed.
26218         (ns): New macro.
26219         (my_strftime function): Add %N format.
26220         (emacs_strftimeu): Renamed from emacs_strftime,
26221         with extra ut argument.
26222
26223 2001-05-09  Paul Eggert  <eggert@twinsun.com>
26224
26225         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
26226
26227 2001-04-21  Jim Meyering  <meyering@lucent.com>
26228
26229         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
26230         doesn't interfere.
26231
26232 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
26233
26234         * m4/ftruncate.m4: Check for chsize.
26235         Link with ftruncate.o unconditionally if ftruncate is missing.
26236         This was required when cross-compiling to i586-mingw32msvc.
26237
26238 2001-04-08  Jim Meyering  <meyering@lucent.com>
26239
26240         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
26241         recomputed; that's necessary when the offset spans a DST transition.
26242         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
26243
26244 2001-04-02  Jim Meyering  <meyering@lucent.com>
26245
26246         * lib/regex.h, regex.c: Update from GNU libc.
26247
26248 2001-03-24  Jim Meyering  <meyering@lucent.com>
26249
26250         * m4/jm-macros.m4: Require autoconf-2.49d.
26251
26252 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
26253
26254         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
26255
26256 2001-03-19  Paul Eggert  <eggert@twinsun.com>
26257
26258         * lib/version-etc.c (version_etc_copyright): Update to 2001.
26259
26260 2001-03-17  Jim Meyering  <meyering@lucent.com>
26261
26262         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
26263         now that the version in autoconf is equivalent.
26264         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
26265
26266         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
26267         Suggestion from Akim Demaille.
26268
26269         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
26270         (jm_PREREQ_TEMPNAME): New function.
26271
26272 2001-03-16  Paul Eggert  <eggert@twinsun.com>
26273
26274         * lib/tempname.c (uint64_t): Define to uintmax_t if
26275         not defined, and if UINT64_MAX is not defined.
26276         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
26277         Reported by John David Anglin.
26278
26279 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
26280
26281         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
26282         resolve alias if codeset is empty.
26283         * lib/config.charset (BeOS): Use wildcard syntax.
26284
26285 2001-03-13  Jim Meyering  <meyering@lucent.com>
26286
26287         * lib/path-concat.c (path_concat)
26288         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
26289         concatenating e.g., `C:' and `foo'.
26290         From Bruno Haible.
26291
26292 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
26293
26294         * lib/localcharset.c (locale_charset): Don't use
26295         setlocale(LC_CTYPE,NULL). Don't return NULL.
26296         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
26297
26298 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
26299
26300         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
26301         support for DOS/DJGPP.
26302
26303 2001-03-01  Paul Eggert  <eggert@twinsun.com>
26304
26305         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
26306         lacks mkstemp.  Compile our own tempname.c if we compile our own
26307         mkstemp.c, as mkstemp relies on tempname.
26308
26309 2001-03-01  Jim Meyering  <meyering@lucent.com>
26310
26311         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
26312         AH_VERBATIM really does output its argument verbatim.
26313
26314 2001-02-28  Paul Eggert  <eggert@twinsun.com>
26315
26316         * lib/Makefile.am (libfetish_a_SOURCES):
26317         Add dup-safer.c, fopen-safer.c.
26318         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
26319
26320         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
26321         * lib/unistd-safer.h: New files.
26322
26323 2001-02-25  Paul Eggert  <eggert@twinsun.com>
26324
26325         The mkstemp replacement is taken from glibc 2.2.2, with some
26326         portability fixes for use outside glibc, as follows:
26327
26328         * lib/tempname.c (struct_stat64): New macro.
26329         (direxists, __gen_tempname): Use it.
26330         This avoids a portability problem with Solaris 8.
26331
26332         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
26333         (<stddef.h>, <stdint.h>, <string.h>):
26334         Include only if STDC_HEADERS || _LIBC.
26335         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
26336         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
26337         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
26338         (__set_errno): Define this macro if <errno.h> doesn't.
26339         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
26340         Define these macros if <stdio.h> doesn't.
26341         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
26342         Define these macros if <sys/stat.h>
26343         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
26344         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
26345         __xstat64): Define if not _LIBC.
26346         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
26347         (__gen_tempname): Invoke gettimeofday only if
26348         HAVE_GETTIMEOFDAY || _LIBC;
26349         otherwise, fall back on plain "time".
26350         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
26351
26352         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
26353
26354         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
26355
26356 2001-02-18  Paul Eggert  <eggert@twinsun.com>
26357
26358         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
26359
26360 2001-02-17  Paul Eggert  <eggert@twinsun.com>
26361
26362         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
26363         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
26364         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
26365         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
26366
26367 2001-02-17  Paul Eggert  <eggert@twinsun.com>
26368
26369         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
26370         Remove workaround macros for hosts that have mbrtowc but not
26371         mbstate_t, as we now insist on proper declarations for both
26372         before using mbrtowc.
26373
26374 2001-02-17  Jim Meyering  <meyering@lucent.com>
26375
26376         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
26377         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
26378         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
26379         UnixWare 7.1.1.
26380
26381         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
26382         rather than AC_CACHE_VAL.
26383
26384 2001-02-17  Jim Meyering  <meyering@lucent.com>
26385
26386         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
26387         around included file name.
26388
26389         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
26390
26391         * lib/strftime.c: Update from GNU libc (the only changes were to
26392         comments).
26393
26394 2001-02-17  Jim Meyering  <meyering@lucent.com>
26395
26396         * lib/regex.c: Update from libc.
26397
26398 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
26399
26400         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
26401         clash.
26402
26403 2001-02-16  Paul Eggert  <eggert@twinsun.com>
26404
26405         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
26406         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
26407         Reported by Mark Hounschell via Paul Eggert.
26408
26409 2001-02-07  Jim Meyering  <meyering@lucent.com>
26410
26411         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
26412
26413 2001-02-05  Jim Meyering  <meyering@lucent.com>
26414
26415         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
26416         it includes the patch required for `large file' support with at least
26417         HP-UX's 10.20 /bin/cc.
26418
26419 2001-02-03  Jim Meyering  <meyering@lucent.com>
26420
26421         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
26422         AS_IF, now that it works once again (mysteriously).
26423         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
26424
26425 2001-01-30  Jim Meyering  <meyering@lucent.com>
26426
26427         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
26428         * m4/chown.m4: Rename conftestchown to conftest.chown.
26429         * m4/rename.m4: s/conftestdir/conftest.d1/ and
26430         s/conftestdir2/conftest.d2/.
26431         * m4/utimes.m4: s/conftestdata/conftest.data/
26432         Inspired by Pavel Roskin's change in autoconf.
26433
26434 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
26435
26436         * lib/config.charset: Update for FreeBSD 4.2.
26437
26438 2001-01-27  Jim Meyering  <meyering@lucent.com>
26439
26440         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
26441         a use of AS_IF.
26442         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
26443
26444 2001-01-26  Jim Meyering  <meyering@lucent.com>
26445
26446         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
26447         quotearg.c includes it.
26448
26449 2001-01-26  Jim Meyering  <meyering@lucent.com>
26450
26451         * lib/quotearg.c: Include stddef.h.
26452         * lib/quote.c: Include stddef.h.
26453         Reported by Axel Kittenberger.
26454
26455         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
26456         line in double quotes so that it evokes a better diagnostic.
26457         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
26458         Reported by Axel Kittenberger.
26459
26460 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
26461
26462         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
26463         as if it was a `charset'.
26464
26465 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
26466
26467         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
26468         has const.
26469
26470 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
26471
26472         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
26473         to avoid a warning.  Add back 'const' to inptr.
26474
26475 2001-01-20  Jim Meyering  <meyering@lucent.com>
26476
26477         Be sure that headers are checked before used in code compiled
26478         for the type checks.
26479         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
26480         In place of that, invoke jm_CHECK_ALL_TYPES.
26481         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
26482         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
26483         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
26484         The check for ssize_t was mistakenly run before the test for unistd.h.
26485
26486         The configure-time check for stdbool.h was missing.
26487         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
26488         (jm_PREREQ_HASH): New function.
26489
26490 2001-01-17  Jim Meyering  <meyering@lucent.com>
26491
26492         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
26493         for autoconf-2.49c.
26494         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
26495
26496 2001-01-16  Jim Meyering  <meyering@lucent.com>
26497
26498         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
26499         From Bruno Haible.
26500
26501 2001-01-14  Jim Meyering  <meyering@lucent.com>
26502
26503         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
26504         foo and bar.  Create conftestdir/ in the script, not in the C code.
26505         Remove directories in the script, not in the C code.
26506         Remove conftestdir{,2} before trying to create the directory.
26507         Make the entire configure script fail if the mkdir fails.
26508
26509 2001-01-14  Jim Meyering  <meyering@lucent.com>
26510
26511         * lib/rename.c: New file.  From Volker Borchert.
26512         Include stdlib.h, string.h or strings.h, and xalloc.h.
26513         Use strip_trailing_slashes rather than open-coding it.
26514
26515 2001-01-03  Paul Eggert  <eggert@twinsun.com>
26516
26517         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
26518
26519 2001-01-03  Jim Meyering  <meyering@lucent.com>
26520
26521         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
26522         of local `inptr' to avoid warning with some system declarations of
26523         iconv.
26524
26525 2001-01-02  Volker Borchert  <bt@teknon.de>
26526
26527         * m4/rename.m4: New file.
26528         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
26529
26530 2001-01-01  Jim Meyering  <meyering@lucent.com>
26531
26532         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
26533         even on systems with utmpx.h.  It's necessary for the declaration of
26534         utmp's ut_user member.  Reported by Andreas Jaeger.
26535
26536         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
26537         available. They are required for the declarations of getgrgid and
26538         getpwuid resp.
26539         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
26540         Reported by Andreas Jaeger.
26541
26542 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
26543
26544         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
26545         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
26546         so `make install' also works in VPATH builds.
26547
26548 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
26549
26550         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
26551         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
26552         can be used in subdirectories.
26553
26554 2000-12-29  Paul Eggert  <eggert@twinsun.com>
26555
26556         * lib/modechange.c: Do not assume that mode_t uses the
26557         traditional octal encoding.  E.g. "chmod 1 FOO" should set
26558         the other-execute bit of FOO even if S_IXOTH != 1.
26559
26560         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
26561         WOTH, XOTH, ALLM): New macros.
26562         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
26563          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
26564         Use them.
26565         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
26566         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
26567         (mode_compile):
26568         No need to use uintmax_t; unsigned long is long enough.
26569         Don't bother to get suffix since we don't use it.
26570
26571 2000-12-26  Jim Meyering  <meyering@lucent.com>
26572
26573         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
26574         better with autoheader.
26575
26576 2000-12-24  Jim Meyering  <meyering@lucent.com>
26577
26578         * lib/hash.c (is_prime): Return explicit boolean values.
26579         (hash_get_first): Return NULL to appease Irix5.6's 89.
26580         Reported by Nelson Beebe.
26581
26582 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
26583
26584         * lib/localcharset.c (locale_charset): Add support for Win32.
26585
26586 2000-12-18  Paul Eggert  <eggert@twinsun.com>
26587
26588         * lib/physmem.h, lib/physmem.c: New files.
26589
26590         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
26591         (noinst_HEADERS): Add physmem.h.
26592
26593         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
26594         't' for compatibility with Solaris 8 sort.
26595
26596 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
26597
26598         * lib/config.charset: Add support for BeOS.
26599
26600 2000-12-17  Jim Meyering  <meyering@lucent.com>
26601
26602         * m4/dos.m4 (jm_AC_DOS): New file and macro.
26603         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
26604
26605 2000-12-16  Jim Meyering  <meyering@lucent.com>
26606
26607         This bug had a serious impact on chown: `chown N:M FILE' (for integer
26608         N and M) would have treated it like `chown N:N FILE'.
26609
26610         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
26611
26612 2000-12-16  Jim Meyering  <meyering@lucent.com>
26613
26614         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
26615         SHELLS_FILE to a file name that's useful on djgpp systems.
26616         Include stdlib.h.
26617         (ADDITIONAL_DEFAULT_SHELLS): Define.
26618         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
26619         Based mostly on a patch from Prashant TR.
26620
26621 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
26622
26623         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
26624         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
26625         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
26626
26627 2000-12-08  Andreas Schwab  <schwab@suse.de>
26628
26629         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
26630         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
26631
26632 2000-12-07  Jim Meyering  <meyering@lucent.com>
26633
26634         * lib/stripslash.c (ISSLASH): Define.
26635         (strip_trailing_slashes): Use ISSLASH rather than comparing against
26636         `/'.
26637         From Prashant TR.
26638
26639         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
26640         (dir_name_r): Declare this function as static.
26641         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
26642         manifest itself on a name containing a mix of slashes and
26643         backslashes.
26644         Make this function work with names starting with a DOS-style
26645         drive letter and colon prefix.
26646         (dir_name): Append `.' if necessary.
26647         Based mostly on patches from Prashant TR and Eli Zaretskii.
26648
26649         * lib/dirname.h (dir_name_r): Remove prototype.
26650
26651 2000-12-06  Paul Eggert  <eggert@twinsun.com>
26652
26653         * m4/off_t-format.m4: Remove this file.
26654         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
26655
26656 2000-12-06  Jim Meyering  <meyering@lucent.com>
26657
26658         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
26659         replacement strtoull, we may well need the replacement strtoul, too.
26660         Check for declarations of strtoul and strtoull.
26661         Check for strtol.  Mainly as a cue to cause automake to include
26662         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
26663         Check for limits.h -- strtol.c needs it.
26664
26665 2000-12-05  Jim Meyering  <meyering@lucent.com>
26666
26667         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
26668
26669 2000-12-04  Jim Meyering  <meyering@lucent.com>
26670
26671         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
26672         Also include memory.h, stdlib.h, unistd.h if appropriate.
26673         Reported by Andreas Jaeger (conflicting declaration of malloc).
26674
26675 2000-12-02  Jim Meyering  <meyering@lucent.com>
26676
26677         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
26678         * m4/jm-macros.m4 (jm_MACROS): require it.
26679
26680 2000-12-02  Jim Meyering  <meyering@lucent.com>
26681
26682         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
26683
26684 2000-12-01  Paul Eggert  <eggert@twinsun.com>
26685
26686         * lib/memrchr.c: Include <config.h> before any system include file.
26687
26688 2000-11-30  Jim Meyering  <meyering@lucent.com>
26689
26690         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
26691
26692 2000-11-30  Jim Meyering  <meyering@lucent.com>
26693
26694         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
26695
26696 2000-11-29  Paul Eggert  <eggert@twinsun.com>
26697
26698         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
26699
26700 2000-11-26  Jim Meyering  <meyering@lucent.com>
26701
26702         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
26703
26704 2000-11-22  Paul Eggert  <eggert@twinsun.com>
26705
26706         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
26707         size of (size_t) -1; it's not portable.
26708
26709 2000-11-17  Jim Meyering  <meyering@lucent.com>
26710
26711         * lib/strstr.c: Update from GNU libc.
26712
26713 2000-11-17  Akim Demaille  <akim@epita.fr>
26714
26715         * lib/obstack.h: Formatting changes.
26716         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
26717         prevent type checking.
26718         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
26719         cast the value to (void *): assigning a `foo *' to a `void *'
26720         variable is valid.
26721         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
26722
26723 2000-11-16  Jim Meyering  <meyering@lucent.com>
26724
26725         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
26726
26727 2000-11-11  Jim Meyering  <meyering@lucent.com>
26728
26729         * lib/error.c: Add a couple #includes, merging from GNU libc version.
26730
26731 2000-11-10  Jim Meyering  <meyering@lucent.com>
26732
26733         * lib/obstack.h: Update from GNU libc.
26734         * lib/obstack.c: Likewise.
26735
26736 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
26737
26738         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
26739
26740 2000-11-06  Paul Eggert  <eggert@twinsun.com>
26741
26742         * lib/getusershell.c (setusershell): Use rewind rather than
26743         fseek/fseeko, to avoid configuration hassles with fseeko.
26744         Don't bother opening SHELLS_FILE if shellstream is NULL;
26745         it's not necessary.
26746
26747 2000-11-05  Jim Meyering  <meyering@lucent.com>
26748
26749         * lib/makepath.h (make_dir): Declare.
26750         * lib/makepath.c (make_dir): Remove `static' attribute.
26751         Tweak a comment.
26752
26753 2000-11-04  Jim Meyering  <meyering@lucent.com>
26754
26755         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
26756
26757 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
26758
26759         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
26760         last one in a bucket, advance to the next bucket.
26761
26762 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
26763
26764         * lib/fnmatch.c: Do not comment out all the code if we are using
26765         the GNU C library, because in some cases we are replacing buggy
26766         code in the GNU C library itself.
26767
26768 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
26769
26770         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
26771         (regex_compile): Catch bogus \(\1\).
26772
26773 2000-10-30  Paul Eggert  <eggert@twinsun.com>
26774
26775         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
26776         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
26777         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
26778
26779 2000-10-30  Paul Eggert  <eggert@twinsun.com>
26780
26781         * lib/error.h, getline.h, modechange.h:
26782         Remove "2000" from Copyright line, as the file hasn't been
26783         changed this year other than in the copyright notice.
26784
26785         * lib/xalloc.h: Add "2000" to Copyright line, as this file
26786         was changed this year.
26787
26788 2000-10-29  Jim Meyering  <meyering@lucent.com>
26789
26790         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
26791         renaming.
26792         * m4/ls-mntd-fs.m4: Likewise
26793
26794 2000-10-29  Jim Meyering  <meyering@lucent.com>
26795
26796         * lib/xstat.in: Fix grammar in comment.
26797
26798 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
26799
26800         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
26801         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
26802         doesn't define __restrict_arr.
26803
26804 2000-10-28  Jim Meyering  <meyering@lucent.com>
26805
26806         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
26807         (jm_PREREQ_MEMCHR): New function.
26808
26809 2000-10-28  Jim Meyering  <meyering@lucent.com>
26810
26811         * lib/memchr.c: Update from libc.
26812         Adjust for portability:
26813         [HAVE_STDLIB_H]: Include stdlib.h.
26814         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
26815         Undef __memchr, too.
26816         [!weak_alias]: Define __memchr to memchr.
26817
26818         * lib/regex.c: Update from libc.
26819         * lib/regex.h: Likewise.
26820         * lib/getopt1.c: Likewise.
26821         * lib/memcmp.c: Likewise.
26822
26823         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
26824         Avoid using fseek, when possible -- it's broken by design.
26825         Patch by Ulrich Drepper.
26826
26827 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
26828
26829         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
26830         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
26831         Giving in to popular pressure to shut up the compiler with casts.
26832
26833 2000-10-26  Jim Meyering  <meyering@lucent.com>
26834
26835         * lib/strftime.c: Update from libc.
26836
26837 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
26838
26839         * regex.c: More `unsigned char' -> `re_char' changes.
26840         Also change several `int' into `re_wchar_t'.
26841         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
26842         (PUSH_FAILURE_POINTER): Don't cast any more.
26843         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
26844         We want GCC to complain, since this piece of code makes
26845         re_match non-reentrant, which *should* be fixed.
26846         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
26847         (EXTEND_BUFFER): Use RETALLOC.
26848         (SET_LIST_BIT): Don't cast.
26849         (re_wchar_t): New type.
26850         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
26851         that those two functions will always properly return.
26852         (IMMEDIATE_QUIT_CHECK): Cast to void.
26853         (analyse_first): Use recursion rather than an explicit stack.
26854         (re_compile_fastmap): Can't fail anymore.
26855         (re_search_2): Don't check re_compile_fastmap for failure.
26856         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
26857         Now also sets the new value (passed in a new argument).
26858         (re_match_2_internal): Use it.
26859         Also, use a new var `reg' of type size_t when looping through regs
26860         rather than reuse the inappropriate `mcnt'.
26861
26862 2000-10-25  Jim Meyering  <meyering@lucent.com>
26863
26864         * lib/obstack.c: Update from libc.
26865
26866 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
26867
26868         * regex.c (regex_compile): Change the way of handling a range from
26869         a char less than 256 to a char not less than 256.
26870
26871 2000-10-24  Andrew Innes  <andrewi@gnu.org>
26872
26873         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
26874         NT-Emacs only.
26875         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
26876         so that re_search functions only quit when callers expect them to.
26877
26878 2000-10-23  Jim Meyering  <meyering@lucent.com>
26879
26880         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
26881         wrong.  That set_locale call must not have any side effects.
26882         From Paul Eggert.
26883
26884 2000-10-22  Jim Meyering  <meyering@lucent.com>
26885
26886         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
26887         [CYCLIC]: Remove now-unused definition.
26888
26889         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
26890         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
26891         Suggestion from Ulrich Drepper.
26892
26893 2000-10-21  Jim Meyering  <meyering@lucent.com>
26894
26895         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
26896         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
26897         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
26898
26899 2000-10-21  Jim Meyering  <meyering@lucent.com>
26900
26901         * lib/dirname.c (memrchr): Declare if necessary.
26902         (dir_name): Remove the restriction that there be no
26903         trailing slashes.  Now, this code skips past them, effectively
26904         ignoring them.
26905         [TEST_DIRNAME] (main): New unit tests.
26906
26907         * lib/memrchr.c: New file from GNU libc.
26908         Undef __memrchr, too.
26909         [!weak_alias]: Define __memrchr to memrchr.
26910         Guard weak_alias use with `#ifdef weak_alias'.
26911
26912 2000-10-21  Jim Meyering  <meyering@lucent.com>
26913
26914         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
26915         (dir_name): Use dir_name_r.
26916         * lib/dirname.h (dir_name_r): Declare it.
26917
26918 2000-10-17  Jim Meyering  <meyering@lucent.com>
26919
26920         * lib/quote.h (PARAMS): Define and use.
26921         Reported by Akim Demaille.
26922
26923         * lib/getopt.c: Update from libc.
26924
26925 2000-10-16  Jim Meyering  <meyering@lucent.com>
26926
26927         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
26928         setlocale.
26929         From Jan Fedak.
26930
26931 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
26932
26933         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
26934
26935 2000-09-25  Jim Meyering  <meyering@lucent.com>
26936
26937         * lib/md5.h (rol): Define (from GnuPG).
26938
26939         * lib/sha.c: Give credit (GnuPG) where due.
26940         (M): Use rol rather than open-coding it.
26941         Add a FIXME comment.
26942
26943 2000-09-21  Jim Meyering  <meyering@lucent.com>
26944
26945         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
26946         Reported by Michael Stone.
26947
26948 2000-09-20  Jim Meyering  <meyering@lucent.com>
26949
26950         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
26951         (noinst_HEADERS): Add sha.h.
26952         Based on code from Scott G. Miller and from GnuPG.
26953
26954 2000-09-18  Jim Meyering  <meyering@lucent.com>
26955
26956         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
26957         LIBS. Otherwise, everyone ends up linking with -lelf for some
26958         configurations.
26959         Reported by Mike Stone.
26960
26961 2000-09-15  Jim Meyering  <meyering@lucent.com>
26962
26963         * lib/regex.c: Update from libc.
26964
26965 2000-09-10  Jim Meyering  <meyering@lucent.com>
26966
26967         * lib/getopt.c (_getopt_internal): Update from glibc.
26968
26969 2000-09-09  Jim Meyering  <meyering@lucent.com>
26970
26971         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
26972         think it should be used as a general replacement for isascii.
26973         * lib/fnmatch.c: Likewise.
26974         * lib/mbswidth.c: Likewise
26975         * lib/regex.c: Likewise.
26976
26977         Don't use atoi.
26978         * lib/userspec.c: Include sys/param.h and limits.h.
26979         Include xstrtol.h.
26980         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
26981         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
26982         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
26983         UID, GID.  Check range.
26984
26985 2000-09-06  Jim Meyering  <meyering@lucent.com>
26986
26987         * lib/getopt.c (_getopt_internal): Update from glibc.
26988
26989 2000-08-30  Jim Meyering  <meyering@lucent.com>
26990
26991         * lib/strftime.c: Merge in changes from GNU libc.
26992
26993 2000-08-26  Jim Meyering  <meyering@lucent.com>
26994
26995         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
26996         * m4/fpending.m4: New file.
26997
26998 2000-08-26  Jim Meyering  <meyering@lucent.com>
26999
27000         * lib/closeout.c: Include "__fpending.h".
27001         (close_stdout_status): Return right away if there's nothing to flush.
27002
27003         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
27004         * lib/__fpending.c: New file.
27005         * lib/__fpending.h: New file.
27006
27007 2000-08-20  Jim Meyering  <meyering@lucent.com>
27008
27009         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
27010         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
27011         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
27012
27013 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
27014
27015         Improve fileutils installation on systems where running
27016         programs (like install) can't be unlinked.
27017         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
27018         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
27019
27020 2000-08-07  Paul Eggert  <eggert@twinsun.com>
27021
27022         Standardize on "memory exhausted" instead of "Memory exhausted"
27023         or "virtual memory exhausted".
27024         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
27025         "virtual memory exhausted".
27026         * lib/same.c (same_name): Invoke xalloc_die instead of printing
27027         our own message.
27028         * lib/userspec.c (parse_user_spec): Likewise.
27029         * lib/bumpalloc.h: comment fix
27030         * lib/same.c, userspec.c: Include xalloc.h.
27031
27032         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
27033         not char *const and pointing to a constant array.
27034         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
27035         (xrealloc): Comment fix.
27036
27037         * lib/userspec.c (parse_user_spec):
27038         Don't translate a message until just before returning,
27039         to avoid unnecessary translation.
27040
27041 2000-08-07  Jim Meyering  <meyering@lucent.com>
27042
27043         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
27044         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
27045         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
27046         getgroups.c, gethostname.c, getopt.h, group-member.c,
27047         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
27048         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
27049         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
27050         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
27051         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
27052         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
27053         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
27054         yesno.c: Back out Copyright date changes for each file with no change
27055         this year.  This eases coordination with other programs using the same
27056         source code modules.  From Paul Eggert.
27057
27058 2000-08-06  Paul Eggert  <eggert@twinsun.com>
27059
27060         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
27061         not char, for compatibility with glibc 2.1.3 strftime.c.
27062
27063 2000-08-03  Greg McGary  <greg@mcgary.org>
27064
27065         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
27066         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
27067         (EXTEND_BUFFER): Use them.
27068
27069 2000-08-01  Jim Meyering  <meyering@lucent.com>
27070
27071         * lib/dirname.c (ISSLASH): Define.
27072         (BACKSLASH_IS_PATH_SEPARATOR): Define.
27073         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
27074         both `\' and `/' may be use as path separators.
27075         Based on a patch from Prashant TR.
27076
27077 2000-07-31  Paul Eggert  <eggert@twinsun.com>
27078
27079         * lib/quotearg.c (quotearg_n_options): Don't make the initial
27080         slot vector a constant, since it might get modified.
27081
27082 2000-07-31  Jim Meyering  <meyering@lucent.com>
27083
27084         * lib/xmalloc.c: Use `virtual memory exhausted', not
27085         `Memory exhausted'.
27086         * lib/obstack.c (print_and_abort): Likewise.
27087
27088 2000-07-30  Paul Eggert  <eggert@twinsun.com>
27089
27090         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
27091         buffer, so that the caller can always quote one small
27092         component of a "memory exhausted" message in slot 0.
27093         From a suggestion by Jim Meyering.
27094
27095 2000-07-30  Jim Meyering  <meyering@lucent.com>
27096
27097         * lib/makepath.c (make_path): Quote the other instance, too.
27098
27099         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
27100         (STATIC_BUF_SIZE): Define.
27101         (quotearg_n_options): Use only statically allocated storage when
27102         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
27103         than STATIC_BUF_SIZE.
27104
27105 2000-07-29  Jim Meyering  <meyering@lucent.com>
27106
27107         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
27108         * lib/dirname.c (dir_name): Likewise.
27109
27110         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
27111         `/'.
27112
27113         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
27114         (dir_name): Assert that there are no trailing slashes.
27115
27116 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
27117
27118         * lib/mbswidth.h (mbswidth): Add a flags argument.
27119         (mbswidth): New declaration.
27120         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
27121         * lib/mbswidth.c (mbswidth): Add a flags argument.
27122         (mbsnwidth): New function.
27123
27124 2000-07-24  Jim Meyering  <meyering@lucent.com>
27125
27126         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
27127
27128 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27129
27130         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
27131
27132 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27133
27134         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
27135         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
27136         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
27137         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
27138         invoke multibyte primitives.
27139
27140 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27141
27142         * lib/quotearg.c:
27143         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
27144         so that mbstate_t is always defined.
27145
27146         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
27147         be 1 in at least one GCC installation, and this configuration
27148         error is likely to be common.  Ignoring MB_LEN_MAX hurts
27149         performance on hosts that have mbrtowc but have only unibyte
27150         locales, but I assume these hosts are rare.
27151
27152 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27153
27154         * lib/mbswidth.c (_XOPEN_SOURCE):
27155         Don't define; this causes problems on Solaris 7.
27156         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
27157
27158 2000-07-23  Jim Meyering  <meyering@lucent.com>
27159
27160         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
27161         too: getgrgid, getpwuid, getuid.
27162
27163 2000-07-23  Jim Meyering  <meyering@lucent.com>
27164
27165         * lib/basename.c (base_name): Add an assertion.
27166
27167 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
27168
27169         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
27170         shadow its mbsinit function.
27171
27172 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
27173
27174         * lib/mbswidth.h: New file.
27175         * lib/mbswidth.c: New file.
27176         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
27177         (noinst_HEADERS): Add mbswidth.h.
27178
27179 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
27180
27181         * lib/config.charset: Add support for FreeBSD. Improve support for
27182         HP-UX and IRIX 6.
27183
27184 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
27185
27186         * m4/mbswidth.m4: New file.
27187         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
27188
27189 2000-07-15  Jim Meyering  <meyering@lucent.com>
27190
27191         * lib/makepath.c: Include quote.h.
27192         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
27193         corresponding argument in a `quote (...)' call.
27194         Give better diagnostics.
27195
27196         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
27197         (noinst_HEADERS): Add quote.h.
27198
27199         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
27200         from tar's src/misc.c.
27201         * lib/quote.h: New file.  Prototypes for same.
27202
27203 2000-07-14  Paul Eggert  <eggert@twinsun.com>
27204
27205         From a suggestion by Bruno Haible.
27206         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
27207         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
27208         to decide whether to define the BeOS workaround macro;
27209         this adjusts to the change to AC_MBSTATE_T.
27210
27211 2000-07-14  Jim Meyering  <meyering@lucent.com>
27212
27213         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
27214         jm_AC_TYPE_UINTMAX_T.
27215
27216 2000-07-13  Paul Eggert  <eggert@twinsun.com>
27217
27218         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
27219
27220         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
27221         quotearg_buffer_restyled): Add support for
27222         clocale_quoting_style.  Undo previous change to
27223         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
27224         and "{RIGHT QUOTATION MARK}" msgids.
27225
27226 2000-07-10  Paul Eggert  <eggert@twinsun.com>
27227
27228         From a suggestion by Bruno Haible.
27229         * m4/mbstate_t.m4 (AC_MBSTATE_T):
27230         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
27231         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
27232         and mbstate_t, to a single-part test that simply defines mbstate_t.
27233         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
27234         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
27235
27236 2000-07-10  Jim Meyering  <meyering@lucent.com>
27237
27238         * m4/strerror_r.m4: Mirror the correction made in autoconf.
27239
27240         * m4/gnu-source.m4: Output to confdefs.h directly.
27241         Suggestion from Akim Demaille.
27242
27243 2000-07-09  Paul Eggert  <eggert@twinsun.com>
27244
27245         The old behavior of quoting `like this' doesn't look good with
27246         newer, ISO-style fonts.  See:
27247         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
27248
27249         Instead, quote "like this" by default.  Let the translator
27250         tailor the locale-specific quoting behavior by providing
27251         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
27252
27253         * lib/quotearg.c (N_): New macro.
27254         (gettext_default): New function.
27255         (quotearg_buffer_restyled): Use
27256         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
27257         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
27258
27259 2000-07-09  Jim Meyering  <meyering@lucent.com>
27260
27261         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
27262         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
27263
27264         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
27265         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
27266
27267 2000-07-09  Jim Meyering  <meyering@lucent.com>
27268
27269         * lib/Most files: Update copyright dates to include 2000.
27270
27271 2000-07-08  Jim Meyering  <meyering@lucent.com>
27272
27273         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
27274         if not defined.
27275         (xgethostname): Remove now-unnecessary #ifdef.
27276         Move declaration of `err' into loop where it's used.
27277
27278 2000-07-05  Paul Eggert  <eggert@twinsun.com>
27279         and Bruno Haible  <haible@clisp.cons.org>
27280
27281         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
27282         only if the test for an object-type mbstate_t fails.  This
27283         prevents us from mistakenly reporting that mbstate_t is a
27284         system object type after we "#define mbstate_t int" to work
27285         around its lack.
27286
27287 2000-07-05  Paul Eggert  <eggert@twinsun.com>
27288         and Bruno Haible  <haible@clisp.cons.org>
27289
27290         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
27291
27292 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27293
27294         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
27295         to strerror_r.
27296         Include <ctype.h> for use of isalpha.
27297
27298 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27299
27300         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
27301         by allocating a larger buffer. Test the gethostname return value for
27302         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
27303         returns an error and ENAMETOOLONG isn't defined.
27304
27305 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27306
27307         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
27308         dimension.
27309
27310 2000-07-04  Jim Meyering  <meyering@lucent.com>
27311
27312         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
27313         of the deprecated AC_CHECKING.
27314
27315 2000-07-04  Jim Meyering  <meyering@lucent.com>
27316
27317         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
27318         Reported by Bruno Haible.
27319
27320 2000-07-04  Jim Meyering  <meyering@lucent.com>
27321
27322         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
27323         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
27324         lacks mbrtowc.
27325
27326 2000-07-03  Paul Eggert  <eggert@twinsun.com>
27327
27328         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
27329         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
27330
27331 2000-07-03  Paul Eggert  <eggert@twinsun.com>
27332         and Bruno Haible  <haible@clisp.cons.org>
27333
27334         * lib/quotearg.c (mbrtowc):
27335         Assign to *pwc, and return 1 only if result is nonzero.
27336         (iswprint): Use ISPRINT when substituting our own mbrtowc.
27337
27338 2000-07-03  Jim Meyering  <meyering@lucent.com>
27339
27340         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
27341
27342 2000-07-03  Jim Meyering  <meyering@lucent.com>
27343
27344         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
27345         This is necessary to get a definition of e.g., UTMP_FILE on
27346         HP-UX 10.20.
27347         From Bob Proulx.
27348
27349 2000-07-02  Jim Meyering  <meyering@lucent.com>
27350
27351         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
27352
27353         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
27354         AC_LIBOBJ(function_name).
27355         * m4/chown.m4: Likewise.
27356         * m4/fnmatch.m4: Likewise.
27357         * m4/ftruncate.m4: Likewise.
27358         * m4/getgroups.m4: Likewise.
27359         * m4/getline.m4: Likewise.
27360         * m4/group-member.m4: Likewise.
27361         * m4/jm-macros.m4: Likewise.
27362         * m4/lstat.m4: Likewise.
27363         * m4/malloc.m4: Likewise.
27364         * m4/memcmp.m4: Likewise.
27365         * m4/nanosleep.m4: Likewise.
27366         * m4/putenv.m4: Likewise.
27367         * m4/realloc.m4: Likewise.
27368         * m4/regex.m4: Likewise.
27369         * m4/stat.m4: Likewise.
27370         * m4/strftime.m4: Likewise.
27371
27372 2000-07-02  Jim Meyering  <meyering@lucent.com>
27373
27374         * lib/quotearg.c (mbstate_t): Don't define here.
27375
27376 2000-07-02  Jim Meyering  <meyering@lucent.com>
27377
27378         * lib/nanosleep.c (SIGCONT): Define if not already defined.
27379
27380 2000-07-01  Jim Meyering  <meyering@lucent.com>
27381
27382         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
27383
27384 2000-07-01  Jim Meyering  <meyering@lucent.com>
27385
27386         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
27387         problem.
27388
27389 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
27390
27391         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
27392         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
27393
27394 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
27395
27396         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
27397         per change in ../m4/ls-mntd-fs.m4.
27398         (read_filesystem_list): Ignore symbolic links.
27399
27400 2000-06-29  Jim Meyering  <meyering@lucent.com>
27401
27402         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
27403         for declaration of strcmp.
27404
27405         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
27406
27407         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
27408         Avoid warning by casting result to `char *' to remove `const'.
27409
27410 2000-06-28  Jim Meyering  <meyering@lucent.com>
27411
27412         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
27413         included by quotearg.c, for which we perform this test.  From
27414         Bruno Haible.
27415
27416 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
27417
27418         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
27419         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
27420         <utmpx.h> exists, put readutmp.o into LIBOBJS.
27421
27422 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
27423
27424         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
27425
27426 2000-06-26  Paul Eggert  <eggert@twinsun.com>
27427
27428         savedir now sets errno on failure and invokes xmalloc to get memory.
27429         Fix a couple of other minor bugs while we're at it.
27430
27431         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
27432         (NAMLEN): Remove macro.
27433         (malloc, realloc): Remove decls.
27434         (stpcpy): Likewise.
27435         ("xalloc.h"): Include.
27436         (NAME_SIZE_DEFAULT): New macro.
27437         (savedir): Use xmalloc / xrealloc to allocate memory.
27438         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
27439         Skip "" directory entries.
27440         Use strlen to calculate directory entry length, since the old method
27441         is rarely used these days and isn't worth supporting.
27442         Don't use a pointer after freeing it.
27443         Check for integer overflow when calculating allocation size.
27444         Use memcpy to copy entries, instead of stpcpy.
27445         Set errno properly when returning NULL.
27446         Check for readdir error.
27447
27448 2000-06-26  Jim Meyering  <meyering@lucent.com>
27449
27450         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
27451
27452 2000-06-25  Jim Meyering  <meyering@lucent.com>
27453
27454         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
27455         Linux header bug when _XOPEN_SOURCE is defined to 500.
27456
27457 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
27458
27459         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
27460         deficiency.
27461
27462 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
27463
27464         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
27465         Include xalloc.h.
27466         Don't include <stdlib.h>.  Don't declare malloc, realloc.
27467
27468 2000-06-24  Jim Meyering  <meyering@lucent.com>
27469
27470         * m4/strerror_r.m4: Revive this file -- to try out an experimental
27471         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
27472         for which strerror does return char*, but which lacks a conveniently
27473         accessible declaration of the function.  If the compile-test says
27474         strerror_r doesn't work, then resort to a `run'-test that works on
27475         BeOS and segfaults on DEC Unix.
27476
27477 2000-06-24  Jim Meyering  <meyering@lucent.com>
27478
27479         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
27480
27481 2000-06-23  Paul Eggert  <eggert@twinsun.com>
27482
27483         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
27484         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
27485
27486 2000-06-23  Paul Eggert  <eggert@twinsun.com>
27487
27488         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
27489         (mbrtowc, mbstate_t): Define substitutes if
27490         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
27491         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
27492         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
27493
27494 2000-06-23  Jim Meyering  <meyering@lucent.com>
27495
27496         * m4/afs.m4: Add missing AC_MSG_RESULT.
27497         Reported by Bruno Haible.
27498
27499         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
27500         Suggestion from Bruno Haible.
27501
27502 2000-06-23  Jim Meyering  <meyering@lucent.com>
27503
27504         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
27505
27506 2000-06-21  Jim Meyering  <meyering@lucent.com>
27507
27508         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
27509
27510 2000-06-21  Jim Meyering  <meyering@lucent.com>
27511
27512         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
27513         (noinst_HEADERS): Add getstr.h.
27514
27515         * lib/getline.c (getstr): Move into a separate file.
27516         * lib/getstr.c (getstr): New file, extracted from getline.c, with
27517         the following changes: new parameter, delim2; both delim[12]
27518         parameters have type `int', not `char'.  The latter would lose
27519         with 8-bit delimiters.
27520         * lib/getstr.h: New file.
27521
27522 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27523
27524         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
27525         than 1024, return a memory chunk of least possible size, instead
27526         of size PATH_MAX + 2. In the loop, increment the size proportionally.
27527         Use free/xmalloc instead of xrealloc to avoid copying for very long
27528         paths.
27529
27530 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27531
27532         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
27533         the empty string.
27534
27535 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27536
27537         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
27538         address, not strdup.  Include <stdlib.h> and don't declare free().
27539
27540 2000-06-19  Jim Meyering  <meyering@lucent.com>
27541
27542         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
27543
27544 2000-06-18  Jim Meyering  <meyering@lucent.com>
27545
27546         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
27547
27548         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
27549         `checking whether...' message to be consistent with that of the
27550         lstat test.
27551
27552 2000-06-18  Jim Meyering  <meyering@lucent.com>
27553
27554         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
27555         Besides, these days every porting target provides a mkdir function.
27556
27557         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
27558         needed. (this snippet comes from src/system.h).
27559
27560 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
27561
27562         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
27563
27564 2000-06-15  Paul Eggert  <eggert@twinsun.com>
27565
27566         * lib/human.c (adjust_value): New function.
27567         (human_readable_inexact): Apply rounding style even when
27568         printing approximate values.
27569
27570 2000-06-14  Paul Eggert  <eggert@twinsun.com>
27571
27572         * lib/human.c (human_readable_inexact): Allow an input block
27573         size that is not a multiple of the output block size, and vice versa.
27574         Reported by Piergiorgio Sartor.
27575
27576 2000-06-14  Paul Eggert  <eggert@twinsun.com>
27577
27578         * lib/getdate.y (get_date): Apply relative times after time
27579         zone indicator, not before.  Reported by Todd A. Jacobs.
27580
27581 2000-06-13  Jim Meyering  <meyering@lucent.com>
27582
27583         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
27584
27585         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
27586
27587 2000-06-12  Paul Eggert  <eggert@twinsun.com>
27588
27589         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
27590
27591 2000-06-12  Jim Meyering  <meyering@lucent.com>
27592
27593         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
27594         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
27595         optional argument.
27596         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
27597         the optional argument, `lib'.
27598
27599 2000-06-08  Jim Meyering  <meyering@lucent.com>
27600
27601         * m4/largefile.m4: Remove file (now that it's part of autoconf).
27602
27603 2000-06-04  Paul Eggert  <eggert@twinsun.com>
27604
27605         Rewrite largefile configuration so that we don't need to run
27606         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
27607         AC_CANONICAL_HOST in configure.in -- jmm]
27608
27609         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
27610         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
27611         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
27612         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
27613         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
27614         All uses changed.
27615         Instead of inspecting the output of getconf, try to compile the
27616         test program without and with the macro definition.
27617         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
27618         for getconf.  Instead, check for the needed flags by compiling
27619         test programs.
27620
27621 2000-06-04  Paul Eggert  <eggert@twinsun.com>
27622
27623         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
27624
27625 2000-06-04  Jim Meyering  <meyering@lucent.com>
27626
27627         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
27628         SunOS 4.1.4 for which gid_t is an unsigned type.
27629
27630 2000-06-03  Jim Meyering  <meyering@lucent.com>
27631
27632         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
27633         now that autoconf requires that.
27634
27635         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
27636         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
27637         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
27638
27639 2000-06-03  Jim Meyering  <meyering@lucent.com>
27640
27641         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
27642
27643 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
27644
27645         * m4/glibc21.m4: New file.
27646         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
27647
27648 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
27649
27650         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
27651         newer, don't install charset.alias.
27652         * lib/config.charset: Change the Linux/glibc rules so they become empty
27653         on glibc-2.1 or newer.
27654
27655 2000-06-02  Jim Meyering  <meyering@lucent.com>
27656
27657         * lib/mountlist.c: Back out last change.  Instead, do this...
27658         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
27659         me_dummy member using the same `ignore'-testing code.
27660         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
27661         fs_type strings.
27662         From Mark D. Roth.
27663
27664 2000-05-29  Jim Meyering  <meyering@lucent.com>
27665
27666         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
27667         mounts with the `ignore' attribute.  Based on a patch from
27668         Mark D. Roth.
27669
27670 2000-05-28  Jim Meyering  <meyering@lucent.com>
27671
27672         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
27673         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27674         * m4/stat.m4: Likewise.
27675         * m4/lstat.m4: Likewise.
27676         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
27677
27678         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
27679         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
27680
27681 2000-05-26  Jim Meyering  <meyering@lucent.com>
27682
27683         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
27684
27685 2000-05-24  Jim Meyering  <meyering@lucent.com>
27686
27687         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
27688         autoconf requires that.
27689         * m4/lib-check.m4: Likewise.
27690         * m4/jm-macros.m4: Likewise.
27691         * m4/strftime.m4: Likewise.
27692
27693         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
27694         AC_CHECK_DECLS, now that autoconf requires that.
27695
27696 2000-05-22  Jim Meyering  <meyering@lucent.com>
27697
27698         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27699         * m4/lstat.m4: Likewise.
27700
27701 2000-05-22  Jim Meyering  <meyering@lucent.com>
27702
27703         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
27704
27705 2000-05-20  Jim Meyering  <meyering@lucent.com>
27706
27707         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
27708         (jm_PREREQ): Use it.
27709
27710 2000-05-18  Jim Meyering  <meyering@lucent.com>
27711
27712         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
27713         back, too, since it may have been modified by allocate_entry.
27714         (hash_delete): Rewrite to use neither the assignment operator
27715         nor the comma operator in an if-expression.
27716
27717 2000-05-15  Paul Eggert  <eggert@twinsun.com>
27718
27719         * lib/closeout.c:
27720         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
27721         Remove; no longer needed.
27722         "quotearg.h": Add include.
27723         (file_name): Do not bother to explicitly initialize to NULL; it's less
27724         efficient on some hosts.
27725         (close_stdout_status): Remove test as to whether stdout was already
27726         closed; it breaks for the case "echo x | sort >&-".
27727         Quote file name colons.
27728         Do not assume that _("write error") lacks format strings.
27729
27730 2000-05-15  Jim Meyering  <meyering@lucent.com>
27731
27732         * lib/version-etc.c (version_etc_copyright): Update the copyright
27733         string used in all --version output.
27734
27735 2000-05-14  Jim Meyering  <meyering@lucent.com>
27736
27737         * lib/closeout.c (close_stdout_set_file_name): New function.
27738         (close_stdout_status): Use new file-scoped global.
27739         Return right away if fstat says the stdout file descriptor is invalid.
27740         * lib/closeout.h (close_stdout_set_file_name): Declare.
27741
27742 2000-05-10  Jim Meyering  <meyering@lucent.com>
27743
27744         * lib/closeout.c [default_exit_status]: New file-scoped variable.
27745         (close_stdout_set_status): New function.
27746         * lib/closeout.h (close_stdout_set_status): Declare.
27747
27748 2000-05-09  Jim Meyering  <meyering@lucent.com>
27749
27750         * m4/gettext.m4: Rename this...
27751         * m4/libintl.m4: ...to this.
27752
27753 2000-05-08  Jim Meyering  <meyering@lucent.com>
27754
27755         * lib/long-options.c: Don't include closeout.h.
27756         (parse_long_options): Don't call close_stdout for --version.
27757
27758 2000-05-06  Paul Eggert  <eggert@twinsun.com>
27759
27760         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
27761         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
27762         2.1.3 bug.  This avoids a clash when files like regex.c define
27763         _GNU_SOURCE.
27764
27765 2000-05-06  Jim Meyering  <meyering@lucent.com>
27766
27767         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
27768         (AC_REPLACE_FUNCS): Add strnlen.
27769
27770         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
27771         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
27772
27773         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
27774         AC_SEARCH_LIBS call for nanosleep.
27775         (LIB_NANOSLEEP): Set and AC_SUBST.
27776
27777 2000-05-06  Jim Meyering  <meyering@lucent.com>
27778
27779         * lib/strnlen.c: Undefine __strnlen and strnlen.
27780         [!weak_alias]: Define __strnlen to strnlen.
27781
27782         * lib/atexit.c: New file, from libiberty.
27783
27784 2000-05-06  Jim Meyering  <meyering@lucent.com>
27785
27786         * lib/closeout.c (close_stdout_status): Also check for errors on the
27787         stderr stream.
27788
27789 2000-05-05  Jim Meyering  <meyering@lucent.com>
27790
27791         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
27792         AC_SEARCH_LIBS call for clock_gettime.
27793         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
27794
27795         * m4/search-libs.m4: Update from autoconf.
27796
27797         su doesn't work on Solaris 2.6.
27798         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
27799         <shadow.h>.  Reported by Dragos Harabor.
27800
27801 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
27802
27803         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
27804         memcpy instead of xmalloc, xrealloc, path_concat.
27805         (locale_charset): Treat empty environment variables as absent.
27806         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
27807
27808 2000-05-04  Jim Meyering  <meyering@lucent.com>
27809
27810         * lib/getopt.c: Update from glibc.
27811         * lib/obstack.c: Likewise.
27812         * lib/obstack.h: Likewise.
27813         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
27814         file
27815
27816         * lib/regex.h: Likewise.
27817         * lib/strndup.c: Likewise.
27818         * lib/strnlen.c: New file, from glibc.
27819
27820 2000-05-03  Jim Meyering  <meyering@lucent.com>
27821
27822         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
27823
27824 2000-05-02  Paul Eggert  <eggert@twinsun.com>
27825
27826         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
27827         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
27828         compile-time test, rather than inspecting host and OS, to
27829         decide whether to define _LARGEFILE_SOURCE.
27830
27831 2000-05-01  Jim Meyering  <meyering@lucent.com>
27832
27833         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
27834
27835         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
27836         Based on a patch from Bruno Haible.
27837
27838 2000-05-01  Jim Meyering  <meyering@lucent.com>
27839
27840         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
27841
27842 2000-04-29  Jim Meyering  <meyering@lucent.com>
27843
27844         * lib/path-concat.c: Declare strdup only if it's not defined.
27845         * lib/canon-host.c: Likewise.
27846
27847 2000-04-28  Jim Meyering  <meyering@lucent.com>
27848
27849         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
27850         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
27851         is included first, then limits.h is included by locale.h by libintl.h.
27852         From John David Anglin.
27853
27854 2000-04-25  Jim Meyering  <meyering@lucent.com>
27855
27856         * lib/makepath.c (S_IRWXUGO): Define.
27857         (make_path): Always perform explicit chmod if MODE specifies any
27858         of the `special' permission bits.  Prompted by a bug report against
27859         install from Mate Wierdl and Joost van Baal.
27860
27861 2000-04-18  Jim Meyering  <meyering@lucent.com>
27862
27863         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
27864         (jm_PREREQ): Use it.
27865
27866 2000-04-18  Jim Meyering  <meyering@lucent.com>
27867
27868         * lib/README: New file.
27869
27870         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
27871         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
27872
27873 2000-04-17  Jim Meyering  <meyering@lucent.com>
27874
27875         Get it right :-)
27876         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
27877         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
27878         Suggestion from Akim Demaille.
27879
27880 2000-04-17  Jim Meyering  <meyering@lucent.com>
27881
27882         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
27883         the definition of it to rpl_strftime also defined-away the system's
27884         declaration.
27885
27886 2000-04-15  Jim Meyering  <meyering@lucent.com>
27887
27888         Use `C' to denote so-called `contiguous' files, the same way
27889         that tar does.
27890         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
27891         (ftypelet): Use S_ISCTG.
27892         From Michael Deutschmann.
27893
27894 2000-04-14  Jim Meyering  <meyering@lucent.com>
27895
27896         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
27897         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
27898         clobbered.
27899
27900 2000-04-14  Jim Meyering  <meyering@lucent.com>
27901
27902         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
27903
27904 2000-04-13  Jim Meyering  <meyering@lucent.com>
27905
27906         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
27907         AH_VERBATIM to insert required #ifndef into config.h.in.
27908         Suggestion from Akim Demaille.
27909
27910 2000-04-12  Jim Meyering  <meyering@lucent.com>
27911
27912         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
27913         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
27914         Christian Krackowizer.
27915
27916         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
27917         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
27918         (AC_SYS_LARGEFILE): Require.
27919         (AM_C_PROTOTYPES): Require.
27920
27921 2000-04-08  Jim Meyering  <meyering@lucent.com>
27922
27923         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
27924         names don't conflict.  Reported by Eli Zaretskii.
27925
27926 2000-04-07  Jim Meyering  <meyering@lucent.com>
27927
27928         * lib/putenv.c: Move inclusion of errno.h so it follows that of
27929         sys/types.h, to work around system header problems on AIX 3.2.5.
27930         From Bruno Haible.
27931
27932 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
27933
27934         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
27935         bug.  Deal with the different error behavior of Irix iconv.
27936
27937 2000-04-05  Paul Eggert  <eggert@twinsun.com>
27938
27939         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
27940         IRIX if the installer said otherwise.
27941
27942 2000-04-05  Jim Meyering  <meyering@lucent.com>
27943
27944         Portability tweaks required for ultrix4.3.
27945         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
27946         (jm_CHECK_DECLS): Add getutent to the list of functions.
27947         (_jm_DECL_HEADERS): Add utmpx.h.
27948         From John David Anglin.
27949
27950         * m4/strftime.m4: Back out the 2000-04-02 change.
27951         Instead of that change, simply undefine putenv in the test program.
27952
27953 2000-04-05  Jim Meyering  <meyering@lucent.com>
27954
27955         Portability tweaks required for ultrix4.3.
27956         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
27957         getutent.
27958         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
27959         * lib/canon-host.c: Declare strdup.
27960         * lib/path-concat.c: Likewise.
27961         From John David Anglin.
27962
27963 2000-04-04  Jim Meyering  <meyering@lucent.com>
27964
27965         Be more DOS 8.3-friendly.
27966         * lib/ref-add.sin: Renamed from ref-add.sed.in.
27967         * lib/ref-del.sin: Renamed from ref-del.sed.in.
27968         * lib/Makefile.am: Reflect renaming.
27969         Reported by Eli Zaretskii.
27970
27971         Use a temporary file name that won't clash with `charset.alias'
27972         in the DOS 8.3 name space.
27973         * lib/Makefile.am (charset_tmp): Define.
27974         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
27975         (uninstall-local): Likewise.
27976         Reported by Eli Zaretskii.
27977
27978 2000-04-03  Jim Meyering  <meyering@lucent.com>
27979
27980         * m4/gettext.m4: Fix typo in comment.
27981
27982         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
27983         textutils/configure.in).  Suggestion from Paul Eggert.
27984         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
27985
27986 2000-04-02  Paul Eggert  <eggert@twinsun.com>
27987
27988         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
27989         variable in the shell rather than using putenv, which isn't
27990         portable.  This avoids the configure-time inter-test dependency
27991         on the potentially-renamed putenv function.
27992
27993 2000-03-30  Paul Eggert  <eggert@twinsun.com>
27994
27995         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
27996         before checking struct stat.st_blksize, so that
27997         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
27998
27999 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28000
28001         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
28002         since strftime.c uses HAVE_STRFTIME to decide whether to use
28003         the underlying strftime.
28004
28005 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28006
28007         * lib/time/strftime.c (my_strftime): Make sure we call the system
28008         strftime, not ourselves, when invoking the underlying strftime.
28009
28010 2000-03-24  Jim Meyering  <meyering@lucent.com>
28011
28012         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
28013         (charset_alias): Define.
28014         (install-exec-local): Factor out common code.
28015         (uninstall-local): Split lines longer than 80.
28016         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
28017         (SUFFIXES): Define.
28018         (.sed.in.sed): New rule.  Don't redirect directly to $@.
28019         (CLEANFILES): Add ref-add.sed and ref-del.sed.
28020
28021 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
28022
28023         * lib/config.charset: Output a line containing "Packages using this
28024         file".
28025         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
28026         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
28027         ref-del.sed): New rules.
28028
28029 2000-03-17  Jim Meyering  <meyering@lucent.com>
28030
28031         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
28032         Otherwise, include <strings.h>
28033
28034 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
28035
28036         * lib/unicodeio.c (utf8_wctomb): New function.
28037         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
28038         format instead of in UCS-4 with platform dependent endianness.
28039
28040 2000-03-10  Jim Meyering  <meyering@lucent.com>
28041
28042         * m4/lib-check.m4: Look for getspnam in -lgen, too.
28043         From Marco Franzen.
28044
28045 2000-03-07  Paul Eggert  <eggert@twinsun.com>
28046
28047         * lib/savedir.c (savedir): Work even if directory size is
28048         negative; this can happen with some screwy NFS configurations.
28049
28050 2000-03-06  Jim Meyering  <meyering@lucent.com>
28051
28052         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
28053         if it's NULL (because we ran out of memory).  From Bruno Haible.
28054
28055 2000-03-05  Jim Meyering  <meyering@lucent.com>
28056
28057         * lib/localcharset.c ("path-concat.h"): Include.
28058         (get_charset_aliases): Use path_concat instead of ANSI string
28059         concatenation.
28060
28061         * lib/unicodeio.h (PARAMS): Define.
28062         Use it to guard prototype.
28063
28064 2000-03-04  Jim Meyering  <meyering@lucent.com>
28065
28066         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
28067         for lib/localcharset.c.
28068
28069 2000-03-04  Jim Meyering  <meyering@lucent.com>
28070
28071         * lib/Makefile.am (install-exec-local): Create $(libdir) before
28072         installing into it.
28073         (uninstall-local): Uncomment this rule so `make distcheck' works
28074         once again.
28075
28076         * lib/unicodeio.c (<errno.h>): Include it.
28077         (errno): Declare if not defined.
28078
28079         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
28080
28081         * lib/config.charset: New version, incorporating remarks from a linux
28082         i18n mailing list.  From Bruno Haible.
28083
28084 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
28085
28086         * m4/codeset.m4: New file.
28087         * m4/iconv.m4: New file.
28088         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
28089
28090 2000-03-03  Jim Meyering  <meyering@lucent.com>
28091
28092         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
28093
28094 2000-03-02  Jim Meyering  <meyering@lucent.com>
28095
28096         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
28097         the messages come out on separate lines.
28098
28099         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
28100         rather than jm_CHECK_DECLARATIONS.
28101         * m4/decl.m4: Remove now-unused file.
28102
28103         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
28104         geteuid.
28105
28106 2000-03-02  Jim Meyering  <meyering@lucent.com>
28107
28108         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
28109
28110 2000-03-01  Jim Meyering  <meyering@lucent.com>
28111
28112         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
28113         * lib/unicodeio.c: Likewise.
28114
28115 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
28116
28117         * lib/config.charset: New file.
28118         * lib/localcharset.c: New file.
28119         * lib/unicodeio.h, lib/unicodeio.c: New files.
28120         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
28121         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
28122         (noinst_HEADERS): Add unicodeio.h.
28123         (all-local, install-exec-local, charset.alias): New targets.
28124
28125 2000-02-28  Paul Eggert  <eggert@twinsun.com>
28126
28127         * lib/quotearg.c (ALERT_CHAR): New macro.
28128         (quotearg_buffer_restyled): Use it.
28129
28130 2000-02-27  Jim Meyering  <meyering@lucent.com>
28131
28132         * m4/check-decl.m4: Add getenv to the list.
28133
28134 2000-02-27  Jim Meyering  <meyering@lucent.com>
28135
28136         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
28137         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
28138
28139         * lib/backupfile.c: Guard inclusion of stdlib.h with
28140         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
28141         Declare malloc if needed.
28142
28143         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
28144         `#ifndef HAVE_DECL..'
28145         now that autoconf always defines the HAVE_DECL_ symbols.
28146         * lib/human.c: Likewise.
28147         * lib/same.c: Likewise.
28148         * lib/strtoumax.c: Likewise.
28149
28150         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
28151         declaration check was not run.
28152         * lib/hash.c: Likewise.
28153         * lib/human.c: Likewise.
28154         * lib/same.c: Likewise.
28155         * lib/strtoumax.c: Likewise.
28156
28157         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
28158         `.', then first look up the entire `.'-containing string as a login
28159         name.
28160
28161 2000-02-23  Jim Meyering  <meyering@lucent.com>
28162
28163         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
28164         in place of my hack.
28165
28166 2000-02-18  Paul Eggert  <eggert@twinsun.com>
28167
28168         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
28169         (textint): New typedef.
28170         (parser_control): Member year changed from int to textint.
28171         All uses changed.
28172         (YYSTYPE): Removed; replaced by %union with int and textint members.
28173         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
28174         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
28175         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
28176         (tSNUMBER, tUNUMBER): Now of type <textintval>.
28177         (date, number, to_year): Use width of number in digits, not its value,
28178         to determine whether it's a 2-digit year, or a 2-digit time.
28179         (yylex): Store number of digits of numeric tokens.
28180         Reported by John Kendall.
28181
28182         (parser_control): Changed from struct parser_control to typedef (for
28183         consistency).  All uses changed.
28184
28185         (tID): Removed; not used.
28186         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
28187
28188 2000-02-14  Paul Eggert  <eggert@twinsun.com>
28189
28190         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
28191         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
28192
28193 2000-02-12  Jim Meyering  <meyering@lucent.com>
28194
28195         * lib/userspec.c (ISDIGIT): Define it.
28196         (isdigit): Remove definition.
28197         (is_number): Use ISDIGIT, not isdigit.
28198         <libintl.h>: Include.
28199         (_ and N_): Define.
28200         (parse_user_spec): Mark translatable strings.
28201
28202 2000-02-10  Jim Meyering  <meyering@lucent.com>
28203
28204         With these changes, nanosleep.[ch] are finally enough like the other
28205         lib/* replacement files to compile on a few more losing systems.
28206
28207         * lib/nanosleep.h: Don't include config.h.
28208         Remove prototype from declaration of nanosleep.
28209         (PARAMS): Remove now-unneeded definition.
28210         * lib/nanosleep.c: #undef nanosleep.
28211         (rpl_nanosleep): Rename from nanosleep.
28212
28213 2000-02-10  Jim Meyering  <meyering@lucent.com>
28214
28215         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
28216         gnu_nanosleep to rpl_nanosleep.
28217
28218 2000-02-09  Jim Meyering  <meyering@lucent.com>
28219
28220         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
28221         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
28222
28223 2000-02-08  Akim Demaille  <akim@epita.fr>
28224
28225         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
28226         `[' and `]' and remove uses of `changequote'.
28227         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
28228         (AC_SYS_LARGEFILE): Likewise.
28229         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
28230         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
28231         of changequote.
28232         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
28233         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
28234         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
28235         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
28236
28237 2000-02-05  Jim Meyering  <meyering@lucent.com>
28238
28239         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
28240         Remove explicit use of AC_HEADER_TIME.  It is required by
28241         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
28242         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
28243         in autoconf whereby the expansion of the latter ended up preceding
28244         the expansion of its prerequisite, AC_HEADER_TIME.
28245         Reported by Volker Borchert.
28246
28247 2000-02-03  Jim Meyering  <meyering@lucent.com>
28248
28249         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
28250
28251 2000-02-03  Jim Meyering  <meyering@lucent.com>
28252
28253         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
28254         rather than with `#if HAVE_UTMPNAME'.
28255
28256 2000-02-02  Jim Meyering  <meyering@lucent.com>
28257
28258         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
28259         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
28260         Reported by Eli Zaretskii.
28261
28262 2000-02-01  Jim Meyering  <meyering@lucent.com>
28263
28264         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
28265
28266 2000-01-31  Jim Meyering  <meyering@lucent.com>
28267
28268         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
28269         functions.  Add the time.h and sys/time.h headers along with the
28270         AC_REQUIRE'ment of AC_HEADER_TIME.
28271
28272 2000-01-31  Jim Meyering  <meyering@lucent.com>
28273
28274         * lib/nanosleep.h (nanosleep): Guard declaration with
28275         `#if ! HAVE_DECL_NANOSLEEP'.
28276         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
28277         the declaration in that vendor's sys/timers.h.
28278         Reported by Christian Krackowizer.
28279
28280         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
28281         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
28282         (ISPRINT): Likewise.
28283         Reported by Tom Tromey.
28284
28285 2000-01-30  Jim Meyering  <meyering@lucent.com>
28286
28287         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
28288
28289         * m4/prereq.m4 (utmp_includes): Define.
28290         Check for ut_user and ut_name members in both struct utmpx
28291         and struct utmp.
28292
28293 2000-01-30  Jim Meyering  <meyering@lucent.com>
28294
28295         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
28296         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
28297         header files where only utmpx.ut_user is declared.
28298
28299         * lib/readutmp.h (UT_USER): Define.
28300
28301 2000-01-29  Jim Meyering  <meyering@lucent.com>
28302
28303         * m4/lib-check.m4: New file containing library-related checks from
28304         fileutils and sh-utils (textutils had none).
28305
28306 2000-01-28  Jim Meyering  <meyering@lucent.com>
28307
28308         * m4/perl.m4: Change format of warning message to look more like that
28309         from the missing script.  Suggestion from François Pinard.
28310
28311 2000-01-25  Jim Meyering  <meyering@lucent.com>
28312
28313         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
28314         well as time.h in the compile check.
28315         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
28316         Fix typo in cross-compiling case: s/yes/no/.
28317
28318 2000-01-23  Jim Meyering  <meyering@lucent.com>
28319
28320         * m4/jm-macros.m4: Move df-related tests here from
28321         fileutils/configure.in
28322
28323         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
28324         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
28325
28326         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
28327         s/space/ac_fsusage_space/.
28328         (jm_FILE_SYSTEM_USAGE): Take two parameters.
28329
28330         * m4/ftruncate.m4: New file (derived from part of
28331         fileutils/configure.in).
28332         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
28333         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
28334
28335         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
28336         AC_SUBST these here, rather than just in sh-util/configure.in, so
28337         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
28338         all the same.
28339         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
28340         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
28341         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
28342         (AC_SUBST(POW_LIBM)): Likewise.
28343         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
28344
28345 2000-01-23  Jim Meyering  <meyering@lucent.com>
28346
28347         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
28348         obstack.c.
28349
28350 2000-01-22  Jim Meyering  <meyering@lucent.com>
28351
28352         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
28353
28354         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
28355
28356         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
28357         configure.in
28358         (AC_CHECK_HEADERS): Likewise for sh-utils.
28359         (AC_CHECK_HEADERS): Likewise for textutils.
28360         Merge the three lists of headers.
28361
28362         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
28363         from fileutils' configure.in.
28364
28365         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
28366         code. Moved tests into their own function (_jm_DECL_HEADERS) in
28367         check-decl.m4.
28368
28369         * m4/check-decl.m4: Use #if rather than #ifdef.
28370         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
28371         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
28372         (_jm_DECL_HEADERS): Define new function.
28373         (jm_CHECK_DECLARATIONS): Require it.
28374
28375 2000-01-22  Jim Meyering  <meyering@lucent.com>
28376
28377         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
28378         [! HAVE_DECL_STRTOULL]: Declare strtoull.
28379         Required for some AIX systems.  Reported by Christian Krackowizer.
28380         [TESTING] (main): New function.
28381
28382         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
28383         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
28384         letters.
28385
28386         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
28387         iswprint.
28388
28389         * lib/strverscmp.c (ISDIGIT): Define.
28390         (strverscmp): Use ISDIGIT, not isdigit.
28391
28392 2000-01-19  Jim Meyering  <meyering@lucent.com>
28393
28394         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
28395         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
28396         defines `struct timespec' in <sys/time.h>
28397
28398         * m4/c-bs-a.m4: Remove uses of changequote altogether.
28399         Thanks to Akim for explaining.
28400
28401 2000-01-17  Paul Eggert  <eggert@twinsun.com>
28402
28403         * lib/nanosleep.c (nanosleep):
28404         Don't use SA_INTERRUPT to decide whether to call sigaction, as
28405         POSIX.1 doesn't require SA_INTERRUPT and some systems
28406         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
28407         it's been part of POSIX.1 since day 1 (in 1988).
28408
28409 2000-01-17  Jim Meyering  <meyering@lucent.com>
28410
28411         * lib/interlock: Remove unused file.  Reported by François Pinard.
28412
28413 2000-01-16  Paul Eggert  <eggert@twinsun.com>
28414
28415         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
28416         alert, backslash, formfeed, and vertical tab unnecessarily in
28417         shell quoting style.
28418
28419 2000-01-16  Jim Meyering  <meyering@lucent.com>
28420
28421         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
28422         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
28423         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
28424         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
28425
28426 2000-01-16  Jim Meyering  <meyering@lucent.com>
28427
28428         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
28429         because the latter didn't work.
28430
28431 2000-01-15  Jim Meyering  <meyering@lucent.com>
28432
28433         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
28434         (AC_REPLACE_FUNCS): Add memcpy and memset.
28435         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
28436         Add strpbrk.
28437         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
28438
28439 2000-01-12  Jim Meyering  <meyering@lucent.com>
28440
28441         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
28442         (jm_PREREQ): Use it.
28443         (jm_PREREQ_READUTMP): New macro.
28444         (jm_PREREQ): Use it.
28445
28446 2000-01-11  Paul Eggert  <eggert@twinsun.com>
28447
28448         Quote multibyte characters correctly.
28449         * m4/c-bs-a.m4: New file.
28450         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
28451         (jm_PREREQ): Use it.
28452
28453 2000-01-11  Paul Eggert  <eggert@twinsun.com>
28454
28455         * m4/uintmax_t.m4: Port to autoconf 2.13.
28456
28457 2000-01-08  Jim Meyering  <meyering@ascend.com>
28458
28459         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
28460         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
28461
28462 2000-01-04  Jim Meyering  <meyering@ascend.com>
28463
28464         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
28465         jm_STRUCT_DIRENT_D_TYPE.
28466         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
28467         jm_STRUCT_DIRENT_D_INO.
28468         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
28469         jm_STRUCT_UTIMBUF.
28470         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
28471         renamings.
28472         * m4/utime.m4: Likewise.
28473
28474         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
28475         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
28476
28477 2000-01-03  Paul Eggert  <eggert@twinsun.com>
28478
28479         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
28480         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
28481
28482 2000-01-02  Jim Meyering  <meyering@ascend.com>
28483
28484         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
28485         remember if this is necessary.
28486
28487 1999-12-26  Jim Meyering  <meyering@ascend.com>
28488
28489         * m4/jm-macros.m4: Use it here.
28490         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
28491
28492 1999-12-23  Jim Meyering  <meyering@ascend.com>
28493
28494         * m4/jm-macros.m4: Check for clock_gettime (moved from
28495         fileutils/configure.in)
28496         Check for gettimeofday.
28497
28498 1999-12-20  Jim Meyering  <meyering@ascend.com>
28499
28500         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
28501         autoconf-2.14a-1999-12-20.
28502
28503 1999-12-19  Jim Meyering  <meyering@ascend.com>
28504
28505         * m4/lstat-slash.m4: New file.
28506         * m4/jm-macros.m4: Use the new macro:
28507         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28508
28509 1999-12-07  Jim Meyering  <meyering@ascend.com>
28510
28511         * m4/perl.m4: Require that File::Compare be available, too.
28512         Too many systems seem to lack it.
28513
28514         * m4/strftime.m4: Add checks for most of the cpp macros tested in
28515         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
28516
28517 1999-11-18  Paul Eggert  <eggert@twinsun.com>
28518
28519         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
28520         problem with the QNX 4.25 shell, which doesn't propagate exit
28521         status of failed commands inside shell assignments.
28522
28523 1999-11-17  Jim Meyering  <meyering@ascend.com>
28524
28525         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
28526
28527 1999-11-07  Jim Meyering  <meyering@ascend.com>
28528
28529         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
28530
28531 1999-11-06  Jim Meyering  <meyering@ascend.com>
28532
28533         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
28534         * m4/jm-macros.m4 (jm_MACROS): Use it here.
28535
28536 1999-11-05  Jim Meyering  <meyering@ascend.com>
28537
28538         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
28539         configure.in of textutils, fileutils, and sh-utils into this one
28540         (shared between those packages) file.
28541         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
28542         AC_STRUCT_ST_BLKSIZE.
28543
28544 1999-11-03  Jim Meyering  <meyering@ascend.com>
28545
28546         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
28547         of AC_CHECK_TYPE checks includes unistd.h.
28548         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
28549         Suggestion from Akim Demaille.
28550
28551 1999-10-30  Jim Meyering  <meyering@ascend.com>
28552
28553         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
28554         m4-quoted string.
28555         * m4/ls-mntd-fs.m4: Likewise.
28556         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
28557         * m4/jm-winsz1.m4: Likewise.
28558
28559         * m4/const.m4: Remove file, since the fix made it into the experimental
28560         version of autoconf.
28561         * m4/mktime.m4: Likewise.
28562
28563         * m4/check-type.m4: Remove file, now that the latest version of
28564         AC_CHECK_TYPE takes a third arg to specify additional #includes.
28565
28566         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
28567         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
28568         AC_CHECK_TYPE.
28569
28570 1999-10-04  Jim Meyering  <meyering@ascend.com>
28571
28572         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
28573
28574 1999-09-22  Paul Eggert  <eggert@twinsun.com>
28575
28576         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
28577         2.95.1 bug with HP-UX 10.20.
28578
28579 1999-09-17  Jim Meyering  <meyering@ascend.com>
28580
28581         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
28582         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
28583         due to missing strdup (against sh-utils-2.0).
28584
28585 1999-08-29  Jim Meyering  <meyering@ascend.com>
28586
28587         * m4/jm-macros.m4: Require jm_BISON.
28588         * m4/bison.m4: New file.
28589
28590 1999-08-17  Paul Eggert  <eggert@twinsun.com>
28591
28592         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
28593         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
28594
28595 1999-08-05  Jim Meyering  <meyering@ascend.com>
28596
28597         * m4/getline.m4: Rename test file from conftestdata to conftest.data
28598         to avoid conflicts with `conftest' on 8+3 filesystems.
28599         Suggestion from Eli Zaretskii.
28600
28601 1999-08-04  Jim Meyering  <meyering@ascend.com>
28602
28603         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
28604         fileutils and sh-utils (textutils's getline test was inadequate).
28605         (AM_FUNC_GETLINE): Run this test.
28606         (AC_CHECK_FUNCS): Check for getdelim.
28607         Reported by Bob Proulx.
28608
28609 1999-08-02  Jim Meyering  <meyering@ascend.com>
28610
28611         * m4/jm-macros.m4: Add a comment.
28612
28613 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28614
28615         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
28616         <inttypes.h> defines strtoumax as a macro (and not as a
28617         function).
28618
28619 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28620
28621         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
28622         that we can shift, multiply and divide unsigned long long
28623         values; Ultrix cc can't do it.
28624
28625 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28626
28627         * m4/mktime.m4: New file, which is a preview of what should appear
28628         in the next public autoconf release.
28629
28630 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28631
28632         * m4/lfs.m4: Remove this file.
28633         * m4/largefile.m4: New file.  It contains the old contents of
28634         lfs.m4, except that all names with prefix AC_LFS have been
28635         changed to use the prefix AC_SYS_LARGEFILE instead, to be
28636         compatible with future autoconf versions.  Also, some minor m4
28637         quoting problems have been fixed.
28638
28639 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28640
28641         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
28642         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
28643         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
28644         and simplify the shell code.
28645
28646 1999-08-01  Jim Meyering  <meyering@ascend.com>
28647
28648         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
28649         m4.
28650
28651 1999-07-20  Jim Meyering  <meyering@ascend.com>
28652
28653         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
28654
28655 1999-07-15  Jim Meyering  <meyering@ascend.com>
28656
28657         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
28658
28659 1999-05-22  Jim Meyering  <meyering@ascend.com>
28660
28661         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
28662
28663 1999-05-20  Jim Meyering  <meyering@ascend.com>
28664
28665         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
28666         Add a colon after each `then' in case $4 is empty.
28667
28668 1999-05-16  Jim Meyering  <meyering@ascend.com>
28669
28670         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
28671
28672 1999-05-10  Jim Meyering  <meyering@ascend.com>
28673
28674         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
28675
28676         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
28677         AC_FUNC_MKTIME.
28678
28679 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
28680
28681         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
28682
28683 1999-05-04  Paul Eggert  <eggert@twinsun.com>
28684
28685         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
28686         not CPPFLAGS, so that linking works correctly in IRIX.
28687
28688 1999-04-30  Paul Eggert  <eggert@twinsun.com>
28689
28690         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
28691
28692 1999-04-20  Paul Eggert  <eggert@twinsun.com>
28693
28694         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
28695         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
28696         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
28697         jm_AC_TYPE_UNSIGNED_LONG_LONG.
28698         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
28699
28700         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
28701
28702 1999-04-20  Jim Meyering  <meyering@ascend.com>
28703
28704         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
28705         AC_REPLACE xstroull if necessary.  From Paul Eggert.
28706         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
28707
28708 1999-04-18  Jim Meyering  <meyering@ascend.com>
28709
28710         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
28711         * m4/jm-macros.m4: Use it.
28712
28713 1999-04-06  Jim Meyering  <meyering@ascend.com>
28714
28715         * m4/strftime.m4: Remove test for %f.
28716
28717 1999-03-29  Jim Meyering  <meyering@ascend.com>
28718
28719         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
28720         superset of the AC_TYPE_* checks in the textutils, fileutils,
28721         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
28722         AC_TYPE_PID_T.
28723
28724 1999-03-28  Jim Meyering  <meyering@ascend.com>
28725
28726         * m4/jm-macros.m4: Define GNU_PACKAGE here.
28727         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
28728         replaced e.g., in the *.sh files of the sh-utils.
28729
28730 1999-03-20  Jim Meyering  <meyering@ascend.com>
28731
28732         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
28733         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
28734         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
28735
28736 1999-03-19  Jim Meyering  <meyering@ascend.com>
28737
28738         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
28739
28740 1999-03-12  Jim Meyering  <meyering@ascend.com>
28741
28742         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
28743
28744 1999-03-07  Jim Meyering  <meyering@ascend.com>
28745
28746         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
28747         declared.
28748
28749 1999-02-17  Jim Meyering  <meyering@ascend.com>
28750
28751         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
28752         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
28753
28754 1999-02-07  Jim Meyering  <meyering@ascend.com>
28755
28756         * m4/group-member.m4: New file -- extracted from sh-utils'
28757         configure.in.
28758
28759         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
28760         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
28761
28762 1999-02-06  Jim Meyering  <meyering@ascend.com>
28763
28764         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
28765         * m4/fnmatch.m4: Likewise.
28766         * m4/getgroups.m4: Likewise.
28767         * m4/lstat.m4: Likewise.
28768         * m4/malloc.m4: Likewise.
28769         * m4/putenv.m4: Likewise.
28770         * m4/realloc.m4: Likewise.
28771         * m4/regex.m4: Likewise.
28772         * m4/stat.m4: Likewise.
28773         * m4/strftime.m4: Likewise.
28774         Suggestion from Alain Magloire.
28775
28776         * m4/chown.m4: Use `.$ac_objext', not `.o'.
28777         * m4/fnmatch.m4: Likewise.
28778         * m4/getgroups.m4: Likewise.
28779         * m4/getline.m4: Likewise.
28780         * m4/lstat.m4: Likewise.
28781         * m4/malloc.m4: Likewise.
28782         * m4/memcmp.m4: Likewise.
28783         * m4/putenv.m4: Likewise.
28784         * m4/realloc.m4: Likewise.
28785         * m4/regex.m4: Likewise.
28786         * m4/stat.m4: Likewise.
28787         * m4/strftime.m4: Likewise.
28788         Suggestion from Alain Magloire.
28789
28790         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
28791         an argument.
28792
28793         * m4/regex.m4: Add a run-time Test for proper operation of
28794         re_compile_pattern.
28795
28796 1999-01-31  Jim Meyering  <meyering@ascend.com>
28797
28798         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
28799
28800 1999-01-30  Jim Meyering  <meyering@ascend.com>
28801
28802         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
28803
28804         * m4/jm-mktime.m4: Make this a wrapper around the official
28805         AM_FUNC_MKTIME rather than my private copy, now that the official one
28806         is up to date.
28807         * m4/mktime.m4: Remove file.
28808
28809         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
28810         * m4/uptime.m4: Likewise.
28811         * m4/uintmax_t.m4: Likewise.
28812
28813 1999-01-28  Jim Meyering  <meyering@ascend.com>
28814
28815         * m4/jm-macros.m4: Use jm_AFS.
28816         * m4/afs.m4: New file (from fileutils' configure.in).
28817
28818         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
28819         * m4/chown.m4: Likewise.
28820         * m4/d-ino.m4: Likewise.
28821         * m4/d-type.m4: Likewise.
28822         * m4/fnmatch.m4: Likewise.
28823         * m4/getgroups.m4: Likewise.
28824         * m4/gettext.m4: Likewise.
28825         * m4/jm-mktime.m4: Likewise.
28826         * m4/jm-winsz2.m4: Likewise.
28827         * m4/lcmessage.m4: Likewise.
28828         * m4/ls-mntd-fs.m4: Likewise.
28829         * m4/malloc.m4: Likewise.
28830         * m4/memcmp.m4: Likewise.
28831         * m4/putenv.m4: Likewise.
28832         * m4/realloc.m4: Likewise.
28833         * m4/st_mtim.m4: Likewise.
28834         * m4/strftime.m4: Likewise.
28835
28836 1999-01-16  Jim Meyering  <meyering@ascend.com>
28837
28838         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
28839         (ARGMATCH_DIE_DECL): Define.
28840
28841 1999-01-12  Jim Meyering  <meyering@ascend.com>
28842
28843         * m4/Makefile.am.in: Rewrite to avoid using fmt.
28844         Reported by Lars Hecking.
28845
28846 1999-01-10  Jim Meyering  <meyering@ascend.com>
28847
28848         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
28849         gross kludge.
28850         * m4/inttypes_h.m4: Likewise.
28851         * m4/lstat.m4: Likewise.
28852         * m4/malloc.m4: Likewise.
28853         * m4/readdir.m4: Likewise.
28854         * m4/realloc.m4: Likewise.
28855         * m4/st_dm_mode.m4: Likewise.
28856         * m4/stat.m4: Likewise.
28857         * m4/utimbuf.m4: Likewise.
28858         * m4/utimes.m4: Likewise.
28859
28860         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
28861         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
28862         comments in config.h.in are meaningful.
28863
28864         * m4/jm-macros.m4: Require autoconf-2.13 here.
28865
28866         * m4/regex.m4: By default, don't use the included regex.c on systems
28867         with glibc 2.  Suggestion from Uli Drepper.
28868
28869 1999-01-02  Jim Meyering  <meyering@ascend.com>
28870
28871         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
28872
28873 1998-12-18  Jim Meyering  <meyering@ascend.com>
28874
28875         * m4/Makefile.am.in (Makefile.am): Simplify rule.
28876         Based on a suggestion from Lars Hecking.
28877
28878 1998-11-16  Paul Eggert  <eggert@twinsun.com>
28879
28880         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
28881
28882 1998-11-16  Jim Meyering  <meyering@ascend.com>
28883
28884         * m4/lfs.m4: Double-quote the `uname...` expression.
28885
28886 1998-11-14  Jim Meyering  <meyering@ascend.com>
28887
28888         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
28889         * m4/stat.m4: Likewise.
28890
28891 1998-11-03  Jim Meyering  <meyering@ascend.com>
28892
28893         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
28894         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
28895
28896 1998-10-18  Jim Meyering  <meyering@ascend.com>
28897
28898         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
28899
28900 1998-10-17  Jim Meyering  <meyering@ascend.com>
28901
28902         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
28903         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
28904         calls for those previously hard-coded headers.  Instead, take a new
28905         parameter.
28906         (jm_CHECK_DECLARATIONS): Reflect interface change.
28907         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
28908         (jm_CHECK_DECL_LOCALTIME_R): New macro.
28909
28910         * m4/mktime.m4: Test for spring-forward gap before long-running test.
28911
28912 1998-10-14  Jim Meyering  <meyering@ascend.com>
28913
28914         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
28915         instead of "TZ=America/Vancouver".  From Paul Eggert.
28916
28917 1998-10-11  Jim Meyering  <meyering@ascend.com>
28918
28919         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
28920         This adds a test for a recently added compatibility fix for mktime.c.
28921         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
28922
28923 1998-09-27  Jim Meyering  <meyering@ascend.com>
28924
28925         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
28926
28927         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
28928         ../configure.in, including a change from Gordon Matzigkeit to allow
28929         cross-compiling for the Hurd.
28930
28931         * m4/glibc.m4: New file/macro to test for the GNU C Library
28932         versions 1 and 2.  From Gordon Matzigkeit.
28933         Indent.
28934
28935 1998-09-21  Jim Meyering  <meyering@ascend.com>
28936
28937         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
28938
28939 1998-08-18  Paul Eggert  <eggert@twinsun.com>
28940
28941         Port nanosecond-resolution times to UnixWare 2.1.2 and
28942         pedantic Solaris 2.6.
28943
28944         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
28945         AC_STRUCT_ST_MTIM.
28946         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
28947         Generate name of ns member, instead of just 1 or undef.
28948         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
28949
28950 1998-08-15  Jim Meyering  <meyering@ascend.com>
28951
28952         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
28953         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
28954         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
28955         instead of jm_TYPE_SSIZE_T.
28956
28957 1998-08-12  Jim Meyering  <meyering@ascend.com>
28958
28959         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
28960
28961 1998-08-02  Jim Meyering  <meyering@ascend.com>
28962
28963         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
28964         in acconfig.h manually.
28965
28966 1998-07-31  Paul Eggert  <eggert@twinsun.com>
28967
28968         * m4/st_mtim.m4: New file.
28969
28970 1998-07-28  Jim Meyering  <meyering@ascend.com>
28971
28972         * m4/utimes.m4: Undef stat.
28973
28974 1998-07-25  Jim Meyering  <meyering@ascend.com>
28975
28976         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
28977         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
28978
28979 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
28980
28981         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
28982         uid and gid actually remain unchanged.
28983
28984 1998-07-07  Jim Meyering  <meyering@ascend.com>
28985
28986         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
28987
28988 1998-07-04  Jim Meyering  <meyering@ascend.com>
28989
28990         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
28991         to prove that this macro can be used in packages without regex.c.
28992
28993 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
28994
28995         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
28996         is to be used.
28997
28998 1998-07-03  Jim Meyering  <meyering@ascend.com>
28999
29000         * m4/gettext.m4: Add -lintl if it's found to be necessary.
29001
29002         * m4/gettext.m4: New file -- from gettext-0.10.35.
29003         * m4/lcmessage.m4: Likewise.
29004         * m4/progtest.m4: Likewise.
29005
29006         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
29007         * m4/jm-macros.m4: Require the new macro.
29008
29009 1998-06-29  Jim Meyering  <meyering@ascend.com>
29010
29011         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
29012         for the definition of NGROUPS (used in a system header included
29013         by sys/mount.h).
29014
29015 1998-06-28  Jim Meyering  <meyering@ascend.com>
29016
29017         * m4/ls-mntd-fs.m4: New file.
29018         * m4/fstypename.m4: New file.
29019
29020         * m4/jm-macros.m4: Require the new macro.
29021         * m4/jm-glibc-io.m4: New file.
29022
29023 1998-05-19  Jim Meyering  <meyering@ascend.com>
29024
29025         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
29026         * m4/lchown.m4: New file.
29027
29028         * m4/Makefile.am.in: New file.
29029         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
29030
29031 1998-05-14  Jim Meyering  <meyering@ascend.com>
29032
29033         * m4/Makefile.am (EXTRA_DIST): Add them.
29034         * m4/jm-macros.m4: New file.
29035         * m4/utimbuf.m4: New file.
29036
29037 1998-05-12  Jim Meyering  <meyering@ascend.com>
29038
29039         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
29040
29041 1998-05-11  Jim Meyering  <meyering@ascend.com>
29042
29043         * m4/isc-posix.m4: New file.
29044
29045 1998-05-10  Jim Meyering  <meyering@ascend.com>
29046
29047         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
29048
29049 1998-05-09  Jim Meyering  <meyering@ascend.com>
29050
29051         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
29052         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
29053         with automake.
29054
29055         * m4/ssize_t.m4: New file.
29056         * m4/mktime.m4: Remove file -- the new automake has this now.
29057
29058 1998-04-26  Jim Meyering  <meyering@ascend.com>
29059
29060         * m4/assert.m4: New file.
29061         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
29062
29063 1998-04-05  Jim Meyering  <meyering@ascend.com>
29064
29065         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
29066         (jm_PREREQ): Use it here.
29067
29068 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
29069
29070         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
29071         in acconfig.h.
29072
29073 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
29074
29075         * m4/prereq.m4: New file.
29076         * m4/error.m4: New file.
29077         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
29078
29079 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
29080
29081         * m4/getline.m4: Don't set am_cv_func_working_getline before the
29082         cache-check for the same variable -- that defeated the purpose of
29083         the test; the test program was never run.  This was a problem only
29084         on systems with losing getline functions -- HP-UX 10.20 is one.
29085         Reported by Bjorn Helgaas.
29086
29087 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
29088
29089         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
29090
29091 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
29092
29093         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
29094
29095         * m4/const.m4: New file.  Use an initializer in this declaration
29096         typedef int charset[2]; const charset x;
29097         Reported by Bob Glickstein.
29098
29099 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
29100
29101         * m4/chown.m4: Fix reversed types on -1 args to chown.
29102         From Kaveh Ghazi.
29103
29104 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
29105
29106         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
29107         Add lseek and memchr.
29108
29109         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
29110         T.E.Dickey <dickey@clark.net> said that some older preprocessors
29111         have a 20-character limit on names.
29112
29113 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
29114
29115         * m4/inttypes_h.m4: New file.
29116         * m4/uintmax_t.m4: New file.
29117         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
29118
29119 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
29120   Free Software Foundation, Inc.
29121 Copying and distribution of this file, with or without modification,
29122 are permitted provided the copyright notice and this notice are preserved.