d01aaba4ef1e1e8a5d23b7ca119165e68d7963de
[gnulib.git] / ChangeLog
1 2007-03-29  Bruno Haible  <bruno@clisp.org>
2
3         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
4
5 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
6
7         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
8         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
9
10 2007-03-29  Eric Blake  <ebb9@byu.net>
11
12         * lib/acl-internal.h: Remove redundant include.
13         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
14         Cygwin when a file is locked.
15
16 2007-03-29  Bruno Haible  <bruno@clisp.org>
17
18         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
19         file.
20         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
21
22 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
23
24         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
25         try to remove a parent directory if the child couldn't be removed
26         (except for the first rmdir, which could fail because the child
27         doesn't exist).  Problem reported by Jeff Blaine in
28         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
29
30 2007-03-28  Bruno Haible  <bruno@clisp.org>
31
32         * lib/striconveh.c (utf8conv_carefully): New function.
33         (mem_cd_iconveh_internal): Invoke it.
34
35 2007-03-28  Bruno Haible  <bruno@clisp.org>
36
37         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
38         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
39         input.
40         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
41         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
42         unistr/u8-uctomb.
43
44 2007-03-28  Bruno Haible  <bruno@clisp.org>
45
46         * modules/unistr/u8-mbtoucr: New file.
47         * lib/unistr/u8-mbtoucr.c: New file.
48         * modules/unistr/u16-mbtoucr: New file.
49         * lib/unistr/u16-mbtoucr.c: New file.
50         * modules/unistr/u16-mbtoucr: New file.
51         * lib/unistr/u16-mbtoucr.c: New file.
52         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
53
54 2007-03-27  Simon Josefsson  <simon@josefsson.org>
55             Bruno Haible  <bruno@clisp.org>
56
57         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
58         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
59         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
60
61         * m4/stdio_h.m4: Add stubs for vasprintf too.
62
63         * modules/stdio: Support vasprintf in sed command.
64
65         * modules/vasprintf: Depend on stdio for prototypes.  Remove
66         vasprintf.h.  Add stdio module indicator.
67
68         * lib/stdio_.h: Declare asprintf and vasprintf, based on
69         vasprintf.h.
70
71         * lib/vasprintf.h: File removed.
72
73         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
74         * lib/vasprintf.c: Ditto.
75         * lib/xvasprintf.c: Ditto.
76         * tests/test-vasprintf-posix.c: Ditto.
77         * tests/test-vasprintf.c: Ditto.
78
79 2007-03-27  Bruno Haible  <bruno@clisp.org>
80
81         Make vasnprintf multithread-safe.
82         * lib/vasnprintf.c (decimal_point_char): New function.
83         (VASNPRINTF): Use it.
84         Suggested by Simon Josefsson.
85
86 2007-03-27  Eric Blake  <ebb9@byu.net>
87
88         Support sub-second birthtime on cygwin.
89         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
90         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
91         (get_stat_birthtime): Also work with st_birthtim.
92
93 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
94
95         * lib/stat-time.h (USE_BIRTHTIME): Remove.
96         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
97         (get_stat_birthtime_ns): Do not try to use "spare" fields.
98         (get_stat_birthtime_ns): Simplify compile-time tests.
99         (get_stat_birthtime): Change the API to look like
100         get_stat_mtime etc., except return a negative tv_nsec on error.
101         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
102         Don't check for "spare" fields.
103         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
104         or for struct stat.st_birthtime, as these tests aren't used.
105         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
106
107 2007-03-27  Bruno Haible  <bruno@clisp.org>
108
109         * lib/stat-time.h: Include <sys/stat.h>.
110
111 2007-03-27  James Youngman  <jay@gnu.org>
112
113         * lib/stat-time.h (get_stat_birthtime): New function for
114           retrieving st_birthtime as provided by UFS2 (hence *BSD).
115         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
116           and its variants.
117         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
118         * modules/stat-time-test: New file.
119         * tests/test-stat-time.c: New test, devised by Bruno Haible.
120
121 2007-03-26  Bruno Haible  <bruno@clisp.org>
122
123         Better support of signalling NaNs.
124         * lib/atanl.c: Include isnanl.h.
125         (atanl): Perform test for NaN at the beginning of the function and
126         through a call to isnanl.
127         * lib/cosl.c: Include isnanl.h.
128         (cosl): Perform test for NaN at the beginning of the function and
129         through a call to isnanl.
130         * lib/ldexpl.c: Include isnanl.h.
131         (ldexpl): Perform test for NaN through a call to isnanl.
132         * lib/logl.c: Include isnanl.h.
133         (logl): Perform test for NaN at the beginning of the function and
134         through a call to isnanl.
135         * lib/sinl.c: Include isnanl.h.
136         (sinl): Perform test for NaN at the beginning of the function and
137         through a call to isnanl.
138         * lib/sqrtl.c: Include isnanl.h.
139         (sqrtl): Perform test for NaN at the beginning of the function and
140         through a call to isnanl.
141         * lib/tanl.c: Include isnanl.h.
142         (tanl): Perform test for NaN at the beginning of the function and
143         through a call to isnanl.
144         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
145         * modules/mathl (Depends-on): Add isnanl.
146
147 2007-03-26  Eric Blake  <ebb9@byu.net>
148
149         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
150         regression in logic sense of previous patch.
151
152 2007-03-26  Bruno Haible  <bruno@clisp.org>
153
154         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
155         unportable shell command "if ! ...".
156         Reported by Ralf Wildenhues.
157
158 2007-03-25  Bruno Haible  <bruno@clisp.org>
159
160         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
161         <sysexits.h> file, and only add EX_CONFIG.
162         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
163         absolute file name and whether it is sufficient. Substitute also
164         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
165         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
166         ABSOLUTE_SYSEXITS_H into sysexits.h.
167
168 2007-03-25  Bruno Haible  <bruno@clisp.org>
169
170         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
171         hints is NULL.
172
173 2007-03-25  Bruno Haible  <bruno@clisp.org>
174
175         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
176         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
177
178 2007-03-25  Bruno Haible  <bruno@clisp.org>
179
180         * lib/vasnprintf.c: Include langinfo.h.
181         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
182         multithread-safe.
183         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
184         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
185         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
186         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
187         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
188         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
189         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
190         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
191         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
192         Reported by Simon Josefsson.
193
194 2007-03-25  Bruno Haible  <bruno@clisp.org>
195
196         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
197         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
198         * modules/vasnprintf (Depends-on): Add stdint.
199
200 2007-03-25  Bruno Haible  <bruno@clisp.org>
201
202         * modules/fpieee: New file.
203         * m4/fpieee.m4: New file.
204         * modules/isnan-nolibm (Depends-on): Add fpieee.
205         * modules/isnanl-nolibm (Depends-on): Add fpieee.
206         * modules/isnanl (Depends-on): Add fpieee.
207
208 2007-03-25  Bruno Haible  <bruno@clisp.org>
209
210         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
211
212 2007-03-25  Bruno Haible  <bruno@clisp.org>
213
214         Avoid test failures on IRIX 6.5.
215         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
216         (main): Use it.
217         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
218         macros.
219         (main): Use them.
220
221 2007-03-25  Bruno Haible  <bruno@clisp.org>
222
223         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
224         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
225         exists but doesn't work.
226         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
227         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
228         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
229         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
230
231 2007-03-25  Bruno Haible  <bruno@clisp.org>
232
233         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
234         returns inf. Needed on IRIX 6.5.
235
236 2007-03-25  Bruno Haible  <bruno@clisp.org>
237
238         * tests/test-frexpl.c: Include isnanl-nolibm.h.
239         (main): Use isnanl instead of x != x idiom.
240         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
241
242         * tests/test-frexp.c: Include isnan.h.
243         (main): Use isnan instead of x != x idiom.
244         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
245
246 2007-03-25  Bruno Haible  <bruno@clisp.org>
247
248         * tests/test-frexp.c (NaN): New function/macro.
249         (main): Use it instead of 0.0 / 0.0.
250         * tests/test-isnan.c (NaN): New function/macro.
251         (main): Use it instead of 0.0 / 0.0.
252         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
253         (test_function): Use it instead of 0.0 / 0.0.
254         * tests/test-vasprintf-posix.c (NaN): New function/macro.
255         (test_function): Use it instead of 0.0 / 0.0.
256         * tests/test-snprintf-posix.h (NaN): New function/macro.
257         (test_function): Use it instead of 0.0 / 0.0.
258         * tests/test-sprintf-posix.h (NaN): New function/macro.
259         (test_function): Use it instead of 0.0 / 0.0.
260         * tests/test-fprintf-posix.h (NaN): New function/macro.
261         (test_function): Use it instead of 0.0 / 0.0.
262         * tests/test-printf-posix.h (NaN): New function/macro.
263         (test_function): Use it instead of 0.0 / 0.0.
264
265         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
266
267 2007-03-25  Bruno Haible  <bruno@clisp.org>
268
269         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
270
271 2007-03-25  Bruno Haible  <bruno@clisp.org>
272
273         * lib/regexec.c (merge_state_with_log): Make static.
274
275 2007-03-25  Bruno Haible  <bruno@clisp.org>
276
277         * lib/trigl.c (kernel_rem_pio2): Make static.
278
279 2007-03-25  Bruno Haible  <bruno@clisp.org>
280
281         * lib/sincosl.c (sincosl_table): Make static.
282
283 2007-03-25  Bruno Haible  <bruno@clisp.org>
284
285         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
286         if the compiler does not support C99.
287
288 2007-03-25  Bruno Haible  <bruno@clisp.org>
289
290         * modules/time (Makefile.am): Ensure all rule action lines start with a
291         tab.
292
293 2007-03-24  Bruno Haible  <bruno@clisp.org>
294
295         * modules/tsearch-tests: New file.
296         * tests/test-tsearch.sh: New file.
297         * tests/test-tsearch.c: New file, mostly copied from glibc.
298
299         * modules/search-tests: New file.
300         * tests/test-search.c: New file.
301
302         * modules/search: New file.
303         * lib/search_.h: New file, incorporating lib/tsearch.h.
304         * m4/search_h.m4: New file.
305         * lib/tsearch.h: Remove file.
306         * lib/tsearch.c: Include search.h instead of tsearch.h.
307         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
308         HAVE_TSEARCH.
309         * modules/tsearch (Files): Remove lib/tsearch.h.
310         (Depends-on): Add search.
311         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
312         (Include): Change tsearch.h into search.h.
313
314 2007-03-24  Bruno Haible  <bruno@clisp.org>
315
316         * modules/fpucw: New file.
317         * lib/fpucw.h: New file.
318         * lib/frexp.c: Include fpucw.h.
319         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
320         (FUNC): Use them.
321         * lib/printf-frexp.c: Include fpucw.h.
322         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
323         (FUNC): Use them.
324         * lib/vasnprintf.c: Include fpucw.h.
325         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
326         'long double' calculations.
327         * tests/test-frexpl.c: Include fpucw.h.
328         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
329         * tests/test-printf-frexpl.c: Include fpucw.h.
330         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
331         * modules/frexpl (Depends-on): Add fpucw.
332         * modules/printf-frexpl (Depends-on): Likewise.
333         * modules/fprintf-posix (Depends-on): Likewise.
334         * modules/snprintf-posix (Depends-on): Likewise.
335         * modules/sprintf-posix (Depends-on): Likewise.
336         * modules/vasnprintf-posix (Depends-on): Likewise.
337         * modules/vasprintf-posix (Depends-on): Likewise.
338         * modules/vfprintf-posix (Depends-on): Likewise.
339         * modules/vsnprintf-posix (Depends-on): Likewise.
340         * modules/vsprintf-posix (Depends-on): Likewise.
341         * modules/frexpl-tests (Depends-on): Likewise.
342         * modules/printf-frexpl-tests (Depends-on): Likewise.
343
344 2007-03-24  Bruno Haible  <bruno@clisp.org>
345
346         * lib/float+.h: New file.
347         * lib/isnan.c: Include float+.h.
348         (SIZE): New macro.
349         (FUNC): Compare only SIZE bytes of the value.
350         * lib/vasnprintf.c: Include float+.h.
351         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
352         SIZEOF_LDBL or SIZEOF_DBL bytes.
353         * modules/isnan-nolibm (Files): Add lib/float+.h.
354         * modules/isnanl-nolibm (Files): Add lib/float+.h.
355         * modules/isnanl (Files): Add lib/float+.h.
356         * modules/vasnprintf (Files): Add lib/float+.h.
357
358 2007-03-24  Bruno Haible  <bruno@clisp.org>
359
360         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
361         include isnanl-nolibm.h.
362
363 2007-03-24  Bruno Haible  <bruno@clisp.org>
364
365         * tests/test-read-file.c (main): Don't produce spurious output for
366         expected situations. Make the test fail if it encountered unexpected
367         results.
368
369 2007-03-24  Bruno Haible  <bruno@clisp.org>
370
371         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
372         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
373
374 2007-03-24  Bruno Haible  <bruno@clisp.org>
375
376         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
377
378 2007-03-24  Bruno Haible  <bruno@clisp.org>
379
380         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
381         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
382
383         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
384         * modules/utf8-ucs4: Turn into a symbolic link to module
385         unistr/u8-mbtouc.
386
387         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
388         utf8-ucs4-unsafe.
389         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
390         unistr/u8-mbtouc-unsafe.
391
392         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
393         * modules/utf16-ucs4: Turn into a symbolic link to module
394         unistr/u16-mbtouc.
395
396         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
397         utf16-ucs4-unsafe.
398         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
399         unistr/u16-mbtouc-unsafe.
400
401         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
402         * modules/ucs4-utf8: Turn into a symbolic link to module
403         unistr/u8-ubtomb.
404
405         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
406         * modules/ucs4-utf16: Turn into a symbolic link to module
407         unistr/u16-ubtomb.
408
409 2007-03-24  Bruno Haible  <bruno@clisp.org>
410
411         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
412         Enable the function only if HAVE_INLINE.
413         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
414         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
415         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
416         Enable the function only if HAVE_INLINE.
417         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
418         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
419         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
420         Enable the function only if HAVE_INLINE.
421         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
422         Enable the function only if HAVE_INLINE.
423         * modules/utf8-ucs4: Update.
424         * modules/utf8-ucs4-unsafe: Update.
425         * modules/utf16-ucs4: Update.
426         * modules/utf16-ucs4-unsafe: Update.
427         * modules/ucs4-utf8: Update.
428         * modules/ucs4-utf16: Update.
429
430 2007-03-24  Bruno Haible  <bruno@clisp.org>
431
432         * lib/utf8-ucs4.h: Remove file.
433         * lib/utf8-ucs4-unsafe.h: Remove file.
434         * lib/utf16-ucs4.h: Remove file.
435         * lib/utf16-ucs4-unsafe.h: Remove file.
436         * lib/ucs4-utf8.h: Remove file.
437         * lib/ucs4-utf16.h: Remove file.
438         * lib/unistr.h: Include their previous contents.
439         * m4/utf-ucs4.m4: Remove file.
440         * m4/ucs4-utf.m4: Remove file.
441         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
442         (Depends-on): Add unistr/base.
443         (configure.ac): Remove gl_UTF_UCS4.
444         (Makefile.am): Update.
445         (Include): Change to unistr.h.
446         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
447         (Depends-on): Add unistr/base.
448         (configure.ac): Remove gl_UTF_UCS4.
449         (Makefile.am): Update.
450         (Include): Change to unistr.h.
451         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
452         (Depends-on): Add unistr/base.
453         (configure.ac): Remove gl_UTF_UCS4.
454         (Makefile.am): Update.
455         (Include): Change to unistr.h.
456         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
457         (Depends-on): Add unistr/base.
458         (configure.ac): Remove gl_UTF_UCS4.
459         (Makefile.am): Update.
460         (Include): Change to unistr.h.
461         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
462         (Depends-on): Add unistr/base.
463         (configure.ac): Remove gl_UCS4_UTF.
464         (Makefile.am): Update.
465         (Include): Change to unistr.h.
466         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
467         (Depends-on): Add unistr/base.
468         (configure.ac): Remove gl_UCS4_UTF.
469         (Makefile.am): Update.
470         (Include): Change to unistr.h.
471         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
472         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
473         utf8-ucs4-unsafe.h.
474         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
475         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
476         utf16-ucs4-unsafe.h.
477         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
478         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
479         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
480         * lib/unistr/u8-strchr.c: Likewise.
481         * lib/unistr/u8-strrchr.c: Likewise.
482         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
483         * lib/unistr/u16-strchr.c: Likewise.
484         * lib/unistr/u16-strrchr.c: Likewise.
485         * lib/striconveh.c: Update.
486         * lib/linebreak.c: Update.
487
488 2007-03-24  Bruno Haible  <bruno@clisp.org>
489
490         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
491         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
492
493 2007-03-22  Bruno Haible  <bruno@clisp.org>
494
495         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
496
497 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
498
499         * MODULES.html.sh (File system functions): New module write-any-file.
500         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
501         * m4/write-any-file.m4: New files.
502
503 2007-03-23  Eric Blake  <ebb9@byu.net>
504
505         * gnulib-tool: Rearrange space-tab sequences, since some editors
506         like to eat them.
507
508 2007-03-23  Eric Blake  <ebb9@byu.net>
509
510         * lib/version-etc.c (version_etc_va): Update license wording to
511         be more concise.  Recommended by Richard Stallman.
512
513 2007-03-22  Bruno Haible  <bruno@clisp.org>
514
515         * lib/poll.c (MSG_PEEK): New fallback definition.
516
517 2007-03-22  Bruno Haible  <bruno@clisp.org>
518
519         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
520         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
521         (main): Update.
522         Fixes a compilation error on BeOS.
523
524 2007-03-22  Bruno Haible  <bruno@clisp.org>
525
526         * modules/frexpl-tests: New file.
527         * tests/test-frexpl.c: New file.
528
529         * modules/frexpl: New file.
530         * m4/frexpl.m4: New file.
531         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
532         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
533         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
534         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
535         (Depends-on): Add frexpl. Remove isnanl-nolibm.
536         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
537
538 2007-03-22  Bruno Haible  <bruno@clisp.org>
539
540         * lib/frexpl.c: Share code with lib/frexp.c.
541         * modules/mathl (Files): Add lib/frexp.c.
542         (Depends-on): Add isnanl-nolibm.
543
544 2007-03-22  Bruno Haible  <bruno@clisp.org>
545
546         * modules/printf-frexp (Files): Add m4/frexp.m4.
547         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
548         only if the found frexp function actually works.
549
550 2007-03-22  Bruno Haible  <bruno@clisp.org>
551
552         * lib/frexp.c: Remove older implementation that uses divisions.
553
554 2007-03-21  Bruno Haible  <bruno@clisp.org>
555
556         * modules/frexp-tests: New file.
557         * tests/test-frexp.c: New file.
558
559         * modules/frexp: New file.
560         * lib/frexp.c: New file.
561         * m4/frexp.m4: New file.
562         * lib/math_.h (frexp): New declaration.
563         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
564         REPLACE_FREXP.
565         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
566
567 2007-03-21  Bruno Haible  <bruno@clisp.org>
568
569         * modules/isnanl-tests: New file.
570         * tests/test-isnanl.c: New file.
571
572         * modules/isnanl: New file.
573         * lib/isnanl.h: New file.
574         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
575         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
576         gl_FUNC_ISNANL_WORKS.
577         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
578         New macros.
579
580 2007-03-21  Bruno Haible  <bruno@clisp.org>
581
582         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
583         lib/isnanl.h.
584         (Include): Update.
585         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
586         * lib/vasnprintf.c: Update.
587         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
588         tests/test-isnanl.h, remove tests/test-isnanl.c.
589         (Makefile.am): Update.
590         * tests/test-isnanl-nolibm.c: New file.
591         * tests/test-isnanl.h: New file.
592         * tests/test-isnanl.c: Remove file.
593
594 2007-03-21  Jim Meyering  <jim@meyering.net>
595
596         When trying to open ".", treat ESTALE like EACCES.
597         * lib/savewd.c (savewd_save): Resort to forking not just upon
598         failure with EACCES, but also when errno is ESTALE.
599
600 2007-03-20  Bruno Haible  <bruno@clisp.org>
601
602         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
603         Needed on AIX 5.1. Reported by Matthew Woehlke.
604
605 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
606
607         Suggestions by Bruno Haible:
608         * lib/acl-internal.h: Include "gettext.h" rather than rolling
609         our own.
610         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
611         * modules/acl (Depends-on): Add gettext.
612
613 2007-03-19  Bruno Haible  <bruno@clisp.org>
614
615         * modules/iconvme: Remove file.
616         * lib/iconvme.h: Remove file.
617         * lib/iconvme.c: Remove file.
618         * m4/iconvme.m4: Remove file.
619
620 2007-03-19  Bruno Haible  <bruno@clisp.org>
621
622         * doc/relocatable-maint.texi: Break long shell script line.
623         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
624
625 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
626
627         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
628         handle file_has_acl.
629         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
630         * lib/acl.c: Move header inclusions and related macro defns into
631         lib/acl-internal.h.
632         (S_ISLNK): Remove defn, since that's now done for us.
633         (file_has_acl): Move to lib/file-has-acl.c.
634         Call acl_trivial if available.  This is the crucial part of the fix.
635         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
636         shared within the library.  Rewrite a bit, partly to make it compatible
637         with the GNU coding style.
638         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
639         Remove unnecessary double-quotes.
640         Don't test for acl_to_text; the build will catch that.
641         Replace acl_entries if it doesn't exist and it is needed.
642         Check for -lsec and acl_trivial (as used on Solaris 10).
643         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
644         lib/file-has-acl.c.
645         (Depends-on): Add sys_stat, for S_ISLNK.
646
647 2007-03-19  Ben Pfaff  <blp@gnu.org>
648
649         * doc/gnulib.texi: Fix typos.
650         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
651
652 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
653
654         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
655         If size is zero here, buf must be zero.
656
657 2007-03-19  Simon Josefsson  <simon@josefsson.org>
658
659         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
660         <bruno@clisp.org>.
661
662 2007-03-18  Bruno Haible  <bruno@clisp.org>
663
664         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
665         Suggested by Eric Blake.
666
667 2007-03-18  Ben Pfaff  <blp@gnu.org>
668
669         * doc/relocatable.texi: Recommend using as prefix a directory
670         that does not exist and will never be created.  Based on
671         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
672         and others.
673
674 2007-03-17  Bruno Haible  <bruno@clisp.org>
675
676         * lib/fchownat.c: Include lchown.h.
677
678 2007-03-17  Bruno Haible  <bruno@clisp.org>
679
680         Fix endless loop when the given allocated size was > INT_MAX.
681         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
682         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
683         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
684         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
685         * lib/sprintf.c (sprintf): Likewise.
686
687 2007-03-17  Bruno Haible  <bruno@clisp.org>
688
689         * tests/test-argp-2.sh (func_compare): Output a context diff.
690
691 2007-03-17  Bruno Haible  <bruno@clisp.org>
692
693         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
694         locale's decimal-point character.
695
696 2007-03-17  Bruno Haible  <bruno@clisp.org>
697
698         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
699         before comparing it. Needed because on some platforms (e.g. x86) a
700         'long double' occupies less bytes than sizeof (long double).
701
702 2007-03-17  Bruno Haible  <bruno@clisp.org>
703
704         * tests/test-crc.c (main): Make printf statements 64-bit clean.
705         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
706         * tests/test-getaddrinfo.c (simple): Likewise.
707         * tests/test-read-file.c (main): Likewise.
708
709 2007-03-17  Bruno Haible  <bruno@clisp.org>
710
711         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
712
713 2007-03-17  Bruno Haible  <bruno@clisp.org>
714
715         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
716         unused variable.
717
718 2007-03-17  Bruno Haible  <bruno@clisp.org>
719
720         * tests/test-c-strcasecmp.c: Include c-strcase.h.
721         * tests/test-c-strncasecmp.c: Likewise.
722
723 2007-03-17  Bruno Haible  <bruno@clisp.org>
724
725         * modules/stdlib (Depends-on): Add unistd.
726         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
727         Needed for MacOS X 10.3.
728
729 2007-03-17  Bruno Haible  <bruno@clisp.org>
730
731         * lib/unistr/u-strdup.h: Include <stdlib.h>.
732
733 2007-03-17  Bruno Haible  <bruno@clisp.org>
734
735         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
736
737 2007-03-17  Bruno Haible  <bruno@clisp.org>
738
739         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
740         to reflect files copied from gnulib (with or without modifications).
741         Suggested by Jim Meyering.
742
743 2007-03-17  Eric Blake  <ebb9@byu.net>
744
745         * NEWS: Document stdlib change from 2007-02-18.
746
747 2007-03-17  Jim Meyering  <jim@meyering.net>
748
749         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
750         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
751         someone uses a name containing shell meta-characters.
752         Reported by Alfred M. Szmidt.
753
754         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
755
756 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
757
758         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
759         and copy gettext configuration files only if configure.ac contains
760         a use of AM_GNU_GETTEXT_VERSION.
761
762 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
763
764         * build-aux/bootstrap (gnulib_name): New variable.
765         (gnulib_tool_options): Use it.
766
767 2007-03-13  Simon Josefsson  <simon@josefsson.org>
768
769         * tests/test-des.c: Use new namespace.
770
771 2007-03-15  Bruno Haible  <bruno@clisp.org>
772
773         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
774         Reported by James Youngman <jay@gnu.org>.
775
776 2007-03-15  Bruno Haible  <bruno@clisp.org>
777
778         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
779         declared prototype. Needed with cc on OSF/1 5.1.
780
781 2007-03-15  Bruno Haible  <bruno@clisp.org>
782
783         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
784         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
785         (struct gl_list_implementation): Add dispose_fn argument to the
786         'create_empty', 'create' methods.
787         (struct gl_list_impl_base): Add field 'dispose_fn'.
788         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
789         argument.
790         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
791         dispose_fn argument.
792         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
793         dispose_fn on the dropped values.
794         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
795         dispose_fn argument.
796         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
797         dropped values.
798         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
799         (gl_tree_remove_node): Call dispose_fn on the dropped value.
800         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
801         (gl_tree_remove_node): Call dispose_fn on the dropped value.
802         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
803         argument.
804         (gl_tree_list_free): Call dispose_fn on the dropped values.
805         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
806         the dropped values.
807         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
808         Add dispose_fn argument.
809         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
810         Call dispose_fn on the dropped values.
811         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
812         Add dispose_fn argument.
813         (gl_sublist_create): Initialize the 'dispose_fn' field.
814         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
815         * tests/test-array_list.c (main): Update.
816         * tests/test-carray_list.c (main): Update.
817         * tests/test-avltree_list.c (main): Update.
818         * tests/test-rbtree_list.c (main): Update.
819         * tests/test-avltreehash_list.c (main): Update.
820         * tests/test-rbtreehash_list.c (main): Update.
821         * tests/test-linked_list.c (main): Update.
822         * tests/test-linkedhash_list.c (main): Update.
823         * tests/test-array_oset.c (main): Update.
824
825 2007-03-15  Bruno Haible  <bruno@clisp.org>
826
827         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
828         (gl_oset_create_empty): Add dispose_fn argument.
829         (struct gl_oset_implementation): Add dispose_fn argument to
830         'create_empty' method.
831         (struct gl_oset_impl_base): Add dispose_fn field.
832         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
833         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
834         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
835         values.
836         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
837         (gl_tree_oset_free): Call dispose_fn on the dropped values.
838         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
839         dropped value.
840         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
841         dropped value.
842         * tests/test-array_oset.c (main): Update.
843         * tests/test-avltree_oset.c (main): Update.
844         * tests/test-rbtree_oset.c (main): Update.
845         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
846
847 2007-03-13  Bruno Haible  <bruno@clisp.org>
848
849         * tests/test-stdbool.c (i): Update after last patch.
850
851 2007-03-12  Bruno Haible  <bruno@clisp.org>
852
853         * lib/quotearg.c: Include <wctype.h> early, before the definition of
854         the iswprint macro. Needed on Solaris 2.5.1.
855
856 2007-03-12  Bruno Haible  <bruno@clisp.org>
857
858         * tests/test-printf-frexp.c (main): Declare x as volatile.
859
860 2007-03-12  Simon Josefsson  <simon@josefsson.org>
861
862         * doc/gnulib.texi (Build robot for gnulib): New section.
863
864 2007-03-12  Jim Meyering  <jim@meyering.net>
865
866         * build-aux/bootstrap: New file.
867         * build-aux/bootstrap.conf: New file, from coreutils.
868
869 2007-03-11  Bruno Haible  <bruno@clisp.org>
870
871         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
872
873 2007-03-12  Simon Josefsson  <simon@josefsson.org>
874
875         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
876         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
877         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
878
879 2007-03-11  Bruno Haible  <bruno@clisp.org>
880
881         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
882         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
883
884 2007-03-11  Bruno Haible  <bruno@clisp.org>
885
886         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
887         formula. Needed for SunPRO C 5.0.
888
889 2007-03-11  Bruno Haible  <bruno@clisp.org>
890
891         * modules/long-options (Depends-on): Add getopt.
892
893 2007-03-11  Bruno Haible  <bruno@clisp.org>
894
895         * modules/modechange (Depends-on): Add stdbool.
896
897 2007-03-11  Bruno Haible  <bruno@clisp.org>
898
899         * modules/i-ring (Depends-on): Add stdbool.
900
901 2007-03-11  Bruno Haible  <bruno@clisp.org>
902
903         * modules/gc-des (Depends-on): Add stdbool.
904
905 2007-03-11  Bruno Haible  <bruno@clisp.org>
906
907         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
908
909 2007-03-11  Bruno Haible  <bruno@clisp.org>
910
911         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
912
913 2007-03-11  Bruno Haible  <bruno@clisp.org>
914
915         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
916
917 2007-03-11  Bruno Haible  <bruno@clisp.org>
918
919         * lib/vasnprintf.c (sprintf): Undefine.
920
921 2007-03-11  Bruno Haible  <bruno@clisp.org>
922
923         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
924         initializers in SunPRO C and Compaq C compilers.
925
926 2007-03-11  Bruno Haible  <bruno@clisp.org>
927
928         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
929         decrementing code ANSI C compliant.
930
931 2007-03-11  Bruno Haible  <bruno@clisp.org>
932
933         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
934         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
935
936 2007-03-11  Bruno Haible  <bruno@clisp.org>
937
938         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
939         <stdbool.h> substitute doesn't pass.
940
941 2007-03-11  Bruno Haible  <bruno@clisp.org>
942
943         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
944
945 2007-03-11  Bruno Haible  <bruno@clisp.org>
946
947         * gnulib-tool (func_create_megatestdir): Create also an autobuild
948         script, for submission to autobuild.josefsson.org.
949
950 2007-03-10  Bruno Haible  <bruno@clisp.org>
951
952         * modules/canonicalize-lgpl-tests: New file.
953         * tests/test-canonicalize-lgpl.sh: New file.
954         * tests/test-canonicalize-lgpl.c: New file.
955
956         * modules/c-strcase-tests: New file.
957         * tests/test-c-strcase.sh: New file.
958         * tests/test-c-strcasecmp.c: New file.
959         * tests/test-c-strncasecmp.c: New file.
960
961         * modules/atexit-tests: New file.
962         * tests/test-atexit.sh: New file.
963         * tests/test-atexit.c: New file.
964
965 2007-03-10  Bruno Haible  <bruno@clisp.org>
966
967         * tests/test-binary-io.sh: Use temporary filenames that are not so
968         likely to clash with those of other tests (in a parallel make).
969         * tests/test-binary-io.c: Likewise.
970
971 2007-03-10  Bruno Haible  <bruno@clisp.org>
972
973         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
974         fallback; use #error instead.
975         Suggested by Simon Josefsson.
976
977 2007-03-10  Bruno Haible  <bruno@clisp.org>
978
979         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
980         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
981         first and the last.
982
983 2007-03-10  Bruno Haible  <bruno@clisp.org>
984
985         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
986
987 2007-03-10  Bruno Haible  <bruno@clisp.org>
988
989         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
990         "make distcheck".
991         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
992         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
993         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
994
995 2007-03-10  Bruno Haible  <bruno@clisp.org>
996
997         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
998         variable.
999         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
1000         variable.
1001
1002 2007-03-09  Eric Blake  <ebb9@byu.net>
1003         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
1004
1005         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
1006         types are not being provided by gnulib.
1007         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
1008         types are supported.
1009
1010 2007-03-10  Bruno Haible  <bruno@clisp.org>
1011
1012         * lib/stdio_.h (__attribute__): New macro.
1013         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
1014         vsprintf): Specify __attribute__ __format__ for GCC.
1015         Suggested by Eric Blake.
1016
1017 2007-03-09  Bruno Haible  <bruno@clisp.org>
1018
1019         * modules/printf-posix-tests: New file.
1020         * tests/test-printf-posix.sh: New file.
1021         * tests/test-printf-posix.c: New file.
1022
1023         * modules/printf-posix: New file.
1024         * lib/printf.c: New file.
1025         * m4/printf-posix-rpl.m4: New file.
1026         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
1027         REPLACE_PRINTF.
1028         * lib/stdio_.h (printf): New declaration.
1029         (format, __format__, ____printf____, ____scanf____, ____strftime____,
1030         ____strfmon____): New macros.
1031         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
1032         REPLACE_PRINTF.
1033
1034 2007-03-09  Bruno Haible  <bruno@clisp.org>
1035
1036         * tests/test-vasnprintf-posix2.sh: New file.
1037         * tests/test-vasnprintf-posix2.c: New file.
1038         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
1039         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
1040         (Makefile.am): Activate test-vasnprintf-posix2.sh.
1041
1042         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
1043         a locale dependent decimal point, rather than always '.'.
1044
1045 2007-03-09  Eric Blake  <ebb9@byu.net>
1046
1047         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
1048         spite of platforms like Tandem/NSK that define it to -1.
1049
1050 2007-03-08  Bruno Haible  <bruno@clisp.org>
1051
1052         * modules/vprintf-posix-tests: New file.
1053         * tests/test-vprintf-posix.sh: New file.
1054         * tests/test-vprintf-posix.c: New file.
1055         * tests/test-printf-posix.h: New file.
1056
1057         * modules/vprintf-posix: New file.
1058         * lib/vprintf.c: New file.
1059         * m4/vprintf-posix.m4: New file.
1060         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
1061         REPLACE_VPRINTF.
1062         * lib/stdio_.h (vprintf): New declaration.
1063         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
1064         REPLACE_VPRINTF.
1065
1066 2007-03-08  Bruno Haible  <bruno@clisp.org>
1067
1068         * modules/fprintf-posix-tests: New file.
1069         * tests/test-fprintf-posix.sh: New file.
1070         * tests/test-fprintf-posix.c: New file.
1071
1072         * modules/fprintf-posix: New file.
1073         * lib/fprintf.c: New file.
1074         * m4/fprintf-posix.m4: New file.
1075         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
1076         REPLACE_FPRINTF.
1077         * lib/stdio_.h (fprintf): New declaration.
1078         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
1079         REPLACE_FPRINTF.
1080
1081 2007-03-08  Bruno Haible  <bruno@clisp.org>
1082
1083         * modules/vfprintf-posix-tests: New file.
1084         * tests/test-vfprintf-posix.sh: New file.
1085         * tests/test-vfprintf-posix.c: New file.
1086         * tests/test-fprintf-posix.h: New file.
1087         * tests/test-fprintf-posix.out: New file.
1088
1089         * modules/vfprintf-posix: New file.
1090         * lib/vfprintf.c: New file.
1091         * m4/vfprintf-posix.m4: New file.
1092         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
1093         REPLACE_VFPRINTF.
1094         * lib/stdio_.h (vfprintf): New declaration.
1095         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
1096         REPLACE_VFPRINTF.
1097
1098 2007-03-08  Bruno Haible  <bruno@clisp.org>
1099
1100         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
1101
1102 2007-03-08  Bruno Haible  <bruno@clisp.org>
1103
1104         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
1105         instead of 'expr' invocations.
1106         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1107         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1108         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1109         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1110         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1111         Suggested by Paul Eggert.
1112
1113 2007-03-08  Bruno Haible  <bruno@clisp.org>
1114
1115         * modules/fseterr-tests: New file.
1116         * tests/test-fseterr.c: New file.
1117
1118         * modules/fseterr: New file.
1119         * lib/fseterr.h: New file.
1120         * lib/fseterr.c: New file.
1121
1122 2007-03-08  Bruno Haible  <bruno@clisp.org>
1123
1124         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
1125         * lib/getopt_.h: Likewise.
1126         * lib/mbswidth.h: Likewise.
1127         * lib/setenv.h: Likewise.
1128         * lib/vasnprintf.h: Likewise.
1129         * lib/vasprintf.h: Likewise.
1130         * lib/verror.h: Likewise.
1131         * lib/xsetenv.h: Likewise.
1132         * lib/xvasprintf.h: Likewise.
1133
1134 2007-03-08  Jim Meyering  <jim@meyering.net>
1135
1136         * users.txt: Add parted.
1137
1138         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
1139
1140 2007-03-07  Bruno Haible  <bruno@clisp.org>
1141
1142         * m4/printf.m4: Make the shell script snippets copy&pastable.
1143
1144 2007-03-02  Bruno Haible  <bruno@clisp.org>
1145
1146         * lib/netinet_in_.h: New file.
1147         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
1148         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
1149         * modules/netinet_in (Files): Add lib/netinet_in_.h.
1150         (Depends-on): Add absolute-header.
1151         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
1152         into netinet/in.h.
1153
1154 2007-03-03  Bruno Haible  <bruno@clisp.org>
1155
1156         * lib/sys_select_.h: New file.
1157         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
1158         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
1159         * modules/sys_select (Files): Add lib/sys_select_.h.
1160         (Depends-on): Add absolute-header.
1161         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
1162         into sys/select.h.
1163
1164 2007-03-02  Bruno Haible  <bruno@clisp.org>
1165
1166         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
1167         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
1168         values.
1169         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
1170         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
1171         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
1172         * modules/sys_socket (Depends-on): Add absolute-header.
1173         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
1174         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
1175         (Include): Remove requirement of inclusion of <sys/types.h>.
1176
1177 2007-03-02  Bruno Haible  <bruno@clisp.org>
1178
1179         * lib/byteswap_.h (bswap_32): Fix formula.
1180
1181 2007-03-06  Bruno Haible  <bruno@clisp.org>
1182
1183         * modules/sprintf-posix-tests: New file.
1184         * tests/test-sprintf-posix.c: New file.
1185
1186         * modules/sprintf-posix: New file.
1187         * lib/sprintf.c: New file.
1188         * m4/sprintf-posix.m4: New file.
1189         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
1190         REPLACE_SPRINTF.
1191         * lib/stdio_.h (sprintf): New declaration.
1192         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
1193         REPLACE_SPRINTF.
1194
1195 2007-03-06  Bruno Haible  <bruno@clisp.org>
1196
1197         * modules/vsprintf-posix-tests: New file.
1198         * tests/test-vsprintf-posix.c: New file.
1199         * tests/test-sprintf-posix.h: New file.
1200
1201         * modules/vsprintf-posix: New file.
1202         * lib/vsprintf.c: New file.
1203         * m4/vsprintf-posix.m4: New file.
1204         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
1205         REPLACE_VSPRINTF.
1206         * lib/stdio_.h (vsprintf): New declaration.
1207         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
1208         REPLACE_VSPRINTF.
1209
1210 2007-03-06  Bruno Haible  <bruno@clisp.org>
1211
1212         * modules/vsnprintf (Depend-on): Remove minmax.
1213
1214 2007-03-06  Bruno Haible  <bruno@clisp.org>
1215
1216         * modules/snprintf-posix-tests: New file.
1217         * tests/test-snprintf-posix.c: New file.
1218
1219         * modules/snprintf-posix: New file.
1220         * m4/snprintf-posix.m4: New file.
1221         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
1222         gl_FUNC_SNPRINTF.
1223         (gl_FUNC_SNPRINTF): Invoke it.
1224         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
1225         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
1226         is set.
1227         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
1228
1229 2007-03-06  Bruno Haible  <bruno@clisp.org>
1230
1231         * modules/vsnprintf-posix-tests: New file.
1232         * tests/test-vsnprintf-posix.c: New file.
1233         * tests/test-snprintf-posix.h: New file.
1234
1235         * modules/vsnprintf-posix: New file.
1236         * m4/vsnprintf-posix.m4: New file.
1237         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
1238         gl_FUNC_VSNPRINTF.
1239         (gl_FUNC_VSNPRINTF): Invoke it.
1240         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
1241         * lib/stdio_.h (vsnprintf): Define as a replacement if
1242         REPLACE_VSNPRINTF is set.
1243         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
1244
1245 2007-03-06  Bruno Haible  <bruno@clisp.org>
1246
1247         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
1248         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
1249
1250 2007-03-06  Bruno Haible  <bruno@clisp.org>
1251
1252         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
1253         (asinl): Declare also if HAVE_DECL_ASINL is set.
1254         (atanl): Declare also if HAVE_DECL_ATANL is set.
1255         (ceill): Declare also if HAVE_DECL_CEILL is set.
1256         (cosl): Declare also if HAVE_DECL_COSL is set.
1257         (expl): Declare also if HAVE_DECL_EXPL is set.
1258         (floorl): Declare also if HAVE_DECL_FLOORL is set.
1259         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
1260         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
1261         (logl): Declare also if HAVE_DECL_LOGL is set.
1262         (sinl): Declare also if HAVE_DECL_SINL is set.
1263         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
1264         (tanl): Declare also if HAVE_DECL_TANL is set.
1265         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
1266         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
1267         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
1268         declaration of frexpl, ldexpl.
1269         * modules/printf-frexpl (Depends-on): Add math.
1270         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
1271
1272 2007-03-05  Bruno Haible  <bruno@clisp.org>
1273
1274         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
1275         frexpl and ldexpl are declared.
1276         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
1277
1278 2007-03-05  Bruno Haible  <bruno@clisp.org>
1279
1280         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
1281         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
1282
1283 2007-03-05  Bruno Haible  <bruno@clisp.org>
1284
1285         * lib/stdio_.h: Include <stddef.h>.
1286
1287 2007-03-05  Bruno Haible  <bruno@clisp.org>
1288
1289         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
1290
1291 2007-03-05  Bruno Haible  <bruno@clisp.org>
1292
1293         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
1294         NetBSD 4, from Ralf Wildenhues.
1295
1296 2007-03-04  Bruno Haible  <bruno@clisp.org>
1297
1298         * lib/vasprintf.h: Update #if logic for the case when the functions
1299         exist but are overridden.
1300
1301 2007-03-04  Bruno Haible  <bruno@clisp.org>
1302
1303         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
1304         implementations: glibc-2.4 and MacOS X 10.3.
1305         * tests/test-vasnprintf-posix.c (test_function): Test also the case
1306         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
1307         * tests/test-vasprintf-posix.c (test_function): Likewise.
1308
1309 2007-03-04  Bruno Haible  <bruno@clisp.org>
1310
1311         * modules/vasprintf-posix-tests: New file.
1312         * tests/test-vasprintf-posix.c: New file.
1313
1314         * modules/vasprintf-posix: New file.
1315         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
1316         defined.
1317         * m4/vasprintf-posix.m4: New file.
1318         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
1319         gl_FUNC_VASPRINTF.
1320         (gl_FUNC_VASPRINTF): Invoke it.
1321         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
1322         here.
1323         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
1324
1325 2007-03-04  Bruno Haible  <bruno@clisp.org>
1326
1327         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
1328         REPLACE_GETTIMEOFDAY.
1329         * modules/sys_time (Makefile.am): Likewise.
1330         * m4/sys_time_h.m4: Likewise.
1331         * m4/gettimeofday.m4: Likewise.
1332
1333 2007-03-04  Bruno Haible  <bruno@clisp.org>
1334
1335         * modules/vasnprintf-posix-tests: New file.
1336         * tests/test-vasnprintf-posix.c: New file.
1337
1338         * modules/vasnprintf-posix: New file.
1339         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
1340         printf-frexpl.h.
1341         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
1342         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
1343         REPLACE_VASNPRINTF is defined.
1344         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
1345         gl_FUNC_VASNPRINTF.
1346         (gl_FUNC_VASNPRINTF): Invoke it.
1347         * m4/vasnprintf-posix.m4: New file.
1348         * m4/printf.m4: New file.
1349
1350 2007-03-04  Bruno Haible  <bruno@clisp.org>
1351
1352         Compile progreloc.c only if --enable-relocatable is specified.
1353         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
1354         if --enable-relocatable was specified.
1355         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
1356         lib_SOURCES.
1357
1358 2007-03-04  Jim Meyering  <jim@meyering.net>
1359
1360         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
1361         Use it consistently, rather than enumerating errno constants.
1362
1363 2007-03-04  Bruno Haible  <bruno@clisp.org>
1364
1365         * modules/xvasprintf-tests: New file.
1366         * tests/test-xvasprintf.c: New file.
1367
1368         * modules/vasprintf-tests: New file.
1369         * tests/test-vasprintf.c: New file.
1370
1371         * modules/vasnprintf-tests: New file.
1372         * tests/test-vasnprintf.c: New file.
1373
1374         * modules/vsnprintf-tests: New file.
1375         * tests/test-vsnprintf.c: New file.
1376
1377         * modules/snprintf-tests: New file.
1378         * tests/test-snprintf.c: New file.
1379
1380 2007-03-04  Bruno Haible  <bruno@clisp.org>
1381
1382         Compile relocatable.c only if --enable-relocatable is specified.
1383         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
1384         gl_RELOCATABLE_LIBRARY.
1385         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
1386         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
1387         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
1388         gl_RELOCATABLE_LIBRARY.
1389         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
1390         (Makefile.am): Remove lib_SOURCES.
1391         * modules/relocatable-lib-lgpl (configure.ac): Invoke
1392         gl_RELOCATABLE_LIBRARY.
1393         (Makefile.am): Remove lib_SOURCES.
1394         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
1395         always.
1396         * modules/relocatable-prog-wrapper (configure.ac): Invoke
1397         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
1398
1399 2007-03-04  Bruno Haible  <bruno@clisp.org>
1400
1401         * modules/argmatch-tests: New file.
1402         * tests/test-argmatch.c: New file.
1403
1404         * tests/test-allocsa.c (main): Halve the number of loop runs.
1405
1406         * modules/alloca-opt-tests: New file.
1407         * tests/test-alloca-opt.c: New file.
1408
1409 2007-03-04  Jim Meyering  <jim@meyering.net>
1410
1411         Work around difference between Linux ACLs and Solaris 10 ZFS.
1412         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
1413         for EINVAL.
1414
1415 2007-03-03  Bruno Haible  <bruno@clisp.org>
1416
1417         * modules/relocatable-prog (Depends-on): Add back progreloc's
1418         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
1419
1420 2007-03-03  Bruno Haible  <bruno@clisp.org>
1421
1422         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
1423         * modules/relocatable-lib: New file.
1424
1425 2007-03-03  Bruno Haible  <bruno@clisp.org>
1426
1427         * modules/relocatable-prog: Renamed from modules/relocatable.
1428         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
1429
1430 2007-03-03  Bruno Haible  <bruno@clisp.org>
1431
1432         * modules/relocatable-script (Files): Add doc/relocatable.texi,
1433         m4/relocatable-lib.m4.
1434         (Depends-on): Remove 'relocatable'.
1435         (configure.ac): Add gl_RELOCATABLE_NOP.
1436
1437 2007-03-03  Bruno Haible  <bruno@clisp.org>
1438
1439         * modules/relocatable-prog-wrapper: New file.
1440         * modules/relocatable (Depends-on): Add it. Remove all other
1441         dependencies except progname.
1442         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
1443
1444         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
1445         (gl_FUNC_STRERROR): Nop.
1446         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
1447
1448         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
1449         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
1450
1451         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
1452         (gl_FUNC_READLINK): Update.
1453
1454         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
1455
1456 2007-03-03  Bruno Haible  <bruno@clisp.org>
1457
1458         * lib/xreadlink.c: Include <unistd.h> unconditionally.
1459         * modules/xreadlink (Depends-on): Add unistd.
1460         * modules/xreadlink-with-size (Depends-on): Likewise.
1461
1462 2007-03-03  Bruno Haible  <bruno@clisp.org>
1463
1464         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
1465         extracted from gt_FUNC_SETENV.
1466         (gt_FUNC_SETENV): Remove macro.
1467         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
1468         remove gt_FUNC_SETENV.
1469
1470 2007-03-03  Bruno Haible  <bruno@clisp.org>
1471
1472         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
1473         ENABLE_RELOCATABLE here.
1474         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
1475
1476 2007-03-03  Bruno Haible  <bruno@clisp.org>
1477
1478         * modules/rbtreehash-list-tests (Depends-on): Add progname.
1479         * tests/test-rbtreehash_list.c: Include progname.h.
1480         (main): Call set_program_name.
1481
1482         * modules/rbtree-oset-tests (Depends-on): Add progname.
1483         * tests/test-rbtree_oset.c: Include progname.h.
1484         (main): Call set_program_name.
1485
1486         * modules/rbtree-list-tests (Depends-on): Add progname.
1487         * tests/test-rbtree_list.c: Include progname.h.
1488         (main): Call set_program_name.
1489
1490         * modules/linked-list-tests (Depends-on): Add progname.
1491         * tests/test-linked_list.c: Include progname.h.
1492         (main): Call set_program_name.
1493
1494 2007-03-03  Bruno Haible  <bruno@clisp.org>
1495
1496         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
1497         All uses of __restrict changed to _Restrict_.
1498         * lib/glob_.h (__restrict): Remove macro.
1499
1500 2007-03-02  Bruno Haible  <bruno@clisp.org>
1501
1502         * modules/gettext (configure.ac): Require gettext infrastructure
1503         from version 0.16.1.
1504
1505 2007-03-02  Bruno Haible  <bruno@clisp.org>
1506
1507         * modules/linkedhash-list-tests (Depends-on): Add progname.
1508         * tests/test-linkedhash_list.c: Include progname.h.
1509         (main): Call set_program_name.
1510
1511         * modules/carray-list-tests (Depends-on): Add progname.
1512         * tests/test-carray_list.c: Include progname.h.
1513         (main): Call set_program_name.
1514
1515         * modules/avltreehash-list-tests (Depends-on): Add progname.
1516         * tests/test-avltreehash_list.c: Include progname.h.
1517         (main): Call set_program_name.
1518
1519         * modules/avltree-oset-tests (Depends-on): Add progname.
1520         * tests/test-avltree_oset.c: Include progname.h.
1521         (main): Call set_program_name.
1522
1523         * modules/avltree-list-tests (Depends-on): Add progname.
1524         * tests/test-avltree_list.c: Include progname.h.
1525         (main): Call set_program_name.
1526
1527         * modules/array-oset-tests (Depends-on): Add progname.
1528         * tests/test-array_oset.c: Include progname.h.
1529         (main): Call set_program_name.
1530
1531         * modules/array-list-tests (Depends-on): Add progname.
1532         * tests/test-array_list.c: Include progname.h.
1533         (main): Call set_program_name.
1534
1535         * modules/argp-tests (Depends-on): Add progname.
1536         * tests/test-argp.c: Include argp.h first. Include progname.h.
1537         (main): Call set_program_name.
1538
1539 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
1540
1541         * doc/gnulib-tool.texi (Initial import): Reword description of
1542         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
1543         limited effect even if defined after the first system include.
1544
1545 2007-03-01  Bruno Haible  <bruno@clisp.org>
1546
1547         * build-aux/config.libpath: Update to libtool-1.5.22.
1548         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
1549
1550 2007-03-01  Bruno Haible  <bruno@clisp.org>
1551
1552         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
1553         foo_CFLAGS.
1554         Reported by Ralf Wildenhues.
1555
1556 2007-03-01  Bruno Haible  <bruno@clisp.org>
1557
1558         * build-aux/install-reloc: Remove object files left over by some
1559         compilers.
1560         Reported by Ralf Wildenhues.
1561
1562 2007-03-01  Bruno Haible  <bruno@clisp.org>
1563
1564         * build-aux/install-reloc: Break long lines.
1565
1566 2007-03-01  Bruno Haible  <bruno@clisp.org>
1567
1568         * doc/relocatable.texi: Document that it may not work on OpenBSD.
1569         Reported by Ralf Wildenhues.
1570
1571 2007-03-01  Bruno Haible  <bruno@clisp.org>
1572
1573         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
1574         include ordering constraints.
1575
1576 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
1577
1578         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
1579         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
1580         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
1581         as another example.
1582         * lib/time_.h: Fix misspelling.
1583         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1584         Require gl_HEADER_TIME_H_DEFAULTS.
1585         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
1586         * m4/time_r.m4 (gl_TIME_R): Likewise.
1587         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
1588
1589 2007-03-01  Bruno Haible  <bruno@clisp.org>
1590
1591         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
1592         * m4/utimens.m4 (gl_UTIMENS): Likewise.
1593
1594 2007-03-01  Jim Meyering  <jim@meyering.net>
1595
1596         * modules/xreadlink (Maintainer): Add my name.
1597         * modules/xreadlink-with-size (Depends-on): Alphabetize.
1598
1599 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
1600             Bruno Haible  <bruno@clisp.org>
1601
1602         * build-aux/install-reloc: Compile also c-ctype.c.
1603         * build-aux/relocatable.sh.in: New file.
1604         * doc/relocatable.texi: New file.
1605         * doc/relocatable-maint.texi: New file.
1606         * doc/gnulib.texi: Include relocatable-maint.texi.
1607         * lib/progreloc.c: Include unistd.h unconditionally.
1608         * lib/relocwrapper.c: Include unistd.h unconditionally.
1609         Include c-ctype.h.
1610         (add_dotbin): Use c_tolower.
1611         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
1612         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
1613         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
1614         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
1615         to m4/relocatable-lib.m4.
1616         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
1617         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
1618         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
1619         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
1620         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
1621         * modules/relocatable: New file.
1622         * modules/relocatable-lib: New file.
1623         * modules/relocatable-script: New file.
1624
1625 2007-02-28  Bruno Haible  <bruno@clisp.org>
1626
1627         Import --enable-relocatable infrastructure.
1628         * build-aux/config.libpath: New file, from GNU gettext.
1629         * build-aux/install-reloc: New file, from GNU gettext.
1630         * build-aux/reloc-ldflags: New file, from GNU gettext.
1631         * lib/relocatable.h: New file, from GNU gettext.
1632         * lib/relocatable.c: New file, from GNU gettext.
1633         * lib/relocwrapper.c: New file, from GNU gettext.
1634         * m4/relocatable.m4: New file, from GNU gettext.
1635
1636 2007-02-28  Bruno Haible  <bruno@clisp.org>
1637
1638         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
1639
1640         * modules/xreadlink: New file, from GNU gettext with modifications.
1641         * lib/xreadlink.c: New file, from GNU gettext.
1642         * lib/xreadlink.h: Add comments.
1643         (xreadlink): New declaration.
1644
1645         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
1646         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
1647         lib/xreadlink-with-size.c.
1648         (configure.ac): Remove gl_XREADLINK invocation.
1649         (Makefile.am): Augment lib_SOURCES.
1650         * m4/xreadlink.m4: Remove file.
1651         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
1652         (xreadlink_with_size): Renamed from xreadink.
1653         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
1654         * modules/canonicalize (Depends-on): Replace xreadlink with
1655         xreadlink-with-size.
1656         * lib/canonicalize.c (canonicalize_filename_mode): Update.
1657
1658 2007-02-25  Jim Meyering  <jim@meyering.net>
1659
1660         * build-aux/announce-gen: When complaining about excess arguments,
1661         list them.
1662
1663 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
1664
1665         * README: Document signed integer overflow situation more
1666         accurately.
1667
1668 2007-02-25  Bruno Haible  <bruno@clisp.org>
1669
1670         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
1671         'a' or 'A' conversion.
1672
1673 2007-02-25  Bruno Haible  <bruno@clisp.org>
1674
1675         * modules/filename: Renamed from modules/pathname.
1676         (Files): Replace lib/pathname.h with lib/filename.h. Replace
1677         lib/concatpath.c with lib/concat-filename.c.
1678         (Makefile.am): Update.
1679         (Include): Replace pathname.h with filename.h.
1680         * lib/filename.h: Renamed from lib/pathname.h.
1681         (concatenated_filename): Renamed from concatenated_pathname.
1682         * lib/concat-filename.c: Renamed from lib/concatpath.c.
1683         (concatenated_filename): Renamed from concatenated_pathname.
1684         * lib/findprog.c: Include filename.h instead of pathname.h.
1685         (find_in_path): Update.
1686         * lib/javacomp.c: Include filename.h instead of pathname.h.
1687         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
1688         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
1689         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
1690         is_oldgcj_14_13_usable, is_javac_usable): Update.
1691         * lib/javaexec.c: Include filename.h instead of pathname.h.
1692         (execute_java_class): Update.
1693         * modules/findprog: Update.
1694         * modules/javacomp: Update.
1695         * modules/javaexec: Update.
1696         * MODULES.html.sh (File system functions): Add 'filename', remove
1697         'pathname'.
1698
1699 2007-02-25  Bruno Haible  <bruno@clisp.org>
1700
1701         * modules/printf-frexpl-tests: New file.
1702         * tests/test-printf-frexpl.c: New file.
1703
1704         * modules/printf-frexpl: New file.
1705         * lib/printf-frexpl.h: New file.
1706         * lib/printf-frexpl.c: New file.
1707         * m4/printf-frexpl.m4: New file.
1708
1709 2007-02-25  Bruno Haible  <bruno@clisp.org>
1710
1711         * modules/printf-frexp-tests: New file.
1712         * tests/test-printf-frexp.c: New file.
1713
1714         * modules/printf-frexp: New file.
1715         * lib/printf-frexp.h: New file.
1716         * lib/printf-frexp.c: New file.
1717         * m4/printf-frexp.m4: New file.
1718
1719 2007-02-25  Bruno Haible  <bruno@clisp.org>
1720
1721         Assume automake >= 1.10 for the tests.
1722         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
1723         * modules/arctwo-tests: Likewise.
1724         * modules/argp-tests: Likewise.
1725         * modules/avltree-list-tests: Likewise.
1726         * modules/avltree-oset-tests: Likewise.
1727         * modules/avltreehash-list-tests: Likewise.
1728         * modules/carray-list-tests: Likewise.
1729         * modules/crc-tests: Likewise.
1730         * modules/des-tests: Likewise.
1731         * modules/gc-arcfour-tests: Likewise.
1732         * modules/gc-arctwo-tests: Likewise.
1733         * modules/gc-des-tests: Likewise.
1734         * modules/gc-hmac-md5-tests: Likewise.
1735         * modules/gc-hmac-sha1-tests: Likewise.
1736         * modules/gc-md2-tests: Likewise.
1737         * modules/gc-md4-tests: Likewise.
1738         * modules/gc-md5-tests: Likewise.
1739         * modules/gc-pbkdf2-sha1-tests: Likewise.
1740         * modules/gc-rijndael-tests: Likewise.
1741         * modules/gc-sha1-tests: Likewise.
1742         * modules/gc-tests: Likewise.
1743         * modules/getaddrinfo-tests: Likewise.
1744         * modules/hmac-md5-tests: Likewise.
1745         * modules/hmac-sha1-tests: Likewise.
1746         * modules/linked-list-tests: Likewise.
1747         * modules/linkedhash-list-tests: Likewise.
1748         * modules/lock-tests: Likewise.
1749         * modules/md2-tests: Likewise.
1750         * modules/md4-tests: Likewise.
1751         * modules/md5-tests: Likewise.
1752         * modules/rbtree-list-tests: Likewise.
1753         * modules/rbtree-oset-tests: Likewise.
1754         * modules/rbtreehash-list-tests: Likewise.
1755         * modules/read-file-tests: Likewise.
1756         * modules/rijndael-tests: Likewise.
1757         * modules/stdint-tests: Likewise.
1758         * modules/tls-tests: Likewise.
1759
1760 2007-02-24  Bruno Haible  <bruno@clisp.org>
1761
1762         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
1763         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
1764         function; instead check whether isnan with a double argument links.
1765         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
1766         function; instead check whether isnan with a 'long double' argument
1767         links.
1768         Reported by Eric Blake <ebb9@byu.net>.
1769
1770 2007-02-24  Bruno Haible  <bruno@clisp.org>
1771
1772         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
1773         defined.
1774         * lib/isnanl.c: Remove all code. Just include isnan.c.
1775         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
1776
1777 2007-02-25  Jim Meyering  <jim@meyering.net>
1778
1779         Avoid conflicting types for 'unsetenv' on FreeBSD.
1780         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
1781         conflicting with FreeBSD's (5.0 and 6.1) function declaration
1782         in stdlib.h.
1783
1784 2007-02-24  Bruno Haible  <bruno@clisp.org>
1785
1786         * modules/isnanl-nolibm-tests: New file.
1787         * tests/test-isnanl.c: New file.
1788
1789         * modules/isnanl-nolibm: New file.
1790         * lib/isnanl.h: New file.
1791         * lib/isnanl.c: New file.
1792         * m4/isnanl.m4: New file.
1793
1794 2007-02-24  Bruno Haible  <bruno@clisp.org>
1795
1796         * modules/isnan-nolibm-tests: New file.
1797         * tests/test-isnan.c: New file.
1798
1799         * modules/isnan-nolibm: New file.
1800         * lib/isnan.h: New file.
1801         * lib/isnan.c: New file.
1802         * m4/isnan.m4: New file.
1803
1804 2007-02-24  Bruno Haible  <bruno@clisp.org>
1805
1806         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
1807         assume that an exponent fits in 20 bits.
1808
1809 2007-02-24  Jim Meyering  <jim@meyering.net>
1810
1811         * m4/regex.m4: Update the description of the configure-time option,
1812         --without-included-regex, to state accurately what the defaults are,
1813         and perhaps to give people an idea why using this option is risky.
1814
1815 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
1816
1817         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
1818         loops on small arguments.  This attempts to avoid the problem
1819         Bruno Haible reported for AIX 4.3.2 in
1820         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
1821
1822 2007-02-23  Bruno Haible  <bruno@clisp.org>
1823
1824         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
1825         Needed for help2man.
1826
1827 2007-02-23  Karl Berry  <karl@gnu.org>
1828
1829         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
1830         exists, foo.h should be cvs-ignored, not committed.
1831
1832 2007-02-23  Eric Blake  <ebb9@byu.net>
1833
1834         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
1835         * lib/stat-time.h (includes): Likewise.
1836         * lib/utimecmp.c (includes): Likewise.
1837         * lib/utimens.h (includes): Likewise.
1838         * lib/getdate.y (includes): Also include "timespec.h" for use
1839         internal to the module.
1840         * modules/utimens (Depends-on): Revert yesterday's patch.
1841         * modules/nanosleep (Depends-on): Add missing dependency.
1842
1843 2007-02-22  Bruno Haible  <bruno@clisp.org>
1844
1845         * lib/glob.c: Don't include getlogin_r.h.
1846
1847 2007-02-22  Jim Meyering  <jim@meyering.net>
1848
1849         * modules/utimens (Depends-on): Add timespec, required for
1850         utimens.h's inclusion of timespec.h.
1851
1852 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
1853
1854         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
1855         long unreadable paths in GNU/Linux.  Problem reported by Andreas
1856         Schwab in
1857         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
1858         I'll try to think of a better way to fix the Solaris problem.
1859
1860         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
1861         like glibc; on Solaris 10, it fails with errno == EINVAL.
1862         POSIX says the behavior is unspecified if the first argument is NULL,
1863         so play it safe and never pass NULL to the system getcwd.
1864
1865 2007-02-21  Jim Meyering  <jim@meyering.net>
1866
1867         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
1868         of gettimeofday.  It would conflict with the one now always
1869         provided via sys_time_.h.  Reported by Matthew Woehlke, as
1870         an IRIX 6.5 build failure.
1871
1872 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
1873
1874         Minor fixups to port to Solaris 10 with Sun C 5.8.
1875         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
1876         * modules/getcwd (Depends-on): Add dirfd.
1877         * lib/putenv.c (putenv): #undef it.
1878         (rpl_putenv): New decl.
1879         (malloc, free): Include <stdlib.h> rather than prototyping separately.
1880
1881 2007-02-20  Bruno Haible  <bruno@clisp.org>
1882
1883         * modules/stdio-tests: New file.
1884         * tests/test-stdio.c: New file.
1885
1886         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
1887         (Depends-on): Add stdio.
1888         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
1889         (Include): Use <stdio.h> instead of vsnprintf.h.
1890         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
1891         HAVE_DECL_VSNPRINTF.
1892         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
1893
1894         * modules/snprintf (Files): Remove lib/snprintf.h.
1895         (Depends-on): Add stdio.
1896         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
1897         (Include): Use <stdio.h> instead of snprintf.h.
1898         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
1899         HAVE_DECL_SNPRINTF.
1900         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
1901         * lib/getaddrinfo.c: Likewise.
1902
1903         * modules/stdio: New file.
1904         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
1905         * lib/snprintf.h: Remove file.
1906         * lib/vsnprintf.h: Remove file.
1907         * lib/.cppi-disable: Remove snprintf.h.
1908         * m4/stdio_h.m4: New file.
1909         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
1910
1911 2007-02-20  Jim Meyering  <jim@meyering.net>
1912
1913         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
1914         used by e.g., mingw.  From Bruno Haible.
1915
1916 2007-02-19  Bruno Haible  <bruno@clisp.org>
1917
1918         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
1919         warnings.
1920         Reported by Ben Pfaff <blp@cs.stanford.edu>.
1921
1922 2007-02-19  Bruno Haible  <bruno@clisp.org>
1923
1924         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
1925         from mingw users.
1926
1927 2007-02-19  Bruno Haible  <bruno@clisp.org>
1928
1929         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
1930         warnings.
1931         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
1932
1933 2007-02-19  Jim Meyering  <jim@meyering.net>
1934
1935         Don't use FD after a successful "fdopendir (fd)".
1936         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
1937         Reset it by calling dirfd on the just-obtained DIR*.
1938
1939         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
1940         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
1941
1942 2007-02-18  Bruno Haible  <bruno@clisp.org>
1943
1944         * lib/readlink.c: Include <unistd.h>.
1945         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
1946         HAVE_READLINK.
1947         * modules/readlink (Depends-on): Add unistd.
1948         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1949         (Include): Add <unistd.h>.
1950
1951         * lib/getlogin_r.h: Remove file.
1952         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
1953         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
1954         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
1955         HAVE_DECL_GETLOGIN_R.
1956         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
1957         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1958         (Include): Use <unistd.h> instead of getlogin_r.h.
1959
1960         * lib/getcwd.h: Remove file.
1961         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
1962         * lib/xgetcwd.c: Likewise.
1963         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
1964         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
1965         * modules/getcwd (Files): Remove lib/getcwd.h.
1966         (Depends-on): Add unistd.
1967         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1968         (Include): Use <unistd.h> instad of getcwd.h.
1969
1970         * lib/ftruncate.c: Include <unistd.h> first.
1971         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
1972         Set HAVE_FTRUNCATE.
1973         * modules/ftruncate (Depends-on): Add unistd.
1974         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1975
1976         * lib/fchdir.c: Include <unistd.h> first.
1977         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
1978         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
1979         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
1980         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1981         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
1982
1983         * lib/dup2.c: Include <unistd.h> first.
1984         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
1985         HAVE_DUP2.
1986         * modules/dup2 (Depends-on): Add unistd.
1987         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1988
1989         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
1990         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
1991         REPLACE_CHOWN. Don't define chown as a macro here.
1992         * modules/chown (Depends-on): Add unistd.
1993         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1994
1995         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
1996         Add definition for GL_LINK_WARNING.
1997         (chown, dup2): New declarations.
1998         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
1999         link warning.
2000         (ftruncate): New declaration.
2001         (getcwd): New declaration, taken from old getcwd.h.
2002         (getlogin_r): New declaration, taken from old getlogin_r.h.
2003         (readlink): New declaration.
2004         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
2005         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
2006         (gl_PREREQ_UNISTD): Remove macro.
2007         (gl_UNISTD_MODULE_INDICATOR): New macro.
2008         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
2009         many new variables. Don't set UNISTD_H.
2010         * modules/unistd (Description): Change.
2011         (Depends-on): Add link-warning.
2012         (configure.ac): Update.
2013         (Makefile.am): Create unistd.h always. Substitute many new variables
2014         into it.
2015
2016 2007-02-18  Bruno Haible  <bruno@clisp.org>
2017
2018         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
2019         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
2020         HAVE_GETSUBOPT.
2021         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
2022         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
2023         * lib/getsubopt.h: Remove file.
2024         * modules/getsubopt (Files): Remove lib/getsubopt.h.
2025         (Depends-on): Add stdlib.
2026         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2027         (Includes): Use <stdlib.h> instead of getsubopt.h.
2028         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
2029         Set HAVE_GETSUBOPT.
2030         * lib/getsubopt.c: Don't include getsubopt.h.
2031
2032 2007-02-18  Bruno Haible  <bruno@clisp.org>
2033
2034         * modules/fchdir (Depends-on): Add dup2.
2035
2036 2007-02-18  Bruno Haible  <bruno@clisp.org>
2037
2038         * lib/stdlib_.h: Handle glibc's special invocation convention
2039         specially.
2040
2041 2007-02-18  Bruno Haible  <bruno@clisp.org>
2042
2043         * modules/stdlib-tests: New file.
2044         * tests/test-stdlib.c: New file.
2045
2046         * modules/mkstemp (Files): Remove lib/mkstemp.h.
2047         (Depends-on): Add stdlib.
2048         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2049         (Includes): Use <stdlib.h> instead of mkstemp.h.
2050         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
2051         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
2052         * lib/mkstemp.c: Don't include mkstemp.h.
2053         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
2054         * lib/stdlib--.h: Don't include mkstemp.h.
2055
2056         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
2057         (Depends-on): Add stdlib.
2058         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2059         (Includes): Use <stdlib.h> instead of mkdtemp.h.
2060         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
2061         HAVE_MKDTEMP.
2062         * lib/mkdtemp.c: Don't include mkdtemp.h.
2063         * lib/clean-temp.c: Don't include mkdtemp.h.
2064
2065         * modules/exit (Files): Remove lib/exit.h.
2066         (Depends-on): Add stdlib.
2067         (Makefile.am): Remove lib_SOURCES.
2068         (Include): Use <stdlib.h> instead of exit.h.
2069         * lib/argmatch.c: Don't include exit.h.
2070         * lib/execute.c: Likewise.
2071         * lib/pagealign_alloc.c: Likewise.
2072         * lib/pipe.c: Likewise.
2073         * lib/wait-process.c: Likewise.
2074         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
2075         * lib/exitfail.c: Likewise.
2076         * lib/savewd.c: Likewise.
2077         * lib/xsetenv.c: Likewise.
2078
2079         * modules/stdlib: New file.
2080         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
2081         and extra comments about mkstemp().
2082         * lib/exit.h: Remove file.
2083         * lib/mkdtemp.h: Remove file.
2084         * lib/mkstemp.h: Remove file.
2085         * m4/stdlib_h.m4: New file.
2086         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
2087
2088 2007-02-18  Bruno Haible  <bruno@clisp.org>
2089
2090         * modules/math-tests: New file.
2091         * tests/test-math.c: New file.
2092
2093         * modules/math: New file.
2094         * modules/mathl (Files): Remove lib/mathl.h.
2095         (Depends-on): Add math.
2096         (Makefile.am): Don't mention mathl.h.
2097         (Include): Use <math.h> instead of mathl.h.
2098         * lib/math_.h: New file.
2099         * lib/mathl.h: Remove file.
2100         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
2101         mathl.h.
2102         * lib/asinl.c: Likewise.
2103         * lib/atanl.c: Likewise.
2104         * lib/ceill.c: Likewise.
2105         * lib/cosl.c: Likewise.
2106         * lib/expl.c: Likewise.
2107         * lib/floorl.c: Likewise.
2108         * lib/frexpl.c: Likewise.
2109         * lib/ldexpl.c: Likewise.
2110         * lib/logl.c: Likewise.
2111         * lib/sincosl.c: Likewise.
2112         * lib/sinl.c: Likewise.
2113         * lib/sqrtl.c: Likewise.
2114         * lib/tanl.c: Likewise.
2115         * lib/trigl.c: Likewise.
2116         * m4/math_h.m4: New file.
2117         * MODULES.html.sh (Mathematics): Add math.
2118
2119 2007-02-17  Bruno Haible  <bruno@clisp.org>
2120
2121         * modules/wctype-tests: New file.
2122         * tests/test-wctype.c: New file.
2123
2124         * modules/wchar-tests: New file.
2125         * tests/test-wchar.c: New file.
2126
2127         * modules/unistd-tests: New file.
2128         * tests/test-unistd.c: New file.
2129
2130         * modules/time-tests: New file.
2131         * tests/test-time.c: New file.
2132
2133         * modules/sysexits-tests: New file.
2134         * tests/test-sysexits.c: New file.
2135
2136         * modules/sys_time-tests: New file.
2137         * tests/test-sys_time.c: New file.
2138
2139         * modules/sys_stat-tests: New file.
2140         * tests/test-sys_stat.c: New file.
2141
2142         * modules/sys_socket-tests: New file.
2143         * tests/test-sys_socket.c: New file.
2144
2145         * modules/sys_select-tests: New file.
2146         * tests/test-sys_select.c: New file.
2147
2148         * modules/string-tests: New file.
2149         * tests/test-string.c: New file.
2150
2151         * modules/stdbool-tests: New file.
2152         * tests/test-stdbool.c: New file.
2153
2154         * modules/netinet_in-tests: New file.
2155         * tests/test-netinet_in.c: New file.
2156
2157         * modules/inttypes-tests: New file.
2158         * tests/test-inttypes.c: New file.
2159
2160         * modules/fcntl-tests: New file.
2161         * tests/test-fcntl.c: New file.
2162
2163         * modules/byteswap-tests: New file.
2164         * tests/test-byteswap.c: New file.
2165
2166         * modules/arpa_inet-tests: New file.
2167         * tests/test-arpa_inet.c: New file.
2168
2169 2007-02-17  Bruno Haible  <bruno@clisp.org>
2170
2171         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
2172         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
2173         if the corresponding module is not enabled. Emit link warnings if
2174         the function is used nevertheless.
2175         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
2176         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
2177         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
2178         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
2179         * modules/inttypes (Depends-on): Add link-warning.
2180         (Makefile.am): Copy the contents of build-aux/link-warning.h into
2181         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
2182         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
2183         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
2184         * modules/imaxdiv (configure.ac): Likewise.
2185         * modules/strtoimax (configure.ac): Likewise.
2186         * modules/strtoumax (configure.ac): Likewise.
2187
2188 2007-02-17  Bruno Haible  <bruno@clisp.org>
2189
2190         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
2191         gl_STRING_MODULE_INDICATOR_DEFAULTS.
2192         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
2193         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
2194
2195 2007-02-17  Bruno Haible  <bruno@clisp.org>
2196
2197         * modules/link-warning: New file.
2198         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
2199         * lib/string_.h (GL_LINK_WARNING): Remove definition.
2200         * modules/string (Depends-on): Add link-warning.
2201         (Makefile.am): Copy the contents of build-aux/link-warning.h into
2202         string.h.
2203         * MODULES.html.sh (Support for building libraries and executables): Add
2204         link-warning.
2205
2206 2007-02-17  Bruno Haible  <bruno@clisp.org>
2207
2208         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
2209         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
2210         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
2211         long lines.
2212
2213 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
2214             Bruno Haible  <bruno@clisp.org>
2215
2216         * modules/tmpfile: New file.
2217         * lib/tmpfile.c: New file.
2218         * m4/tmpfile.m4: New file.
2219         * MODULES.html.sh (func_all_modules): New section "Input/output".
2220
2221 2007-02-15  Bruno Haible  <bruno@clisp.org>
2222
2223         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
2224         (supports_delete_on_close): New function.
2225         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
2226
2227 2007-02-14  Bruno Haible  <bruno@clisp.org>
2228
2229         * modules/mbspcasecmp-tests: New file.
2230         * tests/test-mbspcasecmp.sh: New file.
2231         * tests/test-mbspcasecmp.c: New file.
2232
2233         New module mbspcasecmp.
2234         * modules/mbspcasecmp: New file.
2235         * lib/mbspcasecmp.c: New file.
2236         * lib/string_.h (strncasecmp): Change warning message.
2237         (mbspcasecmp): New declaration.
2238         * m4/mbspcasecmp.m4: New file.
2239         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2240         GNULIB_MBSPCASECMP.
2241         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
2242         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
2243
2244 2007-02-14  Bruno Haible  <bruno@clisp.org>
2245
2246         * modules/mbsncasecmp-tests: New file.
2247         * tests/test-mbsncasecmp.sh: New file.
2248         * tests/test-mbsncasecmp.c: New file.
2249
2250         New module mbsncasecmp.
2251         * modules/mbsncasecmp: New file.
2252         * lib/mbsncasecmp.c: New file.
2253         * lib/string_.h (mbsncasecmp): New declaration.
2254         * m4/mbsncasecmp.m4: New file.
2255         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2256         GNULIB_MBSNCASECMP.
2257         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
2258         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
2259
2260 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
2261
2262         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
2263         Verify that it doesn't overlap with our flags.
2264         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
2265         do not have the desired effect in multibyte locales; instead, use
2266         mbscasecmp.
2267         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
2268         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
2269         we don't require GNU fnmatch ourselves (if our users require it, they
2270         should do so explicitly).
2271
2272         Fix regex code so it doesn't rely on strcasecmp.
2273         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
2274         Otherwise, include gnulib's langinfo.h.
2275         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
2276         undesirable behavior in non-C locales.  Instead, rely on localecharset.
2277         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
2278         * modules/regex (FILES): Remove m4/codeset.m4.
2279         (Depends-on): Add localcharset.  Remove strcase.
2280
2281 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2282
2283         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
2284         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
2285
2286 2007-02-13  Bruno Haible  <bruno@clisp.org>
2287
2288         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
2289         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2290
2291 2007-02-12  Bruno Haible  <bruno@clisp.org>
2292
2293         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
2294         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
2295         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
2296         time warning rather than a link error.
2297
2298 2007-02-12  Bruno Haible  <bruno@clisp.org>
2299
2300         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
2301         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
2302         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2303
2304 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
2305
2306         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
2307         args, not 2.
2308
2309 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
2310
2311         New module 'time', so that apps can include <time.h> as per
2312         POSIX and GNU instead of separate include files like time_r.h
2313         and timegm.h.  This implementation tries out a simpler approach
2314         for replacing decls in standard include files (as compared to
2315         the string module), somewhat as an experiment.
2316
2317         * config/srclist.txt: Comment out mktime.c for now.
2318         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
2319         since it doesn't apply any more.  Use generic wording instead.
2320         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
2321         'time'.
2322         * lib/time_.h, m4/time_h.m4, modules/time: New files.
2323         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
2324         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
2325         Don't include <sys/types.h>; no longer needed since we assume C89.
2326         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
2327         * lib/strftime.c: Likewise.
2328         * lib/time_r.c: Likewise.
2329         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
2330         * lib/nanosleep.c: Include <time.h> first, to check interface.
2331         * lib/strptime.c: Likewise.
2332         * lib/time_r.c: Likewise.
2333         * lib/timegm.c: Likewise.
2334         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
2335         needed.
2336         * lib/timegm.c: Don't include timegm.h; no longer needed.
2337         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
2338         time.h now handles any problems in that area.
2339         (struct timespec, nanosleep): Remove; time.h now arranges for these.
2340         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
2341         that time.h defines struct timespec.
2342         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
2343         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
2344         handles that.
2345         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
2346         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
2347         needed.  Set REPLACE_LOCALTIME.
2348         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
2349         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
2350         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
2351         nanosleep; time_h.m4 now does that.  Don't require
2352         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
2353         module handles this now.
2354         * modules/getdate (Depends-on): Remove timespec.  Add time.
2355         * modules/nanosleep (Depends-on): Likewise.
2356         * modules/stat-time (Depends-on): Likewise.
2357         * modules/nanosleep (Include): Include time.h, not timespec.h.
2358         * modules/strptime (Files): Remove lib/strptime.h.
2359         (Depends-on): Add extensions, time.
2360         (Include): Include time.h, not strptime.h.
2361         * modules/time_r (Files): Remove lib/time_r.h.
2362         (Depends-on): Add time.
2363         (Include): Include time.h, not time_r.h.
2364         * modules/timegm: Likewise.
2365         * modules/timespec (Description): Now does timespec-related decls
2366         of our own, instead of struct timespec itself.
2367         (Depends-on): Add time; remove extensions.
2368         (Maintainer): Add self.
2369         * modules/utimecmp (Depends-on): Add time; remove timespec.
2370         * modules/utimens (Depends-on): Likewise.
2371         * modules/xnanosleep (Depends-on): Likewise.
2372
2373 2007-02-11  Bruno Haible  <bruno@clisp.org>
2374
2375         * lib/c-strstr.c: Include allocsa.h.
2376         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2377         * lib/c-strcasestr.c: Include allocsa.h.
2378         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2379         * lib/strcasestr.c: Include allocsa.h.
2380         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2381         * lib/mbsstr.c: Include allocsa.h.
2382         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
2383         allocsa/freesa instead of malloc/free.
2384         * lib/mbscasestr.c: Include allocsa.h.
2385         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
2386         allocsa/freesa instead of malloc/free.
2387         * modules/c-strstr (Depends-on): Add allocsa.
2388         * modules/c-strcasestr (Depends-on): Likewise.
2389         * modules/strcasestr (Depends-on): Likewise.
2390         * modules/mbsstr (Depends-on): Likewise.
2391         * modules/mbscasestr (Depends-on): Likewise.
2392
2393 2007-02-11  Bruno Haible  <bruno@clisp.org>
2394
2395         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
2396
2397         * modules/mbsspn-tests: New file.
2398         * tests/test-mbsspn.sh: New file.
2399         * tests/test-mbsspn.c: New file.
2400
2401 2007-02-11  Bruno Haible  <bruno@clisp.org>
2402
2403         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
2404
2405         * modules/mbspbrk-tests: New file.
2406         * tests/test-mbspbrk.sh: New file.
2407         * tests/test-mbspbrk.c: New file.
2408
2409 2007-02-11  Bruno Haible  <bruno@clisp.org>
2410
2411         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
2412         unneeded cast.
2413
2414         * modules/mbscspn-tests: New file.
2415         * tests/test-mbscspn.sh: New file.
2416         * tests/test-mbscspn.c: New file.
2417
2418 2007-02-11  Bruno Haible  <bruno@clisp.org>
2419
2420         * modules/mbscasecmp-tests: New file.
2421         * tests/test-mbscasecmp.sh: New file.
2422         * tests/test-mbscasecmp.c: New file.
2423
2424 2007-02-11  Bruno Haible  <bruno@clisp.org>
2425
2426         Ensure O(n) worst-case complexity of mbscasestr.
2427         * lib/mbscasestr.c: Include stdbool.h.
2428         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
2429         functions.
2430         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
2431         the bookkeeping indicates that it's worth it.
2432         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
2433
2434         * modules/mbscasestr-tests: New file.
2435         * tests/test-mbscasestr1.c: New file.
2436         * tests/test-mbscasestr2.sh: New file.
2437         * tests/test-mbscasestr2.c: New file.
2438         * tests/test-mbscasestr3.sh: New file.
2439         * tests/test-mbscasestr3.c: New file.
2440         * tests/test-mbscasestr4.sh: New file.
2441         * tests/test-mbscasestr4.c: New file.
2442         * m4/locale-tr.m4: New file.
2443
2444 2007-02-11  Bruno Haible  <bruno@clisp.org>
2445
2446         Ensure O(n) worst-case complexity of mbsstr.
2447         * lib/mbsstr.c: Include stdbool.h.
2448         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
2449         functions.
2450         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
2451         bookkeeping indicates that it's worth it.
2452         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
2453
2454         * modules/mbsstr-tests: New file.
2455         * tests/test-mbsstr1.c: New file.
2456         * tests/test-mbsstr2.sh: New file.
2457         * tests/test-mbsstr2.c: New file.
2458         * tests/test-mbsstr3.sh: New file.
2459         * tests/test-mbsstr3.c: New file.
2460         * m4/locale-fr.m4: New file.
2461
2462 2007-02-11  Bruno Haible  <bruno@clisp.org>
2463
2464         * lib/mbsrchr.c (mbsrchr): Fix bug.
2465
2466         * modules/mbsrchr-tests: New file.
2467         * tests/test-mbsrchr.sh: New file.
2468         * tests/test-mbsrchr.c: New file.
2469
2470 2007-02-11  Bruno Haible  <bruno@clisp.org>
2471
2472         * lib/mbschr.c (mbschr): Fix bug.
2473
2474         * modules/mbschr-tests: New file.
2475         * tests/test-mbschr.sh: New file.
2476         * tests/test-mbschr.c: New file.
2477         * m4/locale-zh.m4: New file.
2478
2479 2007-02-11  Bruno Haible  <bruno@clisp.org>
2480
2481         Support for copying multibyte string iterators.
2482         * lib/mbiter.h: Include <string.h>.
2483         (mbiter_multi_copy): New function.
2484         (mbi_copy): New macro.
2485         * lib/mbuiter.h: Include <string.h>.
2486         (mbuiter_multi_copy): New function.
2487         (mbui_copy): New macro.
2488
2489 2007-02-11  Bruno Haible  <bruno@clisp.org>
2490
2491         New module mbslen.
2492         * modules/mbslen: New file.
2493         * lib/mbslen.c: New file.
2494         * lib/string_.h (mbslen): New declaration.
2495         * m4/mbslen.m4: New file.
2496         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2497         GNULIB_MBSLEN.
2498         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
2499         * MODULES.html.sh (Internationalization functions): Add mbslen.
2500
2501 2007-02-11  Bruno Haible  <bruno@clisp.org>
2502
2503         Ensure O(n) worst-case complexity of strcasestr substitute.
2504         * lib/strcasestr.c: Include stdbool.h.
2505         (knuth_morris_pratt): New function.
2506         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
2507         bookkeeping indicates that it's worth it.
2508         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
2509
2510         * modules/strcasestr-tests: New file.
2511         * tests/test-strcasestr.c: New file.
2512
2513 2007-02-11  Bruno Haible  <bruno@clisp.org>
2514
2515         Ensure O(n) worst-case complexity of c_strcasestr.
2516         * lib/c-strcasestr.c: Include stdbool.h, string.h.
2517         (knuth_morris_pratt): New function.
2518         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
2519         the bookkeeping indicates that it's worth it.
2520         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
2521
2522         * modules/c-strcasestr-tests: New file.
2523         * tests/test-c-strcasestr.c: New file.
2524
2525 2007-02-11  Bruno Haible  <bruno@clisp.org>
2526
2527         Ensure O(n) worst-case complexity of c_strstr.
2528         * lib/c-strstr.c: Include stdbool.h, string.h.
2529         (knuth_morris_pratt): New function.
2530         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
2531         bookkeeping indicates that it's worth it.
2532         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
2533
2534         * lib/c-strstr.c: Complete rewrite for maintainability.
2535
2536         * modules/c-strstr-tests: New file.
2537         * tests/test-c-strstr.c: New file.
2538
2539 2007-02-11  Bruno Haible  <bruno@clisp.org>
2540
2541         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
2542         5.2.1 and earlier, whereby \055 was treated just like the range
2543         delimiter '-'.
2544         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
2545
2546 2007-02-08  Bruno Haible  <bruno@clisp.org>
2547
2548         * modules/regex (Depends-on): Add stdbool.
2549         Reported by Dalibor Topic <robilad@kaffe.org>.
2550
2551 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
2552
2553         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
2554         Prefer returning from main to exiting from it.
2555         Remove unnecessary parens after sizeof.
2556
2557 2007-02-05  Bruno Haible  <bruno@clisp.org>
2558
2559         New module mbssep.
2560         * modules/mbssep: New file.
2561         * lib/mbssep.c: New file.
2562         * lib/string_.h (strsep): Add a conditional link warning.
2563         (mbssep): New declaration.
2564         * m4/mbssep.m4: New file.
2565         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2566         GNULIB_MBSSEP.
2567         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
2568         * MODULES.html.sh (Internationalization functions): Add mbssep.
2569
2570 2007-02-05  Bruno Haible  <bruno@clisp.org>
2571
2572         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
2573         Optimize search in case of 1 delimiter.
2574
2575 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2576
2577         * lib/acl.h: Include sys/types.h before sys/acl.h.
2578
2579 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2580
2581         Merge upstream fix for glibc bugzilla #3957:
2582
2583         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
2584
2585         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
2586         bit for RE_HAT_LISTS_NOT_NEWLINE.
2587         (build_charclass_op): Remove bogus comment.
2588
2589 2007-02-05  Simon Josefsson  <simon@josefsson.org>
2590
2591         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
2592
2593 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
2594
2595         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
2596         * lib/memmem.c [!defined _LIBC]: Include config.h.
2597
2598 2007-02-04  Bruno Haible  <bruno@clisp.org>
2599
2600         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
2601         warning message.
2602
2603 2007-02-04  Bruno Haible  <bruno@clisp.org>
2604
2605         New module mbstok_r.
2606         * modules/mbstok_r: New file.
2607         * lib/mbstok_r.c: New file.
2608         * lib/string_.h (strtok_r): Change argument names to match the
2609         comments. Add a conditional link warning.
2610         (mbstok_r): New declaration.
2611         * m4/mbstok_r.m4: New file.
2612         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2613         GNULIB_MBSTOK_R.
2614         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
2615         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
2616
2617 2007-02-04  Bruno Haible  <bruno@clisp.org>
2618
2619         New module mbsspn.
2620         * modules/mbsspn: New file.
2621         * lib/mbsspn.c: New file.
2622         * lib/string_.h (strspn): Add a conditional link warning.
2623         (mbsspn): New declaration.
2624         * m4/mbsspn.m4: New file.
2625         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2626         GNULIB_MBSSPN.
2627         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
2628         * MODULES.html.sh (Internationalization functions): Add mbsspn.
2629
2630 2007-02-04  Bruno Haible  <bruno@clisp.org>
2631
2632         New module mbspbrk.
2633         * modules/mbspbrk: New file.
2634         * lib/mbspbrk.c: New file.
2635         * lib/string_.h (strpbrk): Add a conditional link warning.
2636         (mbspbrk): New declaration.
2637         * m4/mbspbrk.m4: New file.
2638         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2639         GNULIB_MBSPBRK.
2640         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
2641         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
2642
2643 2007-02-04  Bruno Haible  <bruno@clisp.org>
2644
2645         New module mbscspn.
2646         * modules/mbscspn: New file.
2647         * lib/mbscspn.c: New file.
2648         * lib/string_.h (strcspn): Add a conditional link warning.
2649         (mbscspn): New declaration.
2650         * m4/mbscspn.m4: New file.
2651         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2652         GNULIB_MBSCSPN.
2653         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
2654         * MODULES.html.sh (Internationalization functions): Add mbscspn.
2655
2656 2007-02-04  Bruno Haible  <bruno@clisp.org>
2657
2658         New module mbscasestr, reduced goal of strcasestr.
2659         * modules/mbscasestr: New file.
2660         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
2661         (mbscasestr): Renamed from strcasestr.
2662         * lib/strcasestr.c: Don't include mbuiter.h.
2663         (strcasestr): Remove support for multibyte locales.
2664         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
2665         Change the conditional link warning.
2666         (mbscasestr): New declaration.
2667         * m4/mbscasestr.m4: New file.
2668         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
2669         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
2670         REPLACE_STRCASESTR.
2671         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
2672         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
2673         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
2674         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
2675         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
2676         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
2677         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
2678         (Depends-on): Remove mbuiter.
2679         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
2680
2681 2007-02-04  Bruno Haible  <bruno@clisp.org>
2682
2683         Simplify handling of strncasecmp.
2684         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
2685         the conditional link warning.
2686         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
2687         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
2688         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
2689         * modules/strcase (configure.ac): Don't invoke
2690         gl_STRING_MODULE_INDICATOR.
2691         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
2692
2693 2007-02-04  Bruno Haible  <bruno@clisp.org>
2694
2695         New module mbscasecmp, reduced goal of strcasecmp.
2696         * modules/mbscasecmp: New file.
2697         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
2698         (mbscasecmp): Renamed from strcasecmp.
2699         * lib/strcasecmp.c: Don't include mbuiter.h.
2700         (strcasecmp): Remove support for multibyte locales.
2701         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
2702         Change the conditional link warning.
2703         (mbscasecmp): New declaration.
2704         * m4/mbscasecmp.m4: New file.
2705         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
2706         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
2707         REPLACE_STRCASECMP.
2708         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
2709         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2710         GNULIB_MBSCASECMP.
2711         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
2712         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
2713         * modules/strcase (Files): Remove m4/mbrtowc.m4.
2714         (Depends-on): Remove mbuiter.
2715         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
2716
2717 2007-02-04  Bruno Haible  <bruno@clisp.org>
2718
2719         New module mbsstr. Remove module strstr.
2720         * modules/mbsstr: New file.
2721         * modules/strstr: Remove file.
2722         * lib/mbsstr.c: Renamed from lib/strstr.c.
2723         (mbsstr): Renamed from strstr.
2724         * lib/string_.h (strstr): Remove declaration. Change the conditional
2725         link warning.
2726         (mbsstr): New declaration.
2727         * m4/mbsstr.m4: New file.
2728         * m4/strstr.m4: Remove file.
2729         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
2730         REPLACE_STRSTR.
2731         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
2732         Don't initialize GNULIB_STRSTR.
2733         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
2734         substitute GNULIB_STRSTR and REPLACE_STRSTR.
2735         * MODULES.html.sh (Internationalization functions): Add mbsstr.
2736         (Support for systems lacking ANSI C 89): Remove strstr.
2737
2738 2007-02-04  Bruno Haible  <bruno@clisp.org>
2739
2740         New module mbsrchr.
2741         * modules/mbsrchr: New file.
2742         * lib/mbsrchr.c: New file.
2743         * lib/string_.h (strrchr): Add a conditional link warning.
2744         (mbsrchr): New declaration.
2745         * m4/mbsrchr.m4: New file.
2746         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2747         GNULIB_MBSRCHR.
2748         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
2749         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
2750
2751 2007-02-04  Bruno Haible  <bruno@clisp.org>
2752
2753         New module mbschr.
2754         * modules/mbschr: New file.
2755         * lib/mbschr.c: New file.
2756         * lib/string_.h (strchr): Add a conditional link warning.
2757         (mbschr): New declaration.
2758         * m4/mbschr.m4: New file.
2759         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2760         GNULIB_MBSCHR.
2761         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
2762         * MODULES.html.sh (Internationalization functions): Add mbschr.
2763
2764 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
2765
2766         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
2767
2768         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
2769
2770 2007-02-04  Bruno Haible  <bruno@clisp.org>
2771
2772         New module description section 'configure.ac-early'.
2773         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
2774         (func_get_autoconf_early_snippet): New function.
2775         (func_import, func_create_testdir): Use it. Remove special cases for
2776         modules 'extensions' and 'lock'.
2777         * modules/extensions (configure.ac-early): Require
2778         gl_USE_SYSTEM_EXTENSIONS.
2779         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
2780
2781 2007-02-04  Bruno Haible  <bruno@clisp.org>
2782
2783         Make use of gcj-4.3's -fsource and -ftarget option.
2784         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
2785         and if so try the options -fsource and -ftarget.
2786         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
2787         source_version, ftarget_option, target_version arguments.
2788         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
2789         (is_envjavac_oldgcj_14_14_usable): Renamed from
2790         is_envjavac_gcj_14_14_usable.
2791         (is_envjavac_oldgcj_14_13_usable): Renamed from
2792         is_envjavac_gcj_14_13_usable.
2793         (is_gcj_present): Update.
2794         (is_gcj_43, is_gcj43_usable): New functions.
2795         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
2796         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
2797         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
2798         try the options -fsource and -ftarget.
2799
2800 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
2801
2802         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
2803         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
2804         larger value.
2805
2806 2007-02-03  Jim Meyering  <jim@meyering.net>
2807
2808         Give tools a better chance to allocate space for very large buffers.
2809         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
2810
2811         Make pwd and readlink work also when run with an unreadable parent dir
2812         on systems with openat support.
2813         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
2814         provided getcwd function, even when we have openat support.
2815         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
2816
2817 2007-02-02  Bruno Haible  <bruno@clisp.org>
2818
2819         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
2820         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
2821         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
2822         portability problems if one of these functions is only used on specific
2823         platforms.
2824         Reported by Paul Eggert.
2825
2826 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
2827
2828         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
2829         is causing more trouble than it's curing.
2830         * lib/regex_internal.h (__mempcpy): Remove.
2831         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
2832         (and make the code a tad smaller to boot).
2833         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
2834
2835 2007-02-02  Jim Meyering  <jim@meyering.net>
2836
2837         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
2838         section, not in the Makefile.am: one.
2839
2840 2007-02-02  Eric Blake  <ebb9@byu.net>
2841
2842         * lib/strchrnul.c: Always include config.h first.
2843
2844         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
2845         gnulib strstr is not necessary here.
2846
2847 2007-02-02  Simon Josefsson  <simon@josefsson.org>
2848
2849         * m4/socklen.m4: Fix typo.
2850
2851 2007-02-02  Eric Blake  <ebb9@byu.net>
2852
2853         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
2854         * modules/netinet_in (Makefile.am): Likewise.
2855
2856 2007-02-01  Bruno Haible  <bruno@clisp.org>
2857
2858         * lib/string_.h (GL_LINK_WARNING): New macro.
2859         (strcasecmp, strstr, strcasestr): If provided by the system,
2860         conditionally define as a macro that leads to a warning instead of to
2861         an error.
2862         (strncasecmp): Conditionally define as a macro that leads to a warning.
2863
2864 2007-02-01  Karl Berry  <karl@gnu.org>
2865
2866         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
2867
2868 2007-02-01  Bruno Haible  <bruno@clisp.org>
2869
2870         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
2871         renamings.
2872
2873 2007-02-01  Eric Blake  <ebb9@byu.net>
2874
2875         * modules/regex (Depends-on): Revert dependence on mempcpy.
2876         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
2877         module's definition of mempcpy.
2878         Reported by Paul Eggert.
2879
2880 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
2881
2882         * lib/string_.h: If the gnulib module XYZ is not present, undefine
2883         the symbol XYZ before redefining it.  This fixes a problem with
2884         programs that don't use XYZ, when compiled on systems that define
2885         XYZ to something else.
2886
2887 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
2888
2889         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
2890         occurs when "mkdir -m foo" creates a setgid directory that is (1)
2891         writeable to group or other and (2) is intended to have a special
2892         mode bit that is set or cleared.  In such a case, the directory
2893         should be neither group- nor other-writeable until the special
2894         mode bits are right.
2895
2896 2007-01-31  Eric Blake  <ebb9@byu.net>
2897
2898         * modules/mountlist (Depends-on): Add strstr.
2899
2900         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
2901         bug.
2902         * modules/string (Makefile.am): Remove redundant replacement.
2903         * modules/regex (Depends-on): Add mempcpy.
2904
2905 2007-01-31  Bruno Haible  <bruno@clisp.org>
2906
2907         New module description field 'Link'.
2908         * gnulib-tool (func_usage): Document --extract-link-directive.
2909         (sed_extract_prog): Recognize 'Link' directive.
2910         (func_get_link_directive): New function.
2911         (func_import): Show summary of link directives.
2912         Handle --extract-link-directive option.
2913         * modules/acl (Link): New section.
2914         * modules/clock-time (Link): New section.
2915         * modules/euidaccess (Link): New section.
2916         * modules/gettext (Link): New section.
2917         * modules/iconv (Link): New section.
2918         * modules/lock (Link): New section.
2919         * modules/nanosleep (Link): New section.
2920         * modules/readline (Link): New section.
2921
2922 2007-01-27  Bruno Haible  <bruno@clisp.org>
2923
2924         Enforce the use of gnulib modules for unportable <string.h> functions.
2925         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
2926         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
2927         (gl_HEADER_STRING_H_BODY): Require it.
2928         * lib/string_.h: If the gnulib module XYZ is not present, redefine
2929         the symbol XYZ to one that gives a link error.
2930         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
2931         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
2932         * modules/mempcpy (configure.ac): Likewise.
2933         * modules/memrchr (configure.ac): Likewise.
2934         * modules/stpcpy (configure.ac): Likewise.
2935         * modules/stpncpy (configure.ac): Likewise.
2936         * modules/strcase (configure.ac): Likewise.
2937         * modules/strcasestr (configure.ac): Likewise.
2938         * modules/strchrnul (configure.ac): Likewise.
2939         * modules/strdup (configure.ac): Likewise.
2940         * modules/strndup (configure.ac): Likewise.
2941         * modules/strnlen (configure.ac): Likewise.
2942         * modules/strpbrk (configure.ac): Likewise.
2943         * modules/strsep (configure.ac): Likewise.
2944         * modules/strstr (configure.ac): Likewise.
2945         * modules/strtok_r (configure.ac): Likewise.
2946
2947 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
2948
2949         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
2950
2951 2007-01-30  Jim Meyering  <jim@meyering.net>
2952
2953         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
2954
2955 2007-01-29  Bruno Haible  <bruno@clisp.org>
2956
2957         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
2958         * lib/execute.c: Likewise.
2959         * lib/pipe.c: Likewise.
2960         * lib/printf-args.h: Likewise.
2961         * lib/printf-args.c: Likewise.
2962         * lib/printf-parse.c: Likewise.
2963         * lib/vasnprintf.c: Likewise.
2964
2965 2007-01-29  Eric Blake  <ebb9@byu.net>
2966
2967         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
2968         declaration.
2969
2970 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
2971
2972         * lib/strptime.h (strptime): Use 'restrict' for args where
2973         POSIX requires this.
2974         * lib/strptime.c (strptime): Likewise.
2975         Change license notice from LGPL to GPL, since gnulib-tool will
2976         change this as needed.
2977         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
2978         defined.
2979         Include "strptime.h" first, to check interface.
2980         Do not #undef _LIBC and _NL_CURRENT.
2981         Do not include <stdlib.h>; no longer needed.
2982         Include "time_r.h" and declare ptime_locale_status
2983         only if _LIBC is not defined.
2984         (__P): Remove unused macro.
2985         (match_string): Bring back glibc version, but use it only if _LIBC
2986         is defined.
2987         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
2988         Remove unnecessary assertion and abort() call.
2989         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
2990         * m4/strptime.m4: Fix serial number comment.
2991         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
2992         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
2993         (Depends-on): Add time_r.
2994
2995 2007-01-29  Bruno Haible  <bruno@clisp.org>
2996
2997         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2998         strptime.
2999         * modules/strptime (Depends-on): Add stdbool.
3000         * lib/strptime.h: Include <time.h> always. Add comments.
3001
3002 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
3003
3004         * modules/strptime: New file.
3005         * lib/strptime.h: New file.
3006         * lib/strptime.c: New file.
3007         * m4/strptime.m4: New file.
3008
3009 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
3010
3011         * MODULES.html.sh: New module mpsort.
3012         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
3013
3014         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
3015         a circularity problem with HP-UX ia64 reported by Bob Proulx in
3016         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
3017         All uses changed.
3018         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
3019         All uses changed.
3020         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
3021         to _Restrict_.
3022         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
3023         the parameter matches the prototype.
3024
3025 2007-01-28  Jim Meyering  <jim@meyering.net>
3026
3027         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
3028         sys/time.h here, reverting that part of the previous patch:
3029         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
3030
3031 2007-01-28  Bruno Haible  <bruno@clisp.org>
3032
3033         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
3034         value of $(SYS_TIME_H).
3035         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
3036         remove it conditionally, too. [added by Jim Meyering]
3037         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
3038         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
3039         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
3040         GETTIMEOFDAY_REPLACEMENT to 1.
3041
3042 2007-01-28  Bruno Haible  <bruno@clisp.org>
3043
3044         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
3045         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
3046         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
3047         Set UNISTD_H instead of UNISTD_H2.
3048         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
3049
3050 2007-01-28  Bruno Haible  <bruno@clisp.org>
3051
3052         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
3053         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
3054
3055 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3056
3057         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
3058         (func_create_testdir): Ensure C locale for `grep' and `tr'
3059         character ranges.
3060         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
3061         ACLOCAL_AMFLAGS parsing state machine.
3062
3063 2007-01-27  Bruno Haible  <bruno@clisp.org>
3064
3065         * modules/unistr/base: Update.
3066
3067 2007-01-27  Bruno Haible  <bruno@clisp.org>
3068
3069         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
3070         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
3071         * modules/unistr/u32-mbtouc-unsafe: Renamed from
3072         modules/unistr/u32-mbtouc.
3073         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
3074         * lib/unistr.h: Update.
3075         * lib/linebreak.c: Update.
3076         * modules/unistr/u32-mbtouc: Renamed from
3077         modules/unistr/u32-mbtouc-safe.
3078         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
3079         * lib/unistr.h: Update.
3080         * lib/unistr/u32-to-u8.c: Update.
3081         * lib/unistr/u32-to-u16.c: Update.
3082
3083 2007-01-27  Bruno Haible  <bruno@clisp.org>
3084
3085         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
3086         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
3087         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
3088         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
3089         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
3090         * modules/unistr/u16-mbtouc-unsafe: Renamed from
3091         modules/unistr/u16-mbtouc.
3092         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
3093         * lib/unistr.h: Update.
3094         * lib/linebreak.c: Update.
3095         * modules/linebreak: Update.
3096         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
3097         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
3098         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
3099         * modules/unistr/u16-mbtouc: Renamed from
3100         modules/unistr/u16-mbtouc-safe.
3101         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
3102         * lib/unistr.h: Update.
3103         * lib/unistr/u16-to-u8.c: Update.
3104         * modules/unistr/u16-to-u8: Update.
3105         * lib/unistr/u16-to-u32.c: Update.
3106         * modules/unistr/u16-to-u32: Update.
3107
3108 2007-01-27  Bruno Haible  <bruno@clisp.org>
3109
3110         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
3111         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
3112         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
3113         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
3114         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
3115         * modules/unistr/u8-mbtouc-unsafe: Renamed from
3116         modules/unistr/u8-mbtouc.
3117         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
3118         * lib/unistr.h: Update.
3119         * lib/striconveh.c: Update.
3120         * modules/striconveh: Update.
3121         * lib/linebreak.c: Update.
3122         * modules/linebreak: Update.
3123         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
3124         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
3125         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
3126         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
3127         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
3128         * lib/unistr.h: Update.
3129         * lib/striconveh.c: Update.
3130         * modules/striconveh: Update.
3131         * lib/unistr/u8-to-u16.c: Update.
3132         * modules/unistr/u8-to-u16: Update.
3133         * lib/unistr/u8-to-u32.c: Update.
3134         * modules/unistr/u8-to-u32: Update.
3135
3136 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3137
3138         Sync from Libtool.
3139         * lib/argz.c: Do not include strings.h nor memory.h, include
3140         string.h unconditionally.  Patch by Simon Josefsson.
3141
3142 2007-01-27  Bruno Haible  <bruno@clisp.org>
3143
3144         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
3145         from gl_HEADER_STRING_H_BODY.
3146         (gl_HEADER_STRING_H_BODY): Require it.
3147         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
3148         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
3149         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
3150         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
3151         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
3152         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
3153         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
3154         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
3155         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
3156         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
3157         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
3158         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
3159         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
3160         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
3161         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
3162
3163 2007-01-27  Bruno Haible  <bruno@clisp.org>
3164
3165         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
3166         check_PROGRAMS into noinst_PROGRAMS.
3167         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
3168         check_PROGRAMS in this case.
3169         (func_import): Set for_test to false.
3170         (func_create_testdir): Set for_test to true.
3171
3172 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3173             Bruno Haible  <bruno@clisp.org>
3174
3175         * modules/strcasestr (Files): Remove lib/strcasestr.h.
3176         (Depends-on): Add string.
3177         (Includes): Use <string.h> instead of strcasestr.h.
3178         * modules/string (Makefile.am): Also substitute the value of
3179         REPLACE_STRCASESTR.
3180         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
3181         assume strcasestr is declared in <string.h> not <strings.h>. Also
3182         set REPLACE_STRCASESTR.
3183         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
3184         REPLACE_STRCASESTR.
3185         * lib/strcasestr.h: Remove file.
3186         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
3187         * lib/string_.h (strcasestr): New declaration.
3188
3189 2007-01-27  Bruno Haible  <bruno@clisp.org>
3190
3191         * lib/string_.h: Use 'extern'.
3192
3193 2007-01-27  Jim Meyering  <jim@meyering.net>
3194
3195         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
3196         of set-but-not-used local, "q".
3197
3198         * lib/mempcpy.c: Include <config.h> before <string.h>.
3199         This fixes a compilation error on HP-UX, due to the system's
3200         "restrict"-using mempcpy prototype.
3201
3202 2007-01-26  Bruno Haible  <bruno@clisp.org>
3203
3204         Small optimization.
3205         * lib/javacomp.c: Include c-strstr.h.
3206          (is_envjavac_gcj): Use c_strstr instead of strstr.
3207         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
3208
3209 2007-01-26  Bruno Haible  <bruno@clisp.org>
3210
3211         * MODULES.html.sh (Unicode string functions): Add the new modules.
3212
3213         * modules/uniconv/u32-strconv-to-locale: New file.
3214         * lib/uniconv/u32-strconv-to-locale.c: New file.
3215
3216         * modules/uniconv/u16-strconv-to-locale: New file.
3217         * lib/uniconv/u16-strconv-to-locale.c: New file.
3218
3219         * modules/uniconv/u8-strconv-to-locale: New file.
3220         * lib/uniconv/u8-strconv-to-locale.c: New file.
3221
3222         * modules/uniconv/u32-strconv-from-locale: New file.
3223         * lib/uniconv/u32-strconv-from-locale.c: New file.
3224
3225         * modules/uniconv/u16-strconv-from-locale: New file.
3226         * lib/uniconv/u16-strconv-from-locale.c: New file.
3227
3228         * modules/uniconv/u8-strconv-from-locale: New file.
3229         * lib/uniconv/u8-strconv-from-locale.c: New file.
3230
3231         * modules/uniconv/u32-strconv-to-enc: New file.
3232         * lib/uniconv/u32-strconv-to-enc.c: New file.
3233         * modules/uniconv/u32-strconv-to-enc-tests: New file.
3234         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
3235
3236         * modules/uniconv/u16-strconv-to-enc: New file.
3237         * lib/uniconv/u16-strconv-to-enc.c: New file.
3238         * lib/uniconv/u-strconv-to-enc.h: New file.
3239         * modules/uniconv/u16-strconv-to-enc-tests: New file.
3240         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
3241
3242         * modules/uniconv/u8-strconv-to-enc: New file.
3243         * lib/uniconv/u8-strconv-to-enc.c: New file.
3244         * modules/uniconv/u8-strconv-to-enc-tests: New file.
3245         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
3246
3247         * modules/uniconv/u32-strconv-from-enc: New file.
3248         * lib/uniconv/u32-strconv-from-enc.c: New file.
3249         * modules/uniconv/u32-strconv-from-enc-tests: New file.
3250         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
3251
3252         * modules/uniconv/u16-strconv-from-enc: New file.
3253         * lib/uniconv/u16-strconv-from-enc.c: New file.
3254         * modules/uniconv/u16-strconv-from-enc-tests: New file.
3255         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
3256
3257         * modules/uniconv/u8-strconv-from-enc: New file.
3258         * lib/uniconv/u8-strconv-from-enc.c: New file.
3259         * lib/uniconv/u-strconv-from-enc.h: New file.
3260         * modules/uniconv/u8-strconv-from-enc-tests: New file.
3261         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
3262
3263         * modules/uniconv/u32-conv-from-enc: New file.
3264         * lib/uniconv/u32-conv-from-enc.c: New file.
3265         * modules/uniconv/u32-conv-from-enc-tests: New file.
3266         * tests/uniconv/test-u32-conv-from-enc.c: New file.
3267
3268         * modules/uniconv/u16-conv-from-enc: New file.
3269         * lib/uniconv/u16-conv-from-enc.c: New file.
3270         * lib/uniconv/u-conv-from-enc.h: New file.
3271         * modules/uniconv/u16-conv-from-enc-tests: New file.
3272         * tests/uniconv/test-u16-conv-from-enc.c: New file.
3273
3274         * modules/uniconv/u8-conv-from-enc: New file.
3275         * lib/uniconv/u8-conv-from-enc.c: New file.
3276         * modules/uniconv/u8-conv-from-enc-tests: New file.
3277         * tests/uniconv/test-u8-conv-from-enc.c: New file.
3278
3279         * modules/uniconv/base: New file.
3280         * lib/uniconv.h: New file.
3281
3282 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
3283
3284         * doc/gnulib-tool.texi (Initial import): Update to match current
3285         behavior with strdup module.
3286         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
3287         * lib/memmem.h: Remove; all uses removed.  This is now done
3288         by <string.h>.
3289         * lib/mempcpy.h: Likewise.
3290         * lib/memrchr.h: Likewise.
3291         * lib/stpcpy.h: Likewise.
3292         * lib/stpncpy.h: Likewise.
3293         * lib/strcase.h: Likewise.
3294         * lib/strchrnul.h: Likewise.
3295         * lib/strdup.h: Likewise.
3296         * lib/strndup.h: Likewise.
3297         * lib/strnlen.h: Likewise.
3298         * lib/strpbrk.h: Likewise.
3299         * lib/strsep.h: Likewise.
3300         * lib/strstr.h: Likewise.
3301         * lib/strtok_r.h: Likewise.
3302         * lib/string_.h: New file.
3303         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
3304         Rely on <string.h> instead.
3305         * lib/canon-host.c: Likewise.
3306         * lib/chdir-long.c: Likewise.
3307         * lib/concatpath.c: Likewise.
3308         * lib/exclude.c: Likewise.
3309         * lib/fchdir.c: Likewise.
3310         * lib/getaddrinfo.c: Likewise.
3311         * lib/getcwd.c: Likewise.
3312         * lib/getsubopt.c: Likewise.
3313         * lib/glob.c: Likewise.
3314         * lib/hard-locale.c: Likewise.
3315         * lib/iconvme.c: Likewise.
3316         * lib/javacomp.c: Likewise.
3317         * lib/mempcpy.c: Likewise.
3318         * lib/memrchr.c: Likewise.
3319         * lib/regex_internal.h: Likewise.
3320         * lib/stpncpy.c: Likewise.
3321         * lib/strcasecmp.c: Likewise.
3322         * lib/strchrnul.c: Likewise.
3323         * lib/strdup.c: Likewise.
3324         * lib/striconv.c: Likewise.
3325         * lib/striconveh.c: Likewise.
3326         * lib/striconveha.c: Likewise.
3327         * lib/strncasecmp.c: Likewise.
3328         * lib/strndup.c: Likewise.
3329         * lib/strnlen.c: Likewise.
3330         * lib/strsep.c: Likewise.
3331         * lib/strstr.c: Likewise.
3332         * lib/strtok_r.c: Likewise.
3333         * lib/userspec.c: Likewise.
3334         * lib/w32spawn.h: Likewise.
3335         * lib/xstrndup.c: Likewise.
3336         * lib/mountlist.c (strstr): Remove decl.
3337         * m4/string_h.m4: New file.
3338         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
3339         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
3340         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
3341         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
3342         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
3343         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
3344         Set REPLACE_STRCASECMP if necessary.
3345         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
3346         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
3347         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
3348         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
3349         HAVE_DECL_STRDUP if necessary.
3350         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
3351         since gl_FUNC_STRNDUP does that now.
3352         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
3353         Check for decl here...
3354         (gl_PREREQ_STRNLEN): ... not here.
3355         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
3356         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
3357         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
3358         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
3359         necessary.
3360         * modules/string: New file.
3361         * modules/memmem (Files): Remove special-purpose include file.
3362         (Depends-on): Add string.
3363         (Include): Include <string.h>, not the removed file.
3364         * modules/mempcpy: Likewise.
3365         * modules/memrchr: Likewise.
3366         * modules/stpcpy: Likewise.
3367         * modules/stpncpy: Likewise.
3368         * modules/strcase: Likewise.
3369         * modules/strchrnul: Likewise.
3370         * modules/strdup: Likewise.
3371         * modules/strndup: Likewise.
3372         * modules/strnlen: Likewise.
3373         * modules/strpbrk: Likewise.
3374         * modules/strsep: Likewise.
3375         * modules/strstr: Likewise.
3376         * modules/strtok_r: Likewise.
3377         * tests/test-dirname.c: Don't include "strdup.h", since
3378         <string.h> now suffices.
3379         * tests/test-memmem.c: Don't include "memmem.h", since
3380         <string.h> now suffices.
3381
3382 2007-01-25  Bruno Haible  <bruno@clisp.org>
3383
3384         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
3385         *resultp is 0.
3386
3387         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
3388         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
3389         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
3390         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
3391
3392         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
3393         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
3394         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
3395         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
3396         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
3397         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
3398
3399 2007-01-24  Bruno Haible  <bruno@clisp.org>
3400
3401         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
3402         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
3403         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
3404         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
3405         gl_FUNC_FTS_CORE.
3406         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
3407         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
3408         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
3409         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
3410         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
3411         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
3412         gl_FUNC_FCHOWNAT.
3413         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
3414         gl_FUNC_STRFTIME.
3415         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
3416         Reported by Ralf Wildenhues.
3417
3418 2007-01-24  Bruno Haible  <bruno@clisp.org>
3419
3420         Drop AC_REQUIRE calls that are redundant with the module dependencies.
3421         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
3422         gl_GETADDRINFO.
3423         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
3424         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
3425         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
3426
3427 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
3428
3429         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
3430         Don't use 'exit'; just return from 'main'.
3431         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
3432
3433         * lib/fnmatch_.h: Readjust white space and comments to match
3434         glibc, to avoid spurious diffs.
3435
3436 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
3437
3438         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
3439         2004-12-01 change by Jakub Jelinek, since this code won't compile
3440         if !LIBC.  Problem reported by Bob Proulx.
3441
3442 2007-01-23  Bruno Haible  <bruno@clisp.org>
3443
3444         * lib/striconveh.c: Include c-strcaseeq.h.
3445         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
3446         * modules/striconveh (Depends-on): Add c-strcaseeq.
3447
3448 2007-01-23  Bruno Haible  <bruno@clisp.org>
3449
3450         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
3451
3452         * modules/c-strcaseeq: New file.
3453         * lib/c-strcaseeq.h: New file.
3454
3455         * modules/streq: New file.
3456         * lib/streq.h: New file.
3457
3458 2007-01-23  Bruno Haible  <bruno@clisp.org>
3459
3460         * modules/striconveha-tests: New file.
3461         * tests/test-striconveha.c: New file.
3462
3463         * lib/striconveha.h: Include <stdbool.h>.
3464         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
3465         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
3466         (mem_iconveha_notranslit): Renamed from mem_iconveha.
3467         (mem_iconveha): New function.
3468         (str_iconveha_notranslit): Renamed from str_iconveha.
3469         (str_iconveha): New function.
3470         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
3471         c-strcase.
3472
3473 2007-01-23  Bruno Haible  <bruno@clisp.org>
3474
3475         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
3476         encodings without forgiving before trying any encoding with handler.
3477         (str_iconveha): Try all encodings without forgiving before trying any
3478         encoding with handler.
3479
3480 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
3481
3482         Import the following changes from libc.
3483
3484         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
3485
3486         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
3487
3488         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3489
3490         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
3491         normal_bracket label.
3492
3493         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
3494
3495         [BZ #361]
3496         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
3497         to normal_bracket after fetching the next character.
3498
3499 2007-01-22  Bruno Haible  <bruno@clisp.org>
3500
3501         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
3502         argument.
3503         * lib/striconveh.c (iconv_carefully_1): New function.
3504         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
3505         argument.
3506         (str_cd_iconveh): Update.
3507         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
3508         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
3509         * tests/test-striconveh.c (MAGIC): New macro.
3510         (new_offsets): New function.
3511         (main): Test call with and without offsets.
3512
3513 2007-01-22  Bruno Haible  <bruno@clisp.org>
3514
3515         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
3516         * modules/sys_select (Makefile.am): Likewise.
3517         * modules/sys_socket (Makefile.am): Likewise.
3518         * modules/sys_time (Makefile.am): Likewise.
3519
3520 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
3521
3522         * modules/gettimeofday (License): Change from GPL to LGPL, since
3523         gettimeofday is a library function.
3524
3525 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3526
3527         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
3528
3529 2007-01-21  Bruno Haible  <bruno@clisp.org>
3530
3531         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
3532
3533 2007-01-21  Bruno Haible  <bruno@clisp.org>
3534
3535         * modules/striconveha: New file.
3536         * lib/striconveha.h: New file.
3537         * lib/striconveha.c: New file.
3538         * MODULES.html.sh (Internationalization functions): Add striconveha.
3539         * lib/striconv.c (str_iconv): Optimize the case of an empty input
3540         string.
3541         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
3542
3543 2007-01-21  Bruno Haible  <bruno@clisp.org>
3544
3545         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
3546         * lib/striconveh.c (str_iconveh): Likewise.
3547
3548 2007-01-21  Bruno Haible  <bruno@clisp.org>
3549
3550         * lib/striconveh.h (mem_iconveh): New declaration.
3551         * lib/striconveh.c (mem_iconveh): New function.
3552         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
3553
3554 2007-01-21  Bruno Haible  <bruno@clisp.org>
3555
3556         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
3557
3558         * lib/striconveh.h (mem_cd_iconveh): Change specification.
3559         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
3560         original result buffer.
3561         (str_cd_iconveh): Update.
3562         * tests/test-striconveh.c (main): Update.
3563
3564         * lib/striconv.h (mem_cd_iconv): Change specification.
3565         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
3566         result buffer.
3567         (str_cd_iconv): Update.
3568         * tests/test-striconv.c (main): Update.
3569
3570 2007-01-21  Bruno Haible  <bruno@clisp.org>
3571
3572         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
3573
3574 2007-01-20  Jim Meyering  <jim@meyering.net>
3575
3576         * lib/userspec.c (parse_with_separator): If a user or group string
3577         starts with "+", skip the corresponding name-to-ID look-up, since
3578         such a look-up must fail: user and group names may not include "+".
3579
3580 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
3581
3582         * lib/poll.c: Include sys/time.h and time.h unconditionally,
3583         since we now assume the sys_time module.
3584         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
3585         check for sys/time.h; no longer needed.
3586         * modules/poll (Depends-on): Depend on sys_time.
3587
3588 2007-01-18  Bruno Haible  <bruno@clisp.org>
3589
3590         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
3591         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
3592
3593         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
3594         gettimeofday.
3595
3596         * tests/test-gettimeofday.c: Include <time.h>.
3597         (dummy): Remove variable.
3598
3599         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
3600         gl_HEADER_SYS_TIME_H.
3601         (gl_HEADER_SYS_TIME_H): New macro.
3602
3603         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
3604         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3605         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
3606         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
3607         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3608         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
3609         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
3610         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3611         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
3612         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
3613         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3614
3615         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
3616         last change; it caused a compilation error when cross-compiling to
3617         Cygwin.
3618
3619 2007-01-18  Jim Meyering  <jim@meyering.net>
3620
3621         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
3622         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
3623         than the race-prone "test -d sys || mkdir sys".
3624         (configure.ac): Use AC_PROG_MKDIR_P.
3625         * modules/sys_select: Likewise.
3626         * modules/sys_socket: Likewise.
3627         * modules/sys_time: Likewise.
3628
3629 2007-01-18  Eric Blake  <ebb9@byu.net>
3630
3631         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
3632         replace gettimeofday.
3633         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
3634         name, to avoid infinite recursion.
3635
3636 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
3637
3638         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
3639         module sys_time.
3640         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
3641         assume timespec.h defines struct timeval.
3642         * lib/settime.c: Likewise.
3643         * lib/utimens.c: Likewise.
3644         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
3645         since we now assume the gettimeofday module.
3646         * lib/tempname.c (__gen_tempname): Likewise.
3647         * lib/gettimeofday.h: Remove.
3648         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
3649         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
3650         Include <time.h>, for 'time()'.
3651         (localtime_buffer_addr): Also use this workaround if
3652         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
3653         to simplify the uses.  All uses changed.
3654         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
3655         that #undef is inside {}, and 'const' follows type name consistently.
3656         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
3657         (gettimeofday): Do not use the maximum possible value for
3658         tv->tv_usec, since that might break usages other than ls.c.
3659         Instead, we'll leave ls.c alone.  This undoes today's patch
3660         by Bruno.  Add a compile-time warning for 1s-clock resolution;
3661         we've never observed the problem but might as well keep the
3662         canary.
3663         * lib/nanosleep.c: Include timespec.h first, for interface check.
3664         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
3665         now assume the sys_time module.
3666         * lib/tempname.c: Likewise.
3667         * lib/timespec.h: Likewise.
3668         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
3669         needed.
3670         * lib/strftime.c: Likewise.
3671         * lib/timespec.h: Likewise.
3672         * lib/posixtm.c: Include posixtm.h first, for interface check.
3673         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
3674         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
3675         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
3676         * lib/sys_time_.h: New file.
3677         * lib/timespec.h (struct timespec): Use long int, not long.
3678         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
3679         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
3680         Remove obsolescent call to AC_HEADER_TIME.
3681         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
3682         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
3683         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
3684         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
3685         Likewise.
3686         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
3687         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
3688         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
3689         into the sys_time module.  Check for gettimeofday just once.
3690         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
3691         for gettimeofday signature to just check the signature.  Merely
3692         compile it, since linking doesn't test signature.  Improve test for
3693         whether gettimeofday.o is actually needed.
3694         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
3695         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
3696         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
3697         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3698         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
3699         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
3700         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
3701         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
3702         than worrying about sys/time.h.
3703         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3704         Don't bother worrying about TIME_WITH_SYS_TIME.
3705         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
3706         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
3707         * m4/sys_time_h.m4: New file.
3708         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
3709         Don't include sys/time.h.  Return from main rather than exiting.
3710         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
3711         all uses changed.
3712         * modules/gethrxtime (Depends-on): Add sys_time.
3713         * modules/gettime (Depends-on): Likewise.
3714         * modules/gettimeofday (Depends-on): Likewise.
3715         * modules/nanosleep (Depends-on): Likewise.
3716         * modules/settime (Depends-on): Likewise.
3717         * modules/tempname (Depends-on): Likewise.
3718         * modules/utimens (Depends-on): Likewise.
3719         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
3720         (Include:) Change back to <sys/time.h>.
3721         (Maintainer:) Add self.
3722         * modules/sys_time: New file.
3723         * modules/tempname (Depends-on): Add gettimeofday.
3724         * tests/test-gettimeofday.c: Include <sys/time.h>
3725         rather than gettimeofday.h.
3726
3727 2007-01-17  Bruno Haible  <bruno@clisp.org>
3728
3729         * gnulib-tool (func_get_license): Revert last patch. Instead, let
3730         the license default to GPL.
3731         (func_create_testdir): Don't complain if a module is LGPL and its
3732         tests module depends on GPLed modules.
3733
3734 2007-01-17  Bruno Haible  <bruno@clisp.org>
3735
3736         * lib/gettimeofday.c (gettimeofday): Add code for the case
3737         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
3738         maximum possible value for tv->tv_usec, rather than the minimum one.
3739
3740 2005-10-08  Martin Lambers  <marlam@marlam.de>
3741 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3742 2007-01-16  Bruno Haible  <bruno@clisp.org>
3743
3744         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
3745         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
3746         gl_FUNC_GETTIMEOFDAY.
3747         (Include): Add gettimeofday.h.
3748         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
3749         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
3750         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
3751         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
3752         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
3753         * lib/gettimeofday.h: New file.
3754         * lib/gettimeofday.c: Include <sys/timeb.h>.
3755         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
3756         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3757         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
3758         fall back on time().
3759
3760         * tests/test-gettimeofday.c: New file.
3761         * modules/gettimeofday-tests: New file.
3762
3763 2007-01-16  Eric Blake  <ebb9@byu.net>
3764
3765         * modules/fnmatch (Depends-on): Depend on wchar.
3766         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
3767         * m4/fnmatch.m4: Likewise.
3768         * modules/mbchar (Makefile.am): Assume <wchar.h>.
3769         * m4/mbchar.m4: Likewise.
3770         * modules/mbswidth (Depends-on): Depend on wchar.
3771         * lib/mbswidth.c: Assume <wchar.h>.
3772         * m4/mbswidth.m4: Likewise.
3773         * modules/quotearg (Depends-on): Depend on wchar.
3774         * lib/quotearg.c: Assume <wchar.h>.
3775         * m4/quotearg.m4: Likewise.
3776         * modules/regex (Depends-on): Depend on wchar.
3777         * lib/regex_internal.h: Assume <wchar.h>.
3778         * m4/regex.m4: Likewise.
3779         * modules/stdint (Depends-on): Depend on wchar.
3780         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
3781         * m4/stdint.m4: Likewise.
3782         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
3783         * modules/strftime (Depends-on): Depend on wchar.
3784         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
3785         * modules/strtol (Depends-on): Depend on wchar.
3786         * lib/strtol.c: Assume <wchar.h>.
3787         * modules/wcwidth (Depends-on): Depend on wchar.
3788         * lib/wcwidth.h: Assume <wchar.h>.
3789         * m4/wcwidth.m4: Likewise.
3790
3791 2007-01-16  Bruno Haible  <bruno@clisp.org>
3792
3793         * modules/csharpexec-script: New, created from...
3794         * modules/csharpexec: ... this.
3795
3796 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
3797
3798         * modules/javaexec-script: New, created from...
3799         * modules/javaexec: ... this.
3800
3801 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3802
3803         * modules/poll (Dependencies): Add sys_select.
3804
3805 2007-01-15  Jim Meyering  <jim@meyering.net>
3806
3807         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
3808         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
3809         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
3810         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
3811
3812 2007-01-15  Bruno Haible  <bruno@clisp.org>
3813
3814         * modules/striconveh: New file.
3815         * lib/striconveh.h: New file.
3816         * lib/striconveh.c: New file.
3817         * MODULES.html.sh (Internationalization functions): Add striconveh.
3818
3819         * modules/striconveh-tests: New file.
3820         * tests/test-striconveh.c: New file.
3821
3822 2007-01-15  Bruno Haible  <bruno@clisp.org>
3823
3824         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
3825         not from GNU libiconv or GNU libc.
3826
3827 2007-01-15  Bruno Haible  <bruno@clisp.org>
3828
3829         * doc/gnulib-intro.texi (Copyright): Explain the different license
3830         terms for module descriptions, autoconf macros, tests, documentation.
3831
3832 2007-01-14  Bruno Haible  <bruno@clisp.org>
3833
3834         * modules/striconv-tests: New file.
3835         * tests/test-striconv.c: New file.
3836
3837 2007-01-14  Bruno Haible  <bruno@clisp.org>
3838
3839         * modules/iconv-tests: New file.
3840         * tests/test-iconv.c: New file.
3841
3842 2007-01-14  Bruno Haible  <bruno@clisp.org>
3843
3844         * gnulib-tool (func_get_license): For test modules, use the license of
3845         the main module.
3846
3847 2007-01-14  Bruno Haible  <bruno@clisp.org>
3848
3849         * modules/iconv (Include): Clarify that <iconv.h> can only be included
3850         if iconv is found to exist.
3851
3852 2007-01-14  Bruno Haible  <bruno@clisp.org>
3853
3854         * modules/c-ctype-tests: New file.
3855         * tests/test-c-ctype.c: New file.
3856
3857 2007-01-14  Bruno Haible  <bruno@clisp.org>
3858
3859         * modules/binary-io-tests: New file.
3860         * tests/test-binary-io.sh: New file.
3861         * tests/test-binary-io.c: New file.
3862
3863 2007-01-14  Bruno Haible  <bruno@clisp.org>
3864
3865         * modules/array-oset-tests: New file.
3866         * tests/test-array_oset.c: New file.
3867
3868 2007-01-14  Bruno Haible  <bruno@clisp.org>
3869
3870         * modules/array-list-tests: New file.
3871         * tests/test-array_list.c: New file.
3872
3873 2007-01-14  Bruno Haible  <bruno@clisp.org>
3874
3875         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
3876         and make.
3877         Reported by Simon Josefsson in
3878         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
3879
3880 2007-01-14  Bruno Haible  <bruno@clisp.org>
3881
3882         * modules/allocsa-tests: New file.
3883         * tests/test-allocsa.c: New file.
3884
3885 2007-01-14  Bruno Haible  <bruno@clisp.org>
3886
3887         * modules/fchdir (Depends-on): Add absolute-header.
3888         * modules/unistd (Depends-on): Likewise.
3889
3890 2006-12-30  Bruno Haible  <bruno@clisp.org>
3891
3892         * modules/fchdir: New file.
3893         * modules/unistd (Files): Add lib/unistd_.h.
3894         (Makefile.am): Generate unistd.h from unistd_.h.
3895         * lib/fchdir.c: New file.
3896         * lib/dirent_.h: New file.
3897         * lib/unistd_.h: New file.
3898         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
3899         * m4/fchdir.m4: New file.
3900         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
3901         (gl_HEADER_UNISTD): Invoke it.
3902         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
3903         function.
3904         * lib/backupfile.c (opendir, closedir): Undefine.
3905         * lib/chown.c (open, close): Undefine.
3906         * lib/clean-temp.c (open, close): Undefine.
3907         * lib/copy-file.c (open, close): Undefine.
3908         * lib/execute.c (open, close): Undefine.
3909         * lib/fsusage.c (open, close): Undefine.
3910         * lib/gc-gnulib.c (open, close): Undefine.
3911         * lib/getcwd.c (opendir, closedir): Undefine.
3912         * lib/glob.c (opendir, closedir): Undefine.
3913         * lib/javacomp.c (open, close): Undefine.
3914         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
3915         * lib/openat-proc.c (open, close): Undefine.
3916         * lib/pagealign_alloc.c (open, close): Undefine.
3917         * lib/pipe.c (open, close): Undefine.
3918         * lib/progreloc.c (open, close): Undefine.
3919         * lib/savedir.c (opendir, closedir): Undefine.
3920         * lib/utime.c (open, close): Undefine.
3921         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
3922
3923 2007-01-10  Bruno Haible  <bruno@clisp.org>
3924
3925         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
3926
3927 2007-01-12  Eric Blake  <ebb9@byu.net>
3928
3929         Provide a robust <wchar.h>.  Further simplifications are now
3930         possible in other modules, but not included here.
3931         * modules/wchar: New module.
3932         * m4/wchar.m4: New file.
3933         * lib/wchar_.h: Likewise.
3934         * modules/mbchar (Depends-on): Depend on wchar, as the first use
3935         of the new module.
3936         * MODULES.html.sh (Extended multibyte and wide character utilities):
3937         New section.
3938
3939 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
3940
3941         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
3942         to a reasonable default for memory allocation.
3943         (xreadlink): Don't allocate a huge buffer, to work around a buggy
3944         file system that reports garbage st_size values for symlinks.
3945         Problem reported by Liyang Hu.
3946
3947 2007-01-11  Simon Josefsson  <simon@josefsson.org>
3948
3949         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
3950         Emacs .#* auto-save files).
3951
3952 2007-01-11  Bruno Haible  <bruno@clisp.org>
3953
3954         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
3955         directory.
3956
3957 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
3958
3959         Use @...@ consistently in lib/wctype_.h.
3960         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
3961         on it being set to 1 or 0.
3962         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
3963         go back to AC_SUBSTing it.
3964         * modules/wctype (Makefile.am): Undo previous change.
3965
3966 2007-01-10  Eric Blake  <ebb9@byu.net>
3967
3968         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
3969         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
3970         * modules/wctype (Makefile.am): Likewise.
3971         Reported by Chris McGuire.
3972
3973 2007-01-10  Jim Meyering  <jim@meyering.net>
3974
3975         fts.c: a small readability/maintainability improvement
3976         * lib/fts.c (fts_read): Make this code slightly more readable and
3977         maintainable by hoisting the "sp->fts_cur = p" assignments to
3978         immediately follow the statements that set P.  Derived from
3979         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
3980
3981 2007-01-10  Eric Blake  <ebb9@byu.net>
3982
3983         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
3984         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
3985         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
3986         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
3987         Reported by Chris McGuire.
3988
3989 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3990
3991         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
3992         in sed script.
3993
3994 2007-01-09  Bruno Haible  <bruno@clisp.org>
3995
3996         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
3997         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
3998         variables.
3999         (func_module): Use them.
4000
4001 2007-01-09  Bruno Haible  <bruno@clisp.org>
4002
4003         * modules/unistr/base: New file.
4004         * lib/unistr.h: New file.
4005
4006         * modules/unistr/u8-to-u16: New file.
4007         * lib/unistr/u8-to-u16.c: New file.
4008
4009         * modules/unistr/u8-to-u32: New file.
4010         * lib/unistr/u8-to-u32.c: New file.
4011
4012         * modules/unistr/u16-to-u8: New file.
4013         * lib/unistr/u16-to-u8.c: New file.
4014
4015         * modules/unistr/u16-to-u32: New file.
4016         * lib/unistr/u16-to-u32.c: New file.
4017
4018         * modules/unistr/u32-to-u8: New file.
4019         * lib/unistr/u32-to-u8.c: New file.
4020
4021         * modules/unistr/u32-to-u16: New file.
4022         * lib/unistr/u32-to-u16.c: New file.
4023
4024         * modules/unistr/u8-check: New file.
4025         * modules/unistr/u16-check: New file.
4026         * modules/unistr/u32-check: New file.
4027         * lib/unistr/u8-check.c: New file.
4028         * lib/unistr/u16-check.c: New file.
4029         * lib/unistr/u32-check.c: New file.
4030
4031         * modules/unistr/u8-chr: New file.
4032         * modules/unistr/u16-chr: New file.
4033         * modules/unistr/u32-chr: New file.
4034         * lib/unistr/u8-chr.c: New file.
4035         * lib/unistr/u16-chr.c: New file.
4036         * lib/unistr/u32-chr.c: New file.
4037
4038         * modules/unistr/u8-cmp: New file.
4039         * modules/unistr/u16-cmp: New file.
4040         * modules/unistr/u32-cmp: New file.
4041         * lib/unistr/u8-cmp.c: New file.
4042         * lib/unistr/u16-cmp.c: New file.
4043         * lib/unistr/u32-cmp.c: New file.
4044
4045         * modules/unistr/u8-cpy: New file.
4046         * modules/unistr/u16-cpy: New file.
4047         * modules/unistr/u32-cpy: New file.
4048         * lib/unistr/u8-cpy.c: New file.
4049         * lib/unistr/u16-cpy.c: New file.
4050         * lib/unistr/u32-cpy.c: New file.
4051         * lib/unistr/u-cpy.h: New file.
4052
4053         * modules/unistr/u8-cpy-alloc: New file.
4054         * modules/unistr/u16-cpy-alloc: New file.
4055         * modules/unistr/u32-cpy-alloc: New file.
4056         * lib/unistr/u8-cpy-alloc.c: New file.
4057         * lib/unistr/u16-cpy-alloc.c: New file.
4058         * lib/unistr/u32-cpy-alloc.c: New file.
4059         * lib/unistr/u-cpy-alloc.h: New file.
4060
4061         * modules/unistr/u8-endswith: New file.
4062         * modules/unistr/u16-endswith: New file.
4063         * modules/unistr/u32-endswith: New file.
4064         * lib/unistr/u8-endswith.c: New file.
4065         * lib/unistr/u16-endswith.c: New file.
4066         * lib/unistr/u32-endswith.c: New file.
4067         * lib/unistr/u-endswith.h: New file.
4068
4069         * modules/unistr/u8-mblen: New file.
4070         * modules/unistr/u16-mblen: New file.
4071         * modules/unistr/u32-mblen: New file.
4072         * lib/unistr/u8-mblen.c: New file.
4073         * lib/unistr/u16-mblen.c: New file.
4074         * lib/unistr/u32-mblen.c: New file.
4075
4076         * modules/unistr/u8-mbtouc: New file.
4077         * modules/unistr/u16-mbtouc: New file.
4078         * modules/unistr/u32-mbtouc: New file.
4079         * lib/unistr/u8-mbtouc.c: New file.
4080         * lib/unistr/u16-mbtouc.c: New file.
4081         * lib/unistr/u32-mbtouc.c: New file.
4082
4083         * modules/unistr/u8-mbtouc-safe: New file.
4084         * modules/unistr/u16-mbtouc-safe: New file.
4085         * modules/unistr/u32-mbtouc-safe: New file.
4086         * lib/unistr/u8-mbtouc-safe.c: New file.
4087         * lib/unistr/u16-mbtouc-safe.c: New file.
4088         * lib/unistr/u32-mbtouc-safe.c: New file.
4089
4090         * modules/unistr/u8-move: New file.
4091         * modules/unistr/u16-move: New file.
4092         * modules/unistr/u32-move: New file.
4093         * lib/unistr/u8-move.c: New file.
4094         * lib/unistr/u16-move.c: New file.
4095         * lib/unistr/u32-move.c: New file.
4096         * lib/unistr/u-move.h: New file.
4097
4098         * modules/unistr/u8-next: New file.
4099         * modules/unistr/u16-next: New file.
4100         * modules/unistr/u32-next: New file.
4101         * lib/unistr/u8-next.c: New file.
4102         * lib/unistr/u16-next.c: New file.
4103         * lib/unistr/u32-next.c: New file.
4104
4105         * modules/unistr/u8-prev: New file.
4106         * modules/unistr/u16-prev: New file.
4107         * modules/unistr/u32-prev: New file.
4108         * lib/unistr/u8-prev.c: New file.
4109         * lib/unistr/u16-prev.c: New file.
4110         * lib/unistr/u32-prev.c: New file.
4111
4112         * modules/unistr/u8-set: New file.
4113         * modules/unistr/u16-set: New file.
4114         * modules/unistr/u32-set: New file.
4115         * lib/unistr/u8-set.c: New file.
4116         * lib/unistr/u16-set.c: New file.
4117         * lib/unistr/u32-set.c: New file.
4118         * lib/unistr/u-set.h: New file.
4119
4120         * modules/unistr/u8-startswith: New file.
4121         * modules/unistr/u16-startswith: New file.
4122         * modules/unistr/u32-startswith: New file.
4123         * lib/unistr/u8-startswith.c: New file.
4124         * lib/unistr/u16-startswith.c: New file.
4125         * lib/unistr/u32-startswith.c: New file.
4126         * lib/unistr/u-startswith.h: New file.
4127
4128         * modules/unistr/u8-stpcpy: New file.
4129         * modules/unistr/u16-stpcpy: New file.
4130         * modules/unistr/u32-stpcpy: New file.
4131         * lib/unistr/u8-stpcpy.c: New file.
4132         * lib/unistr/u16-stpcpy.c: New file.
4133         * lib/unistr/u32-stpcpy.c: New file.
4134         * lib/unistr/u-stpcpy.h: New file.
4135
4136         * modules/unistr/u8-stpncpy: New file.
4137         * modules/unistr/u16-stpncpy: New file.
4138         * modules/unistr/u32-stpncpy: New file.
4139         * lib/unistr/u8-stpncpy.c: New file.
4140         * lib/unistr/u16-stpncpy.c: New file.
4141         * lib/unistr/u32-stpncpy.c: New file.
4142         * lib/unistr/u-stpncpy.h: New file.
4143
4144         * modules/unistr/u8-strcat: New file.
4145         * modules/unistr/u16-strcat: New file.
4146         * modules/unistr/u32-strcat: New file.
4147         * lib/unistr/u8-strcat.c: New file.
4148         * lib/unistr/u16-strcat.c: New file.
4149         * lib/unistr/u32-strcat.c: New file.
4150         * lib/unistr/u-strcat.h: New file.
4151
4152         * modules/unistr/u8-strchr: New file.
4153         * modules/unistr/u16-strchr: New file.
4154         * modules/unistr/u32-strchr: New file.
4155         * lib/unistr/u8-strchr.c: New file.
4156         * lib/unistr/u16-strchr.c: New file.
4157         * lib/unistr/u32-strchr.c: New file.
4158
4159         * modules/unistr/u8-strcmp: New file.
4160         * modules/unistr/u16-strcmp: New file.
4161         * modules/unistr/u32-strcmp: New file.
4162         * lib/unistr/u8-strcmp.c: New file.
4163         * lib/unistr/u16-strcmp.c: New file.
4164         * lib/unistr/u32-strcmp.c: New file.
4165
4166         * modules/unistr/u8-strcpy: New file.
4167         * modules/unistr/u16-strcpy: New file.
4168         * modules/unistr/u32-strcpy: New file.
4169         * lib/unistr/u8-strcpy.c: New file.
4170         * lib/unistr/u16-strcpy.c: New file.
4171         * lib/unistr/u32-strcpy.c: New file.
4172         * lib/unistr/u-strcpy.h: New file.
4173
4174         * modules/unistr/u8-strcspn: New file.
4175         * modules/unistr/u16-strcspn: New file.
4176         * modules/unistr/u32-strcspn: New file.
4177         * lib/unistr/u8-strcspn.c: New file.
4178         * lib/unistr/u16-strcspn.c: New file.
4179         * lib/unistr/u32-strcspn.c: New file.
4180         * lib/unistr/u-strcspn.h: New file.
4181
4182         * modules/unistr/u8-strdup: New file.
4183         * modules/unistr/u16-strdup: New file.
4184         * modules/unistr/u32-strdup: New file.
4185         * lib/unistr/u8-strdup.c: New file.
4186         * lib/unistr/u16-strdup.c: New file.
4187         * lib/unistr/u32-strdup.c: New file.
4188         * lib/unistr/u-strdup.h: New file.
4189
4190         * modules/unistr/u8-strlen: New file.
4191         * modules/unistr/u16-strlen: New file.
4192         * modules/unistr/u32-strlen: New file.
4193         * lib/unistr/u8-strlen.c: New file.
4194         * lib/unistr/u16-strlen.c: New file.
4195         * lib/unistr/u32-strlen.c: New file.
4196         * lib/unistr/u-strlen.h: New file.
4197
4198         * modules/unistr/u8-strmblen: New file.
4199         * modules/unistr/u16-strmblen: New file.
4200         * modules/unistr/u32-strmblen: New file.
4201         * lib/unistr/u8-strmblen.c: New file.
4202         * lib/unistr/u16-strmblen.c: New file.
4203         * lib/unistr/u32-strmblen.c: New file.
4204
4205         * modules/unistr/u8-strmbtouc: New file.
4206         * modules/unistr/u16-strmbtouc: New file.
4207         * modules/unistr/u32-strmbtouc: New file.
4208         * lib/unistr/u8-strmbtouc.c: New file.
4209         * lib/unistr/u16-strmbtouc.c: New file.
4210         * lib/unistr/u32-strmbtouc.c: New file.
4211
4212         * modules/unistr/u8-strncat: New file.
4213         * modules/unistr/u16-strncat: New file.
4214         * modules/unistr/u32-strncat: New file.
4215         * lib/unistr/u8-strncat.c: New file.
4216         * lib/unistr/u16-strncat.c: New file.
4217         * lib/unistr/u32-strncat.c: New file.
4218         * lib/unistr/u-strncat.h: New file.
4219
4220         * modules/unistr/u8-strncmp: New file.
4221         * modules/unistr/u16-strncmp: New file.
4222         * modules/unistr/u32-strncmp: New file.
4223         * lib/unistr/u8-strncmp.c: New file.
4224         * lib/unistr/u16-strncmp.c: New file.
4225         * lib/unistr/u32-strncmp.c: New file.
4226
4227         * modules/unistr/u8-strncpy: New file.
4228         * modules/unistr/u16-strncpy: New file.
4229         * modules/unistr/u32-strncpy: New file.
4230         * lib/unistr/u8-strncpy.c: New file.
4231         * lib/unistr/u16-strncpy.c: New file.
4232         * lib/unistr/u32-strncpy.c: New file.
4233         * lib/unistr/u-strncpy.h: New file.
4234
4235         * modules/unistr/u8-strnlen: New file.
4236         * modules/unistr/u16-strnlen: New file.
4237         * modules/unistr/u32-strnlen: New file.
4238         * lib/unistr/u8-strnlen.c: New file.
4239         * lib/unistr/u16-strnlen.c: New file.
4240         * lib/unistr/u32-strnlen.c: New file.
4241         * lib/unistr/u-strnlen.h: New file.
4242
4243         * modules/unistr/u8-strpbrk: New file.
4244         * modules/unistr/u16-strpbrk: New file.
4245         * modules/unistr/u32-strpbrk: New file.
4246         * lib/unistr/u8-strpbrk.c: New file.
4247         * lib/unistr/u16-strpbrk.c: New file.
4248         * lib/unistr/u32-strpbrk.c: New file.
4249         * lib/unistr/u-strpbrk.h: New file.
4250
4251         * modules/unistr/u8-strrchr: New file.
4252         * modules/unistr/u16-strrchr: New file.
4253         * modules/unistr/u32-strrchr: New file.
4254         * lib/unistr/u8-strrchr.c: New file.
4255         * lib/unistr/u16-strrchr.c: New file.
4256         * lib/unistr/u32-strrchr.c: New file.
4257
4258         * modules/unistr/u8-strspn: New file.
4259         * modules/unistr/u16-strspn: New file.
4260         * modules/unistr/u32-strspn: New file.
4261         * lib/unistr/u8-strspn.c: New file.
4262         * lib/unistr/u16-strspn.c: New file.
4263         * lib/unistr/u32-strspn.c: New file.
4264         * lib/unistr/u-strspn.h: New file.
4265
4266         * modules/unistr/u8-strstr: New file.
4267         * modules/unistr/u16-strstr: New file.
4268         * modules/unistr/u32-strstr: New file.
4269         * lib/unistr/u8-strstr.c: New file.
4270         * lib/unistr/u16-strstr.c: New file.
4271         * lib/unistr/u32-strstr.c: New file.
4272         * lib/unistr/u-strstr.h: New file.
4273
4274         * modules/unistr/u8-strtok: New file.
4275         * modules/unistr/u16-strtok: New file.
4276         * modules/unistr/u32-strtok: New file.
4277         * lib/unistr/u8-strtok.c: New file.
4278         * lib/unistr/u16-strtok.c: New file.
4279         * lib/unistr/u32-strtok.c: New file.
4280         * lib/unistr/u-strtok.h: New file.
4281
4282         * modules/unistr/u8-uctomb: New file.
4283         * modules/unistr/u16-uctomb: New file.
4284         * modules/unistr/u32-uctomb: New file.
4285         * lib/unistr/u8-uctomb.c: New file.
4286         * lib/unistr/u16-uctomb.c: New file.
4287         * lib/unistr/u32-uctomb.c: New file.
4288
4289         * MODULES.html.sh (Unicode string functions): Add the new modules.
4290
4291 2007-01-08  Bruno Haible  <bruno@clisp.org>
4292
4293         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
4294         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
4295         subdirectories.
4296
4297 2007-01-08  Karl Berry  <karl@gnu.org>
4298
4299         * doc/error.texi: mention that main() fns must set program_name
4300         when progname is used.
4301
4302 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
4303
4304         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
4305         WCTYPE_H is empty, for the benefit of builds from non-distclean
4306         directories.  Problem reported by Eric Blake in
4307         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
4308
4309 2007-01-08  Bruno Haible  <bruno@clisp.org>
4310
4311         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
4312         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
4313         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
4314         PROVIDE_CANONICALIZE_FILENAME_MODE.
4315         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
4316
4317 2007-01-08  Bruno Haible  <bruno@clisp.org>
4318
4319         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
4320         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
4321         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
4322         * lib/fts.c: Likewise.
4323         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
4324
4325 2006-12-25  Bruno Haible  <bruno@clisp.org>
4326
4327         * modules/utf8-ucs4-safe: New file.
4328         * lib/utf8-ucs4-safe.h: New file.
4329         * lib/unistr/utf8-ucs4-safe.c: New file.
4330
4331         * modules/utf16-ucs4-safe: New file.
4332         * lib/utf16-ucs4-safe.h: New file.
4333         * lib/unistr/utf16-ucs4-safe.c: New file.
4334
4335         * MODULES.html.sh (Unicode string functions): Add the new modules.
4336
4337 2007-01-08  Bruno Haible  <bruno@clisp.org>
4338
4339         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
4340         (Depends-on): Add unitypes.
4341         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
4342         (u8_mbtouc_aux): Move out to separate file.
4343         (u8_mbtouc): Use ucs4_t, uint8_t types.
4344         * lib/unistr/utf8-ucs4.c: New file.
4345
4346         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
4347         (Depends-on): Add unitypes.
4348         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
4349         (u16_mbtouc_aux): Move out to separate file.
4350         (u16_mbtouc): Use ucs4_t, uint16_t types.
4351         * lib/unistr/utf16-ucs4.c: New file.
4352
4353         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
4354         (Depends-on): Add unitypes.
4355         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
4356         (u8_uctomb_aux): Move out to separate file.
4357         (u8_uctomb): Use ucs4_t, uint8_t types.
4358         * lib/unistr/ucs4-utf8.c: New file.
4359
4360         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
4361         (Depends-on): Add unitypes.
4362         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
4363         (u16_uctomb_aux): Move out to separate file.
4364         (u16_uctomb): Use ucs4_t, uint16_t types.
4365         * lib/unistr/ucs4-utf16.c: New file.
4366
4367 2006-12-25  Bruno Haible  <bruno@clisp.org>
4368
4369         * modules/unitypes: New file.
4370         * lib/unitypes.h: New file.
4371         * MODULES.html.sh (func_all_modules): New section "Unicode string
4372         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
4373         this section. Add unitypes.
4374
4375 2007-01-08  Bruno Haible  <bruno@clisp.org>
4376
4377         Avoid variable names that conflict with those from libtool.
4378         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
4379         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
4380         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
4381         library_names_spec to acl_library_names_spec, hardcode_* to
4382         acl_hardcode_*.
4383         Reported by Ralf Wildenhues.
4384
4385 2007-01-08  Bruno Haible  <bruno@clisp.org>
4386
4387         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
4388         definition.
4389         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
4390         definition.
4391         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
4392         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
4393         definition.
4394         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
4395         definition.
4396         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
4397         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
4398         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
4399         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
4400         definition.
4401         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
4402         definition.
4403         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
4404         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
4405         GC_USE_<algorithm>.
4406         * lib/gc-libgcrypt.c: Likewise.
4407         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
4408         * modules/gc-arctwo (configure.ac): Likewise.
4409         * modules/gc-des (configure.ac): Likewise.
4410         * modules/gc-hmac-md5 (configure.ac): Likewise.
4411         * modules/gc-hmac-sha1 (configure.ac): Likewise.
4412         * modules/gc-md2 (configure.ac): Likewise.
4413         * modules/gc-md4 (configure.ac): Likewise.
4414         * modules/gc-md5 (configure.ac): Likewise.
4415         * modules/gc-random (configure.ac): Likewise.
4416         * modules/gc-rijndael (configure.ac): Likewise.
4417         * modules/gc-sha1 (configure.ac): Likewise.
4418
4419 2007-01-08  Bruno Haible  <bruno@clisp.org>
4420
4421         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
4422         macro definition.
4423         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
4424         definition.
4425         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
4426         definition.
4427         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
4428         * modules/fcntl-safer (configure.ac): Likewise.
4429         * modules/fopen-safer (configure.ac): Likewise.
4430         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
4431         GNULIB_FWRITEERROR macro definition.
4432
4433 2007-01-08  Bruno Haible  <bruno@clisp.org>
4434
4435         * m4/gnulib-common.m4: New file.
4436         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
4437         (func_get_filelist): Add m4/gnulib-common.m4.
4438
4439 2007-01-08  Bruno Haible  <bruno@clisp.org>
4440
4441         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
4442         command.
4443
4444 2007-01-08  Jim Meyering  <jim@meyering.net>
4445
4446         Use a more robust test for a "can't happen" condition.
4447         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
4448         narrowed the st_size value.  Presuming the "can't happen" condition
4449         is true, that narrowing could conceivably convert an invalid st_size
4450         value into a valid one.  Instead, use a change based on Matthew
4451         Woehlke's original patch.
4452
4453         Slight readability improvement: use an assert-like macro
4454         in place of literal "abort ()" uses.
4455         * lib/fts.c (fts_assert): Define.
4456         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
4457         Use this macro instead of a bare 'abort'.
4458
4459 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
4460
4461         Don't worry about using IRIX 5.3's wctype.h broken definitions;
4462         simply work around them.
4463         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
4464         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
4465         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
4466         declaring.
4467         Don't bother to define as macros, since the standard doesn't require it.
4468         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
4469         longer worry about IRIX 5.3.
4470         (HAVE_WCTYPE_CTMP_BUG): Remove.
4471
4472 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
4473
4474         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
4475         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
4476         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
4477         Problems reported by Georg Schwarz for IRIX 5.3.
4478
4479         * gnulib-tool (autoconf_minversion): Take the maximum version number
4480         found, not the minimum.  Problem reported by James Youngman.
4481
4482 2007-01-03  Karl Berry  <karl@gnu.org>
4483
4484         * doc/error.texi: new file, explaining interaction with progname.
4485         * doc/gnulib.texi: include it.  Update copyright.
4486
4487 2007-01-03  Simon Josefsson  <simon@josefsson.org>
4488
4489         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
4490         AC_CANONICAL_HOST, to improve autobuild outputs.
4491
4492 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
4493             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
4494
4495         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
4496         sockets, server sockets, and other file descriptors.  Count errors
4497         to compute the return value.  Reorder the code a bit to be easier
4498         to follow.  Don't set event bits that were not requested (except
4499         POLLERR and POLLHUP).
4500
4501 2007-01-01  Bruno Haible  <bruno@clisp.org>
4502
4503         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
4504
4505 2007-01-03  Jim Meyering  <jim@meyering.net>
4506
4507         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
4508
4509 2007-01-02  Bruno Haible  <bruno@clisp.org>
4510
4511         * modules/settime (Include): Require timespec.h.
4512         * modules/nanosleep (Include): Likewise.
4513
4514 2007-01-01  Bruno Haible  <bruno@clisp.org>
4515
4516         * gnulib-tool (func_emit_copyright_notice): Bump year.
4517         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
4518
4519 2007-01-01  Bruno Haible  <bruno@clisp.org>
4520
4521         Improve support for OpenBSD.
4522         * build-aux/config.rpath (libname_spec): Export.
4523         (library_names_spec): New variable. Export.
4524         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
4525         library_names_spec from the config.rpath output. Locate shared library
4526         through the name pattern in library_names_spec.
4527
4528 2007-01-01  Eric Blake  <ebb9@byu.net>
4529
4530         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
4531
4532 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
4533
4534         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
4535         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
4536         assume the C locale, and avoid an "eval" that could cause trouble.
4537         Problem with SORT reported by Bob Proulx.
4538
4539         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
4540         Define.  Trivial patch from Henning Nielsen Lund, originally
4541         sent to bug-grep@gnu.org today.
4542
4543 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
4544
4545         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
4546         struct stat.  Problem reported by Henning Nielsen Lund.
4547         * lib/acl.c: Include acl.h first, to check interface.  Don't
4548         bother to include sys/types.h and sys/stat.h again.
4549
4550 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
4551
4552         Import the following change from libc; problem reported by
4553         Sven Verdoolaege.
4554
4555         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
4556
4557         [BZ #1373]
4558         * lib/argp.h: Remove __NTH for __argp_usage inline function.
4559
4560 2006-12-28  Jim Meyering  <jim@meyering.net>
4561
4562         * build-aux/announce-gen: Do not assume that the package
4563         builds any of tar.gz, tar.bz2, and .xdelta files.
4564         Suggestion from Simon Josefsson.
4565
4566 2006-12-28  Simon Josefsson  <simon@josefsson.org>
4567
4568         * modules/announce-gen: New file.
4569
4570 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
4571
4572         * lib/mbchar.h: Just include <wctype.h>; the wctype module
4573         handles its gotchas now.
4574         * lib/mbswidth.c: Likewise.
4575         * lib/wcwidth.h: Likewise.
4576         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
4577         and iswcntrl; the wctype module does this stuff now.
4578         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4579         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
4580         * modules/mbchar (Depends-on): Add wctype.
4581         * modules/mbswidth (Depends-on): Likewise.
4582         * modules/wcwidth (Depends-on): Likewise.
4583
4584 2006-12-27  Eric Blake  <ebb9@byu.net>
4585
4586         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
4587         module uses more than what <wctype.h> is required to provide.
4588
4589 2006-12-26  Eric Blake  <ebb9@byu.net>
4590
4591         * gnulib-tool (sed_extract_prog): Avoid space-tab.
4592
4593 2006-12-26  Eric Blake  <ebb9@byu.net>
4594
4595         * modules/absolute-header: New module.
4596         * modules/fcntl (Depends-on): Depend on it.
4597         * modules/inttypes (Depends-on): Likewise.
4598         * modules/stdint (Depends-on): Likewise.
4599         * modules/sys_stat (Depends-on): Likewise.
4600         * modules/wctype (Depends-on): Likewise.
4601         * MODULES.html.sh (Support for building libraries and
4602         executables): Document it.
4603
4604 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
4605
4606         * gnulib-tool (SED): Remove, undoing previous change.
4607         The problem was that it broke coreutils on Solaris, because
4608         "sed --posix" leaked into a makefile.
4609         (sed): New alias, if 'alias' and GNU sed.
4610
4611 2006-12-24  Jim Meyering  <jim@meyering.net>
4612
4613         Work around an fchownat bug in glibc-2.4:
4614         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
4615         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
4616         in spite of the -P option.
4617         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
4618         New macros.
4619         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
4620         * modules/openat (Files): Add lib/fchownat.c.
4621         * lib/openat.c (fchownat): Don't define here.  Move to...
4622         * lib/fchownat.c: ...this new file.
4623
4624 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
4625
4626         Fix bug reported by Bruno Haible in
4627         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
4628         where quotearg.c didn't compile on Mac OS X 10.2 because it
4629         lacks <wchar.h> and wint_t.
4630         * lib/wctype_.h (__wctype_wint_t): New type.
4631         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
4632         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
4633         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
4634         Arg is now of type __wctype_wint_t, not wint_t.
4635         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
4636         substitute HAVE_WINT_T.
4637         * modules/wctype (Files): Add m4/wint_t.m4.
4638         (wctype.h): Substitute HAVE_WINT_T.
4639
4640 2006-12-23  Bruno Haible  <bruno@clisp.org>
4641
4642         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
4643
4644 2006-12-23  Bruno Haible  <bruno@clisp.org>
4645
4646         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
4647         S_ISLNK.
4648         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
4649         mingw.
4650
4651 2006-12-22  Bruno Haible  <bruno@clisp.org>
4652
4653         * lib/copy-file.c: Include acl.h.
4654         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
4655         Close the file descriptors only after being done with copy_acl.
4656         * modules/copy-file (Depends-on): Add acl.
4657
4658 2006-12-22  Bruno Haible  <bruno@clisp.org>
4659
4660         * gnulib-tool (SED): New variable.
4661         Use $SED instead of sed everywhere.
4662
4663 2006-12-22  Bruno Haible  <bruno@clisp.org>
4664
4665         * modules/no-c++: New file.
4666         * m4/no-c++.m4: New file.
4667         * MODULES.html.sh (Support for building libraries and executables):
4668         Add no-c++.
4669
4670 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
4671
4672         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4673         Include <limits.h>, and use its INT_MAX to rewrite the
4674         j loop so that it does not overflow 'int'.  Problem reported by
4675         Ralf Wildenhues in
4676         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
4677         Play it safe by shifting left by 1 rather than multiplying by 2,
4678         as GCC is less likely to optimize this away when the value
4679         is signed (when it assumes overflow leads to undefined behavior).
4680         Also, don't assume time_t uses two's complement.
4681
4682 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
4683
4684         * MODULES.html.sh: New module wctype.
4685         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
4686         * lib/fnmatch.c: Don't bother to include <wchar.h> before
4687         <wctype.h>, since the new wctype module should fix this.
4688         * lib/quotearg.c: Include <wctype.h> unconditionally, since
4689         the wctype module should arrange for it.
4690         * lib/regex_internal.h: Likewise.
4691         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
4692         since the wctype module should handle this now.
4693         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
4694         * modules/fnmatch (Depends-on): Add wctype.
4695         * modules/quotearg (Depends-on): Likewise.
4696         * modules/regex (Depends-on): Likewise.
4697
4698 2006-12-19  Bruno Haible  <bruno@clisp.org>
4699
4700         * lib/strdup.h [C++]: Wrap definitions in extern "C".
4701         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
4702
4703 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4704
4705         * modules/savewd (Depends-on): Fix dependency on fcntl.
4706
4707 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
4708
4709         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
4710         conforms to C99, rather than relying on the user's environment
4711         setting of STDINT_H.
4712
4713 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
4714         and Eric Blake  <ebb9@byu.net>
4715
4716         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
4717         This is more consistent with the other defines here.
4718         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
4719         Port to z/OS.  Problem reported by Paul Gilmartin.
4720         Change local vars to use gl_ prefix rather than ac_.
4721         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
4722         with other defines.
4723         * modules/double-slash-root: New module.
4724         * modules/dirname (Files): Remove m4/double-slash-root.m4.
4725         (Depends-on): Add double-slash-root.
4726         * MODULES.html.sh (File system functions): Mention new module.
4727
4728 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
4729
4730         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
4731         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
4732         This is for the benefit of gzip, which doesn't do i18n.
4733
4734 2006-12-12  Jim Meyering  <jim@meyering.net>
4735
4736         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
4737         Reported by Andreas Schwab <schwab@suse.de>.
4738
4739 2006-12-12  Bruno Haible  <bruno@clisp.org>
4740
4741         Merge these changes.
4742         2006-09-05  Bruno Haible  <bruno@clisp.org>
4743         * lib/iconvme.c (iconv_string): No need to save and restore errno when
4744         iconv_alloc succeeded.
4745         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
4746         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
4747         test for " && dest " at the end - dest is always != NULL there. Call
4748         iconv with 4xNULL arguments initially, to reset the state. Call iconv
4749         with 2xNULL arguments, also to flush the state storage. Handle the
4750         IRIX iconv behaviour. Realloc the final result, to throw away unused
4751         memory.
4752
4753 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
4754
4755         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
4756         and fchmodat unconditionally, since glibc 2.4 has them.
4757         Problem reported by Arkadiusz Miskiewicz.
4758
4759 2006-12-10  Bruno Haible  <bruno@clisp.org>
4760
4761         * gnulib-tool (func_import): Show the include files only for those
4762         modules that are copied and specified.
4763         Reported by Karl Berry.
4764
4765 2006-12-08  Jim Meyering  <jim@meyering.net>
4766
4767         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
4768         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
4769
4770         * build-aux/announce-gen: Add two new options, both optional:
4771         --bootstrap-tools=TOOL_LIST
4772               a comma-separated list of tools, e.g.,
4773               autoconf,automake,bison,gnulib
4774         --gnulib-snapshot-date=DATE
4775               if gnulib is in the bootstrap tool list,
4776               then report this as the snapshot date.
4777               If not specified, use the current date/time.
4778               If you specify a date here, be sure it's UTC.
4779
4780 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4781
4782         * tests/test-argp-2.sh: Fix test to match actual output.
4783         (func_compare): Fix sed script to be portable.
4784
4785 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
4786
4787         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
4788         workaround for this case.  It is not autoconfigured now; offhand
4789         it's hard to see how to autoconfigure it.
4790
4791 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
4792
4793         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
4794         a directory that is about to be chowned.  Such a directory's
4795         initial file permissions should permit the owner only and this
4796         should not be changed until after the chown, since the group and
4797         other bits would be incorrect if they granted permission before
4798         the chown.
4799
4800         Fix porting problem for iswctype reported by Georg Schwarz in:
4801         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
4802         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
4803         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
4804         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
4805         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
4806
4807 2006-12-03  Jim Meyering  <jim@meyering.net>
4808
4809         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
4810         p->fts_statp may not yet be defined.
4811         (fts_read): Instead, set it in the caller, once p->fts_statp is
4812         sure to be defined, and corresponds to a top-level directory.
4813         This bug made du -x fail.  Here's the coreutils test case:
4814         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
4815         Reported by Mike Frysinger.
4816
4817 2006-12-01  Jim Meyering  <jim@meyering.net>
4818
4819         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
4820         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
4821         Reported by Simon Josefsson.
4822
4823 2006-11-30  Jim Meyering  <jim@meyering.net>
4824
4825         * m4/warning.m4: Use the all-permissive copyright notice
4826         recommended by RMS (rather than LGPL).
4827         * m4/vararrays.m4: Likewise.
4828         * m4/flexmember.m4: Likewise.
4829
4830 2006-11-29  Bruno Haible  <bruno@clisp.org>
4831
4832         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4833         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
4834         using +=.
4835         Reported by Simon Josefsson <simon@josefsson.org>.
4836
4837 2006-11-28  James Youngman <jay@gnu.org>
4838
4839         * README: Advise users that they might find the bug-gnulib@gnu.org
4840         and autotools-announce@gnu.org mailing lists useful.
4841
4842 2006-11-28  Bruno Haible  <bruno@clisp.org>
4843
4844         * m4/ptrdiff_max.m4: Remove file.
4845
4846 2006-11-21  Bruno Haible  <bruno@clisp.org>
4847
4848         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
4849         _AC_COMPUTE_INT.
4850         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4851         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
4852         _AC_COMPUTE_INT.
4853         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4854         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
4855         _AC_COMPUTE_INT.
4856         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4857
4858 2006-11-28  Jim Meyering  <jim@meyering.net>
4859
4860         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
4861         warning from "gcc -Wshadow" about shadowing the builtin.
4862
4863 2006-11-27  Bruno Haible  <bruno@clisp.org>
4864
4865         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
4866         _AC_COMPUTE_INT.
4867         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4868
4869 2006-11-27  Bruno Haible  <bruno@clisp.org>
4870             Paul Eggert  <eggert@cs.ucla.edu>
4871
4872         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
4873
4874 2006-11-26  Bruno Haible  <bruno@clisp.org>
4875
4876         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4877         noinst_LTLIBRARIES.
4878
4879 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
4880             Bruno Haible  <bruno@clisp.org>
4881
4882         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
4883         if compiling with "gcc -ansi".
4884
4885 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
4886
4887         Fix some incompatibilities with gcc -ansi -pedantic.
4888         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
4889         if compiling pedantically with GCC, unless it's C99 or later.
4890         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
4891         it mishandles gcc -ansi -pedantic as well.
4892         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
4893         if gcc -pedantic.
4894         * lib/regexec.c (check_node_accept_bytes): Don't use auto
4895         initializers for struct if -pedantic, unless it's C99 or later.
4896
4897 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
4898
4899         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
4900         Don't close an fd more than once. Identical atimes indicate
4901         success, not failure.
4902
4903 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
4904
4905         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
4906
4907 2006-11-23  Jim Meyering  <jim@meyering.net>
4908
4909         * build-aux/announce-gen: New file.  From coreutils.
4910
4911 2006-11-22  Jim Meyering  <jim@meyering.net>
4912
4913         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
4914         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
4915         (fts_read): Use a temporary to narrow the overused st_size member
4916         before using it in a switch statement.  Reported by Matthew Woehlke.
4917
4918         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
4919         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
4920
4921 2006-11-20  Bruno Haible  <bruno@clisp.org>
4922
4923         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
4924         changequote instead of pairs of brackets.
4925         Reported by Andreas Schwab <schwab@suse.de>.
4926
4927 2006-11-21  Jim Meyering  <jim@meyering.net>
4928
4929         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
4930         so as to remain compatible with older compilers.
4931         Patch from Michael Deutschmann.
4932
4933 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
4934
4935         * MODULES.html.sh (File system functions): Add openat.
4936
4937         * lib/openat.h (rpl_fstatat): New macro, if
4938         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
4939         (fstatat): Define to rpl_fstatat under the same conditions,
4940         unless COMPILING_FSTATAT.
4941         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
4942         seems to have the bug.
4943         * lib/fstatat.c: New file.
4944         * modules/openat (Files): Add it.
4945
4946 2006-11-20  Bruno Haible  <bruno@clisp.org>
4947
4948         * Makefile: New file.
4949
4950 2006-11-20  Jim Meyering  <jim@meyering.net>
4951
4952         The beginnings of syntax-related checks for gnulib.
4953         * lib/Makefile: New file.
4954         * lib/t-idcache: New script.  Ensure that the two halves of
4955         idcache.c stay in sync.
4956
4957         * lib/idcache.c: Adjust comments in user- and group- portions to
4958         be more accurate, and to be consistent with one another.
4959
4960 2006-11-20  Jim Meyering  <jim@meyering.net>
4961
4962         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
4963         continue using the flexible array member (thus, this module performs
4964         half as many malloc calls), with the addition that...
4965         (getgroup, getuser): Consistently record a non-match via an empty
4966         "name" string, and map an empty string match to a NULL return value.
4967         * modules/idcache (Depends-on): Re-add flexmember.
4968
4969         * lib/idcache.c (getuser): Remove all uses of the register keyword.
4970         (getuidbyname, getgroup, getgidbyname): Likewise.
4971
4972         Use cleaner syntax: NULL rather than 0.
4973         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
4974
4975 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
4976
4977         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
4978         It mishandled the case where the group was missing.
4979         Problem reported by Greg Schafer.
4980         * modules/idcache: Likewise.
4981
4982 2006-11-18  Jim Meyering  <jim@meyering.net>
4983
4984         * check-module (%exempt_header): Add exception for some
4985         conditionally-included headers.
4986
4987         * modules/i-ring (Depends-on): Add verify.
4988         (License): Change to LGPL.
4989
4990 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
4991
4992         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
4993         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
4994         and inttostr.h.  Use snprintf rather than uinttostr, so that
4995         LGPLed code doesn't depend on GPLed.
4996
4997 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
4998
4999         * modules/inline (License): Change from GPL to LGPL.
5000
5001 2006-11-17  Jim Meyering  <jim@meyering.net>
5002
5003         * modules/d-type (License): Switch to LGPL.
5004
5005 2006-11-15  Bruno Haible  <bruno@clisp.org>
5006
5007         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
5008
5009 2006-11-15  Eric Blake  <ebb9@byu.net>
5010
5011         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
5012         the module dependency.
5013
5014 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5015             Bruno Haible  <bruno@clisp.org>
5016
5017         * gnulib-tool (func_create_testdir): Add license consistency check.
5018
5019 2006-11-15  Eric Blake  <ebb9@byu.net>
5020
5021         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
5022         random "(cached)" in configure output.
5023
5024 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5025
5026         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
5027         test for conforming inttypes.h is both announced and cached.
5028
5029         * MODULES.html.sh (seen_modules, seen_files): New variables.
5030         (func_module): Rewrite to use a few less gnulib-tool and sed
5031         invocations.  Avoid a couple of quadratic algorithms for ...
5032         (missed_modules, missed_files): ... these, with ...
5033         (func_append, func_tmpdir): ... these new functions, from
5034         gnulib-tool.  Analogously, install traps for cleanup.
5035
5036         * tests/test-gc.c (main): Remove unused variables.
5037         * tests/test-read-file.c: Include stdlib.h, for 'free'.
5038
5039 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
5040
5041         * modules/inttostr (License): Change to LGPL.
5042
5043 2006-11-14  Eric Blake  <ebb9@byu.net>
5044
5045         * modules/tempname (License): Change to LGPL.
5046
5047 2006-11-14  Eric Blake  <ebb9@byu.net>
5048
5049         * doc/functions.texi (Function Portability): *printf functions on
5050         Cygwin now understand all POSIX size specifiers.
5051
5052 2006-11-14  Bruno Haible  <bruno@clisp.org>
5053
5054         * modules/c-ctype (License): Change to LGPL.
5055
5056 2006-11-12  Bruno Haible  <bruno@clisp.org>
5057
5058         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
5059         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
5060         for GNOME libraries, for which the include files are installed in
5061         subdirectories of $prefix/include.
5062
5063 2006-11-12  Bruno Haible  <bruno@clisp.org>
5064
5065         * m4/lib-link.m4: Require at least autoconf-2.54.
5066         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
5067         name to underscores for the --with option.
5068
5069 2006-11-13  Bruno Haible  <bruno@clisp.org>
5070
5071         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
5072         the tests directory.
5073         Reported by Ralf Wildenhues.
5074
5075 2006-11-13  Bruno Haible  <bruno@clisp.org>
5076
5077         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
5078         (func_emit_initmacro_end): Undo the override here.
5079         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
5080         Works around the famous automake error in coreutils.
5081
5082 2006-11-13  Eric Blake  <ebb9@byu.net>
5083
5084         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
5085         element, not its node.
5086
5087 2006-11-12  Bruno Haible  <bruno@clisp.org>
5088
5089         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
5090         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
5091
5092 2006-11-12  Bruno Haible  <bruno@clisp.org>
5093
5094         * gnulib-tool: New option --local-symlink.
5095         (func_usage): Document it.
5096         (lsymbolic): New variable.
5097         (func_import, func_create_testdir): If --symlink was not specified,
5098         test whether --local-symlink was specified and the file comes from
5099         the local_gnulib_dir.
5100
5101 2006-11-12  Bruno Haible  <bruno@clisp.org>
5102
5103         * gnulib-tool (func_ln): New function.
5104         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
5105
5106 2006-11-12  Bruno Haible  <bruno@clisp.org>
5107
5108         Finish support for source files in subdirectories.
5109         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
5110         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
5111         AUTOMAKE_OPTIONS.
5112         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
5113
5114 2006-11-12  Bruno Haible  <bruno@clisp.org>
5115
5116         * gnulib-tool (func_get_automake_snippet): Synthesize also an
5117         EXTRA_lib_SOURCES augmentation.
5118         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
5119
5120 2006-11-12  Jim Meyering  <jim@meyering.net>
5121
5122         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
5123         file descriptors.  This also averts a failure on systems with
5124         native openat support when a traversed directory lacks "x" access.
5125         * lib/fts_.h: Include "i-ring.h"
5126         (struct FTS) [fts_fd_ring]: New member.
5127         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
5128         (FCHDIR): Add parentheses.
5129         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
5130         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
5131         When descending, rather than simply closing the previous
5132         fts_cwd_fd value, push that file descriptor onto the ring.
5133         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
5134         (fts_open): Initialize the new fd_ring member.
5135         (fts_close): Clear the ring.
5136         (fts_safe_changedir): When possible, use our new fd_ring to skip
5137         the diropen and fstat and dev/ino comparison that would normally
5138         accompany a virtual `chdir ("..")'.
5139
5140         * modules/fts (Depends-on): Add i-ring.
5141         * modules/i-ring: New module.
5142         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
5143         * m4/i-ring.m4: New file.
5144
5145 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5146
5147         * gnulib-tool (func_create_testdir): Fix replacement of
5148         `build-aux' in configure.ac.  Run autotools in gltests
5149         subdirectory.
5150         (func_create_testdir, func_create_megatestdir, test): There is
5151         no need for '--force' in most autotool invocations in a new
5152         tree.  Actually fail the whole test if any of the tools, or the
5153         configure or make stages fail.
5154
5155         Sync from Automake.
5156         * build-aux/gnupload: Revert last change.  Add pointer to upload
5157         instructions of the GNU Maintenance Instructions.
5158         Suggestion by Karl Berry.
5159
5160 2006-11-10  Jim Meyering  <jim@meyering.net>
5161
5162         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
5163
5164 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
5165
5166         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
5167         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
5168         (bind_textdomain_codeset) [! ENABLE_NLS]:
5169         Evaluate all the arguments.  That way, callers get compatible behavior
5170         if the arguments have side effects.  Also, it avoids some GCC
5171         diagnostics in some cases; Joel E. Denny reported problems when Bison
5172         was configured with --enable-gcc-warnigs.
5173
5174 2006-11-10  Jim Meyering  <jim@meyering.net>
5175
5176         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
5177         relevant options in CFLAGS (like -O, -fno-inline) are taken into
5178         account.
5179
5180 2006-11-10  Jim Meyering  <jim@meyering.net>
5181
5182         * modules/inline: New file/module.
5183         * modules/xalloc (Files): Remove m4/inline.m4.
5184         (Depends-on): Add inline, instead.
5185         * modules/oset: Likewise.
5186         * modules/list: Likewise.
5187
5188 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
5189
5190         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
5191         Problem reported by Matthew Woehlke.
5192
5193 2006-11-09  Bruno Haible  <bruno@clisp.org>
5194
5195         * lib/tempname.c (gen_tempname): Remove variant that invokes
5196         __gen_tempname.
5197         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
5198         __gen_tempname.
5199
5200 2006-11-08  Bruno Haible  <bruno@clisp.org>
5201
5202         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
5203         to 'yes' instead of 'cross-compiling'.
5204
5205 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
5206
5207         * lib/quotearg.h (quotearg_free): New decl.
5208         * lib/quotearg.c (quotearg_free): New function.
5209         (slot0, nslots, slotvec0, slotvec):
5210         Now file-scope so that quotearg_free can get at them.
5211
5212 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5213
5214         Sync from Automake.
5215         * build-aux/gnupload: Add missing 'gnu' to example URL.
5216         Report by Karl Berry.
5217
5218 2006-11-08  Bruno Haible  <bruno@clisp.org>
5219
5220         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
5221         Suggested by Paul Eggert.
5222
5223 2006-11-08  Jim Meyering  <jim@meyering.net>
5224
5225         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
5226         It's already included if !_LIBC.
5227         (fts_safe_changedir): Add a comment.
5228
5229 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
5230
5231         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
5232         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
5233         Matthew Woehlke.
5234
5235         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
5236         definitions up, to avoid colliding with change below.
5237         (static_inline) [HAVE_INLINE]: New macro.
5238         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
5239         Provide extern decls when !HAVE_INLINE.  Do not define unless
5240         static_inline is defined, either by us or by xmalloc.c.  Use
5241         static_inline rather than static inline.
5242         (XCALLOC): Optimize sizeof(T) = 1 case.
5243         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
5244
5245 2006-11-07  Bruno Haible  <bruno@clisp.org>
5246
5247         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
5248         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
5249         AC_C_INLINE.
5250         * modules/xalloc (Files): Add m4/inline.m4.
5251
5252 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5253
5254         * README: Fix typo.
5255         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
5256         (Miscellanous Notes): ...from this.
5257
5258 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
5259
5260         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
5261         Mention that offsetof should be used instead of sizeof.
5262         From Bruno Haible.
5263
5264 2006-11-07  Bruno Haible  <bruno@clisp.org>
5265
5266         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
5267
5268 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
5269
5270         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
5271         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
5272         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
5273         (gl_tree_add_before, gl_tree_add_after):
5274         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
5275         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
5276         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
5277         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
5278         (gl_linked_add_after, gl_linked_add_at): Likewise.
5279         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
5280         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
5281         (gl_tree_add_before, gl_tree_add_after): Likewise.
5282         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
5283         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
5284         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
5285
5286 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5287
5288         * lib/gl_oset.h: Use C comment style, not C++ comment style.
5289
5290 2006-11-06  Bruno Haible  <bruno@clisp.org>
5291
5292         * m4/inline.m4: New file.
5293         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
5294         * modules/list (Files): Add m4/inline.m4.
5295         * modules/oset (Files): Likewise.
5296
5297 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
5298
5299         * lib/idcache.c: Include <stddef.h>, for offsetof.
5300         (struct userid.name): Change from char * to a flexible array member.
5301         All uses changed.
5302         * modules/idcache (Depends-on): Add flexmember.
5303
5304         * MODULES.html.sh (Core language properties): New module flexmember.
5305         * modules/flexmember, m4/flexmember.m4: New files.
5306
5307         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
5308         inline functions that are identical with the old xnmalloc_inline,
5309         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
5310         that we can avoid some unnecessary integer multiplications and
5311         divisions in the common case where the element size is known at
5312         compile time.
5313         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
5314         needed.
5315         (xnboundedmalloc): Remove.
5316         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
5317         arguments, for consistency with rest of this header.
5318         (xcharalloc): Rewrite using XNMALLOC.
5319         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
5320         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
5321         versions have been moved to lib/xalloc.h and renamed to be the
5322         non-*_inline versions.
5323         (xmalloc, xrealloc): Implement without reference to the xnmalloc
5324         and xnrealloc functions, since those functions are now inline and
5325         now call us.
5326         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
5327         renaming described above.
5328         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
5329         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
5330         captures the dependency in AC_C_INLINE.
5331
5332         New module canonicalize-lgpl, proposed by Charles Wilson in
5333         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
5334         with a few small changes afterwards.
5335         * MODULES.html.sh (File system functions): New module
5336         canonicalize-lgpl.
5337         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
5338         and canonicalize_file_name.
5339         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
5340         * modules/canonicalize-lgpl: New files.
5341
5342 2006-11-05  Bruno Haible  <bruno@clisp.org>
5343
5344         * gnulib-tool (func_import, func_create_testdir): Create directories
5345         also for files in subdirectories of lib/.
5346
5347 2006-11-05  Bruno Haible  <bruno@clisp.org>
5348
5349         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
5350         ANSI C compliant.
5351
5352 2006-11-03  Bruno Haible  <bruno@clisp.org>
5353
5354         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
5355         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
5356         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
5357         (xnboundedmalloc): New inline function.
5358         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
5359         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
5360         xmalloc.
5361         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
5362         xmalloc.
5363         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
5364         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
5365         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
5366         xmalloc.
5367         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
5368         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
5369         xmalloc.
5370         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
5371         gl_tree_add_after): Use XMALLOC instead of xmalloc.
5372         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
5373         xmalloc.
5374         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
5375         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
5376         gl_tree_add_after): Use XMALLOC instead of xmalloc.
5377         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
5378         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
5379         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
5380         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
5381
5382 2006-11-03  Bruno Haible  <bruno@clisp.org>
5383
5384         * lib/c-ctype.h [C++]: Define functions without name mangling.
5385         * lib/fwriteerror.h [C++]: Likewise.
5386         * lib/gcd.h [C++]: Likewise.
5387         * lib/linebreak.h [C++]: Likewise.
5388
5389 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
5390
5391         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
5392         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
5393         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
5394         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5395         Check for functions and headers just once.
5396         Check for declaration of canonicalize_file_name.
5397         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
5398
5399 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5400
5401         * gnulib-tool (func_import): Fix typo in actioncmd.
5402
5403 2006-11-02  Bruno Haible  <bruno@clisp.org>
5404
5405         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
5406         newline sequence in the Makefile.am snippet as a space, like "make"
5407         does.
5408         Reported by Roger Persson <perrog@gmail.com>.
5409
5410 2006-11-01  Bruno Haible  <bruno@clisp.org>
5411
5412         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
5413         already declared in <string.h>.
5414         * lib/strcase.h (strncasecmp): Don't declare it if yes.
5415
5416 2006-11-01  Bruno Haible  <bruno@clisp.org>
5417
5418         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
5419         * lib/strcase.h: Include <string.h>.
5420         (strcasecmp): Define to rpl_strcasecmp here.
5421
5422 2006-11-01  Bruno Haible  <bruno@clisp.org>
5423
5424         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
5425
5426 2006-11-01  Eric Blake  <ebb9@byu.net>
5427
5428         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
5429
5430         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
5431
5432 2006-10-29  Bruno Haible  <bruno@clisp.org>
5433
5434         Make it compile in C++ mode.
5435         * lib/full-write.c (full_rw): Add a cast.
5436
5437 2006-11-01  Bruno Haible  <bruno@clisp.org>
5438
5439         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
5440         be POSIX compliant.
5441         Reported by Roger Persson <perrog@gmail.com>.
5442
5443 2006-11-01  Eric Blake  <ebb9@byu.net>
5444
5445         * lib/getopt_.h: Fix comments.
5446
5447 2006-10-31  Eric Blake  <ebb9@byu.net>
5448
5449         * modules/tmpdir (Depends-on): Add sys_stat.
5450         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
5451         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
5452         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
5453         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
5454         tempname.
5455
5456 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
5457
5458         Avoid some C++ diagnostics reported by Bruno Haible.
5459         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
5460         xmalloc.
5461         (quotearg_alloc): Use xcharalloc rather than xmalloc.
5462         (struct slotvec): Move to top level.
5463         (quotearg_n_options): Rewrite to avoid xmalloc.
5464         * lib/xalloc.h (xcharalloc): New function.
5465         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
5466         [defined __cplusplus]: Add function template that provides result
5467         type propagation.  This part of the change is from Bruno Haible.
5468
5469 2006-10-29  Bruno Haible  <bruno@clisp.org>
5470
5471         Make it compile in C++ mode.
5472         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
5473         * lib/strnlen1.c (strnlen1): Cast memchr result.
5474         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
5475         * lib/clean-temp.c (string_equals, string_hash): Add casts.
5476         (create_temp_dir): Rename local variable 'template'.
5477         (compile_csharp_using_sscli): Add cast.
5478         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
5479         * lib/findprog.c (find_in_path): Likewise.
5480         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
5481         * lib/wait-process.c (register_slave_subprocess): Likewise.
5482
5483 2006-10-22  Bruno Haible  <bruno@clisp.org>
5484
5485         * modules/tsearch: New file.
5486         * lib/tsearch.h: New file.
5487         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
5488         * m4/tsearch.m4: New file.
5489         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
5490
5491 2006-10-29  Eric Blake  <ebb9@byu.net>
5492
5493         * lib/arcfour.c: Assume config.h.
5494         * lib/arctwo.c: Likewise.
5495         * lib/base64.c: Likewise.
5496         * lib/check-version.c: Likewise.
5497         * lib/crc.c: Likewise.
5498         * lib/des.c: Likewise.
5499         * lib/gc-gnulib.c: Likewise.
5500         * lib/gc-libgcrypt.c: Likewise.
5501         * lib/gc-pbkdf2-sha1.c: Likewise.
5502         * lib/getaddrinfo.c: Likewise.
5503         * lib/getdelim.c: Likewise.
5504         * lib/getline.c: Likewise.
5505         * lib/hmac-md5.c: Likewise.
5506         * lib/hmac-sha1.c: Likewise.
5507         * lib/iconvme.c: Likewise.
5508         * lib/md2.c: Likewise.
5509         * lib/md4.c: Likewise.
5510         * lib/memxor.c: Likewise.
5511         * lib/read-file.c: Likewise.
5512         * lib/readline.c: Likewise.
5513         * lib/rijndael-alg-fst.c: Likewise.
5514         * lib/rijndael-api-fst.c: Likewise.
5515         * lib/xgetdomainname.c: Likewise.
5516
5517 2006-10-28  Eric Blake  <ebb9@byu.net>
5518
5519         * lib/xstrndup.c: Assume config.h.
5520
5521 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
5522
5523         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
5524         stat-macros.h is now for our own macros, whereas stat_h is for
5525         macros in the <sys/stat.h> name space.
5526         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
5527         (STAT_MACROS_H): Remove.
5528         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
5529         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
5530         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
5531         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
5532         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
5533         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
5534         Move these macros to ...
5535         * lib/stat_.h: here.  Don't include stat-macros.h.
5536         * lib/canonicalize.c: Don't include stat-macros.h.
5537         * lib/chown.c: Likewise.
5538         * lib/euidaccess.c: Likewise.
5539         * lib/file-type.c: Likewise.
5540         * lib/filemode.c: Likewise.
5541         * lib/glob.c: Likewise.
5542         * lib/isapipe.c: Likewise.
5543         * lib/lchown.c: Likewise.
5544         * lib/lstat.c: Likewise.
5545         * lib/mkdir-p.c: Likewise.
5546         * lib/rmdir.c: Likewise.
5547         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
5548         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
5549         unless mkdir isn't declared, to speed up 'configure'.
5550         Always create sys/stat.h, since it's unlikely any real sys/stat.h
5551         would define all the S_* symbols.
5552         * modules/canonicalize (Depends-on):
5553         Depend on sys_stat, not stat-macros.
5554         * modules/chown: Likewise.
5555         * modules/euidaccess: Likewise.
5556         * modules/filemode: Likewise.
5557         * modules/file-type: Likewise.
5558         * modules/glob: Likewise.
5559         * modules/isapipe: Likewise.
5560         * modules/lchown: Likewise.
5561         * modules/lstat: Likewise.
5562         * modules/mkancesdirs: Likewise.
5563         * modules/rmdir: Likewise.
5564         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
5565         * modules/modechange: Likewise.
5566         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
5567         (configure.ac): Remove gl_STAT_MACROS.
5568         * modules/sys_stat (Depends-on): Remove stat-macros.
5569
5570 2006-10-27  Bruno Haible  <bruno@clisp.org>
5571
5572         * m4/signed.m4: Remove file.
5573         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
5574         invocation.
5575         * modules/vasnprintf (Files): Remove m4/signed.m4.
5576
5577 2006-10-27  Bruno Haible  <bruno@clisp.org>
5578
5579         Update to GNU gettext 0.16.
5580         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
5581         m4/inttypes-h.m4, m4/signed.m4.
5582         * m4/gettext.m4: Update to GNU gettext 0.16.
5583         * m4/intl.m4: New file, from GNU gettext.
5584         * m4/intldir.m4: New file, from GNU gettext.
5585         * config/srclist.txt: Update
5586
5587 2006-10-27  Eric Blake  <ebb9@byu.net>
5588
5589         * MODULES.html.sh: Document tempname.
5590         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
5591         dependencies.
5592         (Files): Move lib/tempname.c...
5593         * modules/tempname: ...to this new module.
5594         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
5595         (gl_PREREQ_TEMPNAME): Move...
5596         * m4/tempname.m4: ...to this new file.
5597         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
5598         * modules/sys_stat (Depends-on): Add stat-macros.
5599         * lib/stat_.h (includes): Pick up stat macros.
5600         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
5601         if stat macros are broken.
5602         * lib/tempname.c (includes): No need to include "stat-macros.h".
5603         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
5604         (direxists, __path_search) [!_LIBC]: Don't compile these in
5605         gnulib; the tmpdir module covers that.
5606         * lib/tempname.h: New file.
5607
5608 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
5609
5610         * COPYING: Explain how gnulib-tool converts licence headers.
5611         Almost all wording by Eric Blake.
5612
5613 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
5614
5615         * lib/mbchar.h (is_basic_table): Make read-only.
5616         * lib/mbchar.c (is_basic_table): Likewise.
5617         Reported by John Darrington.
5618
5619 2006-10-25  Bruno Haible  <bruno@clisp.org>
5620
5621         * lib/progname.h (set_program_name): Undefine before defining.
5622
5623 2006-10-25  Bruno Haible  <bruno@clisp.org>
5624
5625         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
5626         false for non-gcc C++ compilers.
5627         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
5628
5629 2006-10-24  Bruno Haible  <bruno@clisp.org>
5630
5631         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
5632         iconv implementations like Irix iconv.
5633
5634 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5635
5636         * modules/vararrays: New file.
5637         * m4/vararrays.m4: New file, taken from diffutils.
5638         * MODULES.html.sh: New module vararrays.
5639
5640 2006-10-24  Karl Berry  <karl@gnu.org>
5641
5642         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
5643         Don't call GNU Unix.
5644
5645 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5646
5647         * users.txt: Add Libtool.
5648
5649         Sync from Libtool:
5650
5651         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5652
5653         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
5654         to gnulib's policy of including config.h unconditionally.
5655
5656 2006-10-24  Bruno Haible  <bruno@clisp.org>
5657
5658         * modules/wcwidth (Files): Add m4/wint_t.m4.
5659         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
5660         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
5661
5662 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5663
5664         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
5665         to pacify GCC with some -W flags enabled.  Problem reported by
5666         Bruno Haible.
5667
5668 2006-10-24  Jim Meyering  <jim@meyering.net>
5669
5670         * MODULES.html.sh: Remove uinttostr.  It's not a module.
5671         Reported by Karl Berry.
5672
5673 2006-10-23  Bruno Haible  <bruno@clisp.org>
5674
5675         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
5676
5677 2006-10-24  Bruno Haible  <bruno@clisp.org>
5678
5679         * lib/gl_list.h: Use C comment style, not C++ comment style.
5680
5681 2006-10-23  Eric Blake  <ebb9@byu.net>
5682
5683         * lib/getaddrinfo.c (includes): Add missing include.
5684
5685 2006-10-23  Bruno Haible  <bruno@clisp.org>
5686             Paul Eggert  <eggert@cs.ucla.edu>
5687
5688         Ability to rename obstack_free.
5689         * lib/obstack.h (__obstack_free): New macro. Declare instead of
5690         obstack_free.
5691         (obstack_free): Invoke the __obstack_free macro.
5692         * lib/obstack.c (obstack_free): Use __obstack_free macro.
5693
5694 2006-10-23  Bruno Haible  <bruno@clisp.org>
5695             Paul Eggert  <eggert@cs.ucla.edu>
5696
5697         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
5698         __argc, __argv from the declaration. (They are defined as macros on
5699         mingw.)
5700
5701 2006-10-22  Bruno Haible  <bruno@clisp.org>
5702
5703         * doc/gnulib-intro.texi: New file.
5704         * doc/gnulib.texi: Include it.
5705
5706 2006-10-21  Bruno Haible  <bruno@clisp.org>
5707
5708         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
5709         "Introduction", "Miscellanous Notes", "Particular Modules".
5710
5711 2006-10-21  Bruno Haible  <bruno@clisp.org>
5712
5713         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5714         Change mostlyclean-local rule to avoid sh syntax error from bash
5715         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
5716
5717 2006-10-23  Jim Meyering  <jim@meyering.net>
5718
5719         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
5720         in place of snprintf.
5721
5722         * modules/inttostr (Files): Add lib/uinttostr.c.
5723         * lib/uinttostr.c (inttostr): New file/function.
5724         * lib/inttostr.h (uinttostr): Declare.
5725         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
5726         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
5727         Add uinttostr.
5728         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
5729
5730 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
5731
5732         * lib/canonicalize.c (ELOOP): Define if not already defined.
5733         Problem reported by Bruno Haible in
5734         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
5735
5736 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
5737
5738         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
5739         Problem reported by Perry Smith and Ville Laurikari.
5740
5741         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
5742         uses.
5743
5744 2006-10-19  Bruno Haible  <bruno@clisp.org>
5745
5746         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
5747         for mingw.
5748
5749 2006-10-19  Bruno Haible  <bruno@clisp.org>
5750
5751         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
5752         Needed for mingw.
5753
5754 2006-10-19  Bruno Haible  <bruno@clisp.org>
5755
5756         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
5757
5758 2006-10-19  Bruno Haible  <bruno@clisp.org>
5759
5760         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
5761         it.
5762
5763 2006-10-19  Bruno Haible  <bruno@clisp.org>
5764
5765         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
5766         invocation.
5767
5768 2006-10-19  Bruno Haible  <bruno@clisp.org>
5769
5770         * gnulib-tool (func_create_testdir): Don't include ftruncate and
5771         mountlist by default.
5772
5773 2006-10-16  Bruno Haible  <bruno@clisp.org>
5774
5775         * lib/c-strstr.c: Include c-strstr.h.
5776
5777 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5778
5779         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
5780         in a slash.
5781
5782 2006-10-18  Bruno Haible  <bruno@clisp.org>
5783
5784         * lib/lock.h [C++]: Wrap definitions in extern "C".
5785
5786 2006-10-18  Bruno Haible  <bruno@clisp.org>
5787
5788         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
5789         gl_LIBOBJS list.
5790
5791 2006-10-18  Bruno Haible  <bruno@clisp.org>
5792
5793         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
5794
5795 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
5796
5797         * lib/xstrtol.h: Include gettext.h.
5798         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
5799         Problem reported by Eric Blake.
5800         * modules/xstrtol (Depends-on): Add gettext-h.
5801
5802 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
5803
5804         * lib/strftime.c (advance): New macro.
5805         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
5806         incomplete type, so you can't add 0 to it.  Problem and patch
5807         reported by Eelco Dolstra for dietlibc.
5808
5809 2006-10-18  Jim Meyering  <jim@meyering.net>
5810
5811         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
5812         type for a local, and rename it: s/up/user_proc/.
5813
5814 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
5815
5816         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
5817         READ_UTMP_USER_PROCESS.
5818         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
5819
5820 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
5821
5822         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
5823         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
5824
5825 2006-10-17  Eric Blake  <ebb9@byu.net>
5826
5827         * lib/sigprocmask.c (sigprocmask): Fix typo.
5828
5829         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
5830
5831         * modules/clean-temp (Makefile.am): Don't add to make output...
5832         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
5833         config.h.
5834
5835 2006-10-17  Bruno Haible  <bruno@clisp.org>
5836
5837         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
5838         differently if DEFAULT_TEXT_DOMAIN is set.
5839
5840 2006-10-16  Bruno Haible  <bruno@clisp.org>
5841
5842         * lib/clean-temp.c: Include fwriteerror.h.
5843
5844 2006-10-16  Bruno Haible  <bruno@clisp.org>
5845
5846         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
5847
5848 2006-10-16  Bruno Haible  <bruno@clisp.org>
5849
5850         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
5851         * lib/sigprocmask.h: Include <sys/types.h>.
5852         (sigset_t): Use the system's definition if present.
5853
5854 2006-10-17  Eric Blake  <ebb9@byu.net>
5855
5856         * lib/xvasprintf.c (includes): Assume config.h.
5857         * lib/xasprintf.c (includes): Likewise.
5858
5859 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
5860
5861         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
5862         at least as wide as intmax_t.
5863
5864 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
5865
5866         (Imported from Automake.)
5867         * build-aux/gnupload: Update to version 1.1 of directive file.
5868
5869 2006-10-16  Eric Blake  <ebb9@byu.net>
5870
5871         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
5872         match Automake 1.10a.
5873
5874 2006-10-14  Bruno Haible  <bruno@clisp.org>
5875
5876         * modules/sigprocmask: New file.
5877         * lib/sigprocmask.h: New file.
5878         * lib/sigprocmask.c: New file.
5879         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
5880         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
5881         request sigprocmask.o.
5882         (gl_PREREQ_SIGPROCMASK): New macro.
5883         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
5884         (Depends-on): Add sigprocmask.
5885         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
5886         gt_SIGNALBLOCKING. Test for 'raise' only once.
5887         * lib/fatal-signal.c: Include sigprocmask.h.
5888         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
5889         unblock_fatal_signals): Define always.
5890         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
5891         sigprocmask.
5892
5893 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
5894
5895         Sync from Automake.
5896         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
5897         which incorrectly sets the mode of an existing destination
5898         directory.  In some cases the unpatched install-sh could do the
5899         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
5900         system.  We hope this is rare in practice, but it's clearly worth
5901         fixing.  Problem reported by Alex Unleashed in
5902         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
5903         Also, don't bother to check for -m bugs unless we're using -m;
5904         suggested by Stepan Kasal.
5905
5906 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5907
5908         Sync from Automake.
5909         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
5910         `-c' flag, so they appear at the same position as in %FASTDEP%
5911         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
5912         which ignores unknown options only after the first non-option.
5913         Bug report against M4 by Nelson H. F. Beebe.
5914
5915 2006-10-13  Jim Meyering  <jim@meyering.net>
5916
5917         Fix a bug in yesterday's change.
5918         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
5919         p->fts_statp->st_dev would be used uninitialized.
5920         Ensures that we always call fts_stat on the very first entry.
5921         Miklos Szeredi reported that find -xdev stopped working.
5922
5923 2006-10-12  Bruno Haible  <bruno@clisp.org>
5924
5925         * gnulib-tool (func_get_automake_snippet): Append an automatically
5926         computed EXTRA_DIST augmentation.
5927         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
5928         * modules/alloca-opt (Makefile.am): Likewise.
5929         * modules/allocsa (Makefile.am): Likewise.
5930         * modules/arcfour (Makefile.am): Likewise.
5931         * modules/arctwo (Makefile.am): Likewise.
5932         * modules/argmatch (Makefile.am): Likewise.
5933         * modules/argz (Makefile.am): Likewise.
5934         * modules/atexit (Makefile.am): Likewise.
5935         * modules/backupfile (Makefile.am): Likewise.
5936         * modules/byteswap (Makefile.am): Likewise.
5937         * modules/c-strtod (Makefile.am): Likewise.
5938         * modules/c-strtold (Makefile.am): Likewise.
5939         * modules/calloc (Makefile.am): Likewise.
5940         * modules/canon-host (Makefile.am): Likewise.
5941         * modules/canonicalize (Makefile.am): Likewise.
5942         * modules/chdir-long (Makefile.am): Likewise.
5943         * modules/chdir-safer (Makefile.am): Likewise.
5944         * modules/check-version (Makefile.am): Likewise.
5945         * modules/chown (Makefile.am): Likewise.
5946         * modules/cloexec (Makefile.am): Likewise.
5947         * modules/close-stream (Makefile.am): Likewise.
5948         * modules/closeout (Makefile.am): Likewise.
5949         * modules/crc (Makefile.am): Likewise.
5950         * modules/csharpexec (Makefile.am): Likewise.
5951         * modules/cycle-check (Makefile.am): Likewise.
5952         * modules/des (Makefile.am): Likewise.
5953         * modules/dev-ino (Makefile.am): Likewise.
5954         * modules/dirfd (Makefile.am): Likewise.
5955         * modules/dirname (Makefile.am): Likewise.
5956         * modules/dup2 (Makefile.am): Likewise.
5957         * modules/eealloc (Makefile.am): Likewise.
5958         * modules/error (Makefile.am): Likewise.
5959         * modules/euidaccess (Makefile.am): Likewise.
5960         * modules/exclude (Makefile.am): Likewise.
5961         * modules/exitfail (Makefile.am): Likewise.
5962         * modules/fcntl-safer (Makefile.am): Likewise.
5963         * modules/fcntl (Makefile.am): Likewise.
5964         * modules/file-type (Makefile.am): Likewise.
5965         * modules/fileblocks (Makefile.am): Likewise.
5966         * modules/filemode (Makefile.am): Likewise.
5967         * modules/filenamecat (Makefile.am): Likewise.
5968         * modules/fnmatch (Makefile.am): Likewise.
5969         * modules/fopen-safer (Makefile.am): Likewise.
5970         * modules/fpending (Makefile.am): Likewise.
5971         * modules/fprintftime (Makefile.am): Likewise.
5972         * modules/free (Makefile.am): Likewise.
5973         * modules/fsusage (Makefile.am): Likewise.
5974         * modules/ftruncate (Makefile.am): Likewise.
5975         * modules/fts (Makefile.am): Likewise.
5976         * modules/gc-arcfour (Makefile.am): Likewise.
5977         * modules/gc-des (Makefile.am): Likewise.
5978         * modules/gc-hmac-md5 (Makefile.am): Likewise.
5979         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
5980         * modules/gc-md4 (Makefile.am): Likewise.
5981         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
5982         * modules/gc-sha1 (Makefile.am): Likewise.
5983         * modules/gc (Makefile.am): Likewise.
5984         * modules/getaddrinfo (Makefile.am): Likewise.
5985         * modules/getcwd (Makefile.am): Likewise.
5986         * modules/getdelim (Makefile.am): Likewise.
5987         * modules/getdomainname (Makefile.am): Likewise.
5988         * modules/getgroups (Makefile.am): Likewise.
5989         * modules/gethostname (Makefile.am): Likewise.
5990         * modules/gethrxtime (Makefile.am): Likewise.
5991         * modules/getline (Makefile.am): Likewise.
5992         * modules/getloadavg (Makefile.am): Likewise.
5993         * modules/getlogin_r (Makefile.am): Likewise.
5994         * modules/getndelim2 (Makefile.am): Likewise.
5995         * modules/getopt (Makefile.am): Likewise.
5996         * modules/getpagesize (Makefile.am): Likewise.
5997         * modules/getpass-gnu (Makefile.am): Likewise.
5998         * modules/getpass (Makefile.am): Likewise.
5999         * modules/getsubopt (Makefile.am): Likewise.
6000         * modules/gettime (Makefile.am): Likewise.
6001         * modules/gettimeofday (Makefile.am): Likewise.
6002         * modules/getugroups (Makefile.am): Likewise.
6003         * modules/getusershell (Makefile.am): Likewise.
6004         * modules/glob (Makefile.am): Likewise.
6005         * modules/group-member (Makefile.am): Likewise.
6006         * modules/hard-locale (Makefile.am): Likewise.
6007         * modules/hash (Makefile.am): Likewise.
6008         * modules/hmac-md5 (Makefile.am): Likewise.
6009         * modules/hmac-sha1 (Makefile.am): Likewise.
6010         * modules/human (Makefile.am): Likewise.
6011         * modules/idcache (Makefile.am): Likewise.
6012         * modules/imaxabs (Makefile.am): Likewise.
6013         * modules/imaxdiv (Makefile.am): Likewise.
6014         * modules/inet_ntop (Makefile.am): Likewise.
6015         * modules/inet_pton (Makefile.am): Likewise.
6016         * modules/intprops (Makefile.am): Likewise.
6017         * modules/inttostr (Makefile.am): Likewise.
6018         * modules/inttypes (Makefile.am): Likewise.
6019         * modules/isapipe (Makefile.am): Likewise.
6020         * modules/javaversion (Makefile.am): Likewise.
6021         * modules/lchmod (Makefile.am): Likewise.
6022         * modules/lchown (Makefile.am): Likewise.
6023         * modules/localcharset (Makefile.am): Likewise.
6024         * modules/long-options (Makefile.am): Likewise.
6025         * modules/lstat (Makefile.am): Likewise.
6026         * modules/malloc (Makefile.am): Likewise.
6027         * modules/mathl (Makefile.am): Likewise.
6028         * modules/mbchar (Makefile.am): Likewise.
6029         * modules/md2 (Makefile.am): Likewise.
6030         * modules/md4 (Makefile.am): Likewise.
6031         * modules/md5 (Makefile.am): Likewise.
6032         * modules/memcasecmp (Makefile.am): Likewise.
6033         * modules/memchr (Makefile.am): Likewise.
6034         * modules/memcmp (Makefile.am): Likewise.
6035         * modules/memcoll (Makefile.am): Likewise.
6036         * modules/memcpy (Makefile.am): Likewise.
6037         * modules/memmem (Makefile.am): Likewise.
6038         * modules/memmove (Makefile.am): Likewise.
6039         * modules/mempcpy (Makefile.am): Likewise.
6040         * modules/memrchr (Makefile.am): Likewise.
6041         * modules/memset (Makefile.am): Likewise.
6042         * modules/memxor (Makefile.am): Likewise.
6043         * modules/mkancesdirs (Makefile.am): Likewise.
6044         * modules/mkdir-p (Makefile.am): Likewise.
6045         * modules/mkdir (Makefile.am): Likewise.
6046         * modules/mkdtemp (Makefile.am): Likewise.
6047         * modules/mkstemp (Makefile.am): Likewise.
6048         * modules/mktime (Makefile.am): Likewise.
6049         * modules/modechange (Makefile.am): Likewise.
6050         * modules/mountlist (Makefile.am): Likewise.
6051         * modules/nanosleep (Makefile.am): Likewise.
6052         * modules/obstack (Makefile.am): Likewise.
6053         * modules/openat (Makefile.am): Likewise.
6054         * modules/pagealign_alloc (Makefile.am): Likewise.
6055         * modules/pathmax (Makefile.am): Likewise.
6056         * modules/physmem (Makefile.am): Likewise.
6057         * modules/poll (Makefile.am): Likewise.
6058         * modules/posixtm (Makefile.am): Likewise.
6059         * modules/posixver (Makefile.am): Likewise.
6060         * modules/putenv (Makefile.am): Likewise.
6061         * modules/quote (Makefile.am): Likewise.
6062         * modules/quotearg (Makefile.am): Likewise.
6063         * modules/raise (Makefile.am): Likewise.
6064         * modules/read-file (Makefile.am): Likewise.
6065         * modules/readline (Makefile.am): Likewise.
6066         * modules/readlink (Makefile.am): Likewise.
6067         * modules/readtokens (Makefile.am): Likewise.
6068         * modules/readutmp (Makefile.am): Likewise.
6069         * modules/realloc (Makefile.am): Likewise.
6070         * modules/regex (Makefile.am): Likewise.
6071         * modules/rename-dest-slash (Makefile.am): Likewise.
6072         * modules/rename (Makefile.am): Likewise.
6073         * modules/rijndael (Makefile.am): Likewise.
6074         * modules/rmdir (Makefile.am): Likewise.
6075         * modules/rpmatch (Makefile.am): Likewise.
6076         * modules/safe-read (Makefile.am): Likewise.
6077         * modules/safe-write (Makefile.am): Likewise.
6078         * modules/same-inode (Makefile.am): Likewise.
6079         * modules/same (Makefile.am): Likewise.
6080         * modules/save-cwd (Makefile.am): Likewise.
6081         * modules/savedir (Makefile.am): Likewise.
6082         * modules/setenv (Makefile.am): Likewise.
6083         * modules/settime (Makefile.am): Likewise.
6084         * modules/sha1 (Makefile.am): Likewise.
6085         * modules/sig2str (Makefile.am): Likewise.
6086         * modules/snprintf (Makefile.am): Likewise.
6087         * modules/stat-macros (Makefile.am): Likewise.
6088         * modules/stat-time (Makefile.am): Likewise.
6089         * modules/stdbool (Makefile.am): Likewise.
6090         * modules/stdint (Makefile.am): Likewise.
6091         * modules/stdlib-safer (Makefile.am): Likewise.
6092         * modules/stpcpy (Makefile.am): Likewise.
6093         * modules/stpncpy (Makefile.am): Likewise.
6094         * modules/strcase (Makefile.am): Likewise.
6095         * modules/strcasestr (Makefile.am): Likewise.
6096         * modules/strchrnul (Makefile.am): Likewise.
6097         * modules/strcspn (Makefile.am): Likewise.
6098         * modules/strdup (Makefile.am): Likewise.
6099         * modules/strerror (Makefile.am): Likewise.
6100         * modules/strftime (Makefile.am): Likewise.
6101         * modules/strndup (Makefile.am): Likewise.
6102         * modules/strnlen (Makefile.am): Likewise.
6103         * modules/strpbrk (Makefile.am): Likewise.
6104         * modules/strsep (Makefile.am): Likewise.
6105         * modules/strstr (Makefile.am): Likewise.
6106         * modules/strtod (Makefile.am): Likewise.
6107         * modules/strtoimax (Makefile.am): Likewise.
6108         * modules/strtok_r (Makefile.am): Likewise.
6109         * modules/strtol (Makefile.am): Likewise.
6110         * modules/strtoll (Makefile.am): Likewise.
6111         * modules/strtoul (Makefile.am): Likewise.
6112         * modules/strtoull (Makefile.am): Likewise.
6113         * modules/strtoumax (Makefile.am): Likewise.
6114         * modules/strverscmp (Makefile.am): Likewise.
6115         * modules/sys_socket (Makefile.am): Likewise.
6116         * modules/sys_stat (Makefile.am): Likewise.
6117         * modules/sysexits (Makefile.am): Likewise.
6118         * modules/time_r (Makefile.am): Likewise.
6119         * modules/timegm (Makefile.am): Likewise.
6120         * modules/timespec (Makefile.am): Likewise.
6121         * modules/tmpfile-safer (Makefile.am): Likewise.
6122         * modules/trim (Makefile.am): Likewise.
6123         * modules/unistd-safer (Makefile.am): Likewise.
6124         * modules/unlinkdir (Makefile.am): Likewise.
6125         * modules/unlocked-io (Makefile.am): Likewise.
6126         * modules/userspec (Makefile.am): Likewise.
6127         * modules/utime (Makefile.am): Likewise.
6128         * modules/utimecmp (Makefile.am): Likewise.
6129         * modules/utimens (Makefile.am): Likewise.
6130         * modules/vasnprintf (Makefile.am): Likewise.
6131         * modules/vasprintf (Makefile.am): Likewise.
6132         * modules/vsnprintf (Makefile.am): Likewise.
6133         * modules/xalloc (Makefile.am): Likewise.
6134         * modules/xgetcwd (Makefile.am): Likewise.
6135         * modules/xnanosleep (Makefile.am): Likewise.
6136         * modules/xreadlink (Makefile.am): Likewise.
6137         * modules/xstrtod (Makefile.am): Likewise.
6138         * modules/xstrtol (Makefile.am): Likewise.
6139         * modules/xstrtold (Makefile.am): Likewise.
6140         * modules/yesno (Makefile.am): Likewise.
6141         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
6142
6143 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
6144
6145         * modules/error (Makefile.am): Distribute files through
6146         EXTRA_DIST, not lib_SOURCES.
6147
6148 2006-10-12  Eric Blake  <ebb9@byu.net>
6149
6150         * modules/error (Makefile.am): Distribute files in /lib.
6151         * modules/obstack (Makefile.am): Likewise.
6152
6153 2006-10-12  Bruno Haible  <bruno@clisp.org>
6154
6155         * modules/acl (Makefile.am): Distribute all files in lib/ through
6156         EXTRA_DIST.
6157         * modules/arcfour (Makefile.am): Likewise.
6158         * modules/arctwo (Makefile.am): Likewise.
6159         * modules/argmatch (Makefile.am): Likewise.
6160         * modules/argz (Makefile.am): Likewise.
6161         * modules/atexit (Makefile.am): Likewise.
6162         * modules/backupfile (Makefile.am): Likewise.
6163         * modules/c-strtod (Makefile.am): Likewise.
6164         * modules/c-strtold (Makefile.am): Likewise.
6165         * modules/calloc (Makefile.am): Likewise.
6166         * modules/canon-host (Makefile.am): Likewise.
6167         * modules/canonicalize (Makefile.am): Likewise.
6168         * modules/chdir-long (Makefile.am): Likewise.
6169         * modules/chdir-safer (Makefile.am): Likewise.
6170         * modules/check-version (Makefile.am): Likewise.
6171         * modules/chown (Makefile.am): Likewise.
6172         * modules/cloexec (Makefile.am): Likewise.
6173         * modules/close-stream (Makefile.am): Likewise.
6174         * modules/closeout (Makefile.am): Likewise.
6175         * modules/crc (Makefile.am): Likewise.
6176         * modules/cycle-check (Makefile.am): Likewise.
6177         * modules/des (Makefile.am): Likewise.
6178         * modules/dirfd (Makefile.am): Likewise.
6179         * modules/dirname (Makefile.am): Likewise.
6180         * modules/dup2 (Makefile.am): Likewise.
6181         * modules/euidaccess (Makefile.am): Likewise.
6182         * modules/exclude (Makefile.am): Likewise.
6183         * modules/exitfail (Makefile.am): Likewise.
6184         * modules/fcntl-safer (Makefile.am): Likewise.
6185         * modules/file-type (Makefile.am): Likewise.
6186         * modules/fileblocks (Makefile.am): Likewise.
6187         * modules/filemode (Makefile.am): Likewise.
6188         * modules/filenamecat (Makefile.am): Likewise.
6189         * modules/fnmatch (Makefile.am): Likewise.
6190         * modules/fopen-safer (Makefile.am): Likewise.
6191         * modules/fpending (Makefile.am): Likewise.
6192         * modules/fprintftime (Makefile.am): Likewise.
6193         * modules/free (Makefile.am): Likewise.
6194         * modules/fsusage (Makefile.am): Likewise.
6195         * modules/ftruncate (Makefile.am): Likewise.
6196         * modules/fts (Makefile.am): Likewise.
6197         * modules/gc (Makefile.am): Likewise.
6198         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
6199         * modules/getaddrinfo (Makefile.am): Likewise.
6200         * modules/getcwd (Makefile.am): Likewise.
6201         * modules/getdelim (Makefile.am): Likewise.
6202         * modules/getdomainname (Makefile.am): Likewise.
6203         * modules/getgroups (Makefile.am): Likewise.
6204         * modules/gethostname (Makefile.am): Likewise.
6205         * modules/gethrxtime (Makefile.am): Likewise.
6206         * modules/getline (Makefile.am): Likewise.
6207         * modules/getloadavg (Makefile.am): Likewise.
6208         * modules/getlogin_r (Makefile.am): Likewise.
6209         * modules/getopt (Makefile.am): Likewise.
6210         * modules/getpass (Makefile.am): Likewise.
6211         * modules/getpass-gnu (Makefile.am): Likewise.
6212         * modules/getsubopt (Makefile.am): Likewise.
6213         * modules/gettime (Makefile.am): Likewise.
6214         * modules/gettimeofday (Makefile.am): Likewise.
6215         * modules/getugroups (Makefile.am): Likewise.
6216         * modules/getusershell (Makefile.am): Likewise.
6217         * modules/glob (Makefile.am): Likewise.
6218         * modules/group-member (Makefile.am): Likewise.
6219         * modules/hard-locale (Makefile.am): Likewise.
6220         * modules/hash (Makefile.am): Likewise.
6221         * modules/hmac-md5 (Makefile.am): Likewise.
6222         * modules/hmac-sha1 (Makefile.am): Likewise.
6223         * modules/human (Makefile.am): Likewise.
6224         * modules/idcache (Makefile.am): Likewise.
6225         * modules/imaxabs (Makefile.am): Likewise.
6226         * modules/imaxdiv (Makefile.am): Likewise.
6227         * modules/inet_ntop (Makefile.am): Likewise.
6228         * modules/inet_pton (Makefile.am): Likewise.
6229         * modules/inttostr (Makefile.am): Likewise.
6230         * modules/isapipe (Makefile.am): Likewise.
6231         * modules/lchown (Makefile.am): Likewise.
6232         * modules/long-options (Makefile.am): Likewise.
6233         * modules/lstat (Makefile.am): Likewise.
6234         * modules/malloc (Makefile.am): Likewise.
6235         * modules/mathl (Makefile.am): Likewise.
6236         * modules/mbchar (Makefile.am): Likewise.
6237         * modules/md2 (Makefile.am): Likewise.
6238         * modules/md4 (Makefile.am): Likewise.
6239         * modules/md5 (Makefile.am): Likewise.
6240         * modules/memcasecmp (Makefile.am): Likewise.
6241         * modules/memchr (Makefile.am): Likewise.
6242         * modules/memcmp (Makefile.am): Likewise.
6243         * modules/memcoll (Makefile.am): Likewise.
6244         * modules/memcpy (Makefile.am): Likewise.
6245         * modules/memmem (Makefile.am): Likewise.
6246         * modules/memmove (Makefile.am): Likewise.
6247         * modules/mempcpy (Makefile.am): Likewise.
6248         * modules/memrchr (Makefile.am): Likewise.
6249         * modules/memset (Makefile.am): Likewise.
6250         * modules/memxor (Makefile.am): Likewise.
6251         * modules/mkancesdirs (Makefile.am): Likewise.
6252         * modules/mkdir (Makefile.am): Likewise.
6253         * modules/mkdir-p (Makefile.am): Likewise.
6254         * modules/mkdtemp (Makefile.am): Likewise.
6255         * modules/mkstemp (Makefile.am): Likewise.
6256         * modules/mktime (Makefile.am): Likewise.
6257         * modules/modechange (Makefile.am): Likewise.
6258         * modules/mountlist (Makefile.am): Likewise.
6259         * modules/nanosleep (Makefile.am): Likewise.
6260         * modules/openat (Makefile.am): Likewise.
6261         * modules/pagealign_alloc (Makefile.am): Likewise.
6262         * modules/physmem (Makefile.am): Likewise.
6263         * modules/poll (Makefile.am): Likewise.
6264         * modules/posixtm (Makefile.am): Likewise.
6265         * modules/posixver (Makefile.am): Likewise.
6266         * modules/putenv (Makefile.am): Likewise.
6267         * modules/quote (Makefile.am): Likewise.
6268         * modules/quotearg (Makefile.am): Likewise.
6269         * modules/raise (Makefile.am): Likewise.
6270         * modules/read-file (Makefile.am): Likewise.
6271         * modules/readline (Makefile.am): Likewise.
6272         * modules/readlink (Makefile.am): Likewise.
6273         * modules/readtokens (Makefile.am): Likewise.
6274         * modules/readutmp (Makefile.am): Likewise.
6275         * modules/realloc (Makefile.am): Likewise.
6276         * modules/regex (Makefile.am): Likewise.
6277         * modules/rename (Makefile.am): Likewise.
6278         * modules/rename-dest-slash (Makefile.am): Likewise.
6279         * modules/rijndael (Makefile.am): Likewise.
6280         * modules/rmdir (Makefile.am): Likewise.
6281         * modules/rpmatch (Makefile.am): Likewise.
6282         * modules/safe-read (Makefile.am): Likewise.
6283         * modules/safe-write (Makefile.am): Likewise.
6284         * modules/same (Makefile.am): Likewise.
6285         * modules/save-cwd (Makefile.am): Likewise.
6286         * modules/savedir (Makefile.am): Likewise.
6287         * modules/setenv (Makefile.am): Likewise.
6288         * modules/settime (Makefile.am): Likewise.
6289         * modules/sha1 (Makefile.am): Likewise.
6290         * modules/sig2str (Makefile.am): Likewise.
6291         * modules/snprintf (Makefile.am): Likewise.
6292         * modules/stdlib-safer (Makefile.am): Likewise.
6293         * modules/stpcpy (Makefile.am): Likewise.
6294         * modules/stpncpy (Makefile.am): Likewise.
6295         * modules/strcase (Makefile.am): Likewise.
6296         * modules/strcasestr (Makefile.am): Likewise.
6297         * modules/strchrnul (Makefile.am): Likewise.
6298         * modules/strcspn (Makefile.am): Likewise.
6299         * modules/strdup (Makefile.am): Likewise.
6300         * modules/strerror (Makefile.am): Likewise.
6301         * modules/strftime (Makefile.am): Likewise.
6302         * modules/strndup (Makefile.am): Likewise.
6303         * modules/strnlen (Makefile.am): Likewise.
6304         * modules/strpbrk (Makefile.am): Likewise.
6305         * modules/strsep (Makefile.am): Likewise.
6306         * modules/strstr (Makefile.am): Likewise.
6307         * modules/strtod (Makefile.am): Likewise.
6308         * modules/strtoimax (Makefile.am): Likewise.
6309         * modules/strtok_r (Makefile.am): Likewise.
6310         * modules/strtol (Makefile.am): Likewise.
6311         * modules/strtoll (Makefile.am): Likewise.
6312         * modules/strtoul (Makefile.am): Likewise.
6313         * modules/strtoull (Makefile.am): Likewise.
6314         * modules/strtoumax (Makefile.am): Likewise.
6315         * modules/strverscmp (Makefile.am): Likewise.
6316         * modules/time_r (Makefile.am): Likewise.
6317         * modules/timegm (Makefile.am): Likewise.
6318         * modules/tmpfile-safer (Makefile.am): Likewise.
6319         * modules/unistd-safer (Makefile.am): Likewise.
6320         * modules/unlinkdir (Makefile.am): Likewise.
6321         * modules/userspec (Makefile.am): Likewise.
6322         * modules/utime (Makefile.am): Likewise.
6323         * modules/utimecmp (Makefile.am): Likewise.
6324         * modules/utimens (Makefile.am): Likewise.
6325         * modules/vasnprintf (Makefile.am): Likewise.
6326         * modules/vasprintf (Makefile.am): Likewise.
6327         * modules/vsnprintf (Makefile.am): Likewise.
6328         * modules/xalloc (Makefile.am): Likewise.
6329         * modules/xgetcwd (Makefile.am): Likewise.
6330         * modules/xnanosleep (Makefile.am): Likewise.
6331         * modules/xreadlink (Makefile.am): Likewise.
6332         * modules/xstrtod (Makefile.am): Likewise.
6333         * modules/xstrtol (Makefile.am): Likewise.
6334         * modules/xstrtold (Makefile.am): Likewise.
6335         * modules/yesno (Makefile.am): Likewise.
6336
6337 2006-10-12  Jim Meyering  <jim@meyering.net>
6338
6339         * m4/getloadavg.m4: Revert the change below.
6340
6341         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
6342         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
6343         fail with a symlink, which is what coreutils' ./bootstrap now
6344         creates by default.
6345
6346 2006-10-12  Bruno Haible  <bruno@clisp.org>
6347
6348         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
6349         mingw.
6350         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
6351         MSVC and mingw explicitly.
6352
6353 2006-10-11  Simon Josefsson  <jas@extundo.com>
6354             Bruno Haible  <bruno@clisp.org>
6355
6356         Add support for multiple gnulib-tool invocations in the scope of a
6357         single configure.ac file.
6358         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
6359         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
6360         with the same contents as the _LIBADD variable.
6361         (func_emit_initmacro_start, func_emit_initmacro_end,
6362         func_emit_initmacro_done): New functions.
6363         (func_import, func_create_testdir): Invoke them. Allow the identifiers
6364         gl_LIBOBJS and gl_LTLIBOBJS.
6365
6366 2006-10-11  Bruno Haible  <bruno@clisp.org>
6367
6368         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
6369         (func_create_testdir): Don't create po/Makefile.am, don't invoke
6370         autoreconf. Instead, invoke autopoint explicitly but move back the
6371         *.m4 files from gnulib.
6372
6373 2006-10-11  Bruno Haible  <bruno@clisp.org>
6374
6375         * gnulib-tool (func_usage): Make module names after --create-testdir
6376         optional.
6377         (func_create_testdir): If no module was specified, use nearly all
6378         modules.
6379
6380 2006-10-12  Jim Meyering  <jim@meyering.net>
6381
6382         Big performance improvement for fts-based tools that use FTS_NOSTAT.
6383         Avoid spurious inode-mismatch problems on non-POSIX file systems.
6384         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
6385         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
6386         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
6387         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
6388         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
6389         (fts_set_stat_required): New function.
6390         (fts_open): Defer the calls to fts_stat, if possible or requested.
6391         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
6392         into fts_stat itself.
6393         (fts_read): Perform any required (deferred) fts_stat call.
6394         (fts_build): Likewise, for the directory we're about to open and read.
6395         In the readdir loop, carefully decide whether each entry will require
6396         an eventual call to fts_stat, using dirent.d_type info if available.
6397         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
6398         a command line argument into this function.  Update all callers.
6399         Map a return value of FTS_DOT to FTS_D for a command line argument.
6400         * modules/fts (Depends-on): Add d-type.  Alphabetize.
6401         Thanks to Miklos Szeredi for his tenacity and for the initial
6402         bug report about "find" failing on a FUSE-based file system.
6403
6404         * lib/fts.c (fts_open): Use consistent indentation.
6405
6406 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
6407
6408         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
6409         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
6410         reported by Jim Meyering.  All uses of cache variables renamed
6411         to match Autoconf's.
6412         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
6413         the other one.
6414
6415         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
6416         Fix misspelling in diagnostic.
6417
6418 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
6419
6420         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
6421         defined.  Problem reported by Matthew Woehlke.
6422
6423         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
6424         Add support for Tandem NonStop R series.
6425         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
6426         Use new macro.
6427
6428         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
6429         (has_trailing_slash): Omit size arg; all callers changed.
6430         Omit 'inline', since it doesn't help performance and we'd
6431         need to configure it.
6432         Don't count //, ///, etc. as having a trailing slash.
6433         As a side effect, this removes a C99ism reported by Matthew Woehlke.
6434         (rpl_rename_dest_slash): On failure, use rename's errno rather
6435         than (in some cases) an incorrect or junk errno.
6436         Simplify code by removing need to compute length; this does
6437         cause it to make two passes instead of one over the file name,
6438         but it's worth it.
6439
6440         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
6441         change, since Autoconf's version may no longer be appropriate now
6442         that we are using CVS Autoconf's version.  Add support for Tandem.
6443
6444 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
6445             Bruno Haible  <bruno@clisp.org>
6446
6447         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
6448         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
6449         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
6450         gl_AC_TYPE_LONG_LONG.
6451
6452         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
6453         instead of HAVE_LONG_LONG.
6454         * lib/printf-args.c (printf_fetchargs): Likewise.
6455         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
6456         * lib/vasnprintf.c (VASNPRINTF): Likewise.
6457         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
6458         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
6459         gl_AC_TYPE_LONG_LONG.
6460
6461 2006-10-11  Bruno Haible  <bruno@clisp.org>
6462
6463         * m4/longlong.m4: Add comments.
6464         * m4/ulonglong.m4: Likewise.
6465
6466 2006-10-10  Bruno Haible  <bruno@clisp.org>
6467
6468         Make it possible to #define stpcpy, strdup to aliases.
6469         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
6470         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
6471
6472 2006-10-10  Bruno Haible  <bruno@clisp.org>
6473
6474         Make it possible to #define gcd to an alias.
6475         * lib/gcd.c: Include config.h.
6476
6477 2006-10-10  Bruno Haible  <bruno@clisp.org>
6478
6479         Make it possible to #define c_isascii to an alias.
6480         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
6481         defined. Undefine the macros before defining them, to avoid gcc
6482         warnings.
6483         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
6484         define NO_C_CTYPE_MACROS early.
6485
6486 2006-10-10  Bruno Haible  <bruno@clisp.org>
6487
6488         Make it possible to #define set_program_name to an alias.
6489         * lib/progname.c: Don't undefine set_program_name; instead, undefine
6490         ENABLE_RELOCATABLE early.
6491
6492 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
6493
6494         Port to Tandem NSK OSS, which has 64-bit signed int but at most
6495         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
6496         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
6497         More generally, don't assume that 64-bit signed int is available
6498         if unsigned int is, and vice versa.
6499         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
6500         unsigned symbols, not on their signed counterparts.
6501         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
6502         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
6503         (UINT64_C, UINTMAX_C):
6504         Likewise.
6505         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
6506         unsigned counterparts.
6507         (Have_long_long, Unsigned): New macros.
6508         (Int): Renamed from INT.
6509         (strtoimax): Use the new macros.
6510         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
6511         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
6512         * modules/inttypes (inttypes.h): Substitute
6513         HAVE_UNSIGNED_LONG_LONG_INT.
6514         * modules/stdint (stdint.h): Likewise.
6515         (Files): Add m4/ulonglong.m4.
6516
6517 2006-10-10  Bruno Haible  <bruno@clisp.org>
6518
6519         Fix a gcc -Wshadow warning.
6520         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
6521         to 'bucket'.
6522         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
6523         gl_linked_indexof_from_to): Likewise.
6524         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
6525         Likewise.
6526         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
6527         Likewise.
6528         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
6529         Reported by Eric Blake.
6530
6531 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
6532
6533         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
6534         for NetBSD.  Problem reported by Bruno Haible.
6535
6536 2006-10-09  Jim Meyering  <jim@meyering.net>
6537
6538         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
6539         Patch from Bruno Haible.
6540
6541 2006-10-09  Jim Meyering  <jim@meyering.net>
6542
6543         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
6544         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
6545         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
6546
6547 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
6548
6549         Don't include <config.h> twice; this doesn't work in some cases,
6550         e.g., when config.h has "#define intmax_t long long int" and
6551         we include <config.h>, <inttypes.h>, <config.h> in that order.
6552         Problem reported by Matthew Woehlke in:
6553         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
6554         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
6555         * lib/fts-cycle.c: Don't include config.h.
6556         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
6557         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
6558         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
6559         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
6560         inttypes.h.
6561         * lib/xstrtoumax.c: Likewise.
6562         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
6563         __strtol and the like, so that this module is more like its siblings.
6564         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
6565         Remove; no longer needed now that we assume gnulib inttypes.h.
6566
6567 2006-10-08  Bruno Haible  <bruno@clisp.org>
6568
6569         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
6570         option.
6571
6572 2006-10-07  Jim Meyering  <jim@meyering.net>
6573
6574         * modules/inttypes (inttypes.h): Revert what seems to have been
6575         an inadvertent part of today's change: use "|", not "/" in the
6576         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
6577
6578 2006-10-07  Bruno Haible  <bruno@clisp.org>
6579
6580         * modules/sublist: New file.
6581
6582 2006-10-07  Bruno Haible  <bruno@clisp.org>
6583
6584         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
6585         * modules/argz (argz.h): Likewise.
6586         * modules/arpa_inet (arpa/inet.h): Likewise.
6587         * modules/byteswap (byteswap.h): Likewise.
6588         * modules/configmake (configmake.h): Likewise.
6589         * modules/fcntl (fcntl.h): Likewise.
6590         * modules/fnmatch (fnmatch.h): Likewise.
6591         * modules/getopt (getopt.h): Likewise.
6592         * modules/glob (glob.h): Likewise.
6593         * modules/inttypes (inttypes.h): Likewise.
6594         * modules/netinet_in (netinet/in.h): Likewise.
6595         * modules/poll (poll.h): Likewise.
6596         * modules/stdbool (stdbool.h): Likewise.
6597         * modules/stdint (stdint.h): Likewise.
6598         * modules/sys_select (sys/select.h): Likewise.
6599         * modules/sys_socket (sys/socket.h): Likewise.
6600         * modules/sys_stat (sys/stat.h): Likewise.
6601         * modules/sysexits (sysexits.h): Likewise.
6602         * modules/unistd (unistd.h): Likewise.
6603         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6604         Add a "DO NOT EDIT" comment to the generated file.
6605         (func_import): Likewise for gnulib-comp.m4.
6606
6607 2006-10-07  Bruno Haible  <bruno@clisp.org>
6608
6609         * lib/gl_sublist.h: New file.
6610         * lib/gl_sublist.c: New file.
6611
6612 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
6613
6614         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
6615         name (relative to the original working directory) and the file
6616         name component (relative to the temporary working directory).  All
6617         callers changed.
6618         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
6619         * lib/mkdir-p.c (make_dir_parents): Likewise.
6620         * lib/mkdir-p.h (make_dir_parents): Likewise.
6621
6622 2006-10-06  Eric Blake  <ebb9@byu.net>
6623
6624         Define several macros for use by the clean-temp module.
6625         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
6626         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
6627         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
6628
6629         * lib/clean-temp.h (close_stream_temp): New declaration.
6630         * lib/clean-temp.c (includes): Pull in headers according to what
6631         other modules are in use.
6632         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
6633
6634 2006-10-06  Bruno Haible  <bruno@clisp.org>
6635
6636         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
6637         instead of fopen, fwriteerror.
6638
6639 2006-10-06  Bruno Haible  <bruno@clisp.org>
6640
6641         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
6642         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
6643         int.
6644         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
6645         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
6646         Return an error indicator.
6647         Suggested by Eric Blake.
6648
6649 2006-10-06  Bruno Haible  <bruno@clisp.org>
6650
6651         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
6652         Reported by Eric Blake.
6653
6654 2006-10-06  Bruno Haible  <bruno@clisp.org>
6655
6656         * modules/closeout (Description): Mention stderr too.
6657
6658 2006-10-06  Bruno Haible  <bruno@clisp.org>
6659         and Paul Eggert  <eggert@cs.ucla.edu>
6660
6661         * lib/closeout.c (close_stdout): Also close stderr.
6662         * lib/closeout.h: Update comment.
6663
6664 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
6665
6666         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
6667         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
6668         * lib/dirchownmod.c: Include lchown.h.
6669         * lib/lchown.c: Don't include files that lchown.h now includes.
6670         Don't declare chown, since lchown.h now does that.
6671         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
6672         (lchown): Define to rpl_chown if lchown is declared but
6673         does not exist.  Declare using a prototype if lchown is not
6674         declared.  Add a copyright notice.
6675         * lib/mkstemp.h: Include <unistd.h>.
6676         * lib/openat.c: Include lchown.h.
6677
6678         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
6679         we now test for that separately.
6680         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
6681         rather than O_NOFOLLOW, when testing whether it's possible to
6682         avoid a race condition reliably.
6683         * lib/savewd.c (savewd_chdir): Likewise.
6684
6685         Remove macros that are no longer needed now that stdint.h is
6686         reliable.
6687         * lib/fsusage.c (UINTMAX_MAX): Remove.
6688         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
6689         * lib/utimecmp.c (SIZE_MAX): Remove.
6690
6691         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
6692
6693         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
6694         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
6695         O_NOATIME works.
6696
6697 2006-10-05  Bruno Haible  <bruno@clisp.org>
6698
6699         * lib/gl_list.h (gl_sortedlist_search_from_to,
6700         gl_sortedlist_indexof_from_to): New declarations.
6701         (gl_list_implementation): New fields sortedlist_search_from_to,
6702         sortedlist_indexof_from_to.
6703         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
6704         inline functions.
6705         * lib/gl_list.c (gl_sortedlist_search_from_to,
6706         gl_sortedlist_indexof_from_to): New functions.
6707         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
6708         function.
6709         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
6710         (gl_array_sortedlist_search_from_to): New function.
6711         (gl_array_list_implementation): Update.
6712         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
6713         function.
6714         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
6715         (gl_carray_sortedlist_search_from_to): New function.
6716         (gl_carray_list_implementation): Update.
6717         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
6718         gl_linked_sortedlist_indexof_from_to): New functions.
6719         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
6720         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
6721         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
6722         gl_tree_sortedlist_indexof_from_to): New functions.
6723         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
6724         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
6725         Update.
6726         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
6727         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
6728         Update.
6729
6730 2006-10-05  Bruno Haible  <bruno@clisp.org>
6731
6732         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
6733         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
6734         (struct gl_list_implementation): Add fields search_from_to,
6735         indexof_from_to. Remove fields search, indexof.
6736         (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_list.c (gl_list_search): Use the search_from_to method.
6741         (gl_list_search_from, gl_list_search_from_to): New functions.
6742         (gl_list_indexof): Use the indexof_from_to method.
6743         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
6744         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
6745         gl_array_indexof. Add start_index, end_index arguments.
6746         (gl_array_search_from_to): Renamed from gl_array_search. Add
6747         start_index, end_index arguments.
6748         (gl_array_remove, gl_array_list_implementation): Update.
6749         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
6750         gl_carray_indexof. Add start_index, end_index arguments.
6751         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
6752         start_index, end_index arguments.
6753         (gl_carray_remove, gl_carray_list_implementation): Update.
6754         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
6755         gl_linked_search. Add start_index, end_index arguments.
6756         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
6757         start_index, end_index arguments.
6758         (gl_linked_remove): Update.
6759         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
6760         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
6761         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
6762         field to 'size_t'.
6763         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
6764         gl_tree_search. Add start_index, end_index arguments.
6765         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
6766         start_index, end_index arguments.
6767         (gl_tree_remove): Update.
6768         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
6769         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
6770         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
6771         function.
6772         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
6773         gl_tree_search. Add start_index, end_index arguments.
6774         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
6775         start_index, end_index arguments.
6776         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
6777         Update.
6778         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
6779
6780 2006-10-05  Bruno Haible  <bruno@clisp.org>
6781
6782         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
6783
6784         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
6785         fwriteerror_temp): New declarations.
6786         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
6787         (descriptors): New variable.
6788         (cleanup): First, close the descriptors.
6789         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
6790         fclose_temp, fwriteerror_temp): New functions.
6791
6792 2006-10-04  Jim Meyering  <jim@meyering.net>
6793
6794         * lib/fts.c (fts_open): Tiny comment change.
6795
6796 2006-10-04  Bruno Haible  <bruno@clisp.org>
6797
6798         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
6799         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
6800         gl_LOCK_BODY.
6801         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
6802         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
6803         gl_LOCK_EARLY_BODY.
6804         (gl_LOCK): Require gl_LOCK_BODY.
6805
6806 2006-10-04  Bruno Haible  <bruno@clisp.org>
6807
6808         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
6809         (gl_oset_search_atleast): New declaration.
6810         (struct gl_oset_implementation): Add field 'search_atleast'.
6811         (gl_oset_search_atleast): New inline function.
6812         * lib/gl_oset.c (gl_oset_search_atleast): New function.
6813         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
6814         (gl_array_oset_implementation): Update.
6815         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
6816         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
6817         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
6818
6819 2006-10-04  Bruno Haible  <bruno@clisp.org>
6820
6821         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
6822
6823 2006-10-03  Bruno Haible  <bruno@clisp.org>
6824
6825         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
6826         from gl_avltreehash_list_implementation.
6827
6828 2006-10-03  Bruno Haible  <bruno@clisp.org>
6829
6830         * lib/gl_oset.c (gl_oset_add): Fix return type.
6831
6832 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
6833
6834         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
6835
6836 2006-10-02  Eric Blake  <ebb9@byu.net>
6837
6838         * modules/strnlen (Depends-on): Add extensions.
6839
6840 2006-10-02  Eric Blake  <ebb9@byu.net>
6841
6842         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
6843         definition in 2.60+.
6844
6845 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
6846
6847         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
6848         checks.
6849
6850 2006-10-02  Bruno Haible  <bruno@clisp.org>
6851
6852         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
6853         to the AUTOMAKE_OPTIONS.
6854         Reported by Jim Meyering.
6855
6856 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
6857
6858         Work around bug in Solaris 10 /proc file system:
6859         /proc/self/fd/NNN/.. isn't the parent directory of
6860         the directory whose file descriptor is NNN.  This needs to
6861         be worked around at run time, not compile time, since a
6862         program might be built on Solaris 8, where things work, and
6863         run on Solaris 10.
6864         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
6865         to use the following interface instead:
6866         (OPENAT_BUFFER_SIZE): New macro.
6867         (openat_proc_name): New function.
6868         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
6869         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
6870         Likewise.
6871         * lib/openat-proc.c: New file.
6872         * modules/openat (Files): Add lib/openat-proc.c.
6873         (Depends-on): Add same-inode, stdbool.
6874         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
6875
6876 2006-09-29  Bruno Haible  <bruno@clisp.org>
6877
6878         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
6879         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
6880         argument. Set stdout_closed before testing for ferror, not after.
6881         (fwriteerror, fwriteerror_no_ebadf): New functions.
6882
6883 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6884
6885         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
6886
6887 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
6888
6889         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
6890         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
6891
6892 2006-09-28  Jim Meyering  <jim@meyering.net>
6893
6894         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
6895         Include <unistd.h>.
6896
6897 2006-09-28  Bruno Haible  <bruno@clisp.org>
6898
6899         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
6900         * modules/linkedhash-list (Depends-on): Likewise.
6901         * modules/rbtreehash-list (Depends-on): Likewise.
6902
6903 2006-09-28  Bruno Haible  <bruno@clisp.org>
6904
6905         * lib/strndup.h: Simplify the redefinition of strndup.
6906         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
6907         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
6908
6909 2006-09-28  Bruno Haible  <bruno@clisp.org>
6910
6911         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
6912         * lib/gl_linkedhash_list.c: Likewise.
6913         * lib/gl_rbtreehash_list.c: Likewise.
6914
6915 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
6916
6917         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
6918         getaddrinfo.
6919
6920         * lib/__fpending.h: Don't include <stdio_ext.h> unless
6921         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
6922         it causes <stdio_ext.h> to cause a compile-time error.
6923         Problem reported by Nelson H. F. Beebe.
6924         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
6925         of HAVE_DECL___PENDING.
6926
6927         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
6928         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
6929         declaration.
6930
6931 2006-09-27  Jim Meyering  <jim@meyering.net>
6932
6933         This file could end up with a definition for a function
6934         named __strndup, rather than rpl_strndup on a system with
6935         incomplete weak_alias support.
6936         * lib/strndup.c (strndup): Rename from __strndup.
6937         Remove #defines that used to map __strndup to strndup.
6938         Don't use K&R prototypes.
6939         Remove LIBC-related code, since this file is not sync'd with glibc.
6940         * lib/strndup.h: Revamp, accordingly.
6941         * m4/strndup.m4: Modernize.
6942
6943 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
6944
6945         * modules/savewd (Depends-on): Add 'raise'.
6946         * lib/savewd.c: Include <signal.h>, for 'raise'.
6947
6948 2006-09-26  Jim Meyering  <jim@meyering.net>
6949
6950         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
6951         when we detect Darwin 8.7.0's acl_get_file bug.
6952         Rearrange to perform the new (below) run-test while $LIBS
6953         contains any acl-related library.  Set USE_ACL at the end.
6954         (gl_ACL_GET_FILE): New function.
6955
6956 2006-09-26  Eric Blake  <ebb9@byu.net>
6957
6958         * lib/verror.c: Include <config.h> unconditionally.
6959
6960 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
6961
6962         * modules/clock-time (Maintainer): Add self.
6963         * modules/getlogin_r (Depends-on): Add extensions.
6964
6965 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6966
6967         * modules/clock-time: New module.
6968         * modules/nanosleep (Depends-on): Add clock-time.
6969         * modules/gethrxtime (Depends-on): Likewise.
6970         * modules/gettime (Depends-on): Likewise.
6971         * modules/settime (Depends-on): Likewise.
6972
6973         * modules/fts-lgpl: Depend on openat.
6974         * modules/mkancesdirs: Depend on savewd.
6975         * modules/mkdir-p: Likewise.
6976
6977 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6978
6979         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
6980
6981         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
6982         `gl_have_arbitrary_file_name_length_limit' to
6983         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
6984         actually works between configure runs.
6985
6986 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6987             Bruno Haible  <bruno@clisp.org>
6988
6989         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
6990
6991 2006-09-25  Jim Meyering  <jim@meyering.net>
6992
6993         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
6994         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
6995
6996 2006-09-25  Eric Blake  <ebb9@byu.net>
6997
6998         * gnulib-tool (func_import, func_create_testdir): Fix typos in
6999         exec's in 2006-09-18 patch when shuffling fds.
7000
7001 2006-09-25  Bruno Haible  <bruno@clisp.org>
7002
7003         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
7004         Reported by Jim Meyering.
7005
7006 2006-09-24  Jim Meyering  <jim@meyering.net>
7007
7008         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
7009         compare a pointer against a literal "0".  That caused failures with
7010         at least HP-UX's hpcc.
7011
7012 2006-09-22  Simon Josefsson  <jas@extundo.com>
7013
7014         * modules/gc-sha1:
7015         * modules/gc-md4:
7016         * modules/gc-hmac-sha1:
7017         * modules/gc-hmac-md5:
7018         * modules/gc-des:
7019         * modules/gc-arcfour: Distribute more files.
7020
7021 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7022
7023         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
7024         (gl_linked_iterator_from_to): Initialize struct completely.
7025         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
7026         (gl_tree_iterator_from_to): Likewise
7027         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
7028         * lib/gl_array_list.c [lint] (gl_array_iterator)
7029         (gl_array_iterator_from_to): Likewise.
7030         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
7031         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
7032         (gl_carray_iterator_from_to): Likewise.
7033
7034         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
7035         * lib/md4.c (md4_process_block): Remove unused variable.
7036         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
7037         parentheses for clarity.
7038
7039 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7040
7041         * modules/bison-i18n (Depends-on): Add gettext.
7042
7043 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7044
7045         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
7046         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
7047         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
7048         also add missing comma that caused broken test.
7049         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
7050         stdlib.h, for `abort'.
7051         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
7052         variables.
7053         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
7054         include unistd.h if present, for `rmdir'.
7055         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
7056         variables.
7057         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
7058         in the process include standard headers for prototypes.
7059         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
7060         gets declared on GNU/Linux.
7061         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
7062         unistd.h, for `rmdir'.
7063         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
7064
7065         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
7066         always true.
7067         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
7068
7069         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
7070
7071 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7072
7073         * gnulib-tool (func_version): Create output all at once.  This
7074         may help avoid triggering unnecessary SIGPIPEs, and at any
7075         rate it doesn't hurt.
7076
7077 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7078             Bruno Haible  <bruno@clisp.org>
7079
7080         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
7081         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
7082         * m4/signed.m4 (bh_C_SIGNED): Likewise.
7083
7084         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
7085         (gl_FUNC_VASPRINTF): Invoke it.
7086
7087 2006-09-22  Bruno Haible  <bruno@clisp.org>
7088
7089         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
7090         getloadavg.c as first argument.
7091
7092 2006-09-22  Bruno Haible  <bruno@clisp.org>
7093
7094         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
7095         at the beginning of the gl_INIT macro.
7096         * modules/getloadavg (configure.ac): Pass $gl_source_base to
7097         gl_GETLOADAVG.
7098
7099 2006-09-22  Bruno Haible  <bruno@clisp.org>
7100
7101         * gnulib-tool (func_create_megatestdir): Don't include the config-h
7102         module.
7103         Suggested by Ralf Wildenhues.
7104
7105 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
7106
7107         Import this patch from libc:
7108
7109         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
7110
7111         * lib/regex_internal.c (re_string_reconstruct): Handle
7112         offset < pstr->valid_raw_len && pstr->offsets_needed case.
7113         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
7114         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
7115         re_string_context_at.
7116
7117         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
7118         now requires it.
7119         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
7120         gl_REGEX now does it for us.
7121         (gl_REGEX): Add test taken from
7122         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
7123
7124         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
7125         Check that large offsets work.  Modernize Autoconf usages.
7126         Prefer "yes" to mean a good thing rather than a bad.
7127         Don't put "#define mkstemp" in config.h, as this might interfere
7128         with standard system headers that "#define mkstemp mkstemp64".
7129
7130         * modules/mkstemp (Depends-on): Add extensions, so that
7131         mkstemp is visible on some platforms.
7132         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
7133         (Include): Change to "mkstemp.h" from <stdlib.h>.
7134         (Files): Add mkstemp.h.
7135
7136         * lib/mkstemp.h: New file, since some standard headers
7137         #define mkstemp.
7138         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
7139         Include "mkstemp.h".
7140         Make the _LIBC code resemble glibc original more,
7141         e.g., use K&R style.
7142         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
7143         (mkstemp): Remove, since mkstemp.h does this for us.
7144         * lib/stdlib--.h: Include mkstemp.h.
7145
7146         Import this patch from libc:
7147
7148         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
7149
7150         * lib/tempname.c (__gen_tempname): Change attempts_min
7151         into a macro.  Use preprocessor to decide how to initialize
7152         attempts [Coverity CID 67].
7153
7154 2006-09-20  Bruno Haible  <bruno@clisp.org>
7155
7156         * lib/mkdtemp.c: Import from libc.
7157         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
7158                 * sysdeps/posix/tempname.c (__gen_tempname): Change
7159                 attempts_min into a macro.  Use preprocessor to decide how to
7160                 initialize attempts [Coverity CID 67].
7161         2001-11-27  Paul Eggert  <eggert@twinsun.com>
7162                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
7163                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
7164
7165 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7166
7167         * gnulib-tool (func_exit): New function, to allow to pass the
7168         exit status portably through the trap.  Use everywhere.
7169         (--help, --version): Signal a write error.
7170         (trap): catch SIGPIPE, for write errors.
7171         Exit at the end of the trap, with the correct exit status.
7172
7173 2006-09-19  Karl Berry  <karl@gnu.org>
7174
7175         * doc/gnulib.texi: note about the license texinfo files.
7176
7177 2006-09-19  Eric Blake  <ebb9@byu.net>
7178
7179         * gnulib-tool: Avoid space-tab.
7180
7181 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
7182
7183         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
7184         that prevented coreutils 6.1 from building.  Problem reported
7185         by Petter Reinholdtsen.
7186
7187 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
7188
7189         * gnulib-tool (avoidlist): Fix typo that broke options like
7190         --avoid=lock that are used by coreutils bootstrap.
7191
7192 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
7193
7194         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
7195         more systematically.
7196
7197 2006-09-18  Jim Meyering  <jim@meyering.net>
7198
7199         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
7200
7201 2006-09-18  Bruno Haible  <bruno@clisp.org>
7202
7203         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
7204
7205 2006-09-18  Bruno Haible  <bruno@clisp.org>
7206
7207         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
7208         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
7209         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
7210         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
7211         * m4/gettext.m4: Require autoconf >= 2.52.
7212         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
7213         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
7214         of gl_cv_header_inttypes_h.
7215
7216 2006-09-18  Bruno Haible  <bruno@clisp.org>
7217
7218         * lib/javaversion.c: Include configmake.h.
7219
7220 2006-09-18  Bruno Haible  <bruno@clisp.org>
7221
7222         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
7223         avoid that the while loops be executed in a subshell.
7224
7225 2006-09-18  Bruno Haible  <bruno@clisp.org>
7226
7227         * MODULES.html.sh (func_module): Break long lines.
7228         Suggested by Bruce Korb <bkorb@gnu.org>.
7229
7230 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7231
7232         Speed up by a factor of 1.12.
7233         * gnulib-tool (nl): New variable.
7234         (func_import): Rewrite include directive extraction to only read each
7235         directive once.
7236
7237 2006-09-17  Bruno Haible  <bruno@clisp.org>
7238
7239         * modules/javaversion (Makefile.am): Remove DEFS setting.
7240         (Depends-on): Add configmake, for PKGDATADIR definition.
7241
7242 2006-09-17  Bruno Haible  <bruno@clisp.org>
7243
7244         * gnulib-tool (func_create_testdir): Rewrite all files at once.
7245
7246 2006-09-17  Bruno Haible  <bruno@clisp.org>
7247
7248         * gnulib-tool (func_append): New function, stolen from libtool.m4.
7249         (func_modules_transitive_closure, func_modules_add_dummy,
7250         func_modules_to_filelist, func_import, func_create_testdir,
7251         func_create_megatestdir, ...): Use it wherever possible.
7252         Suggested by Ralf Wildenhues.
7253
7254 2006-09-16  Karl Berry  <karl@gnu.org>
7255
7256         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
7257         to avoid sectioning errors.
7258         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
7259         [ifinfo]: blank line after @center-ed titles.
7260         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
7261         Spell FSF address consistently with others.
7262         (These changes approved by rms.)
7263
7264 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7265
7266         Speed up by a factor of 1.61.
7267         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
7268         already checked module names again.
7269
7270 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7271
7272         Speed up by a factor of 1.13.
7273         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
7274         for new_files, and the input to func_add_or_update.
7275
7276 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7277
7278         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
7279         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
7280
7281 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7282
7283         * modules/mkancesdirs (Depends-on): Add fcntl.
7284         * modules/savewd: New file.
7285         * MODULES.html.sh (File system functions): Add savewd.
7286
7287         * modules/configmake (Makefile.am): Add support for the
7288         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
7289
7290 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7291
7292         * m4/savewd.m4: New file.
7293
7294 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7295
7296         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
7297         (dirchownmod): New arg FD.  All callers changed.
7298         Use FD rather than opening the directory ourself, as opening is
7299         now the caller's responsibility.
7300         * lib/dirchownmod.h: Likewise.
7301         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
7302         hosts that require <sys/types.h> before <sys/stat.h>.  Include
7303         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
7304         (test_dir): Remove.
7305         (mkancesdirs): Return length of prefix of FILE that has already
7306         been made, or -2 if there is a child doing the work.  Redo
7307         algorithm so that it is O(N) rather than O(N**2).  Optimize away
7308         ".", and treat ".." specially since it might stray back into
7309         already-created areas.  Use a subprocess if necessary.  New arg
7310         WD; all users changed.  MAKE_DIR function should now return 1
7311         if it creates a directory that is not readable.  Return -2 if
7312         a child process is spun off.
7313         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
7314         Adjust signature to match code.
7315         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
7316         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
7317         all users changed.
7318         * lib/savewd.c, lib/savewd.h: New files.
7319
7320 2006-09-15  Jim Meyering  <jim@meyering.net>
7321
7322         * modules/rename-dest-slash: New module.
7323         * MODULES.html.sh (posix_compat): Add it here.
7324
7325         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
7326
7327 2006-09-15  Jim Meyering  <jim@meyering.net>
7328
7329         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
7330         file.
7331
7332         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
7333
7334 2006-09-15  Jim Meyering  <jim@meyering.net>
7335
7336         * lib/rename-dest-slash.c (has_trailing_slash): Use
7337         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
7338         (rpl_rename_dest_slash): Perform the cheaper trailing slash
7339         test before testing whether SRC is a directory.
7340         Suggestions from Bruno Haible.
7341
7342         Avoid a warning about an unused variable.
7343         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
7344         into the #ifdef block where it's used.
7345
7346         * lib/rename-dest-slash.c: New file.
7347
7348 2006-09-14  Bruno Haible  <bruno@clisp.org>
7349
7350         * lib/allocsa.c: Include <config.h> unconditionally.
7351         * lib/asnprintf.c: Likewise.
7352         * lib/asprintf.c: Likewise.
7353         * lib/c-strcasecmp.c: Likewise.
7354         * lib/c-strcasestr.c: Likewise.
7355         * lib/c-strncasecmp.c: Likewise.
7356         * lib/c-strstr.c: Likewise.
7357         * lib/classpath.c: Likewise.
7358         * lib/clean-temp.c: Likewise.
7359         * lib/concatpath.c: Likewise.
7360         * lib/copy-file.c: Likewise.
7361         * lib/csharpcomp.c: Likewise.
7362         * lib/csharpexec.c: Likewise.
7363         * lib/execute.c: Likewise.
7364         * lib/fatal-signal.c: Likewise.
7365         * lib/findprog.c: Likewise.
7366         * lib/fwriteerror.c: Likewise.
7367         * lib/gl_array_list.c: Likewise.
7368         * lib/gl_array_oset.c: Likewise.
7369         * lib/gl_avltree_list.c: Likewise.
7370         * lib/gl_avltree_oset.c: Likewise.
7371         * lib/gl_avltreehash_list.c: Likewise.
7372         * lib/gl_carray_list.c: Likewise.
7373         * lib/gl_linked_list.c: Likewise.
7374         * lib/gl_linkedhash_list.c: Likewise.
7375         * lib/gl_list.c: Likewise.
7376         * lib/gl_oset.c: Likewise.
7377         * lib/gl_rbtree_list.c: Likewise.
7378         * lib/gl_rbtree_oset.c: Likewise.
7379         * lib/gl_rbtreehash_list.c: Likewise.
7380         * lib/imaxabs.c: Likewise.
7381         * lib/imaxdiv.c: Likewise.
7382         * lib/javacomp.c: Likewise.
7383         * lib/javaexec.c: Likewise.
7384         * lib/javaversion.c: Likewise.
7385         * lib/linebreak.c: Likewise.
7386         * lib/localcharset.c: Likewise.
7387         * lib/lock.c: Likewise.
7388         * lib/mbchar.c: Likewise.
7389         * lib/mbswidth.c: Likewise.
7390         * lib/mkdtemp.c: Likewise.
7391         * lib/pipe.c: Likewise.
7392         * lib/printf-args.c: Likewise.
7393         * lib/printf-parse.c: Likewise.
7394         * lib/progname.c: Likewise.
7395         * lib/progreloc.c: Likewise.
7396         * lib/readlink.c: Likewise.
7397         * lib/sh-quote.c: Likewise.
7398         * lib/stpcpy.c: Likewise.
7399         * lib/stpncpy.c: Likewise.
7400         * lib/strcasecmp.c: Likewise.
7401         * lib/strcasestr.c: Likewise.
7402         * lib/strcspn.c: Likewise.
7403         * lib/striconv.c: Likewise.
7404         * lib/strncasecmp.c: Likewise.
7405         * lib/strnlen1.c: Likewise.
7406         * lib/strstr.c: Likewise.
7407         * lib/strtok_r.c: Likewise.
7408         * lib/tls.c: Likewise.
7409         * lib/tmpdir.c: Likewise.
7410         * lib/unicodeio.c: Likewise.
7411         * lib/unsetenv.c: Likewise.
7412         * lib/vasnprintf.c: Likewise.
7413         * lib/vasprintf.c: Likewise.
7414         * lib/wait-process.c: Likewise.
7415         * lib/xallocsa.c: Likewise.
7416         * lib/xsetenv.c: Likewise.
7417         * lib/xstriconv.c: Likewise.
7418
7419 2006-09-13  Simon Josefsson  <jas@extundo.com>
7420
7421         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
7422         that internally, suggested by Ralf Wildenhues
7423         <Ralf.Wildenhues@gmx.de>.
7424
7425 2006-09-13  Simon Josefsson  <jas@extundo.com>
7426
7427         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
7428         @LIBOBJS@.
7429         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7430
7431 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
7432
7433         * lib/_fpending.c: Include <config.h> unconditionally, since we no
7434         longer worry about uses that don't define HAVE_CONFIG_H.
7435         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
7436         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
7437         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
7438         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
7439         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
7440         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
7441         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
7442         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
7443         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
7444         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
7445         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
7446         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
7447         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
7448         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
7449         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
7450         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
7451         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
7452         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
7453         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
7454         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
7455         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
7456         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
7457         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
7458         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
7459         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
7460         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
7461         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
7462         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
7463         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
7464         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
7465         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
7466         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
7467         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
7468         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
7469         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
7470         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
7471         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
7472         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
7473         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
7474         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
7475         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
7476         Likewise.
7477
7478 2006-09-13  Eric Blake  <ebb9@byu.net>
7479
7480         * lib/getopt.c: Fix typo in last commit.
7481
7482 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
7483
7484         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
7485         dgettext.
7486
7487 2006-09-12  Jim Meyering  <jim@meyering.net>
7488
7489         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
7490         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
7491         Reported by Nelson H. F. Beebe.
7492
7493 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7494
7495         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
7496         program_invocation_name and program_invocation_short_name are
7497         initialized.
7498         * lib/argp-namefrob.h: Move declarations of program_invocation_name
7499         and program_invocation_short_name to argp.h, so they are visible
7500         to user programs.
7501         * lib/argp.h: Likewise
7502
7503 2006-09-10  Bruno Haible  <bruno@clisp.org>
7504
7505         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
7506         m4/inttypes_h.m4, m4/uintmax_t.m4.
7507
7508 2006-09-10  Bruno Haible  <bruno@clisp.org>
7509
7510         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
7511         gl_AC_TYPE_UINTMAX_T.
7512
7513 2006-09-10  Bruno Haible  <bruno@clisp.org>
7514
7515         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
7516
7517 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7518
7519         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
7520         convention.  Text proposed by Bruno Haible.
7521         (struct argp_option): Document the use of N_() wrappers.
7522
7523         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
7524         '\v', and translate the two parts separately, instead of feeding
7525         the whole string to gettext.  This allows to exclude
7526         '\v' from the strings visible to the translator by writing doc
7527         strings as N_("..") "\v" N_("..").
7528
7529 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
7530
7531         * config/srclist.txt: Undo latest change; the bug was fixed.
7532
7533 2006-09-09  Bruno Haible  <bruno@clisp.org>
7534
7535         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
7536         assignments if building a library without libtool.
7537         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
7538         in func_emit_lib_Makefile_am.
7539         (func_import): When building a static library libfoo.a, arrange to
7540         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
7541         (func_create_testdir): Likewise.
7542         * modules/gc (configure.ac, Makefile.am): If building statically,
7543         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
7544         * modules/iconvme (configure.ac, Makefile.am): Likewise.
7545         * modules/striconv (configure.ac, Makefile.am): Likewise.
7546         Based on a suggestion by Ralf Wildenhues.
7547
7548 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7549
7550         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
7551         Check for unistd.h too, since Autoconf doesn't assume POSIX.
7552         Also:
7553
7554         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7555         Add year_2050_test to catch glibc bug 2821
7556         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
7557
7558         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7559         Prefer #ifdef to #if.
7560
7561         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
7562         Return from 'main' instead of calling 'exit'.
7563
7564 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7565
7566         * lib/mktime.c (guess_time_tm): Fix bug where mktime
7567         returned the maximum time_t value rather than (time_t) -1.
7568         Problem originally reported by William Bardwell
7569         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
7570
7571         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
7572         Moved to here ...
7573         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
7574         ... from here.
7575
7576 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7577
7578         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
7579         2821 is fixed.
7580
7581 2006-09-08  Jim Meyering  <jim@meyering.net>
7582
7583         Don't make generated files read-only.  That would bother too many
7584         people.  However, do retain the ability to work when targets are
7585         read-only: remove the destination and temporary files before writing
7586         them (when generated via sed or echo), or by using the -f option for
7587         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
7588         * modules/alloca-opt, modules/argz, modules/arpa_inet:
7589         * modules/byteswap, modules/configmake, modules/fcntl:
7590         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
7591         * modules/localcharset, modules/netinet_in, modules/poll:
7592         * modules/stdbool, modules/stdint, modules/sys_select:
7593         * modules/sys_socket, modules/sys_stat, modules/sysexits:
7594
7595 2006-09-08  Jim Meyering  <jim@meyering.net>
7596
7597         Avoid new build failure on FreeBSD 6.0.
7598         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
7599         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
7600         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
7601
7602 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7603
7604         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
7605
7606 2006-09-07  Jim Meyering  <jim@meyering.net>
7607
7608         Fix global typo in last change: use chmod u-w, not chmod u-x.
7609         Spotted by Paul Eggert and Bruce Korb.
7610         * modules/alloca-opt, modules/argz, modules/arpa_inet:
7611         * modules/byteswap, modules/configmake, modules/fcntl:
7612         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
7613         * modules/localcharset, modules/netinet_in, modules/poll:
7614         * modules/stdbool, modules/stdint, modules/sys_select:
7615         * modules/sys_socket, modules/sys_stat, modules/sysexits:
7616
7617 2006-09-06  Jim Meyering  <jim@meyering.net>
7618
7619         Make generated files be read-only.
7620         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
7621         Ensure that each generated file is now read-only.
7622         * modules/argz: Likewise.
7623         * modules/arpa_inet: Likewise.
7624         * modules/byteswap: Likewise.
7625         * modules/configmake: Likewise.
7626         * modules/fcntl: Likewise.
7627         * modules/fnmatch: Likewise.
7628         * modules/getopt: Likewise.
7629         * modules/glob: Likewise.
7630         * modules/inttypes: Likewise.
7631         * modules/netinet_in: Likewise.
7632         * modules/poll: Likewise.
7633         * modules/stdbool: Likewise.
7634         * modules/stdint: Likewise.
7635         * modules/sys_select: Likewise.
7636         * modules/sys_socket: Likewise.
7637         * modules/sys_stat: Likewise.
7638         * modules/sysexits: Likewise.
7639         * modules/localcharset: Same as above, but continue using temporary
7640         file named "t-$@" (why different?) rather than the "$@-t" used
7641         everywhere else.
7642
7643         * modules/sysexits (Makefile.am): Replace literal occurrences
7644         of "sysexit.h" more readable, and more consistent, "$@".
7645
7646 2006-09-06  Bruno Haible  <bruno@clisp.org>
7647
7648         * modules/striconv: New file.
7649         * modules/xstriconv: New file.
7650         * MODULES.html.sh (Internationalization functions): Add striconv,
7651         xstriconv.
7652
7653 2006-09-06  Bruno Haible  <bruno@clisp.org>
7654
7655         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
7656         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
7657         not using libtool correctly.
7658
7659 2006-09-06  Bruno Haible  <bruno@clisp.org>
7660
7661         * lib/striconv.h: New file.
7662         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
7663         iconvstring.c.
7664         * lib/xstriconv.h: New file.
7665         * lib/xstriconv.c: New file.
7666
7667 2006-09-06  Bruno Haible  <bruno@clisp.org>
7668
7669         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
7670         lib_..._LDFLAGS.
7671
7672 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7673
7674         * lib/argz_.h: Sync from Libtool.
7675
7676         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
7677                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7678
7679         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
7680
7681 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
7682
7683         * modules/trim: New file.
7684
7685 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
7686
7687         * lib/trim.h: New file.
7688         * lib/trim.c: New file.
7689
7690 2006-09-05  Bruno Haible  <bruno@clisp.org>
7691
7692         * MODULES.html.sh (String handling): Add trim.
7693
7694 2006-09-04  Karl Berry  <karl@gnu.org>
7695
7696         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
7697         until next release.
7698
7699 2006-09-03  Bruno Haible  <bruno@clisp.org>
7700
7701         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
7702         correctly.
7703
7704 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7705
7706         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
7707         not gl_GETLOADAVG.  Omit unneeded semicolons.
7708         Problems reported by Ralf Wildenhues in
7709         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
7710         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
7711         at the end, which is the usual gnulib style.
7712
7713         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
7714         of doing all the work ourselves.
7715         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
7716         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
7717
7718 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7719
7720         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
7721         Problem reported by Ralf Wildenhues in
7722         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
7723
7724         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
7725         HAVE_STRUCT_STATFS_F_FSTYPENAME.
7726
7727 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7728
7729         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
7730         yesterday's patch by changing test -n to test -z.
7731
7732 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7733
7734         * modules/getloadavg (Files): Add m4/getloadavg.m4.
7735         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
7736         the former is now obsolescent.
7737
7738         * modules/chdir-long (Depends-on): Add fcntl.
7739
7740 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7741
7742         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
7743         obsolescent, and programs should use gnulib instead.
7744         * m4/getloadavg.m4: New file, with contents taken from Autoconf
7745         but with prefixes changed.
7746
7747 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7748
7749         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
7750         or stdbool.h, because they might not exist while configuring.
7751
7752         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
7753         Don't include unistd.h or limits.h; not needed, since chdir-long.h
7754         does that for us.
7755         (O_DIRECTORY): Remove.
7756
7757 2006-08-31  Eric Blake  <ebb9@byu.net>
7758
7759         * gnulib-tool: Don't let emacs change spaces to TAB.
7760
7761 2006-08-31  Bruno Haible  <bruno@clisp.org>
7762
7763         * gnulib-tool: When calling func_import more than once, do it in a
7764         subshell.
7765         Reported by Eric Blake <ebb9@byu.net>.
7766
7767 2006-08-31  Bruno Haible  <bruno@clisp.org>
7768
7769         * gnulib-tool (nl): Remove variable.
7770         (sed_transform_lib_file): Use more robust test for config-h module.
7771         (func_import): Fix typo in 2006-08-25 patch.
7772
7773 2006-08-31  Bruno Haible  <bruno@clisp.org>
7774
7775         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
7776         specified, augment Makefile.am variables instead of assigning them.
7777
7778 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7779
7780         Work around a bug in both the Linux and SunOS 64-bit kernels:
7781         nanosleep mishandles sleeps for longer than 2**31 seconds.
7782         Problem reported by Frank v Waveren in
7783         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
7784         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
7785         Check for nanosleep bug.
7786         (LIB_NANOSLEEP): Append clock_gettime library if needed.
7787
7788 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7789
7790         Work around a bug in both the Linux and SunOS 64-bit kernels:
7791         nanosleep mishandles sleeps for longer than 2**31 seconds.
7792         Problem reported by Frank v Waveren in
7793         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
7794         * lib/nanosleep.c (BILLION): New constant.
7795         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
7796         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
7797         implementation.
7798
7799 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7800
7801         * modules/nanosleep (Depends-on): Add gettime.
7802
7803 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7804         and Simon Josefsson  <jas@extundo.com>
7805         and Oskar Liljeblad  <oskar@osk.mine.nu>
7806
7807         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
7808         * gnulib-tool (func_import): New license type 'unmodifiable license
7809         text'.
7810         * modules/fdl: Use it.  Longer description.
7811         * module/gpl, module/lgpl: New files.
7812
7813 2006-08-30  Jim Meyering  <jim@meyering.net>
7814
7815         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
7816         shadowing the parameter.
7817
7818 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7819
7820         Sync from Libtool:
7821
7822         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7823
7824         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
7825         sharing with gnulib.  Report by Eric Blake.
7826
7827 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7828
7829         * modules/isapipe: New file.
7830         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
7831
7832 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7833
7834         * modules/configmake (Makefile.am): Add a comment, and omit
7835         the CONFIGMAKE_ prefix from generated macro names.  Suggested
7836         by Bruno Haible.
7837
7838 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7839
7840         * m4/isapipe.m4: New file.
7841
7842 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7843
7844         * lib/isapipe.c, lib/isapipe.h: New files.
7845
7846 2006-08-29  Jim Meyering  <jim@meyering.net>
7847
7848         * modules/configmake (Makefile.am): Make configmake.h depend on
7849         Makefile.  Otherwise, a stale configmake.h could hang around.
7850
7851 2006-08-29  Eric Blake  <ebb9@byu.net>
7852
7853         * lib/error.c (error_at_line, print_errno_message): Match libc, after
7854         resolution of upstream bug 3044.
7855
7856 2006-08-29  Bruno Haible  <bruno@clisp.org>
7857
7858         * modules/localcharset (Depends-on): Add configmake.
7859         (Makefile.am): Remove setting of LIBDIR through DEFS.
7860
7861 2006-08-29  Bruno Haible  <bruno@clisp.org>
7862
7863         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
7864         defined.
7865
7866 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7867
7868         * modules/fcntl: New file.
7869         * modules/chdir-safer (Depends-on): Add fcntl.
7870         * modules/fts: Likewise.
7871         * modules/mkdir-p: Likewise.
7872
7873         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
7874         This undoes the most recent change, since we're now addressing the
7875         problem in a different way.
7876
7877         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
7878         into output, since the output might be called Makefile.am even
7879         if $makefile_name is something different.
7880         (func_import): Use $makefile_am rather than
7881         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
7882         empty.
7883
7884         * modules/inttypes (Files): Add m4/inttypes-h.m4.
7885
7886 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7887
7888         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
7889         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
7890         recent change to stdint.m4, since we're now addressing the problem in a
7891         different way.
7892
7893 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7894
7895         * m4/fcntl_h.m4: New file.
7896
7897 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7898
7899         * lib/fcntl_.h: New file.
7900         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
7901         the fcntl module.
7902         * lib/dirchownmod.c: Likewise.
7903         * lib/fts.c: Likewise.
7904
7905         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
7906         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
7907         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
7908         just before including <inttypes.h>, to avoid circular inclusion.
7909
7910 2006-08-28  Jim Meyering  <jim@meyering.net>
7911
7912         * doc/visibility.texi: Actually read and correct the grammar of the
7913         sentence affected by yesterday's change.
7914
7915 2006-08-28  Eric Blake  <ebb9@byu.net>
7916
7917         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
7918         needs wrapper.
7919
7920 2006-08-28  Eric Blake  <ebb9@byu.net>
7921
7922         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
7923
7924 2006-08-28  Eric Blake  <ebb9@byu.net>
7925
7926         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
7927
7928 2006-08-28  Bruno Haible  <bruno@clisp.org>
7929
7930         * modules/c-strstr: New file, from GNU gettext.
7931         * MODULES.html.sh (String handling): Add c-strstr.
7932
7933 2006-08-28  Bruno Haible  <bruno@clisp.org>
7934
7935         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
7936         macros.
7937         Reported by Eric Blake.
7938
7939 2006-08-28  Bruno Haible  <bruno@clisp.org>
7940
7941         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
7942         (VASNPRINTF): Return a string of length > INT_MAX without failing.
7943         * lib/vasprintf.c: Include errno.h, limits.h.
7944         (EOVERFLOW): New fallback definition.
7945         (vasprintf): Test here whether the string length is > INT_MAX.
7946         * lib/vsnprintf.c: Include errno.h, limits.h.
7947         (EOVERFLOW): New fallback definition.
7948         (vsnprintf): Fix bug when generated string was too long for the buffer.
7949         Test here whether the string length is > INT_MAX.
7950
7951 2006-08-28  Bruno Haible  <bruno@clisp.org>
7952
7953         * lib/inttypes_.h (SCNX*): Remove definitions.
7954         Reported by Eric Blake.
7955
7956 2006-08-28  Bruno Haible  <bruno@clisp.org>
7957
7958         * lib/c-strstr.h: New file, from GNU gettext.
7959         * lib/c-strstr.c: New file, from GNU gettext.
7960
7961 2006-08-28  Bruno Haible  <bruno@clisp.org>
7962
7963         * gnulib-tool: Reorder some statements.
7964
7965 2006-08-28  Bruno Haible  <bruno@clisp.org>
7966
7967         * gnulib-tool: New option --makefile-name.
7968         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
7969         $makefile_name.
7970         (func_import): Write $makefile_name to the cache file, and read it from
7971         there unless explicitly specified. Use $makefile_name as file name
7972         instead of Makefile.am. Adjust the recommendations accordingly.
7973
7974 2006-08-28  Bruno Haible  <bruno@clisp.org>
7975
7976         * gnulib-tool (func_verify_module): Check against misapplying patch.
7977
7978 2006-08-28  Bruno Haible  <bruno@clisp.org>
7979
7980         * gnulib-tool (func_relativize, func_relconcat): New functions.
7981         Give an error if --local-dir is given with --update.
7982         Remove trailing slashes from $local_gnulib_dir.
7983         (func_import): Store the relativized $local_gnulib_dir in
7984         gnulib-cache.m4, and read it from there if not specified explicitly.
7985
7986 2006-08-28  Bruno Haible  <bruno@clisp.org>
7987
7988         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
7989         is the current directory. Respect also $local_gnulib_dir.
7990
7991 2006-08-28  Bruno Haible  <bruno@clisp.org>
7992             Simon Josefsson  <jas@extundo.com>
7993
7994         BeOS portability.
7995         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
7996
7997 2006-08-27  Jim Meyering  <jim@meyering.net>
7998
7999         * doc/visibility.texi: Remove duplicate word: "pointer".
8000
8001 2006-08-26  Bruno Haible  <bruno@clisp.org>
8002
8003         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
8004         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
8005         (Makefile.am): Create inttypes.h from inttypes_.h.
8006         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
8007
8008         * modules/imaxabs: New file.
8009
8010         * modules/imaxdiv: New file.
8011
8012 2006-08-26  Bruno Haible  <bruno@clisp.org>
8013
8014         * m4/inttypes.m4: New file.
8015         * m4/_inttypes_h.m4: Remove file.
8016         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
8017         PRI_MACROS_BROKEN.
8018         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
8019
8020         * m4/imaxabs.m4: New file.
8021
8022         * m4/imaxdiv.m4: New file.
8023
8024 2006-08-26  Bruno Haible  <bruno@clisp.org>
8025
8026         * lib/inttypes_.h: New file.
8027         * lib/inttypes.h: Remove file.
8028         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
8029
8030         * lib/imaxabs.c: New file.
8031
8032         * lib/imaxdiv.c: New file.
8033
8034 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8035
8036         New config-h module, so that "make" output needn't be cluttered
8037         by -DHAVE_CONFIG_H.
8038         * MODULES.html.sh (Support for building libraries and executables):
8039         Add config-h.
8040         * modules/config-h: New file.
8041         * gnulib-tool (nl, sed_transform_lib_file): New vars.
8042         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
8043         the config-h module is used.
8044
8045         New configmake module, so that "make" output needn't be cluttered
8046         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
8047         * MODULES.html.sh (Support for building libraries and executables):
8048         Add configmake.
8049         * modules/configmake: New file.
8050
8051 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8052
8053         * m4/config-h.m4: New file.
8054
8055 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8056
8057         * config/srclist.txt: Add elisp-comp.
8058
8059 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8060
8061         * MODULES.html.sh (Support for building libraries and executables):
8062         Add elisp-comp.
8063         * build-aux/elisp-comp: New file.
8064         * modules/elisp-comp: New file.
8065
8066 2006-08-24  Bruno Haible  <bruno@clisp.org>
8067
8068         * gnulib-tool (func_create_testdir): Use non-default values of
8069         sourcebase and m4base.
8070
8071 2006-08-24  Bruno Haible  <bruno@clisp.org>
8072
8073         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
8074         HTML structure.
8075
8076 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
8077
8078         * modules/openat (Depends-on): Add lchown.
8079
8080 2006-08-23  Bruno Haible  <bruno@clisp.org>
8081
8082         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
8083         of gl_LOCK_EARLY instead of gl_LOCK.
8084
8085 2006-08-23  Bruno Haible  <bruno@clisp.org>
8086
8087         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
8088         on OSF/1 to no.
8089         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
8090
8091 2006-08-23  Bruno Haible  <bruno@clisp.org>
8092
8093         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
8094         as unusable.
8095
8096         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
8097         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
8098         (gl_LOCK): New macro.
8099
8100 2006-08-22  Simon Josefsson  <jas@extundo.com>
8101
8102         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
8103         to md5 module.
8104
8105 2006-08-22  Simon Josefsson  <jas@extundo.com>
8106
8107         * MODULES.html.sh: Add "Support for maintaining and release
8108         projects".
8109
8110         * build-aux/gnupload: New file, from coreutils.
8111
8112 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8113
8114         Avoid the need for AC_LIBSOURCES in m4 macros.
8115         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
8116         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
8117         * modules/check-version (EXTRA_DIST): Add check-version.h.
8118         * modules/crc (EXTRA_DIST): Add crc.h.
8119         * modules/des (EXTRA_DIST): Add des.h.
8120         * modules/gc (EXTRA_DIST): Add gc.h.
8121         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
8122         * modules/getline (EXTRA_DIST): Add getline.h.
8123         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
8124         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
8125         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
8126         * modules/md2 (EXTRA_DIST): Add md2.h.
8127         * modules/md4 (EXTRA_DIST): Add md4.h.
8128         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
8129         * modules/read-file (EXTRA_DIST): Add read-file.h.
8130         * modules/readline (EXTRA_DIST): Add readline.h.
8131         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
8132         rijndael-api-fst.h.
8133
8134 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8135
8136         * m4/rijndael.m4 (gl_ARCFOUR):
8137         * m4/arctwo.m4 (gl_ARCTWO):
8138         * m4/check-version.m4 (gl_CHECK_VERSION):
8139         * m4/crc.m4 (gl_CRC):
8140         * m4/des.m4 (gl_DES):
8141         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
8142         * m4/gc.m4 (gl_GC):
8143         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
8144         * m4/getline.m4 (gl_FUNC_GETLINE):
8145         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
8146         * m4/hmac-md5.m4 (gl_HMAC_MD5):
8147         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
8148         * m4/md2.m4 (gl_MD2):
8149         * m4/md4.m4 (gl_MD4):
8150         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
8151         * m4/read-file.m4 (gl_FUNC_READ_FILE):
8152         * m4/readline.m4 (gl_FUNC_READLINE):
8153         * m4/rijndael.m4 (gl_RIJNDAEL):
8154         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
8155         to get the necessary .h files and whatnot.
8156
8157 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8158
8159         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
8160         gnulib rather than the other way around.
8161         * config/srclistvars.sh (COREUTILS): Remove.
8162
8163 2006-08-22  Jim Meyering  <jim@meyering.net>
8164
8165         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
8166
8167         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
8168
8169 2006-08-22  Eric Blake  <ebb9@byu.net>
8170
8171         * modules/regexprops-generic: New file.
8172         * MODULES.html.sh (Support for building documentation): List it.
8173
8174 2006-08-22  Eric Blake  <ebb9@byu.net>
8175
8176         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
8177         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
8178         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
8179         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
8180
8181 2006-08-22  Bruno Haible  <bruno@clisp.org>
8182
8183         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
8184         and lib_LTLIBRARIES like the other lib_* variables.
8185
8186 2006-08-22  Bruno Haible  <bruno@clisp.org>
8187
8188         * build-aux/x-to-1.in: New file, from GNU gettext.
8189
8190 2006-08-22  Bruno Haible  <bruno@clisp.org>
8191
8192         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
8193         <utmpx.h> exists.
8194
8195 2006-08-22  Bruno Haible  <bruno@clisp.org>
8196
8197         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
8198         <utmpx.h> exists.
8199
8200 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8201
8202         BeOS portability.
8203         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
8204         exist.
8205         Problem reported by Bruno Haible.
8206
8207 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8208
8209         Avoid the need for AC_LIBSOURCES in m4 macros.
8210         * modules/acl (EXTRA_DIST): Add acl.h.
8211         * modules/argmatch (Files): Add m4/argmatch.m4.
8212         (configure.ac): Add gl_ARGMATCH.
8213         (EXTRA_DIST): Renamed from lib_SOURCES, for
8214         consistency with the other modules.  Remove argmatch.c.
8215         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
8216         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
8217         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
8218         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
8219         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
8220         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
8221         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
8222         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
8223         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
8224         * modules/closeout (EXTRA_DIST): Add closeout.h.
8225         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
8226         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
8227         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
8228         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
8229         dirname.h; remove basename.c and stripslash.c.
8230         * modules/exclude (EXTRA_DIST): Add exclude.h.
8231         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
8232         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
8233         * modules/file-type (EXTRA_DIST): Add file-type.h.
8234         * modules/filemode (EXTRA_DIST): Add filemode.h.
8235         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
8236         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
8237         * modules/fpending (EXTRA_DIST): Add __fpending.h.
8238         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
8239         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
8240         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
8241         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
8242         * modules/getdate (EXTRA_DIST): Add getdate.c.
8243         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
8244         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
8245         * modules/getpass (EXTRA_DIST): Add getpass.h.
8246         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
8247         * modules/group-member (EXTRA_DIST): Add group-member.h.
8248         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
8249         * modules/hash (EXTRA_DIST): Add hash.h.
8250         * modules/human (EXTRA_DIST): Add human.h.
8251         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
8252         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
8253         * modules/lchown (EXTRA_DIST): Add lchown.h.
8254         * modules/long-options (EXTRA_DIST): Add long-options.h.
8255         * modules/lstat (EXTRA_DIST): Add lstat.h.
8256         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
8257         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
8258         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
8259         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
8260         * modules/memxor (EXTRA_DIST): Add memxor.h.
8261         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
8262         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
8263         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
8264         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
8265         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
8266         * modules/physmem (EXTRA_DIST): Add physmem.h.
8267         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
8268         * modules/posixver (EXTRA_DIST): Add posixver.h.
8269         * modules/quote (EXTRA_DIST): Add quote.h.
8270         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
8271         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
8272         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
8273         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
8274         regex_internal.h regexec.c.
8275         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
8276         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
8277         * modules/same (EXTRA_DIST): Add same.h.
8278         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
8279         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
8280         * modules/savedir (EXTRA_DIST): Add savedir.h.
8281         * modules/sha1 (EXTRA_DIST): Add sha1.h.
8282         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
8283         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
8284         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
8285         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
8286         * modules/strdup (EXTRA_DIST): Add strdup.h.
8287         * modules/strftime (EXTRA_DIST): Add strftime.h.
8288         * modules/strndup (EXTRA_DIST): Add strndup.h.
8289         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
8290         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
8291         * modules/time_r (EXTRA_DIST): Add time_r.h.
8292         * modules/timespec (EXTRA_DIST): Add timespec.h.
8293         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
8294         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
8295         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
8296         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
8297         * modules/userspec (EXTRA_DIST): Add userspec.h.
8298         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
8299         * modules/utimens (EXTRA_DIST): Add utimens.h.
8300         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
8301         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
8302         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
8303         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
8304         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
8305         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
8306         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
8307         * modules/yesno (EXTRA_DIST): Add yesno.h.
8308
8309 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8310
8311         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
8312
8313         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
8314         * m4/dev-ino.m4, same-inode.m4: Remove.
8315
8316         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
8317         * m4/acl.m4 (AC_FUNC_ACL):
8318         * m4/backupfile.m4 (gl_BACKUPFILE):
8319         * m4/c-strtod.m4 (gl_C99_STRTOLD):
8320         * m4/canon-host.m4 (gl_CANON_HOST):
8321         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
8322         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
8323         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
8324         * m4/cloexec.m4 (gl_CLOEXEC):
8325         * m4/close-stream.m4 (gl_CLOSE_STREAM):
8326         * m4/closeout.m4 (gl_CLOSEOUT):
8327         * m4/dirfd.m4 (gl_FUNC_DIRFD):
8328         * m4/dirname.m4 (gl_DIRNAME):
8329         * m4/exclude.m4 (gl_EXCLUDE):
8330         * m4/exitfail.m4 (gl_EXITFAIL):
8331         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
8332         * m4/file-type.m4 (gl_FILE_TYPE):
8333         * m4/filemode.m4 (gl_FILEMODE):
8334         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
8335         * m4/fpending.m4 (gl_FUNC_FPENDING):
8336         * m4/fprintftime.m4 (gl_FPRINTFTIME):
8337         * m4/fts.m4 (gl_FUNC_FTS):
8338         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
8339         * m4/getdate.m4 (gl_GETDATE):
8340         * m4/gethrxtime.m4 (gl_GETHRXTIME):
8341         * m4/getpagesize.m4 (gl_GETPAGESIZE):
8342         * m4/getpass.m4 (gl_FUNC_GETPASS):
8343         * m4/gettime.m4 (gl_GETTIME):
8344         * m4/getugroups.m4 (gl_GETUGROUPS):
8345         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
8346         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
8347         * m4/hard-locale.m4 (gl_HARD_LOCALE):
8348         * m4/hash.m4 (gl_HASH):
8349         * m4/idcache.m4 (gl_IDCACHE):
8350         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
8351         * m4/lchown.m4 (gl_FUNC_LCHOWN):
8352         * m4/long-options.m4 (gl_LONG_OPTIONS):
8353         * m4/lstat.m4 (gl_FUNC_LSTAT):
8354         * m4/md5.m4 (gl_MD5):
8355         * m4/memcasecmp.m4 (gl_MEMCASECMP):
8356         * m4/memcoll.m4 (gl_MEMCOLL):
8357         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
8358         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
8359         * m4/memxor.m4 (gl_MEMXOR):
8360         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
8361         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
8362         * m4/modechange.m4 (gl_MODECHANGE):
8363         * m4/mountlist.m4 (gl_MOUNTLIST):
8364         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
8365         * m4/openat.m4 (gl_FUNC_OPENAT):
8366         * m4/pathmax.m4 (gl_PATHMAX):
8367         * m4/physmem.m4 (gl_PHYSMEM):
8368         * m4/posixtm.m4 (gl_POSIXTM):
8369         * m4/posixver.m4 (gl_POSIXVER):
8370         * m4/quote.m4 (gl_QUOTE):
8371         * m4/quotearg.m4 (gl_QUOTEARG):
8372         * m4/readtokens.m4 (gl_READTOKENS):
8373         * m4/readutmp.m4 (gl_READUTMP):
8374         * m4/regex.m4 (gl_REGEX):
8375         * m4/safe-read.m4 (gl_SAFE_READ):
8376         * m4/safe-write.m4 (gl_SAFE_WRITE):
8377         * m4/same.m4 (gl_SAME):
8378         * m4/save-cwd.m4 (gl_SAVE_CWD):
8379         * m4/savedir.m4 (gl_SAVEDIR):
8380         * m4/settime.m4 (gl_SETTIME):
8381         * m4/sha1.m4 (gl_SHA1):
8382         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
8383         * m4/stat-macros.m4 (gl_STAT_MACROS):
8384         * m4/stat-time.m4 (gl_STAT_TIME):
8385         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
8386         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
8387         * m4/strdup.m4 (gl_FUNC_STRDUP):
8388         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
8389         * m4/strndup.m4 (gl_FUNC_STRNDUP):
8390         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
8391         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
8392         * m4/time_r.m4 (gl_TIME_R):
8393         * m4/timespec.m4 (gl_TIMESPEC):
8394         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
8395         * m4/unlinkdir.m4 (gl_UNLINKDIR):
8396         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
8397         * m4/userspec.m4 (gl_USERSPEC):
8398         * m4/utimecmp.m4 (gl_UTIMECMP):
8399         * m4/utimens.m4 (gl_UTIMENS):
8400         * m4/xalloc.m4 (gl_XALLOC):
8401         * m4/xgetcwd.m4 (gl_XGETCWD):
8402         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
8403         * m4/xreadlink.m4 (gl_XREADLINK):
8404         * m4/xstrtod.m4 (gl_XSTRTOD):
8405         * m4/yesno.m4 (gl_YESNO):
8406         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
8407         to get the necessary .h files and whatnot.
8408
8409 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
8410             Bruno Haible  <bruno@clisp.org>
8411
8412         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
8413         /bin/sh understanding of '!' conditional negation.
8414
8415 2006-08-21  Jim Meyering  <jim@meyering.net>
8416
8417         * modules/openat (Depends-on): Really alphabetize.
8418
8419         * modules/acl (Depends-on): Add error and quote.
8420
8421         * check-module (find_included_lib_files): Add at-func.c to the
8422         ok-to-include-more-than-once white list.
8423
8424         * modules/openat (Depends-on): Add lstat.  Alphabetize.
8425
8426 2006-08-21  Bruno Haible  <bruno@clisp.org>
8427
8428         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8429         Emit a pkgdata_DATA variable only if some snippets add contents to it.
8430         Reported by Martin Lambers <marlam@marlam.de>.
8431
8432 2006-08-21  Bruno Haible  <bruno@clisp.org>
8433
8434         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
8435         specify an installation location, don't emit a noinst_LIBRARIES or
8436         noinst_LTLIBRARIES assignment.
8437
8438 2006-08-21  Bruno Haible  <bruno@clisp.org>
8439
8440         BeOS portability.
8441         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
8442         BeOS has mbrtowc() but no <wctype.h>.
8443
8444 2006-08-21  Bruno Haible  <bruno@clisp.org>
8445
8446         BeOS portability.
8447         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
8448         exist.
8449
8450 2006-08-21  Bruno Haible  <bruno@clisp.org>
8451
8452         BeOS portability.
8453         * lib/mbchar.h: Include <wctype.h> only if it exists.
8454
8455 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8456
8457         Remove files that are no longer needed by their respective modules.
8458         * m4/obstack.m4: Remove.
8459         * m4/strerror_r.m4: Remove.
8460         * m4/uint32_t.m4: Remove.
8461         * m4/uintptr_t.m4: Remove.
8462         * m4/ullong_max.m4: Remove.
8463         * m4/xstrtoimax.m4: Remove.
8464         * m4/xstrtoumax.m4: Remove.
8465
8466         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
8467         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
8468         dependencies now capture this.
8469
8470         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
8471         Do not use AC_LIBSOURCES, since gnulib modules now do this.
8472         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
8473         * m4/human.m4 (gl_HUMAN): Likewise.
8474         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
8475         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
8476
8477         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
8478
8479         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
8480         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
8481         stdint.
8482         * m4/human.m4 (gl_HUMAN): Likewise.
8483         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
8484         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
8485         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
8486         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
8487         * m4/xstrtol (gl_XSTRTOL): Likewise.
8488
8489         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
8490         AC_TYPE_LONG_LONG_INT.
8491         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
8492         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
8493         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
8494         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
8495
8496         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
8497         on stdbool.
8498
8499         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
8500         (gl_PREREQ_XSTRTOUL): Remove.
8501
8502         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
8503
8504         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
8505         mode.
8506
8507 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8508
8509         Add and change modules to make it easier for coreutils to use
8510         gnulib-tool.
8511         * modules/backupfile (Files): Remove m4/d-ino.m4.
8512         (Depends-on): Add d-ino.
8513         * modules/cycle-check (Depends-on): Add stdint.
8514         (lib_SOURCES): Add cycle-check.h.
8515         * modules/d-ino: New module.
8516         * modules/d-type: New module.
8517         * modules/error (Files): Remove m4/strerror_r.m4.
8518         * modules/filemode (Files): Add m4/st_dm_mode.m4.
8519         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
8520         m4/inttypes_h.m4, m4/uintmax_t.m4.
8521         (Depends-on): Add stdint.
8522         (lib_SOURCES): Add fsusage.h.
8523         * modules/getcwd (Files): Remove d-ino.m4.
8524         (Depends-on): Add d-ino.
8525         * modules/getndelim2 (Depends-on): Add stdint.
8526         * modules/glob (Files): Remove m4/d-type.m4.
8527         (Depends-on): Add d-type.
8528         * modules/host-os: New module.
8529         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
8530         m4/inttypes_h.m4, m4/uintmax_t.m4.
8531         * Depends-on: Add stdint.
8532         (lib_SOURCES): Add human.h.
8533         * modules/inttostr (Files): Remove m4/intmax_t.m4,
8534         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
8535         m4/uintmax_t.m4, m4/ulonglong.m4.
8536         (Depends-on): Add stdint.
8537         (EXTRA_DIST): Add inttostr.h.
8538         * modules/lchmod: New module.
8539         * modules/link-follow: New module.
8540         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
8541         (Depends-on): Add lchmod.
8542         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
8543         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
8544         (Depends-on): Add stdint.
8545         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
8546         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8547         (Depends-on): Add stdint.
8548         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
8549         * modules/perl: New module.
8550         * modules/regex (Depends-on): Add stdint.
8551         * modules/rmdir-errno: New module.
8552         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
8553         m4/intmax_t.m4.
8554         (Depends-on): Add stdint.
8555         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
8556         m4/uintmax_t.m4.
8557         (Depends-on): Add stdint.
8558         * modules/unlink-busy: New module.
8559         * modules/utimecmp (Depends-on): Add stdint.
8560         * modules/uptime: New module.
8561         * modules/winsz-ioctl: New module.
8562         * modules/winsz-termios: New module.
8563         * modules/xnanosleep (Depends-on): Add nanosleep.
8564         * modules/ullong_max: Remove.
8565         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
8566         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
8567         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
8568         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
8569         (Depends-on): Add inttypes.
8570         (lib_SOURCES): Add xstrtol.h.
8571         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
8572         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
8573         * MODULES.html.sh: Move 'assert' into the assert section.
8574         Move 'dummy' into the linking section.
8575         Remove ullong_max.
8576         Add section for compatibility checks for POSIX:2001 functions,
8577         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
8578         winsz-ioctl, and winsz-termios into it.
8579         Add lchmod.
8580         Add top-level Misc section and put host-os, perl, and uptime
8581         into it.
8582
8583 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8584
8585         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
8586         now assume the stdint module.  Do not include inttypes.h.
8587         * lib/fsusage.h: Likewise.
8588         * lib/getndelim2.c: Likewise.
8589         * lib/human.h: Likewise.
8590         * lib/inttostr.h: Likewise.
8591         * lib/obstack.c: Likewise.
8592         * lib/regex_internal.h: Likewise.
8593         * lib/tempname.c: Likewise.
8594         * lib/utimecmp.c: Likewise.
8595         * lib/xstrtol.h: Likewise.
8596
8597         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
8598
8599         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
8600         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
8601         * lib/xtime.h: Likewise.
8602
8603 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
8604
8605         * modules/openat (Files): Add lib/fchmodat.c.
8606         Fixes problem reported by Jay Youngman.
8607
8608 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
8609
8610         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
8611         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
8612
8613 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
8614             Bruno Haible  <bruno@clisp.org>
8615
8616         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
8617         and is a script that invokes bison. Tighten the code. Add comments.
8618
8619 2006-08-18  Jim Meyering  <jim@meyering.net>
8620
8621         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
8622         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
8623         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
8624         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
8625
8626 2006-08-18  Bruno Haible  <bruno@clisp.org>
8627
8628         * modules/bison-i18n: New file.
8629         * MODULES.html.sh (Internationalization functions): Add it.
8630
8631 2006-08-18  Bruno Haible  <bruno@clisp.org>
8632
8633         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
8634         sys/statvfs.h. When getmntinfo was found, check its declaration and
8635         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
8636
8637 2006-08-18  Bruno Haible  <bruno@clisp.org>
8638
8639         * m4/bison-i18n.m4: New file, from bison.
8640
8641 2006-08-18  Bruno Haible  <bruno@clisp.org>
8642
8643         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
8644         (ME_DUMMY): Treat "kernfs" as a dummy.
8645         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
8646
8647 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
8648
8649         Update from coreutils.
8650
8651         2006-08-15  Jim Meyering  <jim@meyering.net>
8652
8653         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
8654
8655         2006-01-17  Jim Meyering  <jim@meyering.net>
8656
8657         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
8658
8659         2006-01-11  Jim Meyering  <jim@meyering.net>
8660
8661         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
8662         Check for the lchmod function.
8663
8664 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
8665
8666         Update from coreutils.
8667
8668         * lib/__fpending.h: Add copyright notice.
8669         * lib/fprintftime.h: Likewise.
8670         * lib/savedir.c: Use (C) in copyright notice.
8671         * lib/savedir.h: Likewise.
8672
8673         2006-08-15  Jim Meyering  <jim@meyering.net>
8674
8675         * lib/at-func.c: New file, with the logic of all emulated at-functions.
8676         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
8677         in support of the EXPECTED_ERRNO macro.
8678         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
8679         definitions.  Instead, define the appropriate symbols and include
8680         "at-func.c".
8681         * lib/mkdirat.c (mkdirat): Likewise.
8682         * lib/fchmodat.c (fchmodat): Likewise.
8683         (ENOSYS): Remove definition.
8684         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
8685         it.  Don't include "unistd--.h" -- it wasn't ever used.
8686
8687         2006-01-17  Jim Meyering  <jim@meyering.net>
8688
8689         Rewrite fts.c not to change the current working directory,
8690         by using openat, fstatat, fdopendir, etc..
8691
8692         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
8693         (HAVE_OPENAT_SUPPORT): Define.
8694         [_LIBC] (fchdir): Don't undef or define; no longer used.
8695         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
8696         Now, this `function' always succeeds, and consumes its file descriptor
8697         parameter -- so callers must not close such FDs.  Update callers.
8698         (diropen_fd, opendirat, cwd_advance_fd): New functions.
8699         (diropen): Add parameter, SP.  Adjust all callers.
8700         Implement using diropen_fd, rather than open.
8701         (fts_open): Initialize new member, fts_cwd_fd.
8702         Remove fts_rft-setting code.
8703         (fts_close): Close fts_cwd_fd, if necessary.
8704         (__opendir2): Define in terms of opendir or opendirat,
8705         depending on whether the FST_NOCHDIR flag is set.
8706         (fts_build): Since fts_safe_changedir consumes its FD, and since
8707         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
8708         and close the dup'd file descriptor upon failure.
8709         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
8710         (fts_safe_changedir): Tweak semantics to reflect that this function
8711         now calls cwd_advance_fd and hence consumes its FD argument.
8712         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
8713         [struct FTS] (fts_rft): Remove now-unused member.
8714         [struct FTS] (fts_cycle.state): Improve comment.
8715
8716         * lib/openat.c (openat_needs_fchdir): New function.
8717         * lib/openat.h (openat_needs_fchdir): Declare it.
8718
8719 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
8720
8721         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
8722         Problem and fix reported by Pádraig Brady in
8723         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
8724
8725 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8726
8727         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
8728
8729 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8730
8731         * lib/memcoll.c (memcoll): Optimize for the common case where the
8732         arguments are bytewise equal.
8733
8734 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8735
8736         * doc/regexprops-generic.texi: Add a copyright notice.
8737
8738 2006-08-15  Bruno Haible  <bruno@clisp.org>
8739
8740         * modules/tmpdir (License): Change to LGPL.
8741
8742 2006-08-15  Bruno Haible  <bruno@clisp.org>
8743
8744         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
8745         module.
8746
8747 2006-08-14  Simon Josefsson  <jas@extundo.com>
8748
8749         * config/srclist.txt: Add gnupload.
8750
8751 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8752
8753         Change copyright notice from LGPL 2 to GPL 2, since that's the
8754         standard form used in the gnulib repository.
8755         * tests/test-lock.c: Likewise.
8756         * tests/test-stdint.c: Likewise.
8757         * tests/test-tls.c: Likewise.
8758
8759         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
8760         prelude-manager.  User shorter URLs for GNU projects, without '?'.
8761         Add copyright notice.
8762
8763         * check-module: Add copyright notice.  Output a copyright
8764         notice if "--version" is specified.
8765         * modules/COPYING: New file.
8766         * tests/test-getaddrinfo.c: Add copyright notice.
8767         * tests/test-verify.c: Likewise.
8768
8769 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8770
8771         Change copyright notice from LGPL 2 to GPL 2, since that's the
8772         standard form used in the gnulib repository.
8773         * lib/lock.c: LGPL -> GPL.
8774         * lib/lock.h: Likewise.
8775         * lib/strnlen1.c: Likewise.
8776         * lib/strnlen1.h: Likewise.
8777         * lib/tls.c: Likewise.
8778         * lib/tls.h: Likewise.
8779         * lib/tmpdir.c: Likewise.
8780
8781         * lib/TODO: Remove; this belongs only in coreutils.
8782
8783 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8784
8785         Add copyright notices to long-enough files that lack them, since
8786         otherwise the files aren't clearly free.  Use the same notice that
8787         getdate.texi already uses.
8788         * doc/alloca-opt.texi: Add copyright notice.
8789         * doc/alloca.texi: Likewise.
8790         * doc/ctime.texi: Likewise.
8791         * doc/functions.texi: Likewise.
8792         * doc/gcd.texi: Likewise.
8793         * doc/gnulib-tool.texi: Likewise.
8794         * doc/inet_ntoa.texi: Likewise.
8795         * doc/visibility.texi: Likewise.
8796
8797         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
8798         * doc/quote.texi: Add copyright notice.
8799
8800         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
8801         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
8802         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
8803         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
8804         is now obsolete, and give a pointer to the Sun list.
8805         Add copyright notice.
8806
8807 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8808
8809         * config/srclistvars.sh: Add copyright notice.
8810
8811 2006-08-14  Eric Blake  <ebb9@byu.net>
8812
8813         Import the following change from libc:
8814
8815         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
8816
8817         Upstream bug 2997.
8818         * lib/misc/error.c: Add space between program name and message if file
8819         name is missing.
8820
8821 2006-08-12  Karl Berry  <karl@gnu.org>
8822
8823         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
8824         remove, these originate in gnulib now.
8825
8826 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8827
8828         * doc/Makefile (standards.info standards.html standards.dvi):
8829         Also depend on make-stds.texi.
8830
8831 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
8832
8833         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
8834         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
8835
8836         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
8837         in wchar_t.  Problem reported by Eric Blake.
8838
8839         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
8840         LEN is smaller than SIZE.  Suggested by Bruno Haible.
8841         Also, help the compiler to keep LEN in a register.
8842
8843 2006-08-11  Eric Blake  <ebb9@byu.net>
8844
8845         * users.txt: Sort.  Add tar.
8846
8847 2006-08-11  Bruno Haible  <bruno@clisp.org>
8848
8849         * users.txt: New file.
8850
8851 2006-08-11  Bruno Haible  <bruno@clisp.org>
8852
8853         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
8854         before <wchar.h>. Needed for OSF/1 and BSD/OS.
8855
8856 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
8857
8858         * modules/snprintf (Depends-on): Remove minmax.
8859         (Maintainer): Add self and Bruno.
8860
8861 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
8862
8863         * lib/.cppi-disable: Add snprintf.h, socket_.h.
8864         * lib/snprintf.c: Include <errno.h> and <limits.h>.
8865         (EOVERFLOW): Define if the system does not.
8866         Do not include "minmax.h"; it wasn't used.
8867         (snprintf): Don't assume size_t promotes to an unsigned type.
8868         Fix bug when generated string was too long for the buffer: the
8869         buffer's contents are supposed to be the initial prefix of the
8870         output.  Don't assume vasnprintf returns EOVERFLOW if the size
8871         exceeds INT_MAX; do the check ourselves.
8872
8873         Import the following changes from libc:
8874
8875         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
8876
8877         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
8878         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
8879         set wc to the byte which couldn't be converted.
8880         (re_string_reconstruct): Don't clear valid_raw_len before calling
8881         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
8882         tip_context using re_string_context_at.
8883
8884         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
8885
8886         * lib/posix/regex.h: g++ still cannot handled [restrict].
8887
8888         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
8889
8890         * lib/posix/regex.h: Remove special handling for VMS.
8891
8892 2006-08-10  Jim Meyering  <jim@meyering.net>
8893
8894         * modules/same-inode: New module.
8895         * modules/dev-ino: New module.
8896         * modules/cycle-check: Depend on these modules, rather than simply
8897         including their .h files.
8898         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
8899         required via m4/cycle-check.m4.
8900         * modules/same: Depend on new same-inode module, rather than
8901         including same-inode.h.
8902         * modules/chdir-safer: New file.
8903
8904         * modules/chown (Depends-on): Add stat-macros.
8905
8906 2006-08-10  Jim Meyering  <jim@meyering.net>
8907
8908         * m4/cycle-check.m4: New file.
8909         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
8910         * m4/dev-ino.m4, m4/same-inode.m4: New files.
8911
8912 2006-08-10  Eric Blake  <ebb9@byu.net>
8913
8914         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
8915         in from original proposal.
8916
8917 2006-08-10  Eric Blake  <ebb9@byu.net>
8918         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8919
8920         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
8921         namespace.
8922
8923 2006-08-10  Bruno Haible  <bruno@clisp.org>
8924
8925         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
8926         as well.
8927
8928 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8929
8930         Sync from coreutils.
8931
8932         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
8933
8934         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
8935         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
8936
8937 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8938
8939         * modules/restrict: Remove; no longer needed now that we assume
8940         Autoconf 2.59 or later.
8941         * MODULES.html.sh: Remove 'restrict'.
8942         * modules/argp (Depends-on): Remove 'restrict'.
8943         * modules/base64 (Depends-on): Likewise.
8944         * modules/gc (Depends-on): Likewise.
8945         * modules/getaddrinfo (Depends-on): Likewise.
8946         * modules/glob (Depends-on): Likewise.
8947         * modules/inet_ntop (Depends-on): Likewise.
8948         * modules/inet_pton (Depends-on): Likewise.
8949         * modules/memxor (Depends-on): Likewise.
8950         * modules/regex (Depends-on): Likewise.
8951         * modules/strtok_r (Depends-on): Likewise.
8952         * modules/time_r (Depends-on): Likewise.
8953
8954 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8955
8956         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
8957         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
8958         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8959         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
8960         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
8961         * m4/memxor.m4 (gl_MEMXOR): Likewise.
8962         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
8963         gl_C_RESTRICT replaced by AC_C_RESTRICT.
8964
8965         Merge from coreutils.
8966         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
8967         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
8968         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
8969         * m4/time_r.m4 (gl_TIME_R): Likewise.
8970
8971 2006-08-09  Karl Berry  <karl@gnu.org>
8972
8973         * config/srclist.txt: no more gettext-tools, per Bruno.
8974
8975 2006-08-08  Eric Blake  <ebb9@byu.net>
8976
8977         * modules/verror: New module.
8978         * MODULES.html.sh: Document it.
8979
8980 2006-08-08  Eric Blake  <ebb9@byu.net>
8981
8982         * lib/verror.h, lib/verror.c: New files.
8983
8984 2006-08-08  Eric Blake  <ebb9@byu.net>
8985
8986         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
8987         verror_at_line output complies with GNU Coding Standards even when
8988         file is NULL.
8989
8990 2006-08-07  Bruno Haible  <bruno@clisp.org>
8991
8992         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
8993         versions of AIX.
8994         Reported by Ralf Wildenhues.
8995
8996 2006-08-07  Bruno Haible  <bruno@clisp.org>
8997
8998         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
8999         in an AC_DEFUN. Needed so that the autoconf snippets can use
9000         AC_REQUIRE.
9001
9002 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9003
9004         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9005         Initialize pkgdata_DATA.
9006         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
9007         overriding it.
9008
9009 2006-08-06  Eric Blake  <ebb9@byu.net>
9010
9011         * lib/error.h: Fold in some upstream changes from glibc.
9012         * lib/error.c: Likewise.
9013
9014 2006-08-04  Bruno Haible  <bruno@clisp.org>
9015
9016         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9017         Make the mostlyclean-local rule depend on mostlyclean-generic.
9018         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
9019
9020 2006-07-31  Bruno Haible  <bruno@clisp.org>
9021
9022         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
9023         <stdlib.h>, <string.h>.
9024
9025 2006-07-30  Bruno Haible  <bruno@clisp.org>
9026
9027         * modules/readlink (License): Change to LGPL.
9028
9029 2006-07-30  Bruno Haible  <bruno@clisp.org>
9030
9031         * modules/javaversion (Makefile.am): Distribute javaversion.java and
9032         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
9033         set PKGDATADIR to point to it.
9034
9035 2006-07-30  Bruno Haible  <bruno@clisp.org>
9036
9037         * modules/csharpexec (configure.ac): Comment out macro invocation.
9038         * modules/javaexec (configure.ac): Likewise.
9039         * modules/javacomp-script (configure.ac): Likewise.
9040
9041         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
9042
9043 2006-07-30  Bruno Haible  <bruno@clisp.org>
9044
9045         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
9046         linked-list.
9047
9048 2006-07-30  Bruno Haible  <bruno@clisp.org>
9049
9050         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
9051
9052 2006-07-30  Bruno Haible  <bruno@clisp.org>
9053
9054         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9055         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
9056         get removed.
9057
9058 2006-07-29  Bruno Haible  <bruno@clisp.org>
9059
9060         Make it possible for gnulib-tool to work with locally modified or
9061         augmented gnulib repositories.
9062         * gnulib-tool (func_usage): Document --local-dir option.
9063         (local_gnulib_dir): New variable.
9064         Handle --local-dir option.
9065         (func_lookup_file): New function.
9066         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
9067         (func_get_description, func_get_filelist, func_get_description,
9068         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
9069         func_get_automake_snippet, func_get_include_directive,
9070         func_get_license, func_get_maintainer): Use func_lookup_file.
9071         (func_import, func_create_testdir): Use func_lookup_file.
9072
9073 2006-07-29  Bruno Haible  <bruno@clisp.org>
9074
9075         * modules/setenv (Depends-on): Add unistd.
9076
9077 2006-07-29  Bruno Haible  <bruno@clisp.org>
9078
9079         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
9080
9081 2006-07-29  Bruno Haible  <bruno@clisp.org>
9082
9083         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
9084
9085 2006-07-29  Bruno Haible  <bruno@clisp.org>
9086
9087         * gnulib-tool (import, update): If there is no Makefile.am, look at
9088         aclocal.m4, instead of bailing out.
9089
9090 2006-07-29  Bruno Haible  <bruno@clisp.org>
9091
9092         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
9093         Categorize the options by when they are useful.
9094
9095 2006-07-29  Bruno Haible  <bruno@clisp.org>
9096
9097         * gnulib-tool (func_usage): Document option --no-libtool.
9098         Handle option --no-libtool.
9099         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
9100         for changed semantics of $libtool variable.
9101         (func_import): Likewise. If libtool is not used, show this through
9102         an option --no-libtool.
9103         (func_create_testdir): Update.
9104
9105 2006-07-29  Bruno Haible  <bruno@clisp.org>
9106
9107         * gnulib-tool (func_import): Extend error message about missing
9108         --doc-base.
9109
9110 2006-07-29  Bruno Haible  <bruno@clisp.org>
9111
9112         * gnulib-tool (func_import): Don't create the $docbase directory if
9113         there is no file to store there.
9114
9115 2006-07-29  Bruno Haible  <bruno@clisp.org>
9116
9117         * gnulib-tool (autoconf_minversion): If a --dir option is given and
9118         relevant, look for configure.ac there, not in the current directory.
9119         Also use a simple search for AC_PREREQ, not "autoconf --trace".
9120
9121 2006-07-29  Bruno Haible  <bruno@clisp.org>
9122
9123         * gnulib-tool (SORT): New variable.
9124         (func_usage): Undocument --assume-autoconf option.
9125         Remove --assume-autoconf option handling.
9126         (autoconf_minversion): Determine from the contents of configure.ac.
9127         (func_import): Remove autoconf_minversion handling.
9128         Suggested by Eric Blake.
9129
9130 2006-07-29  Bruno Haible  <bruno@clisp.org>
9131
9132         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
9133
9134 2006-07-29  Bruno Haible  <bruno@clisp.org>
9135
9136         * config/srclist.txt (*setenv.[ch]): Remove rules.
9137
9138 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9139
9140         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
9141
9142 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9143
9144         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
9145         arpa/inet.h.
9146
9147 2006-07-28  Simon Josefsson  <jas@extundo.com>
9148
9149         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
9150         * modules/inet_pton (Depends-on): Likewise.
9151
9152 2006-07-28  Simon Josefsson  <jas@extundo.com>
9153
9154         * m4/netinet_in_h.m4: New file.
9155
9156 2006-07-28  Simon Josefsson  <jas@extundo.com>
9157
9158         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
9159         #include's.
9160
9161 2006-07-28  Simon Josefsson  <jas@extundo.com>
9162
9163         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
9164         #include's.
9165
9166 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
9167
9168         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
9169         setgid on directories only if they set these bits.
9170         * lib/modechange.h: Remove obsolete comment about masks.
9171
9172 2006-07-28  Eric Blake  <ebb9@byu.net>
9173
9174         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
9175         macro expansion.
9176
9177 2006-07-28  Bruno Haible  <bruno@clisp.org>
9178
9179         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
9180
9181 2006-07-28  Bruno Haible  <bruno@clisp.org>
9182
9183         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
9184
9185 2006-07-28  Bruno Haible  <bruno@clisp.org>
9186
9187         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
9188         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
9189         Define fallbacks.
9190         Avoids link error on FreeBSD 4.x.
9191         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9192
9193         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
9194         encoding.
9195         * lib/mbswidth.c (iswcntrl): Likewise.
9196
9197 2006-07-27  Bruno Haible  <bruno@clisp.org>
9198
9199         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
9200         test.
9201
9202 2006-07-27  Bruno Haible  <bruno@clisp.org>
9203
9204         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
9205         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
9206         defined.
9207
9208 2006-07-26  Eric Blake  <ebb9@byu.net>
9209
9210         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
9211
9212 2006-07-26  Eric Blake  <ebb9@byu.net>
9213
9214         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
9215         like mingw that lack mkstemp.
9216         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
9217         avoid compilation warning on mingw.
9218
9219 2006-07-26  Bruno Haible  <bruno@clisp.org>
9220
9221         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
9222         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
9223         INT_FAST*_MIN, INTPTR_MIN.
9224
9225 2006-07-25  Bruno Haible  <bruno@clisp.org>
9226
9227         * modules/version-etc (Depends-on): Add stdarg.
9228
9229 2006-07-25  Bruno Haible  <bruno@clisp.org>
9230
9231         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
9232         complex commands.
9233
9234 2006-07-25  Bruno Haible  <bruno@clisp.org>
9235
9236         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
9237         defined in <stdarg.h> or config.h.
9238
9239 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
9240
9241         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
9242         (gl_STDIO_SAFER): Remove.
9243
9244 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
9245
9246         * MODULES.html.sh (File stream based Input/Output):
9247         Add fopen-safer, tmpfile-safer; remove stdio-safer.
9248         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
9249         * modules/fopen-safer, modules/tmpfile-safer: New files.
9250         * modules/stdio-safer: Remove.
9251
9252 2006-07-24  Bruno Haible  <bruno@clisp.org>
9253
9254         * modules/tmpdir: New file.
9255         * MODULES.html.sh (File system functions): Add it.
9256
9257 2006-07-24  Bruno Haible  <bruno@clisp.org>
9258
9259         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
9260         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
9261
9262 2006-07-24  Bruno Haible  <bruno@clisp.org>
9263
9264         * modules/clean-temp: New file.
9265
9266 2006-07-24  Bruno Haible  <bruno@clisp.org>
9267
9268         * m4/tmpdir.m4: New file, from GNU gettext.
9269
9270 2006-07-24  Bruno Haible  <bruno@clisp.org>
9271
9272         * lib/tmpdir.h: New file, from GNU gettext.
9273         * lib/tmpdir.c: New file, from GNU gettext.
9274
9275 2006-07-24  Bruno Haible  <bruno@clisp.org>
9276
9277         * lib/clean-temp.h: New file, from GNU gettext.
9278         * lib/clean-temp.c: New file, from GNU gettext.
9279
9280 2006-07-23  Eric Blake  <ebb9@byu.net>
9281
9282         * modules/stdio-safer (Files): Add tmpfile-safer.c.
9283         (Depends-on): Add binary-io.
9284
9285 2006-07-23  Eric Blake  <ebb9@byu.net>
9286
9287         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
9288
9289 2006-07-23  Eric Blake  <ebb9@byu.net>
9290
9291         * lib/tmpfile-safer.c: New file.
9292         * lib/stdio-safer.h (fopen_safer): Add prototype.
9293         * lib/stdio--.h (tmpfile): Make safer.
9294
9295 2006-07-23  Bruno Haible  <bruno@clisp.org>
9296
9297         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
9298         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
9299         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
9300         gl_linked_remove_at): Use it.
9301
9302 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9303         and Simon Josefsson <jas@extundo.com>
9304
9305         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
9306
9307         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
9308
9309 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9310
9311         * modules/close-stream: New file.
9312         * modules/closeout (Description): Make it clear that it exits
9313         with a diagnostic on error.
9314         (Depends-on): Add close-stream.  Remove fpending, stdbool.
9315         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
9316
9317 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9318
9319         * m4/close-stream.m4: New file.
9320
9321 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9322
9323         * lib/close-stream.c, lib/close-stream.h: New files.
9324
9325 2006-07-22  Bruno Haible  <bruno@clisp.org>
9326
9327         Merge from GNU gettext 0.15.
9328
9329         2006-05-01  Bruno Haible  <bruno@clisp.org>
9330
9331                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
9332
9333         2006-07-22  Bruno Haible  <bruno@clisp.org>
9334
9335                 * modules/javaversion: New file.
9336                 * MODULES.html.sh (Java): Add javaversion.
9337
9338         2006-03-12  Bruno Haible  <bruno@clisp.org>
9339
9340                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
9341
9342         2005-12-04  Bruno Haible  <bruno@clisp.org>
9343
9344                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
9345                 (untested).
9346
9347         2006-06-21  Bruno Haible  <bruno@clisp.org>
9348
9349                 Avoid warnings from recent versions of mcs.
9350                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
9351                 -o, -L, -r any more. Use options documented since mcs-1.0
9352                 instead. Similarly for -g.
9353
9354         2005-12-04  Bruno Haible  <bruno@clisp.org>
9355
9356                 * build-aux/csharpcomp.sh.in: Suffix for resources is
9357                 .resources, not .resource.
9358
9359         2005-07-09  Bruno Haible  <bruno@clisp.org>
9360
9361                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
9362                 add a .dll suffix.
9363                 Reported by Mark Junker <mjscod@gmx.de>.
9364
9365         2006-07-22  Bruno Haible  <bruno@clisp.org>
9366
9367                 * modules/gettext: Upgrade to gettext-0.15.
9368                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
9369                 m4/visibility.m4.
9370                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
9371
9372 2006-07-22  Bruno Haible  <bruno@clisp.org>
9373
9374         Merge from GNU gettext 0.15.
9375
9376         2006-03-25  Bruno Haible  <bruno@clisp.org>
9377
9378                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
9379
9380         2006-07-21  Bruno Haible  <bruno@clisp.org>
9381
9382                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
9383                 "1.1".
9384
9385         2006-05-09  Bruno Haible  <bruno@clisp.org>
9386
9387                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
9388                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
9389                 for the conftestver execution.
9390
9391         2006-05-01  Bruno Haible  <bruno@clisp.org>
9392
9393                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
9394                 optional target-version argument. Verify that the compiler
9395                 groks source of the specified source-version, or add -source
9396                 option as necessary. Verify that the compiler produces
9397                 bytecode in the specified target-version, or add -target and
9398                 -source options as necessary. Make the result of the test
9399                 available as variable CONF_JAVAC. Also log error output in
9400                 config.log.
9401
9402         2006-03-11  Bruno Haible  <bruno@clisp.org>
9403
9404                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
9405
9406         2006-05-09  Bruno Haible  <bruno@clisp.org>
9407
9408                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
9409                 CLASSPATH_SEPARATOR to a semicolon.
9410
9411         2006-03-12  Bruno Haible  <bruno@clisp.org>
9412
9413                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
9414                 available as variable CONF_JAVA, for subsequent autoconf
9415                 tests. Also log error output in config.log.
9416
9417         2006-07-19  Bruno Haible  <bruno@clisp.org>
9418
9419                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
9420                 that getline works on glibc2 systems. Needed to avoid trouble
9421                 in relocatable.c.
9422                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
9423
9424         2005-12-04  Bruno Haible  <bruno@clisp.org>
9425
9426                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
9427                 launcher (untested).
9428
9429         2005-12-04  Bruno Haible  <bruno@clisp.org>
9430
9431                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
9432
9433         2006-07-22  Bruno Haible  <bruno@clisp.org>
9434
9435                 * gettext.m4: Update from GNU gettext-0.15.
9436                 * nls.m4: Likewise.
9437                 * po.m4: Likewise.
9438                 * inttypes-pri.m4: Likewise.
9439                 * inttypes-h.m4: Renamed from inttypes.m4.
9440                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
9441
9442 2006-07-22  Bruno Haible  <bruno@clisp.org>
9443
9444         Merge from GNU gettext 0.15.
9445
9446         2005-07-05  Bruno Haible  <bruno@clisp.org>
9447
9448                 * printf-args.c (printf_fetchargs): Work around broken
9449                 definition of wint_t on mingw.
9450
9451         2005-02-12  Bruno Haible  <bruno@clisp.org>
9452
9453                 * xallocsa.h: Add extern "C" for C++.
9454
9455         2006-05-17  Bruno Haible  <bruno@clisp.org>
9456
9457                 Cygwin portability.
9458                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
9459
9460         2006-04-30  Bruno Haible  <bruno@clisp.org>
9461
9462                 * progreloc.c: Include <mach-o/dyld.h> if available.
9463                 (find_executable): Use _NSGetExecutablePath when possible.
9464
9465         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9466
9467                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
9468                 function.
9469
9470         2005-12-29  Bruno Haible  <bruno@clisp.org>
9471
9472                 * progreloc.c (set_program_name_and_installdir): Fix
9473                 compilation error.
9474
9475         2005-12-04  Bruno Haible  <bruno@clisp.org>
9476
9477                 Cygwin portability.
9478                 * progreloc.c: Include <windows.h> also on Cygwin.
9479                 (find_executable): Add support for Cygwin.
9480                 (set_program_name_and_installdir): Handle also platforms with
9481                 nonempty EXEEXT.
9482
9483         2006-07-11  Bruno Haible  <bruno@clisp.org>
9484
9485                 * javacomp.c: Fix a comment.
9486                 Reported by Jim Meyering.
9487
9488         2006-04-30  Bruno Haible  <bruno@clisp.org>
9489
9490                 * javacomp.h (compile_java_class): Add source_version,
9491                 target_version arguments.
9492                 * javacomp.c: Rewritten to choose only a compiler that
9493                 respects the specified source_version and target_version.
9494
9495         2006-06-27  Bruno Haible  <bruno@clisp.org>
9496
9497                 Assume correct S_ISDIR macro.
9498                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
9499
9500         2006-07-22  Bruno Haible  <bruno@clisp.org>
9501
9502                 * javaversion.h: New file, from GNU gettext.
9503                 * javaversion.c: New file, from GNU gettext.
9504                 * javaversion.java: New file, from GNU gettext.
9505                 * javaversion.class: New file, from GNU gettext.
9506
9507         2006-05-17  Bruno Haible  <bruno@clisp.org>
9508
9509                 Cygwin portability.
9510                 * javaexec.c (execute_java_class): Test for jview program
9511                 also on Cygwin.
9512
9513         2006-04-09  Bruno Haible  <bruno@clisp.org>
9514
9515                 * fatal-signal.c: Don't include string.h.
9516                 (at_fatal_signal): Use a copying loop instead of memcpy.
9517
9518         2005-12-04  Bruno Haible  <bruno@clisp.org>
9519
9520                 * csharpexec.c: Add support for 'clix' launcher (untested).
9521                 (execute_csharp_using_sscli): New function.
9522                 (execute_csharp_program): Call it.
9523
9524         2006-06-21  Bruno Haible  <bruno@clisp.org>
9525
9526                 Avoid warnings from recent versions of mcs.
9527                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
9528                 -o, -L, -r any more. Use options documented since mcs-1.0
9529                 instead. Similarly for -g.
9530
9531         2005-07-09  Bruno Haible  <bruno@clisp.org>
9532
9533                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
9534                 add a .dll suffix.
9535                 Reported by Mark Junker <mjscod@gmx.de>.
9536
9537         2006-06-17  Bruno Haible  <bruno@clisp.org>
9538
9539                 * config.charset: Update for NetBSD 3.0.
9540
9541         2006-05-17  Bruno Haible  <bruno@clisp.org>
9542
9543                 Cygwin portability.
9544                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
9545
9546         2006-05-16  Bruno Haible  <bruno@clisp.org>
9547
9548                 * localcharset.c [CYGWIN]: Include <windows.h>.
9549                 (get_charset_aliases): For Cygwin, return the same CPxxx
9550                 aliases list as under WIN32.
9551                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
9552                 the environment variables. Fall back to GetACP().
9553
9554         2006-04-05  Bruno Haible  <bruno@clisp.org>
9555
9556                 * config.charset: Update Juan Manuel Guerrero's address.
9557
9558         2005-02-12  Bruno Haible  <bruno@clisp.org>
9559
9560                 * allocsa.h: Add extern "C" for C++.
9561
9562         2005-02-10  Bruno Haible  <bruno@clisp.org>
9563
9564                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
9565                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
9566
9567         2006-07-22  Bruno Haible  <bruno@clisp.org>
9568
9569                 * gettext.h: Update to GNU gettext-0.15.
9570
9571 2006-07-22  Bruno Haible  <bruno@clisp.org>
9572
9573         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
9574         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
9575         lib-prefix.m4, longdouble.m4, ssize_t.m4.
9576
9577 2006-07-21  Eric Blake  <ebb9@byu.net>
9578
9579         * modules/stdlib-safer: New file.
9580         * MODULES.html.sh (File stream based Input/Output): Add
9581         stdlib-safer.
9582
9583 2006-07-21  Eric Blake  <ebb9@byu.net>
9584
9585         * lib/stdlib-safer.h: New file from coreutils, required by
9586         stdlib--.h.
9587
9588 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
9589
9590         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
9591
9592 2006-07-20  Bruno Haible  <bruno@clisp.org>
9593
9594         * gnulib-tool: Recognize new option --assume-autoconf.
9595         (autoconf_minversion): New variable.
9596         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
9597
9598 2006-07-20  Bruno Haible  <bruno@clisp.org>
9599
9600         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
9601
9602 2006-07-19  Derek R. Price  <derek@ximbiot.com>
9603
9604         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
9605         Reindent and repaginate.
9606
9607 2006-07-19  Derek Price  <derek@ximbiot.com>
9608
9609         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
9610         Correct grammar.
9611
9612 2006-07-17  Bruno Haible  <bruno@clisp.org>
9613
9614         * modules/list: New file.
9615         * modules/array-list: New file.
9616         * modules/carray-list, modules/carray-list-tests: New files.
9617         * modules/linked-list, modules/linked-list-tests: New files.
9618         * modules/avltree-list, modules/avltree-list-tests: New files.
9619         * modules/rbtree-list, modules/rbtree-list-tests: New files.
9620         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
9621         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
9622         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
9623         * modules/oset: New file.
9624         * modules/array-oset: New file.
9625         * modules/avltree-oset, modules/avltree-oset-tests: New files.
9626         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
9627         * tests/test-carray_list.c: New file.
9628         * tests/test-linked_list.c: New file.
9629         * tests/test-avltree_list.c: New file.
9630         * tests/test-rbtree_list.c: New file.
9631         * tests/test-linkedhash_list.c: New file.
9632         * tests/test-avltreehash_list.c: New file.
9633         * tests/test-rbtreehash_list.c: New file.
9634         * tests/test-avltree_oset.c: New file.
9635         * tests/test-rbtree_oset.c: New file.
9636         * MODULES.html.sh (Container data structures): New section.
9637
9638 2006-07-17  Bruno Haible  <bruno@clisp.org>
9639
9640         * m4/gl_list.m4: New file.
9641
9642 2006-07-17  Bruno Haible  <bruno@clisp.org>
9643
9644         * lib/gl_list.h: New file.
9645         * lib/gl_list.c: New file.
9646         * lib/gl_array_list.h: New file.
9647         * lib/gl_array_list.c: New file.
9648         * lib/gl_carray_list.h: New file.
9649         * lib/gl_carray_list.c: New file.
9650         * lib/gl_linked_list.h: New file.
9651         * lib/gl_linked_list.c: New file.
9652         * lib/gl_anylinked_list1.h: New file.
9653         * lib/gl_anylinked_list2.h: New file.
9654         * lib/gl_avltree_list.h: New file.
9655         * lib/gl_avltree_list.c: New file.
9656         * lib/gl_anyavltree_list1.h: New file.
9657         * lib/gl_anyavltree_list2.h: New file.
9658         * lib/gl_rbtree_list.h: New file.
9659         * lib/gl_rbtree_list.c: New file.
9660         * lib/gl_anyrbtree_list1.h: New file.
9661         * lib/gl_anyrbtree_list2.h: New file.
9662         * lib/gl_anytree_list1.h: New file.
9663         * lib/gl_anytree_list2.h: New file.
9664         * lib/gl_linkedhash_list.h: New file.
9665         * lib/gl_linkedhash_list.c: New file.
9666         * lib/gl_anyhash_list1.h: New file.
9667         * lib/gl_anyhash_list2.h: New file.
9668         * lib/gl_avltreehash_list.h: New file.
9669         * lib/gl_avltreehash_list.c: New file.
9670         * lib/gl_rbtreehash_list.h: New file.
9671         * lib/gl_rbtreehash_list.c: New file.
9672         * lib/gl_anytreehash_list1.h: New file.
9673         * lib/gl_anytreehash_list2.h: New file.
9674
9675         * lib/gl_oset.h: New file.
9676         * lib/gl_oset.c: New file.
9677         * lib/gl_array_oset.h: New file.
9678         * lib/gl_array_oset.c: New file.
9679         * lib/gl_avltree_oset.h: New file.
9680         * lib/gl_avltree_oset.c: New file.
9681         * lib/gl_rbtree_oset.h: New file.
9682         * lib/gl_rbtree_oset.c: New file.
9683         * lib/gl_anytree_oset.h: New file.
9684
9685 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9686
9687         * m4/mkancesdirs.m4: New file.
9688         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
9689         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
9690         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
9691         it.
9692
9693 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9694
9695         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
9696         * lib/mkancesdirs.h: New files.
9697         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
9698         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
9699         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
9700         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
9701         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
9702         callers changed.  Revamp internals significantly, by not
9703         attempting to create directories that are temporarily more
9704         permissive than the final results.  Do not attempt to use
9705         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
9706         This removes some race conditions, fixes some bugs, and simplifies
9707         things.  Use new dirchownmod function to do owner and mode changes.
9708         * lib/mkdir-p.h: Likewise.
9709         * lib/modechange.c (octal_to_mode): New function.
9710         (struct mode_change): New member mentioned.
9711         (make_node_op_equals): New arg mentioned.  All callers changed.
9712         (mode_compile): Keep track of which mode bits the user has explicitly
9713         mentioned.
9714         (mode_adjust): New arg DIR, so that we implement the X op correctly.
9715         New arg PMODE_BITS, to keep track of which mode bits the user
9716         mentioned; it treats S_ISUID and S_ISGID speciall.
9717         All callers changed.
9718         * lib/modechange.h: Likewise.
9719
9720 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9721
9722         * MODULES.html.sh: Add mkancestors.
9723         * modules/mkancesdirs: New module.
9724         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
9725         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
9726         The chdir-safer and afs files are now orphans; I'll remove them
9727         unless someone speaks up.
9728         Add lib/dirchownmod.c, lib/dirchownmod.h.
9729         (Depends-on): Remove alloca, chown, save-cwd, dirname.
9730         Add lchown, mkancesdirs.
9731         (Maintainer): Add self.
9732
9733 2006-07-15  Karl Berry  <karl@gnu.org>
9734
9735         * gnulib-tool: help message wording/arrangement.
9736
9737 2006-07-14  Simon Josefsson  <jas@extundo.com>
9738
9739         * doc/gnulib.texi (Libtool and Windows): New section.
9740
9741 2006-07-12  Simon Josefsson  <jas@extundo.com>
9742
9743         * modules/gendocs (License): Fix license, approved by Karl.
9744
9745 2006-07-12  Eric Blake  <ebb9@byu.net>
9746
9747         * MODULES.html.sh: Add gendocs.
9748
9749 2006-07-11  Eric Blake  <ebb9@byu.net>
9750
9751         * modules/fdl: New module, to install doc/fdl.texi.
9752         * MODULES.html.sh: Add new section for documentation modules.
9753         * gnulib-tool: Avoid space-tab.
9754         (--doc-base): New option, to manage files from doc.
9755
9756 2006-07-11  Eric Blake  <ebb9@byu.net>
9757
9758         * m4/absolute-header.m4: Fix comments to match recent change.
9759
9760 2006-07-11  Eric Blake  <ebb9@byu.net>
9761
9762         * gnulib-tool: List --doc-base before --tests-base.
9763
9764 2006-07-11  Derek R. Price  <derek@ximbiot.com>
9765
9766         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
9767
9768 2006-07-11  Bruno Haible  <bruno@clisp.org>
9769
9770         * README: Mention where to put documentation.
9771
9772 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9773
9774         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
9775
9776 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
9777
9778         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
9779         to stdint.m4.
9780
9781 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
9782
9783         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
9784         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
9785         "no/such/file/stdint.h" when there is no such file, so that
9786         the resulting C code can be parsed by dodgy compilers.
9787         Problems reported by Bob Proulx.
9788
9789 2006-07-10  Derek R. Price  <derek@ximbiot.com>
9790
9791         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
9792         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
9793         macros into the GNU _D_EXACT_NAMLEN.
9794         * lib/savedir.c:  Likewise.
9795         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
9796
9797 2006-07-10  Derek R. Price  <derek@ximbiot.com>
9798         and Paul Eggert  <eggert@cs.ucla.edu>
9799
9800         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
9801         * m4/savedir.m4:
9802         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
9803         macros into the GNU _D_EXACT_NAMLEN.
9804
9805 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9806
9807         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
9808         around the absolute name, to work around a problem with the HP-UX
9809         11.23 native C compiler, reported by Bob Proulx.
9810
9811 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9812
9813         * doc/maintain.texi, make-stds.texi: Sync from
9814         <http://savannah.gnu.org/projects/gnustandards>.
9815
9816 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9817
9818         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
9819
9820 2006-07-09  Jim Meyering  <jim@meyering.net>
9821
9822         * m4/glob.m4: Remove a doubled word in a comment.
9823
9824 2006-07-09  Jim Meyering  <jim@meyering.net>
9825
9826         * lib/argp-pv.c: Remove a doubled word in a comment.
9827         * lib/check-version.c (check_version): Likewise.
9828         * lib/javacomp.c (compile_java_class): Likewise.
9829
9830 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
9831
9832         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
9833         for the benefit of people using Autoconf 2.60.  If you want to
9834         support older Autoconf versions you can copy m4/onceonly_2_57.m4
9835         (or m4/onceonly.m4, if pre-2.57) manually.
9836
9837 2006-07-08  Jim Meyering  <jim@meyering.net>
9838
9839         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
9840         comment.
9841         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
9842         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
9843         comment.
9844
9845 2006-07-08  Jim Meyering  <jim@meyering.net>
9846
9847         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
9848
9849 2006-07-07  Simon Josefsson  <jas@extundo.com>
9850
9851         * tests/test-crc.c: Change expected crc value, the test vector
9852         were probably computed using the old broken crc.c?
9853
9854 2006-07-06  Simon Josefsson  <jas@extundo.com>
9855
9856         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
9857         now the canonical place for the M4 file).
9858
9859         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
9860         from the sys_socket dependency now.
9861
9862         * modules/inet_pton (Files): Ditto.
9863
9864         * modules/inet_ntop (Files): Ditto.
9865
9866 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9867
9868         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
9869         not gl_PREREQ_GETUSERSHELL.
9870
9871 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9872
9873         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
9874         with only one argument, for Autoconf 2.60.
9875         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
9876         expand to nothing, so add a shell command to avoid syntax error.
9877         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9878
9879 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9880
9881         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
9882
9883 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9884
9885         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
9886         no longer needed.  Check for isblank decl.
9887         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
9888         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
9889         of existence.
9890
9891 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9892
9893         * lib/getloadavg.c: Use __VMS, not VMS.
9894         * lib/getopt.c: Likewise.
9895         * lib/getpagesize.h: Likewise.
9896         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
9897         and probably does not work.
9898
9899 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9900
9901         * lib/.cppi-disable: Add wcwidth.
9902         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
9903         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
9904         (ISGRAPH): Remove.  All uses changed to isgraph.
9905         (FOLD) [!defined _LIBC]: Remove special case.
9906         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
9907         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
9908         HAVE_ISBLANK.
9909         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
9910         case.
9911
9912 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
9913
9914         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
9915         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
9916         brackets.  Other minor changes to suppress some compiler
9917         warnings.
9918
9919 2006-07-06  Derek R. Price  <derek@ximbiot.com>
9920         and Paul Eggert  <eggert@cs.ucla.edu>
9921
9922         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
9923         of invoking obsolescent AC_HEADER_DIRENT macro.
9924         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
9925         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
9926         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
9927         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
9928         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
9929         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
9930         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
9931         * m4/readdir.m4: Remove; no longer needed.
9932
9933 2006-07-06  Derek R. Price  <derek@ximbiot.com>
9934         and Paul Eggert  <eggert@cs.ucla.edu>
9935
9936         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
9937         Don't worry about this obsolete case any more.
9938         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
9939         directories.
9940         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
9941         worry about this obsolete case any more.
9942         * lib/fts.c: Likewise.
9943         * lib/getcwd.c: Likewise.
9944         * lib/glob.h: Likewise.
9945         * lib/savedir.c: Likewise.
9946
9947 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9948
9949         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
9950         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
9951         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
9952         needed.
9953         All uses removed.
9954         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9955         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
9956         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
9957         needed.
9958         * m4/getdate.m4 (gl_GETDATE): Likewise.
9959         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
9960         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
9961         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
9962         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9963         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
9964         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
9965         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
9966         needed.
9967
9968 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9969
9970         * lib/memcasecmp.c: Include <limits.h>.
9971         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
9972         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
9973         Don't assume isdigit succeeds only on '0' through '9'.
9974
9975 2006-07-05  Eric Blake  <ebb9@byu.net>
9976
9977         * modules/getaddrinfo (Depends-on): Add snprintf.
9978
9979 2006-07-05  Eric Blake  <ebb9@byu.net>
9980
9981         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
9982         to avoid 'header present but could not be compiled' on cygwin.
9983
9984 2006-07-05  Eric Blake  <ebb9@byu.net>
9985
9986         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
9987         missing from netdb.h.
9988         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
9989
9990 2006-07-05  Derek R. Price  <derek@ximbiot.com>
9991
9992         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
9993         no longer needed.
9994         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
9995         * m4/getdate.m4 (gl_GETDATE): Likewise.
9996         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
9997         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
9998         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
9999         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10000         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
10001
10002 2006-07-05  Derek R. Price  <derek@ximbiot.com>
10003
10004         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
10005         All uses of is_space replaced by isspace.
10006         * lib/exit.h: Don't talk about STDC_HEADERS.
10007         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
10008         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
10009         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
10010         replaced by isprint etc.
10011         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
10012         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10013         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
10014         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
10015         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
10016         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10017
10018 2006-07-05  Bruno Haible  <bruno@clisp.org>
10019
10020         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
10021         the function exists, before testing against AIX.
10022         Reported by Martin Lambers <marlam@marlam.de>.
10023
10024 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10025
10026         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
10027         From Mark D. Baushke.
10028
10029 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10030
10031         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
10032         to the absolute name, not just one, to bypass Sun C 5.8's
10033         "warning: #include of /usr/include/... may be non-portable".
10034
10035 2006-07-04  Eric Blake  <ebb9@byu.net>
10036
10037         * modules/dirname-tests: New test module.
10038         * tests/test-dirname.c: New file, replacing dirname.c
10039         TEST_DIRNAME section that was recently deleted.
10040
10041 2006-07-04  Bruno Haible  <bruno@clisp.org>
10042
10043         Assume ANSI C header files and <ctype.h> functions.
10044         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
10045         (mbsnwidth): Use isprint, iscntrl instead.
10046
10047 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10048
10049         Merge from coreutils.
10050         * MODULES.html.sh: Add xstrtold.
10051         * modules/xstrtold: New file.
10052         * modules/cycle-check (Files): Add lib/same-inode.h.
10053         * modules/dirname (Files): Add m4/double-slash-root.m4.
10054         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
10055         * modules/mkdir-p (Files): Add lib/same-inode.h.
10056         * modules/same (Files): Add lib/same-inode.h.
10057
10058 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10059
10060         * m4/absolute-header.m4: Renamed from full-header-path.m4.
10061         This is to keep the terminology clean; POSIX talks about
10062         "absolute pathnames", not "full pathnames", but the GNU
10063         Coding Standards say to use "path" for something else;
10064         so use "absolute" to keep both sides happy.
10065         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
10066         Set gl_absolute_header, not gl_full_header_path.
10067         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
10068         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
10069         All uses changed.
10070
10071         Merge from coreutils.
10072
10073         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
10074
10075         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
10076         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
10077         want to require the building of c-strtod.o.
10078         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
10079         needs -lm directly.
10080         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
10081
10082         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
10083
10084         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
10085         --as-needed option if available.  Problem reported by Albert Chin in
10086         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
10087         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
10088         cc merely issues a bunch of annoying warnings for --as-needed
10089         (this problem was reported by Bob Proulx).  Also, try linking with
10090         -lm to detect a bug in binutils 2.16 (this problem was reported
10091         by Ralf Wildenhues).
10092
10093         2006-06-18  Jim Meyering  <jim@meyering.net>
10094
10095         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
10096         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
10097         macro.
10098         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
10099         also check for glibc-2.4's abort-inducing bug.
10100
10101         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
10102         Low-probability clean-up should be to use rmdir to get rid of
10103         the just-created directory, not unlink.
10104
10105         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
10106         configure fail, and request a bug report to inform us about it.
10107         Add a comment that, barring reports to the contrary, in 2007 we'll
10108         assume ftruncate is universally available.
10109
10110         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
10111
10112         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
10113
10114         2006-03-12  Jim Meyering  <jim@meyering.net>
10115
10116         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
10117         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
10118         * m4/same.m4 (gl_SAME): Likewise.
10119         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
10120
10121         2006-03-11  Eric Blake  <ebb9@byu.net>
10122
10123         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
10124         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
10125         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
10126         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
10127
10128 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10129
10130         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
10131         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
10132         reported by Mark D. Baushke, one in
10133         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
10134
10135         Merge from coreutils.
10136
10137         * lib/.cppi-disable: Add stdint_.h.
10138         * lib/.cvsignore: Add stdint.h.
10139
10140         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
10141
10142         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
10143         both double and long double versions.
10144         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
10145         * lib/xstrtold.c: New file.
10146         * lib/xstrtod.h (xstrtold): New decl.
10147
10148         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
10149
10150         * lib/filemode.c (setst): Remove.
10151         (strmode): Rewrite to avoid setst.  This makes the code shorter,
10152         (arguably) clearer, and the generated code is a bit smaller on my
10153         Debian GNU/Linux stable x86 host.
10154
10155         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
10156
10157         * lib/filemode.c: Include "filemode.h" first, to test the interface.
10158         Assume that filemode.h includes sys/types.h and sys/stat.h.
10159         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
10160         (ftypelet): Reorder to put common cases first, for efficiency.
10161         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
10162         to do 'M'.
10163         (strmode): Renamed from mode_string, and now stores 12 bytes instead
10164         of 10, for compatibility with FreeBSD.  All callers changed.
10165         (filemodestring): Now stores 12 bytes instead of 10, and sets file
10166         types that can't be deduced solely from st_mode.  First arg is now a
10167         const pointer.
10168         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
10169         (strmode): Renamed from mode_string.
10170         (filemodestring): New decl.
10171         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
10172         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
10173         needed.
10174         (S_ISPORT, S_ISWHT): New macros, if not already defined.
10175
10176         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
10177
10178         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
10179         fsusage.h now does that.  Include fsusage.h first, to test interface.
10180         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
10181         at most one method (the old code could have generated decls that
10182         didn't conform to C89, not that this was ever exercised).
10183         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
10184
10185         2006-03-19  Jim Meyering  <jim@meyering.net>
10186
10187         Work even in a chroot where d_ino values for entries in "/"
10188         don't match the stat.st_ino values for the same names.
10189         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
10190         number, iterate through all entries again, using lstat instead.
10191         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
10192         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
10193
10194         * lib/getcwd.c (__getcwd): Clarify a comment.
10195         Use memcpy in place of a call to strcpy.
10196
10197         2006-03-12  Jim Meyering  <jim@meyering.net>
10198
10199         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
10200         matches that of the current directory (which we're about to chdir ".."
10201         out of), then save the dev-ino of the parent, instead.
10202
10203         * lib/same-inode.h (SAME_INODE): New file/macro.
10204         * lib/chdir-safer.c (SAME_INODE): Remove definition.
10205         Include "same-inode.h", instead.
10206         * lib/same.c: Likewise.
10207         * lib/cycle-check.h: Include "same-inode.h".
10208         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
10209         * lib/cycle-check.c (SAME_INODE): Remove definition.
10210         * lib/root-dev-ino.h: Include "same-inode.h".
10211
10212         2006-03-11  Eric Blake  <ebb9@byu.net>
10213
10214         * lib/same.c (same_name): s/base_name/last_component/
10215         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
10216         * lib/filenamecat.c (file_name_concat): Likewise.
10217
10218         2006-03-11  Eric Blake  <ebb9@byu.net>,
10219                     Paul Eggert  <eggert@cs.ucla.edu>
10220
10221         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
10222         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
10223         drive prefix.
10224         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
10225         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
10226         (last_component): New method.
10227         * lib/dirname.c (dir_len): Determine when drive letters need a
10228         subsequent slash.  Preserve // when it is special.
10229         (dir_name): Don't append dot when drive letter is absolute.
10230         [TEST_DIRNAME]: Move into a full-blown gnulib test.
10231         * lib/basename.c (base_name): New semantics - malloc the result.
10232         Preserve // when it is special.  Preserve relative files that look
10233         like drive letters.
10234         (base_len): Preserve // when it is special.
10235         (last_component): New method, similar to old base_name semantics.
10236         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
10237         base_name.  Strip redundant slashes from ///.
10238
10239 2006-07-03  Jim Meyering  <jim@meyering.net>
10240
10241         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
10242         macro is used before the first cycle_check call.
10243
10244 2006-07-03  Eric Blake  <ebb9@byu.net>
10245
10246         * modules/dirname (Depends-on): Add xstrndup.
10247
10248 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
10249
10250         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
10251         test cases, so that config.log is a bit easier to follow.
10252
10253 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
10254
10255         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
10256         both are 64 bits, since this seems to be the tradition, and this
10257         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
10258         we ever run into a host that prefers long long to long in this
10259         case, we'll need another configure-time test.  Problem reported by
10260         Jim Meyering.
10261
10262 2006-07-02  Eric Blake  <ebb9@byu.net>
10263
10264         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
10265
10266 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10267
10268         * modules/inttypes (Depends-on): No longer depends on stdint.
10269         * modules/stdint (Description): Say more about assumptions.
10270         Say that the fast types might differ.  Say macros are used.
10271         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
10272         (Makefile.am): Revise list of substituted symbols to match
10273         new stdint.m4.
10274         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
10275         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
10276         * tests/test-stdint.c (verify_same_types)
10277         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
10278         the code conforms to C99/C89.
10279         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
10280         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
10281
10282 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10283
10284         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
10285         but fix a bug, by requiring at least 64 bits.
10286         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
10287         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
10288         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
10289         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
10290
10291         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
10292         changes.  Make 2.59 a prerequisite.  Check and substitute for
10293         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
10294         inttypes.h.  Do not use special include files; just use the
10295         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
10296         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
10297         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
10298         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
10299         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
10300         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
10301         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
10302         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
10303         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
10304         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
10305         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
10306         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
10307         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
10308         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
10309         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
10310         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
10311         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
10312         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
10313         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
10314         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
10315         WINT_MAX.  Check for C99 conformance more strictly, by detecting
10316         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
10317         not check for things that C99 does not require, e.g., int8_t.  If
10318         a test isn't needed unless <stdint.h> isn't working, and is
10319         unlikely to be needed for any other reason, then don't do it
10320         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
10321         size_t, since we assume C89 freestanding at least.  Do not check
10322         for sig_atomic_t, wchar_t, or wint_t, since the code now does
10323         the right thing even if the types are not defined.  Instead use:
10324         (gl_STDINT_TYPE_PROPERTIES): New macro.
10325         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
10326         testing whether <sys/types.h> clashes, as Autoconf does this for
10327         us now.  All uses removed.
10328         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
10329         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
10330         (gl_CHECK_TYPE_SAME):
10331         Remove; no longer needed.
10332         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
10333         exists, since we'll return 0 anyway in that case.
10334         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
10335
10336 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10337
10338         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
10339         possible collision with system files.
10340         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
10341         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
10342         WCHAR_MIN and WCHAR_MAX in this case.
10343         (<stddef.h>): Do not include; no longer needed.
10344         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
10345         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
10346         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
10347         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
10348         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
10349         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
10350         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
10351         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
10352         !defined(__c99))]: Include in this case too, since it's harmless
10353         now.
10354         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
10355         dangerous to do so.
10356         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
10357         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
10358         (_STDINT_MIN, _STDINT_MAX): New macros.
10359         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
10360         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
10361         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
10362         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
10363         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
10364         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
10365         macros, not typedefs; this simplifies things quite a bit.
10366         Use long int for all types narrower than int64_t.
10367         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
10368         Define in terms of long long int or int64_t or long int,
10369         not int64_t or int32_t.  This saves some compile-time testing.
10370         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
10371         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
10372         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
10373         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
10374         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
10375         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
10376         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
10377         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
10378         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
10379         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
10380         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
10381         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
10382         undef any previous version and define our own version, for
10383         simplicity and consistency with the new macros for types.
10384         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
10385         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
10386         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
10387         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
10388         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
10389         @WINT_T_SUFFIX@ to keep things simple here.
10390         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
10391         Simplify by assuming typical 8/16/32/64 host, since we're
10392         already doing that elsewhere anyway.
10393         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
10394         and assume long long int is 64 bits if available.  This
10395         speeds up 'configure'.
10396
10397 2006-07-01  Eric Blake  <ebb9@byu.net>
10398
10399         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
10400         Reported by Andreas Buening.
10401
10402 2006-07-01  Eric Blake  <ebb9@byu.net>
10403
10404         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
10405
10406 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
10407
10408         * lib/getaddrinfo.c: fixed typo
10409
10410 2006-06-29  Jim Meyering  <jim@meyering.net>
10411
10412         * modules/strftime (Maintainer): Add my name, since with the
10413         FPRINTFTIME changes strftime.c has forked from glibc.
10414
10415 2006-06-29  Eric Blake  <ebb9@byu.net>
10416
10417         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
10418
10419 2006-06-29  Eric Blake  <ebb9@byu.net>
10420
10421         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
10422
10423 2006-06-29  Eric Blake  <ebb9@byu.net>
10424
10425         * lib/stat_.h: New file.
10426
10427 2006-06-29  Eric Blake  <ebb9@byu.net>
10428
10429         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
10430         unused static function.
10431
10432 2006-06-29  Eric Blake  <ebb9@byu.net>
10433
10434         * doc/functions.texi (Function Portability): Document missing lstat
10435         on mingw.
10436
10437 2006-06-29  Eric Blake  <ebb9@byu.net>
10438
10439         * MODULES.html.sh: Add sys_stat.
10440         * modules/sys_stat: New module.
10441         * modules/mkstemp (Depends-on): Add sys_stat.
10442
10443 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10444
10445         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
10446
10447 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10448
10449         * m4/c-bs-a.m4: Removed.
10450
10451 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10452
10453         * lib/strftime.c: Assume strftime() exists.
10454
10455 2006-06-29  Derek Price  <derek@ximbiot.com>
10456
10457         * modules/c-bs-a: Removed - \a is C89.
10458         * MODULES.html.sh: Remove c-bs-a.
10459
10460 2006-06-29  Bruno Haible  <bruno@clisp.org>
10461
10462         * modules/wcwidth (License): Change to LGPL.
10463
10464 2006-06-28  Simon Josefsson  <jas@extundo.com>
10465
10466         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
10467         on _WIN32.
10468
10469         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
10470         getnameinfo.
10471
10472 2006-06-28  Simon Josefsson  <jas@extundo.com>
10473
10474         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
10475
10476 2006-06-28  Simon Josefsson  <jas@extundo.com>
10477
10478         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
10479         functions there.  It will succeed on Windows XP, but on Windows
10480         2000 and (presumably) earlier, it will fail, and use the internal
10481         re-implementation.
10482         (use_win32_p): New function.
10483         (getaddrinfo): Use strtoul on servname, to support numeric ports.
10484         Support AI_NUMERICSERV to disable getservbyname.
10485         (getnameinfo): New function, only supports
10486         NI_NUMERICHOST|NI_NUMERICSERV for now.
10487
10488         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
10489         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
10490         getnameinfo.
10491
10492 2006-06-28  Eric Blake  <ebb9@byu.net>
10493
10494         * modules/wcwidth: New file.
10495         * modules/mbchar (Depends-on): Add wcwidth.
10496         * modules/mbswidth (Depends-on): Add wcwidth.
10497         * MODULES.html.sh: Add wcwidth.
10498
10499 2006-06-28  Eric Blake  <ebb9@byu.net>
10500
10501         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
10502         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
10503
10504 2006-06-28  Eric Blake  <ebb9@byu.net>
10505
10506         * lib/xvasprintf.h: Fix comments.
10507
10508 2006-06-28  Eric Blake  <ebb9@byu.net>
10509
10510         * lib/mbchar.h (wcwidth): Include wcwidth.h.
10511         * lib/mbswidth.c (wcwidth): Move from here...
10512         * lib/wcwidth.h: ...to this new file.
10513
10514 2006-06-28  Derek R. Price  <derek@ximbiot.com>
10515
10516         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
10517
10518         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
10519         it's obsolete.
10520         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
10521
10522 2006-06-28  Derek R. Price  <derek@ximbiot.com>
10523
10524         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
10525         Autoconf 2.60 says this stuff was obsolete.
10526
10527 2006-06-28  Bruno Haible  <bruno@clisp.org>
10528
10529         * modules/wcwidth (Files): Add m4/wchar_t.m4.
10530
10531 2006-06-28  Bruno Haible  <bruno@clisp.org>
10532
10533         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
10534         gt_TYPE_WCHAR_T.
10535
10536 2006-06-28  Bruno Haible  <bruno@clisp.org>
10537
10538         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
10539         declaration for wcwidth.
10540         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
10541
10542 2006-06-28  Bruno Haible  <bruno@clisp.org>
10543
10544         * lib/mkdtemp.c [MINGW]: Include <io.h>.
10545         (mkdir): Define using _mkdir.
10546
10547 2006-06-28  Bruno Haible  <bruno@clisp.org>
10548
10549         * lib/getaddrinfo.h: Fix POSIX URL.
10550         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
10551         _WIN32.
10552         (use_win32_p): Make static.
10553         (getaddrinfo): Reject service name if it is empty or does not consist
10554         solely of decimal digits, or if its value is > 65535.
10555         (getnameinfo): Remove useless casts.
10556
10557 2006-06-27  Simon Josefsson  <jas@extundo.com>
10558
10559         * modules/sys_select: New file, suggested by Bruno Haible, Paul
10560         Eggert and Martin Lambers.
10561
10562 2006-06-27  Simon Josefsson  <jas@extundo.com>
10563
10564         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
10565         Eggert and Martin Lambers.
10566
10567 2006-06-27  Bruno Haible  <bruno@clisp.org>
10568
10569         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
10570         result to 0, not to empty.
10571         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
10572
10573 2006-06-27  Bruno Haible  <bruno@clisp.org>
10574
10575         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
10576
10577 2006-06-26  Simon Josefsson  <jas@extundo.com>
10578
10579         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
10580         present.
10581
10582 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
10583
10584         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
10585         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
10586         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
10587
10588 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
10589
10590         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
10591
10592 2006-06-26  Bruno Haible  <bruno@clisp.org>
10593
10594         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
10595
10596 2006-06-26  Bruno Haible  <bruno@clisp.org>
10597
10598         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
10599
10600 2006-06-26  Bruno Haible  <bruno@clisp.org>
10601
10602         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
10603         SGI C compiler in pre-C99 mode.
10604         Suggested by Mark D. Baushke and Larry Jones.
10605
10606 2006-06-26  Bruno Haible  <bruno@clisp.org>
10607
10608         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
10609         WCHAR_MAX.
10610         Reported by Mark D. Baushke and Larry Jones.
10611
10612 2006-06-26  Bruno Haible  <bruno@clisp.org>
10613
10614         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
10615         in pre-C99 mode.
10616         Suggested by Mark D. Baushke and Larry Jones.
10617
10618 2006-06-23  Simon Josefsson  <jas@extundo.com>
10619             Bruno Haible  <bruno@clisp.org>
10620
10621         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
10622         Emit mostlyclean-local rule.
10623         (func_emit_tests_Makefile_am): Likewise.
10624         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
10625
10626 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
10627
10628         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
10629
10630 2006-06-23  Bruno Haible  <bruno@clisp.org>
10631
10632         * tests/test-stdint.c: Update to match ISO C 99 Technical
10633         Corrigendum 1.
10634
10635 2006-06-23  Bruno Haible  <bruno@clisp.org>
10636
10637         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
10638
10639 2006-06-23  Bruno Haible  <bruno@clisp.org>
10640
10641         * lib/stdint_.h: Treat IRIX like OpenBSD.
10642
10643 2006-06-23  Bruno Haible  <bruno@clisp.org>
10644
10645         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
10646         ISO C 99 Technical Corrigendum 1.
10647
10648 2006-06-22  Simon Josefsson  <jas@extundo.com>
10649
10650         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
10651         MinGW.
10652
10653 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
10654
10655         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
10656         needed.  Some compiler complained about some of them.  Problem reported
10657         by Larry Jones in
10658         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
10659
10660 2006-06-21  Simon Josefsson  <jas@extundo.com>
10661
10662         * tests/test-getaddrinfo.c: New file.
10663
10664         * modules/getaddrinfo-tests: New file.
10665
10666         * MODULES.html.sh: Add inet_pton.
10667
10668         * modules/inet_pton: New file.
10669
10670 2006-06-21  Simon Josefsson  <jas@extundo.com>
10671
10672         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
10673         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
10674         of using the (limited) gnulib implementation on Windows XP.
10675
10676         * m4/inet_pton.m4: New file.
10677
10678 2006-06-21  Simon Josefsson  <jas@extundo.com>
10679
10680         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
10681         variable.
10682
10683         * lib/socket_.h: Don't define WINVER.
10684
10685         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
10686         slightly modified to work in gnulib.
10687
10688 2006-06-21  Simon Josefsson  <jas@extundo.com>
10689
10690         * doc/gnulib.texi (Windows sockets): Add.
10691
10692 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
10693
10694         * lib/read-file.c (fread_file): Start with buffer allocation of
10695         0 bytes rather than 1 byte; this simplifies the code.
10696         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
10697         code to free buffer and save/restore errno.
10698         (internal_read_file): Remove unused local.
10699
10700 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
10701
10702         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
10703         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
10704         Problem reported by Denis Excoffier in
10705         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
10706
10707 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10708
10709         * modules/sys_socket, modules/socklen: Include sys/types since
10710         FreeBSD 4.x's sys/socket.h needs it.
10711
10712 2006-06-19  Simon Josefsson  <jas@extundo.com>
10713
10714         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
10715
10716 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
10717
10718         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
10719
10720 2006-06-19  Bruno Haible  <bruno@clisp.org>
10721
10722         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
10723         and FULL_PATH_INTTYPES_H in angle brackets.
10724         Reported by Mark D. Baushke <mdb@gnu.org>.
10725
10726 2006-06-17  Eric Blake  <ebb9@byu.net>
10727
10728         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
10729         errno.
10730
10731 2006-06-17  Bruno Haible  <bruno@clisp.org>
10732
10733         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
10734         <sys/inttypes.h>.
10735
10736 2006-06-17  Bruno Haible  <bruno@clisp.org>
10737
10738         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
10739         whether errno is declared. Assume <errno.h> declares errno.
10740
10741 2006-06-17  Bruno Haible  <bruno@clisp.org>
10742
10743         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
10744
10745 2006-06-17  Bruno Haible  <bruno@clisp.org>
10746
10747         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
10748         problem on Solaris 2.5.1.
10749
10750 2006-06-16  Eric Blake  <ebb9@byu.net>
10751
10752         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
10753         * lib/unicodeio.c [!defined errno]: Likewise.
10754         * lib/strtol.c [!defined errno]: Likewise.
10755         * lib/strtod.c [!defined errno]: Likewise.
10756
10757 2006-06-15  Eric Blake  <ebb9@byu.net>
10758
10759         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
10760
10761 2006-06-15  Eric Blake  <ebb9@byu.net>
10762
10763         * config/srclist.txt (ssize_t.m4): Lose sync.
10764
10765 2006-06-15  Bruno Haible  <bruno@clisp.org>
10766
10767         * modules/stdint (Files): Include m4/full-header-path.m4,
10768         m4/size_max.m4, m4/wchar_t.m4.
10769         (Makefile.am): Many more substitutions.
10770         * modules/stdint-tests: New file.
10771         * tests/test-stdint.c: New file.
10772
10773 2006-06-15  Bruno Haible  <bruno@clisp.org>
10774
10775         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
10776         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
10777         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
10778         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
10779         gl_CHECK_TYPE_SAME): New macros.
10780
10781 2006-06-15  Bruno Haible  <bruno@clisp.org>
10782
10783         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
10784
10785 2006-06-15  Bruno Haible  <bruno@clisp.org>
10786
10787         * lib/stdint_.h: Rewritten to be fully auto-configured.
10788         Fixes bug on HP-UX/IA64.
10789
10790 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
10791
10792         * lib/getdate.y (__attribute__): Don't define if already defined.
10793         Problem reported by Larry Jones.
10794         * lib/utimens.c (__attribute__): Likewise.
10795
10796 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
10797
10798         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
10799         reported by Andreas Schwab.
10800
10801 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10802             Bruno Haible  <bruno@clisp.org>
10803
10804         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
10805         check for the declaration of strnlen and a run test that exposes the
10806         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
10807         rpl_strndup.
10808
10809 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10810             Bruno Haible  <bruno@clisp.org>
10811
10812         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
10813
10814 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10815
10816         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
10817         compile test, for Tru64 4.0D.
10818
10819 2006-05-28  Karl Berry  <karl@gnu.org>
10820
10821         * config/srclist.txt (printf-args.c): lose sync.
10822
10823 2006-05-26  Martin Lambers  <marlam@marlam.de>
10824
10825         * lib/getpass.c: Updates the test for the native W32 API, and adds
10826         missing includes, thus fixing compilation warnings.
10827
10828 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10829
10830         * lib/exclude.c (exclude_fnmatch): New function.
10831         (excluded_file_name): Call exclude_fnmatch.
10832         * lib/exclude.h (excluded_file_name): New prototype
10833
10834 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
10835
10836         * lib/tempname.c (small_open, large_open): New macros.
10837         (__open, __open64) [!_LIBC]: Remove.
10838         (__gen_tempname): Use small_open and large_open instead of __open
10839         and __open64.  This fixes a portability bug on HP-UX 11.11i
10840         reported by Simon Wing-Tang in
10841         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
10842
10843 2006-05-24  Bruno Haible  <bruno@clisp.org>
10844
10845         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
10846         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
10847         Reported by Thorsten Maerz <torte@netztorte.de> via
10848         Aaron Stone <aaron@serendipity.cx>.
10849
10850 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
10851
10852         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
10853         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
10854         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
10855         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
10856         not really conditional on the cache.
10857         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
10858
10859 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
10860
10861         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
10862         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
10863         (my_usleep): Don't mishandle maximum value.
10864
10865 2006-05-19  Jim Meyering  <jim@meyering.net>
10866
10867         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
10868
10869 2006-05-17  Bruno Haible  <bruno@clisp.org>
10870
10871         Cygwin portability.
10872         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
10873
10874 2006-05-17  Bruno Haible  <bruno@clisp.org>
10875
10876         * lib/stdint_.h: Fix recognition of Cygwin.
10877
10878 2006-05-15  Bruno Haible  <bruno@clisp.org>
10879
10880         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
10881         on libtool patch by Ralf Wildenhues.
10882
10883 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10884
10885         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
10886         test for C99 conformance; (bool) 0.5 is an integer constant
10887         expression, but (bool) -0.5 is not.  Problem reported by Fedor
10888         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
10889
10890 2006-05-11  Simon Josefsson  <jas@extundo.com>
10891
10892         * m4/xvasprintf.m4: Fix obvious typo.
10893
10894 2006-05-11  Jim Meyering  <jim@meyering.net>
10895
10896         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
10897         James Lemley.
10898
10899 2006-05-10  Simon Josefsson  <jas@extundo.com>
10900
10901         * lib/md4.c: Typo fix, update copyright years.
10902         (K1, K2): Don't use L because it turn computations into 64-bit on
10903         64-bit platforms.
10904
10905 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
10906
10907         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
10908         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
10909         unwanted sign propagation, e.g., on hosts with 64-bit int.
10910         There still are some problems with reeelly weird theoretical hosts
10911         (e.g., 33-bit int) but it's not worth worrying about now.
10912         * lib/sha1.c (rol): Likewise.
10913         (K1, K2, K3, K4): Remove unnecessary L suffix.
10914
10915 2006-05-10  Bruno Haible  <bruno@clisp.org>
10916
10917         * lib/des.c: Cast to avoid warnings.
10918
10919 2006-05-09  Bruno Haible  <bruno@clisp.org>
10920
10921         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
10922         (Depends-on): Depend also on xsize, stdarg.
10923         (configure.ac): Add gl_XVASPRINTF.
10924
10925 2006-05-09  Bruno Haible  <bruno@clisp.org>
10926
10927         * m4/xvasprintf.m4: New file.
10928
10929 2006-05-09  Bruno Haible  <bruno@clisp.org>
10930
10931         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
10932         (EOVERFLOW): Define fallback value.
10933         (xstrcat): New function.
10934         (xvasprintf): Recognize the special case of a string concatenation.
10935
10936 2006-05-08  Eric Blake  <ebb9@byu.net>
10937
10938         * gnulib-tool (func_version): Base copyright year on CVS date.
10939         (func_emit_copyright_notice): New function.
10940         (func_emit_lib_Makefile_am): Use it.
10941         (func_emit_tests_Makefile_am): Likewise.
10942         (func_import): Likewise.
10943
10944 2006-05-08  Bruno Haible  <bruno@clisp.org>
10945
10946         * modules/stdarg: New file.
10947         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
10948
10949 2006-05-08  Bruno Haible  <bruno@clisp.org>
10950
10951         * m4/stdarg.m4: New file, from GNU gettext.
10952
10953 2006-05-08  Bruno Haible  <bruno@clisp.org>
10954
10955         * config/srclist.txt (build-aux/config.rpath): different from latest
10956         release.
10957
10958 2006-05-08  Bruno Haible  <bruno@clisp.org>
10959
10960         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
10961
10962 2006-05-05  Jim Meyering  <jim@meyering.net>
10963
10964         * m4/warning.m4: New file, derived from bison's file by the same name.
10965
10966 2006-05-03  Bruno Haible  <bruno@clisp.org>
10967
10968         * lib/stdint_.h: Shorter URL.
10969         * lib/inttypes.h: Likewise.
10970
10971 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10972
10973         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
10974
10975 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10976
10977         * lib/verify.h: Document the internals better.  Most of this change
10978         was written by Bruno Haible.
10979
10980 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10981
10982         * doc/verify.texi: New file, partly based on a proposal by
10983         Bruno Haible.
10984
10985 2006-05-02  Bruno Haible  <bruno@clisp.org>
10986
10987         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
10988         test from here...
10989         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
10990
10991 2006-04-29  Bruno Haible  <bruno@clisp.org>
10992
10993         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
10994         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
10995
10996 2006-04-29  Bruno Haible  <bruno@clisp.org>
10997
10998         * gnulib-tool: Make --update option actually work.
10999
11000 2006-04-29  Bruno Haible  <bruno@clisp.org>
11001
11002         * doc/gcd.texi: New file.
11003         * doc/gnulib.texi: Include it.
11004
11005 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
11006
11007         * lib/getdate.y (get_date): When adding relative date, start with the
11008         initial time, not with the result of the first mktime call.
11009
11010 2006-04-25  Bruno Haible  <bruno@clisp.org>
11011
11012         * gnulib-tool (func_import): Output the include directives in three
11013         blocks, sorted separately.
11014         Reported by Ben Pfaff <blp@cs.stanford.edu>.
11015
11016 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11017
11018         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
11019         to define main with arguments, for C++.  Reported by Eric Blake.
11020         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
11021         Prefer 'int main ()' to 'int main (void)', for C++.
11022         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
11023         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
11024         for 'main', for C99 and C++.
11025
11026 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11027
11028         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
11029         Don't assume that exit status -1 is valid.
11030         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
11031         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
11032         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
11033         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
11034         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
11035         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
11036         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
11037         functions can be used without declaring them, or that you can
11038         exit with status -1.
11039         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
11040
11041 2006-04-24  Karl Berry  <karl@gnu.org>
11042
11043         * config/srclist.txt (longdouble.m4): sync lost.
11044
11045 2006-04-24  Eric Blake  <ebb9@byu.net>
11046
11047         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
11048
11049 2006-04-24  Bruno Haible  <bruno@clisp.org>
11050
11051         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
11052         poll() implementation in AIX.
11053         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11054
11055 2006-04-24  Bruno Haible  <bruno@clisp.org>
11056
11057         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
11058         assigned exactly once.
11059
11060 2006-04-23  Claudio Fontana  <claudio@gnu.org>
11061             Bruno Haible  <bruno@clisp.org>
11062
11063         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
11064         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
11065         for AM_CPPFLAGS.
11066
11067 2006-04-23  Bruno Haible  <bruno@clisp.org>
11068
11069         * modules/copy-file: Depend on unistd.
11070         * modules/execute: Likewise.
11071         * modules/fatal-signal: Likewise.
11072         * modules/findprog: Likewise.
11073         * modules/mkdtemp : Likewise.
11074         * modules/pipe: Likewise.
11075         * modules/wait-process: Likewise.
11076
11077 2006-04-23  Bruno Haible  <bruno@clisp.org>
11078
11079         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
11080         condition was already detected.
11081         Reported by Ben Pfaff <blp@cs.stanford.edu>.
11082
11083 2006-04-23  Bruno Haible  <bruno@clisp.org>
11084
11085         * lib/copy-file.c: Include <unistd.h> unconditionally.
11086         * lib/execute.c: Likewise.
11087         * lib/fatal-signal.c: Likewise.
11088         * lib/findprog.c: Likewise.
11089         * lib/mkdtemp.c: Likewise.
11090         * lib/pipe.h: Likewise.
11091         * lib/pipe.c: Likewise.
11092         * lib/wait-process.h: Likewise.
11093
11094 2006-04-23  Bruno Haible  <bruno@clisp.org>
11095
11096         * gnulib-tool (func_usage): Fix --import description. Document
11097         --update.
11098         (func_import): Create temporary file in a temporary directory, if
11099         --dry-run is specified. Silence errors from 'grep' when there are no
11100         m4 files in $m4dir.
11101         (func_create_testdir): Silence errors from 'grep' when there are no
11102         m4 files in $m4dir.
11103         Reported by Karl Berry <karl@freefriends.org>.
11104
11105 2006-04-20  Bruno Haible  <bruno@clisp.org>
11106
11107         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
11108         one argument, so that the code will be portable to Autoconf 2.60.
11109         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
11110         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
11111         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
11112
11113 2006-04-19  Derek Price  <derek@ximbiot.com>
11114             Eric Blake  <ebb9@byu.net>
11115
11116         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
11117         rather than "/full/path.h".  Update comment to match.  Shorten &
11118         generalize m4_translit call via AS_TR_CPP.
11119
11120 2006-04-19  Derek Price  <derek@ximbiot.com>
11121             Eric Blake  <ebb9@byu.net>
11122
11123         * lib/inttypes.h: Correct grammar in comment.
11124
11125 2006-04-18  Derek Price  <derek@ximbiot.com>
11126             Paul Eggert  <eggert@cs.ucla.edu>
11127
11128         * modules/inttypes: New file.
11129         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
11130
11131 2006-04-18  Derek Price  <derek@ximbiot.com>
11132             Paul Eggert  <eggert@cs.ucla.edu>
11133
11134         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
11135         New files.
11136
11137 2006-04-18  Derek Price  <derek@ximbiot.com>
11138             Paul Eggert  <eggert@cs.ucla.edu>
11139
11140         * lib/inttypes.h: New file.
11141         * lib/strtoimax.c: Assume <inttypes.h>.
11142
11143 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
11144
11145         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
11146         isn't mounted.  Problem reported by Kir Kolyshkin.
11147
11148 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
11149
11150         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
11151         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
11152         Derek R. Price.
11153         * lib/regex.h (RE_DUP_MAX): Update comment to match current
11154         implementation.
11155
11156 2006-04-12  Eric Blake  <ebb9@byu.net>
11157
11158         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
11159         is now done automatically by the corresponding Autoconf macro.
11160
11161 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
11162
11163         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
11164         time_r.h.
11165
11166 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11167
11168         Merge regex changes from libc, removing some of our
11169         POSIX-conformance changes that were rejected and redoing them in a
11170         less-intrusive way.
11171
11172         * lib/regcomp.c (re_compile_internal, init_dfa):
11173         Length arg is now size_t, not Idx.  All uses changed.
11174         (peek_token): Forward decl now says internal_function.
11175         (__re_error_msgid, __re_error_msgid_idx):
11176         Now static rather than extern with attribute_hidden.
11177         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
11178         For some reason libc prefers K&R style defns for external functions.
11179         (regerror) [!defined _LIBC]: Likewise.
11180         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
11181         (seek_collating_symbol_entry, lookup_collation_sequence_value):
11182         (build_range_exp, build_collating_symbol):
11183         Use K&R-style defn.
11184         (re_compile_fastmap): Use '\0' to memset, not 0.
11185         (utf8_sb_map): Make the calculations more obvious.
11186         (init_dfa, parse_bracket_exp, build_charclass_op):
11187         Call calloc and cast result, as glibc does.
11188         (init_word_char, fetch_token, peek_token, peek_token_bracket):
11189         (build_range_exp, build_collating_symbol):
11190         Now internal functions.
11191
11192         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
11193
11194         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
11195         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
11196         Don't depend on VMS; depend on __VMS instead, for POSIX
11197         namespace cleanness.
11198         (regoff_t): Define to ssize_t, not long int.
11199
11200         Remove the REG_ macros named below.  Instead, make the old names
11201         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
11202         __USE_GNU_REGEX.
11203         (REG_BACKSLASH_ESCAPE_IN_LISTS):
11204         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
11205         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
11206         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
11207         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
11208         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
11209         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
11210         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
11211         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
11212         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
11213         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
11214         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
11215         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
11216         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
11217         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
11218         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
11219         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
11220         (REG_NREGS):
11221         Remove.  All uses replaced by the old RE_* names.
11222         (RE_BACKSLASH_ESCAPE_IN_LISTS):
11223         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
11224         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
11225         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
11226         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
11227         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
11228         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
11229         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
11230         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
11231         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
11232         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
11233         Don't bother having these macros be independent of each others'
11234         values, since they no longer exist in the POSIX name space.
11235
11236         Rename the following member names back to their old names,
11237         unless !__USE_GNU_REGEX.  All uses changed back.
11238         (buffer): Renamed from re_buffer.
11239         (allocated): Renamed from re_allocated.
11240         (used): Renamed from re_used.
11241         (syntax): Renamed from re_syntax.
11242         (fastmap): Renamed from re_fastmap.
11243         (translate): Renamed from re_translate.
11244         (can_be_null): Renamed from re_can_be_null.
11245         (regs_allocated): Renamed from re_regs_allocated.
11246         (fastmap_accurate): Renamed from re_fastmap_accurate.
11247         (no_sub): Renamed from re_no_sub.
11248         (not_bol): Renamed from re_not_bol.
11249         (not_eol): Renamed from re_not_eol.
11250         (newline_anchor): Renamed from re_newline_anchor.
11251         (num_regs): Renamed from rm_num_regs.
11252         (start): Renamed from rm_start.
11253         (end): Renamed from rm_end.
11254
11255         (free_state): Move up a bit.
11256
11257         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
11258         #define to be empty.
11259         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
11260         when that is what is intended.
11261         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
11262         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
11263         (MAX): New macro.
11264         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
11265         All uses changed back to re_malloc, etc.  It's now the caller's
11266         responsibility to check for overflow; all callers changed.
11267         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
11268         (re_x2nrealloc): Remove.
11269         (free_state): Remove decl.
11270
11271         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
11272         (re_set_registers, re_exec):
11273         Use K&R-style defn.
11274
11275         2006-01-31  Roland McGrath  <roland@redhat.com>
11276
11277         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
11278         Reported by Mike Frysinger <vapier@gentoo.org>.
11279
11280         2006-01-15  Andreas Jaeger  <aj@suse.de>
11281
11282         [BZ #1950]
11283         * lib/regex_internal.c (re_string_reconstruct): Adjust for
11284         build_wcs_upper_buffer change.
11285         (build_wcs_upper_buffer): Change return type.
11286
11287         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
11288
11289         * lib/regex_internal.h: Include <stdint.h> if available.
11290
11291         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
11292
11293         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
11294
11295         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
11296
11297         * lib/regcomp.c: Adjust for changed secondary hash function.
11298
11299         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
11300
11301         * lib/regex.h: Pretty printing.
11302         Clean up namespace a bit.
11303
11304         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
11305
11306         * lib/regexec.c (update_cur_sifted_state, check_arrival,
11307         check_arrival_add_next_nodes): Avoid using uninitialized variable.
11308
11309         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11310                     Ulrich Drepper  <drepper@redhat.com>
11311
11312         [BZ #1302]
11313         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
11314         changed.
11315         (bitset_word_t): Renamed from bitset_word.  All uses changed.
11316
11317         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
11318
11319         [BZ #281]
11320         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
11321         * lib/regcomp.c: Remove unnecessary uses of
11322         unsigned RE_TRANSLATE_TYPE.
11323         * lib/regex_internal.h: Likewise.
11324         * lib/regex_internal.c: Likewise.
11325         * lib/regexec.c: Likewise.
11326         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
11327
11328         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
11329
11330         * lib/regexec.c (find_recover_state): Remove unnecessary
11331         initialization.
11332         (transit_state_bkref): Make DFA a const pointer.
11333         (get_subexp): Likewise.
11334         (check_arrival): Likewise.
11335         (update_cur_sifted_state): Likewise.
11336         (re_search_internal): Likewise.
11337         (prune_impossible_nodes): Likewise.
11338         (acquire_init_state_context): Likewise.
11339         (proceed_next_node): Likewise.
11340         (set_regs): Likewise.
11341         (free_fail_stack_return): Likewise.
11342         (check_arrival_expand_ecl): Mark DFA parameter as const.
11343         (check_arrival_expand_ecl_sub): Likewise.
11344         (check_subexp_limits): Likewise.
11345         (sub_epsilon_src_nodes):  Likewise.
11346         (add_epsilon_src_nodes):  Likewise.
11347         (merge_state_array): Likewise.
11348         (update_regs): Likewise.
11349         (build_trtable): Likewise.
11350         (sift_states_backward): Mark MCTX parameter as const.
11351         (build_sifted_states): Likewise.
11352         (update_cur_sifted_state): Likewise.
11353         (sift_states_mkref): Likewise.
11354         (check_arrival_expand_ecl): Mark eclosure as const.
11355         (check_dst_limits_calc_pos_1): Likewise.
11356         * lib/regex_internal.h (re_match_context_t): Make dfa a const
11357         pointer.
11358
11359         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
11360
11361         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
11362         (transit_state_sb): Likewise.
11363         (transit_state_mb): Likewise.
11364         (sift_states_iter_mb): Likewise.
11365         (check_arrival_add_next_nodes): Likewise.
11366         (check_node_accept_bytes): Change first parameter to pointer-to-const.
11367         [_LIBC] (re_search_2_stub): Use mempcpy.
11368
11369         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
11370         mbrtowc for very simple UTF-8 case.
11371
11372         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
11373         a pointer-to-const.
11374         (re_acquire_state_context): Likewise.
11375         * lib/regex_internal.h: Adjust prototypes.
11376
11377         * lib/regex.c: Prevent using C++ compilers.
11378
11379         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
11380         (re_acquire_state_context): Likewise.
11381
11382 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11383
11384         * modules/regex (Depends-on): Add ssize_t.
11385
11386 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11387
11388         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
11389         translation table.
11390
11391 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11392
11393         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
11394
11395 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
11396             Bruno Haible  <bruno@clisp.org>
11397
11398         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
11399         <sys/types.h> and <inttypes.h>.
11400
11401 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11402
11403         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
11404         `__error_t_defined', so argp.h will not typedef the former.
11405
11406 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
11407
11408         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
11409         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
11410         glibc names.  Even if glibc is changed to conform to POSIX, the
11411         traditional names will be available anyway, since regex depends on
11412         the extensions module.  Also, fix a longstanding typo in the
11413         implementation of Spencer ERE test #75 from grep 2.3.  Problems
11414         reported by Emanuele Giaquinta.  Also, change sense of cached
11415         variable, so that the message makes sense.
11416
11417 2006-03-24  Simon Josefsson  <jas@extundo.com>
11418
11419         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
11420         including some doc fixes.
11421         (base64_encode_alloc): Fix +1 bug on allocation failures.
11422
11423 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11424
11425         * lib/base64.c (base64_encode): Do not read past end of array with
11426         unsanitized input on systems with CHAR_BIT > 8.
11427
11428 2006-03-24  Eric Blake  <ebb9@byu.net>
11429
11430         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
11431
11432 2006-03-22  Karl Berry  <karl@gnu.org>
11433
11434         * config/srclist.txt (*setenv.[ch]): get from coreutils.
11435         * config/srclistvars.sh (COREUTILS): new var.
11436
11437 2006-03-17  Jim Meyering  <jim@meyering.net>
11438
11439         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
11440         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
11441
11442 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
11443
11444         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
11445         no longer needs it.  Instead, check that regoff_t is as least
11446         as wide as ptrdiff_t.
11447
11448         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
11449         so that our regex.h stays compatible with the installed regex.
11450         This is helpful for installers who configure --without-included-regex.
11451         Problem reported by Emanuele Giaquinta.
11452
11453 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
11454
11455         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
11456         Typedef to long int, not to off_, as POSIX will likely change
11457         in that direction.
11458
11459 2006-03-15  Eric Blake  <ebb9@byu.net>
11460
11461         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
11462
11463 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11464
11465         * lib/argp-help.c (validate_uparams): Fix typo
11466         * lib/argp-parse.c (argp_default_options): Consistently begin help
11467         messages with a lowercase letter.
11468
11469 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
11470
11471         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
11472         overrun buffers and shouldn't be used (much as gets shouldn't be
11473         used).
11474         * lib/time_r.c (asctime_r, ctime_r): Likewise.
11475
11476 2006-03-08  Simon Josefsson  <jas@extundo.com>
11477
11478         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
11479         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11480
11481 2006-03-08  Simon Josefsson  <jas@extundo.com>
11482
11483         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
11484         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11485
11486 2006-03-08  Simon Josefsson  <jas@extundo.com>
11487
11488         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
11489         signal that configure disabled the device.
11490
11491 2006-03-08  Simon Josefsson  <jas@extundo.com>
11492
11493         * build-aux/maint.mk: Fix refresh-po, to handle no translated
11494         languages.
11495
11496 2006-03-07  Simon Josefsson  <jas@extundo.com>
11497
11498         * modules/getopt (Depends-on): Add unistd.
11499
11500         * modules/unistd: New file.
11501
11502 2006-03-07  Simon Josefsson  <jas@extundo.com>
11503
11504         * modules/gc-random: New file.
11505
11506 2006-03-07  Simon Josefsson  <jas@extundo.com>
11507
11508         * m4/unistd_h.m4: New file.
11509
11510 2006-03-07  Simon Josefsson  <jas@extundo.com>
11511
11512         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
11513         test to be side-effect free by storing the result in the cache
11514         variable gl_cv_lib_readline, and moving the assignment of
11515         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
11516         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11517
11518 2006-03-07  Simon Josefsson  <jas@extundo.com>
11519
11520         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
11521         error on missing devices (the functions will return an error).
11522
11523         * m4/gc.m4: Move random stuff to gc-random.m4
11524
11525 2006-03-07  Simon Josefsson  <jas@extundo.com>
11526
11527         * lib/unistd_.h: New file.
11528
11529 2006-03-07  Simon Josefsson  <jas@extundo.com>
11530
11531         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
11532
11533 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11534
11535         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
11536         Problem reported by Juan Manuel Guerrero.
11537
11538 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11539
11540         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
11541         the unistd module.
11542         * lib/getlogin_r.c: Likewise.
11543         * lib/getlogin_r.h: Likewise.
11544         * lib/glob.c: Likewise.
11545         * lib/pagealign_alloc.c: Likewise.
11546         * lib/unistd_.h: Remove; no longer needed.
11547
11548 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11549
11550         * MODULES.html.sh (Support for systems lacking POSIX:2001):
11551         Add unistd.
11552         * modules/c-stack (Depends-on): Add unistd.
11553         * modules/getlogin_r: Likewise.
11554         * modules/glob: Likewise.
11555         * modules/pagealign_alloc: Likewise.
11556         * modules/unistd (Files): Remove lib/unistd_.h.
11557         (EXTRA_DIST): Remove.
11558         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
11559         need unistd_.h.
11560         (MOSTLYCLEANFILES): Remove unistd.h-t.
11561
11562 2006-03-03  Simon Josefsson  <jas@extundo.com>
11563
11564         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
11565
11566 2006-03-03  Simon Josefsson  <jas@extundo.com>
11567
11568         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
11569         libidn and bison.
11570
11571 2006-03-03  Simon Josefsson  <jas@extundo.com>
11572
11573         * build-aux/maint.mk: Add indent target.
11574
11575 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
11576
11577         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
11578         our replacement poll.h in any case, to avoid a differing
11579         declaration from a system header.  Seen on AIX.
11580
11581 2006-03-01  Simon Josefsson  <jas@extundo.com>
11582
11583         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
11584         <kasal@ucw.cz>.
11585
11586 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11587
11588         * modules/gettime (Depends-on): Add extensions module.
11589         * modules/nanosleep (Depends-on): Likewise.
11590         * modules/settime (Depends-on): Likewise.
11591
11592 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11593
11594         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
11595         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
11596         pedantically.
11597         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
11598         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
11599
11600         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
11601         not "==".  Reported by Ralf Wildenhues.
11602
11603 2006-03-01  Karl Berry  <karl@gnu.org>
11604
11605         * doc/Copyright/request-*: new files, synced from gnuorg.
11606
11607 2006-03-01  Karl Berry  <karl@gnu.org>
11608
11609         * config/srclist.txt (Copyright/*): new entries.
11610
11611 2006-02-28  Simon Josefsson  <jas@extundo.com>
11612
11613         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
11614
11615 2006-02-27  Simon Josefsson  <jas@extundo.com>
11616
11617         * lib/base64.h: Indent #define's.  From Jim Meyering
11618         <jim@meyering.net>.
11619
11620 2006-02-27  Jim Meyering  <jim@meyering.net>
11621
11622         Revert the change of 2006-02-24, so these files can continue
11623         to be sync'd from gettext.
11624         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
11625         of `config.h'.
11626
11627 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
11628
11629         * modules/intprops: New file.
11630         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
11631         Add intprops.
11632         * modules/getloadavg (Files): Remove lib/intprops.h.
11633         (Depends-on): Add intprops.
11634         * modules/human: Likewise.
11635         * modules/inttostr: Likewise.
11636         * modules/openat: Likewise.
11637         * modules/sig2str: Likewise.
11638         * modules/userspec: Likewise.
11639         * modules/utimecmp: Likewise.
11640         * modules/xnanosleep: Likewise.
11641         * modules/xstrtol: Likewise.
11642
11643 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
11644
11645         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
11646         * modules/lock-tests (TESTS): Use $(EXEEXT).
11647         * modules/tls-tests: Likewise.
11648         * modules/argp-tests: Likewise.
11649         (check_PROGRAMS): New var, replacing...
11650         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
11651
11652 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11653
11654         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
11655         `config.h'.
11656
11657 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
11658
11659         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
11660
11661 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11662
11663         Sync from coreutils.
11664         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
11665         gl_CHDIR_SAFER.
11666
11667 2006-02-22  Jim Meyering  <jim@meyering.net>
11668
11669         Sync from coreutils.
11670         * m4/chdir-safer.m4: New file.
11671
11672 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
11673
11674         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
11675         AT_FDCWD exceeds INT_MAX.
11676         * lib/openat.h (AT_FDCWD): Likewise.
11677
11678 2006-02-17  Eric Blake  <address@hidden>
11679
11680         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
11681
11682 2006-02-16  Simon Josefsson  <jas@extundo.com>
11683
11684         * modules/getaddrinfo (Depends-on): Add sys_socket.
11685
11686 2006-02-15  Simon Josefsson  <jas@extundo.com>
11687
11688         * build-aux/maint.mk: Add dsyntax-check rule.
11689
11690 2006-02-15  Eric Blake  <ebb9@byu.net>
11691
11692         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
11693         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
11694         'present but cannot compile' warnings on cygwin.
11695         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
11696         use ws2tcpip.h if sys/socket.h works.
11697         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
11698         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
11699
11700 2006-02-14  Simon Josefsson  <jas@extundo.com>
11701
11702         * modules/maintainer-makefile (Files): Rename.
11703
11704         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
11705         and (the local) Makefile.cfg to maint-cfg.mk.
11706
11707         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
11708         to the latter.
11709
11710         * modules/maintainer-makefile: New module.
11711
11712         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
11713         severaly stripped to make it possible to build it up from scratch
11714         with reliable tests.
11715
11716         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
11717         fixes to permit overriding the default actions when configure and
11718         makefile are not available.
11719
11720 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
11721
11722         Sync from coreutils.
11723         * modules/lstat (Depends-on): Don't depend on xalloc.
11724         (License): Change from GPL to LGPL, since this is now simply a
11725         replacement for a libc function.
11726
11727 2006-02-14  Jim Meyering  <jim@meyering.net>
11728
11729         Sync from coreutils.
11730
11731         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
11732         failure on deficient systems, and simplify gnulib lgpl dependencies.
11733         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
11734         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
11735
11736         * lib/xalloc-die.c: Remove unused definition of N_.
11737
11738 2006-02-14  Jim Meyering  <jim@meyering.net>
11739
11740         Sync from coreutils.
11741         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
11742         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
11743         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
11744         double-quote uses of that variable, to accommodate the rare case in
11745         which getmntent is available in none of the libraries checked.  This
11746         happens at least on FreeBSD 5.0.
11747
11748 2006-02-13  Simon Josefsson  <jas@extundo.com>
11749
11750         * gnulib-tool (Usage): Fix --import, from
11751         karl@freefriends.org (Karl Berry).
11752
11753 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11754
11755         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
11756
11757 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11758
11759         * lib/argp-namefrob.h: Restore changes accidentally lost during the
11760         "autoupdate" on 2005-12-12.
11761
11762 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
11763
11764         * modules/closeout (Depends-on): Remove atexit.
11765
11766 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
11767
11768         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
11769         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
11770
11771 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
11772
11773         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
11774         __EXTENSIONS__ if this causes compilation to fail.  Problem
11775         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
11776         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
11777
11778 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
11779
11780         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
11781         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
11782         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
11783         All uses changed.
11784
11785 2006-01-26  Simon Josefsson  <jas@extundo.com>
11786
11787         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
11788         prototype is visible on mingw32.
11789
11790         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
11791         for mingw32.
11792
11793         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
11794         mingw32).
11795
11796 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
11797
11798         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
11799         attempt to open for write; this always fails, at least on POSIX
11800         hosts.  This reinstates the 2006-01-09 change, which was
11801         inadvertently removed.
11802
11803 2006-01-26  Bruno Haible  <bruno@clisp.org>
11804
11805         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
11806         Reported by Paul Eggert.
11807
11808 2006-01-26  Bruno Haible  <bruno@clisp.org>
11809             Paul Eggert  <eggert@cs.ucla.edu>
11810
11811         * lib/stdbool_.h (_Bool)
11812         [(! (defined __cplusplus || defined __BEOS__)
11813           && !defined __GNUC__
11814           && !(defined __HP_cc || defined __xlc__
11815                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
11816                || defined __sgi))]:
11817         #define to signed char in these cases too; this simplifies
11818         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
11819         etc., separately) and makes it more conservative.
11820
11821 2006-01-25  Simon Josefsson  <jas@extundo.com>
11822
11823         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
11824         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
11825         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
11826
11827 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11828
11829         * lib/argp-namefrob.h: Bugfix. Remove stray #
11830
11831 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
11832
11833         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
11834         so that we test the test.
11835         Check for yet another HP-UX cc bug involving *bool |= bool.
11836
11837 2006-01-25  Karl Berry  <karl@gnu.org>
11838
11839         * config/srclist.txt (vasnprintf.c): sync lost.
11840
11841 2006-01-25  Jim Meyering  <jim@meyering.net>
11842
11843         Sync from the stable (b5) branch of coreutils:
11844
11845         * lib/fts.c (fts_children): Don't let close() clobber errno from
11846         failed fchdir().
11847
11848         * lib/fts.c (fts_stat): When following a symlink-to-directory,
11849         don't necessarily interpret stat-fails+lstat-succeeds as indicating
11850         a dangling symlink.  That can also happen at least for ELOOP.
11851         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
11852         FYI, this bug predates the inclusion of fts.c in coreutils.
11853
11854         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
11855         in their own block, so pre-c99 compilers don't object.
11856
11857         Avoid the double-free (first in fts_read, second in fts_close) that
11858         would occur when an `active' directory is made inaccessible (e.g.,
11859         via chmod a-x) during a traversal.
11860         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
11861         before returning.  Reproduce this failure by
11862         mkdir -p a/b; cd a; chmod a-x . b
11863         Reported by Stavros Passas.
11864
11865 2006-01-25  Jim Meyering  <jim@meyering.net>
11866
11867         * lib/fileblocks.c: Remove more useless parentheses.
11868         * lib/readutmp.h: Likewise.
11869
11870 2006-01-25  Bruno Haible  <bruno@clisp.org>
11871
11872         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
11873         warnings.
11874         Reported by Paul Eggert.
11875
11876 2006-01-25  Bruno Haible  <bruno@clisp.org>
11877
11878         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
11879         rid of a trap command. For Solaris sh.
11880         Reported by Mark D. Baushke <mdb@gnu.org>.
11881
11882 2006-01-24  Simon Josefsson  <jas@extundo.com>
11883
11884         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
11885         Bruno.
11886
11887 2006-01-24  Karl Berry  <karl@gnu.org>
11888
11889         * config/srclist.txt (argp-namefrob.h): sync lost.
11890
11891 2006-01-24  Jim Meyering  <jim@meyering.net>
11892
11893         * modules/openat (Files): Add lib/intprops.h.
11894         From Mark D. Baushke.
11895
11896 2006-01-24  Jim Meyering  <jim@meyering.net>
11897
11898         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
11899         Reported by Mark D. Baushke.
11900
11901 2006-01-24  Jim Meyering  <jim@meyering.net>
11902
11903         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
11904
11905 2006-01-24  Bruno Haible  <bruno@clisp.org>
11906
11907         * modules/strnlen (Maintainer): Change from glibc to all.
11908
11909 2006-01-24  Bruno Haible  <bruno@clisp.org>
11910
11911         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
11912         Patch by Paul Eggert.
11913
11914 2006-01-24  Bruno Haible  <bruno@clisp.org>
11915
11916         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
11917         already has it.
11918         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
11919         2005-11-26.
11920
11921         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
11922         'signed char' to avoid problems with the built-in _Bool type.
11923         Reported by Paul Eggert on 2005-11-26.
11924
11925 2006-01-24  Bruno Haible  <bruno@clisp.org>
11926
11927         * gnulib-tool (func_import): Avoid constructing complicated sed
11928         expressions inside backquote.
11929         Report and solution by Mark D. Baushke <mdb@gnu.org>.
11930
11931 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
11932
11933         These changes imported from libc.
11934         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
11935         test and two separate function calls.
11936         * lib/strndup.c (__strndup): Add libc_hidden_def.
11937
11938 2006-01-23  Simon Josefsson  <jas@extundo.com>
11939
11940         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
11941         Remove the test_*_SOURCES variable: automake infers it by default.
11942         * modules/tls-tests: Likewise.
11943
11944 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11945
11946         Work around porting bugs reported by Dieter in
11947         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
11948         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
11949         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
11950         Include "getopt.h" first, to check interface.
11951         (getenv): Declare only if defined HAVE_DECL_GETENV &&
11952         !HAVE_DECL_GETENV.
11953         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
11954         (__strndup): Revert to K&R-style function dfns, the glibc style.
11955         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
11956         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
11957         Include strnlen.h first, to get prototype properly.
11958         (strnlen): Renamed from __strnlen.
11959         Remove weak alias.
11960
11961 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11962
11963         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
11964
11965 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11966
11967         * config/srclist.txt: Adjust to reflect glibc reorganization.
11968         This affects only comments.
11969
11970 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11971
11972          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
11973          Reported by Bruce Korb <bkorb@gnu.org>.
11974
11975 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
11976
11977         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
11978         to pacify gcc -Wswitch-default.
11979
11980 2006-01-22  Bruno Haible  <bruno@clisp.org>
11981
11982         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
11983         temporary buffer for sprintf, take into account the precision also
11984         for 'd', 'i', 'u', 'o', 'x', 'X'.
11985
11986 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11987
11988         * modules/argp-tests: New module
11989         * tests/test-argp.c: New file
11990         * tests/test-argp-2.sh: New file
11991
11992 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11993
11994         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
11995         (__argp_base_name): Removed
11996         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
11997         typo.
11998         (__argp_base_name): Provide macro definition or extern declaration
11999         depending on the configuration
12000
12001 2006-01-20  Simon Josefsson  <jas@extundo.com>
12002
12003         * modules/inet_ntop (Depends-on): Depend on sys_socket.
12004
12005 2006-01-20  Simon Josefsson  <jas@extundo.com>
12006
12007         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
12008
12009 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12010
12011         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
12012         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
12013         Suggested by Bruno Haible.
12014
12015 2006-01-20  Karl Berry  <karl@gnu.org>
12016
12017         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
12018         until changes propagate, I guess.
12019
12020 2006-01-19  Simon Josefsson  <jas@extundo.com>
12021
12022         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
12023
12024 2006-01-19  Simon Josefsson  <jas@extundo.com>
12025
12026         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
12027
12028 2006-01-19  Simon Josefsson  <jas@extundo.com>
12029
12030         * gnulib-tool: Set check_PROGRAMS.
12031
12032         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
12033         modules/des-tests, modules/gc-arcfour-tests,
12034         modules/gc-arctwo-tests, modules/gc-des-tests,
12035         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
12036         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
12037         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
12038         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
12039         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
12040         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
12041         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
12042         test_*_SOURCES.
12043
12044 2006-01-18  Simon Josefsson  <jas@extundo.com>
12045
12046         * modules/socklen (Depends-on): Depend on sys_socket.
12047
12048 2006-01-18  Simon Josefsson  <jas@extundo.com>
12049
12050         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
12051         modules/des-tests, modules/gc-arcfour-tests,
12052         modules/gc-arctwo-tests, modules/gc-des-tests,
12053         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
12054         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
12055         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
12056         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
12057         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
12058         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
12059         $(EXEEXT) to automake TESTS variable, for mingw32.
12060
12061 2006-01-17  Simon Josefsson  <jas@extundo.com>
12062
12063         * modules/socklen (Include): Need sys/socket.h.
12064
12065 2006-01-17  Bruno Haible  <bruno@clisp.org>
12066
12067         * modules/ssize_t (Include): Add <sys/types.h>.
12068
12069 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
12070
12071         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
12072         it's not portable and it doesn't work with cross-compiles.
12073         Problem reported by Bruno Haible.  Fix missing-$ typo in
12074         'test "gl_cv_ignore_unused_libraries" ...' that prevented
12075         -zignore from being used with Sun's C compiler.
12076
12077 2006-01-12  Simon Josefsson  <jas@extundo.com>
12078
12079         * lib/base64.c: Fix warning, reported by Bruno Haible
12080         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
12081
12082 2006-01-12  Bruno Haible  <bruno@clisp.org>
12083
12084         * modules/ldd: New file.
12085         * build-aux/ldd.sh.in: New file.
12086         * MODULES.html.sh (Support for building libraries and executables): Add
12087         ldd.
12088
12089 2006-01-12  Bruno Haible  <bruno@clisp.org>
12090
12091         * m4/ldd.m4: New file.
12092
12093 2006-01-12  Bruno Haible  <bruno@clisp.org>
12094
12095         * gnulib-tool (func_import, func_create_testdir): Don't go into an
12096         endless loop while replacing $auxdir with build-aux.
12097
12098 2006-01-11  Simon Josefsson  <jas@extundo.com>
12099
12100         * lib/stdint_.h (SIZE_MAX): Add missing (.
12101
12102 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
12103
12104         Sync from coreutils.
12105         * lib/md5.c: Fix commentary typos.
12106         (alignof, UNALIGNED_P): No need for a GCC-specific version.
12107         * lib/md5.h (__attribute__): Remove; unused.
12108         * lib/sha1.c: Fix commentary to match md5 better.
12109         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
12110         so that we don't need to worry about alignment.  All uses changed.
12111         This merges the 2005-10-28 md5 change into sha1.
12112
12113 2006-01-11  Jim Meyering  <jim@meyering.net>
12114
12115         Sync from coreutils.
12116         * lib/md5.c (OP): Fix spacing.
12117
12118 2006-01-11  Bruno Haible  <bruno@clisp.org>
12119
12120         Ensure automatic ordering between gl_LOCK and gl_ARGP.
12121         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
12122         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
12123
12124 2006-01-11  Bruno Haible  <bruno@clisp.org>
12125
12126         Ensure automatic ordering between gl_LOCK and gl_ARGP.
12127         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
12128         the "early" section as well.
12129
12130 2006-01-11  Bruno Haible  <bruno@clisp.org>
12131
12132         Avoid "ar: no archive members specified" error on MacOS X.
12133         * gnulib-tool (func_modules_add_dummy): New function.
12134         (func_import, func_create_testdir): Invoke it.
12135
12136 2006-01-11  Bruno Haible  <bruno@clisp.org>
12137
12138         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
12139         with $auxdir in AC_CONFIG_FILES statements.
12140
12141 2006-01-11  Bruno Haible  <bruno@clisp.org>
12142
12143         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12144         Initialize also noinst_HEADERS to empty.
12145
12146 2006-01-11  Bruno Haible  <bruno@clisp.org>
12147
12148         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
12149         variables.
12150         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
12151         autoreconf.
12152
12153 2006-01-11  Bruno Haible  <bruno@clisp.org>
12154
12155         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
12156         overridable by the user.
12157         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12158
12159 2006-01-10  Simon Josefsson  <jas@extundo.com>
12160
12161         * modules/sys_socket: New file.
12162
12163 2006-01-10  Simon Josefsson  <jas@extundo.com>
12164
12165         * m4/sys_socket_h.m4: New file.
12166
12167 2006-01-10  Simon Josefsson  <jas@extundo.com>
12168
12169         * lib/socket_.h: New file.
12170
12171 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12172
12173         * modules/readutmp (Maintainer): Add myself.
12174
12175 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12176
12177         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
12178         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
12179         People who are still concerned with buggy memcmp implementations
12180         can invoke gl_FUNC_MEMCMP themselves.
12181
12182 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12183
12184         * lib/regex_internal.h (BITSET_WORD_BITS):
12185         Work around a bug in 64-bit PGC (before version 6.1-2), where the
12186         preprocessor mishandles large unsigned values as if they were signed.
12187         Problem reported by Claudio Fontana in
12188         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
12189
12190 2006-01-10  Jim Meyering  <jim@meyering.net>
12191
12192         Avoid the double-free (first in fts_read, second in fts_close) that
12193         would occur when an `active' directory is made inaccessible (e.g.,
12194         via chmod a-x) during a traversal.
12195         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
12196         before returning.  Reproduce this failure by
12197         mkdir -p a/b; cd a; chmod a-x . b
12198         Reported by Stavros Passas.
12199
12200         Sync from coreutils.
12201         * lib/sha1.c: Tweak grammar in a comment.
12202
12203 2006-01-10  Jim Meyering  <jim@meyering.net>
12204
12205         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
12206         Patch by Joerg Sonnenberger.
12207
12208 2006-01-10  Bruno Haible  <bruno@clisp.org>
12209
12210         * modules/readutmp: Depend on module free.
12211         * modules/strtok_r: Depend on module restrict.
12212
12213 2006-01-10  Bruno Haible  <bruno@clisp.org>
12214
12215         * modules/gettext (configure.ac): Add an invocation of
12216         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
12217
12218 2006-01-10  Bruno Haible  <bruno@clisp.org>
12219
12220         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
12221         Reported by Werner Lemberg <wl@gnu.org>.
12222
12223 2006-01-10  Bruno Haible  <bruno@clisp.org>
12224
12225         * lib/localcharset.c: Update from GNU gettext.
12226
12227 2006-01-10  Bruno Haible  <bruno@clisp.org>
12228
12229         * lib/argp.h (__const): Remove macro. Use const instead.
12230         * lib/argp-fmtstream.h (__const): Likewise.
12231         * lib/glob_.h (__const): Remove macro.
12232         * lib/glob-libc.h: Use const instead of __const.
12233
12234 2006-01-10  Bruno Haible  <bruno@clisp.org>
12235
12236         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
12237         variable.
12238         Needed to avoid an automake error regarding the 'gettext' module.
12239
12240 2006-01-09  Simon Josefsson  <jas@extundo.com>
12241
12242         * modules/inet_ntop (Depends-on): Add restrict.
12243
12244 2006-01-09  Simon Josefsson  <jas@extundo.com>
12245
12246         * modules/gc-rijndael-tests (License): Put under LGPL.
12247
12248         * modules/gc-des-tests (License): Likewise.
12249
12250         * modules/gc-arcfour-tests (License): Likewise.
12251
12252         * modules/gc-arctwo-tests (License): Likewise.
12253
12254         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
12255
12256         * modules/gc-hmac-sha1-tests (Files): Likewise.
12257
12258         * modules/gc-hmac-md5-tests (License): Likewise.
12259
12260         * modules/gc-sha1-tests (License): Likewise.
12261
12262         * modules/gc-md5-tests (License): Likewise.
12263
12264         * modules/gc-md4-tests (License): Likewise.
12265
12266         * modules/gc-md2-tests (License): Likewise.
12267
12268         * modules/gc-tests (License): Likewise.
12269
12270         * modules/des-tests (License): Likewise.
12271
12272         * modules/md4-tests (License): Likewise.
12273
12274         * modules/md2-tests (License): Likewise.
12275
12276 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12277
12278         Sync from coreutils:
12279
12280         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
12281         * modules/lib-ignore: New file.
12282         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
12283         chdir-safer.m4, lchmod.m4.
12284         * modules/openat: Add mkdirat.c, openat-priv.h.
12285
12286 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12287
12288         Sync from coreutils.
12289         * m4/lib-ignore.m4: New file.
12290         * m4/lchmod.m4: New file.
12291
12292 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12293
12294         Sync from coreutils.
12295         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
12296         for write access: POSIX says that must fail.
12297         * lib/fts.c (diropen): Likewise.
12298         * lib/save-cwd.c (save_cwd): Likewise.
12299         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
12300         well, for minor improvements on hosts that lack O_DIRECTORY.
12301         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
12302         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
12303         Fall back on chown if open failed with EACCES.
12304
12305         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
12306         Report an error at compile-time if only a 1-second nominal clock
12307         resolution is found.
12308
12309         * lib/lchmod.h: New file.
12310         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
12311         (make_dir_parents): Use lchown rather than chown, and
12312         lchmod rather than chmod.
12313
12314         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
12315         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
12316         "proc" reported by n0dalus.
12317
12318         * lib/mountlist.c: Include <limits.h>.
12319         (dev_from_mount_options)
12320         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
12321         New function.  It no longer assumes "dev=" has the System V meaning
12322         on Linux (since it doesn't).  It also parses "dev=" more carefully.
12323         (read_file_system_list)
12324         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
12325         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
12326         dev= in that case.
12327
12328         * lib/posixtm.h (PDS_PRE_2000): New macro.
12329         * lib/posixtm.c (year): Arg is now syntax_bits rather than
12330         allow_century.  All usages changed.  Reject dates outside the range
12331         1969-1999 if PDS_PRE_2000 is used.
12332
12333 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12334
12335         Sync from coreutils.
12336         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
12337         (Time of day items): Mention the possibility of leap seconds.
12338         Problem reported by Dr. David Alan Gilbert.
12339
12340 2006-01-09  Jim Meyering  <jim@meyering.net>
12341
12342         Sync from coreutils.
12343
12344         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
12345
12346         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
12347
12348         * lib/modechange.c (mode_compile): Reject an invalid mode string
12349         that starts with an octal digit.  From Andreas Gruenbacher.
12350
12351         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
12352         and dup to open_safer and dup_safer, respectively.
12353         (openat_permissive): Fix typo in comment.
12354
12355         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
12356         "gettext.h"; either no longer needed or are guaranteed by openat.h.
12357         (_): Remove; no longer needed.
12358         (openat): Renamed from rpl_openat; no need for rpl_openat
12359         since openat.h renames openat for us.
12360         Replace most of the body with a call to openat_permissive,
12361         to avoid duplicate code.
12362         Port to (probably hypothetical) environments were mode_t is
12363         wider than int.
12364         (openat_permissive): Require mode arg, so that we can check
12365         types better.  Put it just after flags.  Change cwd failure
12366         indicator from pointer-to-bool to pointer-to-errno-value.
12367         All callers changed.
12368         Invoke openat_save_fail and/or openat_restore_fail if
12369         cwd_errno is null, so that openat can call us.
12370         (openat_permissive, fdopendir, fstatat, unlinkat):
12371         Simplify errno handling to avoid some duplicate code,
12372         as it's OK to set errno on success.
12373         * lib/openat.h: Revamp code so that function macros depend on
12374         __OPENAT_PREFIX only, not also on AT_FDCWD.
12375         (openat_ro): Remove.  Caller changed to use openat_permissive.
12376         (openat_permissive): Now a macro, if not a function.
12377         (openat_restore_fail, openat_save_fail): Now always functions,
12378         since mkdirat needs them even if __OPENAT_PREFIX is defined.
12379
12380         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
12381         and openat.c.
12382         * lib/mkdirat.c: Include openat-priv.h.
12383         Remove definitions of macros defined therein.
12384         * lib/openat.c: Likewise.
12385
12386         * lib/mkdirat.c (mkdirat): New file and function.
12387         * lib/openat.h (mkdirat): Declare.
12388
12389         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
12390
12391         * lib/openat.h (openat_permissive): Declare.
12392         (openat_ro): Define.
12393
12394         * lib/openat.c (EXPECTED_ERRNO): New macro.
12395         (openat_permissive): New function -- used in remove.c rewrite.
12396         (all functions): Set errno just before returning, only if there
12397         was an actual failure.
12398         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
12399
12400         Emulate openat-family functions using Linux's procfs, if possible.
12401         Idea and some code based on Ulrich Drepper's glibc changes.
12402
12403         * lib/openat.c: (BUILD_PROC_NAME): New macro.
12404         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
12405         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
12406         before falling back on save_cwd and restore_cwd.
12407         (fdopendir, fstatat, unlinkat): Likewise.
12408
12409         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
12410         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
12411
12412         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
12413         as second argument to va_arg.  Otherwise, some versions of gcc
12414         warn that `if this code is reached, the program will abort'.
12415
12416 2006-01-09  Jim Meyering  <jim@meyering.net>
12417
12418         Sync from coreutils.
12419         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
12420         Require openat-priv.h.
12421
12422 2006-01-09  Bruno Haible  <bruno@clisp.org>
12423
12424         * modules/strnlen (Include): Use strnlen.h.
12425
12426 2006-01-09  Bruno Haible  <bruno@clisp.org>
12427
12428         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
12429
12430 2006-01-09  Bruno Haible  <bruno@clisp.org>
12431
12432         * lib/sysexit_.h (EX_OK): New macro.
12433         Suggested by Martin Lambers <marlam@marlam.de>.
12434
12435 2006-01-09  Bruno Haible  <bruno@clisp.org>
12436
12437         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
12438         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
12439
12440 2006-01-09  Bruno Haible  <bruno@clisp.org>
12441
12442         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
12443         numbers.
12444
12445 2006-01-09  Bruno Haible  <bruno@clisp.org>
12446
12447         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
12448         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
12449         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
12450         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
12451
12452 2006-01-09  Bruno Haible  <bruno@clisp.org>
12453
12454         * build-aux/javacomp.sh.in: New file, moved from lib/.
12455         * modules/javacomp-script (Files): Update.
12456         (configure.ac): Add AC_CONFIG_FILES invocation.
12457         (EXTRA_DIST): Remove variable.
12458
12459         * build-aux/javaexec.sh.in: New file, moved from lib/.
12460         * modules/javaexec (Files): Update.
12461         (configure.ac): Add AC_CONFIG_FILES invocation.
12462         (EXTRA_DIST): Remove javaexec.sh.in.
12463
12464         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
12465         * modules/csharpcomp-script (Files): Update.
12466         (configure.ac): Add AC_CONFIG_FILES invocation.
12467         (EXTRA_DIST): Remove variable.
12468
12469         * build-aux/csharpexec.sh.in: New file, moved from lib/.
12470         * modules/csharpexec (Files): Update.
12471         (configure.ac): Add AC_CONFIG_FILES invocation.
12472         (EXTRA_DIST): Remove csharpexec.sh.in.
12473
12474 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
12475
12476         Sync from coreutils.
12477
12478         Add POSIX ACL support
12479         * lib/acl.h (copy_acl, set_acl): Add declarations.
12480         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
12481         systems other than Linux.
12482         (chmod_or_fchmod): New function: use fchmod when possible,
12483         and chmod otherwise.
12484         (file_has_acl): Add a POSIX ACL implementation, with a
12485         Linux-specific subcase.
12486         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
12487         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
12488         acls are unsupported.
12489         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
12490         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
12491         are unsupported.
12492
12493 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
12494
12495         Sync from coreutils.
12496         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
12497
12498 2006-01-07  Bruno Haible  <bruno@clisp.org>
12499
12500         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
12501         gl_EARLY.
12502
12503 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12504
12505         * lib/strftime.c (tzname): Don't declare if it is already #defined.
12506         Problem reported for Mingw by Mark Junker.
12507
12508 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12509
12510         * README: Gnulib normally doesn't generate a tarball.
12511
12512 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
12513
12514         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
12515         long int, not int, for nanosecond counts, so that people who are
12516         used to POSIX struct timespec won't be surprised.  Reported by Jim
12517         Meyering.
12518
12519 2005-12-28  Bruno Haible  <bruno@clisp.org>
12520
12521         * build-aux/config.rpath: Update from GNU gettext.
12522
12523 2005-12-16  Jim Meyering  <jim@meyering.net>
12524
12525         * modules/fprintftime: New module.
12526         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
12527
12528 2005-12-16  Jim Meyering  <jim@meyering.net>
12529
12530         * m4/fprintftime.m4: New file.
12531
12532 2005-12-16  Jim Meyering  <jim@meyering.net>
12533
12534         * lib/fprintftime.c, lib/fprintftime.h: New files.
12535
12536 2005-12-15  Simon Josefsson  <jas@extundo.com>
12537
12538         * modules/socklen (configure.ac): Fix M4 macro name, to align with
12539         new m4/socklen.m4.
12540
12541 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
12542
12543         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
12544         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
12545
12546 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
12547
12548         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
12549         * lib/argp-help.c (fill_in_uparams): Check if the constructed
12550         struct uparams is valid. Fall back to the default values if it is
12551         not.
12552
12553 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12554
12555         * modules/argp (Files): Add argp-pin.c
12556         (Depends-on): dirname
12557         (lib_SOURCES): Add argp-pin.c
12558
12559 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12560
12561         * m4/argp.m4:  Check if program_invocation_name and
12562         program_invocation_short_name are declared and define appropriate
12563         macros if they are not.
12564
12565 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12566
12567         * lib/argp-help.c (__argp_base_name): New function
12568         (__argp_short_program_name): Rewrite using __argp_base_name
12569         * lib/argp-namefrob.h: Define program_invocation_name and
12570         program_invocation_short_name if requested
12571         (__argp_base_name): Add prototype
12572         * lib/argp-parse.c (argp_def): Use gettext wrappers
12573         (argp_default_parser): Use __argp_base_name
12574         * lib/argp-pin.c: New file. Defines program_invocation_name and
12575         program_invocation_short_name on systems that lack them.
12576
12577 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
12578
12579         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
12580         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
12581         porting problem reported by Georg Schwarz in
12582         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
12583
12584 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
12585
12586         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
12587         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
12588         porting problem reported by Georg Schwarz in
12589         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
12590
12591 2005-12-05  Bruno Haible  <bruno@clisp.org>
12592
12593         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
12594         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
12595         Reported by Mark Junker <mjscod@gmx.de>.
12596
12597 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
12598
12599         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
12600         Use implementation from Albert Chin, with some
12601         comments/corrections by Stepan Kasal and myself.
12602
12603 2005-12-02  Bruno Haible  <bruno@clisp.org>
12604
12605         * gnulib-tool (func_import): Accept GPLed build tool modules when
12606         --lgpl is given.
12607         * modules/csharpcomp-script: New file.
12608         * modules/csharpcomp: Depend on it.
12609         * modules/javacomp-script: New file.
12610         * modules/javacomp: Depend on it.
12611         Suggested by Simon Josefsson.
12612
12613 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
12614
12615         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
12616         statement, to work around an HP-UX 10.20 compiler bug reported by
12617         Peter O'Gorman.
12618
12619 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
12620
12621         * modules/savedir (Depends-on): Add openat.
12622
12623 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
12624
12625         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
12626         (uintmax_t) [defined uintmax_t]: Do not declare.
12627         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
12628         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
12629         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
12630         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
12631         sake of portability to weird hosts that C allows (though we don't
12632         know of any practical examples).
12633
12634         * lib/savedir.h (fdsavedir): New decl.
12635         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
12636         contains most of the former guts of savedir.
12637         (savedir): Use savedirstream.
12638         Include "openat.h".
12639
12640 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12641
12642         * modules/obstack (Files): Add m4/ulonglong.m4.
12643         Problem reported by Davide Angelocola.
12644
12645 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
12646
12647         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
12648         coreutils no longer futzes with rounding modes.
12649
12650 2005-11-14  Jim Meyering  <jim@meyering.net>
12651
12652         * lib/mkstemp-safer.c: Include <config.h>, required for possible
12653         replacement of mkstemp.
12654
12655 2005-11-10  Simon Josefsson  <jas@extundo.com>
12656
12657         * lib/readline.c: Remove EOL.
12658
12659 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12660
12661         * modules/gethrxtime (Depends-on): Add gettime.
12662
12663 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12664
12665         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
12666         or gettimeofday; no longer needed.
12667
12668 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12669
12670         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
12671         time business.
12672         (gethrxtime) [! (HAVE_NANOUPTIME
12673         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
12674         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
12675         our own approximation.
12676
12677 2005-11-08  Eric Blake  <ebb9@byu.net>
12678
12679         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
12680
12681 2005-11-08  Eric Blake  <ebb9@byu.net>
12682
12683         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
12684
12685 2005-11-04  Bruno Haible  <bruno@clisp.org>
12686
12687         * gnulib-tool: Implement --update mode.
12688
12689 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
12690
12691         Fix porting problem reported by Theodoros V. Kalamatianos.
12692         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
12693         Don't assume that futimes failing means we must fail.
12694
12695 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
12696
12697         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
12698         variables to suggest the intended function of the PATH_MAX check.
12699
12700 2005-10-30  Kean Johnston  <jkj@sco.com>
12701
12702         Trivial changes to support SCO systems.
12703         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
12704         as PATH_MAX.
12705         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
12706         where __ptr is null when no I/O is pending.
12707
12708 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12709
12710         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
12711         leave errno alone.  Problem reported by Dmitry V. Levin.
12712
12713 2005-10-28  Simon Josefsson  <jas@extundo.com>
12714
12715         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
12716         Test more.
12717
12718         * tests/test-gc-md2.c, tests/test-md2.c: New files.
12719
12720         * modules/md2, modules/md2-tests: New files.
12721
12722 2005-10-28  Simon Josefsson  <jas@extundo.com>
12723
12724         * m4/inet_ntop.m4: More tests.
12725
12726         * m4/gc-md2.m4, md2.m4: New file.
12727
12728 2005-10-28  Simon Josefsson  <jas@extundo.com>
12729
12730         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
12731         "restrict" keywords, as per POSIX.  Protect the function
12732         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
12733         Don't use K&R prototypes.  Check the sprintf return values.
12734         Re-define EAFNOSUPPORT if not present.  Indent.
12735
12736         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
12737         suggested by Bruno Haible <bruno@clisp.org>.
12738
12739         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
12740
12741         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
12742
12743         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
12744         libgcrypt).
12745
12746         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
12747
12748         * lib/md2.h, lib/md2.c: New files.
12749
12750 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
12751
12752         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
12753         errno alone.  Problem reported by Frederic Jolliton.
12754
12755 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
12756
12757         * modules/verify (License): Change from GPL to LGPL.  This is a
12758         tiny module and there are apparently near-equivalents that are
12759         under the BSD license.
12760
12761 2005-10-24  Simon Josefsson  <jas@extundo.com>
12762
12763         * modules/sha1: Relicense to LGPL.
12764
12765 2005-10-24  Simon Josefsson  <jas@extundo.com>
12766
12767         * lib/md4.h: Shrink buffer size, now that we changed the type.
12768
12769 2005-10-23  Simon Josefsson  <jas@extundo.com>
12770
12771         * gnulib-tool (func_import): Fix --tests-base.
12772
12773 2005-10-22  Simon Josefsson  <jas@extundo.com>
12774
12775         * modules/arcfour (Depends-on): Need stdint.
12776
12777 2005-10-22  Simon Josefsson  <jas@extundo.com>
12778
12779         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
12780         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
12781
12782 2005-10-22  Simon Josefsson  <jas@extundo.com>
12783
12784         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
12785         suggested by Bruno Haible <bruno@clisp.org>.
12786
12787 2005-10-22  Simon Josefsson  <jas@extundo.com>
12788
12789         * lib/crc.h: Include stddef.h, for size_t.
12790
12791 2005-10-22  Simon Josefsson  <jas@extundo.com>
12792
12793         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
12794         arcfour_context struct (simplify test vector testing in GNU
12795         Shishi).
12796
12797 2005-10-21  Simon Josefsson  <jas@extundo.com>
12798
12799         * modules/des, modules/des-tests: New files.
12800
12801         * modules/gc-des, modules/gc-des-tests: New files.
12802
12803         * tests/test-des.c, tests/test-gc-des.c: New file.
12804
12805 2005-10-21  Simon Josefsson  <jas@extundo.com>
12806
12807         * modules/arctwo, modules/arctwo-tests: New files.
12808
12809         * tests/test-arctwo.c: New file.
12810
12811         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
12812
12813         * tests/test-gc-arctwo.c: New file.
12814
12815 2005-10-21  Simon Josefsson  <jas@extundo.com>
12816
12817         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
12818         Bruno Haible <bruno@clisp.org>.
12819
12820         * m4/gc-des.m4: New file.
12821
12822 2005-10-21  Simon Josefsson  <jas@extundo.com>
12823
12824         * m4/arctwo.m4: New file.
12825
12826         * m4/gc-arctwo.m4: New file.
12827
12828 2005-10-21  Simon Josefsson  <jas@extundo.com>
12829
12830         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
12831         block.
12832
12833 2005-10-21  Simon Josefsson  <jas@extundo.com>
12834
12835         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
12836         <bruno@clisp.org>.
12837
12838         * lib/hmac-sha1.c (hmac_sha1): Likewise.
12839
12840         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
12841         Bruno Haible <bruno@clisp.org>.
12842
12843         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
12844         <bruno@clisp.org>.
12845
12846 2005-10-21  Simon Josefsson  <jas@extundo.com>
12847
12848         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
12849
12850 2005-10-21  Simon Josefsson  <jas@extundo.com>
12851
12852         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
12853
12854 2005-10-21  Simon Josefsson  <jas@extundo.com>
12855
12856         * lib/des.h, lib/des.c: New files.
12857
12858         * lib/gc-gnulib.c: Support DES.c
12859
12860 2005-10-21  Simon Josefsson  <jas@extundo.com>
12861
12862         * lib/arctwo.h, lib/arctwo.c: New files.
12863
12864         * lib/gc-gnulib.c: Support ARCTWO.
12865
12866 2005-10-21  Simon Josefsson  <jas@extundo.com>
12867
12868         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
12869         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12870
12871 2005-10-21  Simon Josefsson  <jas@extundo.com>
12872
12873         * gnulib-tool (func_import, func_create_testdir): Define automake
12874         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
12875         Makefile.am snippet),
12876         suggested by Bruno Haible <bruno@clisp.org>.
12877
12878         * modules/gc (Makefile.am): Use it.
12879
12880 2005-10-21  Bruno Haible  <bruno@clisp.org>
12881
12882         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
12883         patch.
12884
12885 2005-10-19  Simon Josefsson  <jas@extundo.com>
12886
12887         * tests/test-gc-rijndael.c: New file.
12888
12889         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
12890
12891 2005-10-19  Simon Josefsson  <jas@extundo.com>
12892
12893         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
12894         interface too.
12895
12896 2005-10-19  Simon Josefsson  <jas@extundo.com>
12897
12898         * tests/test-gc-arcfour.c: New file.
12899
12900         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
12901
12902 2005-10-19  Simon Josefsson  <jas@extundo.com>
12903
12904         * modules/gc-md4, modules/gc-md4-tests: New file.
12905
12906         * tests/test-gc-md4.c: New file.
12907
12908 2005-10-19  Simon Josefsson  <jas@extundo.com>
12909
12910         * m4/gc-md4.m4: New file.
12911
12912 2005-10-19  Simon Josefsson  <jas@extundo.com>
12913
12914         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
12915         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
12916         <kasal@ucw.cz>.
12917
12918 2005-10-19  Simon Josefsson  <jas@extundo.com>
12919
12920         * m4/gc-arcfour.m4: New file.
12921
12922         * m4/gc-rijndael.m4: New file.
12923
12924 2005-10-19  Simon Josefsson  <jas@extundo.com>
12925
12926         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
12927
12928 2005-10-19  Simon Josefsson  <jas@extundo.com>
12929
12930         * lib/gc-gnulib.c: Support ARCFOUR.
12931
12932 2005-10-19  Simon Josefsson  <jas@extundo.com>
12933
12934         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
12935         support.
12936
12937         * lib/gc.h: Add ECB enum type.
12938
12939         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
12940
12941 2005-10-18  Simon Josefsson  <jas@extundo.com>
12942
12943         * tests/test-md5.c: New file.
12944
12945         * modules/md5-tests: New file.
12946
12947 2005-10-18  Simon Josefsson  <jas@extundo.com>
12948
12949         * tests/test-md4.c: New file.
12950
12951         * modules/md4, modules/md4-tests: New files.
12952
12953 2005-10-18  Simon Josefsson  <jas@extundo.com>
12954
12955         * m4/md4.m4: New file.
12956
12957 2005-10-18  Simon Josefsson  <jas@extundo.com>
12958
12959         * lib/md4.h, lib/md4.c: New files, based on md5.?.
12960
12961 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
12962
12963         * gnulib-tool (func_create_testdir): Omit the second check whether
12964         BUILT_SOURCES in nonempty.
12965
12966 2005-10-17  Simon Josefsson  <jas@extundo.com>
12967
12968         * tests/test-rijndael.c: New file.
12969
12970 2005-10-17  Simon Josefsson  <jas@extundo.com>
12971
12972         * modules/sha1: Depend on stdint instead of md5.
12973
12974         * modules/md5: Depend on stdint, remove uint32_t.
12975
12976 2005-10-17  Simon Josefsson  <jas@extundo.com>
12977
12978         * modules/gc-sha1-tests: New file.
12979
12980         * tests/test-gc-sha1.c: New file.
12981
12982 2005-10-17  Simon Josefsson  <jas@extundo.com>
12983
12984         * m4/md5.m4: Remove call to uint32_t.m4.
12985
12986 2005-10-17  Simon Josefsson  <jas@extundo.com>
12987
12988         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
12989
12990         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
12991         md5.h.
12992
12993         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
12994
12995         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
12996
12997 2005-10-17  Simon Josefsson  <jas@extundo.com>
12998
12999         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
13000
13001 2005-10-17  Simon Josefsson  <jas@extundo.com>
13002
13003         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
13004
13005 2005-10-17  Simon Josefsson  <jas@extundo.com>
13006
13007         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
13008
13009         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
13010
13011 2005-10-17  Bruno Haible  <bruno@clisp.org>
13012
13013         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
13014         that it can also be used in a test.
13015
13016 2005-10-16  Bruno Haible  <bruno@clisp.org>
13017
13018         * gnulib-tool (func_emit_tests_Makefile_am): Also define
13019         TESTS_ENVIRONMENT, so that individual tests can augment it.
13020
13021         * gnulib-tool (func_create_testdir): Use an intermediate target for
13022         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
13023         macros, like $(ALLOCA_H), which cannot be passed through the command
13024         line.
13025
13026 2005-10-15  Simon Josefsson  <jas@extundo.com>
13027
13028         * modules/rijndael-tests: New file.
13029
13030         * modules/rijndael: New file.
13031
13032 2005-10-15  Simon Josefsson  <jas@extundo.com>
13033
13034         * m4/rijndael.m4: New file.
13035
13036 2005-10-15  Simon Josefsson  <jas@extundo.com>
13037
13038         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
13039
13040         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
13041
13042 2005-10-14  Simon Josefsson  <jas@extundo.com>
13043
13044         * tests/test-arcfour.c: New file.
13045
13046         * modules/arcfour, modules/arcfour-tests: New files.
13047
13048 2005-10-14  Simon Josefsson  <jas@extundo.com>
13049
13050         * m4/arcfour.m4: New file.
13051
13052 2005-10-14  Simon Josefsson  <jas@extundo.com>
13053
13054         * lib/arcfour.h, lib/arcfour.c: New files.
13055
13056 2005-10-14  Roland McGrath  <roland@redhat.com>
13057
13058         Import from libc.  [BZ #1331]
13059         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
13060         macro argument.
13061         Reported by Matej Vela <vela@debian.org>.
13062
13063 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
13064
13065         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
13066         include <wchar.h>; no longer needed.
13067
13068 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
13069
13070         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
13071
13072 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
13073         and  Ulrich Drepper  <drepper@redhat.com>
13074
13075         Import from libc.
13076         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
13077         instead of inline stream orientation test and two separate
13078         function calls.  Pay no attention to USE_IN_LIBIO.
13079
13080 2005-10-13  Simon Josefsson  <jas@extundo.com>
13081
13082         * modules/gc-hmac-md5-tests: New file.
13083
13084         * tests/test-gc-hmac-sha1.c: New file.
13085
13086         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
13087
13088         * modules/gc-hmac-md5-tests: New file.
13089
13090         * tests/test-gc-md5.c: New file.
13091
13092         * modules/gc-md5-tests: New file.
13093
13094 2005-10-13  Simon Josefsson  <jas@extundo.com>
13095
13096         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
13097         Move memory allocation outside of loop.
13098
13099 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
13100
13101         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
13102         intermediate directory is in a read-only file system.  Problem
13103         reported by Eric Blake.
13104
13105 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
13106
13107         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
13108
13109 2005-10-12  Simon Josefsson  <jas@extundo.com>
13110
13111         * tests/test-hmac-sha1.c: New file.
13112
13113         * modules/hmac-sha1-tests: New file.
13114
13115         * modules/hmac-sha1: New file.
13116
13117 2005-10-12  Simon Josefsson  <jas@extundo.com>
13118
13119         * modules/gc-sha1: New file.
13120
13121 2005-10-12  Simon Josefsson  <jas@extundo.com>
13122
13123         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
13124
13125         * tests/test-gc-pbkdf2-sha1.c: New file.
13126
13127 2005-10-12  Simon Josefsson  <jas@extundo.com>
13128
13129         * modules/gc-md5, modules/gc-hmac-md5: New files.
13130
13131         * modules/gc (Files): Remove md5, memxor and hmac files.
13132
13133 2005-10-12  Simon Josefsson  <jas@extundo.com>
13134
13135         * m4/gc-pbkdf2-sha1.m4: New file.
13136
13137         * m4/gc-hmac-sha1.m4: New file.
13138
13139         * m4/gc-sha1: New file.
13140
13141         * m4/hmac-sha1.m4: New file.
13142
13143 2005-10-12  Simon Josefsson  <jas@extundo.com>
13144
13145         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
13146
13147         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
13148
13149 2005-10-12  Simon Josefsson  <jas@extundo.com>
13150
13151         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
13152         suggested by Bruno Haible <bruno@clisp.org>.
13153
13154 2005-10-12  Simon Josefsson  <jas@extundo.com>
13155
13156         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
13157
13158 2005-10-12  Simon Josefsson  <jas@extundo.com>
13159
13160         * lib/gc-pbkdf2-sha1.c: New file.
13161
13162         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
13163
13164 2005-10-12  Simon Josefsson  <jas@extundo.com>
13165
13166         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
13167
13168         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
13169
13170 2005-10-12  Simon Josefsson  <jas@extundo.com>
13171
13172         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
13173         GC_USE_HMAC_MD5, respectively.
13174
13175         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
13176         (gc_md5): Fix typo.
13177
13178         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
13179
13180         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
13181
13182         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
13183
13184 2005-10-12  Bruno Haible  <bruno@clisp.org>
13185
13186         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
13187         Reported by Stepan Kasal <kasal@ucw.cz>.
13188
13189 2005-10-11  Simon Josefsson  <jas@extundo.com>
13190
13191         * tests/test-crc.c: New file.
13192
13193         * modules/crc, modules/crc-tests: New files.
13194
13195 2005-10-11  Simon Josefsson  <jas@extundo.com>
13196
13197         * m4/crc.m4: New file.
13198
13199 2005-10-11  Simon Josefsson  <jas@extundo.com>
13200
13201         * lib/gc.h: Add gc_hash and gc_hash_buffer.
13202
13203         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
13204
13205         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
13206
13207 2005-10-11  Simon Josefsson  <jas@extundo.com>
13208
13209         * lib/crc.h, lib/crc.c: New files.
13210
13211         * lib/gc.h (gc_hash_buffer): Add doc.
13212
13213 2005-10-11  Bruno Haible  <bruno@clisp.org>
13214
13215         * modules/c-strcasestr: New file.
13216         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
13217
13218 2005-10-11  Bruno Haible  <bruno@clisp.org>
13219
13220         * modules/c-strcase: New file.
13221         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
13222
13223 2005-10-11  Bruno Haible  <bruno@clisp.org>
13224
13225         * lib/strcasecmp.c: Include limits.h.
13226         (strcasecmp): Avoid integer overflow on exotic platforms.
13227         * lib/strncasecmp.c: Include limits.h.
13228         (strncasecmp): Avoid integer overflow on exotic platforms.
13229         Reported by Paul Eggert.
13230
13231 2005-10-11  Bruno Haible  <bruno@clisp.org>
13232
13233         * lib/c-strcasestr.h: New file, from GNU gettext.
13234         * lib/c-strcasestr.c: New file, from GNU gettext.
13235
13236 2005-10-11  Bruno Haible  <bruno@clisp.org>
13237
13238         * lib/c-strcase.h: New file, from GNU gettext.
13239         * lib/c-strcasecmp.c: New file, from GNU gettext.
13240         * lib/c-strncasecmp.c: New file, from GNU gettext.
13241
13242 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
13243
13244         * modules/mempcpy (License): GPL -> LGPL.
13245         * modules/strchrnul (License): Likewise.
13246         * modules/sysexits (License): Likewise.
13247
13248 2005-10-08  Simon Josefsson  <jas@extundo.com>
13249
13250         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
13251
13252 2005-10-07  Simon Josefsson  <jas@extundo.com>
13253
13254         * m4/memxor.m4: Remove gl_C_RESTRICT call.
13255
13256 2005-10-06  Simon Josefsson  <jas@extundo.com>
13257
13258         * tests/test-hmac-md5.c: New file.
13259
13260         * modules/hmac-md5-tests: New file.
13261
13262         * modules/hmac-md5: New file.
13263
13264 2005-10-06  Simon Josefsson  <jas@extundo.com>
13265
13266         * m4/hmac-md5.m4: New file.
13267
13268         * m4/memxor.m4: Require gl_C_RESTRICT.
13269
13270 2005-10-06  Simon Josefsson  <jas@extundo.com>
13271
13272         * lib/memxor.c (memxor): Avoid casts and warnings.
13273
13274 2005-10-06  Simon Josefsson  <jas@extundo.com>
13275
13276         * lib/hmac-md5.c: New file.
13277
13278         * lib/hmac.h: New file.
13279
13280 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
13281
13282         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
13283         promotes to int, not unsigned int, to catch the AIX 5.3
13284         compiler bug.
13285
13286 2005-10-05  Simon Josefsson  <jas@extundo.com>
13287
13288         * modules/memxor: New file.
13289
13290         * modules/iconv (Files): Move config.rpath to havelib, it is used
13291         there.
13292
13293         * modules/havelib (Files): Add config.rpath.
13294
13295 2005-10-05  Simon Josefsson  <jas@extundo.com>
13296
13297         * m4/memxor.m4: New file.
13298
13299 2005-10-05  Simon Josefsson  <jas@extundo.com>
13300
13301         * lib/memxor.c (memxor): Fix compiler error.
13302
13303         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
13304         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
13305
13306         * lib/memxor.h, lib/memxor.c: New files.
13307
13308         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
13309         we assume all systems have it, suggested by Jim Meyering
13310         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
13311         any systems lack sys/socket.h; mingw32 is known to lack it, but we
13312         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
13313         same reasons.
13314
13315 2005-10-05  Simon Josefsson  <jas@extundo.com>
13316
13317         * config/srclist.txt: Add glibc bug 1423 for md5.h.
13318
13319 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
13320
13321         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
13322         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
13323         needed, since the source code now assumes these .h files.
13324
13325 2005-10-05  Derek Price  <derek@ximbiot.com>
13326
13327         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
13328
13329 2005-10-05  Bruno Haible  <bruno@clisp.org>
13330
13331         * modules/stdint (License): Change to LGPL.
13332
13333 2005-10-04  Simon Josefsson  <jas@extundo.com>
13334
13335         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
13336         D. Baushke" <mdb@gnu.org>.
13337
13338 2005-10-04  Bruno Haible  <bruno@clisp.org>
13339
13340         * lib/verify.h (verify_true): Provide alternative definition for C++.
13341
13342 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
13343
13344         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
13345         (SSIZE_MAX): New macro, if not already defined.
13346         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
13347         than 2 GiB.
13348
13349 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13350
13351         Sync from coreutils.
13352         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
13353         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
13354         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
13355         ULLONG_MAX doesn't work with 2.7.2.1.
13356
13357 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13358
13359         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
13360         From Ben Pfaff.
13361
13362         * modules/exclude (Depends-on): Depend on verify.
13363         * modules/strtoimax (Depends-on): Likewise.
13364         * modules/utimecmp (Depends-on): Likewise.
13365
13366 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13367
13368         * lib/exclude.c: Include verify.h.
13369         (verify): Remove.  All callers changed to use verify.h's version.
13370         * lib/strtoimax.c: Likewise.
13371         * lib/utimecmp.c: Likewis.e
13372
13373         Sync from coreutils.
13374         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
13375         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
13376         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
13377         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
13378         bother returning ENOSYS if settimeofday or stime fails; just let
13379         them return whatever errno they want to return.
13380         * lib/utimens.c: Include unistd.h, for dup2.
13381         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
13382         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
13383
13384 2005-10-02  Jim Meyering  <jim@meyering.net>
13385
13386         Sync from coreutils.
13387         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
13388         from glibc-2.2.5 that fails for read-only files.
13389
13390 2005-10-02  Jim Meyering  <jim@meyering.net>
13391
13392         Sync from coreutils.
13393         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
13394         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
13395         `#if HAVE_CONFIG_H'.
13396         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
13397         Remove AT_FDCWD test.
13398         Do not consume the fd unless successful.
13399         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
13400         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
13401         block, so that we don't even try to compile it if settimeofday is
13402         available.  This works around a compilation failure on OSF1 V5.1,
13403         due to stime requiring a `long int*' while tv_sec is `int'.
13404
13405 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
13406
13407         Sync from coreutils.
13408         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
13409         against `yes', rather than just testing for nonempty.
13410
13411 2005-10-01  Simon Josefsson  <jas@extundo.com>
13412
13413         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
13414         and Darwin.
13415
13416         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
13417         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
13418         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
13419         freeaddrinfo and gai_strerror are declared by the POSIX headers.
13420         Check if struct addrinfo is declared.
13421
13422 2005-10-01  Simon Josefsson  <jas@extundo.com>
13423
13424         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
13425         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
13426         AI_* and EAI_* definitions.  Protect function declarations.
13427
13428 2005-10-01  Jim Meyering  <jim@meyering.net>
13429
13430         Sync from coreutils.
13431
13432         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
13433         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
13434         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
13435         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
13436         in the inet and nsl libraries.  Required on Solaris 5.7.
13437
13438 2005-10-01  Jim Meyering  <jim@meyering.net>
13439
13440         Sync from coreutils.
13441         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
13442         in the inet and nsl libraries.  Required on Solaris 5.7.
13443
13444 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
13445
13446         * lib/getdelim.c (getdelim): Remove unused variables.
13447
13448 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
13449
13450         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
13451         so that the code works even with ancient cpp.  Portability problem
13452         with GCC 2.7.2.1 reported by Thomas M.Ott.
13453
13454 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
13455
13456         * modules/regex (Depends-on): Add strcase.
13457
13458         * modules/gethostname (Licence): Change from GPL to LGPL, since
13459         gethostname.c is a trivial implementation of a standard library
13460         function.
13461         * modules/poll (License): Change from GPL to LGPL, since it's
13462         derived from LGPL code.
13463
13464 2005-09-27  Jim Meyering  <jim@meyering.net>
13465
13466         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
13467         HAVE_CONFIG_H.
13468
13469         * lib/intprops.h (signed_type_or_expr__): Define.
13470         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
13471         for unsigned types.
13472
13473 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
13474
13475         * lib/verify.h (verify_expr): Remove, replacing with:
13476         (verify_true): New macro that returns true instead of void.
13477         (verify_type__): Remove.
13478         (verify): Use verify_true rather than verify_type__.
13479
13480 2005-09-26  Bruno Haible  <bruno@clisp.org>
13481
13482         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
13483         is necessary.
13484         (lib_SOURCES): Remove mbchar.c.
13485         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
13486         (Files): Add m4/mbrtowc.m4.
13487         * modules/mbiter: Likewise.
13488         * modules/mbuiter: Likewise.
13489
13490 2005-09-26  Bruno Haible  <bruno@clisp.org>
13491
13492         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
13493         compile mbchar.c if they are not both present.
13494         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
13495         * m4/mbiter.m4 (gl_MBITER): Likewise.
13496         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
13497         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
13498         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
13499
13500 2005-09-25  Jim Meyering  <jim@meyering.net>
13501
13502         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
13503         also uses socklen_t.
13504
13505 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
13506
13507         * lib/utimens.c (ENOSYS): Define if not already defined.
13508         (futimens): Support having a null PATH if the file descriptor
13509         is nonnegative.
13510
13511         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
13512         Remove.
13513         (__attribute): Define to empty unless GCC 3.1 or later.
13514         This works around a core dump on OpenBSD 3.4, which has GCC
13515         2.95.3, which dumps core when given __attribute__(()).  It also
13516         simplifies other tests, since we really don't want to bother with
13517         worrying about which ancient version of GCC supported what.
13518         Original problem reported by Yoann Vandoorselaere, with part of
13519         the fix suggested by Derek Price.
13520
13521 2005-09-24  Jim Meyering  <jim@meyering.net>
13522
13523         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
13524         so we can once again use a positive bitfield width of 1 -- now we
13525         don't have to explain why we were using a bitfield width of 2.
13526
13527 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
13528
13529         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
13530         and similarly for the other external symbols.  Problem reported
13531         by James Gallager.
13532
13533         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
13534         bug reported by Jim Meyering.
13535
13536         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
13537         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
13538         not needed, since socklen is a prerequisite module.
13539
13540 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
13541
13542         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
13543         Problem reported by Eric Blake.
13544         (getaddrinfo): Initialize se so that it's not garbage.
13545         Redo internal storage allocation so that it doesn't make unportable
13546         assumptions about alignment.
13547         Fix a memory leak.
13548
13549         * lib/utimens.c (futimens): Use futimesat if available.
13550         Prefer it to futimes since it doesn't have the futimes bug.
13551
13552         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
13553         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
13554         Instead, declare a function that returns a pointer to an array,
13555         and use verify_type__ to declare the size of the array.
13556         Problem and germ of a solution reported by Bruno Haible.
13557         (verify_type__): Use 2, not 1, for bitfield size, to avoid
13558         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
13559
13560 2005-09-23  Jim Meyering  <jim@meyering.net>
13561
13562         Sync from coreutils.
13563         Correct build failure (socklen_t not defined) on at least
13564         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
13565         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
13566
13567 2005-09-23  Jim Meyering  <jim@meyering.net>
13568
13569         * modules/getaddrinfo (Depends-on): Add socklen.
13570
13571 2005-09-23  Bruno Haible  <bruno@clisp.org>
13572
13573         * tests/test-verify.c: New file.
13574
13575 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13576
13577         Sync from coreutils.
13578
13579         * modules/argmatch (Depends-on): Add verify.
13580         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
13581         unistd-safer.
13582         * modules/save-cwd (Depends-on): Likewise.
13583
13584         * modules/openat (Files): Add lib/openat-die.c.
13585         (Depends-on): Remove error, exitfail.
13586         Add dirname.
13587
13588         * modules/verify: New file.
13589         * MODULES.html.sh (Diagnostics <assert.h>): New section,
13590         with "verify" module.
13591
13592 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13593
13594         Sync from coreutils.
13595
13596         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
13597         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
13598         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
13599         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
13600         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
13601         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
13602         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
13603         Don't bother checking for string.h, stdlib.h, unistd.h.
13604         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
13605         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
13606         module's job.
13607         * m4/jm-macros.m4 (gl_MACROS): Likewise.
13608         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
13609
13610         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
13611         (gl_GETDATE): Use it.
13612
13613         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
13614
13615 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13616
13617         Sync from coreutils.
13618
13619         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
13620         stat-time.h.
13621         * lib/argmatch.h: Include verify.h
13622         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
13623         (ARGMATCH_ASSERT): Remove; unused.
13624         * lib/canonicalize.c: Assume STDC_HEADERS.
13625         * lib/exclude.c: Include "strcase.h".
13626         * lib/regex_internal.h [!defined _LIBC]: Likewise.
13627         * lib/getusershell.c: Include stdio--.h rather than stdio.h
13628         and stdio-safer.h.
13629         (getusershell): Call fopen, not fopen_safer.
13630         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
13631         Do not include unistd-safer.h.
13632         (save_cwd): Don't call fd_safer; no longer needed
13633         now that we include fcntl--.h.
13634
13635         * lib/getdate.y (relative_time): New type.
13636         (RELATIVE_TIME_0): New constant.
13637         (parser_control): Use relative_time instead of doing it ourselves.
13638         (%union): Add new relative_time rel member.
13639         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
13640         Now typeless.
13641         (relunit, relunit_snumber): Now of type rel.
13642         (zone, rel, relunit, get_date): Adjust to above changes.
13643
13644         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
13645         Do not include unistd-safer.h.
13646         (getloadavg): Don't call fd_safer; no longer needed
13647         now that we include fcntl--.h.
13648
13649         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
13650         (make_dir_parents): Treat ENOSYS like EEXIST.
13651
13652         Improve quality of diagnostics on restore_cwd failure.
13653         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
13654         (make_dir_parents): Last arg is now int * (for errno), not bool *.
13655         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
13656         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
13657         each time through the loop.  Do not diagnose restore_cwd failure;
13658         that is the caller's job (and perhaps the caller does not care).
13659
13660         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
13661         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
13662         If the file already exists but is not a directory, don't bother
13663         to try to make its parents.
13664         Close potential file descriptor leak if we can't chdir("/") (!).
13665         Don't always return true if chdir($PWD) fails; return true only
13666         if the requested action was done successfully (except for the
13667         chdir($PWD)).
13668         Don't log final directory unless we actually made it.
13669         Refactor to avoid duplicate code to fix up permissions.
13670         Don't attempt to fix up parent permissions if chdir($PWD) fails.
13671
13672         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
13673         to make it a bit faster and (I hope) clearer.
13674         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
13675         Fix bug in formats like %2N.
13676
13677         * lib/verify.h: New file.
13678
13679 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13680
13681         Sync from coreutils.
13682         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
13683
13684 2005-09-22  Jim Meyering  <jim@meyering.net>
13685
13686         Sync from coreutils.
13687
13688         * m4/lstat.m4 (gl_FUNC_LSTAT):
13689         Use AC_LIBSOURCES to require lstat.c and lstat.h.
13690         Remove obsolete comment.
13691         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
13692         * m4/xstrtod.m4: Likewise.
13693
13694         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
13695
13696 2005-09-22  Jim Meyering  <jim@meyering.net>
13697
13698         Sync from coreutils.
13699
13700         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
13701
13702         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
13703         the .tm_year member, since otherwise gcc-4.0 would now warn about
13704         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
13705
13706         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
13707         order to avoid an unsuppressible warning from gcc on 64-bit systems.
13708
13709         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
13710         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
13711         when run in a time zone for which daylight savings time is in effect
13712         for the starting date.
13713
13714         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
13715         stop us from restricting permissions of just-created absolute-named
13716         directories.
13717         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
13718         to restore initial working directory.
13719         * lib/mkdir-p.c (make_dir_parents): New parameter:
13720         different_working_dir, to tell caller if/when we change the working
13721         directory and are unable to return to the initial one.
13722         * lib/mkdir-p.h (make_dir_parents): Update prototype.
13723         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
13724         `return false'.  This fixes a bug introduced on 2004-07-30.
13725
13726         * lib/openat.c (fdopendir): Be sure to close the supplied
13727         file descriptor before returning.  This makes our replacement
13728         implementation a little closer to Solaris's, where fdopendir
13729         ties the file descriptor to the returned DIR* pointer.
13730         * lib/openat.c (unlinkat): New function.
13731         * lib/openat.h (unlinkat): Add prototype.
13732         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
13733         (openat_restore_fail): Rename from openat_restore_die.
13734         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
13735
13736         Provide an alternative to exiting immediately upon save_cwd or
13737         restore_cwd failure.  Now, an application can arrange e.g.,
13738         to perform a longjump in that case.
13739         * lib/openat.c: Include dirname.h.
13740         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
13741         (rpl_openat, fdopendir, fstatat): Call openat_save_die
13742         and openat_restore_die rather than calling error directly.
13743         Don't include "error.h" or "exitfail.h"; they're no longer needed.
13744
13745         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
13746         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
13747         define.
13748
13749         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
13750         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
13751                             int utc, int nanoseconds);
13752         Background:
13753         date should not have to allocate a megabyte of virtual memory to
13754         handle a format argument like +%1048575T.  When implemented with
13755         strftime, it must allocate such a buffer, use strftime to fill it
13756         in, print it, then free it.
13757         With fprintftime, it simply prints everything and exits.
13758         With no need for memory allocation, that's one fewer way to fail.
13759         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
13760         optional field width, not before, so we accept %9:z, not %:9z.
13761         (my_strftime): Be sure to use L_('x') for literals.
13762
13763         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
13764         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
13765         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
13766         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
13767         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
13768         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
13769         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
13770         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
13771         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
13772         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
13773         * lib/xgethostname.c, lib/xreadlink.c:
13774         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
13775
13776         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
13777         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
13778         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
13779         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13780         and don't include <sys/file.h>).
13781
13782 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
13783
13784         Sync from coreutils.
13785
13786         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
13787         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
13788         [!LDAV_DONE]: Avoid unused variable warning.
13789
13790 2005-09-21  Bruno Haible  <bruno@clisp.org>
13791
13792         * lib/unicodeio.h (unicode_to_mb): New declaration.
13793
13794 2005-09-20  Derek Price  <derek@ximbiot.com>
13795
13796         * lib/getaddrinfo.c: Don't include <netdb.h> included from
13797         getaddrinfo.h.
13798
13799 2005-09-20  Bruno Haible  <bruno@clisp.org>
13800
13801         * gnulib-tool: Remove trailing slashes from the values specified for
13802         --source-base, --m4-base, --tests-base, --aux-dir.
13803         Suggested by Simon Josefsson <jas@extundo.com>.
13804
13805 2005-09-20  Bruno Haible  <bruno@clisp.org>
13806
13807         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
13808         func_modules_to_filelist, func_import, func_create_testdir): Make all
13809         sorting results locale-independent, so that gnulib-cache.m4 doesn't
13810         change when gnulib-tool is invoked in a different locale.
13811
13812 2005-09-19  Simon Josefsson  <jas@extundo.com>
13813
13814         * m4/socklen.m4: Fix typo.
13815
13816 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13817
13818         Use a consistent style for including <config.h>.
13819         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
13820         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
13821         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
13822         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
13823         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
13824         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
13825         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
13826         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
13827         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
13828         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
13829         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
13830         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
13831         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
13832         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
13833         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
13834         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
13835         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
13836         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
13837         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
13838         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
13839         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
13840         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
13841         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
13842         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
13843         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
13844         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
13845         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
13846         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
13847         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
13848         lib/xstrtoumax.c, lib/yesno.c:
13849         Standardize inclusion of config.h.
13850         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
13851         lib/inttostr.h:  Removed inclusion of config.h from header files.
13852         * lib/inttostr.c:  Adjusted in-tree users.
13853         * lib/timespec.h: Remove superfluous warning to include config.h.
13854         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
13855         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
13856         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
13857         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
13858         config.h with HAVE_CONFIG_H.
13859
13860 2005-09-19  Jim Meyering  <jim@meyering.net>
13861
13862         * modules/pathmax (License): Change to LGPL.
13863
13864 2005-09-19  Derek Price  <derek@ximbiot.com>
13865
13866         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
13867
13868 2005-09-19  Bruno Haible  <bruno@clisp.org>
13869
13870         * gnulib-tool (import): Provide default for --tests-base.
13871
13872 2005-09-19  Bruno Haible  <bruno@clisp.org>
13873
13874         * doc/quote.texi: New file, extracted from gnulib.texi.
13875         * doc/ctime.texi: New file, extracted from gnulib.texi.
13876         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
13877         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
13878         * doc/gnulib.texi: Include them.
13879
13880 2005-09-18  Bruno Haible  <bruno@clisp.org>
13881
13882         Portability fix.
13883         * gnulib-tool (func_readlink): New function.
13884         (func_ln_if_changed): Use it.
13885
13886 2005-09-18  Bruno Haible  <bruno@clisp.org>
13887
13888         * gnulib-tool: Support --with-tests also with --import.
13889         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
13890         (func_import): Use variables $testsbase and $inctests. Emit a
13891         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
13892         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
13893         SUBDIRS += $testsdir.
13894         (func_create_testdir): Update.
13895
13896 2005-09-18  Bruno Haible  <bruno@clisp.org>
13897
13898         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
13899         instead of $dry_run.
13900         (func_cp_if_changed, func_mv_if_changed): Remove functions.
13901         (func_ln_if_changed): Don't handle dry-run here.
13902         (func_import): In dry-run mode, detect more precisely which actions
13903         would be performed, and don't use "...ing" verbs.
13904
13905 2005-09-18  Bruno Haible  <bruno@clisp.org>
13906
13907         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
13908         (func_import): Use join on two temporary files instead of three nested
13909         loops, in order to determine which files are new or old.
13910
13911 2005-09-18  Bruno Haible  <bruno@clisp.org>
13912
13913         * gnulib-tool (func_import): Comment out code that spits out the
13914         new files with --dry-run.
13915
13916 2005-09-18  Bruno Haible  <bruno@clisp.org>
13917
13918         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
13919
13920 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13921
13922         * lib/stat-time.h: New file.
13923         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
13924         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
13925         in a different way.
13926         (timespec_cmp): New function.
13927         * lib/utimecmp.c: Include stat-time.h.
13928         (SYSCALL_RESOLUTION): Depend on whether various struct stat
13929         members exist, not on the obsolescent ST_MTIM_NSEC.
13930         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
13931
13932 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13933
13934         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
13935
13936 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13937
13938         * MODULES.html.sh (File system functions): Add stat-time.
13939         * modules/stat-time: New file.
13940         * modules/timespec (Files): Remove m4/st_mtim.m4; this
13941         is now done in a different way, by the stat-time module.
13942         * modules/utimecmp (Depends-on): Add stat-time.
13943
13944 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
13945
13946         * m4/st_mtim.m4: Remove.  Superseded by...
13947         * m4/stat-time.m4: New file.
13948         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
13949         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
13950
13951 2005-09-15  Derek Price  <derek@ximbiot.com>
13952
13953         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
13954
13955 2005-09-15  Derek Price  <derek@ximbiot.com>
13956
13957         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
13958         * lib/regex_internal.c: Ditto, using this...
13959         (__GNUC_PREREQ): ...new macro.
13960         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
13961         using...
13962         (__GNUC_PREREQ): ...this new macro.
13963
13964         * lib/strstr.h: Include string.h. Define strstr as a macro here.
13965
13966 2005-09-15  Derek Price  <derek@ximbiot.com>
13967             Paul Eggert  <eggert@cs.ucla.edu>
13968
13969         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
13970         changes, consolidating in...
13971         * lib/regex_internal.h: ...this file.
13972
13973 2005-09-13  Jim Meyering  <jim@meyering.net>
13974
13975         * lib/canon-host.c: Filter through gnu indent and reword comments
13976         slightly.
13977         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
13978
13979 2005-09-13  Derek Price  <derek@ximbiot.com>
13980
13981         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
13982         failure.
13983         Reported by Jim Meyering  <jim@meyering.net>.
13984
13985 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13986
13987         * lib/base64.c: Typo.
13988         (base64_encode): Put b64str in initialized data section.
13989
13990 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
13991
13992         Merge glibc and coreutils changes into gnulib, plus a few
13993         extra fixes.
13994         * lib/md5.c: Use #error rather than a string.
13995         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
13996         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
13997         (__attribute__): Define to empty for non recent-GCC.
13998         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
13999         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
14000         Renamed from their non-__ counterparts, with new macros replacing
14001         them if not _LIBC.  Add __THROW attribute.
14002         (rol): Remove.
14003         (struct md5_ctx): Align buffer if using GCC.
14004         * lib/sha1.h (struct sha1_ctx): Likewise.
14005         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
14006         The old name was backwards.
14007         (NOTSWAP): Remove; not used.
14008         (rol): New macro, moved here from md5.h.
14009         (sha1_process_block): Remove a FIXME that doesn't make sense.
14010
14011 2005-09-12  Derek Price  <derek@ximbiot.com>
14012
14013         Return usable errors from canon-host.
14014         * lib/canon-host.h: New file.
14015         * lib/canon-host.c (canon_host): Wrap...
14016         (canon_host_r): ...this new function, which now relies exclusively on
14017         getaddrinfo.
14018         (ch_strerror): New function.
14019         (last_cherror): New global.
14020         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
14021         interface.
14022         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
14023         void *.
14024         (freeaddrinfo): Free ai->ai_canonname when set.
14025
14026 2005-09-12  Derek Price  <derek@ximbiot.com>
14027
14028         Make canon-host require getaddrinfo.
14029         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
14030         AC_LIBSOURCE canon-host.h.  Call...
14031         (gl_PREREQ_CANON_HOST): ...this new function, which requires
14032         gl_GETADDRINFO.
14033         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
14034
14035 2005-09-12  Derek Price  <derek@ximbiot.com>
14036
14037         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
14038         LGPL.
14039         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
14040
14041 2005-09-12  Derek Price  <derek@ximbiot.com>
14042
14043         * lib/gai_strerror.c: Include config.h when available.  Include
14044         getaddrinfo.h before other headers to test interface.
14045         Reported by Larry Jones <lawrence.jones@ugs.com>.
14046
14047 2005-09-12  Derek Price  <derek@ximbiot.com>
14048             Paul Eggert  <eggert@cs.ucla.edu>
14049
14050         * modules/glob (Files): Add glob-libc.h.
14051
14052 2005-09-12  Derek Price  <derek@ximbiot.com>
14053             Paul Eggert  <eggert@cs.ucla.edu>
14054
14055         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
14056         glob_.h, glob-libc.h.
14057         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
14058
14059 2005-09-12  Derek Price  <derek@ximbiot.com>
14060             Paul Eggert  <eggert@cs.ucla.edu>
14061
14062         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
14063         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
14064         protecting things that should be done only in gnulib contexts.
14065         * lib/glob_.h: New file, containing only the glob things needed for
14066         gnulib.
14067         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
14068         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
14069         (glob, globfree, glob_pattern_p): Now defined simply in terms of
14070         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
14071         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
14072         and to respect the namespace rules better.
14073
14074 2005-09-08  Simon Josefsson  <jas@extundo.com>
14075
14076         * modules/socklen: New file.
14077
14078 2005-09-08  Simon Josefsson  <jas@extundo.com>
14079
14080         * m4/socklen.m4: New file.
14081
14082 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14083
14084         * modules/utimens (Files): Add m4/utimbuf.m4, since
14085         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
14086         Reported by Sergey Poznyakoff.
14087
14088 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14089
14090         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
14091         definitions, since that's the preferred style in glibc.
14092         Fix a minor spacing issue, and update copyright notice to match
14093         glibc's.
14094
14095 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14096
14097         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
14098
14099 2005-09-06  Simon Josefsson  <jas@extundo.com>
14100
14101         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
14102         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
14103
14104 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14105
14106         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
14107         warning.
14108
14109 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14110
14111         * config/srclist.txt: Add glibc bug 1302.
14112
14113 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
14114
14115         Change bitset word type from unsigned int to unsigned long int,
14116         as this has better performance on typical 64-bit hosts.
14117         Port bitset code to hosts with unusual word sizes.
14118         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
14119         (build_collating_symbol):
14120         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
14121         argument is a bitset.  This is merely a style issue, but it makes
14122         it clearer that an entire array is expected.
14123         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
14124         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
14125         Port to the case where bitset_word is not the same as unsigned int.
14126         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
14127         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
14128         Likewise.
14129         * lib/regexec.c (check_dst_limits_calc_pos_1,
14130         check_subexp_matching_top):
14131         (build_trtable, group_nodes_into_DFAstates):
14132         Likewise.
14133         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
14134         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
14135         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
14136         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
14137         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
14138         * lib/regcomp.c (optimize_subexps, lower_subexp):
14139         Work even if bitset_word has holes in its bitwise representation.
14140         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
14141         * lib/regexec.c (check_dst_limits_calc_pos_1,
14142         check_subexp_matching_top):
14143         Likewise.
14144         * lib/regex_internal.c (re_string_reconstruct):
14145         Don't assume UCHAR_MAX == 255.
14146         * lib/regex_internal.h (bitset_set_all): Likewise.
14147         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
14148         All uses changed.
14149         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
14150         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
14151         All uses changed.
14152         (BITSET_WORD_MAX): New macro.
14153         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
14154         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
14155         (bitset_empty, bitset_copy):
14156         Prefer sizeof (bitset) to multiplying it out ourselves.
14157         (bitset_not_merge): Remove; unused.
14158         (bitset_contain): Return bool, not unsigned int with one bit on.
14159         All callers changed.
14160         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
14161         alignment than re_node_set; do this by defining a new internal
14162         type struct dests_alloc and using it to allocate memory.
14163
14164 2005-09-05  Bruno Haible  <bruno@clisp.org>
14165
14166         * gnulib-tool (func_import): Fix comparison in handling of symbolic
14167         links.
14168
14169 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
14170
14171         * modules/size_max (Makefile.am): Add size_max.h
14172
14173 2005-09-04  Derek Price  <derek@ximbiot.com>
14174
14175         * gnulib-tool (func_import): Fix reversed $symbolic logic.
14176
14177 2005-09-03  Simon Josefsson  <jas@extundo.com>
14178
14179         * gnulib-tool: Fix typo.
14180
14181 2005-09-03  Simon Josefsson  <jas@extundo.com>
14182
14183         * config/srclist.txt: Add glibc bug 1293.
14184
14185 2005-09-03  Derek Price  <derek@ximbiot.com>
14186
14187         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
14188         From Larry Jones <lawrence.jones@ugs.com>.
14189
14190 2005-09-02  Simon Josefsson  <jas@extundo.com>
14191
14192         * modules/socklen: New file.
14193
14194 2005-09-02  Simon Josefsson  <jas@extundo.com>
14195
14196         * modules/havelib: New module.
14197
14198         * modules/gettext, modules/iconv, modules/lock, modules/readline:
14199         Use havelib.
14200
14201 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
14202
14203         Check for arithmetic overflow when calculating sizes, to prevent
14204         some buffer-overflow issues.  These patches are conservative, in the
14205         sense that when I couldn't determine whether an overflow was possible,
14206         I inserted a run-time check.
14207         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
14208         macros.
14209         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
14210         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
14211         (re_xnrealloc, re_x2nrealloc): New inline functions.
14212         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
14213         parse_bracket_exp):
14214         (build_equiv_class, build_charclass): Check for arithmetic overflow
14215         in size expression calculations.
14216         * lib/regex_internal.c (re_string_realloc_buffers):
14217         (build_wcs_upper_buffer, re_node_set_add_intersect):
14218         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
14219         (re_dfa_add_node, register_state): Likewise.
14220         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
14221         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
14222         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
14223         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
14224
14225 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
14226
14227         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
14228         m4/ulonglong.m4.  Problem reported by Martin Lambers.
14229
14230 2005-09-02  Bruno Haible  <bruno@clisp.org>
14231
14232         Support for lib vs. lib64 distinction on biarch platforms.
14233         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
14234         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
14235         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
14236
14237 2005-09-02  Bruno Haible  <bruno@clisp.org>
14238
14239         * gnulib-tool (import): In the other first-use case, provide defaults
14240         as well.
14241
14242 2005-09-02  Bruno Haible  <bruno@clisp.org>
14243
14244         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
14245         patches not yet found in the latest gettext release.
14246
14247 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
14248
14249         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
14250         to avoid a collision with bits/local_lim.h in glibc.
14251         All uses changed.  Problem reported by Dmitry V. Levin in
14252         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
14253
14254         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
14255         bugs in int versus size_t comparisons.
14256         (re_string_context_at): Fix bug where the code assumed that
14257         Idx is signed.
14258
14259         Use bool where appropriate.
14260         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
14261         All callers changed.
14262         (calc_eclosure_iter): Likewise, for ROOT arg.
14263         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
14264         (build_charclass_op): Likewise, for NON_MATCH arg.
14265         * lib/regex_internal.c (re_string_allocate, re_string_construct):
14266         (re_string_construct_common): Likewise, for ICASE arg.
14267         * lib/regexec.c (re_search_2_stub, re_search_stub):
14268         Likewise, for RET_LEN arg.
14269         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
14270         (set_regs): Likewise, for FL_BACKTRACK arg.
14271         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
14272         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
14273         (calc_eclosure_iter, parse_bracket_exp):
14274         Use bool for internal variables that are booleans.
14275         * lib/regexec.c (re_search_internal, check_matching,
14276         proceed_next_node):
14277         (set_regs, build_sifted_states, sift_states_bkref):
14278         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
14279         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
14280         (find_collation_sequence_value):
14281         Likewise.
14282         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
14283         (re_node_set_compare):
14284         Return bool, not int. All callers changed.
14285         * lib/regexec.c (check_halt_node_context, check_dst_limits):
14286         (build_trtable, check_node_accept): Likewise.
14287         * lib/regex_internal.h: Include stdbool.h.
14288
14289         Fix bugs uncovered when converting to bool.
14290         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
14291         failure instead of charging ahead blindly.
14292         * lib/regex_internal.c (register_state): Likewise.
14293         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
14294         for freeing internal storage.
14295         (group_nodes_into_DFA_states): Use unsigned int, not int, for
14296         bitset pieces used as boolean, to avoid undefined behavior
14297         on hosts that do int overflow checking.
14298
14299 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
14300
14301         * config/srclist.txt: Add glibc bugs 1285-1287.
14302
14303 2005-09-01  Jim Meyering  <jim@meyering.net>
14304
14305         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
14306         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
14307         Require gl_STAT_MACROS, too.
14308
14309 2005-09-01  Bruno Haible  <bruno@clisp.org>
14310
14311         * gnulib-tool (import): In the first-use case, provide defaults.
14312
14313 2005-09-01  Bruno Haible  <bruno@clisp.org>
14314
14315         * gnulib-tool (func_import): Remove the .tmp files.
14316
14317 2005-09-01  Bruno Haible  <bruno@clisp.org>
14318
14319         * gnulib-tool (func_import): Fix handling of symbolic links.
14320
14321 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14322
14323         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
14324         old glibc regex code mishandles strings longer than 2**31 bytes.
14325         This patch fixes this when the regex code is used in gnulib
14326         (i.e., outside glibc).
14327
14328         This patch should not affect the use of the regex code inside
14329         glibc.  No doubt this problem also needs to be handled for glibc
14330         as well, but the result will be an incompatible change to the
14331         glibc ABI, and the old ABI will have to be supported too.  That
14332         can be the the subject for another patch.
14333
14334         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
14335         governing whether the rest of this patch is active.  By default,
14336         the macro is disabled and the patch has no effect.
14337         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
14338         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
14339         (struct re_pattern_buffer, re_search, re_search_2, re_match):
14340         (re_match_2, re_set_registers): Use the new types.
14341         * lib/regex_internal.h (Idx, re_hashval_t): New types.
14342         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
14343         New macros.
14344         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
14345         (re_string_context_at, bin_tree_t, re_dfastate_t):
14346         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
14347         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
14348         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
14349         (re_string_char_size_at, re_string_wchar_at):
14350         (re_string_elem_size_at):
14351         Use the new types and macros to port to 64-bit hosts.
14352         Use unsigned types for internal values, so that the code
14353         mostly works even for arrays larger than SSIZE_MAX.
14354         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
14355         (search_duplicated_node, calc_eclosure_iter, fetch_number):
14356         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
14357         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
14358         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
14359         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
14360         (calc_inveclosure, parse_dup_op, build_range_exp):
14361         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
14362         (fetch_number, create_token_tree, mark_opt_subexp):
14363         Likewise.
14364         * lib/regex_internal.c (re_string_construct_common,
14365         create_ci_newstate):
14366         (create_cd_newstate, re_string_allocate, re_string_construct):
14367         (re_string_realloc_buffers, build_wcs_upper_buffer):
14368         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
14369         (re_string_reconstruct, re_string_peek_byte_case):
14370         (re_string_fetch_byte_case, re_string_context_at):
14371         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
14372         (re_node_set_init_copy, re_node_set_add_intersect):
14373         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14374         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14375         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
14376         (re_acquire_state, re_acquire_state_context, register_state):
14377         Likewise.
14378         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
14379         search_cur_bkref_entry):
14380         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
14381         (re_search_internal, re_search_2_stub, re_search_stub)
14382         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
14383         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
14384         (update_cur_sifted_state, check_dst_limits):
14385         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
14386         (check_subexp_limits, sift_states_bkref, merge_state_array):
14387         (check_subexp_matching_top, get_subexp, get_subexp_sub):
14388         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
14389         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
14390         (expand_bkref_cache, check_node_accept_bytes):
14391         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
14392         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
14393         (acquire_init_state_context, check_halt_node_context):
14394         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
14395         (sift_states_backward, clean_state_log_if_needed):
14396         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
14397         (find_recover_state, transit_state_sb, transit_state_mb):
14398         (transit_state_bkref, build_trtable, match_ctx_clean):
14399         Likewise.
14400         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
14401         to work around an assumption that REG_MISSING is negative.
14402
14403         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
14404         (seek_collating_symbol_entry) [defined _LIBC]:
14405         (lookup_collation_sequence_value) [defined _LIBC]:
14406         (build_range_exp, build_collating_symbol) [defined _LIBC]:
14407         Use prototypes rather than old-style function definitions.
14408         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
14409         (transit_state_sb) [0]:
14410         (find_collation_sequence_value) [defined _LIBC]: Likewise.
14411
14412         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
14413         rm_eo.
14414
14415         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
14416         (optimize_subexps, lower_subexp):
14417         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
14418         since the signed shift might overflow.  Use 1u<<31 instead.
14419         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
14420         Likewise.
14421         * lib/regexec.c (check_dst_limits_calc_pos_1,
14422         check_subexp_matching_top): Likewise.
14423
14424         * lib/regcomp.c (optimize_subexps, lower_subexp):
14425         Use CHAR_BIT rather than 8, for clarity.
14426         * lib/regexec.c (check_dst_limits_calc_pos_1):
14427         (check_subexp_matching_top): Likewise.
14428         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
14429         have to worry about portability issues when shifting it left.
14430         Remove no-longer-needed test for table_size > 0.
14431         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
14432         in a word, as the resulting behavior is undefined.
14433         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
14434         in one case, a <= should have been an <, and in another case the
14435         whole test was missing.
14436         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
14437         the standard name CHAR_BIT.
14438         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
14439         this is not true on one's complement and signed-magnitude hosts.
14440
14441         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
14442         next_last_offset.
14443         (struct re_dfa_t): Remove unused member states_alloc.
14444         * lib/regcomp.c (init_dfa): Don't initialize unused members.
14445
14446 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14447
14448         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
14449         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
14450         and large-file glibc and in 32-bit large-file Solaris.
14451
14452 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14453
14454         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
14455         lengths fit in regoff_t; this isn't true if regoff_t is the same
14456         width as size_t.
14457         * lib/regex.c (re_search_internal): 5th arg is LAST_START
14458         (= START + RANGE) instead of RANGE.  This avoids overflow
14459         problems when regoff_t is the same width as size_t.
14460         All callers changed.
14461         (re_search_2_stub): Check for overflow when adding the
14462         sizes of the two strings.
14463         (re_search_stub): Check for overflow when adding START
14464         to RANGE; if it occurs, substitute the extreme value.
14465
14466 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14467
14468         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
14469
14470 2005-08-31  Jim Meyering  <jim@meyering.net>
14471
14472         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
14473         a pointer-to-const.
14474         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
14475         (register_state): Likewise.
14476         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
14477         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
14478         (group_nodes_into_DFAstates): Likewise.
14479
14480 2005-08-31  Jim Meyering  <jim@meyering.net>
14481
14482         * check-module: Add a FIXME comment.
14483
14484 2005-08-31  Eric Blake  <ebb9@byu.net>
14485
14486         * modules/unistd-safer (Files): Add unistd--.h.
14487         * modules/stdio-safer (Files): Add stdio--.h.
14488
14489 2005-08-31  Derek Price  <derek@ximbiot.com>
14490
14491         * lib/getdelim.c (getdelim): Return EOF on EOF.
14492         Reported by Larry Jones <lawrence.jones@ugs.com>.
14493
14494 2005-08-31  Bruno Haible  <bruno@clisp.org>
14495
14496         Avoid unnecessary diffs in the generated lib/Makefile.am.
14497         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
14498         the generated files.
14499         (func_import): Don't set cmd.
14500
14501 2005-08-31  Bruno Haible  <bruno@clisp.org>
14502
14503         * lib/strstr.c: Include <stddef.h>, for NULL.
14504         * lib/strcasestr.c: Likewise.
14505         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14506
14507 2005-08-31  Bruno Haible  <bruno@clisp.org>
14508
14509         * gnulib-tool: New option --macro-prefix.
14510         (func_import): Use macro_prefix.
14511         (import): Handle option --macro-prefix.
14512
14513 2005-08-31  Bruno Haible  <bruno@clisp.org>
14514
14515         * gnulib-tool (import): Rename most ac_* variables to cached_*.
14516         Also use new variables cached_lgpl, cached_libtool.
14517
14518 2005-08-31  Bruno Haible  <bruno@clisp.org>
14519
14520         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
14521         always instantiating them.
14522
14523 2005-08-31  Bruno Haible  <bruno@clisp.org>
14524
14525         * gnulib-tool (func_import): Read the previous cached settings
14526         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
14527         earlier added by gnulib but are now dropped. Warn when a gnulib file
14528         overwrites a non-gnulib file.
14529
14530 2005-08-31  Bruno Haible  <bruno@clisp.org>
14531
14532         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
14533         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
14534         projects that don't keep autogenerated files in CVS. Put into
14535         actioncmd only the specified modules, not the transitive closure.
14536
14537 2005-08-31  Bruno Haible  <bruno@clisp.org>
14538
14539         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
14540         Create directories that shall be filled.
14541         (import): Don't look for gl_* macros in configure.ac. Recurse across
14542         all directories containing a gnulib-cache.m4 files, if meaningful.
14543
14544 2005-08-31  Bruno Haible  <bruno@clisp.org>
14545
14546         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
14547         (import): Set seen_libtool when we see gl_LIBTOOL.
14548
14549 2005-08-31  Bruno Haible  <bruno@clisp.org>
14550
14551         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
14552         declaration macro definitions from generated gnulib.m4.
14553
14554 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
14555
14556         * lib/iconvme.h: Add prototype for iconv_alloc.
14557
14558 2005-08-29  Simon Josefsson  <jas@extundo.com>
14559
14560         * lib/iconvme.c: Fix errno.
14561
14562 2005-08-29  Bruno Haible  <bruno@clisp.org>
14563
14564         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
14565         that it works when the directory contains spaces.
14566
14567 2005-08-29  Bruno Haible  <bruno@clisp.org>
14568
14569         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
14570
14571 2005-08-29  Bruno Haible  <bruno@clisp.org>
14572
14573         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
14574         Emit more advice.
14575
14576 2005-08-29  Bruno Haible  <bruno@clisp.org>
14577         and Stepan Kasal  <kasal@ucw.cz>
14578
14579         * check-module: If more parameters are given, check each of them
14580         separately; add more exceptions, as noted by Jim Meyering.
14581         (check_module): New procedure.
14582         (%exempt_header): Now contains all exceptions.
14583
14584 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
14585
14586         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
14587
14588 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14589
14590         * lib/iconvme.c: Split iconv_string into iconv_alloc.
14591
14592 2005-08-28  Bruno Haible  <bruno@clisp.org>
14593
14594         * m4/gnulib-tool.m4: New file.
14595
14596 2005-08-27  Jim Meyering  <jim@meyering.net>
14597
14598         * modules/unistd-safer (Files): Add pipe-safer.c.
14599         * modules/fcntl-safer (Files): Add creat-safer.c.
14600
14601 2005-08-27  Jim Meyering  <jim@meyering.net>
14602
14603         * m4/stdlib-safer.m4: New file.  From coreutils.
14604         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
14605         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
14606         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
14607         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
14608         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
14609
14610 2005-08-27  Jim Meyering  <jim@meyering.net>
14611
14612         * lib/fopen-safer.c: Merge minor changes from coreutils.
14613         * lib/dup-safer.c: Likewise.
14614         * lib/fd-safer.c: Likewise.
14615
14616         Merge from coreutils.
14617         * lib/stdio--.h: New file.
14618         * lib/stdlib--.h: New file.
14619         * lib/mkstemp-safer.c: New file.
14620
14621         GNU tar needs these.
14622         * lib/pipe-safer.c: New file.
14623         * lib/creat-safer.c: New file.
14624         * lib/fcntl--.h (creat): Define to creat_safer.
14625         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
14626         * lib/unistd--.h (pipe): Define to pipe_safer.
14627         * lib/unistd-safer.h: Declare pipe_safer.
14628
14629 2005-08-26  Simon Josefsson  <jas@extundo.com>
14630
14631         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
14632         Haible <bruno@clisp.org>.
14633
14634 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
14635
14636         * lib/regex_internal.h: Remove all references to
14637         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
14638         or better.
14639         (bitset_not, bitset_merge, bitset_not_merge):
14640         (bitset_mask, re_string_allocate, re_string_construct):
14641         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
14642         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
14643         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
14644         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
14645         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14646         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14647         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
14648         (re_acquire_state_context):
14649         Remove unnecessary forward decls.
14650         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
14651         Put __attribute at function definition,
14652         now that the function decl has been removed.
14653         * lib/regex_internal.c (re_string_peek_byte_case):
14654         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
14655         Likewise.
14656
14657 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
14658
14659         * m4/regex.m4: Add AC_PREREQ(2.50).
14660         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
14661
14662 2005-08-25  Simon Josefsson  <jas@extundo.com>
14663
14664         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
14665         __fsetlocking.
14666
14667 2005-08-25  Simon Josefsson  <jas@extundo.com>
14668
14669         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
14670         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
14671         GLIBC specific code.
14672
14673 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14674
14675         Make regex safe for g++.  This fixes one real bug (an "err"
14676         that should have been "*err").  g++ problem reported by
14677         Sam Steingold.
14678         * lib/regex_internal.h (re_calloc): New macro, consistent with
14679         re_malloc etc.  All callers of calloc changed to use re_calloc.
14680         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
14681         not int.  All callers changed.
14682         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
14683         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
14684         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
14685         (find_recover_state): Change "err" to "*err"; this fixes what
14686         appears to be a real bug.
14687         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
14688         versus int.
14689
14690 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14691
14692         * modules/regex (Depends-on): Add malloc, since the code
14693         assumes that !malloc(0) means failure.
14694
14695 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14696
14697         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
14698
14699         alloca modernization/simplification for regex.
14700         * lib/regex.c: Remove portability cruft for alloca.  This no longer
14701         needs to be at the start of the file, and can be moved into
14702         regex_internal.h and simplified.
14703         * lib/regex_internal.h: Include <alloca.h>.
14704         (__libc_use_alloca) [!defined _LIBC]: New macro.
14705         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
14706         now works outside glibc.
14707
14708 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14709
14710         * config/srclist.txt: Add glibc bugs 1241, 1245.
14711
14712 2005-08-25  Jim Meyering  <jim@meyering.net>
14713
14714         * lib/open-safer.c: Include <config.h>.
14715         Otherwise, we'd lose LARGEFILE support in any file using
14716         e.g. "fcntl--.h"
14717
14718 2005-08-25  Bruno Haible  <bruno@clisp.org>
14719
14720         * m4/minmax.m4: Require autoconf 2.52.
14721         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
14722         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
14723         alternatives of translit over the alphabet.
14724         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
14725
14726 2005-08-24  Simon Josefsson  <jas@extundo.com>
14727
14728         * tests/test-getpass.c: New file.
14729
14730 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14731
14732         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
14733         for GNU regex features.
14734
14735 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14736
14737         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
14738         * lib/regex.h (regerror): Likewise.
14739
14740         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
14741         requires this.  (The code never needed it.)
14742
14743         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
14744         All uses of recently-renamed identifiers changed to use the new,
14745         POSIX-compliant names.  The code will build and run just fine
14746         without these changes, but it's better to eat our own dog food
14747         and use the standard-conforming names.
14748
14749         * lib/regex.h: Fix a multitude of POSIX name space violations.
14750         These changes have an effect only for programs that define
14751         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
14752         do not change anything for programs compiled in the normal way.
14753         Also, there is no effect on the ABI.
14754
14755         (_REGEX_SOURCE): New macro.
14756         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
14757         defined and _GNU_SOURCE is not; this fixes a name space violation.
14758
14759         Rename the following macros to obey POSIX requirements.
14760         The old names are still visible as macros if _REGEX_SOURCE is defined.
14761         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
14762         RE_BACKSLASH_ESCAPE_IN_LISTS.
14763         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
14764         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
14765         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
14766         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
14767         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
14768         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
14769         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
14770         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
14771         (REG_INTERVALS): renamed from RE_INTERVALS.
14772         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
14773         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
14774         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
14775         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
14776         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
14777         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
14778         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
14779         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
14780         RE_UNMATCHED_RIGHT_PAREN_ORD.
14781         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
14782         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
14783         (REG_DEBUG): renamed from RE_DEBUG.
14784         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
14785         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
14786         unusual, since we can't clash with the POSIX REG_ICASE.
14787         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
14788         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
14789         (REG_NO_SUB): renamed from RE_NO_SUB.
14790         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
14791         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
14792         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
14793         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
14794         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
14795         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
14796         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
14797         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
14798         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
14799         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
14800         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
14801         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
14802         RE_SYNTAX_POSIX_MINIMAL_BASIC.
14803         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
14804         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
14805         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
14806         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
14807         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
14808         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
14809         (REG_FIXED): Renamed from REGS_FIXED.
14810         (REG_NREGS): Renamed from RE_NREGS.
14811
14812         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
14813         of other REG_* macros, since POSIX says the user is allowed to
14814         #undef these macros selectively.
14815
14816         (reg_errcode_t): Update comment stating what other tables need
14817         to be consistent.
14818
14819         Rename the following enum values to obey POSIX requirements.
14820         The old names are still visible as macros.
14821         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
14822         is not defined, since GNU is supposed to be a superset of POSIX as
14823         much as possible, and since we want reg_errcode_t to be a signed
14824         type for implementation consistency.
14825         (_REG_NOERROR): Renamed from REG_NOERROR.
14826         (_REG_NOMATCH): Renamed from REG_NOMATCH.
14827         (_REG_BADPAT): Renamed from REG_BADPAT.
14828         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
14829         (_REG_ECTYPE): Renamed from REG_ECTYPE.
14830         (_REG_EESCAPE): Renamed from REG_EESCAPE.
14831         (_REG_ESUBREG): Renamed from REG_ESUBREG.
14832         (_REG_EBRACK): Renamed from REG_EBRACK.
14833         (_REG_EPAREN): Renamed from REG_EPAREN.
14834         (_REG_EBRACE): Renamed from REG_EBRACE.
14835         (_REG_BADBR): Renamed from REG_BADBR.
14836         (_REG_ERANGE): Renamed from REG_ERANGE.
14837         (_REG_ESPACE): Renamed from REG_ESPACE.
14838         (_REG_BADRPT): Renamed from REG_BADRPT.
14839         (_REG_EEND): Renamed from REG_EEND.
14840         (_REG_ESIZE): Renamed from REG_ESIZE.
14841         (_REG_ERPAREN): Renamed from REG_ERPAREN.
14842         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
14843         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
14844         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
14845         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
14846
14847         (_REG_RE_NAME, _REG_RM_NAME): New macros.
14848         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
14849         changed.  But support the old name if the new one is not defined
14850         and if _REGEX_SOURCE.
14851
14852         Change the following member names in struct re_pattern_buffer.
14853         The old names are still supported if !_REGEX_SOURCE.
14854         The new names are always supported, regardless of _REGEX_SOURCE.
14855         (re_buffer): Renamed from buffer.
14856         (re_allocated): Renamed from allocated.
14857         (re_used): Renamed from used.
14858         (re_syntax): Renamed from syntax.
14859         (re_fastmap): Renamed from fastmap.
14860         (re_translate): Renamed from translate.
14861         (re_can_be_null): Renamed from can_be_null.
14862         (re_regs_allocated): Renamed from regs_allocated.
14863         (re_fastmap_accurate): Renamed from fastmap_accurate.
14864         (re_no_sub): Renamed from no_sub.
14865         (re_not_bol): Renamed from not_bol.
14866         (re_not_eol): Renamed from not_eol.
14867         (re_newline_anchor): Renamed from newline_anchor.
14868
14869         Change the following member names in struct re_registers.
14870         The old names are still supported if !_REGEX_SOURCE.
14871         The new names are always supported, regardless of _REGEX_SOURCE.
14872         (rm_num_regs): Renamed from num_regs.
14873         (rm_start): Renamed from start.
14874         (rm_end): Renamed from end.
14875
14876         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
14877         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
14878         Prepend __ to parameter names.
14879
14880         Undo yesterday's changes.
14881
14882 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14883
14884         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
14885         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
14886         lib/regex.c.
14887
14888 2005-08-24  Jim Meyering  <jim@meyering.net>
14889
14890         Sync from coreutils.
14891         * m4/fcntl-safer.m4: New file.
14892
14893         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
14894         and object files for this module.
14895
14896 2005-08-24  Jim Meyering  <jim@meyering.net>
14897
14898         Sync from coreutils.
14899         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
14900
14901 2005-08-24  Jim Meyering  <jim@meyering.net>
14902
14903         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
14904         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
14905
14906 2005-08-24  Jim Meyering  <jim@meyering.net>
14907
14908         * modules/fcntl-safer: New module.
14909         * modules/fts (Depends-on): Add fcntl-safer.
14910         * MODULES.html.sh (File descriptor based Input/Output):
14911         Add fcntl-safer.
14912
14913 2005-08-24  Bruno Haible  <bruno@clisp.org>
14914
14915         Support for unit test modules.
14916         * modules/README: Mention tests modules.
14917         * modules/TEMPLATE-TESTS: New file.
14918         * gnulib-tool: New options --extract-tests-module, --with-tests and
14919         --tests-base (unused for the moment).
14920         (testsbase, inctests): New variables.
14921         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
14922         (func_verify_module): Exclude TEMPLATE-TESTS.
14923         (func_verify_nontests_module, func_verify_tests_module): New functions.
14924         (func_get_dependencies): Add implicit dependency for tests modules.
14925         (func_get_tests_module): New function.
14926         (func_modules_transitive_closure): When --with-tests was specified,
14927         include the unit tests as well, unless explicitly avoided.
14928         (func_emit_lib_Makefile_am): Ignore the tests modules here.
14929         (func_emit_tests_Makefile_am): New function.
14930         (func_create_testdir): When --with-tests was specified, emit a
14931         tests/ directory.
14932         * MODULES.html.sh (Future developments): Update.
14933
14934 2005-08-24  Bruno Haible  <bruno@clisp.org>
14935
14936         * modules/tls-tests: New file.
14937         * tests/test-tls.c: New file, from GNU gettext.
14938
14939 2005-08-24  Bruno Haible  <bruno@clisp.org>
14940
14941         * modules/lock-tests: New file.
14942         * tests/test-lock.c: New file, from GNU gettext.
14943
14944 2005-08-24  Bruno Haible  <bruno@clisp.org>
14945
14946         * lib/lock.h: Add multiple inclusion guard.
14947         * lib/tls.h: Add multiple inclusion guard.
14948
14949 2005-08-24  Bruno Haible  <bruno@clisp.org>
14950
14951         * gnulib-tool: Add support for the --aux-dir option to
14952         --create-testdir, --create-megatestdir, --test, --megatest.
14953         (func_create_testdir, func_create_megatestdir): Optionally emit a
14954         AC_CONFIG_AUX_DIR directive.
14955         (create-testdir, create-megatestdir, test, megatest): Provide a
14956         default value for $auxdir.
14957
14958 2005-08-24  Bruno Haible  <bruno@clisp.org>
14959
14960         * gnulib-tool (import): Use compound statement instead of subshell
14961         where possible.
14962
14963 2005-08-24  Bruno Haible  <bruno@clisp.org>
14964
14965         * gnulib-tool (import): Change --aux-dir default to "build-aux".
14966
14967 2005-08-24  Bruno Haible  <bruno@clisp.org>
14968
14969         * gnulib-tool (func_version): Update.
14970
14971 2005-08-24  Bruno Haible  <bruno@clisp.org>
14972
14973         * gnulib-tool (func_import, func_create_testdir,
14974         func_create_megatestdir): Quote all autoconf macro arguments.
14975
14976 2005-08-24  Bruno Haible  <bruno@clisp.org>
14977
14978         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
14979         option --force, because --force causes the aclocal.m4 of each
14980         subdirectory to be newer than the corresponding config.h.in.
14981
14982 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14983
14984         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
14985         All contents moved to gl_REGEX.
14986         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
14987         assume that it does.
14988
14989 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14990
14991         * lib/regex.h (REG_NOSYS)
14992         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
14993         Define, since POSIX requires it as of 2001.
14994         (_REG_ENOSYS)
14995         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
14996         New private symbol, used to keep the enum signed in all cases.
14997         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
14998         Youngman in
14999         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
15000
15001         * lib/regex_internal.c (re_string_skip_chars, register_state):
15002         (calc_state_hash):
15003         Remove forward decls; no longer needed now that we use prototypes.
15004         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
15005         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
15006         (clean_state_log_if_needed): Likewise.
15007
15008 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15009
15010         * config/srclist.txt: Add glibc bugs 1231-1233.
15011
15012 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15013
15014         Fix problems reported by Sam Steingold in
15015         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
15016         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
15017         assumed that reg_errcode_t is a signed type, which is not
15018         necessarily true if _XOPEN_SOURCE is not defined.
15019         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
15020         since some compilers warn about it otherwise.
15021
15022 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15023
15024         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
15025         (init_word_char, create_initial_state, duplicate_node_closure):
15026         (fetch_token, peek_token_bracket, build_range_exp):
15027         (build_collating_symbol): Remove forward decls; no longer needed
15028         now that we use prototypes.
15029
15030         * lib/regcomp.c:
15031         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
15032         (re_compile_fastmap_iter, regcomp, regerror, regfree):
15033         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
15034         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
15035         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
15036         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
15037         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
15038         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
15039         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
15040         (build_range_exp, build_collating_symbol, parse_bracket_exp):
15041         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
15042         (build_charclass, build_charclass_op, fetch_number, create_tree):
15043         (create_token_tree, mark_opt_subexp, duplicate_tree):
15044         Use prototypes rather than old-style definitions.
15045
15046         * lib/regex_internal.c:
15047         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
15048         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
15049         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
15050         (re_string_reconstruct, re_string_peek_byte_case):
15051         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
15052         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
15053         (re_node_set_init_copy, re_node_set_add_intersect):
15054         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15055         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15056         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
15057         (re_acquire_state, re_acquire_state_context, register_state):
15058         (create_ci_newstate, create_cd_newstate, free_state):
15059         Likewise.
15060         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
15061         re_search_2):
15062         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
15063         (re_search_internal, prune_impossible_nodes):
15064         (acquire_init_state_context, check_matching, static):
15065         (check_halt_node_context, check_halt_state_context, proceed_next_node):
15066         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
15067         (update_regs, sift_states_backward, build_sifted_states):
15068         (clean_state_log_if_needed, merge_state_array):
15069         (update_cur_sifted_state, add_epsilon_src_nodes):
15070         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
15071         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
15072         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
15073         (find_recover_state, check_subexp_matching_top, transit_state_mb):
15074         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
15075         (check_arrival, check_arrival_add_next_nodes):
15076         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
15077         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
15078         (check_node_accept_bytes, check_node_accept, extend_buffers):
15079         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
15080         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
15081         (sift_ctx_init):
15082         Likewise.
15083
15084         * lib/regex_internal.h:
15085         (re_string_allocate, re_string_construct, re_string_reconstruct):
15086         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
15087         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
15088         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
15089         (re_string_context_at, re_string_peek_byte_case):
15090         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
15091         is defined, since we now use prototypes always.
15092
15093         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
15094         C89 or better.  All uses removed.
15095
15096 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15097
15098         * config/srclist.txt: Add glibc bugs 1220-1227.
15099
15100 2005-08-20  Jim Meyering  <jim@meyering.net>
15101
15102         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
15103         of unused local, dfa.
15104
15105 2005-08-20  Bruno Haible  <bruno@clisp.org>
15106
15107         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
15108
15109 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15110
15111         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
15112         (re_node_set_insert_last, re_dfa_add_node):
15113         Rename local variables to avoid GCC shadowing warnings.
15114
15115 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15116
15117         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
15118         [defined lint]: Suppress bogus uninitialized-variable warnings.
15119
15120         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
15121         and let the caller return REG_ESPACE if out of space.  This
15122         removes an uninitialied-variable warning with GCC 4.0.1, and also
15123         avoids taking the address of a local variable.  All callers
15124         changed.
15125
15126 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15127
15128         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
15129         $LIBCSRC/posix/regexec.c.
15130         Add glibc bug 1217 for regcomp.c.
15131
15132 2005-08-19  Jim Meyering  <jim@meyering.net>
15133
15134         * lib/regexec.c (proceed_next_node): Redo local variables to
15135         avoid GCC shadowing warnings.
15136
15137 2005-08-18  Bruno Haible  <bruno@clisp.org>
15138
15139         * lib/strstr.c (strstr): Fix return value in multibyte case.
15140         * lib/strcasestr.c (strcasestr): Likewise.
15141
15142 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15143
15144         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
15145
15146 2005-08-17  Jim Meyering  <jim@meyering.net>
15147
15148         Make the %s format (seconds since the epoch) work for a negative
15149         number and when used with a zero-padded field width, e.g. %015s.
15150
15151         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
15152         label so that it precedes the code to set `digits'.  Otherwise,
15153         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
15154         print `00-22'.  Now, it prints `-0022', as it should.
15155
15156 2005-08-17  Bruno Haible  <bruno@clisp.org>
15157
15158         * modules/strstr (Files): Add m4/mbrtowc.m4.
15159         (Depends-on): Add mbuiter.
15160
15161 2005-08-17  Bruno Haible  <bruno@clisp.org>
15162
15163         * modules/strcasestr: New file.
15164         * MODULES.html.sh (String handling, based on ANSI C 89): Add
15165         strcasestr.
15166
15167 2005-08-17  Bruno Haible  <bruno@clisp.org>
15168
15169         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
15170
15171 2005-08-17  Bruno Haible  <bruno@clisp.org>
15172
15173         * modules/mbuiter: New file.
15174         * MODULES.html.sh (Extended multibyte and wide character utilities):
15175         Add mbuiter.
15176
15177 2005-08-17  Bruno Haible  <bruno@clisp.org>
15178
15179         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
15180         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
15181
15182 2005-08-17  Bruno Haible  <bruno@clisp.org>
15183
15184         * m4/strcasestr.m4: New file.
15185
15186 2005-08-17  Bruno Haible  <bruno@clisp.org>
15187
15188         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
15189         * lib/strstr.c: Completely rewritten, with multibyte locale support.
15190
15191 2005-08-17  Bruno Haible  <bruno@clisp.org>
15192
15193         * lib/strcasestr.h: New file.
15194         * lib/strcasestr.c: New file.
15195
15196 2005-08-17  Bruno Haible  <bruno@clisp.org>
15197
15198         * lib/strcasecmp.c: Use mbuiter.h.
15199
15200 2005-08-17  Bruno Haible  <bruno@clisp.org>
15201
15202         * lib/mbuiter.h: New file.
15203
15204 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
15205
15206         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
15207         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
15208         and gl_GETOPT are both invoked via different paths (as happens
15209         with GNU tar CVS because it uses both argp and getopt), the former
15210         wins.
15211
15212 2005-08-16  Bruno Haible  <bruno@clisp.org>
15213
15214         * modules/tls: New file.
15215         * MODULES.html.sh (Multithreading): Add tls.
15216
15217 2005-08-16  Bruno Haible  <bruno@clisp.org>
15218
15219         * modules/strnlen1: New file.
15220         * MODULES.html.sh (String handling): Add strnlen1.
15221
15222 2005-08-16  Bruno Haible  <bruno@clisp.org>
15223
15224         * modules/strcase (Files): Add m4/mbrtowc.m4.
15225         (Depends-on): Add strnlen1, mbchar.
15226
15227 2005-08-16  Bruno Haible  <bruno@clisp.org>
15228
15229         * modules/mbiter: New file.
15230         * MODULES.html.sh (Extended multibyte and wide character utilities):
15231         Add mbiter.
15232
15233 2005-08-16  Bruno Haible  <bruno@clisp.org>
15234
15235         * modules/mbfile: New file.
15236         * MODULES.html.sh (Extended multibyte and wide character utilities):
15237         Add mbfile.
15238
15239 2005-08-16  Bruno Haible  <bruno@clisp.org>
15240
15241         * modules/mbchar: New file.
15242         * MODULES.html.sh (Extended multibyte and wide character utilities):
15243         New section.
15244
15245 2005-08-16  Bruno Haible  <bruno@clisp.org>
15246
15247         * m4/tls.m4: New file, from GNU gettext.
15248
15249 2005-08-16  Bruno Haible  <bruno@clisp.org>
15250
15251         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
15252         always.
15253         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
15254
15255 2005-08-16  Bruno Haible  <bruno@clisp.org>
15256
15257         * m4/mbiter.m4: New file.
15258
15259 2005-08-16  Bruno Haible  <bruno@clisp.org>
15260
15261         * m4/mbfile.m4: New file.
15262
15263 2005-08-16  Bruno Haible  <bruno@clisp.org>
15264
15265         * m4/mbchar.m4: New file.
15266
15267 2005-08-16  Bruno Haible  <bruno@clisp.org>
15268
15269         * lib/tls.h: New file, from GNU gettext.
15270         * lib/tls.c: New file, from GNU gettext.
15271
15272 2005-08-16  Bruno Haible  <bruno@clisp.org>
15273
15274         * lib/strnlen1.h: New file.
15275         * lib/strnlen1.c: New file.
15276
15277 2005-08-16  Bruno Haible  <bruno@clisp.org>
15278
15279         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
15280         (mbi_init): Update.
15281         (mbi_avail, mbi_advance): Let the iteration end before the terminating
15282         NUL byte, not after it.
15283
15284 2005-08-16  Bruno Haible  <bruno@clisp.org>
15285
15286         * lib/strcase.h (strcasecmp): Add note in comments.
15287         * lib/strncasecmp.c: Use code from strcasecmp.c.
15288         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
15289         (strcasecmp): Work correctly in multibyte locales.
15290
15291 2005-08-16  Bruno Haible  <bruno@clisp.org>
15292
15293         * lib/mbiter.h: New file.
15294
15295 2005-08-16  Bruno Haible  <bruno@clisp.org>
15296
15297         * lib/mbfile.h: New file.
15298
15299 2005-08-16  Bruno Haible  <bruno@clisp.org>
15300
15301         * lib/mbchar.h: New file.
15302         * lib/mbchar.c: New file.
15303
15304 2005-08-16  Bruno Haible  <bruno@clisp.org>
15305
15306         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
15307         the valid ones. Makes the comparison operations transitive:
15308         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
15309         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
15310
15311 2005-08-15  Simon Josefsson  <jas@extundo.com>
15312
15313         * modules/ssize_t (License): Change to 'unlimited'.
15314
15315         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
15316
15317 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
15318
15319         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
15320         Add comments for each pending glibc patch.
15321
15322 2005-08-15  Bruno Haible  <bruno@clisp.org>
15323
15324         * lib/regex.h (__restrict_arr): Don't define to __restrict if
15325         __cplusplus is defined.
15326
15327 2005-08-14  Jim Meyering  <jim@meyering.net>
15328
15329         Sync from coreutils.
15330
15331         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
15332         Use the hash-table-based cycle-detection code not just when
15333         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
15334         Reported by James Youngman in
15335         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
15336         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
15337         FTS_TIGHT_CYCLE_CHECK.
15338         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
15339         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
15340         once again.
15341         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
15342         * lib/fts.c (fd_safer): Remove decl.
15343         Include fcntl--.h rather than unistd-safer.h
15344         (fts_safe_changedir): Don't call fd_safer; no longer needed
15345         now that we include fcntl--.h.
15346
15347 2005-08-12  Simon Josefsson  <jas@extundo.com>
15348
15349         * modules/getndelim2: Use ssize_t module.
15350         * modules/getnline: Likewise.
15351         * modules/safe-read: Likewise.
15352         * modules/xreadlink: Likewise.
15353
15354         * modules/ssize_t: New file.
15355
15356 2005-08-12  Simon Josefsson  <jas@extundo.com>
15357
15358         * m4/readline.m4: Look for termcap, curses or ncurses if required.
15359
15360 2005-08-12  Simon Josefsson  <jas@extundo.com>
15361
15362         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15363         ssize_t.
15364
15365 2005-08-12  Simon Josefsson  <jas@extundo.com>
15366
15367         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
15368         readline, getdelim and check_version.
15369         (Support for systems lacking ISO C 99: Sizes of integer types):
15370         Add size_max.
15371
15372 2005-08-12  Bruno Haible  <bruno@clisp.org>
15373
15374         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
15375
15376 2005-08-11  Simon Josefsson  <jas@extundo.com>
15377
15378         * modules/readline: New file.
15379
15380         * modules/strnlen (Files): Add strnlen.h.
15381
15382 2005-08-11  Simon Josefsson  <jas@extundo.com>
15383
15384         * m4/readline.m4: New file.
15385
15386 2005-08-11  Simon Josefsson  <jas@extundo.com>
15387
15388         * lib/readline.h, readline.c: New file.
15389
15390 2005-08-11  Simon Josefsson  <jas@extundo.com>
15391
15392         * doc/gnulib.texi (Initial import, Finishing touches): Mention
15393         gl_AVOID.
15394
15395 2005-08-11  Bruno Haible  <bruno@clisp.org>
15396
15397         * lib/strnlen.h (strnlen): Change parameter name to match comment.
15398
15399 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
15400
15401         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
15402
15403 2005-08-10  Simon Josefsson  <jas@extundo.com>
15404
15405         * tests/test-iconvme.c: New file.
15406
15407 2005-08-10  Simon Josefsson  <jas@extundo.com>
15408
15409         * m4/strnlen.m4: New file.
15410
15411         * m4/strndup.m4: Don't check for strnlen declaration, done in
15412         strnlen.m4.
15413
15414 2005-08-10  Simon Josefsson  <jas@extundo.com>
15415
15416         * lib/strndup.c: Use strnlen.h.
15417
15418         * lib/strnlen.h: New file.
15419
15420 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
15421
15422         * README: Typos.
15423
15424 2005-08-02  Simon Josefsson  <jas@extundo.com>
15425
15426         * modules/readline: New file.
15427
15428 2005-08-02  Simon Josefsson  <jas@extundo.com>
15429
15430         * modules/getdelim: New file.
15431
15432         * modules/getline: Rewrite, don't use getndelim2.
15433
15434 2005-08-02  Simon Josefsson  <jas@extundo.com>
15435
15436         * m4/getline.m4: Separate out getdelim stuff into separate module.
15437
15438         * m4/getdelim.m4: New file.
15439
15440 2005-08-02  Simon Josefsson  <jas@extundo.com>
15441
15442         * lib/getline.h, getline.c: Rewrite.
15443
15444         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
15445
15446 2005-07-31  Bruno Haible  <bruno@clisp.org>
15447
15448         * lib/lock.h (gl_lock_initializer): New macro.
15449         (gl_lock_define_initialized): Use it.
15450         (gl_rwlock_initializer): New macro.
15451         (gl_rwlock_define_initialized): Use it.
15452         (gl_recursive_lock_initializer): New macro.
15453         (gl_recursive_lock_define_initialized): Use it.
15454
15455 2005-07-30  Karl Berry  <karl@gnu.org>
15456
15457         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
15458         Report from Ben Pfaff, regarding getopt.
15459
15460 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
15461
15462         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
15463         normal way.
15464         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
15465         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
15466         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
15467         (gl_GETOPT): Use the new macros.  Most of the implementation
15468         is moved to the new macros.  This is for programs like Emacs
15469         that don't want all the functionality of gl_GETOPT.
15470
15471 2005-07-26  Bruno Haible  <bruno@clisp.org>
15472
15473         * m4/lock.m4: Update from GNU gettext.
15474
15475 2005-07-26  Bruno Haible  <bruno@clisp.org>
15476
15477         * lib/lock.h: Update from GNU gettext.
15478         * lib/lock.c: Update from GNU gettext.
15479
15480 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
15481
15482         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
15483         obsolescent AC_TRY_RUN.  Include the default includes files, for
15484         'exit'.
15485
15486 2005-07-24  Bruno Haible  <bruno@clisp.org>
15487
15488         * modules/visibility: New file.
15489         * MODULES.html.sh (Misc): Add visibility.
15490
15491 2005-07-24  Bruno Haible  <bruno@clisp.org>
15492
15493         * m4/visibility.m4: New file.
15494
15495 2005-07-24  Bruno Haible  <bruno@clisp.org>
15496
15497         * doc/visibility.texi: New file.
15498
15499 2005-07-22  Bruno Haible  <bruno@clisp.org>
15500
15501         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
15502         $(ALLOCA_H), redundant through BUILT_SOURCES.
15503         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
15504         redundant through BUILT_SOURCES.
15505         * modules/byteswap (Makefile.am): Remove explicit dependency on
15506         $(BYTESWAP_H), redundant through BUILT_SOURCES.
15507         * modules/fnmatch (Makefile.am): Remove explicit dependency on
15508         $(FNMATCH_H), redundant through BUILT_SOURCES.
15509         * modules/getopt (Makefile.am): Remove explicit dependency on
15510         $(GETOPT_H), redundant through BUILT_SOURCES.
15511         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
15512         redundant through BUILT_SOURCES.
15513         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
15514         redundant through BUILT_SOURCES.
15515         * modules/stdbool (Makefile.am): Remove explicit dependency on
15516         $(STDBOOL_H), redundant through BUILT_SOURCES.
15517         * modules/stdint (Makefile.am): Remove explicit dependency on
15518         $(STDINT_H), redundant through BUILT_SOURCES.
15519         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
15520         Remove explicit dependency on $(SYSEXITS_H).
15521         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
15522
15523 2005-07-18  Simon Josefsson  <jas@extundo.com>
15524
15525         * lib/check-version.c (check_version): Accept identical versions too.
15526
15527 2005-07-18  Bruno Haible  <bruno@clisp.org>
15528
15529         * modules/lock: New file.
15530         * MODULES.html.sh (Multithreading): New section.
15531
15532 2005-07-18  Bruno Haible  <bruno@clisp.org>
15533
15534         * m4/lock.m4: New file, from GNU gettext.
15535
15536 2005-07-18  Bruno Haible  <bruno@clisp.org>
15537
15538         * lib/lock.h: New file, from GNU gettext.
15539         * lib/lock.c: New file, from GNU gettext.
15540
15541 2005-07-18  Bruno Haible  <bruno@clisp.org>
15542
15543         * lib/lock.h (gl_once_t): New type.
15544         (gl_once_define, gl_once): New macros.
15545         * lib/lock.c (fresh_once): New variable.
15546         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
15547         functions.
15548
15549 2005-07-16  Simon Josefsson  <jas@extundo.com>
15550
15551         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
15552         workaround, suggested by Bruno.
15553
15554 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
15555
15556         * modules/xalloc (Depends-on): Add xalloc-die.
15557         * modules/xvasprintf (Depends-on): Add xalloc-die.
15558
15559 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
15560
15561         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
15562         with a minor change.
15563
15564 2005-07-15  Bruno Haible  <bruno@clisp.org>
15565
15566         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
15567         When using lib/poll.c, define poll as rpl_poll.
15568
15569 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
15570
15571         * modules/argp (Depends-on): Remove unlocked-io.
15572
15573 2005-07-14  Derek Price  <derek@ximbiot.com>
15574
15575         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
15576         for glob symlink bug.
15577
15578 2005-07-14  Bruno Haible  <bruno@clisp.org>
15579
15580         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
15581         Instead, test for *_unlocked function declarations directly.
15582
15583 2005-07-11  Simon Josefsson  <jas@extundo.com>
15584
15585         * modules/size_max: New file.
15586
15587         * modules/xsize: Depend on size_max module for size_max.m4.
15588
15589 2005-07-11  Simon Josefsson  <jas@extundo.com>
15590
15591         * lib/size_max.h: New file.
15592
15593 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
15594
15595         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
15596         copyright symbol and the year.
15597         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
15598         (version_etc_va): Use parameterized copyright notice.
15599         Reword to conform to the current GNU coding standards.
15600
15601 2005-07-11  Karl Berry  <karl@gnu.org>
15602
15603         * doc/gnulib.texi (Quoting): new node.
15604         (Initial import): more info, from Patrice.
15605
15606 2005-07-11  Bruno Haible  <bruno@clisp.org>
15607
15608         * gnulib-tool (func_usage): Document option --avoid.
15609         (Command line options): Handle --avoid.
15610         (func_acceptable): New function.
15611         (func_modules_transitive_closure): Use it.
15612
15613 2005-07-11  Bruno Haible  <bruno@clisp.org>
15614
15615         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
15616         Reported by Jim Meyering.
15617
15618 2005-07-10  Bruno Haible  <bruno@clisp.org>
15619
15620         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
15621         Needed when size_t is smaller than 'unsigned int'.
15622         Reported by Paul Eggert.
15623
15624 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15625
15626         * modules/argp (Depends-on): Add unlocked-io
15627
15628 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15629
15630         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
15631         block of defines.
15632
15633 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
15634
15635         * config/srclist.txt: Comment out regcomp.c, since we have a porting
15636         fix now.
15637
15638 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
15639         and Paul Eggert  <eggert@cs.ucla.edu>
15640
15641         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
15642         in wint_t, not wchar_t.  Remove now-unnecessary cast.
15643
15644 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15645
15646         * modules/regex (Files): Add lib/regex_internal.c,
15647         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
15648         (Depends-on): Add extensions.
15649         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
15650
15651 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15652
15653         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
15654         pathconf.
15655         * m4/same.m4 (gl_SAME): Likewise.
15656         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
15657
15658         * m4/regex.m4: Adjust to new libc regex implementation.
15659         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
15660         all the .c and .h parts of (the new) regex.
15661         Quote the m4 stuff better.
15662         Check for RE_ICASE bug of old gnulib.
15663         Check for REG_STARTEND of recent libc.
15664         Rename local variables from jm_* to gl_*.
15665         Quote operand of "test -f".
15666         Say "recent enough" version of libc, not "version 2".
15667         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
15668         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
15669         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
15670         Remove check for btowc, isascii.
15671         Require AM_LANGINFO_CODESET.
15672
15673 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15674
15675         * lib/regex.c, regex.h: Sync from libc.
15676         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
15677         * lib/regexec.c:
15678         New files, synced from libc, except that regex_internal.h
15679         currently has a small porting fix.
15680
15681 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15682
15683         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
15684         regex_internal.c, regexec.c.
15685         Add regex_internal.h too, but as a comment, since the libc version
15686         is currently broken in gnulib mode.
15687
15688 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
15689
15690         Support programs like Emacs that use gnulib but not gettext.
15691         * MODULES.html.sh (Internationalization functions): Add gettext-h.
15692         * modules/gettext-h: New file.
15693         * modules/gettext (Files): Remove lib/gettext.h.
15694         (Depends-on): Add gettext-h.
15695         (Makefile.am): Remove lib_SOURCES.
15696         * modules/argmatch, modules/c-stack, modules/closeout:
15697         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
15698         * modules/execute, modules/file-type, modules/getaddrinfo:
15699         * modules/getopt, modules/human, modules/javacomp:
15700         * modules/javaexec, modules/mkdir-p, modules/obstack:
15701         * modules/openat, modules/pagealign_alloc, modules/pipe:
15702         * modules/quotearg, modules/regex, modules/rpmatch:
15703         * modules/unicodeio, modules/userspec, modules/version-etc:
15704         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
15705         * modules/xsetenv:
15706         Depend on gettext-h, not gettext.
15707
15708 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
15709
15710         * gnulib-tool (func_import): Add support for 'public domain' license.
15711         * modules/alloca, modules/atexit, modules/memmove:
15712         Now public domain, not GPL.
15713         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
15714         * modules/realloc, modules/strerror, modules/strtod:
15715         Now LGPL, not GPL.
15716
15717 2005-07-05  Bruno Haible  <bruno@clisp.org>
15718
15719         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
15720         autoconf CVS. Needed for mingw.
15721
15722 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15723
15724         Remove the dependency of the strftime module on the tzset module.
15725         * modules/strftime (Depends-on): Remove dependency on tzset.
15726
15727 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15728
15729         Remove the dependency of the strftime module on the tzset module.
15730         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
15731         gl_FUNC_TZSET_CLOBBER.
15732
15733 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15734
15735         Remove the dependency of the strftime module on the tzset module.
15736         * lib/strftime.c (my_strftime)
15737         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
15738         Copy the input structure, to work around some of the bug with
15739         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
15740         Solaris releases, you should also use the tzset module, but we won't
15741         require it as a dependency any more since we don't want LGPLed code
15742         to depend on GPLed code.
15743
15744 2005-07-02  Jim Meyering  <jim@meyering.net>
15745
15746         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
15747         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
15748         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
15749         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
15750
15751 2005-07-02  Jim Meyering  <jim@meyering.net>
15752
15753         * lib/backupfile.c (backup_args): Change a `0' to NULL.
15754
15755 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
15756
15757         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
15758         declares only 'struct timespec;' (!).
15759
15760 2005-07-01  Jim Meyering  <jim@meyering.net>
15761
15762         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
15763         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
15764         * lib/save-cwd.c, tempname.c:
15765         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
15766         and don't include <sys/file.h>).
15767
15768 2005-06-29  Jim Meyering  <jim@meyering.net>
15769
15770         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
15771         type name.  Use the variable name instead.
15772         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
15773         Likewise.
15774
15775 2005-06-28  Simon Josefsson  <jas@extundo.com>
15776
15777         * modules/check-version (Files): Add check-version.m4.
15778
15779 2005-06-28  Simon Josefsson  <jas@extundo.com>
15780
15781         * m4/check-version.m4: New file, suggested by Jim Meyering
15782         <jim@meyering.net>.
15783
15784 2005-06-28  Simon Josefsson  <jas@extundo.com>
15785
15786         * lib/check-version.h, lib/check-version.c: New files.
15787
15788 2005-06-28  Simon Josefsson  <jas@extundo.com>
15789
15790         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
15791         collision with global variable.  Better indentation.  Don't
15792         increment buffer pointer beyond buffer end.  Based on comments
15793         from Paul Eggert <eggert@cs.ucla.edu>.
15794
15795         * lib/base64.h: Indent.
15796
15797 2005-06-28  Simon Josefsson  <jas@extundo.com>
15798
15799         * doc/gnulib.texi (Library version handling): New section.
15800
15801 2005-06-28  Jim Meyering  <jim@meyering.net>
15802
15803         * check-module (find_included_lib_files): Hard-code another
15804         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
15805         but modules/fts-lgpl (correctly) does not list those files.
15806
15807         * modules/canonicalize (Files): Add lib/pathmax.h.
15808
15809 2005-06-25  Simon Josefsson  <jas@extundo.com>
15810
15811         * modules/check-version: New file.
15812
15813 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
15814
15815         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
15816         initializer of struct addrinfo, as an indication that we don't
15817         care how many members the structure has.
15818
15819 2005-06-24  Derek Price  <derek@ximbiot.com>
15820         and Bruno Haible  <bruno@clisp.org>
15821
15822         Remove stat module & update lstat.
15823         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
15824         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
15825         * m4/stat.m4: Remove this file.
15826
15827 2005-06-24  Derek Price  <derek@ximbiot.com>
15828         and Bruno Haible  <bruno@clisp.org>
15829
15830         Remove stat module & update lstat.
15831         * lib/stat.c: Remove this file...
15832         (slash_aware_lstat): ...moving this content and its support...
15833         * lib/lstat.c (rpl_lstat): ...into here.
15834         * lib/lstat.h: New file.
15835
15836 2005-06-24  Derek Price  <derek@ximbiot.com>
15837         and Bruno Haible  <bruno@clisp.org>
15838
15839         Remove stat module & update lstat.
15840         * config/srclist.txt (libc sources): Remove stat.
15841
15842 2005-06-24  Derek Price  <derek@ximbiot.com>
15843         and Bruno Haible  <bruno@clisp.org>
15844
15845         Remove stat module & update lstat.
15846         * MODULES.html.sh (stat): Remove.
15847         * MODULES.html: Regenerated.
15848         * modules/lstat (Description): Correct function name.
15849         (Files): Add "lstat.h".
15850         (Depends-on): Remove stat, add xalloc, stat-macros.
15851         * modules/stat: Remove this file.
15852         (Include): Add "lstat.h", remove <sys/stat.h>.
15853
15854 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
15855
15856         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
15857         (ranged_convert): Don't save conversion in a temporary struct.
15858         This causes a warning with GCC 4.0.0, and anyway in the typical
15859         case it's not worth the extra 100 bytes or so of code.
15860         (ranged_convert, __mktime_internal): When calling a function via a
15861         pointer P, use P () rather than (*P) (), as we now assume C89 or
15862         better.
15863
15864 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15865
15866         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
15867         "who -r" failed to give output.  Problem reported by Tim Waugh.
15868
15869         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
15870         (xcalloc): Use it to avoid needless tests.
15871         Problem reported by Jim Meyering.
15872
15873 2005-06-20  Derek Price  <derek@ximbiot.com>
15874
15875         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
15876         unnecessary for Autoconfs > 2.59c.
15877
15878 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15879
15880         * lib/argp.h (__option_is_short): Check upper limit of
15881         __key. Isprint() requires its argument to have the value
15882         of an unsigned char or EOF.
15883
15884 2005-06-16  Jim Meyering  <jim@meyering.net>
15885
15886         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
15887         when either N or S is zero.
15888
15889 2005-06-16  Derek Price  <derek@ximbiot.com>
15890
15891         * m4/bison.m4: Declare YACC & YFLAGS precious.
15892
15893 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
15894
15895         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
15896         multibyte string or pattern, fall back on unibyte matching.
15897         Problem reported by James Youngman.
15898
15899 2005-06-08  Bruno Haible  <bruno@clisp.org>
15900
15901         * modules/csharpcomp: New file.
15902         * MODULES.html.sh (C#): Add csharpcomp.
15903
15904 2005-06-08  Bruno Haible  <bruno@clisp.org>
15905
15906         * m4/csharpcomp.m4: New file, from GNU gettext.
15907
15908 2005-06-08  Bruno Haible  <bruno@clisp.org>
15909
15910         * lib/csharpcomp.h: New file, from GNU gettext.
15911         * lib/csharpcomp.c: New file, from GNU gettext.
15912         * lib/csharpcomp.sh.in: New file, from GNU gettext.
15913
15914 2005-06-08  Bruno Haible  <bruno@clisp.org>
15915
15916         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
15917         warning on mingw.
15918
15919 2005-06-07  Derek Price  <derek@ximbiot.com>
15920
15921         Sync from CVS.
15922         * lib/glob_.h: Indent nested #ifdef.
15923
15924 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15925
15926         Sync from coreutils.
15927         Use "file name" when talking about file names, instead of "filename"
15928         or "path", as per the GNU coding standards.
15929         * lib/mkdir-p.c: Renamed from makepath.c.
15930         (make_dir_parents): Renamed from make_path.  All callers changed.
15931         * lib/mkdir-p.h: Likewise.  All includers changed.
15932         * lib/filenamecat.c: Renamed from path-concat.c.
15933         (file_name_concat): Renamed from path_concat.  All callers changed.
15934         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
15935         * lib/filenamecat.h: Likewise.  All includers changed.
15936         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
15937         in comments or local variable names.
15938         * lib/basename.c: Likewise.
15939         * lib/canonicalize.c, canonicalize.h: Likewise.
15940         * lib/dirname.c, dirname.h: Likewise.
15941         * lib/euidaccess.c: Likewise.
15942         * lib/exclude.c: Likewise
15943         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
15944         * lib/fsusage.c, fsuage.h: Likewise.
15945         * lib/fts.c, fts_.h: Likewise.
15946         * lib/getcwd.c: Likewise.
15947         * lib/getloadavg.c: Likewise.
15948         * lib/mkstemp.c: Likewise.
15949         * lib/mountlist.c, mountlist.h: Likewise.
15950         * lib/openat.c, openat.h: Likewise.
15951         * lib/readlink-stub.c: Likewise.
15952         * lib/readutmp.c, readutmp.h: Likewise.
15953         * lib/rename.c: Likewise.
15954         * lib/rmdir.c: Likewise.
15955         * lib/same.c: Likewise.
15956         * lib/savedir.c: Likewise.
15957         * lib/stripslash.c: Likewise.
15958         * lib/tempname.c: Likewise.
15959         * lib/xreadlink.c: Likewise.
15960         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
15961         All uses changed.
15962         * lib/exclude.h: Likewise.
15963
15964         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
15965         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15966         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
15967         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15968         * lib/pathmax.h: Include <limits.h> unconditionally, since other
15969         files have been getting away with it for years (MORE/BSD 4.3
15970         is extinct now).
15971         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
15972         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15973
15974         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
15975         Define to 256, not 255, as per modern POSIX.
15976
15977 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15978
15979         Sync from coreutils.
15980         Use "file name" when talking about file names, instead of "filename"
15981         or "path", as per the GNU coding standards.
15982         * MODULES.html.sh: mkdir-p renamed from makepath.
15983         filenamecat renamed from path-concat.
15984         * modules/filenamecat: Renamed from modules/path-concat.
15985         (Files): filenamecat.h and filenamecat.c renamed from
15986         path-concat.h and path-concat.c.
15987         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
15988         (Include): filenamecat.h, not path-concat.h.
15989         * modules/mkdir-p: Renamed from modules/makepath.
15990         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
15991         makepath.c.
15992         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
15993         (Include): mkdir-p.h, not makepath.h.
15994
15995 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15996
15997         Sync from coreutils.
15998         * m4/mkdir-p.m4: Renamed from makepath.m4.
15999         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
16000         Rename files from makepath.c to mkdir-p.c, and from
16001         makepath.h to mkdir-p.h.
16002         * m4/filenamecat.m4: Renamed from path-concat.m4.
16003         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
16004         Rename files from path-concat.c to filenamecat.c,
16005         and from path-concat.h to filenamecat.h.
16006         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
16007         "file name" in local variables or comments.
16008         * m4/rename.m4: Likewise.
16009
16010 2005-06-01  Bruno Haible  <bruno@clisp.org>
16011
16012         * modules/csharpexec: New file.
16013         * MODULES.html.sh (C#): New section.
16014
16015 2005-06-01  Bruno Haible  <bruno@clisp.org>
16016
16017         * m4/csharp.m4: New file, from GNU gettext.
16018         * m4/csharpexec.m4: New file, from GNU gettext.
16019
16020 2005-06-01  Bruno Haible  <bruno@clisp.org>
16021
16022         * lib/csharpexec.h: New file, from GNU gettext.
16023         * lib/csharpexec.c: New file, from GNU gettext.
16024         * lib/csharpexec.sh.in: New file, from GNU gettext.
16025
16026 2005-05-31  Derek Price  <derek@ximbiot.com>
16027             Paul Eggert  <eggert@cs.ucla.edu>
16028
16029         Sync from cvs.
16030         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
16031
16032 2005-05-31  Derek Price  <derek@ximbiot.com>
16033             Paul Eggert  <eggert@cs.ucla.edu>
16034
16035         Sync from cvs.
16036         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
16037
16038 2005-05-29  Derek Price  <derek@ximbiot.com>
16039
16040         * config/srclist.txt (glob_.h, glob.c): Add these files.
16041
16042 2005-05-29  Derek Price  <derek@ximbiot.com>
16043
16044         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
16045         * modules/glob: New file.
16046         * modules/getlogin_r: Add link to POSIX spec in description.
16047
16048 2005-05-29  Derek Price  <derek@ximbiot.com>
16049             Paul Eggert  <eggert@cs.ucla.edu>
16050
16051         * m4/glob.m4: New file.
16052
16053 2005-05-29  Derek Price  <derek@ximbiot.com>
16054             Paul Eggert  <eggert@cs.ucla.edu>
16055
16056         * lib/glob_.h, lib/glob.c: New files.
16057
16058 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16059
16060         * modules/fts (Files): Remove m4/inttypes-pri.m4.
16061         * modules/fts-lgpl (Depends-on): Remove gettext.
16062
16063 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16064
16065         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
16066         and don't require gt_INTTYPES_PRI.
16067
16068 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16069
16070         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
16071
16072         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
16073         the configuration hassle isn't worth it.
16074         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
16075         (LONGEST_MODIFIER, PRIuMAX): Remove.
16076
16077 2005-05-27  Bruno Haible  <bruno@clisp.org>
16078
16079         * lib/getlogin_r.h: Remove second include of <stddef.h>.
16080
16081 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
16082
16083         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
16084         _POSIX_PTHREAD_SEMANTICS for Solaris.
16085
16086 2005-05-25  Derek Price  <derek@ximbiot.com>
16087
16088         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
16089
16090 2005-05-25  Derek Price  <derek@ximbiot.com>
16091             Paul Eggert  <eggert@cs.ucla.edu>
16092
16093         * modules/getlogin_r, m4/getlogin_r.m4: New files.
16094         * lib/getlogin_r.c, getlogin_r.h: New files.
16095
16096 2005-05-25  Bruno Haible  <bruno@clisp.org>
16097             Derek Price  <derek@ximbiot.com>
16098
16099         * lib/getlogin_r.h: Simplify API documentation.
16100
16101 2005-05-23  Derek Price  <derek@ximbiot.com>
16102
16103         * modules/minmax (Files): Add m4/minmax.m4.
16104         (configure.ac): Add gl_MINMAX.
16105
16106 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
16107
16108         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
16109         so that unistd-safer.h (GPL'ed code) need not be included.
16110
16111 2005-05-22  Bruno Haible  <bruno@clisp.org>
16112
16113         * m4/minmax.m4: New file.
16114         Based on a patch by Derek Price <derek@ximbiot.com>.
16115
16116 2005-05-22  Bruno Haible  <bruno@clisp.org>
16117
16118         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
16119         (INT64_MIN): Fix definition.
16120         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
16121
16122         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
16123         NEED_SIGNED_INT_TYPES.
16124
16125         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
16126         HAVE_SYSTEM_INTTYPES.
16127
16128 2005-05-22  Bruno Haible  <bruno@clisp.org>
16129
16130         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
16131         Also include <sys/param.h> if it defines MIN, MAX.
16132         Based on a patch by Derek Price <derek@ximbiot.com>.
16133
16134 2005-05-21  Jim Meyering  <jim@meyering.net>
16135
16136         * modules/fts (Files): Add m4/inttypes-pri.m4.
16137         (Depends-on): Add lstat and remove gettext.  Alphabetize.
16138
16139 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16140
16141         New fts module.
16142         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
16143         (setup_dir, free_dir): New functions.
16144         (enter_dir, leave_dir): Define trivial
16145         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
16146         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
16147         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
16148         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
16149         Move to fts-cycle.c.
16150         (fts_open): Use setup_dir.
16151         (fts_close): Use free_dir.
16152         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
16153         This adds a label and some gotos, but the alternatives were messier.
16154         Check for memory allocation failure when entering a dir.
16155         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
16156         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
16157         (FTS): New member fts_cycle, that is a union that contains the
16158         old active_dir_ht and cycle_state.  All uses changed to mention
16159         fts_cycle.ht and fts_cycle.state.
16160         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
16161         fts.c, with the following changes:
16162         (setup_dir, free_dir): New functions.
16163         (enter_dir): Now returns bool.  Return true if successful, false
16164         if memory exhausted.  All callers changed.
16165         Do not bother partly cleaning up on
16166         memory allocation failure; that is free_dir's job.
16167         However, free ad if hash_insert fails, to avoid memory leak.
16168         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
16169         fts->fts_options to see which union member to use.
16170
16171 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16172
16173         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
16174         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
16175
16176 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16177
16178         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
16179
16180 2005-05-20  Jim Meyering  <jim@meyering.net>
16181
16182         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
16183         Now a macro, to pacify GCC.
16184
16185 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
16186
16187         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
16188         of -1.
16189
16190 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
16191
16192         * lib/chown.c (rpl_chown): Return -1 on failure.
16193
16194 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
16195
16196         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
16197         Don't check for stddef.h.
16198         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
16199         don't use its results.
16200         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
16201         since we include them unconditionally.  Don't require
16202         AM_STDBOOL_H, since stdbool is a prerequisite.
16203         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
16204         since we assume C89 or better.
16205         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
16206         as we don't use their results.
16207         Don't check for fchdir, memmove, memset, strrchr, as we use
16208         them unconditionally.
16209         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
16210         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
16211
16212 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
16213
16214         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
16215         Include <stddef.h> unconditionally, since we assume C89 now.
16216         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
16217         * lib/fts.c: Include fts_.h first, to check interface.
16218         Do not include intprops.h; no longer needed.
16219         Include cycle-check.h and hash.h, since fts_.h no longer does.
16220         Remove unnecessary casts of closedir to void.
16221         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
16222         decide whether to decrement nlinks.
16223         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
16224         (FTS): Use struct hash_table * instead of Hash_table, so that
16225         we no longer need to include hash.h here.
16226
16227 2005-05-18  Jim Meyering  <jim@meyering.net>
16228
16229         * modules/dirfd (License): Change to LGPL.  Most of the code
16230         is already in the public domain.
16231
16232 2005-05-18  Jim Meyering  <jim@meyering.net>
16233
16234         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
16235         Reported by Yoann Vandoorselaere.
16236
16237 2005-05-17  Jim Meyering  <jim@meyering.net>
16238
16239         * m4/fts.m4: New file, from coreutils.
16240
16241 2005-05-17  Jim Meyering  <jim@meyering.net>
16242
16243         * lib/fts.c, lib/fts_.h: New files, from coreutils.
16244
16245 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16246
16247         Sync from coreutils.
16248         * m4/unlinkdir.m4: New file.
16249
16250 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16251
16252         Sync from coreutils.
16253         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
16254         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
16255         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
16256         White space changes only.
16257         * lib/makepath.c (make_path): Port to hosts where leading "//" is
16258         special.
16259         * lib/yesno.c: Include getline.h, not ctype.h.
16260         (yesno): Don't remove leading white space; POSIX doesn't allow it.
16261         Use getline to remove arbitrary restriction on response length.
16262
16263 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16264
16265         * config/srclist-update: Spell out "Street" in FSF postal
16266         mail address; this is the style the FSF seems to prefer.
16267
16268         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
16269         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
16270         this updates FSF postal mail address.
16271
16272         Sync from coreutils.
16273         * modules/unlinkdir: New file.
16274         * modules/yesno (Depends-on): Add getline.
16275         * MODULES.html.sh (File system functions): Add unlinkdir.
16276
16277 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16278
16279         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
16280         lib/strsep.h:
16281         Change the initial comment to refer to GPL, not LGPL.
16282         gnulib-tool will change it to LGPL as needed.
16283
16284         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
16285         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
16286         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
16287         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
16288         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
16289         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
16290         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
16291         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
16292         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
16293         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
16294         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
16295         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
16296         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
16297         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
16298         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
16299         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
16300         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
16301         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
16302         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
16303         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
16304         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
16305         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
16306         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
16307         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
16308         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
16309         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
16310         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
16311         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
16312         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
16313         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
16314         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
16315         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
16316         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
16317         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
16318         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
16319         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
16320         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
16321         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
16322         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
16323         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
16324         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
16325         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
16326         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
16327         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
16328         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
16329         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
16330         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
16331         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
16332         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
16333         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
16334         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16335         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
16336         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
16337         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
16338         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
16339         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
16340         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
16341         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
16342         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
16343         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
16344         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
16345         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
16346         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
16347         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
16348         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
16349         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
16350         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
16351         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
16352         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
16353         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
16354         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
16355         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
16356         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
16357         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
16358         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
16359         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
16360         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
16361         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
16362         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
16363         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
16364         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
16365         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
16366         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
16367         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
16368         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
16369         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
16370         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
16371         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
16372         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
16373         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
16374         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
16375         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
16376         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
16377         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
16378         lib/yesno.c, lib/yesno.h:
16379         Update FSF postal mail address.
16380
16381 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16382
16383         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
16384         tests/test-memmem.c, tests/test-stpncpy.c:
16385         Update FSF postal mail address.
16386
16387 2005-05-13  Bruno Haible  <bruno@clisp.org>
16388
16389         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
16390         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
16391         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
16392         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
16393         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
16394         Add support for 64-bit integers in the MSVC compiler.
16395
16396 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16397
16398         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
16399
16400 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
16401
16402         * gnulib-tool (func_import): Sort and uniquify recommended includes.
16403
16404 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
16405
16406         * doc/getdate.texi (General date syntax): Don't say that date
16407         date --iso-8601=ns generates acceptable dates; it doesn't yet.
16408         Problem reported by Nic Ferrier.
16409
16410 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16411
16412         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
16413         specified in ai_socktype. Fix invalid ai_protocol
16414         check. ai_protocol is usually set to 0 or depending on
16415         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
16416         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
16417         ai_socktype / ai_protocol in the returned addrinfo structure.
16418
16419 2005-05-10  Simon Josefsson  <jas@extundo.com>
16420
16421         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
16422         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
16423
16424 2005-05-10  Karl Berry  <karl@gnu.org>
16425
16426         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
16427         (from http://www.gnu.org/licenses).
16428         * doc/COPYING.LIB: also rename to COPYING.LESSER.
16429         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
16430         fdl.texi suffices.
16431
16432 2005-05-10  Karl Berry  <karl@gnu.org>
16433
16434         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
16435         (COPYING.DOC): remove.
16436
16437         * config/srclist-update: new FSF address.
16438
16439 2005-05-10  Derek Price  <derek@ximbiot.com>
16440
16441         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
16442         possible.
16443
16444 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16445             Bruno Haible  <bruno@clisp.org>
16446
16447         * modules/inet_ntop: New file.
16448         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16449         inet_ntop.
16450
16451 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16452             Bruno Haible  <bruno@clisp.org>
16453
16454         * m4/inet_ntop.m4: New file.
16455
16456 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16457             Bruno Haible  <bruno@clisp.org>
16458
16459         * lib/inet_ntop.h: New file.
16460         * lib/inet_ntop.c: New file, from glibc with modifications.
16461
16462 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
16463
16464         * modules/time_r (License): Change to LGPL.
16465         * modules/extensions (License): Change to LGPL.  Actually,
16466         the license is more permissive than that, but currently gnulib-tool
16467         doesn't know how to handle more-permissive licenses.
16468
16469         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
16470         Problem reported by Dave Love.
16471
16472 2005-05-08  Jim Meyering  <jim@meyering.net>
16473
16474         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
16475         blank.
16476
16477 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16478
16479         * modules/argmatch (Depends-on): Add stdbool.
16480         * modules/backupfile (Depends-on): Likewise.
16481         * modules/chdir-long (Depends-on): Likewise.
16482         * modules/closeout (Depends-on): Likewise.
16483         * modules/cycle-check (Depends-on): Likewise.
16484         * modules/dirname (Depends-on): Likewise.
16485         * modules/fnmatch (Depends-on): Likewise.
16486         * modules/fsusage (Depends-on): Likewise.
16487         * modules/fwriteerror (Depends-on): Likewise.
16488         * modules/getcwd (Depends-on): Likewise.
16489         * modules/getloadavg (Depends-on): Likewise.
16490         * modules/hard-locale (Depends-on): Likewise.
16491         * modules/makepath (Depends-on): Likewise.
16492         * modules/mountlist (Depends-on): Likewise.
16493         * modules/nanosleep (Depends-on): Likewise.
16494         * modules/posixtm (Depends-on): Likewise.
16495         * modules/quotearg (Depends-on): Likewise.
16496         * modules/readtokens (Depends-on): Likewise.
16497         * modules/readtokens0 (Depends-on): Likewise.
16498         * modules/readutmp (Depends-on): Likewise.
16499         * modules/save-cwd (Depends-on): Likewise.
16500         * modules/strftime (Depends-on): Likewise.
16501         * modules/userspec (Depends-on): Likewise.
16502         * modules/utimecmp (Depends-on): Likewise.
16503         * modules/xgetcwd (Depends-on): Likewise.
16504         * modules/xnanosleep (Depends-on): Likewise.
16505         * modules/xstrtod (Depends-on): Likewise.
16506         * modules/yesno (Depends-on): Likewise.
16507
16508 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
16509
16510         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
16511         needless checks.
16512
16513 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16514
16515         Merge from coreutils.  Among other things,
16516         add bulletproofing for cases where stdin, stdout, or stderr are closed.
16517         * lib/fd-safer.c: New file.
16518         * lib/fcntl-safer.h, open-safer.c: Remove.
16519         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
16520         * lib/dup-safer.c: Include unistd-safer.h first.
16521         Don't include errno.h.
16522         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
16523         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
16524         * lib/file-type.c: Rely on file-type.h change.
16525         * lib/getloadavg.c: Include unistd-safer.h.
16526         (getloadavg): Use safer open.
16527         * lib/getusershell.c: Include "stdio-safer.h".
16528         (getusershell): Use safer fopen.
16529         * lib/long-options.c (long_options): Use NULL rather than 0.
16530         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
16531         'free'.
16532         * lib/modechange.c: Likewise.
16533         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
16534         (MODE_DONE): New constant.
16535         (struct mode_change): Remove 'next' member.
16536         (make_node_op_equals): New function; like the old one of the
16537         same name, except it allocates an array.
16538         (mode_compile, mode_create_from_ref): Use it.
16539         (mode_compile): Allocate result as an array, not a linked list.
16540         Parse octal string ourself, so that we catch mistakes like "+0".
16541         (mode_adjust): Arg is an array, not a linked list.
16542         * lib/modechange.c: Include stat-macros.h, xalloc.h.
16543         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
16544         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
16545         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
16546         Remove.  This is now stat-macros.h's job.
16547         (talloc): Remove.  All callers replaced by xalloc, so that
16548         our invokers don't have to worry about reporting memory failures.
16549         (make_node_op_equals): Remove.
16550         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
16551         New constants.
16552         (struct mode_change): Moved here from modechange.h.
16553         (mode_append_entry): Remove.
16554         (mode_compile): Remove MASKED_OPS arg, since it encouraged
16555         apps to have incorrect behavior.  Use simpler algorithm for head
16556         and tail.  Don't futz with umask; that's now the job of mode_adjust.
16557         Detect more invalid usages rather than having somewhat-random behavior.
16558         Don't insert an "a=" action, as that leads to incorrect behavior.
16559         (mode_compile, mode_create_from_ref): Return NULL on error instead
16560         of an enum, since now there's only one way to have an error.  All
16561         callers changed.
16562         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
16563         at the correct time.  Simplify calculation of "+u" and its ilk.
16564         Don't mishandle "+X".
16565         (mode_free): Remove "register" and localize decls.
16566         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
16567         (struct mode_change): Move to modechange.c; callers don't
16568         need to see this stuff.
16569         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
16570         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
16571         (mode_change, mode_adjust): Reflect the new signatures noted above.
16572         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
16573         that might redefine system include files.
16574         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
16575         (my_usleep): Use NULL rather than (void *) 0.
16576         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
16577         Use siginterrupt to specify that system calls should be interrupted.
16578         (rpl_nanosleep): Move initialization of suspended closer to call of
16579         my_usleep.
16580         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
16581         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
16582         (desirable_utmp_entry): New function.
16583         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
16584         using x2nrealloc, to simplify logic.
16585         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
16586         size calculation.  Do not assume utmp file is a regular file.
16587         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
16588         (READ_UTMP_CHECK_PIDS): New constant.
16589         * lib/save-cwd.c: Include unistd-safer.h.
16590         (save_cwd): Use fd_safer.
16591         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
16592         [!_LIBC] Include "stat-macros.h" instead.
16593         * lib/unistd-safer.h (fd_safer): New decl.
16594
16595 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16596
16597         * modules/getloadavg (Depends-on): Add unistd-safer.
16598         * modules/getusershell (Depends-on): Add stdio-safer.
16599         * modules/lstat (Depends-on): Remove xalloc.
16600         * modules/mkstemp (Depends-on): Add stat-macros.
16601         * modules/modechange (Depends-on): Remove xstrtol.
16602         Add stat-macros, xalloc.
16603         * modules/save-cwd (Depends-on): Add unistd-safer.
16604         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
16605         * modules/unistd-safer (Files): Add lib/fd-safer.c
16606         (Makefile.am): Remove lib_SOURCES.
16607
16608         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
16609         Remove fcntl-safer; unistd-safer supersedes it.
16610
16611 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16612
16613         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
16614         AC_HEADER_STAT.
16615         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
16616         (gl_PREREQ_CHOWN): Remove.
16617         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
16618         it.  Don't require AC_HEADER_STAT.
16619         (gl_PREREQ_LSTAT): Remove.
16620         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
16621         Don't require AC_HEADER_STAT.
16622         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
16623         (gl_PREREQ_RMDIR): Remove.
16624         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
16625         mention stat-macros.h or AC_HEADER_STAT, since we'll make
16626         the stat-macros module a prerequisite.
16627         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
16628         * m4/filemode.m4 (gl_FILEMODE): Likewise.
16629         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
16630         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
16631         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
16632         variable names.
16633         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
16634         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
16635         variable prefixes.
16636         * m4/fcntl-safer.m4: Remove.
16637         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
16638         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
16639         Invoke gl_PREREQ_FD_SAFER.
16640         (gl_PREREQ_FD_SAFER): New macro.
16641         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
16642         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
16643         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
16644         Remove duplicate call to AC_LIBOBJ(readutmp).
16645         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
16646
16647         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
16648         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
16649
16650 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16651
16652         * MODULES.html.sh (Misc): Add byteswap.
16653
16654 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16655
16656         * modules/getcwd (Depends-on): Add extensions.
16657         * modules/openat (Depends-on): Likewise.
16658
16659 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16660
16661         * modules/byteswap: New file.
16662
16663 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16664
16665         * m4/byteswap.m4: New file.
16666
16667 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16668
16669         * lib/byteswap_.h: New file.
16670
16671 2005-04-25  Karl Berry  <karl@gnu.org>
16672
16673         * m4/gettext.m4: Update from GNU gettext 0.14.4.
16674
16675 2005-04-25  Albert Chin  <china@thewrittenword.com>
16676
16677         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
16678         Toolkit C bug.
16679
16680 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
16681
16682         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
16683         (func_ln_if_changed) Remove forcibly for no error message
16684         in case file does not exist.
16685
16686 2005-04-19  Simon Josefsson  <jas@extundo.com>
16687
16688         * gnulib-tool (Options): Make --symlink mean --symbolic.
16689
16690 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
16691
16692         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
16693
16694 2005-04-16  Simon Josefsson  <jas@extundo.com>
16695
16696         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
16697
16698 2005-04-15  Simon Josefsson  <jas@extundo.com>
16699
16700         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
16701
16702 2005-04-15  Simon Josefsson  <jas@extundo.com>
16703
16704         * gnulib-tool: Rename --symlink to --symbolic.
16705
16706 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
16707
16708         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
16709         symbolic links to files instead of copying/moving.  Add --aux-dir,
16710         specifying directory relative --dir where auxiliary build tools
16711         are placed.
16712
16713 2005-04-14  Bruno Haible  <bruno@clisp.org>
16714
16715         * modules/allocsa (License): Change to LGPL.
16716         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
16717
16718 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
16719
16720         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
16721         that "UTC +1 second" continues to work.  Problem reported
16722         by Dmitry V. Levin.
16723         (relunit_snumber): New rule.
16724         (relunit): Use it.
16725
16726 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
16727
16728         * lib/getdate.y (universal_time_zone_table): New constant.
16729         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
16730         universal_time_zone_table.
16731         (lookup_zone): Prefer universal_time_zone_table to
16732         local_time_zone_table, so that "GMT" time stamps are allowed in
16733         London during the summer.  Problem reported by Ian Abbott.
16734
16735 2005-04-12  Jim Meyering  <jim@meyering.net>
16736
16737         * lib/human.c (humblock): Set *options even when returning due to
16738         xstrtoumax conversion failure.  Thanks to a used-uninitialized
16739         warning from gcc-4.
16740
16741 2005-04-09  Jim Meyering  <jim@meyering.net>
16742
16743         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
16744         -Wuninitialized: initialize tm0.tm_year.
16745
16746 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
16747
16748         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
16749         count, since there's no maximum.  All uses changed.
16750         Add member dsts_seen.
16751         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
16752         not being INT_MAX.
16753         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
16754         Use pc_rels_seen to decide whther a date is absolute.
16755
16756         * lib/getdate.y (number): Don't overwrite year.
16757         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
16758         check.
16759
16760 2005-04-02  Simon Josefsson  <jas@extundo.com>
16761
16762         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
16763         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
16764
16765 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
16766
16767         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
16768         where no absolute path name can be longer than PATH_MAX.
16769
16770 2005-03-27  Jim Meyering  <jim@meyering.net>
16771
16772         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
16773
16774 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
16775
16776         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
16777         "one's complement" -> "ones' complement" in comment, as per Knuth.
16778         "value of type" -> "type or expression" in comment.
16779         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
16780
16781 2005-03-26  Jim Meyering  <jim@meyering.net>
16782
16783         Comment nits.
16784         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
16785         Correct typos: s/or/of/.
16786
16787 2005-03-26  Jim Meyering  <jim@meyering.net>
16788
16789         * modules/check-include-files: Move to ../ and rename to...
16790         * check-module: ...this.
16791
16792 2005-03-25  Jim Meyering  <jim@meyering.net>
16793
16794         * modules/xvasprintf (Files): Add xalloc.h.
16795
16796 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
16797
16798         * modules/gettext (Files): config/config.rpath ->
16799         build-aux/config.rpath
16800         * modules/iconv (Files): Likewise.
16801         Problem reported by Oskar Liljeblad.
16802
16803 2005-03-23  Jim Meyering  <jim@meyering.net>
16804
16805         * modules/check-include-files: New script to check for
16806         missing dependencies, multiple includes, etc.
16807
16808         * modules/c-strtold (Depends-on): Add xalloc.
16809         * modules/c-strtod (Depends-on): Add xalloc.
16810         * modules/hash (Depends-on): Add xalloc.
16811         (Files): Remove lib/xalloc.h.
16812
16813         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
16814         * modules/userspec (Files): Add lib/inttostr.h.
16815
16816 2005-03-23  Jim Meyering  <jim@meyering.net>
16817
16818         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
16819
16820 2005-03-22  Jim Meyering  <jim@meyering.net>
16821
16822         * modules/stat-macros: New module.
16823         * modules/canonicalize, modules/euidaccess, modules/file-type,
16824         * modules/filemode, modules/lchown, modules/makepath,
16825         * modules/rmdir, modules/stat: Depend on new stat-macros module
16826         rather than listing lib/stat-macros.h manually.
16827         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
16828
16829 2005-03-22  Jim Meyering  <jim@meyering.net>
16830
16831         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
16832
16833 2005-03-22  Bruno Haible  <bruno@clisp.org>
16834
16835         * config/srclist.txt: Replace target directory 'config' with
16836         'build-aux'.
16837         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
16838         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
16839         ../build-aux/.
16840
16841 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
16842
16843         * modules/chdir-long (Depends-on): Add mempcpy.
16844
16845         * modules/acl, modules/backupfile, modules/c-strtod,
16846         modules/c-strtold, modules/canon-host, modules/canonicalize,
16847         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
16848         modules/exclude, modules/exitfail, modules/file-type,
16849         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
16850         modules/getdate, modules/getline, modules/getpagesize,
16851         modules/getpass, modules/getugroups, modules/group-member,
16852         modules/hard-locale, modules/hash, modules/human, modules/idcache,
16853         modules/inttostr, modules/long-options, modules/makepath,
16854         modules/md5, modules/memcasecmp, modules/memcoll,
16855         modules/modechange, modules/mountlist, modules/path-concat,
16856         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
16857         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
16858         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
16859         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
16860         modules/strftime, modules/strndup, modules/strverscmp,
16861         modules/timespec, modules/unlocked-io, modules/userspec,
16862         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
16863         modules/yesno:
16864         Remove lib_SOURCES line from Makefile.am section, as this is now
16865         done automatically by the corresponding Autoconf macro.
16866
16867 2005-03-21  Jim Meyering  <jim@meyering.net>
16868
16869         Changes imported from coreutils.
16870
16871         * lib/cycle-check.c: Don't include xalloc.h.
16872
16873         * lib/path-concat.c: Don't include assert.h.
16874         (path_concat): Remove assertion that would have triggered
16875         for ABASE starting with more than one slash.
16876         Reported by Andreas Schwab.
16877
16878         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
16879         properly when ABASE is an absolute file name.
16880         Correct the description of this function.
16881         Include <assert.h>.
16882         Add an assertion and a test driver.
16883         This fixes a bug introduced on 2004-07-02.
16884         Andreas Schwab reported the resulting failure of cp --parents:
16885         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
16886
16887 2005-03-21  Jim Meyering  <jim@meyering.net>
16888
16889         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
16890         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
16891
16892 2005-03-21  Jim Meyering  <jim@meyering.net>
16893         and  Paul Eggert  <eggert@cs.ucla.edu>
16894
16895         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
16896         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
16897         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
16898         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
16899         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
16900         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
16901         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
16902         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
16903         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
16904         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
16905         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
16906         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
16907         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
16908         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
16909         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
16910         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
16911         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
16912         for these modules.
16913
16914 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
16915
16916         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
16917         (which shouldn't happen), generate nothing instead of returning 0
16918         immediately, so that nstrftime (NULL, ...) doesn't return 0.
16919
16920 2005-03-16  Bruno Haible  <bruno@clisp.org>
16921
16922         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
16923         HAVE_LONGLONG_64BIT.
16924
16925 2005-03-16  Bruno Haible  <bruno@clisp.org>
16926
16927         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
16928         HAVE_LONGLONG_64BIT.
16929
16930 2005-03-16  Bruno Haible  <bruno@clisp.org>
16931
16932         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
16933         HAVE_LONGLONG_64BIT.
16934
16935 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
16936
16937         * lib/strftime.c (my_strftime): Prepend space to format so that we can
16938         reliably distinguish strftime failure from empty output on POSIX
16939         hosts.
16940
16941 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
16942
16943         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
16944         (iconv_string): Don't guess a size-zero buffer, as that might cause
16945         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
16946         result would be 'too large', where 'too large' is (heuristically)
16947         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
16948         overflow concerns.  This will prevent some unwanted malloc failures
16949         when the inputs are very large.
16950
16951 2005-03-15  Karl Berry  <karl@gnu.org>
16952
16953         * config/srclist.txt (config.rpath): from gettext.
16954         * config/config.rpath: update.
16955
16956 2005-03-15  Bruno Haible  <bruno@clisp.org>
16957
16958         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
16959         to 'negate'.
16960
16961         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
16962         variable.
16963
16964         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
16965         results.
16966
16967 2005-03-14  Simon Josefsson  <jas@extundo.com>
16968
16969         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
16970         <fx@gnu.org>.
16971
16972 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
16973
16974         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
16975         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
16976         intprops.h.
16977         * lib/strtol.c: Likewise.
16978
16979 2005-03-14  Jim Meyering  <jim@meyering.net>
16980
16981         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
16982         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
16983         to be nonzero so that we (and caller) can detect the difference
16984         between a valid zero-length expansion and an error return, even
16985         when the underlying strftime fails before writing anything into
16986         that location.
16987
16988 2005-03-14  Bruno Haible  <bruno@clisp.org>
16989
16990         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
16991         Update from GNU gettext 0.14.3.
16992
16993 2005-03-10  Jim Meyering  <jim@meyering.net>
16994
16995         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
16996
16997 2005-03-10  Jim Meyering  <jim@meyering.net>
16998
16999         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
17000         so that this module works on systems without fchdir.
17001
17002 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
17003
17004         Factor int-properties macros into a single file, except for
17005         glibc-related files.
17006         * lib/intprops.h: New file.
17007         * lib/getloadavg.c: Include it instead of limits.h.
17008         (INT_STRLEN_BOUND): Remove.
17009         * lib/human.c: Include intprops.h.
17010         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
17011         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
17012         302/1000.
17013         * lib/inttostr.h: Include intprops.h instead of limits.h.
17014         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
17015         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
17016         for consistency with intprops.h.
17017         (time_t_is_integer, twos_complement_arithmetic): Use them.
17018         * lib/sig2str.h: Include <signal.h>, intprops.h.
17019         (INT_STRLEN_BOUND): Remove.
17020         * lib/strftime.c (TYPE_SIGNED): Remove.
17021         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
17022         * lib/strtol.c: Adjust comments to match intprops.h.
17023         * lib/userspec.c: Include intprops.h.
17024         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
17025         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
17026         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
17027         instead of rolling our own expressions.
17028         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
17029
17030         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
17031         instead of int.
17032         (my_strftime): Do not mishandle years close to INT_MAX, by doing
17033         the right thing even if adding 1900 would overflow.  Similarly
17034         for tm_mon + 1 and tm_yday + 1.
17035         Make %Y always equivalent to %C%y, and similarly for %G and %g.
17036         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
17037         (DO_SIGNED_NUMBER): New macro.
17038         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
17039
17040 2005-03-07  Bruno Haible  <bruno@clisp.org>
17041
17042         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
17043
17044 2005-03-07  Bruno Haible  <bruno@clisp.org>
17045
17046         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
17047
17048 2005-03-04  Derek R. Price  <derek@ximbiot.com>
17049
17050         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
17051         (func_import): Only replace files via --import when they have actually
17052         changed.
17053
17054 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17055
17056         * m4/mmap-anon.m4: New file.
17057         * m4/pagealign_alloc.m4: New file.
17058
17059 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17060             Bruno Haible  <bruno@clisp.org>
17061
17062         * modules/pagealign_alloc: New file.
17063         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
17064
17065 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17066             Bruno Haible  <bruno@clisp.org>
17067
17068         * lib/pagealign_alloc.h: New file.
17069         * lib/pagealign_alloc.c: New file.
17070
17071 2005-03-03  Bruno Haible  <bruno@clisp.org>
17072
17073         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
17074         Use an all-permissive copyright notice, recommended by RMS.
17075
17076 2005-03-02  Bruno Haible  <bruno@clisp.org>
17077
17078         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
17079         of AIX, the replacement has to be done only after <string.h> is
17080         included, therefore not in config.h. stpncpy.h does the replacement,
17081         and stpncpy.c uses it.
17082
17083 2005-03-02  Bruno Haible  <bruno@clisp.org>
17084
17085         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
17086         stpncpy.c uses it.
17087
17088 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17089
17090         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
17091         The workaround isn't strictly needed for POSIX conformance, and
17092         it's too much of a pain to configure and maintain.  We'll ask
17093         people to fix their kernels instead.
17094         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
17095         (NANOSLEEP_BUG_WORKAROUND): Remove.
17096         (xnanosleep): Remove the workaround.
17097
17098 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17099
17100         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
17101         Reported by Derek Price.
17102         (Include): Add "timespec.h".
17103
17104         * modules/xnanosleep (Depends-on): Remove gethrxtime.
17105
17106 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17107
17108         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
17109         to detect nanosleep bug.
17110
17111 2005-03-01  Bruno Haible  <bruno@clisp.org>
17112
17113         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
17114
17115 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
17116
17117         * modules/gethrxtime: New file.
17118         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
17119         (Depends-on): Add gethrxtime.
17120         (configure.ac): Add gl_XNANOSLEEP.
17121         (Makefile.am): Remove lib_SOURCES line.
17122
17123 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
17124
17125         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
17126         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
17127
17128 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
17129
17130         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
17131         * lib/timespec.h (gettime): Return void, since it always
17132         succeeds now.  All uses changed.
17133         * lib/gettime.c (gettime) Likewise.
17134         [HAVE_NANOTIME]: Prefer nanotime.
17135         Assume gettimeofday succeeds, as POSIX requires.
17136         Assime time () succeeds, since other code already does.
17137         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
17138         (timespec_subtract): Remove.
17139         (NANOSLEEP_BUG_WORKAROUND): New constant.
17140         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
17141         things considerably.  Use it only on GNU/Linux hosts, since the
17142         workaround shouldn't be needed elsewhere.
17143
17144 2005-02-24  Bruno Haible  <bruno@clisp.org>
17145
17146         * modules/gettext (Files): Add m4/glibc2.m4.
17147
17148 2005-02-24  Bruno Haible  <bruno@clisp.org>
17149
17150         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
17151         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
17152         * m4/progtest.m4:
17153         Update from GNU gettext 0.14.2.
17154         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
17155
17156 2005-02-24  Bruno Haible  <bruno@clisp.org>
17157
17158         * lib/localcharset.c: Update from GNU gettext 0.14.2.
17159         * lib/config.charset: Update from GNU gettext 0.14.2.
17160
17161 2005-02-24  Bruno Haible  <bruno@clisp.org>
17162
17163         * lib/gettext.h: Update from GNU gettext 0.14.2.
17164
17165 2005-02-23  Simon Josefsson  <jas@extundo.com>
17166
17167         * m4/iconvme.m4: New file.
17168
17169 2005-02-23  Jim Meyering  <jim@meyering.net>
17170
17171         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
17172         change.
17173         Thanks to Bruno Haible for catching it.
17174
17175 2005-02-22  Simon Josefsson  <jas@extundo.com>
17176
17177         * modules/iconvme: New file.
17178
17179         * MODULES.html.sh: Add iconvme.
17180
17181 2005-02-22  Simon Josefsson  <jas@extundo.com>
17182
17183         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
17184
17185 2005-02-22  Simon Josefsson  <jas@extundo.com>
17186
17187         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
17188
17189 2005-02-22  Jim Meyering  <jim@meyering.net>
17190
17191         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
17192         s/ifndef/ifdef/.
17193
17194 2005-02-20  Neil Conway  <neilc@samurai.com>
17195
17196         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
17197         returned by OSX/Darwin if the specified buffer is not large
17198         enough for the hostname.
17199
17200 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17201
17202         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
17203         pass it to _help, otherwise the latter coredumps trying to
17204         dereference state.root_argp.
17205
17206 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17207
17208         * modules/chdir-long (Depends-on): Add memrchr.
17209         * modules/memrchr (Files): Add lib/memrchr.h.
17210         (Include): "memrchr.h".
17211
17212 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17213
17214         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
17215
17216 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17217
17218         * lib/memrchr.h: New file.
17219         * lib/chdir-long.c: Include it.
17220         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
17221         Don't bother including stddef.h.
17222
17223 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
17224
17225         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
17226         inclusion.
17227         Include <sys/types.h>, for dev_t.
17228         (ME_DUMMY, ME_REMOTE): Move from here....
17229         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
17230         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
17231         Dmitry V. Levin.
17232         Include mountlist.h first, to test the interface.
17233
17234 2005-01-29  Bruno Haible  <bruno@clisp.org>
17235
17236         * lib/progname.c (program_name): Initialize.
17237         Needed when linking statically on MacOS X.
17238
17239 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
17240
17241         Sync from coreutils.
17242         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
17243         (Depends-on): Add c-strtod.
17244         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
17245
17246 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
17247
17248         Sync from coreutils.
17249         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
17250
17251         Remove files that are specific to coreutils.
17252         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
17253
17254 2005-01-28  Bruno Haible  <bruno@clisp.org>
17255
17256         * modules/javacomp: New file.
17257         * MODULES.html.sh (Java): Add javacomp.
17258
17259 2005-01-28  Bruno Haible  <bruno@clisp.org>
17260
17261         * m4/javacomp.m4: New file, from GNU gettext.
17262
17263 2005-01-28  Bruno Haible  <bruno@clisp.org>
17264
17265         * lib/javacomp.sh.in: New file, from GNU gettext.
17266         * lib/javacomp.h: New file, from GNU gettext.
17267         * lib/javacomp.c: New file, from GNU gettext.
17268
17269 2005-01-26  Simon Josefsson  <jas@extundo.com>
17270
17271         * lib/gai_strerror.c: Use GPL in header.
17272
17273 2005-01-26  Bruno Haible  <bruno@clisp.org>
17274
17275         * modules/javaexec: New file.
17276         * MODULES.html.sh (Java): Add javaexec.
17277
17278 2005-01-26  Bruno Haible  <bruno@clisp.org>
17279
17280         * m4/javaexec.m4: New file, from GNU gettext.
17281
17282 2005-01-26  Bruno Haible  <bruno@clisp.org>
17283
17284         * lib/javaexec.sh.in: New file, from GNU gettext.
17285         * lib/javaexec.h: New file, from GNU gettext.
17286         * lib/javaexec.c: New file, from GNU gettext.
17287
17288 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17289
17290         * modules/lchown (Depends-on): Remove lchown.h
17291
17292 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17293
17294         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
17295         must be defined if the header file was not found, in order
17296         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
17297
17298 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17299
17300         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
17301         initializers for struct pentry_state.
17302         (__argp_error): Check return value of __asprintf
17303         (__argp_failure): Translate error message
17304
17305         * lib/argp-parse.c: Removed braces around the expansion of N_()
17306
17307 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
17308
17309         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
17310         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
17311         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
17312         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
17313         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
17314         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
17315         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
17316         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
17317         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
17318         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
17319         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
17320         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
17321         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
17322         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
17323         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
17324         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
17325         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
17326         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
17327         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
17328         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
17329         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
17330         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
17331         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
17332         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
17333         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
17334         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
17335         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
17336         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
17337         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
17338         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
17339         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
17340         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
17341         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
17342         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
17343         xstrtol.m4, xstrtoumax.m4, yesno.m4:
17344         Use an all-permissive copyright notice, recommended by RMS.
17345
17346 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
17347
17348         * modules/chdir-long (Depends-on): Remove mempcpy.
17349
17350 2005-01-21  Jim Meyering  <jim@meyering.net>
17351
17352         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
17353         same value as for Solaris 9.
17354
17355         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
17356         component length.  This included changing the parameter to be
17357         of type `char *' rather than `char const *'.
17358         * lib/chdir-long.h (chdir_long): Update prototype.
17359
17360         * lib/openat.c (fdopendir, fstatat): New functions.
17361         * lib/openat.h: Include headers required for use of DIR and struct
17362         stat.
17363         [AT_SYMLINK_NOFOLLOW]: Define.
17364         (fdopendir, fstatat): Add prototypes.
17365
17366 2005-01-21  Bruno Haible  <bruno@clisp.org>
17367
17368         * modules/classpath: New file.
17369         * MODULES.html.sh (Java): Add classpath.
17370
17371 2005-01-21  Bruno Haible  <bruno@clisp.org>
17372
17373         * lib/classpath.h: New file, from GNU gettext.
17374         * lib/classpath.c: New file, from GNU gettext.
17375
17376 2005-01-20  Simon Josefsson  <jas@extundo.com>
17377
17378         * modules/version-etc-fsf: New file.
17379
17380 2005-01-20  Simon Josefsson  <jas@extundo.com>
17381
17382         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
17383         * lib/version-etc.c: Remove version_etc_copyright.
17384         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
17385         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
17386
17387 2005-01-20  Simon Josefsson  <jas@extundo.com>
17388
17389         * lib/base64.h (isbase64): Add.
17390
17391         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
17392         using a unsigned prototype, don't inline.
17393         (base64_decode): Use it.
17394
17395 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17396
17397         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
17398         it.
17399
17400 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17401
17402         * lib/save-cwd.c (save_cwd): Remove code to support the case
17403         where fchdir is missing or flaky.
17404
17405 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17406
17407         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
17408
17409 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
17410
17411         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
17412         AC_LIBSOURCES now does this.
17413         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
17414         with new ullong_max module.
17415
17416 2005-01-19  Bruno Haible  <bruno@clisp.org>
17417
17418         * modules/sh-quote: New file.
17419         * MODULES.html.sh (Executing programs): Add sh-quote.
17420
17421 2005-01-19  Bruno Haible  <bruno@clisp.org>
17422
17423         * lib/sh-quote.h: New file, from GNU gettext.
17424         * lib/sh-quote.c: New file, from GNU gettext.
17425
17426 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17427
17428         Merge from coreutils.
17429         * m4/ullong_max.m4: New file.
17430         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
17431         (gl_MACROS): Assume localeconv exists.
17432
17433 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17434
17435         Merge changes from coreutils, as described below in several
17436         changelogs dated today.
17437
17438         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
17439         (O_DIRECTORY): Remove; not needed here, since "." must be
17440         a directory.  All uses removed.
17441         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
17442         universal on Suns, and we also need to test for IRIX.
17443         Revamp code to use 'if' rather than '#if'.
17444         Avoid unnecessary comparison of cwd->desc to 0.
17445
17446         * lib/utimens.c (futimens): Robustify the previous patch, by checking
17447         for known valid error numbers rather than observed invalid ones.
17448
17449 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17450
17451         * modules/ullong_max: New file.
17452
17453         * modules/chdir-long, modules/openat: New files.
17454         * modules/save-cwd (Depends-on): Depend on chdir-long.
17455         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
17456
17457 2005-01-18  Jim Meyering  <jim@meyering.net>
17458
17459         Merge from coreutils.
17460         * m4/chdir-long.m4, m4/openat.m4: New files.
17461         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
17462         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
17463         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
17464         is sane and DOES follow symlinks.  Besides, testing 20 different
17465         systems found no broken chown implementations.
17466         Prompted by a change in rsync's copy of this macro.
17467         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
17468
17469         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
17470
17471         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
17472         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
17473         NULL-means-set-to-current-time semantics.
17474         Remove temporary file immediately, rather than waiting
17475         for configure's at-exit trap code to do it.
17476
17477 2005-01-18  Jim Meyering  <jim@meyering.net>
17478
17479         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17480
17481         * lib/utimens.c (futimens): Account for the fact that futimes
17482         can also fail with errno == ENOSYS or errno == ENOENT.
17483         Patch from Dmitry V. Levin.
17484
17485         Change the name of the robust chdir function from chdir to chdir_long.
17486         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
17487         (restore_cwd): Use chdir_long, not chdir.
17488         * lib/chdir-long.c: Renamed from chdir.c.
17489         * lib/chdir-long.h: Renamed from chdir.h.
17490         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
17491         Hurd.
17492
17493 2005-01-18  Bruno Haible  <bruno@clisp.org>
17494
17495         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
17496         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
17497         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
17498         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
17499         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
17500         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
17501         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
17502         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
17503         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
17504         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
17505         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
17506         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
17507         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
17508         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
17509         Use an all-permissive copyright notice, recommended by RMS.
17510
17511 2005-01-18  Bob Proulx  <bob@proulx.com>
17512
17513         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
17514         simplify offsetof() macro construct to avoid compile failure with
17515         native HP-UX 11.0 ANSI C compiler.
17516
17517 2005-01-17  Bruno Haible  <bruno@clisp.org>
17518
17519         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
17520         redundant because stpncpy.m4 takes care of it.
17521
17522 2005-01-17  Bruno Haible  <bruno@clisp.org>
17523
17524         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
17525
17526 2005-01-17  Bruno Haible  <bruno@clisp.org>
17527
17528         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
17529         used.
17530
17531 2005-01-17  Bruno Haible  <bruno@clisp.org>
17532
17533         * lib/fwriteerror.h (fwriteerror): Change specification to include
17534         fclose.
17535         * lib/fwriteerror.c: Include <stdbool.h>.
17536         (fwriteerror): At the end, close the file stream. Record whether
17537         stdout was already closed.
17538
17539 2005-01-17  Bruno Haible  <bruno@clisp.org>
17540
17541         * lib/execute.c (environ): Declare if needed.
17542         * lib/pipe.c (environ): Likewise.
17543         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
17544
17545 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17546
17547         * modules/argp: Depend on vsnprintf
17548
17549 2005-01-10  Jim Meyering  <jim@meyering.net>
17550
17551         * modules/closeout (Depends-on): Add atexit.
17552
17553 2005-01-06  Bruno Haible  <bruno@clisp.org>
17554
17555         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
17556
17557 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
17558
17559         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
17560         definitions to be after all include files, to avoid collisions.
17561         Problem reported by Bob Proulx.
17562
17563 2005-01-04  Jim Meyering  <jim@meyering.net>
17564
17565         Changes imported from coreutils.
17566         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
17567         as the mkstemp template, use a temporary directory and an
17568         8.3-friendly template to avoid trouble on systems like DJGPP.
17569         Reported by Juan M. Guerrero via Stepan Kasal.
17570         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
17571         close. Remove the temporary directory right away, rather than waiting
17572         for configure's at-exit trap code to do it.
17573         Suggestion from Stepan Kasal.
17574
17575 2005-01-01  Simon Josefsson  <jas@extundo.com>
17576
17577         * gnulib-tool: Print #include directives when --import'ing.
17578
17579 2004-12-28  Simon Josefsson  <jas@extundo.com>
17580
17581         * tests/test-base64.c: Include required header files.  Remove
17582         unused variables.
17583
17584 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
17585
17586         * modules/error (Depends-on): Remove gettext.
17587
17588 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
17589
17590         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
17591         not needed.  This removes a dependency on the gettext module.
17592         [defined _LIBC]: Do not include <libintl.h>; not needed.
17593
17594 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
17595
17596         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
17597         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
17598
17599 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
17600
17601         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
17602         HAVE_DECL_STRTOLD.
17603
17604 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17605
17606         * modules/getdate (Depends-on): Remove alloca-opt.
17607
17608 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17609
17610         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
17611
17612 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17613
17614         * lib/argp-parse.c: Include <stddef.h>.
17615         (alignof, alignto): New macros.
17616         (parser_init): Don't assume that void * is aligned sufficiently
17617         for struct option.
17618
17619         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
17620         need to extend the stack.
17621         (YYINITDEPTH): New macro, so that the initial stack isn't overly
17622         large.
17623
17624 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17625
17626         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
17627
17628 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
17629
17630         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
17631         (2004-10-24) change.  Apparently this was a false alarm.
17632
17633         * modules/getdate: Depend on alloca-opt, not alloca.
17634
17635 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
17636
17637         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
17638         Remove now-obsolete comment about AIX.
17639         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
17640         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
17641         (YYMAXDEPTH): New macro.
17642
17643 2004-12-18  Simon Josefsson  <jas@extundo.com>
17644
17645         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
17646
17647 2004-12-18  Bruno Haible  <bruno@clisp.org>
17648
17649         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
17650
17651 2004-12-18  Bruno Haible  <bruno@clisp.org>
17652
17653         * lib/fatal-signal.c (fatal_signals): Make non-const.
17654         (init_fatal_signals): New function.
17655         (uninstall_handlers, install_handlers): Ignore signals that were set to
17656         SIG_IGN.
17657         (at_fatal_signal): Call init_fatal_signals.
17658         (init_fatal_signal_set): Likewise. Ignore signals that were set to
17659         SIG_IGN.
17660         Reported by Paul Eggert.
17661
17662 2004-12-18  Bruno Haible  <bruno@clisp.org>
17663
17664         * doc/alloca.texi: New file.
17665         * doc/alloca-opt.texi: New file.
17666
17667 2004-12-17  Jim Meyering  <jim@meyering.net>
17668
17669         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
17670         Otherwise, install-sh could exit with improper exit status when
17671         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
17672
17673 2004-12-16  Simon Josefsson  <jas@extundo.com>
17674
17675         * tests/test-base64.c: Add license.
17676
17677 2004-12-15  Stepan Kasal  <address@hidden>
17678
17679         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
17680
17681 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
17682
17683         * modules/getcwd (Files): Add m4/d-ino.m4.
17684         Suggested by Mark D. Baushke.
17685
17686 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
17687
17688         * lib/getdate.y (textint): New member "negative".
17689         (time_zone_hhmm): New function.
17690         Expect 14 shift-reduce conflicts, not 13.
17691         (o_colon_minutes): New rule.
17692         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
17693         (yylex): Set the "negative" member of signed numbers.
17694
17695 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
17696
17697         * doc/getdate.texi (Time of day items, Time zone items):
17698         Describe new formats +00:00, UTC+00:00.
17699
17700 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
17701
17702         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
17703         spurious "-l"s.  Problem reported by Stepan Kasal.
17704
17705 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
17706
17707         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
17708         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
17709
17710 2004-12-04  Simon Josefsson  <jas@extundo.com>
17711
17712         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
17713         Vandoorselaere <yoann@prelude-ids.org>.
17714
17715 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17716
17717         Changes imported from coreutils.
17718         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
17719         exist.
17720         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
17721
17722 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17723
17724         Changes imported from coreutils.
17725         * lib/hard-locale.c: Assume <locale.h> exists.
17726         Include "strdup.h".
17727         (GLIBC_VERSION): New macro.
17728         (hard_locale): Assume setlocale exists.
17729         Rewrite to avoid #ifdef.
17730         Use strdup rather than malloc + strcpy.
17731         * lib/human.c: Assume <locale.h> exists.
17732         (human_readable): Assume localeconv exists.
17733
17734 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17735
17736         * modules/hard-locale (Depends-on): Add strdup.
17737
17738 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
17739
17740         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
17741         convert T2, not T.  (Imported from libc.)
17742
17743 2004-11-30  Simon Josefsson  <jas@extundo.com>
17744
17745         * modules/restrict (License): Change to LGPL.
17746
17747 2004-11-30  Simon Josefsson  <jas@extundo.com>
17748
17749         * m4/restrict.m4: Add copyright and copying conditions.
17750
17751 2004-11-30  Simon Josefsson  <jas@extundo.com>
17752
17753         * m4/base64.m4: New file.
17754
17755 2004-11-30  Simon Josefsson  <jas@extundo.com>
17756
17757         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
17758         base64.
17759
17760         * tests/test-base64.c: New file.
17761
17762         * modules/base64: New file.
17763
17764 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
17765
17766         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
17767         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
17768
17769         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
17770
17771 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
17772
17773         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
17774         (__getcwd.c): Don't restore errno; glibc doesn't.
17775         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
17776         first, falling back to our code only if its results look suspicious.
17777         Ensure that the resulting buffer is only as large as necessary.
17778
17779         * lib/readutmp.c: Include readutmp.h first.
17780         Include <errno.h>, since readutmp.h no longer does that.
17781         * lib/readutmp.h: Don't include <errno.h>,
17782         <sys/param.h>, <time.h>; not needed to establish interface.
17783         (errno): Remove decl.
17784         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
17785         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
17786         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
17787
17788 2004-11-28  Simon Josefsson  <jas@extundo.com>
17789
17790         * lib/base64.h, base64.c: New file.
17791
17792 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
17793
17794         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
17795
17796 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
17797
17798         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
17799         (Depends-on): Remove pathmax, same.  Add mempcpy.
17800         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
17801         (Makefile.am): Append getcwd.h to lib_SOURCES.
17802         (Include): Add getcwd.h.
17803         (Maintainer): Change from Jim Meyering to "all, glibc",
17804         since getdate now uses intended-for-glibc code.
17805         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
17806         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
17807
17808 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
17809
17810         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
17811         HP's ANSI C compiler.
17812         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
17813         Declaring int functions causes warnings on some modern systems and
17814         shouldn't be needed to compile on ancient ones.
17815         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
17816         defined.
17817
17818         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
17819         with the following changes.
17820         (__set_errno): Parenthesize properly.
17821         Include <stdbool.h>.
17822         (MIN, MAX, MATCHING_INO): New macros.
17823         (__getcwd): Define with prototype, not K&R form.
17824         Use heuristics to allocate default buffer on stack if possible.
17825         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
17826         behavior, and to avoid the PATH_MAX limit when computing
17827         ../../../../...
17828         Use MATCHING_INO to compare inode number to file.
17829         Check for arithmetic overflow in size calculations.
17830         Fix bug in reallocation of dot array that caused getcwd to fail
17831         on directories nested deeper than 75.
17832         Be more careful about saving errno on error.
17833         Do not use realloc; use only free+malloc, as this is a bit
17834         more flexible and avoids a needless copy operation.
17835         Do not inspect st_dev and st_ino for symbolic links; POSIX
17836         doesn't specify the latter.
17837         Check for closedir errors.
17838         Avoid needless casts.
17839         Use "#ifdef weak_alias" around weak_alias, to be like other
17840         glibc code.
17841         The following changes to getcwd.c have effect only when used in
17842         gnulib; they have no effect inside glibc proper.
17843         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
17844         as alloca isn't used.
17845         (alloca, __alloca): Likewise.
17846         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
17847         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17848         unconditionally, as gnulib assumes C89 or better.
17849         Do not include <sys/param.h>.
17850         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
17851         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
17852         better.
17853         (NULL) [!defined NULL]: Remove; we assume C89 or better.
17854         Include <dirent.h> in a way that is compatible with modern Autoconf.
17855         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
17856         New macros, if not already defined.
17857         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
17858         Use "_LIBC", not "defined _LIBC", for consistency.
17859         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
17860         a mempcpy module.
17861         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
17862         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
17863         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
17864         credit only to Jim Meyering and adjust the copyright dates.
17865         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
17866         <stdlib.h>, <unistd.h>, "pathmax.h".
17867         Instead, include "xgetcwd.h" (first) and "getcwd.h".
17868         (INITIAL_BUFFER_SIZE): Remove.
17869         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
17870
17871 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
17872
17873         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
17874         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
17875         Use the _ONCE methods, for efficiency.
17876         Check for fcntl.h.  In test program, include <errno.h>
17877         and <fcntl.h> if available.  Remove old K&R cruft from
17878         test program.  Check for common errors in GNU/Linux,
17879         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
17880         don't do AC_LIBOBJ, as that's getcwd.m4's job.
17881         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
17882         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
17883         name accordingly.
17884         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
17885         accommodate new getcwd.c.
17886         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
17887         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
17888         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
17889         that's all we need now.
17890
17891 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17892
17893         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
17894         argp-parse.c depends on getopt internals, that means we should
17895         always use our getopt, to be on the safe side.
17896         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
17897         order not to spoil the result of an eventual previous invocation
17898         of gl_GETOPT_SUBSTITUTE.
17899
17900 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17901
17902         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
17903         redefinition warnings. To avoid them, include the defines
17904         in `#if !defined __need_getopt ... #endif'. The only place
17905         where __getopt_argv_const is used is in definitions
17906         of getopt_long and getopt_long_only below, which are as well
17907         protected by `#ifndef __need_getopt'.
17908         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
17909         __need_getopt after including <stdio.h> and <unistd.h> These
17910         headers might have defined it.
17911
17912 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
17913
17914         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
17915
17916 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
17917
17918         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
17919         (futimens): New function, which uses futimes if available.
17920         (futimens, utimens): Support timespec==NULL, with same semantics
17921         as utime and utimens.
17922         * lib/utimens.h (futimens): New decl.
17923
17924 2004-11-23  Jim Meyering  <jim@meyering.net>
17925
17926         * lib/getopt_.h: Remove trailing blanks.
17927
17928 2004-11-23  Jim Meyering  <jim@meyering.net>
17929
17930         * lib/__fpending.c: Add comment.
17931
17932 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
17933
17934         * modules/canonicalize (Depends-on): Add xreadlink.
17935         Problem reported by James Youngman.
17936
17937 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
17938
17939         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
17940         New macros.
17941         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
17942         optopt): Use them instead of invoking ## directly; otherwise, the
17943         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
17944
17945 2004-11-19  Bruno Haible  <bruno@clisp.org>
17946
17947         * lib/strtok_r.c: Move comments from here...
17948         * lib/strtok_r.h: ... to here.
17949
17950 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
17951
17952         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
17953         implementations that mishandle size_t overflow.
17954
17955 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
17956
17957         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
17958         might fail.  Problem reported by Yoann Vandoorselaere.
17959         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
17960         implementations that mishandle size_t overflow.
17961
17962 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17963
17964         * modules/canon-host (Depends-on): Add strdup.
17965
17966 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17967
17968         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
17969
17970 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17971
17972         * lib/canon-host.c: Include "strdup.h".
17973         (canon_host): Use getaddrinfo if available, so that IPv6 works.
17974         Use strdup instead of malloc/strcpy to duplicate strings.
17975
17976         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
17977         (human_space_before_unit): New constant.
17978         * lib/human.c (human_readable): Support it.
17979
17980         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
17981         (xgetcwd): Set errno correctly when failing.
17982         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
17983         the failure is actually due to a PATH_MAX problem.
17984
17985         Further getopt changes to make it more likely that glibc will
17986         buy the changes back.
17987         * lib/getopt.c (POSIXLY_CORRECT): New constant.
17988         (getopt): Use it, so to preserve glibc semantic
17989         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
17990         when compiling for libc.
17991         * lib/getopt_.h (__getopt_argv_const): Bring it back.
17992         (getopt_long, getopt_long_only): Use it.
17993
17994         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
17995         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
17996         (getopt): Argv is now char * const *, as per standard.
17997         (_getopt_internal_r, _getopt_internal): Argv is now char **,
17998         not char *__getopt_argv_const *.
17999         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
18000         _getopt_long_only_r): Likewise.
18001         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
18002         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
18003         _getopt_long_r, _getopt_long_only_r): Likewise.
18004         * lib/getopt_.h (__getopt_argv_const): Remove.
18005         (getopt): Argv is now char * const *, as per standard.
18006
18007         * lib/getdate.y (tORDINAL): New token.
18008         (day, relunit): Allow it for relative times.
18009         (relative_time_table): Use tORDINAL for ordinals.
18010
18011 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18012
18013         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
18014         Document that "second" isn't allowed as an ordinal number.
18015
18016 2004-11-16  Jim Meyering  <jim@meyering.net>
18017
18018         * modules/closeout (Depends-on): Add fpending.
18019
18020 2004-11-15  Jim Meyering  <jim@meyering.net>
18021
18022         * lib/closeout.c: Include "__fpending.h" once again.
18023         Include <stdbool.h>.
18024         (close_stdout): Don't fail just because stdout was closed initially,
18025         since some programs don't write to stdout in the normal course of
18026         operation (other than --version and --help), and we don't want this
18027         function to make e.g. `touch file >&-' fail.
18028         But do fail if it was closed and someone has tried to write to it.
18029         E.g., `printf foo >&-' must fail.
18030
18031 2004-11-13  Jim Meyering  <jim@meyering.net>
18032
18033         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
18034
18035 2004-11-12  Simon Josefsson  <jas@extundo.com>
18036
18037         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
18038         small doc fix is still pending.
18039
18040 2004-11-11  Simon Josefsson  <jas@extundo.com>
18041
18042         * modules/strtok_r: New file.
18043
18044         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18045         strtok_r.
18046
18047 2004-11-11  Simon Josefsson  <jas@extundo.com>
18048
18049         * m4/strtok_r.m4: New file.
18050
18051         * m4/getopt.m4: Replace opterr.
18052
18053 2004-11-11  Simon Josefsson  <jas@extundo.com>
18054
18055         * lib/strtok_r.h, strtok_r.c: New file.
18056
18057 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
18058
18059         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
18060         of replacing opterr, getopt, etc.  This should handle the
18061         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
18062
18063 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
18064
18065         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
18066         we can stop lying to compilers about the constness of argv when we
18067         are compiled outside glibc.
18068         (getopt, getopt_long, getopt_long_only): Use it.
18069         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
18070         _getopt_internal, getopt): Likewise.
18071         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
18072         _getopt_long_only_r): Likewise.
18073         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
18074         _getopt_long_r, _getopt_long_only_r): Likewise.
18075
18076         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
18077         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
18078         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
18079         the other external symbols.
18080         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
18081         declaration, since the above renaming now works around collisions.
18082
18083 2004-11-11  Jim Meyering  <jim@meyering.net>
18084
18085         * lib/linebreak.c: Remove trailing blanks.
18086         * lib/alloca_.h: Likewise.
18087         * lib/acosl.c: Likewise.
18088         * lib/euidaccess.c: Likewise.
18089         * lib/allocsa.h: Likewise.
18090
18091 2004-11-10  Simon Josefsson  <jas@extundo.com>
18092
18093         * m4/getaddrinfo.m4: New file.
18094
18095 2004-11-10  Simon Josefsson  <jas@extundo.com>
18096
18097         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
18098
18099 2004-11-10  Simon Josefsson  <jas@extundo.com>
18100
18101         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18102         getaddrinfo.
18103
18104         * modules/getaddrinfo: New file.
18105
18106 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
18107
18108         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
18109
18110 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
18111
18112         * lib/mktime.c (SHR): New macro, which is a portable
18113         substitute for >> that should work even on Crays.
18114         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
18115         Problem reported by Mark D. Baushke in
18116         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
18117         * lib/getdate.y (SHR): Likewise.
18118         (tm_diff): Use it.
18119         * lib/strftime.c (SHR): Likewise.
18120         (tm_diff): Use it.
18121         * lib/quotearg.c (struct quoting_options): Use unsigned int for
18122         quote_these_too, so that right shifts are well defined.  All uses
18123         changed.
18124
18125 2004-11-10  Jim Meyering  <jim@meyering.net>
18126
18127         Ensure that no close failure goes unreported.
18128         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
18129         return early when it seems there's nothing to flush.
18130         Don't include __fpending.h.
18131
18132 2004-11-10  Jim Meyering  <jim@meyering.net>
18133
18134         * modules/closeout (Depends-on): Remove fpending.
18135
18136 2004-11-10  Jim Meyering  <jim@meyering.net>
18137
18138         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
18139
18140 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
18141
18142         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
18143         gl_FUNC_STRFTIME.
18144         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
18145         and AC_REQUIRE when possible, to avoid duplicate checks.
18146         Check for <wchar.h>.
18147
18148 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
18149
18150         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
18151
18152 2004-11-09  Bruno Haible  <bruno@clisp.org>
18153
18154         * m4/sockpfaf.m4: New file.
18155
18156 2004-11-05  Bruno Haible  <bruno@clisp.org>
18157
18158         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
18159         Reported by Mark D. Baushke <mdb@cvshome.org>.
18160
18161 2004-11-04  Bruno Haible  <bruno@clisp.org>
18162
18163         2004-09-11  Bruno Haible  <bruno@clisp.org>
18164                 * allocsa.valgrind: New file.
18165         2004-02-06  Bruno Haible  <bruno@clisp.org>
18166                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
18167                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
18168                 Reported by Christopher Seip <chris.seip@hp.com>.
18169
18170 2004-11-04  Bruno Haible  <bruno@clisp.org>
18171
18172         * modules/allocsa (Files): Add lib/allocsa.valgrind.
18173         (Makefile.am): Distribute it.
18174
18175 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
18176
18177         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
18178         with errno == ERANGE if the buffer is too small.
18179         Problem reported by Mark D. Baushke.
18180
18181 2004-11-03  Albert Chin  <china@thewrittenword.com>
18182             Paul Eggert  <eggert@cs.ucla.edu>
18183
18184         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
18185         equivalent, substitute $ac_type for equivalent type rather than
18186         blindly using uint32_t *always* which won't work if uint32_t is not
18187         available.  Define _UINT32_T to work around typedef of uint32_t if
18188         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
18189         2.5.1.
18190
18191 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18192
18193         * m4/jm-macros.m4: Sync from coreutils.
18194         (gl_MACROS): Check for mbrlen, for pathchk.
18195         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
18196
18197 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18198
18199         * lib/xreadlink.c (MAXSIZE): New macro.
18200         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
18201         size does not exceed MAXSIZE.  Avoid cast.
18202         As suggested by Mark D. Baushke in
18203         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
18204         if readlink fails with buffer size just under MAXSIZE, try again
18205         with MAXSIZE.
18206
18207 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18208
18209         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
18210
18211 2004-11-02  Derek R. Price  <derek@ximbiot.com>
18212         and  Paul Eggert  <eggert@cs.ucla.edu>
18213
18214         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
18215         (get_date): Overparenthesize to avoid GCC warning.
18216
18217 2004-11-02  Bruno Haible  <bruno@clisp.org>
18218
18219         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
18220         returns void.
18221
18222 2004-11-02  Bruno Haible  <bruno@clisp.org>
18223
18224         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
18225         function returns void.
18226
18227 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
18228
18229         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
18230         fflush_unlocked, flockfile, funlockfile, funlockfile,
18231         fputs_unlocked, putc_unlocked.
18232
18233 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
18234
18235         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
18236         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
18237         already declared.
18238
18239 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18240
18241         * modules/getdate (Files): Add doc/getdate.texi.
18242         (Depends-on): Add setenv, xalloc.
18243
18244 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18245
18246         * lib/getdate.y: Add support for TZ="foo" within a date string.
18247         Fix some bugs near time_t boundaries.  Reject dates with
18248         out-of-range components, e.g., "Sept 31".
18249         Include <stdlib.h>, "setenv.h", "xalloc.h".
18250         (ISDIGIT_LOCALE): Remove; unused.
18251         Note that the TZ and time functions used here are not reentrant.
18252         (mktime_ok, get_tz): New functions.
18253         (TZBUFSIZE): New constant.
18254         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
18255         This requires that we sometimes generate our own TZ="XXX..." setting.
18256
18257 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18258
18259         * doc/getdate.texi: New file, from coreutils with modifications for
18260         the new TZ parsing.
18261
18262 2004-10-27  Derek R. Price  <derek@ximbiot.com>
18263
18264         * lib/mktime.c (not_equal_tm): Remove redundant check.
18265
18266 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
18267
18268         * modules/regex (lib_SOURCES): Add regex.c.
18269         Reported by James Youngman in
18270         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
18271
18272 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
18273
18274         * lib/getdate.y: Use Bison 1.875 features, and some minor
18275         code cleanups.  This change does not affect semantics.
18276         Don't include <stdlib.h>; no longer needed.
18277         Don't include unlocked-io.h; only the "#if TEST" code uses
18278         stdio, and performance isn't crucial there.
18279         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
18280         Bison 1.875 features as described below.
18281         All uses of "PC." replaced by "pc->".
18282         (YYSTYPE): Add a forward declaration.
18283         (yylex, yyerror): Use full prototypes in forward decls.
18284         Use "%pure-parser" rather than obsolescent "%pure_parser".
18285         Use %parse-param and %lex-param instead of obsolescent
18286         YYPARSE_PARAM and YYLEX_PARAM.
18287         (meridian_table, month_and_day_table, time_units_table,
18288         relative_time_table, time_zone_table, military_table,
18289         lookup_zone, lookup_word, get_date):
18290         Use NULL instead of 0 where appropriate.
18291         (to_hour): Avoid abort (), to avoid a dependency on
18292         stdlib.h.
18293         (yyerror, yylex): Now accepts parser_control * arg.
18294         (main) [TEST]: Use '\0' rather than 0 for char.
18295
18296 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
18297
18298         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
18299
18300 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
18301
18302         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
18303         It's now the caller's responsibility to handle the case where
18304         !HAVE_GETPAGESIZE && !defined getpagesize.
18305
18306         * lib/mktime.c (leapyear): Arg is long int, not int.
18307
18308 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
18309
18310         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
18311
18312 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
18313
18314         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
18315         missing.  Problem reported by James Youngman.
18316
18317 2004-10-16  Simon Josefsson  <jas@extundo.com>
18318
18319         * gnulib-tool: Fix comments.  Fix parse problem.
18320         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
18321
18322 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
18323
18324         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
18325         implementation of getopt_long.  Problem reported by Alexander Taler in:
18326         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
18327
18328 2004-10-15  Bruno Haible  <bruno@clisp.org>
18329
18330         * gnulib-tool: Untabify. Initialize supplied_libname.
18331         (func_usage): More homogenous output.
18332         (func_modules_transitive_closure, func_modules_to_filelist,
18333         func_emit_lib_Makefile_am): New functions.
18334         (func_import): New function, extracted from big case statement. Use
18335         func_get_license, func_modules_transitive_closure,
18336         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
18337         opt_lgpl. Don't use test -a, as it's not portable.
18338         (func_create_testdir): Use func_modules_transitive_closure,
18339         func_modules_to_filelist, func_emit_lib_Makefile_am.
18340
18341 2004-10-15  Bruno Haible  <bruno@clisp.org>
18342
18343         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
18344
18345 2004-10-15  Bruno Haible  <bruno@clisp.org>
18346
18347         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
18348         the portions belonging to each module.
18349         Suggested by Derek Robert Price <derek@ximbiot.com>.
18350
18351 2004-10-12  Simon Josefsson  <jas@extundo.com>
18352
18353         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
18354         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
18355         to real functions.
18356
18357 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18358
18359         * modules/vsnprintf: New file.
18360
18361 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18362
18363         * m4/vsnprintf.m4: New file.
18364
18365 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18366
18367         * lib/vsnprintf.h: New file.
18368         * lib/vsnprintf.c: New file.
18369
18370 2004-10-11  Bruno Haible  <bruno@clisp.org>
18371
18372         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
18373         vsnprintf.
18374
18375 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
18376
18377         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
18378
18379 2004-10-07  Bruno Haible  <bruno@clisp.org>
18380
18381         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
18382         fits into the provided buffer.
18383
18384 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
18385
18386         * lib/diacrit.c, diacrit.h: Add GPL notice.
18387
18388         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
18389         notice.
18390         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
18391         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
18392         This avoids a potential constant-folding bug.
18393
18394 2004-10-05  Bruno Haible  <bruno@clisp.org>
18395
18396         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
18397         for the declaration of strsep.
18398
18399 2004-10-05  Bruno Haible  <bruno@clisp.org>
18400
18401         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
18402
18403 2004-10-04  Simon Josefsson  <jas@extundo.com>
18404
18405         * modules/memmem: New file.
18406         * tests/test-memmem.c: New file.
18407         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
18408
18409 2004-10-04  Simon Josefsson  <jas@extundo.com>
18410
18411         * m4/memmem.m4: New file.
18412
18413 2004-10-04  Simon Josefsson  <jas@extundo.com>
18414
18415         * lib/memmem.h: New file.
18416         * lib/memmem.c: New file, taken from glibc.
18417
18418 2004-10-04  Simon Josefsson  <jas@extundo.com>
18419
18420         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
18421         '#ifdef USE_UNLOCKED_IO'.
18422
18423 2004-10-04  Simon Josefsson  <jas@extundo.com>
18424
18425         * config/srclist.txt: Add memmem from glibc.
18426
18427 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18428
18429         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
18430
18431         * modules/argmatch, modules/argp, modules/closeout, modules/error,
18432         modules/exclude, modules/getdate, modules/getline,
18433         modules/getndelim2, modules/getpass, modules/getpass-gnu,
18434         modules/getusershell, modules/linebuffer, modules/md5,
18435         modules/mountlist, modules/posixtm, modules/readtokens,
18436         modules/readutmp, modules/regex, modules/sha1,
18437         modules/version-etc, modules/yesno:
18438         Remove dependency on unlocked-io.
18439
18440 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18441
18442         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
18443
18444         * m4/unlocked-io.m4: Add copyright notice.
18445         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
18446
18447 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18448
18449         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
18450         * lib/xmalloc.c (xmemdup): Likewise.
18451         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
18452         XFREE): Remove these long-obsolescent macros.
18453         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
18454         * lib/xstrdup.c: Remove.
18455
18456         * lib/regex.c (re_comp): Cast gettext return value to char *,
18457         Problem reported by Martin Neitzel via Mark D. Baushke.
18458
18459 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18460
18461         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
18462         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
18463         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
18464         regex.c, sha1.c, version-etc.c, yesno.c:
18465         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
18466         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
18467         the includer's responsibility.
18468
18469         Sync from coreutils.
18470
18471         * lib/modechange.c (mode_compile): Don't decrement a pointer that
18472         points to the start of a string, as the C Standard says the
18473         resulting behavior is undefined.
18474
18475         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
18476         simple -> simple_backups, numbered_existing ->
18477         numbered_existing_backups, numbered -> numbered_backups
18478         to avoid shadowing problems.  All uses changed.
18479         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
18480         * lib/backupfile.c (check_extension, numbered_backup):
18481         Rename locals to avoid shadowing 'basename'.
18482         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
18483         once.
18484
18485         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
18486         * lib/.cvsignore: Add getopt.h.
18487
18488 2004-10-04  Bruno Haible  <bruno@clisp.org>
18489
18490         * modules/README: New file.
18491         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
18492         not a module.
18493
18494 2004-10-02  Jim Meyering  <jim@meyering.net>
18495
18496         * lib/dirfd.h, getpagesize.h: Add copyright notice.
18497
18498 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18499
18500         * modules/strsep: New file.
18501
18502 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18503
18504         * m4/strsep.m4: New file.
18505
18506 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18507
18508         * lib/strsep.h: New file.
18509         * lib/strsep.c: New file.
18510
18511 2004-10-01  Simon Josefsson  <jas@extundo.com>
18512
18513         * lib/snprintf.c (snprintf): Handle size==0.
18514
18515 2004-10-01  Simon Josefsson  <jas@extundo.com>
18516             Bruno Haible  <bruno@clisp.org>
18517
18518         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
18519         (snprintf): Declare 'args'.
18520
18521 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
18522
18523         * lib/snprintf.c: Remove comments as to why each header is needed.
18524
18525 2004-10-01  Bruno Haible  <bruno@clisp.org>
18526
18527         * MODULES.html.sh: Add strsep.
18528
18529 2004-09-30  Simon Josefsson  <jas@extundo.com>
18530
18531         * modules/snprintf: New file.
18532
18533 2004-09-30  Simon Josefsson  <jas@extundo.com>
18534
18535         * m4/snprintf.m4: New file.
18536
18537 2004-09-30  Simon Josefsson  <jas@extundo.com>
18538
18539         * lib/snprintf.h, lib/snprintf.c: New files.
18540
18541 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18542
18543         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
18544         (hol_entry_help): Never translate an empty string.
18545         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
18546         * lib/argp.h (OPTION_NO_TRANS): New option.
18547
18548 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18549
18550         * modules/argp (Maintainer): Replace Simon Josefsson
18551         by Sergey Poznyakoff.
18552
18553 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18554
18555         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
18556         changes merged back into glibc.
18557
18558 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18559
18560         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
18561
18562 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18563
18564         * lib/xvasprintf.c: Include xalloc.h.
18565         (xvasprintf): Use xalloc_die, not xmalloc_die.
18566
18567 2004-09-29  Bruno Haible  <bruno@clisp.org>
18568
18569         * modules/alloca-opt: New file, derived from modules/alloca.
18570         * modules/allocsa: Depend on alloca-opt instead of alloca.
18571         * modules/setenv: Likewise.
18572         * modules/vasnprintf: Likewise.
18573         * MODULES.html.sh: Add alloca-opt.
18574
18575 2004-09-28  Simon Josefsson  <jas@extundo.com>
18576
18577         * gnulib-tool: New parameter --lgpl, to asseert that modules are
18578         LGPL, and to replace license template from GPL to LGPL.
18579
18580 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
18581
18582         * modules/dummy: Change license to LGPL.
18583
18584 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
18585
18586         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
18587
18588 2004-09-24  Simon Josefsson  <jas@extundo.com>
18589
18590         * modules/minmax (License): Change from GPL to LGPL.
18591
18592 2004-09-23  Simon Josefsson  <jas@extundo.com>
18593
18594         * gnulib-tool (--import): Typo.
18595
18596 2004-09-23  Simon Josefsson  <jas@extundo.com>
18597
18598         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
18599
18600 2004-09-22  Bruno Haible  <bruno@clisp.org>
18601
18602         * modules/*: Add 'License' field.
18603         * gnulib-tool: Accept --extract-license option.
18604         (func_get_license): New function.
18605
18606 2004-09-21  Bruno Haible  <bruno@clisp.org>
18607
18608         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
18609         Reported by Simon Josefsson.
18610
18611 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
18612
18613         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
18614         gl_AC_TYPE_LONG_LONG.
18615
18616 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
18617
18618         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
18619
18620 2004-09-18  Simon Josefsson  <jas@extundo.com>
18621         and  Paul Eggert  <eggert@cs.ucla.edu>
18622
18623         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
18624         calls with autoreconf.  Define GL_LIB.
18625
18626 2004-09-14  Karl Berry  <karl@gnu.org>
18627
18628         * config/srclist.txt: unsync setenv.c, sigh.
18629
18630 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
18631
18632         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
18633         Problem reported by Bruno Haible in:
18634         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
18635
18636 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
18637
18638         * config/srclist.txt: Comment out argp-pvh.c.
18639
18640 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
18641
18642         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
18643         in case some system header has #define'd it.  Problem reported by
18644         Soeren D. Schulze in
18645         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
18646
18647 2004-09-09  Karl Berry  <karl@gnu.org>
18648
18649         * regex.[ch]: delete from the root.  These were supposed to be
18650                 synced with emacs cvs, but this has not happened for about
18651                 a year, and anyway nothing else uses emacs regex.[ch].
18652                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
18653                 lib/regex[.ch] is untouched.
18654
18655 2004-09-09  Bruno Haible  <bruno@clisp.org>
18656
18657         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
18658
18659 2004-09-09  Bruno Haible  <bruno@clisp.org>
18660
18661         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
18662         modifications.
18663         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
18664
18665 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
18666
18667         * modules/xvasprintf: New file.
18668         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
18669
18670 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
18671
18672         * lib/xvasprintf.h: New file.
18673         * lib/xvasprintf.c: New file.
18674         * lib/xasprintf.c: New file.
18675
18676 2004-09-08  Bruno Haible  <bruno@clisp.org>
18677
18678         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
18679
18680 2004-09-08  Bruno Haible  <bruno@clisp.org>
18681
18682         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
18683         length is > INT_MAX.
18684         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
18685         more.
18686
18687 2004-09-08  Bruno Haible  <bruno@clisp.org>
18688
18689         * lib/stdint_.h: New file, taken from GNU clisp.
18690
18691 2004-09-08  Bruno Haible  <bruno@clisp.org>
18692             Oskar Liljeblad  <oskar@osk.mine.nu>
18693
18694         * modules/stdint: New file.
18695         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
18696
18697 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18698
18699         Import from coreutils.
18700         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
18701         strings on unbounded length.  alloca's performance benefits aren't
18702         that important here.
18703         (V_STRDUP): Remove.
18704         (parse_with_separator): New function, with most of the internals
18705         of the old parse_user_spec.  Allow user to omit both user and group,
18706         for compatibility with FreeBSD.
18707         Clone only the user name, not the entire spec.
18708         Do not set *uid, *gid unless entirely successful.
18709         Avoid memory leak in some failing cases.
18710         Fix regression for USER.GROUP reported by Dmitry V. Levin in
18711         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
18712         (parse_user_spec): Rewrite to use parse_with_separator.
18713
18714 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18715
18716         * modules/userspec: Don't depend on alloca.
18717
18718 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18719
18720         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
18721
18722 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18723
18724         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
18725         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
18726         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
18727
18728 2004-08-16  Simon Josefsson  <jas@extundo.com>
18729
18730         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
18731         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
18732         Add --dry-run for --import.
18733         Let user provided command line parameters override configure.ac
18734         settings.
18735
18736 2004-08-12  Simon Josefsson  <jas@extundo.com>
18737
18738         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
18739         as discussed with Paul Eggert in threads rooted at
18740         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
18741         and
18742         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
18743         Before, the test was empty, and relied on ELIDE_CODE in source
18744         code.)
18745         (gl_PREREQ_GETOPT): New macro.
18746         (gl_GETOPT): Use them.
18747
18748 2004-08-12  Simon Josefsson  <jas@extundo.com>
18749
18750         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
18751         * lib/getopt_.h: Renamed from getopt.h.
18752
18753 2004-08-12  Simon Josefsson  <jas@extundo.com>
18754
18755         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
18756         Change default library name from libfoo to libgnu.
18757         Now, if you have a configure.ac that says:
18758                 gl_SOURCE_BASE(gl)
18759                 gl_M4_BASE(gl/m4)
18760                 gl_MODULES(error getopt etcetera)
18761                 gl_INIT
18762         you can import all you need by running:
18763                 ../gnulib/gnulib-tool --import
18764
18765         * modules/getopt (Files): Rename getopt.h to getopt_.h.
18766         (Makefile.am): Rewrite, use logic from argz.
18767         (Include): Use <getopt.h> instead of "getopt.h".
18768
18769 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18770
18771         * modules/argp (Files): Add m4/unlocked-io.m4.
18772         (Depends-on): Add extensions.
18773
18774 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18775
18776         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
18777         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
18778         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
18779         Check for program_invocation_name, program_invocation_short_name,
18780         flockfile, funlockfile, features.h, _getopt_long_only_r.
18781
18782 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18783
18784         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
18785         its complicated substitute.
18786         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
18787         and program_invocation_name.
18788         (__argp_basename) [!_LIBC]: Remove; the only use was
18789         replaced by its body.
18790         (__argp_short_program_name): Change condition from
18791         !defined __argp_short_program_name to
18792         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
18793         to match argp-namefrob.h.
18794         (__argp_failure): Don't assume strerror_r returns char *.
18795         * lib/argp-parse.c (N_): Define unconditionally.
18796         (argp_default_options): Fill out initializers with 0 to avoid
18797         gcc warnings.
18798
18799 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18800
18801         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
18802         getopt1.c.
18803
18804 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18805
18806         Merge from coreutils.
18807
18808         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
18809
18810         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
18811         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
18812
18813 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18814
18815         Merge from coreutils.
18816
18817         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
18818         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
18819         for Reliant Unix 5.43.
18820
18821         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
18822         (union fooround): Use uintmax_t, not long int.
18823         The rest is a merge from libc:
18824         [defined _LIBC]: Include <shlib-compat.h>.
18825         (_obstack) [defined _LIBC]: Remove after 2.3.4.
18826
18827         * lib/settime.c (settime): Recode to avoid warning with
18828         Sun Forte C 6U2.
18829
18830         * lib/strverscmp.c: Convert to UTF-8.
18831
18832 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18833
18834         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
18835         m4/uintmax_t.m4.
18836
18837 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18838
18839         * modules/xalloc-die: New file.
18840         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
18841
18842         * modules/md5 (Files): Add m4/uint32_t.m4.
18843         * modules/sha1: Renamed from modules/sha.
18844         (Files):
18845         Rename lib/sha.h to lib/sha1.h.
18846         Rename lib/sha.c to lib/sha1.c.
18847         Rename m4/sha.m4 to m4/sha1.m4.
18848         (lib_SOURCES): Likewise.
18849         (configure.ac): Rename gl_SHA to gl_SHA1.
18850         (Include): sha.h -> sha1.h.
18851
18852 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18853
18854         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
18855         * m4/sha1.m4: Renamed from sha.m4.
18856         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
18857
18858 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18859
18860         * lib/obstack.h (obstack_empty_p):
18861         Don't assume that chunk->contents is suitably aligned.
18862         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
18863         Likewise. Problem reported by Benno in
18864         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
18865
18866         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
18867         readable.  This could be improved further but it'd take some work.
18868
18869 2004-08-08  Simon Josefsson  <jas@extundo.com>
18870
18871         * modules/xgethostname (Depends-on): Remove exit and error (not
18872         used).
18873
18874         * modules/getpass-gnu: Add getpass.h.
18875         (Depends-on): Add stdbool.
18876         * modules/getpass: Add getpass.h.
18877
18878 2004-08-08  Simon Josefsson  <jas@extundo.com>
18879
18880         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
18881         Check getpass declaration.
18882
18883 2004-08-08  Simon Josefsson  <jas@extundo.com>
18884
18885         * lib/xgethostname.c: Don't include error.h (not used).
18886
18887         * lib/getpass.h: Add.
18888         * lib/getpass.c: Include getpass.h first.
18889
18890 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
18891
18892         * lib/xalloc-die.c: New file.
18893         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
18894         All uses removed.
18895         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
18896         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
18897         xalloc-die.c.
18898         (_, N_, xalloc_die): Move to xalloc-die.c.
18899         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
18900         so that we needn't mess with xalloc_msg_memory_exhausted.
18901
18902         * lib/sha1.h: Renamed from sha.h.
18903         (SHA1_H): Renamed from _SHA_H.
18904         (sha1_ctx): Renamed from sha_ctx.
18905         (sha1_init_ctx): Renamed from sha_init_ctx.
18906         (sha1_process_block): Renamed from sha_process_block.
18907         (sha1_process_bytes): Renamed from sha_process_bytes.
18908         (sha1_finish_ctx): Renamed from sha_finish_ctx.
18909         (sha1_read_ctx): Renamed from sha_read_ctx.
18910         (sha1_stream): Renamed from sha_stream.
18911         (sha1_buffer): Renamed from sha_buffer.
18912         * lib/sha1.c: Likewise; renamed from sha.c.
18913         Do not include <sys/types.h>.
18914         Include <stddef.h> rather than <stdlib.h>.
18915
18916 2004-08-08  Bruno Haible  <bruno@clisp.org>
18917
18918         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
18919         FILESYSTEM_PREFIX_LEN.
18920         * lib/progreloc.c: Likewise.
18921         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
18922
18923 2004-08-06  Simon Josefsson  <jas@extundo.com>
18924
18925         * modules/progname (Depends-on): Don't depend on stdbool.
18926
18927 2004-08-06  Simon Josefsson  <jas@extundo.com>
18928
18929         * modules/getsubopt: New file.
18930         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18931         getsubopt.
18932
18933 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18934
18935         More merge from coreutils.
18936
18937         * m4/utimens.m4, m4/utimecmp.m4: New files.
18938         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
18939         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
18940         prereq.m4, sha.m4: Import changes from coreutils.
18941
18942 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18943
18944         More merge from coreutils.
18945         * modules/raise, modules/readtokens0, modules/utimens:
18946         * modules/utimecmp, module/xnanosleep: New files.
18947         * modules/strftime: Add lib/strftime.h.
18948         Change include from <time.h> to "strftime.h".
18949         * modules/yesno: Add lib/yesno.h.
18950         * modules/backupfile: Remove lib/addext.c.
18951         * modules/euidaccess: Add stat-macros.h.
18952         * modules/canonicalize, modules/euidaccess,
18953         modules/filemode, modules/lchown, modules/makepath,
18954         modules/rmdir, modules/stat: Likewise.
18955
18956 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18957
18958         Merge from tar.
18959         * lib/argp-help.c (make_hol, hol_append): Don't assume that
18960         SIZE_MAX is a valid preprocessor constant.
18961         (__argp_basename): Change from "#ifndef _LIBC"
18962         to "#ifndef __argp_short_program_name", so that
18963         we don't compile these functions for tar.
18964
18965         More merges from coreutils.
18966         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
18967         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
18968         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
18969         * lib/addext.c: Remove; no longer needed.
18970         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
18971         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
18972         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
18973         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
18974         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
18975         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
18976         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
18977         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
18978         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
18979         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
18980         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
18981         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
18982         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
18983         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
18984         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
18985         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
18986         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
18987         Import changes from coreutils.
18988
18989 2004-08-05  Simon Josefsson  <jas@extundo.com>
18990
18991         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
18992
18993 2004-08-05  Simon Josefsson  <jas@extundo.com>
18994
18995         * m4/getsubopt.m4: New file.
18996
18997 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18998
18999         Merge from coreutils.
19000
19001         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
19002         * m4/getcwd-path-max.m4: New files.
19003
19004         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
19005         FILESYSTEM_PREFIX_LEN ->
19006         FILE_SYSTEM_PREFIX_LEN.
19007         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
19008         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
19009         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
19010         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
19011
19012         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
19013         prerequisite modules now handle the DOS stuff.
19014         Don't check for unistd.h.
19015
19016 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19017
19018         Merge from coreutils.
19019
19020         * lib/.gdb-history: Remove; this doesn't belong here.
19021
19022         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
19023         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
19024         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
19025         * lib/getcwd.c: New files.
19026
19027         * lib/dirname.h: Include <stdbool.h>.
19028         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
19029         for consistency with POSIX terminology.  All uses changed.
19030         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
19031         (strip_trailing_slashes): Use bool for booleans.
19032         * lib/stripslash.c (strip_trailing_slashes): Likewise.
19033
19034         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
19035         sometimes returns a positive errno value even when it succeeds.
19036         (print_errno_message) [!LIBC]: Fall back on strerror if
19037         __strerror_r fails.
19038
19039         * lib/path-concat.c (mempcpy): Don't define if a system header defines
19040         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
19041         (longest_relative_suffix): New function.
19042         (path_concat): Use it.  Assume first argument is not NULL.
19043         Port to DOS.  Omit redundant separators.
19044         Report an error instead of returning NULL.
19045         Use mempcpy instead of memcpy.
19046         (xpath_concat): Remove: not declared or used.
19047
19048         * lib/same.h: Include <stdbool.h>
19049         (same_name): Return bool, not int.
19050         * lib/same.c (same_name): Likewise.
19051         (errno): Don't declare; we assume C89 or better now.
19052
19053         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
19054         if not already defined.
19055
19056         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
19057         * lib/dup-safer.c (errno): Likewise.
19058
19059 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19060
19061         Merge from coreutils.
19062         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
19063         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
19064         * modules/path-concat: Don't depend on strdup.
19065
19066 2004-08-03  Simon Josefsson  <jas@extundo.com>
19067
19068         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
19069         * lib/progname.h: Don't include stdbool.h.
19070
19071 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19072
19073         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
19074         * MODULES.html.sh (func_all_modules): Remove fatal.
19075
19076 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19077
19078         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
19079
19080 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19081
19082         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
19083         working.
19084
19085 2004-08-02  Simon Josefsson  <jas@extundo.com>
19086
19087         * lib/getsubopt.h: New file, with comments from Bruno Haible.
19088         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
19089         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
19090
19091 2004-08-01  Simon Josefsson  <jas@extundo.com>
19092
19093         * lib/xgetdomainname.c: Include stdlib.h, for free().
19094
19095 2004-07-19  Bruno Haible  <bruno@clisp.org>
19096
19097         * MODULES.html.sh (func_all_modules): Add dummy.
19098
19099 2004-07-16  Simon Josefsson  <jas@extundo.com>
19100
19101         * modules/dummy: New file.
19102
19103 2004-07-16  Simon Josefsson  <jas@extundo.com>
19104
19105         * lib/dummy.c: New file.
19106
19107 2004-07-16  Bruno Haible  <bruno@clisp.org>
19108
19109         * lib/backupfile.h: Add extern "C" for C++.
19110         * lib/closeout.h: Likewise.
19111         * lib/copy-file.h: Likewise.
19112         * lib/findprog.h: Likewise.
19113         * lib/full-write.h: Likewise.
19114         * lib/pathname.h: Likewise.
19115         * lib/progname.h: Likewise.
19116         * lib/stpcpy.h: Likewise.
19117         * lib/stpncpy.h: Likewise.
19118         * lib/strcase.h: Likewise.
19119         * lib/strstr.h: Likewise.
19120         * lib/xalloc.h: Likewise.
19121
19122         * lib/mbswidth.h: Add extern "C" for C++.
19123         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
19124
19125 2004-07-13  Robert Millan  <robertmh@gnu.org>
19126
19127         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
19128
19129 2004-07-09  Simon Josefsson  <jas@extundo.com>
19130
19131         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
19132         failed without this.)
19133
19134 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
19135
19136         * modules/chown (Files): Add lib/fchown-stub.c, since
19137         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
19138
19139 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
19140
19141         * lib/fchown-stub.c: New file.
19142
19143 2004-06-24  Jim Meyering  <jim@meyering.net>
19144
19145         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
19146
19147 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19148
19149         * modules/argz: Omit "#include".
19150
19151         * MODULES.html.sh (func_all_modules): Add calloc, to match
19152         2004-06-01 addition of calloc module.
19153
19154 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19155
19156         * m4/argz.m4: New file, which is autoupdated from libtool.
19157
19158 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19159
19160         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
19161         libtool.
19162
19163 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19164
19165         * config/srclist-update: Don't insist on "USA." before the
19166         close-comment, as libtool omits the period and puts the */ on a
19167         separate line.
19168         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
19169         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
19170
19171 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
19172
19173         * modules/argz: New file.
19174         * MODULES.html.sh (func_all_modules): Add argz.
19175
19176 2004-06-12  Jim Meyering  <jim@meyering.net>
19177         and  Paul Eggert  <eggert@cs.ucla.edu>
19178
19179         * modules/hash (Files): Add lib/xalloc.h.
19180         * modules/pipe (Depends-on): Add wait-process.
19181         * modules/stat (Depends-on): Add xalloc.
19182         * modules/userspec (Files): Add lib/userspec.h.
19183         * modules/xstrto
19184
19185         Upgrade from gettext-0.13.
19186         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
19187         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
19188         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
19189
19190 2004-06-10  Jim Meyering  <jim@meyering.net>
19191
19192         * lib/calloc.c: New file.
19193
19194 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
19195
19196         * lib/getdate.y (yylex): Allow space between sign and number.
19197         Problem reported by Dan Jacobson.
19198
19199 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
19200
19201         Merge from coreutils CVS.
19202
19203         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
19204         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
19205         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
19206         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
19207         xstrtol.m4: Fix copyright date and/or serial number.
19208
19209         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
19210         See if we need an fchown replacement.
19211         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
19212         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
19213         and use the replacement function if we detect either defect.
19214
19215         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
19216         gl_UTIMECMP.
19217
19218 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
19219         and  Jim Meyering  <jim@meyering.net>
19220
19221         Merge from coreutils CVS.
19222
19223         * lib/stat-macros.h: New file, with contents from file-type.h
19224         and coreutils' system.h.
19225         * lib/file-type.c: Include "stat-macros.h".
19226         * lib/file-type.h (file_type): Move all macro definitions to new file,
19227         stat-macros.h.
19228
19229         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
19230         Wrap old code with this conditional.
19231         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
19232         function that does not dereference symlinks.
19233         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
19234
19235         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
19236         dependency problems.
19237         (xreadlink): Accept new arg SIZE, for efficiency.
19238         All decls and uses changed.
19239         * lib/xreadlink.h: Include <stddef.h>, for size_t.
19240
19241         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
19242         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
19243
19244         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
19245         sysexits.h.
19246
19247 2004-06-01  Jim Meyering  <jim@meyering.net>
19248
19249         * m4/calloc.m4: New file.
19250
19251 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
19252
19253         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
19254         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
19255         Also, fix a typo in a diagnostic.
19256
19257 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
19258
19259         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
19260         or AC_FUNC_REALLOC.
19261
19262 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
19263
19264         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
19265         macros to be defined.
19266         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
19267         the allocator returns NULL because the requested size is zero.
19268
19269 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19270
19271         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
19272         var.  Add comment explaining why libc still defines it.  This
19273         merges the following patch from glibc:
19274         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
19275
19276 2004-05-20  Andreas Schwab  <schwab@suse.de>
19277
19278         * m4/free.m4: Replace free if it not known to work, not the other
19279         way round.
19280
19281 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
19282
19283         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
19284         present in glibc since revision 1.1 of this file.
19285         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
19286         obstack_alignment_mask, obstack_alloc, obstack_base,
19287         obstack_blank, obstack_blank_fast, obstack_chunk_size,
19288         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
19289         obstack_grow0, obstack_init, obstack_int_grow,
19290         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
19291         obstack_next_free, obstack_object_size, obstack_ptr_grow,
19292         obstack_ptr_grow_fast, obstack_room): Remove declarations of
19293         nonexistent functions.
19294
19295 2004-05-18  Karl Berry  <karl@gnu.org>
19296
19297         * config/srclist.txt: break link for vasnprintf.c.
19298
19299 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
19300
19301         Port obstack to the AS/400, where pointers are 16 bytes wide and
19302         you cannot cast an integer to a valid pointer.  This patch is
19303         currently waiting to be integrated into glibc; see
19304         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
19305
19306         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
19307         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
19308         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
19309         (struct obstack): temp member is now a union of a pointer and
19310         an integer, instead of an integer.  All integer uses changed.
19311         This does not affect the physical layout of struct obstack,
19312         except on hosts (like the AS/400) where the size or alignment of
19313         void * is greater than that of ptrdiff_t.
19314         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
19315         __STDC__)]: Store temporary in pointer member of union, not
19316         integer member.
19317         * lib/obstack.c: Include <stddef.h>, for offsetof.
19318         (struct fooalign): Remove; it doesn't need a name.
19319         (union fooround): Change double to long double, and add void *.
19320         (DEFAULT_ALIGNMENT): Use offsetof to compute.
19321         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
19322         not a macro.  Hence the values are always int; so remove all
19323         casts-to-int in uses.
19324
19325 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
19326
19327         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
19328         we can get this patch merged into glibc.
19329
19330 2004-05-17  Derek R. Price  <derek@ximbiot.com>
19331             Paul Eggert  <eggert@cs.ucla.edu>
19332
19333         * m4/argp: Depend on alloca.
19334
19335 2004-05-17  Derek R. Price  <derek@ximbiot.com>
19336             Paul Eggert  <eggert@cs.ucla.edu>
19337
19338         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
19339         freecoding.
19340
19341 2004-05-17  Bruno Haible  <bruno@clisp.org>
19342
19343         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
19344         precision that consists of a '.' followed by an empty digit string.
19345         Patch by Tor Lillqvist <tml@iki.fi>.
19346
19347 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
19348
19349         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
19350         for backward compatibility with older code.  We need our own
19351         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
19352         it under some other name, and our alloca.h will define it.
19353
19354 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
19355             Derek Price  <derek@ximbiot.com>
19356
19357         * lib/alloca.c: Include <alloca.h>, to get our interface.
19358         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
19359         include <alloca.h> first.  Use C89 prototype for alloca; this
19360         requires including <stddef.h> for size_t.  Use extern "C" if C++.
19361         Use #elif for simplicity, since we can assume C89 now.
19362         Don't try to source the system alloca.h since it will not be found
19363         and to prevent recursively including its replacement.
19364         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
19365         * lib/regex.c: Likewise.
19366
19367 2004-05-16  Derek Price  <derek@ximbiot.com>
19368             Paul Eggert  <eggert@cs.ucla.edu>
19369
19370         getline cleanup.  This changes the getndelim2 API: both order of
19371         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
19372         no delimiter).
19373
19374         * lib/getline.c: Don't include stddef.h or stdio.h, since our
19375         interface does that.
19376         (getline): Always use getdelim, so that we don't have two
19377         copies of this code.
19378         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
19379         if available.
19380         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
19381         (GETNDELIM2_MAXIMUM): New macro.
19382         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
19383         instead of the old practice of delim2==0.  All callers changed.
19384         Return -1 on overflow, instead of returning junk.
19385         Do not set *linesize unless allocation succeeds.
19386         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
19387         that we include sys/types.h.
19388         * lib/getnline.h: Likewise.
19389         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
19390         (getndelim2): Reorder arguments.
19391         * lib/getnline.c (getnline, getndelim):
19392         Don't discard the NMAX argument.
19393         (getnline): Invoke getndelim, to avoid code duplication.
19394         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
19395         of (size_t) -1 by callers of the getnline family.
19396
19397 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19398
19399         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
19400         Check for gettimeofday.
19401         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
19402         Check for settimeofday, stime.
19403
19404 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19405
19406         * lib/nanosleep.c (suspended): Change its type from int to
19407         sig_atomic_t volatile.
19408         (first_call): Make it private to rpl_nanosleep, and have it
19409         be zero initially as that's a bit faster.
19410         (my_usleep): Round up fractional times instead of truncating them,
19411         as this is the usual meaning for 'sleep'.
19412
19413         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
19414         doesn't work.
19415         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
19416         (ENOSYS): Define if not defined.
19417         (settime): Fall back on stime if it exists and settimeofday fails.
19418         But don't bother with fallbacks if a method fails with errno == EPERM.
19419
19420 2004-05-11  Jim Meyering  <jim@meyering.net>
19421
19422         Prior to this change, the save_cwd caller required read access to the
19423         current directory on most systems (ones with the fchdir function).
19424
19425         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
19426         fails, try write-only, and finally, resort to using xgetcwd.
19427
19428 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
19429
19430         * lib/obstack.c, obstack.h: Import changes from libc.
19431
19432 2004-04-28  Bruno Haible  <bruno@clisp.org>
19433
19434         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
19435         also implicitly appends .exe to executables.
19436         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
19437         accepts Windows pathnames.
19438         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
19439         Treat Cygwin like Windows, since it now accepts Windows pathnames.
19440         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
19441         Treat Cygwin like Windows, since it now accepts Windows pathnames.
19442         Reported by Derek Robert Price <derek@ximbiot.com>.
19443
19444 2004-04-21  Karl Berry  <karl@gnu.org>
19445
19446         * config/srclist.txt (localcharset.c): break sync.
19447
19448 2004-04-20  Paul Eggert  <eggert@twinsun.com>
19449
19450         * m4/host-os.m4: Add a copyright notice.
19451
19452 2004-04-20  Jim Meyering  <jim@meyering.net>
19453
19454         Change UTILS_ to gl_ in AC_DEFINE'd names.
19455         Change utils_- and jm_-prefixed variables, too.
19456         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
19457         UTILS_FUNC_MKDIR_TRAILING_SLASH.
19458         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
19459
19460         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
19461         Don't emit trailing blanks.
19462         Also rename jm_-prefixed variables to have gl_ prefix.
19463
19464         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
19465         Also rename jm_-prefixed variables to have gl_ prefix.
19466
19467         * m4/jm-macros.m4: Reflect the renamings.
19468         * m4/prereq.m4: Likewise.
19469
19470 2004-04-20  Jim Meyering  <jim@meyering.net>
19471
19472         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
19473         memory.
19474
19475 2004-04-20  Jim Meyering  <jim@meyering.net>
19476             Bruno Haible  <bruno@clisp.org>
19477
19478         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
19479         memory when realloc fails.
19480
19481 2004-04-19  Jim Meyering  <jim@meyering.net>
19482
19483         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
19484         now that readutmp.c may call `free (0)'.
19485
19486 2004-04-19  Bruno Haible  <bruno@clisp.org>
19487
19488         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
19489         * m4/inttypes_h.m4: Likewise.
19490         * m4/stdint_h.m4: Likewise.
19491         * m4/intmax_t.m4: Likewise.
19492         * m4/uintmax_t.m4: Likewise.
19493
19494 2004-04-18  Jim Meyering  <jim@meyering.net>
19495
19496         * m4/prereq.m4: Don't forbid jm_ prefix.
19497
19498         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
19499         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
19500         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
19501         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
19502         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
19503         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
19504         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
19505         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
19506         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
19507         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
19508         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
19509         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
19510         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
19511         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
19512         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
19513         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
19514         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
19515         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
19516         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
19517
19518 2004-04-18  Jim Meyering  <jim@meyering.net>
19519
19520         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
19521         failure, don't leak memory and do call END_UTMP_ENT.
19522
19523 2004-04-16  Jim Meyering  <jim@meyering.net>
19524
19525         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
19526         coreutils' stat program.
19527         (gl_PREREQ): Don't require jm_PREREQ_STAT.
19528
19529 2004-04-11  Paul Eggert  <eggert@twinsun.com>
19530
19531         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
19532         C89.
19533         (CHAR_BIT): Remove, since we assume C89.
19534         Include <stdint.h> if available, as per current Autoconf CVS advice.
19535
19536 2004-03-31  Jim Meyering  <jim@meyering.net>
19537
19538         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
19539         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
19540         * m4/xalloc.m4: Likewise.
19541
19542 2004-03-30  Paul Eggert  <eggert@twinsun.com>
19543
19544         Merge from coreutils.
19545
19546         * m4/inttostr.m4: New file.
19547         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
19548         Require AM_STDBOOL_H and gl_TIMESPEC instead.
19549         Require gl_CLOCK_TIME.
19550         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
19551
19552 2004-03-30  Paul Eggert  <eggert@twinsun.com>
19553
19554         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
19555         not bool, to be more consistent with Unix conventions.
19556         Suggested by Bruno Haible.
19557
19558         Merge from coreutils.
19559
19560         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
19561         * lib/umaxtostr.c: New files.
19562
19563         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
19564         the usual <time.h> dance.
19565         (get_date): Change signature to support fractional time stamps.
19566         All callers changed.
19567         * lib/getdate.y: Include "getdate.h" first, as we can now
19568         assume C89 and don't need to worry about 'const'.
19569         Similarly, include "unlocked-io.h" near start, not in middle.
19570         Include <limits.h>.
19571         (textint.value): Use long int rather than int.
19572         (textint.digits): Use size_t rather than int.
19573         (BILLION, LOG10_BILLION): New constants.
19574         (parser_control): New member rel_ns.  Members day_ordinal,
19575         time_zone, month, day, hour, minutes, rel_year, rel_month,
19576         rel_day, rel_hour, rel_minutes, rel_seconds
19577         are now long int, not int.  Member seconds is now struct timespec,
19578         not int.  New member timespec_seen.  Members dates_seen, days_seen,
19579         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
19580         not int.
19581         (%union.intval): Now long int, not int.
19582         New member timespec.
19583         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
19584         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
19585         (spec): Now is a timespec or an item list.
19586         (timespec, items): New nonterminals.
19587         (time, rel, relunit, number, get_date):
19588         Add support for fractional seconds.
19589         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
19590         (gmtime, localtime, mktime): Remove decls; not needed with C89.
19591         (to_hour): First arg is now long int, not int.
19592         (to_year): Returns long int, not int.
19593         Don't treat year -70 like 70.
19594         (tm_diff): Returns long int, not int.
19595         (lookup_word): Use bool instead of int when appropriate.
19596         (yylex): Use size_t for count, not int.
19597         Detect overflow when parsing large integer constants.
19598         Add support for fractions.
19599         (get_date): Make pointers 'const' if possible.
19600         Use more-portable code to detect integer overflow.
19601         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
19602         Don't use ctime; it's not reliable if the year has >4 digits.
19603
19604         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
19605         This is for compatibility with BSD.
19606
19607         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
19608         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
19609         From coreutils' system.h.
19610
19611         * lib/userspec.c: Don't include "posixver.h".
19612         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
19613         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
19614         compatible extension.  Simplify code by removing a boolean int
19615         that was always nonzero if a string was nonnull.
19616
19617 2004-03-30  Jim Meyering  <jim@meyering.net>
19618
19619         Merge from coreutils.
19620
19621         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
19622         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
19623         on some systems one must include <grp.h> before it.
19624         Reported by Christian Krackowizer.
19625
19626 2004-03-30  Jim Meyering  <jim@meyering.net>
19627
19628         Merge from coreutils.
19629
19630         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
19631
19632         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
19633         an empty input stream.
19634
19635         * lib/readtokens.c: Include <stdbool.h>.
19636         (readtoken): Use `size_t' rather than int/long.
19637         All callers adjusted.
19638         Use `bool' rather than `int' where appropriate.
19639         Use memset rather than an explicit loop.
19640         Use x2nrealloc rather than xrealloc.
19641         Allow the use of `\0' as a delimiter.
19642         (readtokens): Likewise.
19643         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
19644
19645 2004-03-30  Jim Meyering  <jim@meyering.net>
19646
19647         * m4/realloc.m4: Remove file, since now it does no more than
19648         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
19649         the `configure.ac' section of module/realloc.
19650         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
19651
19652 2004-03-30  Bruno Haible  <bruno@clisp.org>
19653
19654         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
19655         nonnull.
19656
19657 2004-03-29  Paul Eggert  <eggert@twinsun.com>
19658
19659         Merge changes to getloadavg.c from coreutils and Emacs.
19660
19661         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
19662         Define to an expression, not to the empty string.
19663         Include cloexec.h and xalloc.h.
19664         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
19665         Use set_cloexec_flag rather than rolling our own.
19666         * lib/cloexec.c, lib/cloexec.h: New files.
19667
19668 2004-03-29  Paul Eggert  <eggert@twinsun.com>
19669
19670         * m4/cloexec.m4: New file.
19671
19672 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19673
19674         * lib/getopt.h: Sync with libc CVS.
19675
19676 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19677             Bruno Haible  <bruno@clisp.org>
19678
19679         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
19680         mbswidth.
19681
19682 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19683             Bruno Haible  <bruno@clisp.org>
19684
19685         * lib/mbswidth.h: Include <wchar.h> only if
19686         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
19687         <wchar.h>.
19688         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
19689
19690 2004-03-09  Paul Eggert  <eggert@twinsun.com>
19691
19692         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
19693         Sync with libc CVS.
19694         * lib/getopt_int.h: New file, also synced from libc.
19695
19696 2004-03-09  Paul Eggert  <eggert@twinsun.com>
19697
19698         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
19699         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
19700         Bring back getopt.c, getopt.h, getopt1.c.
19701
19702 2004-03-07  Paul Eggert  <eggert@twinsun.com>
19703
19704         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
19705         All uses changed.  Check for sa_sigaction member; this fixes
19706         a bug first reported by Jason Andrade in
19707         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
19708
19709 2004-03-07  Paul Eggert  <eggert@twinsun.com>
19710
19711         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
19712         '#if' expressions.  Unlike the code it replaces, it does not
19713         depend on (defined _SC_PAGESIZE).  However, it does depend on
19714         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
19715         first reported by Jason Andrade in
19716         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
19717
19718 2004-02-25  Simon Josefsson  <jas@extundo.com>
19719
19720         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
19721
19722 2004-02-25  Simon Josefsson  <jas@extundo.com>
19723
19724         * lib/strdup.h: New file.
19725         * lib/strdup.c: Include it.
19726         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
19727         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
19728
19729 2004-02-23  Karl Berry  <karl@gnu.org>
19730
19731         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
19732         (from fencepost.gnu.org:/gd/gnuorg).
19733
19734 2004-02-23  Karl Berry  <karl@gnu.org>
19735
19736         * config/srclistvars.sh (GNUORG) [karl]: redefine.
19737         * config/srclist.txt: add maintain/standards documents.
19738
19739 2004-02-18  Bruno Haible  <bruno@clisp.org>
19740
19741         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
19742         Reported by Derek Robert Price <derek@ximbiot.com>.
19743
19744 2004-02-16  Karl Berry  <karl@gnu.org>
19745
19746         * config/mkinstalldirs, install-sh: update from automake.
19747
19748 2004-02-06  Karl Berry  <karl@gnu.org>
19749
19750         * m4/po.m4: update from gettext 0.14.1.
19751
19752 2004-02-06  Karl Berry  <karl@gnu.org>
19753
19754         * lib/config.charset: update from gettext 0.14.1.
19755
19756 2004-02-05  Paul Eggert  <eggert@twinsun.com>
19757
19758         Add comments and code, prompted by suggestions from Bruno Haible
19759         for sh-quote.
19760         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
19761         describing the enum quoting_style values.
19762         * lib/quotearg.c (quotearg_alloc): New function.
19763         (quotearg_buffer_restyled): Treat lone { and } as special.
19764         Treat = as special.  Work around bug with older shells
19765         that "see" a '\' that is really the 2nd byte of a multibyte char.
19766         Quote empty string with shell_quoting_style.
19767
19768 2004-02-03  Bruno Haible  <bruno@clisp.org>
19769
19770         * m4/pipe.m4: New file, from GNU gettext.
19771
19772 2004-02-03  Bruno Haible  <bruno@clisp.org>
19773
19774         * lib/pipe.h: New file, from GNU gettext.
19775         * lib/pipe.c: New file, from GNU gettext.
19776
19777 2004-01-27  Bruno Haible  <bruno@clisp.org>
19778
19779         * m4/execute.m4: New file, from GNU gettext.
19780
19781 2004-01-27  Bruno Haible  <bruno@clisp.org>
19782
19783         * lib/execute.h: New file, from GNU gettext.
19784         * lib/execute.c: New file, from GNU gettext.
19785         * lib/w32spawn.h: New file, from GNU gettext.
19786
19787 2004-01-24  Paul Eggert  <eggert@twinsun.com>
19788
19789         Merge from diffutils.
19790
19791         * lib/file-type.c (file_type): Add typed memory objects.
19792         * lib/file-type.h (S_TYPEISTMO): New macro.
19793
19794         * lib/c-stack.h (c_stack_action): Remove argv argument.
19795         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
19796         (die): Don't calculate message unless segv_action returns.
19797         (get_stack_location, min_address_from_argv, max_address_from_argv,
19798         volatile stack_base, volatile_stack_size): Remove.
19799         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
19800         that every segmentation violation is a stack overflow.  (Ouch!)
19801         See Debian bug 136249 (still outstanding) for more info about why
19802         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
19803
19804 2004-01-24  Paul Eggert  <eggert@twinsun.com>
19805
19806         Exit-status fix from coreutils.
19807
19808         Use exit_failure consistently in place of EXIT_FAILURE,
19809         so that program exit statuses are consistent on failure.
19810
19811         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
19812         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
19813         * lib/argmatch.h: Comment fix to match the above.
19814         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
19815         Now a macro referring to exit_failure, instead of a separate
19816         variable.  Include "exitfail.h" to get it.
19817         * lib/xstrtol.h: Include "exitfail.h".
19818         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
19819
19820         * lib/long-options.c (parse_long_options): Use prototype
19821         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
19822         for clarity.
19823
19824 2004-01-21  Jim Meyering  <jim@meyering.net>
19825
19826         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
19827         so as not to conflict with a different-sized __mktime_internal
19828         function in GNU libc.
19829         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
19830         Problem building statically-linked `ls' reported by Michael Brunnbauer.
19831
19832 2004-01-20  Karl Berry  <karl@gnu.org>
19833
19834         * config/config.guess: update from config.
19835
19836         * config/srclistvars.sh: GNUWWWLICENSES for karl.
19837
19838 2004-01-20  Bruno Haible  <bruno@clisp.org>
19839
19840         Safer stack allocation.
19841         * lib/setenv.c: Include allocsa.h.
19842         (alloca): Remove fallback definition.
19843         (freea): Remove macro.
19844         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
19845         instead of freea.
19846
19847 2004-01-20  Bruno Haible  <bruno@clisp.org>
19848
19849         * m4/eealloc.m4: New file, from GNU gettext.
19850
19851 2004-01-20  Bruno Haible  <bruno@clisp.org>
19852
19853         * m4/allocsa.m4: New file, from GNU gettext.
19854
19855 2004-01-20  Bruno Haible  <bruno@clisp.org>
19856
19857         * lib/xallocsa.h: New file, from GNU gettext.
19858         * lib/xallocsa.c: New file, from GNU gettext.
19859
19860 2004-01-20  Bruno Haible  <bruno@clisp.org>
19861
19862         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
19863
19864 2004-01-20  Bruno Haible  <bruno@clisp.org>
19865
19866         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
19867         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
19868         specially.
19869
19870 2004-01-20  Bruno Haible  <bruno@clisp.org>
19871
19872         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
19873         patch.
19874
19875 2004-01-20  Bruno Haible  <bruno@clisp.org>
19876
19877         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
19878
19879 2004-01-20  Bruno Haible  <bruno@clisp.org>
19880
19881         * lib/eealloc.h: New file.
19882
19883 2004-01-20  Bruno Haible  <bruno@clisp.org>
19884
19885         * lib/binary-io.h: Avoid warnings on Cygwin.
19886
19887 2004-01-20  Bruno Haible  <bruno@clisp.org>
19888
19889         * lib/allocsa.h: New file, from GNU gettext.
19890         * lib/allocsa.c: New file, from GNU gettext.
19891
19892 2004-01-18  Karl Berry  <karl@gnu.org>
19893
19894         * doc/gpl.texi, doc/lgpl.texi: new files.
19895
19896 2004-01-18  Karl Berry  <karl@gnu.org>
19897
19898         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
19899         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
19900
19901 2004-01-15  Paul Eggert  <eggert@twinsun.com>
19902
19903         Merge from coreutils.
19904
19905         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
19906         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
19907         (gl_DEFAULT_POSIX2_VERSION): Move
19908         the documentation from 'configure' into 'config.hin',
19909         so that 'configure --help' isn't burdened by it and
19910         we don't have to worry about its formatting there.
19911         Reword the documentation so that it's more succinct
19912         and can be run together into a single paragraph.
19913         * m4/same.m4 (gl_SAME): Check for pathconf.
19914
19915 2004-01-15  Paul Eggert  <eggert@twinsun.com>
19916
19917         Merge from coreutils.
19918
19919         * lib/posixver.c: Include posixver.h.
19920
19921         * lib/same.c: Include <stdbool.h>, <limits.h>.
19922         (_POSIX_NAME_MAX): Define if not defined.
19923         (MIN): New macro.
19924         (same_name): If file names are silently truncated, report
19925         that the file names are the same if they are the same after
19926         the silent truncation.
19927
19928         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
19929         conversion function.
19930         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
19931         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
19932         longer needed.
19933
19934 2004-01-15  Jim Meyering  <jim@meyering.net>
19935
19936         Merge from coreutils.
19937
19938         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
19939         if no library is required.
19940         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
19941         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
19942         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
19943         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
19944         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
19945         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
19946         value, $ac_cv_search_crypt, if it's "none required".
19947         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
19948         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
19949         not gl_FUNC_GETLOADAVG.
19950         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
19951         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
19952
19953 2004-01-15  Jim Meyering  <jim@meyering.net>
19954
19955         Merge from coreutils.
19956
19957         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
19958         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
19959         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
19960
19961         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
19962         optional configure-time default.
19963
19964         * lib/version-etc.c (version_etc_copyright): Update copyright date.
19965
19966         * lib/xreadlink.c (xreadlink): Correct outdated comment.
19967
19968 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
19969
19970         Merge from coreutils.
19971
19972         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
19973         value, $ac_cv_search_nanosleep, if it's "none required".
19974
19975 2004-01-14  Paul Eggert  <eggert@twinsun.com>
19976
19977         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
19978         with like-named macro in fnmatch.c.
19979         (EXT): Use an internal constant instead.
19980
19981         Merge fnmatch patches from glibc.
19982         * lib/fnmatch.c (mbsinit): Remove define.
19983         Add libc_hidden_ver (__fnmatch, fnmatch).
19984         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
19985         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
19986
19987 2004-01-14  Karl Berry  <karl@gnu.org>
19988
19989         * config/install-sh: update from automake.
19990
19991 2004-01-13  Karl Berry  <karl@gnu.org>
19992
19993         * config/install-sh: update from automake.
19994
19995 2004-01-09  Karl Berry  <karl@gnu.org>
19996
19997         * config/install-sh: update from automake.
19998
19999 2004-01-05  Karl Berry  <karl@gnu.org>
20000
20001         * config/config.{sub,guess}: update from config.
20002
20003 2003-12-31  Karl Berry  <karl@gnu.org>
20004
20005         * config/depcomp: update from automake.
20006
20007 2003-12-14  Karl Berry  <karl@gnu.org>
20008
20009         * lib/config.charset: update from gettext-runtime.
20010
20011 2003-12-03  Paul Eggert  <eggert@twinsun.com>
20012
20013         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
20014         Bug reported by Alfred M. Szmidt.
20015
20016 2003-12-03  Bruno Haible  <bruno@clisp.org>
20017
20018         * m4/gettext.m4: Upgrade from gettext-0.13.
20019         * m4/po.m4: Upgrade from gettext-0.13.
20020         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
20021         * m4/intmax.m4: New file, from gettext-0.13.
20022         * m4/printf-posix.m4: New file, from gettext-0.13.
20023
20024 2003-11-29  Karl Berry  <karl@gnu.org>
20025
20026         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
20027
20028 2003-11-25  Paul Eggert  <eggert@twinsun.com>
20029             Bruno Haible  <bruno@clisp.org>
20030
20031         * lib/printf-parse.h: Don't include sys/types.h.
20032         (ARG_NONE): New macro.
20033         (char_directive): Change type of *arg_index fields to size_t.
20034         * lib/printf-parse.c: Don't include sys/types.h.
20035         (SSIZE_MAX): Remove macro.
20036         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
20037         Remove unnecessary overflow check.
20038         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
20039         fields.
20040
20041 2003-11-25  Bruno Haible  <bruno@clisp.org>
20042
20043         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
20044
20045 2003-11-25  Bruno Haible  <bruno@clisp.org>
20046
20047         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
20048         gt_TYPE_SSIZE_T.
20049
20050 2003-11-24  Paul Eggert  <eggert@twinsun.com>
20051
20052         * modules/alloca: Remove dependency on xalloc.
20053
20054 2003-11-24  Paul Eggert  <eggert@twinsun.com>
20055
20056         * lib/alloca.c: Remove dependency on xalloc module.
20057         (xalloc_die): Remove.
20058         (memory_full) [!defined emacs]: New macro.
20059         [!defined emacs]: Don't include xalloc.h.
20060         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
20061         address arithmetic overflows.  Change datatypes a bit to avoid
20062         unnecessary casts.
20063
20064 2003-11-22  Jim Meyering  <jim@meyering.net>
20065
20066         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
20067         s/size/size_t/.
20068
20069 2003-11-21  Karl Berry  <karl@gnu.org>
20070
20071         * config/config.{sub,guess}: update from config.
20072
20073 2003-11-18  Karl Berry  <karl@gnu.org>
20074
20075         * config/config.{sub,guess}: update from config.
20076
20077         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
20078
20079 2003-11-17  Paul Eggert  <eggert@twinsun.com>
20080
20081         * README: Mention that S+T cannot overflow if S is the size of
20082         an existing object and T is sufficiently small.
20083
20084 2003-11-17  Jim Meyering  <jim@meyering.net>
20085
20086         On systems without utime and without a utimes function capable of
20087         dealing with a NULL struct utimbuf* argument, this utime replacement
20088         could -- in unusual circumstances -- leak a file descriptor.
20089         * lib/utime.c: Include <unistd.h> and <errno.h>.
20090         (utime_null): Be sure to close `fd' and to preserve errno.
20091         Reported by Geoff Collyer via Arnold Robbins.
20092
20093 2003-11-17  Bruno Haible  <bruno@clisp.org>
20094
20095         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
20096         (Depends-on): Add xsize.
20097
20098 2003-11-17  Bruno Haible  <bruno@clisp.org>
20099
20100         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
20101
20102 2003-11-17  Bruno Haible  <bruno@clisp.org>
20103
20104         * lib/vasnprintf.c (alloca): Remove fallback definition.
20105         (freea): Remove definition.
20106         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
20107         Reported by Paul Eggert.
20108
20109 2003-11-16  Paul Eggert  <eggert@twinsun.com>
20110             Bruno Haible  <bruno@clisp.org>
20111
20112         Protect against address arithmetic overflow.
20113         * lib/printf-args.h: Include stddef.h.
20114         (arguments): Change type of field 'count' to size_t.
20115         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
20116         'unsigned int' where appropriate.
20117         * lib/printf-parse.h: Include sys/types.h.
20118         (char_directive): Change type of *arg_index fields to ssize_t.
20119         (char_directives): Change type of fields 'count', max_*_length to
20120         size_t.
20121         * lib/printf-parse.c: Include sys/types.h and xsize.h.
20122         (SSIZE_MAX): Define fallback value.
20123         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
20124         instead of 'int' where appropriate. Check a_allocated, d_allocated
20125         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
20126         * lib/vasnprintf.c: Include xsize.h.
20127         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
20128         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
20129         overflow. Avoid wraparound when converting a width or precision from
20130         decimal to binary.
20131
20132 2003-11-16  Bruno Haible  <bruno@clisp.org>
20133
20134         Update from GNU gettext.
20135         * lib/printf-parse.c: Generalize to it can be compiled for wide
20136         strings.
20137         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
20138         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
20139         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
20140         SNPRINTF): New macros.
20141         Don't include <alloca.h> if the file is used inside libintl.
20142         (local_wcslen): New function, for Solaris 2.5.1.
20143         (VASNPRINTF): Use it instead of wcslen.
20144
20145 2003-11-16  Bruno Haible  <bruno@clisp.org>
20146
20147         * lib/xsize.h (xmax): New function.
20148         (xsum, xsum3, xsum4): Declare as "pure" functions.
20149
20150 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20151
20152         * modules/xalloc (Files): Undo latest change, since xalloc.h
20153         no longer needs SIZE_MAX or PTRDIFF_MAX.
20154
20155 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20156
20157         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
20158         gl_PTRDIFF_MAX.
20159
20160 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20161
20162         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
20163         "return", to pacify some unknown compiler.  Problem reported
20164         by Joerg Schilling.
20165
20166 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20167
20168         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
20169         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
20170         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
20171         heuristic is just as accurate as far as we know, and it removes a
20172         dependency on size_max.m4 and ptrdiff_max.m4.
20173
20174 2003-11-11  Bruno Haible  <bruno@clisp.org>
20175
20176         * modules/xsize (Files): Add m4/size_max.m4.
20177         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
20178
20179 2003-11-11  Bruno Haible  <bruno@clisp.org>
20180
20181         * m4/size_max.m4: New file.
20182         * m4/ptrdiff_max.m4: New file.
20183         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
20184         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
20185         (gl_XALLOC): Invoke it.
20186
20187 2003-11-11  Bruno Haible  <bruno@clisp.org>
20188
20189         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
20190         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
20191         defined.
20192
20193 2003-11-10  Paul Eggert  <eggert@twinsun.com>
20194
20195         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
20196         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
20197         rejected some allocations of exactly SIZE_MAX - 2 bytes.
20198         From Bruno Haible.
20199         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
20200         not (size_t) -1, since it's defined here.
20201
20202 2003-11-09  Karl Berry  <karl@gnu.org>
20203
20204         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
20205
20206 2003-11-06  Paul Eggert  <eggert@twinsun.com>
20207
20208         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
20209         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
20210         Reject sizes of exactly SIZE_MAX bytes.
20211         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
20212         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
20213
20214 2003-11-05  Bruno Haible  <bruno@clisp.org>
20215
20216         * lib/xsize.h: Include limits.h, to avoid a possible collision with
20217         SIZE_MAX defined in <limits.h> on Solaris.
20218
20219 2003-11-04  Jim Meyering  <jim@meyering.net>
20220
20221         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
20222         variable names, rather than @VAR@.
20223         * modules/poll: Likewise.
20224
20225 2003-11-04  Bruno Haible  <bruno@clisp.org>
20226
20227         * modules/xsize: New file.
20228         * modules/linebreak: Depend on xsize.
20229         * MODULES.html.sh (func_all_modules): Add xsize.
20230
20231 2003-11-04  Bruno Haible  <bruno@clisp.org>
20232
20233         * m4/xsize.m4: New file.
20234
20235 2003-11-04  Bruno Haible  <bruno@clisp.org>
20236
20237         * lib/xsize.h: New file.
20238         * lib/linebreak.c: Include xsize.h.
20239         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
20240         argument for overflow.
20241         Suggested by Paul Eggert.
20242
20243 2003-11-03  Karl Berry  <karl@gnu.org>
20244
20245         * config/config.{guess,sub}: update from config.
20246
20247 2003-11-03  Jim Meyering  <jim@meyering.net>
20248
20249         * modules/userspec (lib_SOURCES): Add userspec.h.
20250         (Include): Add "userspec.h".
20251         Improve description.
20252
20253 2003-11-03  Jim Meyering  <jim@meyering.net>
20254
20255         * lib/userspec.c: Include "userspec.h".
20256         * lib/userspec.h: New file.
20257
20258 2003-11-03  Bruno Haible  <bruno@clisp.org>
20259
20260         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
20261
20262 2003-11-03  Bruno Haible  <bruno@clisp.org>
20263
20264         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
20265         available, to avoid (extremely rare) race condition.
20266         Suggested by Paul Eggert.
20267
20268 2003-11-02  Karl Berry  <karl@gnu.org>
20269
20270         * config/srclist.txt (vasprintf.c): sync broken, sigh.
20271
20272 2003-10-31  Paul Eggert  <eggert@twinsun.com>
20273
20274         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
20275         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
20276         (read_filesystem_list): Set and use me_type_malloced.
20277         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
20278         whatever the type happens to be), for brevity and consistency.
20279         Check for size calculation overflow on Alphas running OSF/1.
20280
20281 2003-10-31  Jim Meyering  <jim@meyering.net>
20282
20283         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
20284
20285         * lib/linebuffer.c: Include <string.h> for declaration of memset.
20286
20287 2003-10-30  Paul Eggert  <eggert@twinsun.com>
20288             Bruno Haible  <bruno@clisp.org>
20289
20290         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
20291         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
20292
20293 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
20294
20295         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
20296         netbsd*-gnu*.  Suggested by Robert Millan.
20297
20298 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20299
20300         * modules/group-member: Depend on stdbool.
20301
20302 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20303
20304         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
20305
20306 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20307
20308         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
20309         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
20310         after the 'gnu' in these cases.  This fixes some bugs in the
20311         previous change, and is based on suggestions by Robert Millan.
20312
20313 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20314
20315         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
20316         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
20317         no longer needed.
20318         * lib/quotearg.c (quotearg_n_options): Use it.
20319         * lib/group-member.c: Include <stdbool.h>.
20320         (free_group_info): Arg is now const *; don't free arg.
20321         (get_group_info): Now returns bool and accepts struct group_info *,
20322         rather than returning a malloc'ed struct group_info *.
20323         All uses changed.  Check for overflow in internal size calculation.
20324
20325         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
20326         rather than xmalloc/xrealloc.
20327         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
20328         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
20329         conformance bug: the old code used a pointer after freeing the
20330         storage that it addressed.
20331         * lib/hash.c (hash_initialize): Simplify the code by using
20332         xalloc_oversized rather than doing it by hand.
20333         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
20334         the buffer preserved.  Use free and xmalloc instead.
20335         * lib/quotearg.c (quotearg_n_options): Likewise.
20336         Use a simpler test for size overflow.  Don't use xalloc_oversized
20337         because unsigned int might be wider than size_t (!); this suggests
20338         that we should switch from unsigned int to size_t for slot numbers.
20339
20340 2003-10-28  Paul Eggert  <eggert@twinsun.com>
20341
20342         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
20343         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
20344         NetBSD kernels.  Requested by Richard Stallman.
20345
20346 2003-10-27  Paul Eggert  <eggert@twinsun.com>
20347
20348         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
20349         to allocate the returned structure.  Do not allocate a subarray,
20350         as x2nrealloc will do that.
20351         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
20352         instead of xnrealloc.
20353         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
20354
20355 2003-10-27  Bruno Haible  <bruno@clisp.org>
20356
20357         * lib/stdbool_.h: Better support for BeOS.
20358
20359 2003-10-26  Paul Eggert  <eggert@twinsun.com>
20360
20361         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
20362         now uses inline.
20363
20364 2003-10-26  Paul Eggert  <eggert@twinsun.com>
20365
20366         * lib/xalloc.h (xalloc_oversized): New static inline function, for
20367         callers that want to do their own size-overflow checking.  Include
20368         <stdbool.h>, since xalloc_oversized returns bool.
20369         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
20370         to use xalloc_oversized.
20371
20372         Add two functions x2realloc, x2nrealloc, for programs that grow
20373         arrays dynamically by doubling their sizes.
20374         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
20375         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
20376         New functions.
20377
20378         Port to C99 semantics for 'inline' of external functions.
20379         Bug reported by Bruno Haible.
20380         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
20381         with the old contents of xnmalloc.
20382         (xnmalloc, xmalloc): Use it.
20383         (xnrealloc_inline): New static inline function,
20384         with the old contents of xnrealloc.
20385         (xnrealloc, xrealloc): Use it.
20386
20387         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
20388         that.
20389
20390 2003-10-26  Karl Berry  <karl@gnu.org>
20391
20392         * config/srclist.txt (COPYING.DOC): no longer available from
20393         /gd/gnuorg; don't know where the ultimate source is.
20394
20395 2003-10-25  Paul Eggert  <eggert@twinsun.com>
20396
20397         Fix several address-calculation bugs in the hash modules,
20398         plus some minor code cleanup.
20399
20400         * lib/hash.h: Include <stdbool.h>, for bool.
20401         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
20402         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
20403         hash_get_n_entries, hash_get_max_bucket_length,
20404         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
20405         hash_rehash): Use size_t rather than unsigned.
20406         * lib/hash.c (struct hash_table, hash_get_n_buckets,
20407         hash_get_n_buckets_used, hash_get_n_entries,
20408         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
20409         hash_get_entries, hash_do_for_each, hash_string, is_prime,
20410         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
20411         Likewise.
20412         (SIZE_MAX): Define if not defined.
20413         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
20414         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
20415         hash_print):
20416         Use const * when possible.
20417         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
20418         (check_tuning): Fix bug: if tuning parameters were very close to
20419         0 or 1, rounding errors could have caused subscript violations.
20420         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
20421         (hash_initialize): Add 'fail:' label
20422         to free table and return NULL, and use it to simplify code.
20423         Use calloc rather than clearing the storage ourself.
20424         (hash_initialize, hash_rehash): Check for arithmetic overflow in
20425         buffer size calculations.
20426         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
20427         Include <stddef.h>, for size_t.
20428         * lib/hash-pjw.c (hash_pjw): Likewise.
20429         Switch to method described by Bruno Haible.
20430         Include <limits.h>, for CHAR_BIT.
20431         (SIZE_BITS): New macro.
20432
20433 2003-10-23  Paul Eggert  <eggert@twinsun.com>
20434
20435         * m4/getline.m4 (AM_FUNC_GETLINE):
20436         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
20437         hosts.  Problem reported by Derek Robert Price in
20438         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
20439         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
20440         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
20441
20442 2003-10-21  Paul Eggert  <eggert@twinsun.com>
20443
20444         * lib/getndelim2.c (getndelim2): When size calculation overflows,
20445         ceiling the allocation at NMAX bytes rather than silently
20446         discarding input bytes before NMAX is reached.  This makes
20447         a difference only if NMAX exceeds SIZE_MAX / 2.
20448
20449         * lib/obstack.c: Merge from glibc.
20450         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
20451         Add libc_hidden_def (_obstack_newchunk).
20452         (_obstack_free) [! defined _LIBC]: Remove.
20453         [defined _LIBC]: Make a strong alias from obstack_free, rather than
20454         a clone of the function body.
20455         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
20456         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
20457
20458         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
20459         glibc.
20460         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
20461         arg to memcpy.
20462
20463         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
20464         (obstack_ptr_grow_fast, obstack_int_grow_fast):
20465         Don't use lvalue casts, as GCC plans to remove support for them
20466         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
20467         was also present in the non-GCC version, indicating that this
20468         code had always been buggy and had never been widely used.
20469         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
20470         Use the fast variant of each macro, rather than copying the
20471         definiens of the fast variant; that way, we'll be more likely to
20472         catch future bugs in the fast variants.
20473
20474 2003-10-20  Bruno Haible  <bruno@clisp.org>
20475
20476         * modules/wait-process: New file.
20477         * MODULES.html.sh (func_all_modules): Add wait-process.
20478
20479 2003-10-20  Bruno Haible  <bruno@clisp.org>
20480
20481         * m4/wait-process.m4: New file.
20482
20483 2003-10-20  Bruno Haible  <bruno@clisp.org>
20484
20485         * lib/wait-process.h: New file, from GNU gettext.
20486         * lib/wait-process.c: New file, from GNU gettext.
20487
20488 2003-10-19  Jim Meyering  <jim@meyering.net>
20489
20490         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
20491         HPUX 10.20.
20492
20493 2003-10-18  Karl Berry  <karl@gnu.org>
20494
20495         * config/config.guess: update from config.
20496
20497 2003-10-16  Paul Eggert  <eggert@twinsun.com>
20498
20499         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
20500         (getgroups): First arg is int, not size_t.
20501         Don't let 'free' mangle errno.
20502
20503 2003-10-16  Paul Eggert  <eggert@twinsun.com>
20504
20505         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
20506
20507 2003-10-16  Karl Berry  <karl@gnu.org>
20508
20509         * config/config.{guess,sub}: update from config.
20510
20511 2003-10-16  Jim Meyering  <jim@meyering.net>
20512
20513         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
20514         memcpy.
20515
20516 2003-10-15  Paul Eggert  <eggert@twinsun.com>
20517
20518         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
20519         (SIZE_MAX): Remove.
20520         (new_exclude, add_exclude_file): Initial size no longer needs to
20521         be a power of 2.
20522         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
20523         our own address arithmetic overflow checking.
20524
20525         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
20526         (fnmatch): Do not alloca more than 2000 wide characters;
20527         instead, use malloc for large buffers.
20528         Check for address arithmetic overflow, and return -1
20529         with errno set to ENOMEM in that case.
20530         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
20531         (NEW_PATTERN): Do not alloca more than 8000 bytes;
20532         instead, return -1.  Check for address arithmetic overflow.
20533
20534 2003-10-14  Paul Eggert  <eggert@twinsun.com>
20535
20536         Handle invalid suffixes and overflow independently, so that
20537         callers can treat them independently as needed.  Fix some bugs in
20538         suffix handling, e.g., "100k@" was not diagnosed as an invalid
20539         suffix for a human-readable blocksize.  The major caller-visible
20540         change is the addition of a new
20541         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
20542         that both overflow and suffix chars were found.
20543
20544         * lib/human.c (humblock): Don't check separately for invalid suffix
20545         char; that is xstrtoumax's job (now that its bug is fixed).
20546         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
20547         INTMAX_MAX]: New macros.
20548         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
20549         TYPE_MAXIMUM): New macros.
20550         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
20551         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
20552         if overflow occurs, as it's what __strtol does and it's more useful
20553         in practice.
20554         (__xstrtol): If __strtol reports some error other than ERANGE,
20555         reflect it to the caller as LONGINT_INVALID.  If it reports
20556         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
20557         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
20558         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
20559         value.
20560         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
20561         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
20562         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
20563         [defined UINTMAX_MAX]: New macros.
20564
20565 2003-10-14  Bruno Haible  <bruno@clisp.org>
20566
20567         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
20568
20569 2003-10-14  Bruno Haible  <bruno@clisp.org>
20570
20571         * m4/sig_atomic_t: New file, from GNU gettext.
20572         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
20573
20574 2003-10-14  Bruno Haible  <bruno@clisp.org>
20575
20576         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
20577         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
20578         Also use volatile where needed.
20579
20580 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20581
20582         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
20583         Change maintainer from Bruno Haible to 'all'.
20584
20585 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20586
20587         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
20588
20589 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20590
20591         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
20592         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
20593         and define in terms of the other primitives.
20594         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
20595         (SIZE_MAX): Define if not already defined.
20596         (array_size_overflow): New function.
20597         (xalloc_die): Abort instead of exiting if 'error' returns.
20598         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
20599         (xmalloc, xrealloc): Use them.
20600         (xcalloc): Check for address arithmetic overflow.
20601         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
20602         a bit faster than strcpy.
20603
20604 2003-10-10  Simon Josefsson  <jas@extundo.com>
20605
20606         * modules/argp (Depends-on): Add restrict and strcase.
20607
20608 2003-10-10  Simon Josefsson  <jas@extundo.com>
20609
20610         * m4/argp.m4: Add AC_C_INLINE.
20611
20612 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20613
20614         Merge getpass from libc, plus a few fixes.
20615
20616         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
20617         Include <stdbool.h>.
20618         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
20619         __fsetlocking to empty.
20620         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
20621         do include <bits/libc-lock.h>.
20622         Do not include <fcntl.h>; not needed.
20623         [_LIBC]: Include <wchar.h>.
20624         (NOTCANCEL_MODE): New macro.
20625         (flockfile, funlockfile) [_LIBC]: New macros.
20626         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
20627         [!_LIBC]: New macros.
20628         (call_fclose): New function.
20629         (getpass): Use it.  Save tty stream separately; this simplifies the
20630         code and makes it more reliable if stdin happens to equal stdout.
20631         Invoke __fsetlocking on tty.
20632         Handle thread cancellation if needed.
20633         Namespace cleanup (use __tcgetattr, __getline).
20634         Use bool for Booleans.
20635         [USE_IN_LIBIO]: Handle wide streams.
20636         [!_LIBC]: Unconditionally do the fseek, since we don't know what
20637         stream might go where.
20638
20639         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
20640         doesn't have to include <stdio.h> before us.
20641         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
20642         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
20643         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
20644         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
20645         if not declared, so that we can use getpass.c code from libc without
20646         rewriting it.
20647         (flockfile, ftrylockfile, funlockfile): New macros.
20648
20649 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20650
20651         * modules/getpass: Depend on stdbool.
20652
20653 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20654
20655         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
20656
20657 2003-10-07  Karl Berry  <karl@gnu.org>
20658
20659         * config/config.{guess,sub}: update from config.
20660
20661 2003-10-06  Jim Meyering  <jim@meyering.net>
20662             Bruno Haible  <bruno@clisp.org>
20663
20664         This lets translators provide better translations for the
20665         "Written by ..." part of --version output.
20666         * lib/version-etc.h: Include stdarg.h.
20667         (version_etc_copyright): Declare as readonly.
20668         (version_etc): Make this function variadic with a NULL-terminated list
20669         of author name strings.
20670         (version_etc_va): New declaration.
20671         * lib/version-etc.c: Include stdarg.h, stdlib.h.
20672         (version_etc_copyright): Declare as readonly.
20673         (version_etc_va): New function. Provide a different translatable string
20674         for each possible number of authors < 10. Abbreviate when there are 10
20675         authors or more.
20676         (version_etc): Make this function variadic. Call version_etc_va.
20677         Suggestion from Gary V. Vaughan.
20678
20679         * lib/long-options.h (parse_long_options): Change prototype: the
20680         authors string is moved to the end and becomes variadic.
20681         * lib/long-options.c: Include stdarg.h.
20682         (parse_long_options): Make this function variadic, too.
20683         Call version_etc_va, not version_etc.
20684
20685 2003-10-06  Bruno Haible  <bruno@clisp.org>
20686
20687         * modules/version-etc-2: Remove file.
20688         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
20689
20690 2003-10-06  Bruno Haible  <bruno@clisp.org>
20691
20692         * modules/fatal-signal: New file.
20693         * MODULES.html.sh (func_all_modules): Add fatal-signal.
20694
20695 2003-10-06  Bruno Haible  <bruno@clisp.org>
20696
20697         * m4/fatal-signal.m4: New file.
20698         * m4/signalblocking.m4: New file, from GNU gettext.
20699
20700 2003-10-06  Bruno Haible  <bruno@clisp.org>
20701
20702         * lib/version-etc-2.h: Remove file.
20703         * lib/version-etc-2.c: Remove file.
20704
20705 2003-10-06  Bruno Haible  <bruno@clisp.org>
20706
20707         * lib/fatal-signal.h: New file, from GNU gettext.
20708         * lib/fatal-signal.c: New file, from GNU gettext.
20709
20710 2003-10-05  Paul Eggert  <eggert@twinsun.com>
20711
20712         * README: Rework advice for preventing empty .o files.
20713         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
20714         not <sys/types.h>.
20715
20716 2003-10-04  Karl Berry  <karl@gnu.org>
20717
20718         * lib/argp*: update from libc.
20719
20720 2003-10-04  Karl Berry  <karl@gnu.org>
20721
20722         * config/config.{guess,sub}: update from config.
20723
20724 2003-10-02  Bruno Haible  <bruno@clisp.org>
20725
20726         * modules/lchown (Include): Add lchown.h.
20727         * modules/time_r (Include): Use "..." syntax.
20728         * modules/xgetdomainname (Include): Add xgetdomainname.h.
20729
20730 2003-10-01  Simon Josefsson  <jas@extundo.com>
20731
20732         * MODULES.html.sh (func_all_modules): Move gethostname from section
20733         'based on' to section 'lacking' POSIX:2001.
20734
20735 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
20736
20737         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
20738         to output mode on the same stream.
20739
20740 2003-09-29  Paul Eggert  <eggert@twinsun.com>
20741
20742         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
20743         Fix arg typo in previous patch.
20744
20745 2003-09-28  Jim Meyering  <jim@meyering.net>
20746
20747         * lib/error.c: Correct cpp indentation.
20748
20749 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20750
20751         * modules/free: New file.
20752
20753 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20754
20755         * m4/free.m4: New file.
20756
20757 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20758
20759         * lib/minmax.h (MIN, MAX)
20760         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
20761         Omit the special code that used __typeof__, since we worry that
20762         it could be more trouble than it's worth.  See:
20763         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
20764         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
20765
20766         * lib/free.c: New file.
20767
20768 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
20769
20770         Trivial fixes to Makefile.am parts of module listings.
20771         * modules/strstr: Append strstr.h to lib_SOURCES.
20772         * modules/strcase: Likewise, for strcase.h.
20773
20774 2003-09-27  Karl Berry  <karl@gnu.org>
20775
20776         * config/mkinstalldirs: update from automake.
20777
20778 2003-09-26  Paul Eggert  <eggert@twinsun.com>
20779
20780         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
20781         (error_tail): Do not loop, reallocating temporary buffer, since
20782         the output cannot contain more wide characters than the input
20783         contains bytes, the size must be big enough already.  This avoids
20784         one potential size overflow calculation.  Check for size overflow
20785         when calculating temporary buffer size.  Free temporary buffer
20786         when done, if it was allocated with malloc; this plugs a memory
20787         leak.  Remove casts from void * to pointers, that are no longer
20788         needed now that we're assuming C89 or better.
20789
20790         Merge error changes from glibc.
20791
20792         * lib/error.c, error.h: Update copyright notice header to match glibc.
20793         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
20794         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
20795         Disable cancellation while printing error.
20796         * lib/error.h: Prepend __ to parameter names.
20797
20798 2003-09-26  Jim Meyering  <jim@meyering.net>
20799
20800         * lib/error.c (error_tail): Move some declarations
20801         into inner scope where the local variables are used.
20802
20803 2003-09-26  Bruno Haible  <bruno@clisp.org>
20804
20805         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
20806         stpncpy().
20807         Don't define stpncpy through config.h; it's now done through stpncpy.h.
20808
20809 2003-09-26  Bruno Haible  <bruno@clisp.org>
20810
20811         * lib/stpncpy.h (gnu_stpncpy): New declaration.
20812         (stpncpy): Define as alias for gnu_stpncpy.
20813         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
20814
20815 2003-09-25  Simon Josefsson  <jas@extundo.com>
20816
20817         * lib/xgetdomainname.h: New file.
20818         * lib/xgetdomainname.c: New file.
20819
20820 2003-09-25  Simon Josefsson  <jas@extundo.com>
20821             Bruno Haible  <bruno@clisp.org>
20822
20823         * modules/getdomainname: New file.
20824         * modules/xgetdomainname: New file.
20825         * MODULES.html.sh (func_all_modules): Add getdomainname,
20826         xgetdomainname.
20827
20828 2003-09-25  Simon Josefsson  <jas@extundo.com>
20829             Bruno Haible  <bruno@clisp.org>
20830
20831         * m4/getdomainname.m4: New file.
20832
20833 2003-09-25  Simon Josefsson  <jas@extundo.com>
20834             Bruno Haible  <bruno@clisp.org>
20835
20836         * lib/getdomainname.h: New file.
20837         * lib/getdomainname.c: New file.
20838
20839 2003-09-25  Karl Berry  <karl@gnu.org>
20840
20841         * lib/argp-fmtstream.c, argp-help.c: update from libc.
20842
20843 2003-09-25  Karl Berry  <karl@gnu.org>
20844
20845         * config/install-sh: update from automake.
20846
20847 2003-09-25  Bruno Haible  <bruno@clisp.org>
20848
20849         * modules/version-etc-2: New file, from modules/version-etc with
20850         modifications.
20851         * MODULES.html.sh (func_all_modules): Add version-etc-2.
20852
20853 2003-09-25  Bruno Haible  <bruno@clisp.org>
20854
20855         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
20856         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
20857
20858 2003-09-24  Simon Josefsson  <jas@extundo.com>
20859
20860         * modules/xgethostname: Add xgethostname.h.
20861
20862 2003-09-24  Paul Eggert  <eggert@twinsun.com>
20863
20864         * lib/linebuffer.c (freebuffer): Don't free the argument, just
20865         the buffer associated with the argument.  Bug reported by
20866         Simon Josefsson.
20867
20868 2003-09-24  Paul Eggert  <eggert@twinsun.com>
20869
20870         * README: Document assumptions that 'int' is at least 32 bits
20871         wide, that integer arithmetic is 2's complement without overflow,
20872         that there are no holes in integer values, that adding sizes of
20873         two nonoverlapping objects can't overflow, and that all-bits-zero
20874         yields scalar zero.  Fix spelling and capitalization typos.
20875
20876 2003-09-19  Karl Berry  <karl@gnu.org>
20877
20878         * lib/argp.h: update from libc.
20879
20880 2003-09-17  Paul Eggert  <eggert@twinsun.com>
20881
20882         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
20883         to avoid spurious warnings like "AC_RUN_IFELSE was called before
20884         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
20885
20886 2003-09-17  Paul Eggert  <eggert@twinsun.com>
20887
20888         * gnulib-tool: Use "test -h", not "test -L", for portability
20889         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
20890         (tags_regexp): Remove, since \| doesn't conform to POSIX.
20891         (sed_extract_prog): Issue s commands one-by-one, rather than
20892         using \| in one s command.
20893
20894 2003-09-16  Paul Eggert  <eggert@twinsun.com>
20895
20896         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
20897         input error, instead of returning NULL the next time we are called
20898         (and therefore losing track of errno).
20899
20900 2003-09-16  Bruno Haible  <bruno@clisp.org>
20901
20902         * gnulib-tool (func_create_testdir): Warn about duplicated
20903         dependencies.
20904
20905 2003-09-15  Paul Eggert  <eggert@twinsun.com>
20906
20907         * modules/argmatch, modules/fatal, modules/obstack,
20908         modules/xalloc, modules/xgethostname: Sort dependencies by
20909         importance, not alphabetically.
20910
20911 2003-09-15  Paul Eggert  <eggert@twinsun.com>
20912
20913         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
20914         fails, so that the caller gets the proper errno.
20915
20916         * lib/readutmp.c (read_utmp): Likewise.
20917         Check for fstat error.  Close stream and free storage
20918         when failing.
20919
20920 2003-09-14  Karl Berry  <karl@gnu.org>
20921
20922         * config/srclist.txt (strdup.c): disable for c89 changes.
20923
20924 2003-09-14  Jim Meyering  <jim@meyering.net>
20925
20926         * lib/getloadavg.c: Correct cpp indentation.
20927         * lib/strdup.c: Likewise.
20928         * lib/vasnprintf.c: Likewise.
20929
20930 2003-09-14  Bruno Haible  <bruno@clisp.org>
20931
20932         * modules/fwriteerror: New file.
20933         * MODULES.html.sh (func_all_modules): Add fwriteerror.
20934
20935 2003-09-14  Bruno Haible  <bruno@clisp.org>
20936
20937         * lib/fwriteerror.h: New file.
20938         * lib/fwriteerror.c: New file.
20939
20940 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20941
20942         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
20943         modules/xgethostname, modules/xalloc: Depend on exit.
20944
20945 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20946
20947         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
20948
20949         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
20950         and AC_MINIX, too, so that their extensions are available.
20951
20952         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
20953         This macro has been superseded by gl_BACKUPFILE.
20954
20955         More patches to assume C89 or better.
20956
20957         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
20958
20959         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
20960         unconditionally.
20961         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
20962         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
20963         Include <string.h>, <stdlib.h> unconditionally.
20964         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
20965         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
20966         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
20967         headers or for string.h.
20968         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
20969         or strtoul.
20970
20971         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
20972         headers.
20973         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
20974         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20975         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
20976         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
20977         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20978         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
20979         memcpy, memset.
20980         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
20981         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
20982         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
20983         strtol.
20984         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
20985         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
20986         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
20987         strtoul.
20988
20989 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20990
20991         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
20992         * lib/obstack.c [!defined _LIBC]: Likewise.
20993         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
20994         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
20995         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
20996
20997         More changes to assume C89 or better.
20998
20999         * lib/error.c (error_tail): Assume vprintf.
21000
21001         * lib/argmatch.c (getenv): Remove decl.
21002         * lib/progreloc.c (get_full_program_name): Define via prototype.
21003         * lib/setenv.c (clearenv): Likewise.
21004         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
21005         needed.
21006         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
21007         (malloc, memcpy): Remove decls.
21008         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
21009         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
21010         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
21011         (memcpy): Remove macro.
21012         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
21013         (__P): Remove.  All uses removed.
21014         (PTR): Remove.  All uses changed to void *.
21015         (CHAR_BIT, NULL): Remove.
21016         (spaces, zeros, memset_space, memset_zero)
21017         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
21018         Remove.
21019         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
21020         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
21021         Define with prototype.
21022         Remove now-unnecessary prototype decl.
21023         (extra_args_spec): Assume ANSI C.  All uses changed.
21024         (extra_args_spec_iso): Remove.
21025         (my_strftime, emacs_strftimeu): Define via prototype.
21026         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
21027         unconditionally.
21028         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
21029         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
21030         (strtoul, strtol): Remove decls.
21031         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
21032         LONG_MAX): Remove.
21033         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
21034         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
21035         (LOCALE_PARAM_PROTO): New macro.
21036         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
21037         (INTERNAL (strtol), strtol): Define with a prototype.
21038         (PARAMS): Remove.  All uses removed.
21039         * lib/tempname.c: Include <string.h> unconditionally.
21040         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
21041         * lib/xgethostname.c (main): Define with a prototype.
21042         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
21043         Include <stdlib.h> unconditionally.
21044         (calloc, malloc, realloc, free): Remove decls.
21045         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
21046         Include <stdlib.h> unconditionally.  Sort include file names.
21047         (strtod): Remove.
21048         (xstrtod): Define with a prototype.
21049         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
21050         (strtol, strtoul): Remove decls.
21051
21052 2003-09-11  Paul Eggert  <eggert@twinsun.com>
21053
21054         More patches to assume C89 or better.
21055         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
21056         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
21057         string.h, memchr, STDC_HEADERS.
21058
21059 2003-09-11  Paul Eggert  <eggert@twinsun.com>
21060
21061         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
21062         Include <stdlib.h>, <string.h> unconditionally.
21063         Remove now-unnecessary cast to char *.
21064         * lib/strnlen.c: Include <string.h> unconditionally.
21065         * lib/yesno.c (yesno): Define with a prototype.
21066
21067 2003-09-11  Bruno Haible  <bruno@clisp.org>
21068
21069         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
21070
21071 2003-09-10  Jim Meyering  <jim@meyering.net>
21072
21073         * lib/error.c: Correct indentation of cpp directives.
21074
21075 2003-09-10  Bruno Haible  <bruno@clisp.org>
21076
21077         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
21078         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
21079         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
21080         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
21081         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
21082         <stdlib.h> and <string.h> checks.
21083         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
21084         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
21085
21086 2003-09-10  Bruno Haible  <bruno@clisp.org>
21087
21088         * lib/strcspn.c: Include <string.h> unconditionally.
21089         * lib/strpbrk.c: Include <string.h> unconditionally.
21090         * lib/strstr.c: Include <string.h> unconditionally.
21091         * lib/unicodeio.c: Include <string.h> unconditionally.
21092         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
21093         * lib/unsetenv.c: Likewise.
21094         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
21095         * lib/yesno.c: Include <stdlib.h> unconditionally.
21096         (rpmatch): Add prototype.
21097
21098 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21099
21100         More patches to assume C89 or better.
21101         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
21102         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
21103         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
21104         or for string.h.
21105         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
21106         stdlib.h.
21107         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
21108         C headers.
21109         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
21110         string.h.
21111         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
21112         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
21113         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
21114         or for string.h.
21115         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
21116         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
21117         C headers.
21118         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
21119         memcpy.
21120         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
21121         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
21122         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
21123         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
21124         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
21125         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
21126         string.h, free.
21127         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
21128         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
21129         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
21130         C headers, or for string.h.
21131         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
21132         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
21133         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
21134         headers, memory.h, stdlib.h, string.h, strings.h.
21135         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
21136         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
21137         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
21138         strchr.
21139         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
21140         headers, memory.h, string.h.
21141         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
21142         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
21143         free.
21144         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
21145         headers.
21146         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
21147         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
21148         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
21149         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
21150         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
21151
21152 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21153
21154         More K&R removal.
21155
21156         * lib/acosl.c (main): Use a prototype.
21157         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
21158         tanl.c: Likewise.
21159
21160         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
21161
21162         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
21163         (getopt, etopt_long, getopt_long_only, _getopt_internal)
21164         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
21165         with a prototype.
21166         * lib/getopt.c (const): Remove macro.
21167         Include <string.h> unconditionally.
21168         (my_index): Remove; all uses changed to strchr.
21169         (strlen): Remove decl.
21170         (exchange): Remove forward decl; no longer needed.
21171         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
21172         Define with prototype.
21173         * lib/getopt1.c (const): Remove macro.
21174         (getopt_long, getopt_long_only, main): Define with prototype.
21175
21176         * lib/getugroups.c: Include <string.h> unconditionally.
21177
21178         * lib/getusershell.c: Include <stdlib.h> unconditionally.
21179         (getusershell, setusershell, endusershell, readname, main):
21180         Define with prototypes.
21181
21182         * lib/group-member.c: Include group-member.h first.
21183         Include <stdlib.h> unconditionally.
21184
21185         * lib/hard-locale.c: Include hard-locale.h first.
21186         Include <stdlib.h>, <string.h> unconditionally.
21187
21188         * lib/hash.c (free, malloc): Remove decls.
21189         Include <stdlib.h> unconditionally.
21190
21191         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
21192         (getenv): Do not declare.
21193
21194         * lib/idcache.c: Include <string.h> unconditionally.
21195
21196         * lib/long-options.c: Include long-options.h first, to test interface.
21197         Include <stdlib.h> unconditionally.
21198
21199         * lib/makepath.c: Include makepath.h first, to test interface.
21200         Include <stdlib.h> and <string.h> unconditionally.
21201
21202         * lib/linebuffer.c: Include <stdlib.h>.
21203         (free): Remove decl.
21204
21205         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
21206         stddef.h. rpl_malloc returns void *, not char *.
21207         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
21208         prototype.
21209
21210         * lib/md5.h: Include <limits.h> unconditionally.
21211         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
21212         (__P): Remove; all uses removed.
21213         * lib/md5.c: Include "md5.h" first.
21214         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
21215         md5_buffer, md5_process_bytes, md5_process_block):
21216         Define with prototypes.
21217         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
21218         * lib/sha.c: Include "sha.h" first.
21219         Include <stdlib.h>, <string.h> unconditionally.
21220
21221         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
21222         * lib/memcmp.c (__ptr_t): Likewise.
21223         * lib/memrchr.c (__ptr_t): Likewise.
21224         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
21225         Include <string.h> unconditionally.
21226         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
21227         * lib/memchr.c: Include <stdlib.h> unconditionally.
21228         * lib/memchr.c (LONG_MAX): Remove.
21229         * lib/memrchr.c (LONG_MAX): Likewise.
21230         * lib/memchr.c (__memchr): Define via a prototype.
21231         * lib/memrchr.c (__memrchr): Likewise.
21232         * lib/memcmp.c (__P): Remove, and remove all uses.
21233         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
21234         Remove forward decls; no longer needed.
21235         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
21236         Use types required by C89 in prototype.
21237
21238         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
21239         * lib/savedir.c: Likewise.
21240         * lib/mkdir.c (free): Remove decl.
21241         * lib/rmdir.c (rmdir): Define with a prototype.
21242         * lib/savedir.c: Include savedir.h first, to test interface.
21243
21244         * lib/mktime.c (STDC_HEADERS): Remove.
21245         Include <stdlib.h>, <string.h> unconditionally.
21246
21247         * lib/modechange.c: Include <stdlib.h> unconditionally.
21248         (malloc): Remove decl.
21249
21250         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
21251         (free): Remove decl.
21252
21253         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
21254         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
21255         (This type really should be intptr_t, but that's a C99ism.)
21256         (_obstack_memcpy): Remove: all uses changed to memcpy.
21257         Include <string.h> unconditionally.
21258         (struct obstack): Assume __STDC__ for types of members
21259         chunkfun, freefun, extra_arg.
21260         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
21261         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
21262         obstack_begin, obstack_specify_allocation,
21263         obstack_specify_allocation_with_arg, obstack_chunkfun,
21264         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
21265         Remove unprototyped decls and the macros that use them.
21266         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
21267         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
21268         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
21269         (defined __STDC__ && __STDC__)]:
21270         Remove nonprototyped code.
21271         Include <stdlib.h> unconditionally.
21272         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
21273         _obstack_allocated_p, _obstack_free, obstack_free,
21274         _obstack_memory_used, print_and_abort):
21275         Define using prototypes.
21276         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
21277         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
21278         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
21279         obstack_next_free, obstack_object_size, obstack_room) [0]:
21280         Remove unused, unprototyped code.
21281
21282         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
21283
21284         * lib/physmem.c (physmem_total, physmem_available, main): Define
21285         with prototypes.
21286
21287         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
21288         (main): Define with a prototype.
21289
21290         * lib/posixver.c (getenv): Remove decl.
21291
21292         * lib/putenv.c (malloc): Returns void *, not char *.
21293         Include <string.h> unconditionally.
21294         (strchr, memcpy, NULL): Do not define.
21295
21296         * lib/readtokens.c: Include readtokens.h first, to test interface.
21297         Include <stdlib.h>, <string.h> unconditionally.
21298         (init_tokenbuffer): Define with a prototype.
21299
21300         * lib/regex.c (PARAMS): Remove.  All uses removed.
21301         All uses of _RE_ARGS removed, too.
21302         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21303         unconditionally.
21304         (bzero): Assume memset exists.
21305         (memcmp, memcpy, NULL): Remove.
21306         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
21307         char, or assignments to local vars of type signed char.
21308         (init_syntax_once, PREFIX(extract_number_and_incr),
21309         PREFIX(print_partial_compiled_pattern),
21310         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
21311         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
21312         PREFIX(regex_grow_registers), PREFIX(regex_compile),
21313         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
21314         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
21315         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
21316         wcs_compile_range, byte_compile_range, truncate_wchar,
21317         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
21318         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
21319         count_mbs_length, wcs_re_match_2_internal,
21320         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
21321         PREFIX(alt_match_null_string_p),
21322         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
21323         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
21324         regfree, PREFIX(extract_number)): Define with prototype.  Remove
21325         now-unnecessary declaration, if any.
21326         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
21327         regcomp, regexec):
21328         Remove now-unnecessary casts among pointer types.
21329         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
21330
21331         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
21332         (free): Remove decl.
21333
21334         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
21335
21336         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
21337         (free): Remove decl.
21338
21339         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
21340         * lib/xgetcwd.c: Likewise.
21341
21342         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
21343         (free): Remove decl.
21344
21345         * lib/strchrnul.c (strchrnul): Define with a prototype.
21346         Fix bug: c_in was not converted to char before searching.
21347
21348         The following changes are not K&R related:
21349
21350         * lib/group-member.h: Include <sys/types.h>, so that this file is
21351         self-contained.
21352         * lib/makepath.h: Likewise.
21353
21354         * lib/getusershell.c (readname, default_index, line_size, readname):
21355         Use size_t, not int, for sizes.
21356         (readname): If the size overflows, report an error instead of
21357         looping forever.
21358
21359 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21360
21361         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
21362         libc.
21363
21364 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21365
21366         * README: New section: portability guidelines.
21367
21368 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
21369
21370         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
21371         C89 spec.
21372
21373 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
21374
21375         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
21376
21377 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21378
21379         Assume C89 or better; remove K&R cruft.
21380         A few of these changes were first proposed by Derek Robert Price
21381         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
21382
21383         * lib/addext.c: Include <string.h> unconditionally.
21384         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
21385         Don't declare getenv or malloc.
21386
21387         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
21388         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
21389         (NULL): Remove.
21390         (find_stack_direction, alloca): Use prototypes.
21391
21392         * lib/atexit.c (atexit): Define using a prototype.
21393
21394         * lib/basename.c, dirname.c, stripslash.c:
21395         Include <string.h> unconditionally.
21396
21397         * lib/bcopy.c: Include <stddef.h>.
21398         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
21399
21400         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
21401
21402         * lib/error.h (error, error_at_line, error_print_progname)
21403         [! (defined (__STDC__) && __STDC__)]: Remove decls.
21404         * lib/error.c: Include error.h first, to check interface.
21405         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
21406         (VA_START): Remove; all uses changeed to va_start.
21407         (exit, strerror): Remove decls.
21408         (error_print_progname): Prototype uncondionally.
21409         Don't include <errno.h>; no longer needed.
21410         (private_strerror): Remove.
21411         (error_tail): Always define.
21412         (error, error_at_line): Assume C89 or better; always use prototypes.
21413         * lib/fatal.c: Include "fatal.h" first, to test interface.
21414         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
21415         (VA_START): Remove; all uses changed to va_start.
21416         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
21417         this case.
21418         (exit): Remove decl.
21419         (fatal): Prototype unconditionally.  Assume va_start works.
21420         Abort at end, to pacify gcc.
21421
21422         * lib/euidaccess.c (main): Define with a prototype.
21423
21424         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
21425
21426         * lib/exitfail.c: Include <stdlib.h> unconditionally.
21427
21428         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
21429         prototypes.
21430         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
21431         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
21432         (getenv): Remove decl.
21433         (fnmatch): Define using a prototype.
21434         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
21435         (FCT): Define using a prototype.
21436
21437         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
21438
21439         * lib/gethostname.c: Include <stddef.h>.
21440         (gethostname): Define with prototype.  Length is size_t, not int.
21441
21442 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21443
21444         Assume C89 or better; remove K&R cruft.
21445         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
21446         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
21447         string.h, getenv, malloc.
21448         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
21449         headers.
21450         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
21451         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
21452         do not check for strerror.
21453         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
21454         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
21455         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
21456         do not check for doprnt or vprintf.
21457         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
21458         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
21459
21460 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21461
21462         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
21463         getversion.c should have been removed then, but was accidentally
21464         preserved.
21465
21466         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
21467         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
21468
21469 2003-09-08  Karl Berry  <karl@gnu.org>
21470
21471         * config/config.sub, config.guess, srclistvars.sh: update from savannah
21472                 config, forget about prep.
21473
21474         * config/depcomp, missing: update from automake.
21475
21476 2003-09-07  Paul Eggert  <eggert@twinsun.com>
21477
21478         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
21479         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
21480
21481 2003-09-07  Paul Eggert  <eggert@twinsun.com>
21482
21483         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
21484         copy_tm_result.  Bug reported by Simon Josefsson in
21485         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
21486
21487 2003-09-06  Paul Eggert  <eggert@twinsun.com>
21488
21489         * m4/time_r.m4: New file.
21490         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
21491         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
21492         is. Check for timegm declaration.
21493         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
21494         Do not check for gmtime_r.
21495         Replace mktime if __mktime_internal does not exist and if mktime
21496         hasn't been replaced already.
21497
21498 2003-09-06  Paul Eggert  <eggert@twinsun.com>
21499
21500         * lib/time_r.c, lib/time_r.h: New files.
21501
21502         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
21503         __localtime_r.
21504         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
21505         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
21506
21507         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
21508         __gmtime_r.
21509         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
21510         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
21511         Include <time_r.h>.
21512
21513         * lib/timegm.c: Switch to glibc implementation, with the following
21514         changes:
21515         [defined HAVE_CONFIG_H]: Include <config.h>.
21516         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
21517         (__mktime_internal) [!defined _LIBC]: New decl.
21518         (__gmtime_r) [!defined _LIBC]: New macro and function.
21519         (timegm): Use a prototype, since gnulib assumes C89.
21520         Do not bother declaring tmp to be const, as it's not really usefu.
21521         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
21522         (timegm): Declare only if HAVE_DECL_TIMEGM.
21523
21524 2003-09-06  Paul Eggert  <eggert@twinsun.com>
21525
21526         * MODULES.html.sh (func_all_modules): Add time_r.
21527         * modules/time_r: New file.
21528         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
21529         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
21530
21531 2003-09-03  Paul Eggert  <eggert@twinsun.com>
21532
21533         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
21534         Bug reported by Lute Kamstra in
21535         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
21536
21537         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
21538         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
21539         course with correspondingly smaller numbers for tomorrow and
21540         yesterday.  From Tadayoshi Funaba.  Originally installed into
21541         sh-utils on 1999-08-07, but the patch got lost (I guess during the
21542         coreutils merge?).
21543
21544 2003-08-31  Simon Josefsson  <jas@extundo.com>
21545
21546         * modules/timegm: New file.
21547         * MODULES.html.sh (func_all_modules): Add timegm.
21548
21549 2003-08-31  Simon Josefsson  <jas@extundo.com>
21550
21551         * m4/timegm.m4: New file.
21552
21553 2003-08-31  Simon Josefsson  <jas@extundo.com>
21554
21555         * lib/timegm.h: New file.
21556         * lib/timegm.c: New file.  Based on
21557         wget-1.8.2/src/http.c:mktime_from_utc.
21558
21559 2003-08-31  Karl Berry  <karl@gnu.org>
21560
21561         * lib/argp.h: update from libc.
21562
21563 2003-08-28  Bruno Haible  <bruno@clisp.org>
21564
21565         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
21566         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
21567         followed by '#define fnmatch fnmatch_posix' gives an error.
21568
21569 2003-08-28  Bruno Haible  <bruno@clisp.org>
21570
21571         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
21572         warning on QNX, which defines O_BINARY to 000000.
21573
21574 2003-08-27  Jim Meyering  <jim@meyering.net>
21575
21576         * m4/mkstemp.m4: Require that the system mkstemp be able to create
21577         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
21578         would fail after 32.  Reported by Danny Levinson.  Details here:
21579         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
21580
21581 2003-08-24  Bruno Haible  <bruno@clisp.org>
21582
21583         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
21584         MSVC7 <stdio.h> is included later.
21585
21586 2003-08-22  Simon Josefsson  <jas@extundo.com>
21587
21588         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
21589
21590 2003-08-20  Karl Berry  <karl@gnu.org>
21591
21592         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
21593
21594 2003-08-20  Bruno Haible  <bruno@clisp.org>
21595
21596         * modules/progname: New file.
21597         * MODULES.html.sh (func_all_modules): Add progname.
21598
21599 2003-08-20  Bruno Haible  <bruno@clisp.org>
21600
21601         * lib/progname.h: New file, from GNU gettext.
21602         * lib/progname.c: New file, from GNU gettext.
21603         * lib/progreloc.c: New file, from GNU gettext.
21604
21605 2003-08-19  Jim Meyering  <jim@meyering.net>
21606
21607         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
21608         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
21609
21610 2003-08-19  Bruno Haible  <bruno@clisp.org>
21611
21612         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
21613         more.
21614
21615 2003-08-19  Bruno Haible  <bruno@clisp.org>
21616
21617         * lib/xstrdup.c: Assume <string.h> exists.
21618
21619 2003-08-18  Paul Eggert  <eggert@twinsun.com>
21620
21621         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
21622         in makefile rules.
21623
21624 2003-08-18  Jim Meyering  <jim@meyering.net>
21625
21626         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
21627         * m4/lib-ld.m4: Likewise.
21628
21629 2003-08-18  Jim Meyering  <jim@meyering.net>
21630
21631         * lib/setenv.h: Indent nested cpp directive.
21632         * lib/vasnprintf.c: Remove trailing blanks.
21633
21634 2003-08-17  Simon Josefsson  <jas@extundo.com>
21635
21636         * modules/xstrndup: New file.
21637         * MODULES.html.sh (func_all_modules): Add xstrndup.
21638
21639 2003-08-17  Simon Josefsson  <jas@extundo.com>
21640
21641         * modules/argp: Fix autoconf macro name. Add more dependencies.
21642
21643 2003-08-17  Simon Josefsson  <jas@extundo.com>
21644
21645         * m4/xstrndup.m4: New file.
21646
21647 2003-08-17  Simon Josefsson  <jas@extundo.com>
21648
21649         * m4/argp.m4: New file.
21650
21651 2003-08-17  Simon Josefsson  <jas@extundo.com>
21652             Bruno Haible  <bruno@clisp.org>
21653
21654         * lib/xstrndup.h: New file.
21655         * lib/xstrndup.c: New file.
21656
21657 2003-08-17  Bruno Haible  <bruno@clisp.org>
21658
21659         * modules/strndup (Files, Include): Add lib/strndup.h.
21660
21661 2003-08-17  Bruno Haible  <bruno@clisp.org>
21662
21663         * modules/euidaccess (Files): Add lib/euidaccess.h.
21664
21665 2003-08-17  Bruno Haible  <bruno@clisp.org>
21666
21667         * lib/strndup.h: New file.
21668
21669 2003-08-17  Bruno Haible  <bruno@clisp.org>
21670
21671         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
21672         like AC_GNU_SOURCE.
21673         * modules/extensions (configure.ac): Comment out the invocation of
21674         gl_USE_SYSTEM_EXTENSIONS.
21675
21676 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21677
21678         Merges from coreutils, etc.
21679         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
21680         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
21681         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
21682         fixing a typo.
21683         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
21684         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
21685
21686 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21687
21688         Document merge from coreutils.
21689         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
21690         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
21691         * modules/utime: Add m4/utimes-null.m4.
21692
21693 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21694
21695         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
21696         space, undoing this 2003-08-12 change:
21697         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
21698
21699 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21700
21701         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
21702         strtoul.c from libc, undoing this 2003-08-12 change:
21703         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
21704
21705 2003-08-16  Jim Meyering  <jim@meyering.net>
21706
21707         Merges from coreutils.
21708         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
21709         prefix.  Adjust cache variables similarly.  Create 500 rather than
21710         just 300 files, to exercise bug on Darwin6.5, too.
21711         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
21712         $missing_dir.
21713         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
21714         AM_SYS_POSIX_TERMIOS.
21715         Reported by mkc@mathdogs.com.
21716         Also change use of $am_cv_sys_posix_termios
21717         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
21718         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
21719         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
21720         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
21721         in /proc/mounts until it finds one with matching device number.  This
21722         is unnecessary when the FILE argument *is* a mount point.  No stat call
21723         is necessary in that case.  So, disable the statvfs-testing code on
21724         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
21725         as RedHat bug# 84846.
21726         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
21727         to 1MB, so as not to render systems with no stack size limit (e.g.,
21728         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
21729         Include <unistd.h>.  On some systems,
21730         it is required for the definition of _SC_PAGESIZE.
21731
21732 2003-08-16  Jim Meyering  <jim@meyering.net>
21733
21734         Merge from coreutils.
21735         * lib/xstrtoimax.c: #else #if -> #elif.
21736         * lib/xstrtoumax.c: Likewise.
21737
21738 2003-08-16  Jim Meyering  <jim@meyering.net>
21739
21740         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
21741         * m4/utimes.m4: Removed.
21742         * m4/utimes-null.m4: Renamed from utimes.m4.
21743
21744         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
21745         to 1MB, so as not to render systems with no stack size limit (e.g.,
21746         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
21747         Include <unistd.h>.  On some systems,
21748         it is required for the definition of _SC_PAGESIZE.
21749
21750 2003-08-16  Jim Meyering  <jim@meyering.net>
21751         and Paul Eggert  <eggert@cs.ucla.edu>
21752
21753         Merges from coreutils, etc.
21754
21755         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
21756         using the latest version from cvs.  This avoids problems with #line
21757         directives using a vendor (Sun) compiler.
21758         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
21759         Don't set GETGROUPS_LIB here; now it's
21760         done via getgroups.m4's wrapper function.
21761         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
21762         rather than just in sh-util/configure.in, so that the
21763         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
21764         same.
21765         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
21766         AC_FUNC_GETLOADAVG where to find getloadavg.c.
21767         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
21768         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
21769         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
21770         Remove code that is now done by the newly-required macros.
21771         Append $(EXEEXT) to DF_PROG.
21772         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
21773         Do not invoke or require the following here,
21774         since prereq.m4 or some gnulib .m4 now does this for us:
21775         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
21776         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
21777         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
21778         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
21779         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
21780         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
21781         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
21782         AC_FUNC_OBSTACK.
21783         Do not replace the following functions, as this is now the job
21784         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
21785         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
21786         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
21787         atexit getpass, strdup, getpagesize.
21788         Replace 'raise'.
21789         Do not check for the following functions, as this is now the job
21790         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
21791         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
21792         setregid.
21793         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
21794         Check for sys/sysctl.h.
21795         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
21796         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
21797         of checking for ssize_t ourselves.
21798
21799         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
21800         Require every macro that gnulib/modules/* suggests for us.
21801         (jm_PREREQ_ADDEXT): New macro.
21802         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
21803         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
21804
21805         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
21806         (gl_PHYSMEM): Use it.
21807         Also check for `table' function.
21808         Check for new headers and functions.
21809         Add check for sys/sysmp.h.
21810         With suggestions from Kaveh Ghazi.
21811         Ignore headers that are present but cannot be compiled.  This
21812         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
21813         C 5.4.
21814
21815 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21816
21817         Document merge from coreutils.
21818         * modules/userspec: Depend on posixver.
21819         * modules/strftime: Depend on tzset.
21820
21821 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21822
21823         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
21824         rather than tab, after '#' in shell-script copyright notices.
21825         Suggested by Bruno Haible.
21826
21827 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21828
21829         * config/srclist-update: Use three spaces, rather than tab, after '#'
21830         in shell-script copyright notices.  Suggested by Bruno Haible.
21831         Remove unnecessary parenthesization in regular expression.
21832
21833 2003-08-15  Jim Meyering  <jim@meyering.net>
21834
21835         Merge from coreutils.
21836         * lib/xgethostname.c: Include <stdlib.h>.
21837         (xghostname): Don't exit for anything other than memory-related
21838         failure; just return NULL.
21839         * lib/userspec.c: Include "posixver.h".
21840         (parse_user_spec): Accept `.' as a separator only
21841         in pre-POSIX-200112 mode.
21842         * lib/strtoimax.c: Use #elif rather than #else #if.
21843         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
21844         Remove function, now that we can rely on a working tzset function.
21845         [!_LIBC]: Ensure that the required autoconf test has been run.
21846         [!defined _NL_CURRENT && HAVE_STRFTIME]:
21847         Use underlying_strftime for %r.
21848         * lib/sha.c: Merge in some clean-up and optimization changes from
21849         glibc.
21850         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
21851         Ensure that it is a multiple of 64.
21852         Rearrange loop exit tests so as to avoid performing an
21853         additional fread after encountering an error or EOF.
21854         * lib/realloc.c: Update copyright date.
21855
21856 2003-08-15  Jim Meyering  <jim@meyering.net>
21857         and Paul Eggert  <eggert@twinsun.com>
21858
21859         Merge from coreutils.
21860         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
21861         member but strut utmpx does not.  Needed for AIX 4.3.3.
21862         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
21863
21864 2003-08-15  Jim Meyering  <jim@meyering.net>
21865         and Paul Eggert  <eggert@cs.ucla.edu>
21866
21867         Merges from coreutils, etc.
21868         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
21869         Require gl_FUNC_TZSET_CLOBBER.
21870         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
21871         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
21872         members.
21873
21874 2003-08-14  Paul Eggert  <eggert@twinsun.com>
21875
21876         Help the merge from coreutils.
21877         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
21878         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
21879         * m4/tzset.m4: Use it too.
21880
21881 2003-08-14  Paul Eggert  <eggert@twinsun.com>
21882
21883         * modules/tzset: New file.
21884
21885 2003-08-14  Jim Meyering  <jim@meyering.net>
21886
21887         Merges from coreutils.
21888         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
21889         variable names, rather than @FNMATCH_H@.
21890         * modules/alloca: Likewise for $(ALLOCA_H).
21891
21892         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
21893         the three copies of the literal target, `fnmatch.h'.
21894         * modules/alloca (alloca.h): Likewise.
21895
21896 2003-08-14  Jim Meyering  <jim@meyering.net>
21897
21898         Merge from coreutils.
21899         * m4/tzset.m4: New file.
21900         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
21901         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
21902         otherwise, AIX 5.1 systems would end up using the latter.
21903         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
21904         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
21905         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
21906         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
21907
21908 2003-08-14  Jim Meyering  <jim@meyering.net>
21909
21910         Merge from coreutils.
21911         * lib/obstack.h: Whitespace changes.
21912         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
21913         and xcalloc return values.
21914         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
21915         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
21916         hang on OSF/1 5.1 for DIR on both local and remote file systems.
21917         Reported by (and fix confirmed by) Nelson H. F. Beebe.
21918         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21919         error from mntctl.
21920         Use mntctl's return value to drive the entry-processing loop, since
21921         we can't rely on the value of the vmt_length member in the last
21922         entry.  On some systems doing so could result in exhausting
21923         virtual memory.  Based in part on a patch from Mike Jetzer.
21924
21925 2003-08-14  Jim Meyering  <jim@meyering.net>
21926         and Paul Eggert  <eggert@twinsun.com>
21927
21928         Merges from coreutils, plus other fixes.
21929         * lib/physmem.c: Merge in portability changes from gcc/libiberty
21930         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
21931         for credits and details.  Thanks to Kaveh Ghazi for helping
21932         to keep these files in sync.
21933         (ARRAY_SIZE): Define it.
21934         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
21935         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
21936         (memcasecmp): Don't assume size_t fits in unsigned int.
21937         Remove casts and duplicate code.
21938         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
21939         (memcpy): Remove definition.
21940         Merge in some clean-up and optimization changes from glibc.
21941         [BLOCKSIZE]: Move definition to top of file.
21942         Ensure that it is a multiple of 64.
21943         Rearrange loop exit tests so as to avoid performing an
21944         additional fread after encountering an error or EOF.
21945         * lib/md5.h (md5_uintptr): Define.
21946         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
21947         return to the initial working directory.  Preserve errno
21948         for caller.
21949         * lib/idcache.c: Include "xalloc.h".
21950         (xmalloc, xrealloc): Remove decls.
21951         (getuser): Remove casts no longer required in C89.
21952         * lib/human.c: Include stdio.h, for sprintf.
21953         * lib/group-member.c: Include "xalloc.h".
21954         (xmalloc, xrealloc): Remove decls.
21955         (get_group_info): Remove casts no longer required in C89.
21956         * lib/getusershell.c (readname): Remove casts no longer required in
21957         C89.
21958         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
21959         * lib/getline.c: Whitespace fix, from coreutils.
21960
21961 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21962
21963         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
21964         Check for isascii.
21965
21966         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
21967         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
21968         Undo previous (whitespace-only) change.
21969
21970 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21971
21972         * lib/exclude.c: Include <ctype.h>
21973         (IN_CTYPE_DOMAIN): New macro.
21974         (is_space): New fn.
21975         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
21976         and empty lines.
21977
21978         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
21979         Undo previous (whitespace-only) change.
21980
21981 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21982
21983         * config/srclist-update: Change update back to the old behavior,
21984         leaving whitespace alone.  Use one 'sed' command rather than a
21985         pipeline.
21986         (fixlicense): Now a variable, not a function.
21987         (remove_trailing_blanks): Remove.
21988         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
21989         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
21990         Undo previous (whitespace-only) change.
21991
21992 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21993
21994         Merge from coreutils.
21995         * modules/euidaccess: Add lib_SOURCES, include for new
21996         file euidaccess.h
21997
21998 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21999
22000         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
22001         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
22002         Normalize leading white space and remove trailing white space.
22003
22004         Merge from coreutils
22005         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
22006
22007         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
22008         0.12.1.  These files are now being upgraded automatically by
22009         ../config/srclist-update.
22010
22011 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22012
22013         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
22014         Normalize leading white space and remove trailing white space.
22015         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
22016         notice, as per ../config/srclist-update.
22017
22018         Merge from coreutils.
22019         * lib/euidaccess.h: New file.
22020         * lib/euidaccess.c: Include it.
22021         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
22022         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
22023         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
22024
22025 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22026
22027         * config/srclist-update: Add copyright notice.
22028         (remove_id_lines, remove_trailing_blanks): New constants.
22029         (fixfile): Use them to normalize spacing a bit in copied files.
22030         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
22031         Normalize leading white space and remove trailing white space.
22032
22033         * config/texinfo.tex: Sync with texinfo.
22034
22035         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
22036         strtoul.c from libc, to merge coreutils whitespace changes.
22037
22038         * config/srclist.txt: Get the following m4 files from gettext:
22039         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
22040         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
22041         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
22042         wint_t.m4.
22043
22044 2003-08-12  Karl Berry  <karl@gnu.org>
22045
22046         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
22047         been made.
22048
22049 2003-08-11  Paul Eggert  <eggert@twinsun.com>
22050
22051         * modules/gnu-source, m4/gnu-source.m4:
22052         Remove; we're assuming Autoconf 2.54 or later now.
22053         Suggested by Bruno Haible.
22054         * MODULES.html.sh (func_all_modules): Remove gnu-source.
22055
22056 2003-08-11  Bruno Haible  <bruno@clisp.org>
22057
22058         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
22059
22060 2003-08-11  Bruno Haible  <bruno@clisp.org>
22061
22062         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
22063         (vasnprintf): Use it instead of wcslen.
22064
22065 2003-08-11  Bruno Haible  <bruno@clisp.org>
22066
22067         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
22068         value to ensure that _Bool promotes to int. Use #define for _Bool when
22069         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
22070
22071 2003-08-10  Karl Berry  <karl@gnu.org>
22072
22073         * lib/regex.h: update from libc (whitespace fix).
22074
22075 2003-08-09  Paul Eggert  <eggert@twinsun.com>
22076
22077         Merge some files from coreutils.  These changes were
22078         originally made by Jim Meyering.
22079         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
22080         many older Unixes require this.
22081         * lib/alloca.c (alloca): Remove cast to argument of free;
22082         no longer needed in C89.
22083         * lib/alloca_.h, regex.h: Fix white space to match
22084         what GNU indent does.
22085
22086 2003-08-09  Paul Eggert  <eggert@twinsun.com>
22087
22088         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
22089         apparently Emacs's Unicode mode got confused before my 2003-08-05
22090         checkin.
22091
22092 2003-08-08  Paul Eggert  <eggert@twinsun.com>
22093
22094         * m4/extensions.m4: New file.
22095         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
22096         Require gl_USE_SYSTEM_EXTENSIONS.
22097         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
22098         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
22099
22100 2003-08-08  Paul Eggert  <eggert@twinsun.com>
22101
22102         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
22103         * modules/extensions, modules/gnu-source: New files.
22104         * modules/timespec, modules/unlocked-io: Depend on extensions.
22105
22106 2003-08-07  Paul Eggert  <eggert@twinsun.com>
22107
22108         * modules/restrict: New file.
22109         * MODULES.html.sh (func_all_modules): Add restrict.
22110         * modules/regex: Depend on restrict.
22111
22112 2003-08-07  Paul Eggert  <eggert@twinsun.com>
22113
22114         * m4/restrict.m4: New file.
22115         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
22116
22117 2003-08-07  Bruno Haible  <bruno@clisp.org>
22118
22119         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
22120         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
22121
22122 2003-08-07  Bruno Haible  <bruno@clisp.org>
22123
22124         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
22125         makes the module 'getndelim2' compatible with the module 'getline'.
22126
22127 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22128
22129         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
22130         byte with "\201" to avoid glitches when editing that source file
22131         with multi-gnome-terminal.
22132
22133 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22134
22135         * lib/bumpalloc.h: Remove.
22136
22137 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22138
22139         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
22140         * modules/bumpalloc: Remove.
22141
22142 2003-08-04  Paul Eggert  <eggert@twinsun.com>
22143
22144         * lib/getloadavg.c: Change copyright notice and spacing to conform to
22145         GNU coding style.
22146
22147         Merge from coreutils.
22148         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
22149         1. From glibc.
22150         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
22151         from Karl Berry, implemented by Jim Meyering.
22152         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
22153         from Dmitry V. Levin.
22154         Remove anachronistic cast of xrealloc.
22155         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
22156         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
22157         type. Otherwise, it wouldn't compile with at least /bin/cc on
22158         ymp-cray-unicos9.0.2.X.
22159         Combine two mostly-identical uses of alloca into one.
22160         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
22161
22162 2003-08-04  Dave Love  <d.love@dl.ac.uk>
22163
22164         [From Emacs.]
22165
22166         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
22167         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
22168         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
22169         obsolete NLIST_NAME_UNION.
22170         [__GNU__]: Undef BSD and FSCALE.
22171         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
22172
22173 2003-08-03  Paul Eggert  <eggert@twinsun.com>
22174
22175         * lib/stdbool_.h (_Bool): Make it signed char, instead of
22176         an enum type, so that it's guaranteed to promote to int.  See:
22177         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
22178
22179 2003-08-03  Karl Berry  <karl@gnu.org>
22180
22181         * config/depcomp: update from automake.
22182
22183 2003-07-31  Paul Eggert  <eggert@twinsun.com>
22184
22185         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
22186         (strerror): Don't assume that a printable int fits in 14 bytes.
22187
22188 2003-07-31  Bruno Haible  <bruno@clisp.org>
22189
22190         * modules/getpass-gnu: New file.
22191         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
22192
22193 2003-07-31  Bruno Haible  <bruno@clisp.org>
22194
22195         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
22196
22197 2003-07-24  Karl Berry  <karl@gnu.org>
22198
22199         * config/missing: update from automake.
22200
22201 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
22202             Bruno Haible  <bruno@clisp.org>
22203
22204         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
22205         * lib/getline.c (getline, getdelim): Likewise.
22206         Remove _GNU_SOURCE define; now it's defined in config.h through
22207         m4/getline.m4.
22208
22209 2003-07-23  Karl Berry  <karl@gnu.org>
22210
22211         * config/config.sub: update from prep.
22212
22213 2003-07-22  Paul Eggert  <eggert@twinsun.com>
22214
22215         * modules/xalloc (Depends-on): Add exitfail.
22216         * modules/xmemcoll: Likewise.
22217
22218 2003-07-22  Paul Eggert  <eggert@twinsun.com>
22219
22220         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
22221         over-parenthesization in macros.
22222
22223         Sync with coreutils.
22224
22225         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
22226         required by C99.
22227
22228         Use `exit_failure' for xalloc and xmemcoll instead of their own
22229         private exit-failure variables.
22230         * lib/xalloc.h (xalloc_exit_failure): Remove.
22231         * lib/xmalloc.c: Likewise.  Include exitfail.h.
22232         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
22233         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
22234         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
22235         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
22236
22237 2003-07-20  Jim Meyering  <jim@meyering.net>
22238
22239         * modules/closeout (Depends-on): Add exitfail.
22240         Suggestion from Bruno Haible.
22241
22242 2003-07-19  Karl Berry  <karl@gnu.org>
22243
22244         * config/config.sub: update from prep.
22245
22246 2003-07-18  Paul Eggert  <eggert@twinsun.com>
22247
22248         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
22249         Remove.
22250         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
22251         to test that it can stand by itself.  Include "exitfail.h".
22252         Clients should set exit_failure instead.
22253         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
22254
22255 2003-07-18  Bruno Haible  <bruno@clisp.org>
22256
22257         * modules/getndelim2: New file.
22258         * modules/getline: Share files with module getndelim2.
22259         * modules/getnline: Depend on getndelim2 instead of sharing files with
22260         it. Add getnline.c to lib_SOURCES.
22261         * MODULES.html.sh (func_all_modules): Add getndelim2.
22262
22263 2003-07-18  Bruno Haible  <bruno@clisp.org>
22264
22265         * m4/getndelim2.m4: New file.
22266         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
22267         invoke gl_PREREQ_GETNDELIM2.
22268         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
22269         gl_PREREQ_GETNDELIM2.
22270         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
22271         gl_GETNDELIM2.
22272
22273 2003-07-18  Bruno Haible  <bruno@clisp.org>
22274
22275         * lib/getndelim2.h: New file.
22276         * lib/getndelim2.c: Make into a module of its own. Include config.h,
22277         getndelim2.h.
22278         (getndelim2): Make non-static. Change return type to ssize_t.
22279         * lib/getline.h: Change argument names.
22280         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
22281         * lib/getnline.c: Include getndelim2.h.
22282
22283 2003-07-18  Andreas Schwab  <schwab@suse.de>
22284
22285         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
22286
22287 2003-07-17  Karl Berry  <karl@gnu.org>
22288
22289         * config/config.sub: update from prep.
22290
22291 2003-07-17  Bruno Haible  <bruno@clisp.org>
22292
22293         * modules/getnline: New file.
22294         * modules/getline: Add lib/getndelim2.c to source file list.
22295         * MODULES.html.sh (func_all_modules): Add getnline.
22296
22297 2003-07-17  Bruno Haible  <bruno@clisp.org>
22298
22299         * m4/getnline.m4: New file.
22300
22301 2003-07-17  Bruno Haible  <bruno@clisp.org>
22302
22303         * m4/Makefile.am.in: Remove file.
22304         * m4/Makefile.am: Remove file.
22305         * m4/Makefile.in: Remove file.
22306
22307 2003-07-17  Bruno Haible  <bruno@clisp.org>
22308
22309         * lib/getnline.h: New file.
22310         * lib/getnline.c: New file.
22311         * lib/getndelim2.c: New file, extracted from getline.c.
22312         (getndelim2): Renamed from getdelim2, with added nmax argument.
22313         * lib/getline.c: Include getndelim2.c.
22314         (getdelim2): Moved out to getndelim2.c.
22315         (getline, getdelim): Update.
22316
22317 2003-07-17  Bruno Haible  <bruno@clisp.org>
22318
22319         * lib/Makefile.am: Remove file.
22320         * lib/Makefile.in: Remove file.
22321
22322 2003-07-17  Bruno Haible  <bruno@clisp.org>
22323
22324         * configure.in: Remove file.
22325         * Makefile.in: Remove file.
22326
22327 2003-07-17  Bruno Haible  <bruno@clisp.org>
22328
22329         * MODULES.html.sh: Put the </BODY> right before </HTML>.
22330
22331 2003-07-16  Karl Berry  <karl@gnu.org>
22332
22333         * config/srclist-update: was running fixlicense twice, which caused
22334                 texinfo.tex to be nullified for some reason.  Simplify,
22335                 $gplsrc is no longer needed as far as I can see?
22336
22337 2003-07-16  Jim Meyering  <jim@meyering.net>
22338
22339         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
22340
22341 2003-07-15  Paul Eggert  <eggert@twinsun.com>
22342
22343         * config/srclist.txt: Get the following files from gettext-runtime/intl
22344         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
22345         ref-del.sin.  From Bruno Haible.
22346         * config/srclist-update (fixfile): Change grep pattern again, since the
22347         previous fix didn't work (there was another trailing $).  Use
22348         '[$]' to escape the $s.
22349
22350 2003-07-15  Karl Berry  <karl@gnu.org>
22351
22352         * lib/vasnprintf.c: update from gettext.
22353
22354 2003-07-15  Karl Berry  <karl@gnu.org>
22355
22356         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
22357         gets expanded when surrounded by '$'.
22358
22359 2003-07-15  Jim Meyering  <jim@meyering.net>
22360
22361         * modules/save-cwd: Don't depend on error.  From Derek Price.
22362
22363 2003-07-15  Jim Meyering  <jim@meyering.net>
22364
22365         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
22366
22367 2003-07-14  Simon Josefsson  <jas@extundo.com>
22368
22369         * modules/mempcpy: New file.
22370         * MODULES.html.sh (func_all_modules): Add mempcpy.
22371
22372 2003-07-14  Simon Josefsson  <jas@extundo.com>
22373
22374         * m4/mempcpy.m4: New file.
22375
22376 2003-07-14  Simon Josefsson  <jas@extundo.com>
22377
22378         * lib/mempcpy.h: New file.
22379         * lib/mempcpy.c: New file.
22380
22381 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22382
22383         * modules/getdate, modules/posixtm: Depend on mktime.
22384
22385 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22386
22387         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
22388         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
22389         unicodeio.c, unicodeio.h, unlocked-io.h:
22390         Switch from LGPL to GPL.
22391
22392 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22393
22394         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
22395         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
22396         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
22397         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
22398         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
22399         updated automatically by ../config/srclist-update.  This changes
22400         their license from LPGL to GPL.
22401
22402 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22403
22404         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
22405         assumed to refer to the root of the most recent stable gettext version.
22406         * config/srclistvars.sh: Add defaults for eggert.
22407         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
22408         Match "This program" as well as "The program".  This is needed
22409         for gettext.
22410
22411 2003-07-14  Jim Meyering  <jim@meyering.net>
22412
22413         Don't emit diagnostics.  Let callers do that.
22414         * lib/save-cwd.c: Don't include "error.h".
22415         (save_cwd): Don't call error.  Ensure that errno is valid
22416         when returning nonzero.
22417
22418         * lib/save-cwd.h (restore_cwd): Update prototype.
22419         * lib/save-cwd.c (restore_cwd): Remove two parameters.
22420         Simplify.  Don't call error upon failure.  Let callers do that.
22421         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
22422         when auditing is enabled.  But don't bother updating the #if.
22423
22424 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
22425
22426         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
22427         it breaks C++ compilation.
22428         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
22429
22430 2003-07-10  Simon Josefsson  <jas@extundo.com>
22431
22432         * modules/strchrnul (Makefile.am): Add strchrnul.h.
22433
22434 2003-07-10  Jim Meyering  <jim@meyering.net>
22435
22436         * m4/clock_time.m4: Remove trailing blank.
22437         * m4/intmax_t.m4: Likewise.
22438
22439 2003-07-10  Jim Meyering  <jim@meyering.net>
22440
22441         * lib/vasnprintf.c: Remove trailing blanks.
22442         Make cpp indentation consistent.
22443
22444 2003-07-09  Paul Eggert  <eggert@twinsun.com>
22445
22446         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
22447         posixver.c, strftime.c, strnlen.c, strverscmp.c:
22448         Switch from LGPL to GPL.
22449
22450 2003-07-09  Paul Eggert  <eggert@twinsun.com>
22451
22452         * config/srclist.txt: Sort sublists.  Add
22453         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
22454         that differ from gnulib for one reason or another; we'd like this list
22455         to be smaller but for now let's document what we have.
22456
22457 2003-07-08  Paul Eggert  <eggert@twinsun.com>
22458
22459         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
22460         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
22461         and sweeter "eval x=$x".
22462         * config/srclist.txt: Get lib/argp* from glibc.
22463
22464 2003-07-07  Paul Eggert  <eggert@twinsun.com>
22465
22466         * lib/mktime.c: Fix some boundary cases and remove need for floating
22467         point.
22468
22469         Issue a compile-time diagnostic if time_t is floating point, or if
22470         two's complement arithmetic is not in effect, or if arithmetic
22471         right shift does not propagate the sign.  These assumptions were
22472         all in the original code but they weren't checked.
22473
22474         (TIME_T_MIDPOINT, verify): New macros.
22475         (__isleap): Remove; it has integer overflow problems.
22476         (leapyear): New function, without those problems.
22477         (ydhms_tm_diff): Remove; splitting into two parts.
22478         (ydhms_diff): New function, containing the arithmetic part of
22479         the old ydhms_tm_diff function.  Issue a compile-time
22480         diagnostic if we are not using C99 integer division.
22481         Avoid casts when possible.
22482         (guess_time_tm): New function, containing the checking part of
22483         the old ydhms_tm_diff function.  Return the new value, rather than
22484         the difference between it and the old.  Accept a new argument T
22485         so that *T specifies the old value.  Check for overflow in the result.
22486
22487         (__mktime_internal): Use a time_t offset, not a long int offset.
22488         This undoes the 2003-06-04 change, which is no longer needed now
22489         that we have better overflow checking.
22490         (localtime_offset): Likewise.
22491
22492         (__mktime_internal): Avoid harmful overflow on hosts where time_t
22493         and long are 64-bit but int is only 32-bit.
22494         (ydhms_diff): Use long int to store year1 and yday1.
22495         Issue a compile-time diagnostic if long int is not wide enough.
22496
22497         (__mktime_internal): Use long int to store adjusted year and yday.
22498         Use plain C rather than preprocessor commands, if that doesn't
22499         affect efficiency.
22500         Check for overflow (and try to repair) after each probe
22501         rather than checking only at the very end.  This avoids some bugs
22502         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
22503         does not equal GMT offset at maximum time).
22504         Use integer to check for overflow rather than floating point; this
22505         is more portable to non-IEEE hosts, and is a tad faster.
22506         When we detect that we are oscillating between two values,
22507         don't check whether tm_isdst has the requested value, since
22508         we already know the answer.  When tm_isdst has the wrong value,
22509         use a different heuristic to find the right one, based on the
22510         extreme values actually observed in practice in tz2003a,
22511         rather than the (overly optimistic) "previous 3 calendar quarters".
22512
22513         (not_equal_tm, print_tm, check_result): Use "const T" rather than
22514         "T const" to accommodate glibc style.
22515         (check_result): Use less-confusing report format.  "long" -> "long int.
22516         (main): Likewise.
22517         Don't loop if the iteration overflows time_t.
22518         Allow a negative step in the iteration.
22519
22520 2003-07-06  Karl Berry  <karl@gnu.org>
22521
22522         * config/depcomp: update from automake.
22523         * config/config.sub: update from prep.
22524
22525 2003-07-03  Karl Berry  <karl@gnu.org>
22526
22527         * config/config.guess: update from prep.
22528
22529 2003-07-01  Paul Eggert  <eggert@twinsun.com>
22530
22531         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
22532         xreadlink.c now includes it unconditionally.
22533
22534 2003-07-01  Paul Eggert  <eggert@twinsun.com>
22535
22536         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
22537         having it depend on HAVE_SYS_TYPES_H.
22538
22539 2003-07-01  Bruno Haible  <bruno@clisp.org>
22540
22541         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
22542         <sys/types.h> should be sufficient.
22543         Reported by Paul Eggert.
22544
22545 2003-06-26  Karl Berry  <karl@gnu.org>
22546
22547         * config/depcomp: update from automake.
22548
22549 2003-06-26  Bruno Haible  <bruno@clisp.org>
22550
22551         * modules/human: Depend on module stdbool.
22552
22553 2003-06-25  Bruno Haible  <bruno@clisp.org>
22554
22555         * modules/readlink: New file.
22556         * modules/xreadlink: Depend on it.
22557         * MODULES.html.sh (func_all_modules): Add readlink.
22558
22559 2003-06-25  Bruno Haible  <bruno@clisp.org>
22560
22561         * m4/readlink.m4: New file.
22562
22563 2003-06-25  Bruno Haible  <bruno@clisp.org>
22564
22565         * lib/readlink.c: New file.
22566
22567 2003-06-22  Karl Berry  <karl@gnu.org>
22568
22569         * config/srclist.txt: update mkinstalldirs from automake.
22570         * config/mkinstalldirs: update.
22571
22572 2003-06-22  Bruno Haible  <bruno@clisp.org>
22573
22574         Portability to mingw32.
22575         * m4/ssize_t.m4: New file, from GNU gettext.
22576         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
22577         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
22578
22579 2003-06-22  Bruno Haible  <bruno@clisp.org>
22580
22581         * modules/safe-read: Add m4/ssize_t.m4.
22582         * modules/xreadlink: Add m4/ssize_t.m4.
22583
22584 2003-06-20  Bruno Haible  <bruno@clisp.org>
22585
22586         Assume C89, so PARAMS isn't needed.
22587         * lib/unicodeio.h (PARAMS): Remove.
22588         * lib/unicodeio.c: Don't use PARAMS.
22589
22590 2003-06-18  Karl Berry  <karl@gnu.org>
22591
22592         * config/config.{guess,sub}: update from prep.
22593
22594 2003-06-18  Jim Meyering  <jim@meyering.net>
22595
22596         Merge changes from coreutils.
22597         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
22598         Remove explicit declarations of xmalloc and realloc.
22599         Include xalloc.h.
22600         (read_utmp): Remove anachronistic cast of xmalloc.
22601
22602 2003-06-17  Paul Eggert  <eggert@twinsun.com>
22603
22604         Assume C89, so PARAMS isn't needed.
22605         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
22606         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
22607         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
22608         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
22609         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
22610         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
22611         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
22612         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
22613         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
22614         lib/xstrtod.h, lib/xstrtol.h: Likewise.
22615         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
22616         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
22617         no longer needed. Anyway, config.h should always be included before any
22618         other file.
22619
22620 2003-06-11  Simon Josefsson  <jas@extundo.com>
22621
22622         * modules/sysexits: New file.
22623         * MODULES.html.sh (func_all_modules): Add sysexits.
22624
22625 2003-06-11  Simon Josefsson  <jas@extundo.com>
22626
22627         * lib/sysexit_.h: New file.
22628
22629 2003-06-11  Derek Price  <derek@ximbiot.com>
22630
22631         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
22632         necessary.
22633
22634 2003-06-11  Bruno Haible  <bruno@clisp.org>
22635
22636         * m4/sysexits.m4: New file.
22637
22638 2003-06-10  Simon Josefsson  <jas@extundo.com>
22639
22640         * lib/argp.h: New file, from glibc.
22641         * lib/argp-ba.c: New file, from glibc.
22642         * lib/argp-eexst.c: New file, from glibc.
22643         * lib/argp-fmtstream.c: New file, from glibc.
22644         * lib/argp-fmtstream.h: New file, from glibc.
22645         * lib/argp-fs-xinl.c: New file, from glibc.
22646         * lib/argp-help.c: New file, from glibc.
22647         * lib/argp-namefrob.h: New file, from glibc.
22648         * lib/argp-parse.c: New file, from glibc.
22649         * lib/argp-pv.c: New file, from glibc.
22650         * lib/argp-pvh.c: New file, from glibc.
22651         * lib/argp-xinl.c: New file, from glibc.
22652
22653 2003-06-10  Simon Josefsson  <jas@extundo.com>
22654
22655         * modules/strchrnul: New file.
22656
22657 2003-06-10  Simon Josefsson  <jas@extundo.com>
22658
22659         * modules/argp: New file.
22660
22661 2003-06-10  Simon Josefsson  <jas@extundo.com>
22662
22663         * m4/strchrnul.m4: New file.
22664
22665 2003-06-10  Simon Josefsson  <jas@extundo.com>
22666
22667         * lib/strchrnul.h: New file.
22668         * lib/strchrnul.c: New file.
22669
22670 2003-06-10  Bruno Haible  <bruno@clisp.org>
22671
22672         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
22673
22674 2003-06-07  Karl Berry  <karl@gnu.org>
22675
22676         * config/config.{guess,sub}: update from prep.
22677
22678 2003-06-07  Jim Meyering  <jim@meyering.net>
22679
22680         * modules/strtod: Use $(...) notation, not @...@ for
22681         AC_REPLACE'd variables.
22682         * modules/localcharset: Likewise.
22683
22684 2003-06-07  Jim Meyering  <jim@meyering.net>
22685
22686         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
22687         in place of my name in the copyright comment.
22688         Remove definition and uses of __P.
22689
22690         From coreutils.
22691         * lib/stat.c: Don't declare xmalloc explicitly.
22692         Instead, include "xalloc.h".
22693         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
22694         xrealloc, and xcalloc return values.
22695         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
22696         Improve comment.
22697         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
22698
22699 2003-06-07  Bruno Haible  <bruno@clisp.org>
22700
22701         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
22702         avoid AC_CONFIG_LINKS.
22703         * modules/fnmatch (Makefile.am): Use explicit creation rule for
22704         fnmatch.h, to avoid AC_CONFIG_LINKS.
22705         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
22706
22707 2003-06-07  Bruno Haible  <bruno@clisp.org>
22708
22709         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
22710         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
22711         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
22712         directory.
22713         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
22714         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
22715         directory.
22716
22717 2003-06-06  Jim Meyering  <jim@meyering.net>
22718
22719         Merge from coreutils.
22720         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
22721         Consolidate declarations and initializations of *_base* locals.
22722
22723         Merge from coreutils.
22724         This avoids a core dump on systems without GNU putenv,
22725         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
22726         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
22727         (unsetenv): New static function, from GNU libc.
22728         (rpl_putenv): Use it.
22729
22730         * lib/modechange.c: Remove trailing blanks.
22731
22732         Merge from coreutils.
22733         * lib/fsusage.c: Remove declaration of statfs.
22734         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
22735
22736         * lib/posixtm.c: Include <stdbool.h> unconditionally.
22737
22738 2003-06-06  Jim Meyering  <jim@meyering.net>
22739
22740         * lib/stdbool_.h: Renamed from stdbool.h.in.
22741
22742 2003-06-06  Jim Meyering  <jim@meyering.net>
22743             Bruno Haible  <bruno@clisp.org>
22744
22745         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
22746         Adjust Makefile.am snippet not to redirect directly to target.
22747         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
22748
22749 2003-06-05  Paul Eggert  <eggert@twinsun.com>
22750
22751         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
22752         mismatch, look in future quarters as well as past.  This fixes a
22753         bug when processing fall-backwards gaps immediately after a long
22754         period of daylight-saving time.
22755
22756         * lib/mktime.c: Assume freestanding C89 or better.
22757         (HAVE_LIMITS_H): Remove.  Assume it's 1.
22758         (__P): Remove; not used.
22759         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
22760         (mktime, not_equal_tm, print_tm, check_result,
22761         main): Use prototypes.  Use const * where appropriate.
22762         (main): Fix typo in testing code that uncovered by above changes.
22763         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
22764
22765 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22766
22767         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
22768         locale.h, localeconv.  This merges changes from coreutils.
22769
22770         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
22771         It can be removed after the next Autoconf is released.
22772         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
22773         needed.
22774
22775 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22776
22777         * lib/mktime.c: Fix Debian bug 177940
22778         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
22779         (localtime_offset): Now long int, not time_t, because we want it
22780         to be guaranteed to be signed.  All uses changed.
22781         (__mktime_internal): If overflow would occur when adding offset,
22782         don't add it.
22783
22784         Merge 'human' changes from coreutils.  Rewrite to support
22785         locale-specific notations like thousands separators.
22786         * lib/human.c: Simplify authorship notice.
22787         Include human.h immediately after config.h.
22788         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
22789         <limits.h>: Do not include, since human.h does.
22790         (SIZE_MAX, UINTMAX_MAX): New macros.
22791         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
22792         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
22793         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
22794         (power_letter): Renamed from suffixes.
22795         (generate_suffix_backwards): Remove.
22796         (adjust_value): Now takes int style (because of human.h changes)
22797         and long double value (for greater precision on some platforms).
22798         (group_number): New function.
22799         (human_readable): Use it.  Use integer options, not enum.
22800         Put the options before the sizes in the arg list.
22801         Support all the new options.
22802         The old human_readable function has been removed;
22803         use inttostr.h instead.
22804         (human_readable, default_block_size, humblock):
22805         Use uintmax_t, not int, for block sizes.
22806         (human_readable_inexact, block_size_types): Remove.
22807         (block_size_opts): New constant.
22808         (human_options): Renamed from human_block_size, with new signature
22809         that allows block sizes up to UINTMAX_MAX.  All callers changed.
22810         * lib/human.h: Add copyright and authorship notice.
22811         Include <limits.h> and <stdbool.h> unconditionally.
22812         (PARAMS): Remove.  All uses removed.
22813         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
22814         (enum human_inexact_style): Remove tag; now a nameless enum.
22815         (human_floor, human_ceiling, human_round_to_even): Now have
22816         values 2, 0, 1 rather than -1, 1, 0.
22817         (human_group_digits, human_suppress_point_zero, human_autoscale,
22818         human_base_1024, human_SI, human_B): New constants.
22819         (human_readable_inexact, human_block_size): Remove.
22820         (human_readable): Size args are now uintmax_t, not int.
22821         (human_options): New decl.
22822
22823         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
22824         unnecessary now that we assume C89 or better.  This change
22825         imported from coreutils.
22826
22827         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
22828         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
22829         in the 2003-05-30 sync from glibc.
22830
22831         .h files should stand alone, but we shouldn't include <sys/types.h>
22832         if we can get away with just <stddef.h>.
22833
22834         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
22835         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
22836         rather than <sys/types.h>, as we merely need size_t.
22837         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
22838         to get size_t.
22839         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
22840         Include <stdio.h>, to get FILE.
22841         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
22842         memcasecmp.h has included <stddef.h> and all we need is size_t.
22843         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
22844         our interface, instead of including <sys/types.h>
22845
22846 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22847
22848         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
22849         now, as glibc mktime is buggy on non-glibc systems.
22850
22851 2003-06-03  Karl Berry  <karl@gnu.org>
22852
22853         * config/config.sub: update from prep.
22854
22855 2003-06-02  Paul Eggert  <eggert@twinsun.com>
22856
22857         [from coreutils]
22858         Fix some minor time-related bugs with POSIX time arguments.
22859         Some valid time stamps were being rejected (notably -1, and
22860         time stamps before 1900 on 64-bit hosts).  And some invalid
22861         time stamps were being accepted, e.g. September 31.
22862
22863         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
22864         that we can return (time_t) -1 successfully.
22865         * lib/posixtm.c: Likewise.
22866         [HAVE_STDBOOL_H]: Include <stdbool.h>.
22867         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
22868         (t): Remove static var.
22869         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
22870         of static var.  All uses changed.
22871         (year): Do not reject years before 1900; they can occur with
22872         64-bit time_t.
22873         (posix_time_parse): Do not check for out-of-range components;
22874         that is now the caller's responsibility, since our checks were
22875         only approximations.
22876         (posixtime): Use mktime to check for out-of-range components,
22877         since it knows them exactly.
22878         If mktime returns (time_t) -1, check whether an error actually occurred
22879         by invoking localtime on -1.
22880         (main) [TEST_POSIXTIME]: Check for input data errors, and report
22881         posixtime failures better.
22882         Improve the test data (in comments only).
22883
22884 2003-06-02  Karl Berry  <karl@gnu.org>
22885
22886         * config/mkinstalldirs (version): new variable.
22887         (--version): new option.
22888         (usage): improve message.
22889
22890 2003-05-30  Karl Berry  <karl@gnu.org>
22891
22892         * lib/mktime.c: update from libc.
22893
22894 2003-05-30  Bruno Haible  <bruno@clisp.org>
22895
22896         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
22897         * config/config.rpath: Upgrade to gettext-0.12.1.
22898
22899 2003-05-30  Bruno Haible  <bruno@clisp.org>
22900
22901         * m4/gettext.m4: Upgrade to gettext-0.12.1.
22902         * m4/nls.m4: New file, from gettext-0.12.1.
22903         * m4/po.m4: New file, from gettext-0.12.1.
22904         * m4/progtest.m4: Upgrade to gettext-0.12.1.
22905
22906 2003-05-30  Bruno Haible  <bruno@clisp.org>
22907
22908         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
22909         * lib/localcharset.h: Likewise.
22910         * lib/localcharset.c: Likewise.
22911
22912 2003-05-29  Karl Berry  <karl@gnu.org>
22913
22914         * config/config.rpath: update from gettext.
22915
22916 2003-05-28  Paul Eggert  <eggert@twinsun.com>
22917
22918         Assume the headers required for C89 freestanding compilers.
22919         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
22920         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
22921         * m4/human.m4 (gl_HUMAN): Likewise.
22922         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
22923         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
22924         * m4/userspec.m4 (gl_USERSPEC): Likewise.
22925         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
22926         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
22927         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
22928
22929 2003-05-28  Paul Eggert  <eggert@twinsun.com>
22930
22931         Assume the headers required for C89 freestanding compilers.
22932         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
22933         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
22934         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
22935         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
22936         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
22937         define, since <limits.h> is guaranteed to do that.
22938         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
22939         * lib/exclude.c: Include <stdbool.h> unconditionally.
22940         * lib/tempname.c: Include <stddef.h> unconditionally.
22941         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
22942         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
22943         <stddef.h> does that.
22944         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
22945         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
22946         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
22947         needed.
22948         * lib/xstrtol.c: Likewise.
22949         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
22950         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
22951
22952         * lib/addext.c (addext): Use assignment rather than cast, to avoid
22953         warnings on some platforms.
22954
22955         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
22956         arbitrarily.
22957
22958 2003-05-26  Jim Meyering  <jim@meyering.net>
22959
22960         Merge in a change from coreutils:
22961         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
22962         that is guaranteed to be `no'.  Use `no_such_member' to indicate
22963         that condition, rather than `-1' which is slightly misleading.
22964         Change the name of the cache variable to have the gl_ prefix.
22965         Prompted by a patch from Richard Dawe for DJGPP.
22966
22967 2003-05-24  Karl Berry  <karl@gnu.org>
22968
22969         * config/config.guess: update from prep.
22970
22971 2003-05-22  Karl Berry  <karl@gnu.org>
22972
22973         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
22974
22975 2003-05-20  Karl Berry  <karl@gnu.org>
22976
22977         * config/config.guess: update from prep.
22978
22979 2003-05-18  Karl Berry  <karl@gnu.org>
22980
22981         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
22982         might actually be set by the user.
22983
22984         * config/depcomp, install-sh, mdate-sh: update from automake.
22985
22986 2003-05-17  Bruno Haible  <bruno@clisp.org>
22987
22988         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
22989         invalid expansion for AC_EGREP_CPP.
22990         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
22991         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
22992         Suggested by Akim Demaille <akim@epita.fr> in
22993         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
22994
22995 2003-05-12  Jim Meyering  <jim@meyering.net>
22996
22997         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
22998         the space-padded-by-default conversion specifiers, %e, %k, %l.
22999
23000 2003-05-12  Bruno Haible  <bruno@clisp.org>
23001
23002         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
23003         the string is longer than 4 KB.
23004
23005 2003-05-11  Karl Berry  <karl@gnu.org>
23006
23007         * config/config.{guess,sub}: update from prep.
23008
23009 2003-05-09  Bruno Haible  <bruno@clisp.org>
23010
23011         * modules/error: Add m4/strerror_r.m4 to file list.
23012
23013 2003-05-03  Bruno Haible  <bruno@clisp.org>
23014
23015         Upgrade to Unicode-4.0.
23016         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
23017         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
23018         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
23019         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
23020         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
23021         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
23022         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
23023         Change width of U+E0100..U+E01EF from 1 to 0.
23024
23025 2003-04-25  Jim Meyering  <jim@meyering.net>
23026
23027         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
23028         of type size_t, not int.
23029
23030 2003-04-25  Bruno Haible  <bruno@clisp.org>
23031
23032         * lib/copy-file.c: Include <stddef.h>, for size_t.
23033
23034 2003-04-21  Paul Eggert  <eggert@twinsun.com>
23035
23036         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
23037         code which expansion is under static control.  Patch imported from
23038         Akim Demaille's patch to Bison; see
23039         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
23040
23041 2003-04-14  Bruno Haible  <bruno@clisp.org>
23042
23043         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
23044
23045 2003-04-11  Jim Meyering  <jim@meyering.net>
23046
23047         Merge changes from Coreutils.
23048
23049         2003-03-22  Jim Meyering  <jim@meyering.net>
23050
23051         * lib/strftime.c (widen): Cast alloca return value to proper type.
23052
23053         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
23054
23055         From GNU libc.
23056         * lib/strftime.c (my_strftime): Handle very large width
23057         specifications for numeric values correctly.  Improve checks for
23058         overflow.
23059
23060         2003-01-19  Jim Meyering  <jim@meyering.net>
23061
23062         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
23063         definitions.
23064         (nl_get_alt_digit) [! defined my_strftime]: Define.
23065         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
23066         _nl_get_alt_digit and _nl_get_walt_digit.
23067
23068         * lib/strftime.c (my_strftime): Merge in locale-related changes from
23069         libc. These changes have no effect outside of _LIBC.
23070
23071 2003-04-10  Bruno Haible  <bruno@clisp.org>
23072
23073         * modules/findprog: New file.
23074         * MODULES.html.sh (func_all_modules): Add it.
23075
23076 2003-04-10  Bruno Haible  <bruno@clisp.org>
23077
23078         * m4/findprog.m4: New file.
23079         * m4/eaccess.m4: New file.
23080
23081 2003-04-10  Bruno Haible  <bruno@clisp.org>
23082
23083         * lib/findprog.h: New file, from GNU gettext.
23084         * lib/findprog.c: New file, from GNU gettext.
23085
23086 2003-04-05  Jim Meyering  <jim@meyering.net>
23087
23088         Merge changes from Coreutils.
23089
23090         * lib/exclude.h (PARAMS): Remove definition and uses.
23091         * lib/exclude.c: Remove uses of `PARAMS'.
23092
23093         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
23094         Add test-cases for DOS filenames. Declare program_name.
23095         (main): Set up program_name.  Patch by Rich Dawe.
23096
23097         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
23098         error from mntctl.
23099         Use mntctl's return value to drive the entry-processing loop, since
23100         we can't rely on the value of the vmt_length member in the last
23101         entry.  On some systems doing so could result in exhausting
23102         virtual memory.  Based in part on a patch from Mike Jetzer.
23103
23104 2003-04-04  Bruno Haible  <bruno@clisp.org>
23105
23106         * modules/linebreak: New file.
23107         * MODULES.html.sh (func_all_modules): Add it.
23108
23109 2003-04-04  Bruno Haible  <bruno@clisp.org>
23110
23111         * m4/linebreak.m4: New file.
23112
23113 2003-04-04  Bruno Haible  <bruno@clisp.org>
23114
23115         * lib/linebreak.h: New file, from GNU gettext.
23116         * lib/linebreak.c: New file, from GNU gettext with slight
23117         modifications.
23118         * lib/lbrkprop.h: New file, from GNU gettext.
23119
23120 2003-04-03  Bruno Haible  <bruno@clisp.org>
23121
23122         * modules/utf8-ucs4: New file.
23123         * modules/utf16-ucs4: New file.
23124         * modules/ucs4-utf8: New file.
23125         * modules/ucs4-utf16: New file.
23126         * MODULES.html.sh (func_all_modules): Add them.
23127
23128 2003-04-03  Bruno Haible  <bruno@clisp.org>
23129
23130         * m4/utf-ucs4.m4: New file.
23131         * m4/ucs4-utf.m4: New file.
23132
23133 2003-04-03  Bruno Haible  <bruno@clisp.org>
23134
23135         * lib/utf8-ucs4.h: New file, from GNU gettext.
23136         * lib/utf16-ucs4.h: New file, from GNU gettext.
23137         * lib/ucs4-utf8.h: New file, from GNU gettext.
23138         * lib/ucs4-utf16.h: New file, from GNU gettext.
23139
23140 2003-04-02  Bruno Haible  <bruno@clisp.org>
23141
23142         * modules/binary-io: New file.
23143         * MODULES.html.sh (func_all_modules): Add it.
23144
23145 2003-04-02  Bruno Haible  <bruno@clisp.org>
23146
23147         * lib/binary-io.h: New file, from GNU gettext.
23148
23149 2003-04-01  Bruno Haible  <bruno@clisp.org>
23150
23151         * modules/pathname: New file.
23152         * MODULES.html.sh (func_all_modules): Add it.
23153
23154 2003-04-01  Bruno Haible  <bruno@clisp.org>
23155
23156         * lib/pathname.h: New file, from GNU gettext.
23157         * lib/concatpath.c: New file, from GNU gettext.
23158
23159 2003-03-30  Bruno Haible  <bruno@clisp.org>
23160
23161         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
23162
23163 2003-03-30  Bruno Haible  <bruno@clisp.org>
23164
23165         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
23166         function chown() doesn't exist.
23167
23168 2003-03-28  Bruno Haible  <bruno@clisp.org>
23169
23170         * modules/copy-file: New file.
23171         * MODULES.html.sh (func_all_modules): Add it.
23172
23173 2003-03-28  Bruno Haible  <bruno@clisp.org>
23174
23175         * m4/copy-file.m4: New file.
23176
23177 2003-03-28  Bruno Haible  <bruno@clisp.org>
23178
23179         * lib/copy-file.h: New file, from GNU gettext.
23180         * lib/copy-file.c: New file, from GNU gettext.
23181
23182 2003-03-18  Jim Meyering  <jim@meyering.net>
23183
23184         * lib/quote.c (quote_n): Fix typo in comment.
23185
23186 2003-03-18  Bruno Haible  <bruno@clisp.org>
23187
23188         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
23189         checking.
23190         * m4/onceonly_2_57.m4: Likewise.
23191
23192 2003-03-17  Bruno Haible  <bruno@clisp.org>
23193
23194         * m4/onceonly.m4: Require autoconf 2.54 or newer.
23195         (m4_quote): Remove macro.
23196         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
23197
23198 2003-03-14  Jim Meyering  <jim@meyering.net>
23199
23200         Merge changes from Coreutils.
23201         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
23202         to be const, in order to avoid warnings.
23203         (obstack_room): Likewise.
23204         (obstack_empty_p): Likewise.
23205
23206 2003-03-14  Bruno Haible  <bruno@clisp.org>
23207
23208         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
23209         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
23210
23211 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23212
23213         Merge changes from Bison.
23214         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
23215         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
23216         when compiling Bison 1.875's `bitset bset = obstack_alloc
23217         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
23218         * lib/hash.c: Include <stdbool.h> unconditionally.
23219
23220 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23221
23222         * m4/onceonly.m4 (m4_quote): New macro.
23223         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
23224         Quote AC_FOREACH variable-expansions properly.
23225
23226 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23227
23228         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
23229
23230 2003-03-09  Paul Eggert  <eggert@twinsun.com>
23231
23232         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
23233         Reported by Bruce Becker; see:
23234         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
23235
23236 2003-03-03  Paul Eggert  <eggert@twinsun.com>
23237             Bruno Haible  <bruno@clisp.org>
23238
23239         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
23240         Reported by John Hughes, see
23241         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
23242
23243 2003-02-20  Bruno Haible  <bruno@clisp.org>
23244
23245         * MODULES.html.sh (func_all_modules): Add poll.
23246
23247 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23248
23249         * modules/poll: New file.
23250
23251 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23252
23253         * lib/poll_.h: New file.
23254         * lib/poll.c: New file.
23255
23256 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23257
23258         * m4/poll.m4: New file.
23259
23260 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23261
23262         * modules/mathl: New file.
23263
23264 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23265
23266         * lib/mathl.h: New file.
23267         * lib/acosl.c: New file.
23268         * lib/asinl.c: New file.
23269         * lib/atanl.c: New file.
23270         * lib/ceill.c: New file.
23271         * lib/cosl.c: New file.
23272         * lib/expl.c: New file.
23273         * lib/floorl.c: New file.
23274         * lib/frexpl.c: New file.
23275         * lib/ldexpl.c: New file.
23276         * lib/logl.c: New file.
23277         * lib/sincosl.c: New file.
23278         * lib/sinl.c: New file.
23279         * lib/sqrtl.c: New file.
23280         * lib/tanl.c: New file.
23281         * lib/trigl.c: New file.
23282         * lib/trigl.h: New file.
23283
23284 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23285
23286         * m4/mathl.m4: New file.
23287
23288 2003-02-18  Bruno Haible  <bruno@clisp.org>
23289
23290         * MODULES.html.sh (func_all_modules): Add mathl.
23291
23292 2003-02-17  Bruno Haible  <bruno@clisp.org>
23293
23294         * modules/mkdtemp: New module.
23295         * MODULES.html.sh (func_all_modules): Add it.
23296
23297 2003-02-17  Bruno Haible  <bruno@clisp.org>
23298
23299         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
23300
23301 2003-02-17  Bruno Haible  <bruno@clisp.org>
23302
23303         * lib/mkdtemp.h: New file, from GNU gettext.
23304         * lib/mkdtemp.c: New file, from GNU gettext.
23305
23306 2003-02-02  Jim Meyering  <jim@meyering.net>
23307
23308         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
23309         e.g. glibc-2.2.93.
23310
23311 2003-01-31  Bruno Haible  <bruno@clisp.org>
23312
23313         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
23314         'rpl_rename'.
23315         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
23316         'rpl_strnlen'.
23317         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
23318         'rpl_strtod'.
23319         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
23320         'rpl_utime'.
23321
23322 2003-01-31  Bruno Haible  <bruno@clisp.org>
23323
23324         * lib/rename.c: #undef rename before defining rpl_rename.
23325         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
23326
23327 2003-01-30  Bruno Haible  <bruno@clisp.org>
23328
23329         * modules/vasnprintf, modules/vasprintf: New modules.
23330         * MODULES.html.sh (func_all_modules): Add them.
23331
23332 2003-01-30  Bruno Haible  <bruno@clisp.org>
23333
23334         * m4/signed.m4: New file, from GNU gettext.
23335         * m4/longdouble.m4: New file, from GNU gettext.
23336         * m4/wchar_t.m4: New file, from GNU gettext.
23337         * m4/wint_t.m4: New file, from GNU gettext.
23338         * m4/vasnprintf.m4: New file.
23339         * m4/vasprintf.m4: New file.
23340
23341 2003-01-30  Bruno Haible  <bruno@clisp.org>
23342
23343         * lib/printf-args.h: New file, from GNU gettext.
23344         * lib/printf-args.c: New file, from GNU gettext.
23345         * lib/printf-parse.h: New file, from GNU gettext.
23346         * lib/printf-parse.c: New file, from GNU gettext.
23347         * lib/vasnprintf.h: New file, from GNU gettext.
23348         * lib/vasnprintf.c: New file, from GNU gettext.
23349         * lib/asnprintf.c: New file, from GNU gettext.
23350         * lib/vasprintf.h: New file, from GNU gettext with modifications.
23351         * lib/vasprintf.c: New file, from GNU gettext.
23352         * lib/asprintf.c: New file, from GNU gettext.
23353
23354 2003-01-29  Bruno Haible  <bruno@clisp.org>
23355
23356         * modules/stpncpy: New module.
23357         * MODULES.html.sh (func_all_modules): Add it.
23358
23359 2003-01-29  Bruno Haible  <bruno@clisp.org>
23360
23361         * m4/stpncpy.m4: New file.
23362
23363 2003-01-29  Bruno Haible  <bruno@clisp.org>
23364
23365         * lib/stpncpy.h: New file, from GNU gettext with modifications.
23366         * lib/stpncpy.c: New file, from GNU gettext with modifications.
23367
23368 2003-01-28  Bruno Haible  <bruno@clisp.org>
23369
23370         * modules/c-ctype: New module.
23371         * MODULES.html.sh (func_all_modules): Add it.
23372
23373 2003-01-28  Bruno Haible  <bruno@clisp.org>
23374
23375         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
23376         Paul Eggert.
23377         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
23378         Paul Eggert.
23379
23380 2003-01-27  Bruno Haible  <bruno@clisp.org>
23381
23382         * modules/xsetenv: New module.
23383         * MODULES.html.sh (func_all_modules): Add it.
23384
23385 2003-01-27  Bruno Haible  <bruno@clisp.org>
23386
23387         * lib/xsetenv.h: New file, from GNU gettext.
23388         * lib/xsetenv.c: New file, from GNU gettext.
23389
23390 2003-01-23  Jim Meyering  <jim@meyering.net>
23391
23392         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
23393         from working on systems without dirfd (at least Irix and OSF1/Tru64).
23394
23395 2003-01-23  Bruno Haible  <bruno@clisp.org>
23396
23397         * modules/minmax: New module.
23398         * MODULES.html.sh (func_all_modules): Add it.
23399
23400 2003-01-23  Bruno Haible  <bruno@clisp.org>
23401
23402         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
23403         Eggert.
23404
23405 2003-01-22  Bruno Haible  <bruno@clisp.org>
23406
23407         * modules/exit: New module.
23408         * MODULES.html.sh (func_all_modules): Add it.
23409
23410 2003-01-22  Bruno Haible  <bruno@clisp.org>
23411
23412         * lib/exit.h: New file, from GNU gettext.
23413
23414 2003-01-19  Bruno Haible  <bruno@clisp.org>
23415
23416         * gnulib-tool: Recognize option --extract-maintainer.
23417         (func_get_maintainer): New function.
23418         * modules/*: Add Maintainer entry.
23419
23420 2003-01-16  Jim Meyering  <jim@meyering.net>
23421
23422         * m4/regex.m4: The `regex' struct is both input and output.
23423         Initialize it before each use.  Patch by Tim Waugh.
23424
23425 2003-01-16  Bruno Haible  <bruno@clisp.org>
23426
23427         * MODULES.html.sh: Add a table of contents. Add the module name as
23428         leftmost column. Add hyperlinks.
23429
23430 2003-01-15  Bruno Haible  <bruno@clisp.org>
23431
23432         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
23433
23434 2003-01-15  Bruno Haible  <bruno@clisp.org>
23435
23436         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
23437         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
23438         suffix.
23439
23440 2003-01-15  Bruno Haible  <bruno@clisp.org>
23441
23442         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
23443
23444 2003-01-15  Bruno Haible  <bruno@clisp.org>
23445
23446         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
23447         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
23448
23449 2003-01-14  Jim Meyering  <jim@meyering.net>
23450
23451         * lib/same.c (same_name): Tweak a comment.
23452
23453 2003-01-14  Bruno Haible  <bruno@clisp.org>
23454
23455         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
23456         when a string comparison is sufficient.
23457
23458 2003-01-14  Bruno Haible  <bruno@clisp.org>
23459
23460         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
23461         'unsigned int'.
23462
23463 2003-01-14  Bruno Haible  <bruno@clisp.org>
23464
23465         * lib/hash-pjw.c: Add comment about low quality of this function.
23466
23467 2003-01-13  Bruno Haible  <bruno@clisp.org>
23468
23469         * modules/stpcpy: Distribute lib/stpcpy.h.
23470         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
23471
23472 2003-01-13  Bruno Haible  <bruno@clisp.org>
23473
23474         * modules/*: Add a description.
23475         * modules/strpbrk: Fix Makefile.am snippet.
23476         * modules/strtoimax: Fix dependencies.
23477         * modules/strtoumax: Likewise.
23478
23479 2003-01-13  Bruno Haible  <bruno@clisp.org>
23480
23481         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
23482         * modules/alloca (Makefile.am): All object files depend on alloca.h.
23483         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
23484
23485 2003-01-13  Bruno Haible  <bruno@clisp.org>
23486
23487         * gnulib-tool (func_create_testdir): Store config/* files in the main
23488         directory.
23489         * config.rpath: Move to ...
23490         * config/config.rpath: ... here.
23491         * modules/gettext: Contains config/config.rpath, not config.rpath.
23492         * modules/iconv: Likewise.
23493
23494 2003-01-12  Paul Eggert  <eggert@twinsun.com>
23495
23496         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23497         to avoid collisions with libcurses and libreadline.
23498
23499         * m4/getstr.m4: Remove.
23500         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
23501
23502 2003-01-12  Paul Eggert  <eggert@twinsun.com>
23503
23504         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23505         to avoid collisions with libcurses and libreadline.
23506
23507         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
23508         * lib/getstr.h, getstr.c: Remove.
23509         * lib/getline.c: Include "getline.h", to check interface.
23510         Move body of old getstr.c here: this defines MIN_CHUNK and
23511         declares getdelim2, which is renamed from getstr.
23512         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
23513
23514         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
23515         All uses changed.
23516         * lib/linebuffer.h: Likewise.
23517         (readline): Remove backward-compatibility macro.
23518
23519 2003-01-12  Paul Eggert  <eggert@twinsun.com>
23520
23521         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23522         to avoid collisions with libcurses and libreadline.
23523         * getstr: Remove.
23524         * MODULES.html.sh: Remove getstr.
23525         * modules/getline: Depend on unlocked-io, not getstr.
23526
23527 2003-01-12  Jim Meyering  <jim@meyering.net>
23528
23529         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
23530
23531 2003-01-10  Bruno Haible  <bruno@clisp.org>
23532
23533         * modules/alloca: Change Makefile.am requirements. Simplify Include
23534         requirements. Add lib/alloca_.h to file list.
23535
23536 2003-01-10  Bruno Haible  <bruno@clisp.org>
23537
23538         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
23539
23540 2003-01-10  Bruno Haible  <bruno@clisp.org>
23541
23542         * lib/alloca_.h: New file.
23543         * lib/getdate.y: Unconditionally include alloca.h.
23544         * lib/makepath.c: Likewise.
23545         * lib/setenv.c: Likewise.
23546         * lib/userspec.c: Likewise.
23547
23548 2003-01-09  Karl Berry  <karl@gnu.org>
23549
23550         * MODULES.html.sh: include `dirname $0` in PATH, to find
23551         gnulib-tool.
23552
23553 2003-01-09  Bruno Haible  <bruno@clisp.org>
23554
23555         * modules/stdbool: Change configure.ac, Makefile.am requirements.
23556         Simplify Include requirements. Add lib/stdbool.h.in to file list.
23557
23558 2003-01-09  Bruno Haible  <bruno@clisp.org>
23559
23560         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
23561
23562 2003-01-09  Bruno Haible  <bruno@clisp.org>
23563
23564         * lib/stdbool.h.in: New file.
23565
23566 2003-01-09  Bruno Haible  <bruno@clisp.org>
23567
23568         * gnulib-tool (func_all_modules): Ignore files ending in ~.
23569         * MODULES.html.sh: Likewise.
23570
23571 2003-01-08  Jim Meyering  <jim@meyering.net>
23572
23573         * lib/full-write.c: Undefine and define-away `const' after inclusion
23574         of errno.h, not before.  Suggestion from Bruno Haible.
23575
23576 2003-01-08  Bruno Haible  <bruno@clisp.org>
23577
23578         * modules/full-read: Depend on full-write.
23579
23580 2003-01-08  Bruno Haible  <bruno@clisp.org>
23581
23582         * lib/safe-read.c: Include specification header first, to ensure its
23583         selfcontainedness.
23584         * lib/full-write.c: Likewise.
23585
23586 2003-01-07  Jim Meyering  <jim@meyering.net>
23587
23588         * lib/full-write.c: Rework so that it may serve to define full_read,
23589         too.
23590         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
23591
23592 2003-01-07  Bruno Haible  <bruno@clisp.org>
23593
23594         * lib/strtoimax.c: Include <stdint.h> as an alternative to
23595         <inttypes.h>.
23596         * lib/xstrtol.h: Likewise.
23597         * lib/xstrtoimax.c: Likewise.
23598         * lib/xstrtoumax.c: Likewise.
23599         * lib/human.h: Likewise.
23600
23601         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
23602         on systems that have <inttypes.h> but not <stdint.h>.
23603
23604 2003-01-07  Bruno Haible  <bruno@clisp.org>
23605
23606         * MODULES.html.sh: Add copyright notice.
23607         (missed_files): Omit CVS directory entries.
23608         (func_module): Make it work with sed-3.02.
23609         * MODULES.txt: Remove file.
23610
23611 2003-01-06  Jim Meyering  <jim@meyering.net>
23612
23613         * lib/version-etc.c: Update year in translatable copyright string.
23614
23615 2003-01-03  Karl Berry  <karl@gnu.org>
23616
23617         * config/config.{guess,sub}: update from prep.
23618
23619 2003-01-02  Karl Berry  <karl@gnu.org>
23620
23621         * doc/COPYING.DOC: belatedly updated to 1.2.
23622
23623 2003-01-01  Karl Berry  <karl@gnu.org>
23624
23625         * gnulib-tool (func_verify_module): report module name $module in
23626         error message, not $1.
23627         * gnulib-tool (create-testdir): don't complain if destdir couldn't
23628         be created, only if it doesn't exist.
23629         * gnulib-tool (last_checkin_date): don't expand the $Date here.
23630
23631 2002-12-31  Paul Eggert  <eggert@twinsun.com>
23632
23633         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
23634
23635 2002-12-31  Paul Eggert  <eggert@twinsun.com>
23636
23637         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
23638         memcmp if strcoll doesn't work.
23639
23640 2002-12-31  Bruno Haible  <bruno@clisp.org>
23641
23642         * lib/utime.c (utime_null): No need to call ftruncate if the file was
23643         nonempty.
23644
23645 2002-12-31  Bruno Haible  <bruno@clisp.org>
23646
23647         * lib/memcoll.c (STRCOLL): New macro.
23648         (memcoll): Use it.
23649
23650 2002-12-31  Bruno Haible  <bruno@clisp.org>
23651
23652         * lib/localcharset.h: New file.
23653         * lib/localcharset.c: Include it.
23654         * lib/unicodeio.c: Likewise.
23655
23656 2002-12-31  Bruno Haible  <bruno@clisp.org>
23657
23658         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
23659         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
23660
23661 2002-12-31  Bruno Haible  <bruno@clisp.org>
23662
23663         * lib/getline.h: Include <stddef.h>, for size_t.
23664
23665         * lib/unicodeio.h: Include <stddef.h>, for size_t.
23666         * lib/unicodeio.c: Don't include <stddef.h>.
23667
23668 2002-12-31  Bruno Haible  <bruno@clisp.org>
23669
23670         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
23671         HAVE_TM_ZONE.
23672
23673 2002-12-24  Karl Berry  <karl@gnu.org>
23674
23675         * config/config.guess: update from prep.
23676
23677 2002-12-24  Bruno Haible  <bruno@clisp.org>
23678
23679         General infrasructure.
23680         * m4/README: Rewritten.
23681         * m4/onceonly.m4: New file.
23682         * m4/onceonly_2_57.m4: New file.
23683
23684         Module atexit.
23685         * m4/atexit.m4: New file.
23686
23687         Module strtod.
23688         * m4/strtod.m4: New file.
23689
23690         Module strtol.
23691         * m4/strtol.m4: New file.
23692
23693         Module strtoul.
23694         * m4/strtoul.m4: New file.
23695
23696         Module memchr.
23697         * m4/memchr.m4: New file.
23698
23699         Module memcmp.
23700         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
23701         (jm_FUNC_MEMCMP): Invoke it.
23702
23703         Module memcpy.
23704         * m4/memcpy.m4: New file.
23705
23706         Module memmove.
23707         * m4/memmove.m4: New file.
23708
23709         Module memset.
23710         * m4/memset.m4: New file.
23711
23712         Module strcspn.
23713         * m4/strcspn.m4: New file.
23714
23715         Module strpbrk.
23716         * m4/strpbrk.m4: New file.
23717
23718         Module strstr.
23719         * m4/strstr.m4: New file.
23720
23721         Module strerror.
23722         * m4/strerror.m4: New file.
23723
23724         Module mktime.
23725         * m4/mktime.m4: Renamed from jm-mktime.m4.
23726         (gl_PREREQ_MKTIME): New macro.
23727         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
23728
23729         Module malloc.
23730         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
23731         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
23732         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
23733
23734         Module realloc.
23735         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
23736         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
23737         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
23738
23739         Module strftime.
23740         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
23741         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
23742         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
23743         gl_TM_GMTOFF.
23744         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
23745
23746         Module xalloc.
23747         * m4/xalloc.m4: New file.
23748
23749         Module alloca.
23750         * m4/alloca.m4: New file.
23751
23752         Module putenv.
23753         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
23754         (jm_FUNC_PUTENV): Invoke it.
23755
23756         Module setenv.
23757         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
23758         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
23759         when invoked twice.
23760         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
23761         gt_FUNC_SETENV.
23762
23763         Module memrchr.
23764         * m4/memrchr.m4: New file.
23765
23766         Module stpcpy.
23767         * m4/stpcpy.m4: New file.
23768
23769         Module strcase.
23770         * m4/strcase.m4: New file.
23771
23772         Module strdup.
23773         * m4/strdup.m4: New file.
23774
23775         Module strnlen.
23776         * m4/strnlen.m4: New file.
23777
23778         Module strndup.
23779         * m4/strndup.m4: New file.
23780
23781         Module xstrtod.
23782         * m4/xstrtod.m4: New file.
23783
23784         Module xstrtol.
23785         * m4/xstrtol.m4: New file.
23786
23787         Module getdate.
23788         * m4/getdate.m4: New file.
23789
23790         Module unlocked-io.
23791         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
23792         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
23793         * m4/jm-glibc-io.m4n: Remove file.
23794
23795         Module long-options.
23796         * m4/long-options.m4: New file.
23797
23798         Module md5.
23799         * m4/md5.m4: New file.
23800
23801         Module sha.
23802         * m4/sha.m4: New file.
23803
23804         Module getstr.
23805         * m4/getstr.m4: New file.
23806
23807         Module getline.
23808         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
23809         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
23810         <sys/types.h>, for size_t. Use the function name gnu_getline, not
23811         simply getline. Infoke gl_PREREQ_GETLINE.
23812
23813         Module obstack.
23814         * m4/obstack.m4: New file.
23815
23816         Module hash.
23817         * m4/hash.m4: New file.
23818
23819         Module readtokens.
23820         * m4/readtokens.m4: New file.
23821
23822         Module strverscmp.
23823         * m4/strverscmp.m4: New file.
23824
23825         Module stdbool.
23826         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
23827         OSF/1.
23828
23829         Module strtoll.
23830         * m4/strtoll.m4: New file.
23831
23832         Module strtoull.
23833         * m4/strtoull.m4: New file.
23834
23835         Module strtoimax.
23836         * m4/strtoimax.m4: New file.
23837
23838         Module strtoumax.
23839         * m4/strtoumax.m4: New file.
23840
23841         Module xstrtoimax.
23842         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
23843         jm_AC_PREREQ_XSTRTOIMAX.
23844         Moved the strtol prerequisites to strtol.m4.
23845         Moved the strtoll prerequisites to strtoll.m4.
23846         Moved the strtoimax prerequisites to strtoimax.m4.
23847
23848         Module xstrtoumax.
23849         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
23850         jm_AC_PREREQ_XSTRTOUMAX.
23851         Moved the strtoul prerequisites to strtoul.m4.
23852         Moved the strtoull prerequisites to strtoull.m4.
23853         Moved the strtoumax prerequisites to strtoumax.m4.
23854
23855         Module chown.
23856         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
23857         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
23858
23859         Module dup2.
23860         * m4/dup2.m4: New file.
23861
23862         Module ftruncate.
23863         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
23864         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
23865
23866         Module getgroups.
23867         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
23868         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
23869
23870         Module gettimeofday.
23871         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
23872         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
23873         gl_PREREQ_GETTIMEOFDAY.
23874
23875         Module mkdir.
23876         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
23877         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
23878
23879         Module mkstemp.
23880         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
23881         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
23882         jm_AC_TYPE_UINTMAX_T.
23883         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
23884
23885         Module stat.
23886         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
23887         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
23888
23889         Module lstat.
23890         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
23891         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
23892
23893         Module timespec.
23894         * m4/timespec.m4 (gl_TIMESPEC): New macro.
23895         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
23896         * m4/st_mtim.m4: Indentation.
23897
23898         Module nanosleep.
23899         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
23900         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
23901         gl_PREREQ_NANOSLEEP.
23902
23903         Module regex.
23904         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
23905         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
23906         (gl_REGEX): New macro.
23907
23908         Module rename.
23909         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
23910         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
23911
23912         Module rmdir.
23913         * m4/rmdir.m4: New file.
23914
23915         Module utime.
23916         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
23917         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
23918         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
23919
23920         Module dirname.
23921         * m4/dirname.m4: New file.
23922
23923         Module getopt.
23924         * m4/getopt.m4: New file.
23925
23926         Module unistd-safer.
23927         * m4/unistd-safer.m4: New file.
23928
23929         Module fnmatch.
23930         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
23931         declaration.
23932         (gl_PREREQ_FNMATCH_EXTRA): New macro.
23933         (gl_FUNC_FNMATCH_POSIX): New macro.
23934         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
23935         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
23936         simply fnmatch.
23937
23938         Module exclude.
23939         * m4/exclude.m4: New file.
23940
23941         Module human.
23942         * m4/human.m4: New file.
23943
23944         Module acl.
23945         * m4/acl.m4: Nop.
23946
23947         Module backupfile.
23948         * m4/backupfile.m4: New file.
23949         * m4/d-ino.m4: Indentation.
23950
23951         Module fsusage.
23952         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
23953         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
23954         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
23955
23956         Module dirfd.
23957         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
23958         requirements.
23959
23960         Module euidaccess.
23961         * m4/euidaccess.m4: New file.
23962
23963         Module file-type.
23964         * m4/file-type.m4: New file.
23965
23966         Module fileblocks.
23967         * m4/fileblocks.m4: New file.
23968
23969         Module filemode.
23970         * m4/filemode.m4: New file.
23971
23972         Module isdir.
23973         * m4/isdir.m4: New file.
23974
23975         Module lchown.
23976         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
23977         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
23978
23979         Module makepath.
23980         * m4/makepath.m4: New file.
23981
23982         Module modechange.
23983         * m4/modechange.m4: New file.
23984
23985         Module mountlist.
23986         * m4/mountlist.m4: New file.
23987         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
23988         Indentation.
23989
23990         Module path-concat.
23991         * m4/path-concat.m4: New file.
23992
23993         Module pathmax.
23994         * m4/pathmax.m4: New file.
23995
23996         Module same.
23997         * m4/same.m4: New file.
23998
23999         Module save-cwd.
24000         * m4/save-cwd.m4: New file.
24001
24002         Module savedir.
24003         * m4/savedir.m4: New file.
24004
24005         Module xgetcwd.
24006         * m4/xgetcwd.m4: New file.
24007         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
24008
24009         Module xreadlink.
24010         * m4/xreadlink.m4: New file.
24011
24012         Module safe-read.
24013         * m4/safe-read.m4: New file.
24014
24015         Module safe-write.
24016         * m4/safe-write.m4: New file.
24017
24018         Module closeout.
24019         * m4/closeout.m4: New file.
24020
24021         Module stdio-safer.
24022         * m4/stdio-safer.m4: New file.
24023
24024         Module getpass.
24025         * m4/getpass.m4: New file.
24026
24027         Module getugroups.
24028         * m4/getugroups.m4: New file.
24029
24030         Module group-member.
24031         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
24032         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
24033
24034         Module idcache.
24035         * m4/idcache.m4: New file.
24036
24037         Module userspec.
24038         * m4/userspec.m4: New file.
24039
24040         Module gettime.
24041         * m4/clock_time.m4: New file.
24042         * m4/gettime.m4: New file.
24043
24044         Module settime.
24045         * m4/settime.m4: New file.
24046
24047         Module posixtm.
24048         * m4/posixtm.m4: New file.
24049
24050         Module gethostname.
24051         * m4/gethostname.m4: New file.
24052
24053         Module canon-host.
24054         * m4/canon-host.m4: New file.
24055
24056         Module gettext.
24057         * m4/codeset.m4: New file, from gettext-0.11.5.
24058         * m4/gettext.m4: New file, from gettext-0.11.5.
24059         * m4/glibc21.m4: New file, from gettext-0.11.5.
24060         * m4/iconv.m4: New file, from gettext-0.11.5.
24061         * m4/intdiv0.m4: New file, from gettext-0.11.5.
24062         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
24063         * m4/inttypes.m4: New file, from gettext-0.11.5.
24064         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
24065         * m4/isc-posix.m4: New file, from gettext-0.11.5.
24066         * m4/lcmessage.m4: New file, from gettext-0.11.5.
24067         * m4/lib-ld.m4: New file, from gettext-0.11.5.
24068         * m4/lib-link.m4: New file, from gettext-0.11.5.
24069         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
24070         * m4/progtest.m4: New file, from gettext-0.11.5.
24071         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
24072         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
24073         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
24074
24075         Module localcharset.
24076         * m4/localcharset.m4: New file.
24077
24078         Module hard-locale.
24079         * m4/hard-locale.m4: New file.
24080
24081         Module mbswidth.
24082         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
24083         onceonly macros.
24084         * m4/mbrtowc.m4: Add comment.
24085
24086         Module memcasecmp.
24087         * m4/memcasecmp.m4: New file.
24088
24089         Module memcoll.
24090         * m4/memcoll.m4: New file.
24091
24092         Module unicodeio.
24093         * m4/unicodeio.m4: New file.
24094
24095         Module rpmatch.
24096         * m4/rpmatch.m4: New file.
24097
24098         Module yesno.
24099         * m4/yesno.m4: New file.
24100
24101         Module exitfail.
24102         * m4/exitfail.m4: New file.
24103
24104         Module c-stack.
24105         * m4/c-stack.m4 (gl_C_STACK): New macro.
24106         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
24107
24108         Module error.
24109         * m4/error.m4 (gl_ERROR): New macro.
24110         (jm_PREREQ_ERROR): Use onceonly macros.
24111
24112         Module fatal.
24113         * m4/fatal.m4: New file.
24114
24115         Module getloadavg.
24116         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
24117         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
24118
24119         Module getpagesize.
24120         * m4/getpagesize.m4: New file.
24121
24122         Module getusershell.
24123         * m4/getusershell.m4: New file.
24124
24125         Module physmem.
24126         * m4/physmem.m4: New file.
24127
24128         Module posixver.
24129         * m4/posixver.m4: New file.
24130
24131         Module quotearg.
24132         * m4/quotearg.m4: New file.
24133
24134         Module quote.
24135         * m4/quote.m4: New file.
24136
24137         Module readutmp.
24138         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
24139
24140         Module sig2str.
24141         * m4/sig2str.m4: New file.
24142
24143         Other.
24144         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
24145         ulonglong.m4.
24146         * m4/intmax_t.m4: New file.
24147         * m4/d-type.m4: Indentation.
24148         * m4/jm-macros.m4: Update.
24149         * m4/prereq.m4 (jm_PREREQ): Update.
24150         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
24151         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
24152         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
24153         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
24154         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
24155         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
24156         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
24157         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
24158         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
24159         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
24160         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
24161         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
24162         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
24163         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
24164         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
24165         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
24166         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
24167         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
24168         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
24169
24170 2002-12-24  Bruno Haible  <bruno@clisp.org>
24171
24172         * MODULES.txt: Update according to m4/ changes.
24173
24174         Module gettext.
24175         * config.rpath: New file, from gettext-0.11.5.
24176
24177         * modules/*: New module descriptions.
24178         * gnulib-tool: New file.
24179         * MODULES.html.sh: New file.
24180
24181 2002-12-21  Karl Berry  <karl@gnu.org>
24182
24183         * doc/fdl.texi: update to version 1.2.
24184
24185 2002-12-19  Karl Berry  <karl@gnu.org>
24186
24187         * config/config.guess: update from prep.
24188
24189 2002-12-18  Bruno Haible  <bruno@clisp.org>
24190
24191         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
24192         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
24193
24194 2002-12-17  Bruno Haible  <bruno@clisp.org>
24195
24196         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
24197         stdlib.h, string.h.
24198
24199 2002-12-17  Bruno Haible  <bruno@clisp.org>
24200
24201         * lib/canon-host.c (strdup): Remove unused declaration.
24202
24203         * lib/fsusage.c: Include full_read.h.
24204         (get_fs_usage): Use full_read instead of safe_read.
24205
24206         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
24207
24208 2002-12-12  Karl Berry  <karl@gnu.org>
24209
24210         * config/config.guess: update from prep.
24211
24212 2002-12-11  Bruno Haible  <bruno@clisp.org>
24213
24214         * m4/setenv.m4: New file, from gettext-0.11.5.
24215
24216 2002-12-11  Bruno Haible  <bruno@clisp.org>
24217
24218         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
24219         not unsetenv().
24220         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
24221         modifications:
24222
24223         2002-12-11  Bruno Haible  <bruno@clisp.org>
24224
24225                 * setenv.c (alloca): Fall back to malloc.
24226                 (freea): New macro.
24227                 (setenv): Use freea() to free memory allocated with alloca().
24228
24229         2002-11-13  Bruno Haible  <bruno@clisp.org>
24230
24231                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
24232                 function declarations.
24233                 * unsetenv.c (unsetenv): Likewise.
24234
24235         2002-03-04  Bruno Haible  <bruno@clisp.org>
24236
24237                 Portability to AIX 4.3.3.
24238                 * unsetenv.c: New file, extracted from setenv.c.
24239                 * setenv.c: Move the unsetenv() function to unsetenv.c.
24240
24241         2001-12-20  Bruno Haible  <bruno@clisp.org>
24242
24243                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
24244                 use malloc instead. For SunOS 4.
24245
24246         2001-12-11  Bruno Haible  <bruno@clisp.org>
24247
24248                 * setenv.c: Declare alloca.
24249                 (compar_fn_t): New typedef.
24250                 (KNOWN_VALUE, STORE_VALUE): Use it.
24251
24252         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
24253         setenv.h.
24254
24255 2002-12-10  Paul Eggert  <eggert@twinsun.com>
24256
24257         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
24258         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
24259         Choose values that are less likely to collide with system fnmatch
24260         options.
24261         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
24262         defined (e.g., a pure POSIX system).
24263         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
24264         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
24265
24266 2002-12-06  Paul Eggert  <eggert@twinsun.com>
24267
24268         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
24269         a pain in practice to deal with generated m4 files.  This change
24270         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
24271
24272         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
24273         and jm-glibc-io.m4, as they are no longer a special case.
24274         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
24275         kludge and the auto-generation stuff.  Check only whether the
24276         functions are declared, not whether they exist, since older hosts
24277         that don't declare the functions can't use the optimization anyway.
24278
24279 2002-12-06  Jim Meyering  <jim@meyering.net>
24280
24281         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
24282
24283         Merge in changes from libc's misc/error.c, in preparation
24284         for the merge of gnulib's changes back into libc.
24285
24286         * lib/error.c (_): Define only if not already defined.
24287         Move definition to follow all #include directives.
24288         Include unlocked-io.h only if !_LIBC.
24289         [_LIBC]: Include <libio/libioP.h>.
24290         [USE_IN_LIBIO]: Include <libio/iolibio.h>
24291         (fflush): Tweak definition to use INTUSE.
24292         (putc): Define.
24293
24294 2002-12-05  Paul Eggert  <eggert@twinsun.com>
24295
24296         * lib/alloca.c [defined emacs]: Include "lisp.h".
24297         (xalloc_die) [defined emacs]: New macro.
24298         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
24299         [! defined emacs]: Include <xalloc.h>.
24300         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
24301         (pointer): Typedef to POINTER_TYPE *.
24302         (malloc): Remove decl; we now always use xmalloc.
24303         (alloca): Use old-style definition, since Emacs needs this.
24304         Check for arithmetic overflow when computing combined size.
24305
24306 2002-12-04  Paul Eggert  <eggert@twinsun.com>
24307
24308         Do not generate unlocked-io.h automatically, since it's easier to
24309         maintain it by hand.
24310
24311         * lib/unlocked-io.h: New file, from GNU diffutils,
24312         but with proper copyright notice and attribution.
24313         * lib/gen-uio: Remove.
24314         * lib/Makefile.am: Add copyright notice.
24315         (libfetish_a_SOURCES): Add unlocked-io.h.
24316         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
24317         (DISTCLEANFILES, io_functions): Remove macros.
24318         (EXTRA_DIST): Remove gen_uio.
24319         (unlocked-io.h): Remove rule.
24320
24321 2002-12-04  Jim Meyering  <jim@meyering.net>
24322
24323         Reflect the fact that stat.c and lstat.c are no longer generated.
24324         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
24325         (DISTCLEANFILES): Likewise.
24326         (EXTRA_DIST): Likewise.
24327         (all_local): Don't depend on stat.c or lstat.c.
24328         (stat.c, lstat.c): Remove rules.
24329         (EXTRA_DIST): Remove xstat.in.
24330
24331         * lib/xstat.in: Remove file.  Contents moved into stat.c.
24332         * lib/stat.c: New file.  Contents mostly from xstat.in.
24333         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
24334         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
24335
24336         * lib/safe-read.c: Rework so that it may serve to define safe_write,
24337         too.
24338         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
24339
24340 2002-12-03  Jim Meyering  <jim@meyering.net>
24341
24342         * lib/safe-read.c, safe-write.c: Change variable names and comments,
24343         but not semantics, to minimize the differences between these two files.
24344         (safe_read): Change comment to mention SAFE_READ_ERROR.
24345
24346         * lib/safe-read.c (IS_EINTR): Define.
24347         (safe_read): Use IS_EINTR in place of in-function cpp directives.
24348
24349 2002-12-02  Jim Meyering  <jim@meyering.net>
24350
24351         * lib/safe-read.c (EINTR): Define.
24352         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24353         (INT_MAX): Provide fallback.
24354         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
24355
24356         * lib/safe-read.h (SAFE_READ_ERROR): Define.
24357
24358 2002-12-02  Bruno Haible  <bruno@clisp.org>
24359
24360         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
24361         Define, taken from safe-read.c.
24362         (INT_MAX): Provide fallback.
24363         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
24364         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
24365
24366         * lib/safe-read.c (EINTR): Remove definition.
24367         (safe_read): Don't use EINTR if it is absent.
24368
24369 2002-12-01  Jim Meyering  <jim@meyering.net>
24370
24371         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
24372         zero.
24373         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
24374
24375 2002-11-27  Paul Eggert  <eggert@twinsun.com>
24376
24377         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
24378         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
24379         with `if (! (value < limit)) abort ();', for readability.
24380
24381 2002-11-26  Karl Berry  <karl@gnu.org>
24382
24383         * lib/strdup.c: copy from libc again, with jim's ok.
24384         * lib/.cppi-disable: re-add strdup.c
24385
24386 2002-11-25  Karl Berry  <karl@gnu.org>
24387
24388         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
24389         instead of "strtol.c".
24390
24391 2002-11-25  Karl Berry  <karl@gnu.org>
24392
24393         * config/install-sh: update from automake for variable quoting, $0 in
24394         error msgs, etc.
24395
24396         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
24397         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
24398         entry.
24399
24400 2002-11-25  Jim Meyering  <jim@meyering.net>
24401
24402         * lib/mktime.c: Sync from libc, now that it has the latest fix.
24403
24404 2002-11-24  Karl Berry  <karl@gnu.org>
24405
24406         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
24407         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
24408
24409 2002-11-24  Jim Meyering  <jim@meyering.net>
24410
24411         Update from coreutils:
24412
24413         * lib/mktime.c: Merge in changes from libc.
24414
24415         Avoid a link-time failure on some Linux systems.
24416         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
24417         (otherwise).
24418         (__mon_yday): Declare with the STATIC attribute.
24419         (__mktime_internal): Likewise.
24420         Based on a report from Greg Schafer.
24421
24422 2002-11-23  Jim Meyering  <jim@meyering.net>
24423
24424         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
24425         Use `unsigned', not `int', as type of index.
24426
24427         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
24428
24429         * lib/fsusage.c: Remove unneeded parentheses around operands of
24430         `defined'.
24431
24432 2002-11-22  Paul Eggert  <eggert@twinsun.com>
24433
24434         * lib/quotearg.h: Allow multiple inclusion by surrounding with
24435         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
24436         so that we can be included first.
24437         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
24438         * lib/quotearg.c: Include quotearg.h immediately after config.h.
24439         No need to include stddef.h or sys/types.h any more.
24440         Surround local include files with "", not "<>".
24441         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
24442         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
24443         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
24444         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
24445         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
24446         (ISPRINT): Remove; no longer needed now that we assume C89.
24447
24448         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
24449         Preserve errno.
24450
24451         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
24452         quotearg_char): Use SIZE_MAX rather than
24453         (size_t) -1 when we are talking about "infinity".
24454
24455         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
24456
24457 2002-11-22  Paul Eggert  <eggert@twinsun.com>
24458
24459         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
24460         hint that one should use `if (! x) abort ();' rather than `assert
24461         (x);', and anyway it's one less thing to worry about configuring.
24462         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
24463         hash_rehash, hash_insert): Use abort rather than assert.
24464
24465 2002-11-22  Bruno Haible  <bruno@clisp.org>
24466
24467         * lib/safe-read.h: Assume C89. Add comments.
24468         (safe_read): Change return type to size_t.
24469         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
24470         byte counts > SSIZE_MAX correctly.
24471         * lib/safe-write.h: New file.
24472         * lib/safe-write.c: New file.
24473         * lib/full-read.h: New file.
24474         * lib/full-read.c: New file.
24475         * lib/full-write.h: Assume C89. Add comments.
24476         * lib/full-write.c: Include safe-write.h.
24477         (full_write): Rewritten to use safe_write.
24478         Suggested by Jim Meyering and Paul Eggert.
24479
24480 2002-11-21  Jim Meyering  <jim@meyering.net>
24481
24482         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
24483
24484         Merge in changes from the coreutils.
24485
24486         2002-09-25  Paul Eggert  <eggert@twinsun.com>
24487         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
24488         <stdint.h>.
24489         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
24490         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
24491         int.  Work more efficiently if X is the same width as uintmax_t.
24492         Do not compare X to -1, to avoid bogus compiler warning.
24493         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
24494         Don't assume that f_frsize and f_bsize are the same type.
24495
24496         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
24497         warning on FreeBSD.
24498
24499         * lib/makepath.c (make_path): Restore umask *before* creating the final
24500         component.
24501         (make_path): Minor reformatting.
24502
24503         * lib/xmalloc.c: Adjust to work with new autoconf macros,
24504         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
24505         HAVE_MALLOC/HAVE_REALLOC.
24506
24507         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
24508         dummy ones.  At least on GNU/Linux systems, `auto' means something
24509         else.
24510         From Michael Stone.
24511
24512 2002-11-21  Bruno Haible  <bruno@clisp.org>
24513
24514         Remove case insensitive option matching.
24515         * lib/argmatch.h (argcasematch): Remove declaration.
24516         (ARGCASEMATCH): Remove macro.
24517         (__xargmatch_internal): Remove case_sensitive argument.
24518         (XARGMATCH): Update.
24519         (XARGCASEMATCH): Remove macro.
24520         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
24521         case_sensitive argument.
24522         (argcasematch): Remove function.
24523         (__xargmatch_internal): Remove case_sensitive argument.
24524         (main): Use XARGMATCH instead of XARGCASEMATCH.
24525
24526         * lib/xmalloc.c: Change compile-time error message. Add comment about
24527         required autoconf version.
24528
24529 2002-11-20  Paul Eggert  <eggert@twinsun.com>
24530
24531         Merge argmatch cleanups from Bison.  Assume C89.
24532
24533         * lib/argmatch.c: Include config.h here, not in argmatch.h.
24534         Include stdlib.h, for EXIT_FAILURE.
24535         Always include <string.h>, since we assume C89.
24536         (EXIT_FAILURE): Remove pre-C89 bug workaround.
24537         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
24538         Include <stddef.h> instead, since it's all we need for size_t.
24539         (PARAMS): Remove.  All uses removed.
24540         (ARRAY_CARDINALITY): Do not bother to #undef.
24541         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
24542         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
24543         Remove unnecessary parentheses.
24544         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
24545         Insert necessary parentheses.
24546         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
24547         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
24548
24549 2002-11-19  Bruno Haible  <bruno@clisp.org>
24550
24551         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
24552         * lib/mbswidth.h: Include <stddef.h>, for size_t.
24553
24554         * lib/mbswidth.h (PARAMS): Remove macro.
24555         (mbswidth, mbsnwidth): Use ANSI C function declarations.
24556         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
24557
24558         * lib/gcd.h (PARAMS): Remove macro.
24559         (gcd): Use ANSI C function declarations.
24560         * lib/gcd.c (gcd): Likewise.
24561
24562 2002-11-15  Bruno Haible  <bruno@clisp.org>
24563
24564         * lib/strcspn.c: Include <stddef.h>.
24565         (strcspn): Use ANSI C function declaration. Change return type to
24566         size_t. Use NULL.
24567         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
24568         (strpbrk): Use NULL.
24569         * lib/strpbrk.h (PARAMS): Remove macro.
24570         (strpbrk): Use ANSI C function declaration.
24571         * lib/strstr.c: Don't include <sys/types.h>.
24572         * lib/strstr.h (PARAMS): Remove macro.
24573         (strstr): Use ANSI C function declarations.
24574
24575 2002-11-14  Karl Berry  <karl@gnu.org>
24576
24577         * config/mkinstalldirs: `do' on separate line, instead of
24578         `for var; do'.
24579
24580 2002-11-06  Bruno Haible  <bruno@clisp.org>
24581
24582         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
24583         * lib/gcd.c (gcd): Likewise.
24584
24585 2002-11-05  Bruno Haible  <bruno@clisp.org>
24586
24587         * lib/gcd.h: New file, from gettext-0.11.5.
24588         * lib/gcd.c: New file, from gettext-0.11.5.
24589
24590 2002-11-05  Bruno Haible  <bruno@clisp.org>
24591
24592         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24593         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24594         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24595         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24596
24597         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
24598         <libintl.h>.
24599         * lib/makepath.c: Include gettext.h instead of <locale.h> and
24600         <libintl.h>.
24601
24602         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
24603         * lib/human.c: Include gettext.h instead of <libintl.h>.
24604         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
24605         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
24606         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
24607         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
24608         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
24609         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
24610         (textdomain): Remove definition.
24611         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
24612
24613         * lib/long-options.c: Remove include of <libintl.h> and definition of
24614         _.
24615         * lib/same.c: Remove include of <libintl.h> and definition of _.
24616
24617 2002-11-04  Owen Taylor  <otaylor@redhat.com>
24618
24619         * lib/config.charset: A few additions for Solaris.
24620
24621 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
24622
24623         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
24624         * lib/localcharset.c (locale_charset): Declare as extern "C".
24625
24626 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
24627
24628         * lib/config.charset: msdos in uk_UA uses CP1125.
24629
24630 2002-11-04  Bruno Haible  <bruno@clisp.org>
24631
24632         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
24633         * lib/strcase.h: New file, from GNU gettext-0.11.5.
24634         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
24635         * lib/strstr.h: New file, from GNU gettext-0.11.5.
24636         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
24637
24638 2002-11-04  Bruno Haible  <bruno@clisp.org>
24639
24640         * lib/localcharset.c (locale_charset): Don't return an empty string.
24641
24642 2002-11-04  Bruno Haible  <bruno@clisp.org>
24643
24644         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
24645         aliases.
24646
24647 2002-11-04  Bruno Haible  <bruno@clisp.org>
24648
24649         * lib/config.charset: Update for newest glibc. Add canonical names
24650         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
24651
24652 2002-11-04  Bruno Haible  <bruno@clisp.org>
24653
24654         * lib/config.charset: Add support for NetBSD.
24655
24656 2002-11-04  Bruno Haible  <bruno@clisp.org>
24657
24658         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
24659
24660 2002-11-01  Bruno Haible  <bruno@clisp.org>
24661
24662         * configure.in: Add AC_CONFIG_AUX_DIR call.
24663         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
24664         test/Makefile.
24665         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
24666
24667 2002-09-28  Karl Berry  <karl@gnu.org>
24668
24669         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
24670         installed automake until the next release, since changes have been
24671         made.
24672
24673 2002-09-25  Karl Berry  <karl@gnu.org>
24674
24675         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
24676         * lib/getopt*: copy from libc/posix.
24677         * lib/gettext.h: copy from gettext.
24678         * lib/.cppi-disable: add strdup.c, gettext.h.
24679
24680 2002-09-25  Karl Berry  <karl@gnu.org>
24681
24682         * config/srclist.txt: enable gettext.h check.
24683         * config/config.{guess,sub}: update from prep.
24684         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
24685                 from automake 1.6.3.
24686         See srclist*.
24687
24688 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
24689
24690         * regex.c (PATFETCH): Remove the translating fetch.
24691         (PATFETCH_RAW): Rename to PATFETCH.
24692         (set_image_of_range): New fun.
24693         (SET_RANGE_TABLE_WORK_AREA): Use it.
24694         (regex_compile): Don't translate the pattern chars so eagerly.
24695         Only do it when inserting an `exactn' bytecode or when handling
24696         a char-range.
24697         (mutually_exclusive_p): Avoid empty statement.
24698
24699 2002-07-06  Jim Meyering  <meyering@lucent.com>
24700
24701         * m4/README: Don't mention Makefile.am.in.
24702         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
24703
24704 2002-07-01  Jim Meyering  <meyering@lucent.com>
24705
24706         * lib/c-stack.c: Include sys/time.h.
24707         From Volker Borchert.
24708
24709 2002-06-26  Paul Eggert  <eggert@twinsun.com>
24710
24711         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
24712
24713 2002-06-26  Paul Eggert  <eggert@twinsun.com>
24714
24715         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
24716         New macro.  Use it uniformly instead of
24717         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
24718         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
24719         reported by Vin Shelton.
24720
24721 2002-06-22  Paul Eggert  <eggert@twinsun.com>
24722
24723         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
24724         Do not assume SA_SIGINFO behavior.
24725         Bug reported by Jim Meyering on NetBSD 1.5.2.
24726
24727 2002-06-22  Jim Meyering  <meyering@lucent.com>
24728
24729         * m4/c-stack.m4: New file, from diffutils-2.8.2.
24730         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
24731
24732         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
24733         now that configure.ac uses AC_GNU_SOURCE.
24734         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
24735         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
24736
24737         Update to latest tools.  Suggestions from Paul Eggert.
24738         * m4/stdbool.m4: New file, from diffutils-2.8.2.
24739         * m4/gnu-source.m4: Update from diffutils-2.8.2.
24740         * m4/fnmatch.m4: Likewise.
24741         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
24742         to AC_HEADER_STDBOOL
24743
24744 2002-06-22  Jim Meyering  <meyering@lucent.com>
24745
24746         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
24747         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
24748
24749 2002-06-22  Jim Meyering  <meyering@lucent.com>
24750
24751         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
24752
24753         * lib/exitfail.c, exitfail.h: Likewise.
24754         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
24755
24756         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
24757         of fnmatch.h.
24758         (EXTRA_DIST): Add fnmatch_loop.c.
24759         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
24760
24761         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
24762         * lib/fnmatch.c: Update from diffutils-2.8.2.
24763         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
24764         * lib/fnmatch.h: Remove file.
24765
24766 2002-06-21  Jim Meyering  <meyering@lucent.com>
24767
24768         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
24769         * m4/mbrtowc.m4: Likewise.
24770
24771         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
24772         * m4/mbswidth.m4: Reflect name change:
24773         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
24774         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24775
24776         * m4/lib-link.m4: Update from gettext-0.11.2.
24777         * m4/gettext.m4: Likewise.
24778
24779         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
24780         From Alfred M. Szmidt.
24781
24782 2002-06-18  Paul Eggert  <eggert@twinsun.com>
24783
24784         * lib/file-type.h: Report an error if neither S_ISREG nor
24785         S_IFREG is defined, instead of using a test specific to glibc
24786         2.2.  This should be safe, since POSIX requires S_ISREG and
24787         Unix Version 7 had S_IFREG.  We don't need to check for
24788         <sys/types.h> since we don't use any symbols that it defines.
24789
24790 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
24791
24792         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
24793         $@-t, so that each temporary file name is unique and valid in the first
24794         8 characters, for operation under DOS.
24795
24796 2002-06-15  Paul Eggert  <eggert@twinsun.com>
24797
24798         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
24799
24800 2002-06-15  Jim Meyering  <meyering@lucent.com>
24801
24802         Work even with DJGPP 2.03, which lacks support for symlinks.
24803         From Richard Dawe.
24804         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
24805         is defined.
24806         * lib/lchown.c (S_ISLNK): Likewise.
24807
24808 2002-06-15  Jim Meyering  <meyering@lucent.com>
24809
24810         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
24811         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
24812         have been included before this file.
24813
24814 2002-06-14  Jim Meyering  <meyering@lucent.com>
24815
24816         * lib/file-type.h: Use the version from diffutils-2.8.2.
24817         * lib/file-type.c: Likewise.
24818
24819 2002-06-07  Jim Meyering  <meyering@lucent.com>
24820
24821         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
24822         They're needed at least for NetBSD 1.5.2.
24823         ($statxfs_includes): Include those same headers.
24824         ($statxfs_includes): Include sys/vfs.h if available.
24825         ($statxfs_includes): Likewise for sys/statvfs.h.
24826         Check for the following members in both structs statfs and statvfs:
24827         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
24828
24829 2002-06-01  Jim Meyering  <meyering@lucent.com>
24830
24831         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
24832         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
24833
24834 2002-05-28  Jim Meyering  <meyering@lucent.com>
24835
24836         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
24837         Reported by Volker Borchert.
24838
24839 2002-05-27  Jim Meyering  <meyering@lucent.com>
24840
24841         Fix a problem seen only on nonconforming systems whereby ls.c's
24842         use of localtime, and then of gettimeofday would cause trouble:
24843         the localtime call used to initialize rpl_gettimeofday's save
24844         mechanism would clobber ls's current local time information so
24845         that in any long listing the first file would always be listed
24846         with date 1970-01-01.  Analysis by Volker Borchert.
24847
24848         * lib/gettimeofday.c (localtime): Undefine.
24849         (rpl_localtime): New function.
24850
24851 2002-05-27  Jim Meyering  <meyering@lucent.com>
24852
24853         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
24854         localtime.
24855
24856         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
24857         use the replacement function; it wouldn't resolve at link time.
24858         Reported by Volker Borchert.
24859
24860 2002-05-22  Jim Meyering  <meyering@lucent.com>
24861
24862         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
24863         file-type.h.
24864         * lib/file-type.h: New file.
24865         * lib/file-type.c (file_type): New file/function.  Extracted from
24866         diffutils.
24867
24868 2002-04-30  Jim Meyering  <meyering@lucent.com>
24869
24870         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
24871
24872 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24873
24874         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
24875
24876 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24877
24878         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
24879         Do not check for alloca.h (no longer used) or stdbool.h (was never
24880         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
24881
24882 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24883
24884         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
24885
24886 2002-04-29  Jim Meyering  <meyering@lucent.com>
24887
24888         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
24889         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
24890         Use AC_FUNC_STRNLEN here instead.
24891
24892         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
24893         With autoconf-2.53a, it's part of AC_PROG_CC.
24894
24895 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24896
24897         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
24898         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
24899
24900 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24901
24902         * lib/sig2str.h, lib/sig2str.c: New files.
24903         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
24904
24905 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24906
24907         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
24908         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
24909         of 127, since 64 is the largest conceivable number for ancient
24910         nonstandard hosts.
24911         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
24912
24913 2002-04-28  Jim Meyering  <meyering@lucent.com>
24914
24915         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
24916
24917 2002-04-24  Jim Meyering  <meyering@lucent.com>
24918
24919         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
24920         (jm_PREREQ): Use it.
24921
24922         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
24923         mach/mach.h fcntl.h.
24924         Check for this function: setlocale.
24925
24926 2002-04-24  Jim Meyering  <meyering@lucent.com>
24927
24928         * lib/gettext.h: New file, from Gettext.
24929         * lib/Makefile.am (INCLUDES): Remove -I../intl.
24930         (libfetish_a_SOURCES): Add gettext.h.
24931
24932 2002-04-16  Jim Meyering  <meyering@lucent.com>
24933
24934         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
24935         ut_pid, ut_id, ut_exit.
24936
24937 2002-04-16  Jim Meyering  <meyering@lucent.com>
24938
24939         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
24940         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
24941         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
24942
24943 2002-04-12  Jim Meyering  <meyering@lucent.com>
24944
24945         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
24946         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
24947         existence of the getmntinfo function.  Needed for Darwin 5.3.
24948
24949         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
24950         This is necessary at least on Darwin 5.3.
24951
24952         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
24953         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
24954         strnlen.o in the library, and that makes some versions of ranlib
24955         object.
24956
24957 2002-04-12  Jim Meyering  <meyering@lucent.com>
24958
24959         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
24960
24961 2002-04-09  Jim Meyering  <meyering@lucent.com>
24962
24963         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
24964         to be more precise.  Rather than saying we're checking whether the
24965         function `works', say what we're testing.
24966         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
24967         Reported by Bruno Haible.
24968
24969 2002-03-10  Jim Meyering  <meyering@lucent.com>
24970
24971         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
24972         Suggestion from Santiago Vila.
24973
24974 2002-03-08  Jim Meyering  <meyering@lucent.com>
24975
24976         * lib/rename.c: Mention that this wrapper is needed also on
24977         mips-dec-ultrix4.4 systems.
24978
24979 2002-03-02  Jim Meyering  <meyering@lucent.com>
24980
24981         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
24982         not HAVE_CLOCK_SETTIME.
24983
24984 2002-02-27  Paul Eggert  <eggert@twinsun.com>
24985
24986         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
24987         Check for clock_settime.
24988
24989 2002-02-27  Paul Eggert  <eggert@twinsun.com>
24990
24991         * lib/nanosleep.h: Rename to....
24992         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
24993
24994         * lib/gettime.c: New file.
24995         * lib/settime.c: New file.
24996         * lib/stime.c: Remove.
24997
24998         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
24999         timespec.h.  Remove nanosleep.h.
25000
25001 2002-02-25  Paul Eggert  <eggert@twinsun.com>
25002
25003         * m4/acl.m4: New file.
25004         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
25005         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
25006
25007 2002-02-25  Paul Eggert  <eggert@twinsun.com>
25008
25009         * lib/acl.c, lib/acl.h: New files.
25010         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
25011
25012 2002-02-24  Jim Meyering  <meyering@lucent.com>
25013
25014         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
25015         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
25016         cause trouble.  Reported by Nelson Beebe.
25017
25018 2002-02-23  Paul Eggert  <eggert@twinsun.com>
25019
25020         * lib/path-concat.c (xpath_concat): Reorder code to pacify
25021         compilers that don't know that xalloc_die never returns.
25022
25023 2002-02-20  Jim Meyering  <meyering@lucent.com>
25024
25025         * lib/getdate.c: Regenerate using bison-1.33.
25026
25027 2002-02-17  Jim Meyering  <meyering@lucent.com>
25028
25029         * config/config.guess (main): Don't use `head -1'; it's no longer
25030         portable. Use `sed 1q' instead.
25031
25032 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
25033
25034         * m4/codeset.m4: Upgrade to gettext-0.11.
25035         * m4/gettext.m4: Upgrade to gettext-0.11.
25036         * m4/glibc21.m4: Upgrade to gettext-0.11.
25037         * m4/iconv.m4: Upgrade to gettext-0.11.
25038         * m4/isc-posix.m4: Upgrade to gettext-0.11.
25039         * m4/lcmessage.m4: Upgrade to gettext-0.11.
25040         * m4/lib-ld.m4: New file, from gettext-0.11.
25041         * m4/lib-link.m4: New file, from gettext-0.11.
25042         * m4/lib-prefix.m4: New file, from gettext-0.11.
25043         * m4/progtest.m4: Upgrade to gettext-0.11.
25044
25045 2002-02-15  Paul Eggert  <eggert@twinsun.com>
25046
25047         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
25048         (jm_PREREQ): Use it.
25049
25050 2002-02-15  Paul Eggert  <eggert@twinsun.com>
25051
25052         * lib/posixver.c, lib/posixver.h: New files.
25053         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
25054
25055 2002-02-02  Paul Eggert  <eggert@twinsun.com>
25056             Bruno Haible  <bruno@clisp.org>
25057
25058         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
25059         (fwrite_success_callback): New declaration.
25060         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
25061         print_unicode_char. Call failure callback instead of error.
25062         (fwrite_success_callback): New function.
25063         (exit_failure_callback): New function.
25064         (fallback_failure_callback): New function.
25065         (print_unicode_char): Call unicode_to_mb.
25066
25067 2002-01-26  Jim Meyering  <meyering@lucent.com>
25068
25069         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
25070         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
25071
25072 2002-01-26  Jim Meyering  <meyering@lucent.com>
25073
25074         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
25075
25076 2002-01-22  Paul Eggert  <eggert@twinsun.com>
25077
25078         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
25079
25080 2002-01-22  Jim Meyering  <meyering@lucent.com>
25081
25082         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
25083         Otherwise, some versions of automake would omit the rule that makes
25084         Makefile from Makefile.in.
25085
25086 2002-01-21  Paul Eggert  <eggert@twinsun.com>
25087
25088         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
25089         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
25090         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
25091         (memcoll): Set errno to zero if there is no error.
25092
25093         * lib/quotearg.c (quotearg_buffer_restyled):
25094         Fix bug with quoting buffers containing NUL when backslashing escapes.
25095         This bug was exposed by the other changes in this patch.
25096         (quotearg_n_options): New arg ARGSIZE.
25097         All callers changed.
25098         (quoting_options_from_style): New function.
25099         (quotearg_n_style): Use it.
25100         (quotearg_n_style_mem): New function.
25101
25102         * lib/quotearg.h (quotearg_n_style_mem): New function.
25103
25104 2002-01-19  Jim Meyering  <meyering@lucent.com>
25105
25106         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
25107         Remove useless quotes: DF_PROG="df".
25108         * m4/strnlen.m4: New file.
25109
25110 2002-01-16  Paul Eggert  <eggert@twinsun.com>
25111
25112         * lib/backupfile.c (ISDIGIT): Comment fix.
25113         * lib/getdate.y (ISDIGIT): Likewise.
25114         * lib/posixtm.c (ISDIGIT, year): Likewise.
25115         * lib/strverscmp.c (ISDIGIT): Likewise.
25116         * lib/userspec.c (ISDIGIT): Likewise.
25117
25118 2002-01-16  Jim Meyering  <meyering@lucent.com>
25119
25120         * lib/getdate.y: Add three semicolons, each just before a closing
25121         brace. Bison (as of version 1.31) no longer papers over that mistake.
25122
25123 2002-01-05  Jim Meyering  <meyering@lucent.com>
25124
25125         * lib/version-etc.c (version_etc_copyright): Update copyright year.
25126
25127 2001-12-19  Paul Eggert  <eggert@twinsun.com>
25128
25129         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
25130         not silently exit merely because the output buffer happens to
25131         have nothing pending.
25132
25133 2001-12-18  Paul Eggert  <eggert@twinsun.com>
25134
25135         See the big note in ../ChangeLog.
25136         * lib/human.c (suffixes): Prefer K to k for 1024.
25137         (generate_suffix_backwards): New function.
25138         (human_readable_inexact): Use it.
25139         * lib/xstrtol.c (__xstrtol): If there is no number but there
25140         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
25141         Accept 'K' as well as 'k'.
25142
25143 2001-12-15  Jim Meyering  <meyering@lucent.com>
25144
25145         * lib/regex.h (__restrict_arr): Update from libc.
25146
25147         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
25148         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
25149         (STREQ): Define.
25150
25151 2001-12-14  Jim Meyering  <meyering@lucent.com>
25152
25153         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
25154         Suggestion from Bruno Haible.
25155
25156 2001-12-10  Jim Meyering  <meyering@lucent.com>
25157
25158         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
25159         xrealloc, Instead, include "xalloc.h".
25160         (initbuffer): Don't cast xmalloc return value to char*.
25161         (readline): Reword comment.
25162         Don't cast xrealloc return value to char*
25163         Return NULL, not 0.
25164
25165 2001-12-09  Jim Meyering  <meyering@lucent.com>
25166
25167         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
25168         about `signed and unsigned type in conditional expression'.
25169         * lib/posixtm.c (posix_time_parse): Likewise.
25170
25171         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
25172
25173         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
25174         to avoid a pedantic warning.
25175
25176         * lib/getstr.c: Don't include assert.h.
25177         (getstr): Remove warning-evoking assertions.
25178         Return -1 if offset parameter is out of bounds.
25179         Change the type of a local from int to size_t.
25180
25181         * lib/strftime.c (my_strftime_localtime_r): Include this function
25182         definition in the `#if ! HAVE_TM_GMTOFF' block.
25183
25184         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
25185         Include xalloc.h instead.
25186
25187 2001-12-02  Jim Meyering  <meyering@lucent.com>
25188
25189         * lib/tempname.c: Don't declare getenv, thus reverting the change of
25190         2001-11-18.  It's no longer necessary, now that stdlib.h is always
25191         included.
25192
25193         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
25194         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
25195
25196 2001-11-30  Akim Demaille  <akim@epita.fr>
25197
25198         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
25199         before being defined.
25200
25201 2001-11-27  Paul Eggert  <eggert@twinsun.com>
25202
25203         * lib/quotearg.h (quotearg_n, quotearg_n_style):
25204         First arg is int, not unsigned.
25205         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
25206         (SIZE_MAX, UINT_MAX): New macros.
25207         (quotearg_n_options): Abort if N is negative.
25208         Avoid overflow check on hosts where size_t is 64 bits and int
25209         is 32 bits, as overflow is impossible there.
25210         Fix off-by-one typo that caused unnecessary reallocation.
25211
25212 2001-11-27  Jim Meyering  <meyering@lucent.com>
25213
25214         * lib/tempname.c: Merge with version from libc.
25215         * lib/regex.c: Likewise.
25216
25217         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
25218         systems for which STDC_HEADERS is 0, it was not included, resulting in
25219         a warning about an integer-to-pointer conversion problem with getenv.
25220         Reported by Volker Borchert.
25221
25222 2001-11-26  Jim Meyering  <meyering@lucent.com>
25223
25224         * lib/gtod.h: Remove file.
25225         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
25226         * lib/gettimeofday.c: Don't include gtod.h.
25227         (GTOD_init): Remove function.
25228         (rpl_gettimeofday): Do its job here instead, rather than aborting.
25229         Suggestion from Volker Borchert.
25230
25231 2001-11-23  Jim Meyering  <meyering@lucent.com>
25232
25233         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
25234         it.
25235         * lib/hash.c (struct hash_table): Define it here instead.
25236
25237 2001-11-22  Jim Meyering  <meyering@lucent.com>
25238
25239         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
25240
25241 2001-11-20  Jim Meyering  <meyering@lucent.com>
25242
25243         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
25244         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
25245
25246 2001-11-19  Jim Meyering  <meyering@lucent.com>
25247
25248         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
25249         directory.  Use "conftestXXXXXX" as the template.
25250         Suggestion from Paul Eggert.
25251
25252         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
25253         immediately, so the test doesn't mistakenly hit the max-open-files
25254         limit.
25255
25256 2001-11-18  Paul Eggert  <eggert@twinsun.com>
25257
25258         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
25259         (TEMPORARIES): New macro.
25260         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
25261         removes an artificial limitation (e.g. HP-UX 10.20, where
25262         TMP_MAX is 17576).
25263
25264 2001-11-18  Jim Meyering  <meyering@lucent.com>
25265
25266         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
25267
25268 2001-11-18  Jim Meyering  <meyering@lucent.com>
25269
25270         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
25271         on SunOS 4.
25272
25273         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
25274         files will be created before anything else.
25275
25276 2001-11-17  Paul Eggert  <eggert@twinsun.com>
25277
25278         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
25279         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
25280
25281 2001-11-17  Jim Meyering  <meyering@lucent.com>
25282
25283         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
25284         Prompted by a report from Bob Proulx.
25285
25286         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
25287         Instead, require UTILS_FUNC_MKSTEMP.
25288
25289 2001-11-17  Jim Meyering  <meyering@lucent.com>
25290
25291         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
25292         Now, that's done as part of AC_FUNC_STRTOD.
25293
25294 2001-11-17  Jim Meyering  <meyering@lucent.com>
25295
25296         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
25297         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
25298         rather than group writable.  Patch by Juan F. Codagnone.
25299
25300         * lib/readtokens.c: Remove explicit declarations of xmalloc and
25301         xrealloc, Instead, include "xalloc.h".
25302
25303         * lib/mountlist.c: Include unlocked-io.h after all system headers.
25304         Remove explicit declarations of xmalloc, xrealloc,
25305         and xstrdup.  Instead, include "xalloc.h".
25306
25307         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
25308         unlocked-io.h.
25309         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
25310         Likewise.
25311         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
25312
25313         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
25314         Reported by Padraig Brady.
25315
25316         * lib/mkstemp.c: #undef mkstemp.
25317         Include config.h.
25318         (rpl_mkstemp): Rename from mkstemp.
25319         Protoize.
25320
25321 2001-11-16  Jim Meyering  <meyering@lucent.com>
25322
25323         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
25324         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
25325         determine the amount of total physical memory, use pstat_getstatic.
25326         HPUX-11 doesn't define _SC_PHYS_PAGES.
25327         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
25328         If sysconf couldn't be used to determine the amount of available
25329         physical memory, use both pstat_getstatic and pstat_getdynamic.
25330         Based on a patch from Bob Proulx.
25331
25332 2001-11-10  Jim Meyering  <meyering@lucent.com>
25333
25334         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
25335         (jm_PREREQ): Use it.
25336
25337 2001-11-09  Jim Meyering  <meyering@lucent.com>
25338
25339         * m4/jm-macros.m4: Require autoconf-2.52f.
25340         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
25341         Use these AC_-prefixed names, not the AM_-prefixed ones.
25342
25343         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
25344
25345 2001-11-05  Jim Meyering  <meyering@lucent.com>
25346
25347         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
25348
25349 2001-11-04  Jim Meyering  <meyering@lucent.com>
25350
25351         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
25352         $DEFS.
25353
25354 2001-11-03  Jim Meyering  <meyering@lucent.com>
25355
25356         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
25357         of AC_DEFUN.
25358
25359         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
25360         know the name of the variable in the macro definition.
25361
25362 2001-11-03  Jim Meyering  <meyering@lucent.com>
25363
25364         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
25365         in argmatch_to_argument call.
25366
25367         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
25368         argument.
25369
25370         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
25371         e.g., a fault due to an attempt to free a NULL pointer.
25372
25373 2001-11-01  Jim Meyering  <meyering@lucent.com>
25374
25375         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
25376         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
25377
25378 2001-11-01  Jim Meyering  <meyering@lucent.com>
25379
25380         * lib/dirfd.c, lib/dirfd.h: New files.
25381         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
25382
25383         * lib/hash.c (hash_print) [TESTING]: Clean up.
25384
25385 2001-10-22  Paul Eggert  <eggert@twinsun.com>
25386
25387         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
25388         to avoid a warning if -Wall.
25389
25390 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
25391
25392         * README: New file
25393         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
25394         (per RMS's instructions, this is now the canonical source)
25395         * lgpl/, gpl/: New directories.
25396
25397 2001-10-21  Paul Eggert  <eggert@twinsun.com>
25398
25399         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
25400
25401 2001-10-21  Jim Meyering  <meyering@lucent.com>
25402
25403         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
25404         this code would end up calling gettext even in packages built
25405         with --disable-nls.
25406         * lib/getopt.c (_): Likewise.
25407         * lib/regex.c (_): Likewise.
25408
25409 2001-10-20  Paul Eggert  <eggert@twinsun.com>
25410
25411         * m4/error.m4 (jm_PREREQ_ERROR):
25412         Do not invoke AC_CHECK_FUNCS with strerror_r, as
25413         AC_FUNC_STRERROR_R does that.
25414         Check for strerror declaration.
25415
25416         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
25417         are supposed to have them these days.
25418         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
25419         Merge changes from latest Autoconf CVS.
25420         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
25421         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
25422         POSIX decided to standardize on the int flavor of strerror_r.
25423
25424 2001-10-20  Paul Eggert  <eggert@twinsun.com>
25425
25426         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
25427         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
25428         Use strerror_r that is only a macro, even if it is not a function.
25429         (strerror): Check for HAVE_DECL_STRERROR before declaring.
25430         (private_strerror): Use prototypes, not old-style function definition.
25431         (print_errno_message): New function.
25432         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
25433         char*-flavored one.
25434         (error_tail, error, error_at_line): Use it.
25435
25436 2001-10-11  Jim Meyering  <meyering@lucent.com>
25437
25438         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
25439         and quote_n (1, ... to avoid clobbering a buffer.
25440
25441 2001-10-05  Jim Meyering  <meyering@lucent.com>
25442
25443         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
25444         hash-pjw.h.
25445         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
25446         * lib/hash-pjw.h: New file.
25447
25448 2001-09-30  Jim Meyering  <meyering@lucent.com>
25449
25450         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
25451         `struct fsstat' has the `f_fstypename' member.
25452         Use that to define FS_TYPE, which is now used to make
25453         the getfsstat link test tighter.
25454
25455 2001-09-30  Jim Meyering  <meyering@lucent.com>
25456
25457         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
25458         Include <sys/ucred.h>, for Apple Darwin.
25459         Include sys/mount.h and sys/fs_types.h only if available.
25460         (FS_TYPE): Define.
25461         (read_filesystem_list): Use FS_TYPE.
25462
25463 2001-09-29  Paul Eggert  <eggert@twinsun.com>
25464
25465         * lib/exclude.c (excluded_filename): 0 -> false, since it's
25466         a boolean context.
25467
25468 2001-09-29  Jim Meyering  <meyering@lucent.com>
25469
25470         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
25471         [one-argument getmntent function]): Include stdio.h before mntent.h.
25472         SunOS 4.1.x needs it for the declaration of `FILE'.
25473         Patch by Volker Borchert.
25474
25475         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
25476         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
25477         sys/fs_types.h, and make the link-test for getfsstat guard #include
25478         directives with appropriate #if HAVE_*_H tests so that we can
25479         detect getfsstat on Apple Darwin1.3.7 systems.
25480         Reported by Nelson Beebe.
25481         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
25482
25483 2001-09-28  Paul Eggert  <eggert@twinsun.com>
25484
25485         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
25486         #defines strtoimax.  Also treat the other strto* functions
25487         like strtoimax.
25488
25489         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
25490         Check for strtoul and strtoumax,
25491         as those declarations are made even in the signed case.
25492         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
25493         Likewise, for strtol and strtoimax.
25494
25495 2001-09-28  Paul Eggert  <eggert@twinsun.com>
25496
25497         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
25498         #defines strtoimax.  Also treat the other strto* functions
25499         like strtoimax.
25500
25501         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
25502         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
25503         (strtoimax, strtoumax): Do not declare if already defined as a macro.
25504
25505 2001-09-26  Jim Meyering  <meyering@lucent.com>
25506
25507         Most macros in unlocked-io.h had the wrong number of arguments.
25508         * lib/gen-uio: New script.
25509         (USE_UNLOCKED_IO): Define to 1 if not already defined.
25510         * lib/unlocked-io.hin: Remove file.
25511         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
25512         rather than trying to embed it here.
25513         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
25514         Reported by Padraig Brady.
25515
25516 2001-09-25  Volker Borchert  <bt@teknon.de>
25517
25518         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
25519         `result'.
25520
25521 2001-09-24  Jim Meyering  <meyering@lucent.com>
25522
25523         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
25524
25525 2001-09-23  Jim Meyering  <meyering@lucent.com>
25526
25527         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
25528         instead of the mere test for existence of mntent.h.  The latter
25529         would get a false-positive on AIX 3.4 systems.
25530         In the outer getmntent if-block, don't die if neither of the getmntent
25531         tests succeeds.  Instead, just fall through and continue with the
25532         remaining tests.
25533
25534 2001-09-23  Jim Meyering  <meyering@lucent.com>
25535
25536         * lib/mountlist.c: Remove useless parentheses in #if directives.
25537         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
25538         the deprecated MOUNTED symbol is no longer defined in mntent.h.
25539
25540 2001-09-22  Jim Meyering  <meyering@lucent.com>
25541
25542         * m4/gettext.m4: New file.  From gettext.
25543         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
25544         * m4/progtest.m4: Likewise
25545         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
25546         * m4/glibc21.m4: Likewise.
25547
25548         * m4/libintl.m4: Remove.  No longer used.
25549
25550 2001-09-22  Jim Meyering  <meyering@lucent.com>
25551
25552         * lib/localcharset.c: Update from latest gettext.
25553         * lib/config.charset: Likewise.
25554
25555 2001-09-20  Jim Meyering  <meyering@lucent.com>
25556
25557         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
25558         strtoimax.
25559         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
25560         strtoumax.
25561
25562 2001-09-20  Jim Meyering  <meyering@lucent.com>
25563
25564         * lib/xstrtol.c (strtoimax): Guard declaration with
25565         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
25566         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
25567         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
25568         (strtoumax): Likewise, for completeness (it wasn't necessary).
25569
25570 2001-09-17  Paul Eggert  <eggert@twinsun.com>
25571
25572         * lib/strtoimax.c (HAVE_LONG_LONG):
25573         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
25574         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
25575         to work around bug in IBM C compiler.
25576
25577 2001-09-17  Jim Meyering  <meyering@lucent.com>
25578
25579         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
25580         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
25581         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
25582         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
25583         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
25584         whenever the right hand side need not be expanded by the shell.
25585
25586 2001-09-16  Paul Eggert  <eggert@twinsun.com>
25587
25588         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
25589         library.  It's not correct, as some older glibcs are buggy.
25590         fnmatch wasn't fixed until glibc 2.2.
25591
25592         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
25593         special shell magic here.
25594
25595 2001-09-16  Jim Meyering  <meyering@lucent.com>
25596
25597         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
25598         * m4/jm-macros.m4: Require it.
25599
25600 2001-09-16  Jim Meyering  <meyering@lucent.com>
25601
25602         * lib/mkdir.c: New file.
25603
25604 2001-09-15  Jim Meyering  <meyering@lucent.com>
25605
25606         * m4/jm-macros.m4: Check for help2man.
25607
25608 2001-09-11  Jim Meyering  <meyering@lucent.com>
25609
25610         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
25611         The body, by Paul Eggert, was moved here from configure.in.
25612         * m4/jm-macros.m4: Require UTILS_HOST_OS.
25613
25614 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25615
25616         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
25617         (jm_PREREQ): Use it.
25618
25619 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25620
25621         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
25622         Use ssize_t, not int, to store result of readlink.
25623         Check for ssize_t overflow as well as size_t overflow,
25624         as POSIX says the result of readlink is implementation-defined
25625         when ssize_t overflows.
25626         Remove unnecessary cast to char*.
25627         Use free+malloc instead of realloc, as the storage doesn't need
25628         to be preserved and it's clearer and can be more efficient that way.
25629         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
25630         * lib/xreadlink.h (xreadlink): Update prototype.
25631
25632 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25633
25634         * lib/xgetcwd.c: Revert some of the previous change; intead,
25635         fix the HAVE_GETCWD_NULL code to behave more like the
25636         !HAVE_GETCWD_NULL code used to.
25637
25638         Include "xalloc.h".
25639         (xgetcwd): Do not return NULL when memory is exhausted; instead,
25640         invoke xalloc_die.
25641
25642 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25643
25644         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
25645         sys/param.h, as pathmax.h includes them.
25646
25647 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25648
25649         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
25650         (jm_PREREQ_XGETCWD): New macro.
25651
25652         * m4/getcwd.m4: New file.
25653
25654 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25655
25656         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
25657         like the HAVE_GETCWD_NULL code.
25658         Include pathmax.h if not HAVE_GETCWD.
25659         Do not include xalloc.h.
25660         (INITIAL_BUFFER_SIZE): New symbol.
25661         Do not use xmalloc / xrealloc, since the caller is responsible for
25662         handling errors.  Preserve errno around `free' during failure.
25663         Do not overrun buffer when using getwd.
25664
25665 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25666
25667         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
25668         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
25669         getcwd (NULL, 0).
25670
25671 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25672
25673         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
25674         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
25675         spotted by Jim Meyering.
25676
25677 2001-09-03  Jim Meyering  <meyering@lucent.com>
25678
25679         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
25680         failure.
25681
25682 2001-09-02  Jim Meyering  <meyering@lucent.com>
25683
25684         * lib/error.c: Update from GNU libc.
25685
25686 2001-09-01  Jim Meyering  <meyering@lucent.com>
25687
25688         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
25689         Used by df.
25690
25691 2001-09-01  Jim Meyering  <meyering@lucent.com>
25692
25693         * lib/xreadlink.c: New file.
25694         * lib/xreadlink.h: New file.
25695         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
25696         xreadlink.h.
25697
25698         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
25699         doesn't conflict with sparc Solaris 7's definition in
25700         /usr/include/sys/int_types.h.
25701
25702         * lib/exclude.c: Use `""', not `<>' to #include non-system header
25703         files.
25704         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
25705         and strncasecmp as r-values.  Unixware didn't have declarations.
25706
25707 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25708
25709         * lib/xstrtol.h: Add copyright notice.
25710         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
25711         LONGINT_INVALID_SUFFIX_CHAR.
25712
25713 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25714
25715         * lib/xstrtol.c (strtoimax): New decl.
25716
25717 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25718
25719         * lib/xgetcwd.c: Don't include pathmax.h.
25720         Include stdlib.h and unistd.h if available.
25721         Include xalloc.h.
25722         (xmalloc, xstrdup, free): Remove decls.
25723         (xgetcwd): Don't assume sizes fit in unsigned.
25724         Check for overflow when computing sizes.
25725         Simplify reallocation code.
25726
25727 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25728
25729         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
25730         a directory's st_size can have an arbitrary value, so the old
25731         usage could waste an arbitrary amount of memory.  All uses
25732         changed.
25733         * lib/savedir.h: Update prototype.
25734
25735 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25736
25737         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
25738
25739         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
25740         old strtoimax.c.
25741
25742         Also, make the following further changes to make this file's
25743         configuration more similar to that of strtol.c:
25744         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
25745         (strtoumax, uintmax_t, strtoull, strtol): Remove.
25746         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
25747         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
25748         changed to signed values.
25749
25750         And make the following changes as well:
25751         Fix copyright notice, as 1999 was missing.
25752         (verify): New macro.
25753         (strtoimax): Check sizes at compile-time, not run-time.
25754         Prefer strtol to strtoll if both work.
25755         (main): Remove; it was not that useful and was a pain to maintain.
25756
25757         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
25758
25759 2001-08-31  Jim Meyering  <meyering@lucent.com>
25760
25761         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
25762         Use an initial, malloc'd, buffer of length 128 rather than
25763         a statically allocated one of length 1024.
25764
25765 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25766
25767         Simplify code, partly by assuming autoconf 2.52 semantics.
25768
25769         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
25770
25771         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
25772         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
25773         All uses removed.
25774         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
25775         Move AC_REQUIRE to next-to-top level, to avoid confusion.
25776         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
25777         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
25778         jm_AC_HEADER_INTTYPES_H.
25779         * m4/jm-macros.m4 (jm_MACROS): Likewise.
25780
25781         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
25782
25783         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
25784         Quote first arg of AC_DEFUN.
25785         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
25786         since they are needed to parse the include file even if we need
25787         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
25788         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
25789         but with opposite signedness.
25790
25791 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25792
25793         Merge 'exclude' changes from tar 1.13.22.
25794         This fixes one or two unlikely storage allocation overflow bugs,
25795         but doesn't change user-visible behavior otherwise.
25796
25797 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25798
25799         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
25800         (jm_PREREQ_EXCLUDE): New macro.
25801
25802 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25803
25804         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
25805         tm to be declared.
25806
25807 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25808
25809         * lib/hash.c: Remove '2001' from copyright notice.
25810
25811 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25812
25813         * lib/full-write.h: New file.
25814         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
25815         * lib/full-write.c: Correct credits, as cccp.c no longer
25816         exists and anyway it was so heavily changed from the old cccp
25817         code as to be unrecognizable.  Include full-write.h.
25818         (full_write) Return size_t, with short writes meaning failure.
25819         All callers changed.  This fixes a bug with large buffers
25820         on 64-bit hosts.
25821         * lib/utime.c: Include full-write.h.
25822
25823 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25824
25825         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
25826         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
25827         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
25828         Include if available.
25829         (<xalloc.h>): Include
25830         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
25831         (verify): New macro.  Use it to verify that EXCLUDE macros do not
25832         collide with FNM macros.
25833         (struct patopts): New struct.
25834         (struct exclude): Use it, as exclude patterns now come with options.
25835         (new_exclude): Support above changes.
25836         (new_exclude, add_exclude_file):
25837         Initial size must now be a power of two to simplify overflow checking.
25838         (free_exclude, fnmatch_no_wildcards): New function.
25839         (excluded_filename): No longer requires options arg, as the options
25840         are determined by add_exclude.  Now returns bool, not int.
25841         (excluded_filename, add_exclude):
25842         Add support for the fancy new exclusion options.
25843         (add_exclude, add_exclude_file): Now takes int options arg.
25844         Check for arithmetic overflow when computing sizes.
25845         (add_exclude_file): xrealloc might modify errno, so don't
25846         realloc until after errno might be used.
25847
25848         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
25849         New macros.
25850         (free_exclude): New decl.
25851         (add_exclude, add_exclude_file): Now takes int options arg.
25852         (excluded_filename): No longer requires options arg, as the options
25853         are determined by add_exclude.  Now returns bool, not int.
25854
25855 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25856
25857         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
25858
25859 2001-08-27  Jim Meyering  <meyering@lucent.com>
25860
25861         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
25862
25863         * lib/version-etc.c (N_): Remove definition.
25864         Revert most of last change.
25865         Instead, simply don't mark the `Copyright...' string for translation.
25866         Based on advice from Paul Eggert.
25867
25868         * lib/strtoxmax.c: Tweak comment.
25869
25870 2001-08-26  Jim Meyering  <meyering@lucent.com>
25871
25872         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
25873
25874         * m4/xstrtoimax.m4: New file.
25875         * m4/xstrtoumax.m4: Add comments explaining why we
25876         AC_REPLACE_FUNCS(strtol).
25877
25878 2001-08-26  Jim Meyering  <meyering@lucent.com>
25879
25880         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
25881         of copyright with `%s' so translators don't get an untranslated
25882         message in 2002.
25883         (COPYRIGHT_YEAR): Define.
25884         (version_etc): Use fprintf rather than fputs.
25885         Suggestion from Ulrich Drepper.
25886
25887         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
25888
25889         * lib/strtoll.c: New file, from GNU libc.
25890         * lib/xstrtoimax.c: New file.
25891
25892         * lib/xstrtol.h: Add xstrtoimax.
25893         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
25894         * lib/strtoimax.c: New file.  Likewise, but first define
25895         STRTOUXMAX_SIGNED.
25896
25897         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
25898         ...
25899         * lib/strtoxmax.c: ... then renamed to this.
25900
25901 2001-08-18  Paul Eggert  <eggert@twinsun.com>
25902
25903         * m4/inttypes.m4: Add AC_PREREQ(2.13).
25904         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
25905         (jm_AC_TYPE_INTMAX_T): New macro.
25906         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
25907
25908         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
25909
25910         * m4/longlong.m4: Renamed from ulonglong.m4.
25911         * m4/inttypes.m4: Renamed from inttypes_h.m4.
25912         * m4/uintmax_t.m4: Removed.
25913
25914 2001-08-13  Paul Eggert  <eggert@twinsun.com>
25915
25916         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
25917         Port to Solaris 8, where 'sed' requires a space after the 'r'
25918         command, and where sh dislikes "$/".  Clean up the spacing a bit.
25919         Redirect output to $tmp just once.
25920
25921 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
25922
25923         * lib/addext.c (<errno.h>): Include.
25924         (errno): Declare if not defined.
25925         (addext): Work correctly when pathconf returns -1 and leaves
25926         errno alone because there is no limit.  Also, work even if
25927         pathconf returns a value greater than SIZE_MAX.
25928
25929 2001-08-12  Jim Meyering  <meyering@lucent.com>
25930
25931         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
25932         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
25933         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
25934         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
25935         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
25936         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
25937         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
25938         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
25939         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
25940         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
25941         utime.m4, utimes.m4, xstrtoumax.m4:
25942         Quote the first argument in each use of AC_DEFUN.
25943
25944 2001-08-12  Jim Meyering  <meyering@lucent.com>
25945
25946         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
25947         Simply `return getcwd (NULL, 0);'.
25948         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
25949         Use 1300 as initial value for length, not PATH_MAX.
25950
25951         * lib/pathmax.h: Clean up cpp syntax.
25952
25953 2001-08-12  Jim Meyering  <meyering@lucent.com>
25954
25955         * lib/gettimeofday.c: New file.
25956         * lib/gtod.h: New file.
25957         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
25958
25959 2001-08-05  Jim Meyering  <meyering@lucent.com>
25960
25961         * m4/jm-macros.m4: Require autoconf-2.52.
25962
25963 2001-08-04  Jim Meyering  <meyering@lucent.com>
25964
25965         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
25966         stmt, to get in sync with glibc.
25967
25968 2001-08-03  Paul Eggert  <eggert@twinsun.com>
25969
25970         The following changes are from gettext 0.10.39 as maintained by
25971         Bruno Haible.
25972
25973         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
25974         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
25975         with inverted sense.  All uses changed.
25976
25977         * lib/mbswidth.c: Don't include <limits.h>.
25978         Include <stdlib.h> and <string.h> unconditionally.
25979         (iswcntrl, mbsinit, ISCNTRL): New macros.
25980         (mbsnwidth): Use K&R style function declarations.
25981         Don't bother checking for MB_LEN_MAX == 1, since the compiler
25982         can optimize it when MB_CUR_MAX == 1.
25983         The width of control characters is zero, not 1.
25984
25985 2001-08-03  Paul Eggert  <eggert@twinsun.com>
25986
25987         The following changes are from gettext 0.10.39 as maintained by
25988         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
25989
25990         * m4/codeset.m4: Upgrade to serial AM1.
25991         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
25992         all uses changed.  Quote first arg of AC_DEFUN.
25993         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
25994
25995         * m4/iconv.m4: Upgrade to serial AM2.
25996         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
25997         Add --with-libconv-prefix.
25998         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
25999         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
26000         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
26001         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
26002         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
26003
26004         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
26005         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
26006         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
26007         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
26008         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
26009         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
26010         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
26011         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
26012         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
26013
26014         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
26015         string.h any more.
26016
26017         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
26018         not the default value.
26019
26020         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
26021         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
26022         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
26023         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
26024         Also check for iswcntrl, used for wcwidth fallback.
26025         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
26026         to Autoconf 2.13.
26027
26028 2001-08-03  Jim Meyering  <meyering@lucent.com>
26029
26030         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
26031         as it was in the original.  Reported by Paul Eggert.
26032
26033 2001-07-16  Jim Meyering  <meyering@lucent.com>
26034
26035         * m4/gettimeofday.m4: New file.
26036         Prompted by a report from Bernhard Baehr.
26037
26038 2001-07-15  Jim Meyering  <meyering@lucent.com>
26039
26040         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
26041         stuff. Now it's in ../Makefile.cfg.
26042
26043 2001-07-15  Jim Meyering  <meyering@lucent.com>
26044
26045         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
26046         (BUILT_SOURCES): Add unlocked-io.h.
26047         (io_functions): Define.
26048         (unlocked-io.h): New rule.
26049         (DISTCLEANFILES): Add unlocked-io.h.
26050         (all-local): Depend on unlocked-io.h, to ensure it is created.
26051
26052         * lib/unlocked-io.hin: New file
26053
26054         * lib/regex.c: Update from glibc.
26055
26056 2001-07-05  Jim Meyering  <meyering@lucent.com>
26057
26058         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
26059         recommendation.
26060         (libfetish_a_SOURCES): Put all .h files here instead.
26061         Remove a thus-exposed (better checks in automake) duplicate and
26062         two unnecessary .h files.
26063
26064 2001-07-04  Jim Meyering  <meyering@lucent.com>
26065
26066         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
26067         that generates jm-glibc-io.m4 so that it doesn't trigger any make
26068         distcheck failure.
26069
26070 2001-07-02  Jim Meyering  <meyering@lucent.com>
26071
26072         The following changes were prompted by suggestions from Bruno Haible.
26073
26074         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
26075         is now generated.
26076         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
26077         definition of EXTRA_DIST.
26078         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
26079         ensure that the generated file is created/updated whenever the list
26080         of $(unlocked_functions) is changed.
26081         (jm-glibc-io.m4): New rule.
26082         (unlocked-io.h): New rule -- currently unused.
26083
26084 2001-06-24  Jim Meyering  <meyering@lucent.com>
26085
26086         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
26087         unmatched right bracket, rather than kludging it with an extra,
26088         falsely-matching quote in a comment.  Patch by Akim Demaille.
26089
26090 2001-06-11  Jim Meyering  <meyering@lucent.com>
26091
26092         * lib/regex.c: Update from GNU libc.
26093
26094 2001-05-27  Jim Meyering  <meyering@lucent.com>
26095
26096         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
26097         Check for ut_type in struct utmp.
26098
26099 2001-05-27  Jim Meyering  <meyering@lucent.com>
26100
26101         * lib/readutmp.h (UT_TYPE): Define.
26102
26103 2001-05-24  Jim Meyering  <meyering@lucent.com>
26104
26105         * lib/argmatch.c: Include "quote.h".
26106         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
26107         quote function.  Reported by Göran Uddeborg.
26108
26109 2001-05-22  Jim Meyering  <meyering@lucent.com>
26110
26111         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
26112         now that we use the package-supplied version unconditionally.
26113         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
26114
26115 2001-05-21  Jim Meyering  <meyering@lucent.com>
26116
26117         * m4/regex.m4: Change a couple backticks to single quotes to avoid
26118         shell syntax errors.
26119
26120 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
26121
26122         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
26123
26124 2001-05-20  Paul Eggert  <eggert@twinsun.com>
26125
26126         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
26127         Don't bother to check library strftime, since
26128         we'll be using our own my_strftime function anyway.
26129         Define my_strftime instead of strftime.
26130
26131 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
26132
26133         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
26134         which is not yet declared.
26135
26136 2001-05-15  Jim Meyering  <meyering@lucent.com>
26137
26138         * m4/regex.m4: Use proper quoting so brackets appear in the test
26139         program.
26140         Reported by, and with help from, Bruno Haible.
26141
26142 2001-05-13  Jim Meyering  <meyering@lucent.com>
26143
26144         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
26145         undefined.
26146
26147 2001-05-11  Paul Eggert  <eggert@twinsun.com>
26148
26149         dirname code cleanup.  base_name now behaves more compatibly
26150         with POSIX basename when given file names that have trailing
26151         slashes, and similarly for dir_name.  Add new primitives
26152         base_len and dir_len.  Put the directory-name-related decls
26153         into dirname.h.
26154
26155         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
26156         * lib/backupfile.c (base_name): Likewise.
26157         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
26158         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
26159         * lib/makepath.c (strip_trailing_slashes): Likewise.
26160         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
26161         ISSLASH): Likewise.
26162         * lib/rename.c (strip_trailing_slashes): Likewise.
26163         * lib/same.c (base_name): Likewise.
26164         * lib/stripslash.c (ISSLASH): Likewise.
26165
26166         * lib/addext.c: Include <dirname.h> after size_t is defined.
26167         * lib/backupfile.c: Likewise.
26168
26169         * lib/addext.c (addext): Use base_len to trim redundant
26170         trailing slashes instead of doing it ourselves.
26171         But do not trim the last slash if it is not redundant.
26172
26173         * lib/backupfile.c (find_backup_file_name,
26174         max_backup_version): Use base_len instead of rolling it ourselves.
26175         Handle the case of "" and (on DOS) "C:" correctly.
26176
26177         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
26178         needed. Include <string.h>, <dirname.h>.
26179         (base_name): Allow file names ending in slashes, other than names
26180         that are all slashes.  In this case, return the basename followed
26181         by the slashes.  This is more general, and can be used in places
26182         where the original base_name purposely had an assertion failure.
26183         (base_len): New function.
26184
26185         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
26186         Do not include <assert.h>; no longer needed.
26187         Include xalloc.h.
26188         (memrchr): Remove decl.
26189         (dir_name_r): Remove.
26190         (dir_len): Renamed from dirlen.  All callers changed.
26191         Rewrite in terms of base_name, for simplicity and consistency.
26192         (dir_name): Never return NULL.  All callers changed.
26193         Do not include <stdlib.h> in test program; no longer needed.
26194         return 0; is fine for test program.
26195
26196         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
26197         New macros.
26198         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
26199
26200         * lib/path-concat.c (path_concat): Use base_len to compute
26201         base length, not strlen; this means we cannot rely on memcpy
26202         to null-terminate.
26203
26204         * lib/same.c (STREQ): Remove.
26205         (same_name): Handle the case where the basename ends in trailing '/'.
26206
26207         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
26208         a slash was stripped.  Do not strip the last slash after a
26209         file system prefix.
26210
26211 2001-05-11  Paul Eggert  <eggert@twinsun.com>
26212
26213         * lib/Makefile.am (libfetish_a_SOURCES):
26214         Add strftime.c, since we now compile it on all hosts.
26215
26216         * lib/strftime.c (my_strftime):
26217         Define to nstrftime if emacs, but only if my_strftime is not defined.
26218         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
26219         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
26220         Add one more extra argument: a nanoseconds value.
26221         All uses changed.
26222         (ns): New macro.
26223         (my_strftime function): Add %N format.
26224         (emacs_strftimeu): Renamed from emacs_strftime,
26225         with extra ut argument.
26226
26227 2001-05-09  Paul Eggert  <eggert@twinsun.com>
26228
26229         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
26230
26231 2001-04-21  Jim Meyering  <meyering@lucent.com>
26232
26233         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
26234         doesn't interfere.
26235
26236 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
26237
26238         * m4/ftruncate.m4: Check for chsize.
26239         Link with ftruncate.o unconditionally if ftruncate is missing.
26240         This was required when cross-compiling to i586-mingw32msvc.
26241
26242 2001-04-08  Jim Meyering  <meyering@lucent.com>
26243
26244         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
26245         recomputed; that's necessary when the offset spans a DST transition.
26246         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
26247
26248 2001-04-02  Jim Meyering  <meyering@lucent.com>
26249
26250         * lib/regex.h, regex.c: Update from GNU libc.
26251
26252 2001-03-24  Jim Meyering  <meyering@lucent.com>
26253
26254         * m4/jm-macros.m4: Require autoconf-2.49d.
26255
26256 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
26257
26258         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
26259
26260 2001-03-19  Paul Eggert  <eggert@twinsun.com>
26261
26262         * lib/version-etc.c (version_etc_copyright): Update to 2001.
26263
26264 2001-03-17  Jim Meyering  <meyering@lucent.com>
26265
26266         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
26267         now that the version in autoconf is equivalent.
26268         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
26269
26270         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
26271         Suggestion from Akim Demaille.
26272
26273         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
26274         (jm_PREREQ_TEMPNAME): New function.
26275
26276 2001-03-16  Paul Eggert  <eggert@twinsun.com>
26277
26278         * lib/tempname.c (uint64_t): Define to uintmax_t if
26279         not defined, and if UINT64_MAX is not defined.
26280         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
26281         Reported by John David Anglin.
26282
26283 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
26284
26285         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
26286         resolve alias if codeset is empty.
26287         * lib/config.charset (BeOS): Use wildcard syntax.
26288
26289 2001-03-13  Jim Meyering  <meyering@lucent.com>
26290
26291         * lib/path-concat.c (path_concat)
26292         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
26293         concatenating e.g., `C:' and `foo'.
26294         From Bruno Haible.
26295
26296 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
26297
26298         * lib/localcharset.c (locale_charset): Don't use
26299         setlocale(LC_CTYPE,NULL). Don't return NULL.
26300         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
26301
26302 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
26303
26304         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
26305         support for DOS/DJGPP.
26306
26307 2001-03-01  Paul Eggert  <eggert@twinsun.com>
26308
26309         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
26310         lacks mkstemp.  Compile our own tempname.c if we compile our own
26311         mkstemp.c, as mkstemp relies on tempname.
26312
26313 2001-03-01  Jim Meyering  <meyering@lucent.com>
26314
26315         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
26316         AH_VERBATIM really does output its argument verbatim.
26317
26318 2001-02-28  Paul Eggert  <eggert@twinsun.com>
26319
26320         * lib/Makefile.am (libfetish_a_SOURCES):
26321         Add dup-safer.c, fopen-safer.c.
26322         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
26323
26324         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
26325         * lib/unistd-safer.h: New files.
26326
26327 2001-02-25  Paul Eggert  <eggert@twinsun.com>
26328
26329         The mkstemp replacement is taken from glibc 2.2.2, with some
26330         portability fixes for use outside glibc, as follows:
26331
26332         * lib/tempname.c (struct_stat64): New macro.
26333         (direxists, __gen_tempname): Use it.
26334         This avoids a portability problem with Solaris 8.
26335
26336         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
26337         (<stddef.h>, <stdint.h>, <string.h>):
26338         Include only if STDC_HEADERS || _LIBC.
26339         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
26340         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
26341         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
26342         (__set_errno): Define this macro if <errno.h> doesn't.
26343         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
26344         Define these macros if <stdio.h> doesn't.
26345         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
26346         Define these macros if <sys/stat.h>
26347         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
26348         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
26349         __xstat64): Define if not _LIBC.
26350         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
26351         (__gen_tempname): Invoke gettimeofday only if
26352         HAVE_GETTIMEOFDAY || _LIBC;
26353         otherwise, fall back on plain "time".
26354         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
26355
26356         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
26357
26358         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
26359
26360 2001-02-18  Paul Eggert  <eggert@twinsun.com>
26361
26362         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
26363
26364 2001-02-17  Paul Eggert  <eggert@twinsun.com>
26365
26366         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
26367         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
26368         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
26369         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
26370
26371 2001-02-17  Paul Eggert  <eggert@twinsun.com>
26372
26373         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
26374         Remove workaround macros for hosts that have mbrtowc but not
26375         mbstate_t, as we now insist on proper declarations for both
26376         before using mbrtowc.
26377
26378 2001-02-17  Jim Meyering  <meyering@lucent.com>
26379
26380         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
26381         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
26382         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
26383         UnixWare 7.1.1.
26384
26385         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
26386         rather than AC_CACHE_VAL.
26387
26388 2001-02-17  Jim Meyering  <meyering@lucent.com>
26389
26390         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
26391         around included file name.
26392
26393         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
26394
26395         * lib/strftime.c: Update from GNU libc (the only changes were to
26396         comments).
26397
26398 2001-02-17  Jim Meyering  <meyering@lucent.com>
26399
26400         * lib/regex.c: Update from libc.
26401
26402 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
26403
26404         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
26405         clash.
26406
26407 2001-02-16  Paul Eggert  <eggert@twinsun.com>
26408
26409         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
26410         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
26411         Reported by Mark Hounschell via Paul Eggert.
26412
26413 2001-02-07  Jim Meyering  <meyering@lucent.com>
26414
26415         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
26416
26417 2001-02-05  Jim Meyering  <meyering@lucent.com>
26418
26419         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
26420         it includes the patch required for `large file' support with at least
26421         HP-UX's 10.20 /bin/cc.
26422
26423 2001-02-03  Jim Meyering  <meyering@lucent.com>
26424
26425         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
26426         AS_IF, now that it works once again (mysteriously).
26427         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
26428
26429 2001-01-30  Jim Meyering  <meyering@lucent.com>
26430
26431         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
26432         * m4/chown.m4: Rename conftestchown to conftest.chown.
26433         * m4/rename.m4: s/conftestdir/conftest.d1/ and
26434         s/conftestdir2/conftest.d2/.
26435         * m4/utimes.m4: s/conftestdata/conftest.data/
26436         Inspired by Pavel Roskin's change in autoconf.
26437
26438 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
26439
26440         * lib/config.charset: Update for FreeBSD 4.2.
26441
26442 2001-01-27  Jim Meyering  <meyering@lucent.com>
26443
26444         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
26445         a use of AS_IF.
26446         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
26447
26448 2001-01-26  Jim Meyering  <meyering@lucent.com>
26449
26450         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
26451         quotearg.c includes it.
26452
26453 2001-01-26  Jim Meyering  <meyering@lucent.com>
26454
26455         * lib/quotearg.c: Include stddef.h.
26456         * lib/quote.c: Include stddef.h.
26457         Reported by Axel Kittenberger.
26458
26459         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
26460         line in double quotes so that it evokes a better diagnostic.
26461         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
26462         Reported by Axel Kittenberger.
26463
26464 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
26465
26466         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
26467         as if it was a `charset'.
26468
26469 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
26470
26471         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
26472         has const.
26473
26474 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
26475
26476         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
26477         to avoid a warning.  Add back 'const' to inptr.
26478
26479 2001-01-20  Jim Meyering  <meyering@lucent.com>
26480
26481         Be sure that headers are checked before used in code compiled
26482         for the type checks.
26483         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
26484         In place of that, invoke jm_CHECK_ALL_TYPES.
26485         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
26486         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
26487         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
26488         The check for ssize_t was mistakenly run before the test for unistd.h.
26489
26490         The configure-time check for stdbool.h was missing.
26491         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
26492         (jm_PREREQ_HASH): New function.
26493
26494 2001-01-17  Jim Meyering  <meyering@lucent.com>
26495
26496         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
26497         for autoconf-2.49c.
26498         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
26499
26500 2001-01-16  Jim Meyering  <meyering@lucent.com>
26501
26502         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
26503         From Bruno Haible.
26504
26505 2001-01-14  Jim Meyering  <meyering@lucent.com>
26506
26507         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
26508         foo and bar.  Create conftestdir/ in the script, not in the C code.
26509         Remove directories in the script, not in the C code.
26510         Remove conftestdir{,2} before trying to create the directory.
26511         Make the entire configure script fail if the mkdir fails.
26512
26513 2001-01-14  Jim Meyering  <meyering@lucent.com>
26514
26515         * lib/rename.c: New file.  From Volker Borchert.
26516         Include stdlib.h, string.h or strings.h, and xalloc.h.
26517         Use strip_trailing_slashes rather than open-coding it.
26518
26519 2001-01-03  Paul Eggert  <eggert@twinsun.com>
26520
26521         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
26522
26523 2001-01-03  Jim Meyering  <meyering@lucent.com>
26524
26525         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
26526         of local `inptr' to avoid warning with some system declarations of
26527         iconv.
26528
26529 2001-01-02  Volker Borchert  <bt@teknon.de>
26530
26531         * m4/rename.m4: New file.
26532         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
26533
26534 2001-01-01  Jim Meyering  <meyering@lucent.com>
26535
26536         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
26537         even on systems with utmpx.h.  It's necessary for the declaration of
26538         utmp's ut_user member.  Reported by Andreas Jaeger.
26539
26540         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
26541         available. They are required for the declarations of getgrgid and
26542         getpwuid resp.
26543         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
26544         Reported by Andreas Jaeger.
26545
26546 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
26547
26548         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
26549         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
26550         so `make install' also works in VPATH builds.
26551
26552 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
26553
26554         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
26555         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
26556         can be used in subdirectories.
26557
26558 2000-12-29  Paul Eggert  <eggert@twinsun.com>
26559
26560         * lib/modechange.c: Do not assume that mode_t uses the
26561         traditional octal encoding.  E.g. "chmod 1 FOO" should set
26562         the other-execute bit of FOO even if S_IXOTH != 1.
26563
26564         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
26565         WOTH, XOTH, ALLM): New macros.
26566         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
26567          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
26568         Use them.
26569         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
26570         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
26571         (mode_compile):
26572         No need to use uintmax_t; unsigned long is long enough.
26573         Don't bother to get suffix since we don't use it.
26574
26575 2000-12-26  Jim Meyering  <meyering@lucent.com>
26576
26577         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
26578         better with autoheader.
26579
26580 2000-12-24  Jim Meyering  <meyering@lucent.com>
26581
26582         * lib/hash.c (is_prime): Return explicit boolean values.
26583         (hash_get_first): Return NULL to appease Irix5.6's 89.
26584         Reported by Nelson Beebe.
26585
26586 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
26587
26588         * lib/localcharset.c (locale_charset): Add support for Win32.
26589
26590 2000-12-18  Paul Eggert  <eggert@twinsun.com>
26591
26592         * lib/physmem.h, lib/physmem.c: New files.
26593
26594         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
26595         (noinst_HEADERS): Add physmem.h.
26596
26597         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
26598         't' for compatibility with Solaris 8 sort.
26599
26600 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
26601
26602         * lib/config.charset: Add support for BeOS.
26603
26604 2000-12-17  Jim Meyering  <meyering@lucent.com>
26605
26606         * m4/dos.m4 (jm_AC_DOS): New file and macro.
26607         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
26608
26609 2000-12-16  Jim Meyering  <meyering@lucent.com>
26610
26611         This bug had a serious impact on chown: `chown N:M FILE' (for integer
26612         N and M) would have treated it like `chown N:N FILE'.
26613
26614         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
26615
26616 2000-12-16  Jim Meyering  <meyering@lucent.com>
26617
26618         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
26619         SHELLS_FILE to a file name that's useful on djgpp systems.
26620         Include stdlib.h.
26621         (ADDITIONAL_DEFAULT_SHELLS): Define.
26622         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
26623         Based mostly on a patch from Prashant TR.
26624
26625 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
26626
26627         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
26628         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
26629         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
26630
26631 2000-12-08  Andreas Schwab  <schwab@suse.de>
26632
26633         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
26634         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
26635
26636 2000-12-07  Jim Meyering  <meyering@lucent.com>
26637
26638         * lib/stripslash.c (ISSLASH): Define.
26639         (strip_trailing_slashes): Use ISSLASH rather than comparing against
26640         `/'.
26641         From Prashant TR.
26642
26643         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
26644         (dir_name_r): Declare this function as static.
26645         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
26646         manifest itself on a name containing a mix of slashes and
26647         backslashes.
26648         Make this function work with names starting with a DOS-style
26649         drive letter and colon prefix.
26650         (dir_name): Append `.' if necessary.
26651         Based mostly on patches from Prashant TR and Eli Zaretskii.
26652
26653         * lib/dirname.h (dir_name_r): Remove prototype.
26654
26655 2000-12-06  Paul Eggert  <eggert@twinsun.com>
26656
26657         * m4/off_t-format.m4: Remove this file.
26658         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
26659
26660 2000-12-06  Jim Meyering  <meyering@lucent.com>
26661
26662         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
26663         replacement strtoull, we may well need the replacement strtoul, too.
26664         Check for declarations of strtoul and strtoull.
26665         Check for strtol.  Mainly as a cue to cause automake to include
26666         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
26667         Check for limits.h -- strtol.c needs it.
26668
26669 2000-12-05  Jim Meyering  <meyering@lucent.com>
26670
26671         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
26672
26673 2000-12-04  Jim Meyering  <meyering@lucent.com>
26674
26675         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
26676         Also include memory.h, stdlib.h, unistd.h if appropriate.
26677         Reported by Andreas Jaeger (conflicting declaration of malloc).
26678
26679 2000-12-02  Jim Meyering  <meyering@lucent.com>
26680
26681         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
26682         * m4/jm-macros.m4 (jm_MACROS): require it.
26683
26684 2000-12-02  Jim Meyering  <meyering@lucent.com>
26685
26686         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
26687
26688 2000-12-01  Paul Eggert  <eggert@twinsun.com>
26689
26690         * lib/memrchr.c: Include <config.h> before any system include file.
26691
26692 2000-11-30  Jim Meyering  <meyering@lucent.com>
26693
26694         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
26695
26696 2000-11-30  Jim Meyering  <meyering@lucent.com>
26697
26698         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
26699
26700 2000-11-29  Paul Eggert  <eggert@twinsun.com>
26701
26702         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
26703
26704 2000-11-26  Jim Meyering  <meyering@lucent.com>
26705
26706         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
26707
26708 2000-11-22  Paul Eggert  <eggert@twinsun.com>
26709
26710         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
26711         size of (size_t) -1; it's not portable.
26712
26713 2000-11-17  Jim Meyering  <meyering@lucent.com>
26714
26715         * lib/strstr.c: Update from GNU libc.
26716
26717 2000-11-17  Akim Demaille  <akim@epita.fr>
26718
26719         * lib/obstack.h: Formatting changes.
26720         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
26721         prevent type checking.
26722         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
26723         cast the value to (void *): assigning a `foo *' to a `void *'
26724         variable is valid.
26725         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
26726
26727 2000-11-16  Jim Meyering  <meyering@lucent.com>
26728
26729         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
26730
26731 2000-11-11  Jim Meyering  <meyering@lucent.com>
26732
26733         * lib/error.c: Add a couple #includes, merging from GNU libc version.
26734
26735 2000-11-10  Jim Meyering  <meyering@lucent.com>
26736
26737         * lib/obstack.h: Update from GNU libc.
26738         * lib/obstack.c: Likewise.
26739
26740 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
26741
26742         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
26743
26744 2000-11-06  Paul Eggert  <eggert@twinsun.com>
26745
26746         * lib/getusershell.c (setusershell): Use rewind rather than
26747         fseek/fseeko, to avoid configuration hassles with fseeko.
26748         Don't bother opening SHELLS_FILE if shellstream is NULL;
26749         it's not necessary.
26750
26751 2000-11-05  Jim Meyering  <meyering@lucent.com>
26752
26753         * lib/makepath.h (make_dir): Declare.
26754         * lib/makepath.c (make_dir): Remove `static' attribute.
26755         Tweak a comment.
26756
26757 2000-11-04  Jim Meyering  <meyering@lucent.com>
26758
26759         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
26760
26761 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
26762
26763         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
26764         last one in a bucket, advance to the next bucket.
26765
26766 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
26767
26768         * lib/fnmatch.c: Do not comment out all the code if we are using
26769         the GNU C library, because in some cases we are replacing buggy
26770         code in the GNU C library itself.
26771
26772 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
26773
26774         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
26775         (regex_compile): Catch bogus \(\1\).
26776
26777 2000-10-30  Paul Eggert  <eggert@twinsun.com>
26778
26779         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
26780         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
26781         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
26782
26783 2000-10-30  Paul Eggert  <eggert@twinsun.com>
26784
26785         * lib/error.h, getline.h, modechange.h:
26786         Remove "2000" from Copyright line, as the file hasn't been
26787         changed this year other than in the copyright notice.
26788
26789         * lib/xalloc.h: Add "2000" to Copyright line, as this file
26790         was changed this year.
26791
26792 2000-10-29  Jim Meyering  <meyering@lucent.com>
26793
26794         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
26795         renaming.
26796         * m4/ls-mntd-fs.m4: Likewise
26797
26798 2000-10-29  Jim Meyering  <meyering@lucent.com>
26799
26800         * lib/xstat.in: Fix grammar in comment.
26801
26802 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
26803
26804         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
26805         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
26806         doesn't define __restrict_arr.
26807
26808 2000-10-28  Jim Meyering  <meyering@lucent.com>
26809
26810         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
26811         (jm_PREREQ_MEMCHR): New function.
26812
26813 2000-10-28  Jim Meyering  <meyering@lucent.com>
26814
26815         * lib/memchr.c: Update from libc.
26816         Adjust for portability:
26817         [HAVE_STDLIB_H]: Include stdlib.h.
26818         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
26819         Undef __memchr, too.
26820         [!weak_alias]: Define __memchr to memchr.
26821
26822         * lib/regex.c: Update from libc.
26823         * lib/regex.h: Likewise.
26824         * lib/getopt1.c: Likewise.
26825         * lib/memcmp.c: Likewise.
26826
26827         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
26828         Avoid using fseek, when possible -- it's broken by design.
26829         Patch by Ulrich Drepper.
26830
26831 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
26832
26833         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
26834         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
26835         Giving in to popular pressure to shut up the compiler with casts.
26836
26837 2000-10-26  Jim Meyering  <meyering@lucent.com>
26838
26839         * lib/strftime.c: Update from libc.
26840
26841 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
26842
26843         * regex.c: More `unsigned char' -> `re_char' changes.
26844         Also change several `int' into `re_wchar_t'.
26845         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
26846         (PUSH_FAILURE_POINTER): Don't cast any more.
26847         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
26848         We want GCC to complain, since this piece of code makes
26849         re_match non-reentrant, which *should* be fixed.
26850         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
26851         (EXTEND_BUFFER): Use RETALLOC.
26852         (SET_LIST_BIT): Don't cast.
26853         (re_wchar_t): New type.
26854         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
26855         that those two functions will always properly return.
26856         (IMMEDIATE_QUIT_CHECK): Cast to void.
26857         (analyse_first): Use recursion rather than an explicit stack.
26858         (re_compile_fastmap): Can't fail anymore.
26859         (re_search_2): Don't check re_compile_fastmap for failure.
26860         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
26861         Now also sets the new value (passed in a new argument).
26862         (re_match_2_internal): Use it.
26863         Also, use a new var `reg' of type size_t when looping through regs
26864         rather than reuse the inappropriate `mcnt'.
26865
26866 2000-10-25  Jim Meyering  <meyering@lucent.com>
26867
26868         * lib/obstack.c: Update from libc.
26869
26870 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
26871
26872         * regex.c (regex_compile): Change the way of handling a range from
26873         a char less than 256 to a char not less than 256.
26874
26875 2000-10-24  Andrew Innes  <andrewi@gnu.org>
26876
26877         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
26878         NT-Emacs only.
26879         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
26880         so that re_search functions only quit when callers expect them to.
26881
26882 2000-10-23  Jim Meyering  <meyering@lucent.com>
26883
26884         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
26885         wrong.  That set_locale call must not have any side effects.
26886         From Paul Eggert.
26887
26888 2000-10-22  Jim Meyering  <meyering@lucent.com>
26889
26890         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
26891         [CYCLIC]: Remove now-unused definition.
26892
26893         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
26894         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
26895         Suggestion from Ulrich Drepper.
26896
26897 2000-10-21  Jim Meyering  <meyering@lucent.com>
26898
26899         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
26900         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
26901         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
26902
26903 2000-10-21  Jim Meyering  <meyering@lucent.com>
26904
26905         * lib/dirname.c (memrchr): Declare if necessary.
26906         (dir_name): Remove the restriction that there be no
26907         trailing slashes.  Now, this code skips past them, effectively
26908         ignoring them.
26909         [TEST_DIRNAME] (main): New unit tests.
26910
26911         * lib/memrchr.c: New file from GNU libc.
26912         Undef __memrchr, too.
26913         [!weak_alias]: Define __memrchr to memrchr.
26914         Guard weak_alias use with `#ifdef weak_alias'.
26915
26916 2000-10-21  Jim Meyering  <meyering@lucent.com>
26917
26918         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
26919         (dir_name): Use dir_name_r.
26920         * lib/dirname.h (dir_name_r): Declare it.
26921
26922 2000-10-17  Jim Meyering  <meyering@lucent.com>
26923
26924         * lib/quote.h (PARAMS): Define and use.
26925         Reported by Akim Demaille.
26926
26927         * lib/getopt.c: Update from libc.
26928
26929 2000-10-16  Jim Meyering  <meyering@lucent.com>
26930
26931         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
26932         setlocale.
26933         From Jan Fedak.
26934
26935 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
26936
26937         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
26938
26939 2000-09-25  Jim Meyering  <meyering@lucent.com>
26940
26941         * lib/md5.h (rol): Define (from GnuPG).
26942
26943         * lib/sha.c: Give credit (GnuPG) where due.
26944         (M): Use rol rather than open-coding it.
26945         Add a FIXME comment.
26946
26947 2000-09-21  Jim Meyering  <meyering@lucent.com>
26948
26949         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
26950         Reported by Michael Stone.
26951
26952 2000-09-20  Jim Meyering  <meyering@lucent.com>
26953
26954         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
26955         (noinst_HEADERS): Add sha.h.
26956         Based on code from Scott G. Miller and from GnuPG.
26957
26958 2000-09-18  Jim Meyering  <meyering@lucent.com>
26959
26960         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
26961         LIBS. Otherwise, everyone ends up linking with -lelf for some
26962         configurations.
26963         Reported by Mike Stone.
26964
26965 2000-09-15  Jim Meyering  <meyering@lucent.com>
26966
26967         * lib/regex.c: Update from libc.
26968
26969 2000-09-10  Jim Meyering  <meyering@lucent.com>
26970
26971         * lib/getopt.c (_getopt_internal): Update from glibc.
26972
26973 2000-09-09  Jim Meyering  <meyering@lucent.com>
26974
26975         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
26976         think it should be used as a general replacement for isascii.
26977         * lib/fnmatch.c: Likewise.
26978         * lib/mbswidth.c: Likewise
26979         * lib/regex.c: Likewise.
26980
26981         Don't use atoi.
26982         * lib/userspec.c: Include sys/param.h and limits.h.
26983         Include xstrtol.h.
26984         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
26985         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
26986         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
26987         UID, GID.  Check range.
26988
26989 2000-09-06  Jim Meyering  <meyering@lucent.com>
26990
26991         * lib/getopt.c (_getopt_internal): Update from glibc.
26992
26993 2000-08-30  Jim Meyering  <meyering@lucent.com>
26994
26995         * lib/strftime.c: Merge in changes from GNU libc.
26996
26997 2000-08-26  Jim Meyering  <meyering@lucent.com>
26998
26999         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
27000         * m4/fpending.m4: New file.
27001
27002 2000-08-26  Jim Meyering  <meyering@lucent.com>
27003
27004         * lib/closeout.c: Include "__fpending.h".
27005         (close_stdout_status): Return right away if there's nothing to flush.
27006
27007         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
27008         * lib/__fpending.c: New file.
27009         * lib/__fpending.h: New file.
27010
27011 2000-08-20  Jim Meyering  <meyering@lucent.com>
27012
27013         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
27014         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
27015         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
27016
27017 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
27018
27019         Improve fileutils installation on systems where running
27020         programs (like install) can't be unlinked.
27021         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
27022         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
27023
27024 2000-08-07  Paul Eggert  <eggert@twinsun.com>
27025
27026         Standardize on "memory exhausted" instead of "Memory exhausted"
27027         or "virtual memory exhausted".
27028         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
27029         "virtual memory exhausted".
27030         * lib/same.c (same_name): Invoke xalloc_die instead of printing
27031         our own message.
27032         * lib/userspec.c (parse_user_spec): Likewise.
27033         * lib/bumpalloc.h: comment fix
27034         * lib/same.c, userspec.c: Include xalloc.h.
27035
27036         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
27037         not char *const and pointing to a constant array.
27038         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
27039         (xrealloc): Comment fix.
27040
27041         * lib/userspec.c (parse_user_spec):
27042         Don't translate a message until just before returning,
27043         to avoid unnecessary translation.
27044
27045 2000-08-07  Jim Meyering  <meyering@lucent.com>
27046
27047         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
27048         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
27049         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
27050         getgroups.c, gethostname.c, getopt.h, group-member.c,
27051         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
27052         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
27053         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
27054         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
27055         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
27056         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
27057         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
27058         yesno.c: Back out Copyright date changes for each file with no change
27059         this year.  This eases coordination with other programs using the same
27060         source code modules.  From Paul Eggert.
27061
27062 2000-08-06  Paul Eggert  <eggert@twinsun.com>
27063
27064         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
27065         not char, for compatibility with glibc 2.1.3 strftime.c.
27066
27067 2000-08-03  Greg McGary  <greg@mcgary.org>
27068
27069         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
27070         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
27071         (EXTEND_BUFFER): Use them.
27072
27073 2000-08-01  Jim Meyering  <meyering@lucent.com>
27074
27075         * lib/dirname.c (ISSLASH): Define.
27076         (BACKSLASH_IS_PATH_SEPARATOR): Define.
27077         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
27078         both `\' and `/' may be use as path separators.
27079         Based on a patch from Prashant TR.
27080
27081 2000-07-31  Paul Eggert  <eggert@twinsun.com>
27082
27083         * lib/quotearg.c (quotearg_n_options): Don't make the initial
27084         slot vector a constant, since it might get modified.
27085
27086 2000-07-31  Jim Meyering  <meyering@lucent.com>
27087
27088         * lib/xmalloc.c: Use `virtual memory exhausted', not
27089         `Memory exhausted'.
27090         * lib/obstack.c (print_and_abort): Likewise.
27091
27092 2000-07-30  Paul Eggert  <eggert@twinsun.com>
27093
27094         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
27095         buffer, so that the caller can always quote one small
27096         component of a "memory exhausted" message in slot 0.
27097         From a suggestion by Jim Meyering.
27098
27099 2000-07-30  Jim Meyering  <meyering@lucent.com>
27100
27101         * lib/makepath.c (make_path): Quote the other instance, too.
27102
27103         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
27104         (STATIC_BUF_SIZE): Define.
27105         (quotearg_n_options): Use only statically allocated storage when
27106         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
27107         than STATIC_BUF_SIZE.
27108
27109 2000-07-29  Jim Meyering  <meyering@lucent.com>
27110
27111         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
27112         * lib/dirname.c (dir_name): Likewise.
27113
27114         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
27115         `/'.
27116
27117         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
27118         (dir_name): Assert that there are no trailing slashes.
27119
27120 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
27121
27122         * lib/mbswidth.h (mbswidth): Add a flags argument.
27123         (mbswidth): New declaration.
27124         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
27125         * lib/mbswidth.c (mbswidth): Add a flags argument.
27126         (mbsnwidth): New function.
27127
27128 2000-07-24  Jim Meyering  <meyering@lucent.com>
27129
27130         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
27131
27132 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27133
27134         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
27135
27136 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27137
27138         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
27139         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
27140         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
27141         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
27142         invoke multibyte primitives.
27143
27144 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27145
27146         * lib/quotearg.c:
27147         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
27148         so that mbstate_t is always defined.
27149
27150         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
27151         be 1 in at least one GCC installation, and this configuration
27152         error is likely to be common.  Ignoring MB_LEN_MAX hurts
27153         performance on hosts that have mbrtowc but have only unibyte
27154         locales, but I assume these hosts are rare.
27155
27156 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27157
27158         * lib/mbswidth.c (_XOPEN_SOURCE):
27159         Don't define; this causes problems on Solaris 7.
27160         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
27161
27162 2000-07-23  Jim Meyering  <meyering@lucent.com>
27163
27164         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
27165         too: getgrgid, getpwuid, getuid.
27166
27167 2000-07-23  Jim Meyering  <meyering@lucent.com>
27168
27169         * lib/basename.c (base_name): Add an assertion.
27170
27171 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
27172
27173         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
27174         shadow its mbsinit function.
27175
27176 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
27177
27178         * lib/mbswidth.h: New file.
27179         * lib/mbswidth.c: New file.
27180         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
27181         (noinst_HEADERS): Add mbswidth.h.
27182
27183 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
27184
27185         * lib/config.charset: Add support for FreeBSD. Improve support for
27186         HP-UX and IRIX 6.
27187
27188 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
27189
27190         * m4/mbswidth.m4: New file.
27191         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
27192
27193 2000-07-15  Jim Meyering  <meyering@lucent.com>
27194
27195         * lib/makepath.c: Include quote.h.
27196         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
27197         corresponding argument in a `quote (...)' call.
27198         Give better diagnostics.
27199
27200         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
27201         (noinst_HEADERS): Add quote.h.
27202
27203         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
27204         from tar's src/misc.c.
27205         * lib/quote.h: New file.  Prototypes for same.
27206
27207 2000-07-14  Paul Eggert  <eggert@twinsun.com>
27208
27209         From a suggestion by Bruno Haible.
27210         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
27211         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
27212         to decide whether to define the BeOS workaround macro;
27213         this adjusts to the change to AC_MBSTATE_T.
27214
27215 2000-07-14  Jim Meyering  <meyering@lucent.com>
27216
27217         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
27218         jm_AC_TYPE_UINTMAX_T.
27219
27220 2000-07-13  Paul Eggert  <eggert@twinsun.com>
27221
27222         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
27223
27224         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
27225         quotearg_buffer_restyled): Add support for
27226         clocale_quoting_style.  Undo previous change to
27227         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
27228         and "{RIGHT QUOTATION MARK}" msgids.
27229
27230 2000-07-10  Paul Eggert  <eggert@twinsun.com>
27231
27232         From a suggestion by Bruno Haible.
27233         * m4/mbstate_t.m4 (AC_MBSTATE_T):
27234         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
27235         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
27236         and mbstate_t, to a single-part test that simply defines mbstate_t.
27237         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
27238         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
27239
27240 2000-07-10  Jim Meyering  <meyering@lucent.com>
27241
27242         * m4/strerror_r.m4: Mirror the correction made in autoconf.
27243
27244         * m4/gnu-source.m4: Output to confdefs.h directly.
27245         Suggestion from Akim Demaille.
27246
27247 2000-07-09  Paul Eggert  <eggert@twinsun.com>
27248
27249         The old behavior of quoting `like this' doesn't look good with
27250         newer, ISO-style fonts.  See:
27251         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
27252
27253         Instead, quote "like this" by default.  Let the translator
27254         tailor the locale-specific quoting behavior by providing
27255         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
27256
27257         * lib/quotearg.c (N_): New macro.
27258         (gettext_default): New function.
27259         (quotearg_buffer_restyled): Use
27260         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
27261         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
27262
27263 2000-07-09  Jim Meyering  <meyering@lucent.com>
27264
27265         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
27266         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
27267
27268         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
27269         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
27270
27271 2000-07-09  Jim Meyering  <meyering@lucent.com>
27272
27273         * lib/Most files: Update copyright dates to include 2000.
27274
27275 2000-07-08  Jim Meyering  <meyering@lucent.com>
27276
27277         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
27278         if not defined.
27279         (xgethostname): Remove now-unnecessary #ifdef.
27280         Move declaration of `err' into loop where it's used.
27281
27282 2000-07-05  Paul Eggert  <eggert@twinsun.com>
27283         and Bruno Haible  <haible@clisp.cons.org>
27284
27285         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
27286         only if the test for an object-type mbstate_t fails.  This
27287         prevents us from mistakenly reporting that mbstate_t is a
27288         system object type after we "#define mbstate_t int" to work
27289         around its lack.
27290
27291 2000-07-05  Paul Eggert  <eggert@twinsun.com>
27292         and Bruno Haible  <haible@clisp.cons.org>
27293
27294         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
27295
27296 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27297
27298         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
27299         to strerror_r.
27300         Include <ctype.h> for use of isalpha.
27301
27302 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27303
27304         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
27305         by allocating a larger buffer. Test the gethostname return value for
27306         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
27307         returns an error and ENAMETOOLONG isn't defined.
27308
27309 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27310
27311         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
27312         dimension.
27313
27314 2000-07-04  Jim Meyering  <meyering@lucent.com>
27315
27316         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
27317         of the deprecated AC_CHECKING.
27318
27319 2000-07-04  Jim Meyering  <meyering@lucent.com>
27320
27321         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
27322         Reported by Bruno Haible.
27323
27324 2000-07-04  Jim Meyering  <meyering@lucent.com>
27325
27326         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
27327         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
27328         lacks mbrtowc.
27329
27330 2000-07-03  Paul Eggert  <eggert@twinsun.com>
27331
27332         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
27333         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
27334
27335 2000-07-03  Paul Eggert  <eggert@twinsun.com>
27336         and Bruno Haible  <haible@clisp.cons.org>
27337
27338         * lib/quotearg.c (mbrtowc):
27339         Assign to *pwc, and return 1 only if result is nonzero.
27340         (iswprint): Use ISPRINT when substituting our own mbrtowc.
27341
27342 2000-07-03  Jim Meyering  <meyering@lucent.com>
27343
27344         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
27345
27346 2000-07-03  Jim Meyering  <meyering@lucent.com>
27347
27348         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
27349         This is necessary to get a definition of e.g., UTMP_FILE on
27350         HP-UX 10.20.
27351         From Bob Proulx.
27352
27353 2000-07-02  Jim Meyering  <meyering@lucent.com>
27354
27355         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
27356
27357         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
27358         AC_LIBOBJ(function_name).
27359         * m4/chown.m4: Likewise.
27360         * m4/fnmatch.m4: Likewise.
27361         * m4/ftruncate.m4: Likewise.
27362         * m4/getgroups.m4: Likewise.
27363         * m4/getline.m4: Likewise.
27364         * m4/group-member.m4: Likewise.
27365         * m4/jm-macros.m4: Likewise.
27366         * m4/lstat.m4: Likewise.
27367         * m4/malloc.m4: Likewise.
27368         * m4/memcmp.m4: Likewise.
27369         * m4/nanosleep.m4: Likewise.
27370         * m4/putenv.m4: Likewise.
27371         * m4/realloc.m4: Likewise.
27372         * m4/regex.m4: Likewise.
27373         * m4/stat.m4: Likewise.
27374         * m4/strftime.m4: Likewise.
27375
27376 2000-07-02  Jim Meyering  <meyering@lucent.com>
27377
27378         * lib/quotearg.c (mbstate_t): Don't define here.
27379
27380 2000-07-02  Jim Meyering  <meyering@lucent.com>
27381
27382         * lib/nanosleep.c (SIGCONT): Define if not already defined.
27383
27384 2000-07-01  Jim Meyering  <meyering@lucent.com>
27385
27386         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
27387
27388 2000-07-01  Jim Meyering  <meyering@lucent.com>
27389
27390         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
27391         problem.
27392
27393 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
27394
27395         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
27396         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
27397
27398 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
27399
27400         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
27401         per change in ../m4/ls-mntd-fs.m4.
27402         (read_filesystem_list): Ignore symbolic links.
27403
27404 2000-06-29  Jim Meyering  <meyering@lucent.com>
27405
27406         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
27407         for declaration of strcmp.
27408
27409         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
27410
27411         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
27412         Avoid warning by casting result to `char *' to remove `const'.
27413
27414 2000-06-28  Jim Meyering  <meyering@lucent.com>
27415
27416         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
27417         included by quotearg.c, for which we perform this test.  From
27418         Bruno Haible.
27419
27420 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
27421
27422         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
27423         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
27424         <utmpx.h> exists, put readutmp.o into LIBOBJS.
27425
27426 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
27427
27428         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
27429
27430 2000-06-26  Paul Eggert  <eggert@twinsun.com>
27431
27432         savedir now sets errno on failure and invokes xmalloc to get memory.
27433         Fix a couple of other minor bugs while we're at it.
27434
27435         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
27436         (NAMLEN): Remove macro.
27437         (malloc, realloc): Remove decls.
27438         (stpcpy): Likewise.
27439         ("xalloc.h"): Include.
27440         (NAME_SIZE_DEFAULT): New macro.
27441         (savedir): Use xmalloc / xrealloc to allocate memory.
27442         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
27443         Skip "" directory entries.
27444         Use strlen to calculate directory entry length, since the old method
27445         is rarely used these days and isn't worth supporting.
27446         Don't use a pointer after freeing it.
27447         Check for integer overflow when calculating allocation size.
27448         Use memcpy to copy entries, instead of stpcpy.
27449         Set errno properly when returning NULL.
27450         Check for readdir error.
27451
27452 2000-06-26  Jim Meyering  <meyering@lucent.com>
27453
27454         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
27455
27456 2000-06-25  Jim Meyering  <meyering@lucent.com>
27457
27458         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
27459         Linux header bug when _XOPEN_SOURCE is defined to 500.
27460
27461 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
27462
27463         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
27464         deficiency.
27465
27466 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
27467
27468         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
27469         Include xalloc.h.
27470         Don't include <stdlib.h>.  Don't declare malloc, realloc.
27471
27472 2000-06-24  Jim Meyering  <meyering@lucent.com>
27473
27474         * m4/strerror_r.m4: Revive this file -- to try out an experimental
27475         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
27476         for which strerror does return char*, but which lacks a conveniently
27477         accessible declaration of the function.  If the compile-test says
27478         strerror_r doesn't work, then resort to a `run'-test that works on
27479         BeOS and segfaults on DEC Unix.
27480
27481 2000-06-24  Jim Meyering  <meyering@lucent.com>
27482
27483         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
27484
27485 2000-06-23  Paul Eggert  <eggert@twinsun.com>
27486
27487         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
27488         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
27489
27490 2000-06-23  Paul Eggert  <eggert@twinsun.com>
27491
27492         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
27493         (mbrtowc, mbstate_t): Define substitutes if
27494         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
27495         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
27496         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
27497
27498 2000-06-23  Jim Meyering  <meyering@lucent.com>
27499
27500         * m4/afs.m4: Add missing AC_MSG_RESULT.
27501         Reported by Bruno Haible.
27502
27503         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
27504         Suggestion from Bruno Haible.
27505
27506 2000-06-23  Jim Meyering  <meyering@lucent.com>
27507
27508         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
27509
27510 2000-06-21  Jim Meyering  <meyering@lucent.com>
27511
27512         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
27513
27514 2000-06-21  Jim Meyering  <meyering@lucent.com>
27515
27516         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
27517         (noinst_HEADERS): Add getstr.h.
27518
27519         * lib/getline.c (getstr): Move into a separate file.
27520         * lib/getstr.c (getstr): New file, extracted from getline.c, with
27521         the following changes: new parameter, delim2; both delim[12]
27522         parameters have type `int', not `char'.  The latter would lose
27523         with 8-bit delimiters.
27524         * lib/getstr.h: New file.
27525
27526 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27527
27528         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
27529         than 1024, return a memory chunk of least possible size, instead
27530         of size PATH_MAX + 2. In the loop, increment the size proportionally.
27531         Use free/xmalloc instead of xrealloc to avoid copying for very long
27532         paths.
27533
27534 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27535
27536         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
27537         the empty string.
27538
27539 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27540
27541         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
27542         address, not strdup.  Include <stdlib.h> and don't declare free().
27543
27544 2000-06-19  Jim Meyering  <meyering@lucent.com>
27545
27546         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
27547
27548 2000-06-18  Jim Meyering  <meyering@lucent.com>
27549
27550         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
27551
27552         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
27553         `checking whether...' message to be consistent with that of the
27554         lstat test.
27555
27556 2000-06-18  Jim Meyering  <meyering@lucent.com>
27557
27558         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
27559         Besides, these days every porting target provides a mkdir function.
27560
27561         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
27562         needed. (this snippet comes from src/system.h).
27563
27564 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
27565
27566         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
27567
27568 2000-06-15  Paul Eggert  <eggert@twinsun.com>
27569
27570         * lib/human.c (adjust_value): New function.
27571         (human_readable_inexact): Apply rounding style even when
27572         printing approximate values.
27573
27574 2000-06-14  Paul Eggert  <eggert@twinsun.com>
27575
27576         * lib/human.c (human_readable_inexact): Allow an input block
27577         size that is not a multiple of the output block size, and vice versa.
27578         Reported by Piergiorgio Sartor.
27579
27580 2000-06-14  Paul Eggert  <eggert@twinsun.com>
27581
27582         * lib/getdate.y (get_date): Apply relative times after time
27583         zone indicator, not before.  Reported by Todd A. Jacobs.
27584
27585 2000-06-13  Jim Meyering  <meyering@lucent.com>
27586
27587         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
27588
27589         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
27590
27591 2000-06-12  Paul Eggert  <eggert@twinsun.com>
27592
27593         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
27594
27595 2000-06-12  Jim Meyering  <meyering@lucent.com>
27596
27597         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
27598         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
27599         optional argument.
27600         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
27601         the optional argument, `lib'.
27602
27603 2000-06-08  Jim Meyering  <meyering@lucent.com>
27604
27605         * m4/largefile.m4: Remove file (now that it's part of autoconf).
27606
27607 2000-06-04  Paul Eggert  <eggert@twinsun.com>
27608
27609         Rewrite largefile configuration so that we don't need to run
27610         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
27611         AC_CANONICAL_HOST in configure.in -- jmm]
27612
27613         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
27614         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
27615         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
27616         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
27617         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
27618         All uses changed.
27619         Instead of inspecting the output of getconf, try to compile the
27620         test program without and with the macro definition.
27621         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
27622         for getconf.  Instead, check for the needed flags by compiling
27623         test programs.
27624
27625 2000-06-04  Paul Eggert  <eggert@twinsun.com>
27626
27627         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
27628
27629 2000-06-04  Jim Meyering  <meyering@lucent.com>
27630
27631         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
27632         SunOS 4.1.4 for which gid_t is an unsigned type.
27633
27634 2000-06-03  Jim Meyering  <meyering@lucent.com>
27635
27636         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
27637         now that autoconf requires that.
27638
27639         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
27640         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
27641         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
27642
27643 2000-06-03  Jim Meyering  <meyering@lucent.com>
27644
27645         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
27646
27647 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
27648
27649         * m4/glibc21.m4: New file.
27650         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
27651
27652 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
27653
27654         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
27655         newer, don't install charset.alias.
27656         * lib/config.charset: Change the Linux/glibc rules so they become empty
27657         on glibc-2.1 or newer.
27658
27659 2000-06-02  Jim Meyering  <meyering@lucent.com>
27660
27661         * lib/mountlist.c: Back out last change.  Instead, do this...
27662         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
27663         me_dummy member using the same `ignore'-testing code.
27664         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
27665         fs_type strings.
27666         From Mark D. Roth.
27667
27668 2000-05-29  Jim Meyering  <meyering@lucent.com>
27669
27670         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
27671         mounts with the `ignore' attribute.  Based on a patch from
27672         Mark D. Roth.
27673
27674 2000-05-28  Jim Meyering  <meyering@lucent.com>
27675
27676         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
27677         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27678         * m4/stat.m4: Likewise.
27679         * m4/lstat.m4: Likewise.
27680         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
27681
27682         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
27683         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
27684
27685 2000-05-26  Jim Meyering  <meyering@lucent.com>
27686
27687         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
27688
27689 2000-05-24  Jim Meyering  <meyering@lucent.com>
27690
27691         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
27692         autoconf requires that.
27693         * m4/lib-check.m4: Likewise.
27694         * m4/jm-macros.m4: Likewise.
27695         * m4/strftime.m4: Likewise.
27696
27697         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
27698         AC_CHECK_DECLS, now that autoconf requires that.
27699
27700 2000-05-22  Jim Meyering  <meyering@lucent.com>
27701
27702         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27703         * m4/lstat.m4: Likewise.
27704
27705 2000-05-22  Jim Meyering  <meyering@lucent.com>
27706
27707         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
27708
27709 2000-05-20  Jim Meyering  <meyering@lucent.com>
27710
27711         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
27712         (jm_PREREQ): Use it.
27713
27714 2000-05-18  Jim Meyering  <meyering@lucent.com>
27715
27716         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
27717         back, too, since it may have been modified by allocate_entry.
27718         (hash_delete): Rewrite to use neither the assignment operator
27719         nor the comma operator in an if-expression.
27720
27721 2000-05-15  Paul Eggert  <eggert@twinsun.com>
27722
27723         * lib/closeout.c:
27724         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
27725         Remove; no longer needed.
27726         "quotearg.h": Add include.
27727         (file_name): Do not bother to explicitly initialize to NULL; it's less
27728         efficient on some hosts.
27729         (close_stdout_status): Remove test as to whether stdout was already
27730         closed; it breaks for the case "echo x | sort >&-".
27731         Quote file name colons.
27732         Do not assume that _("write error") lacks format strings.
27733
27734 2000-05-15  Jim Meyering  <meyering@lucent.com>
27735
27736         * lib/version-etc.c (version_etc_copyright): Update the copyright
27737         string used in all --version output.
27738
27739 2000-05-14  Jim Meyering  <meyering@lucent.com>
27740
27741         * lib/closeout.c (close_stdout_set_file_name): New function.
27742         (close_stdout_status): Use new file-scoped global.
27743         Return right away if fstat says the stdout file descriptor is invalid.
27744         * lib/closeout.h (close_stdout_set_file_name): Declare.
27745
27746 2000-05-10  Jim Meyering  <meyering@lucent.com>
27747
27748         * lib/closeout.c [default_exit_status]: New file-scoped variable.
27749         (close_stdout_set_status): New function.
27750         * lib/closeout.h (close_stdout_set_status): Declare.
27751
27752 2000-05-09  Jim Meyering  <meyering@lucent.com>
27753
27754         * m4/gettext.m4: Rename this...
27755         * m4/libintl.m4: ...to this.
27756
27757 2000-05-08  Jim Meyering  <meyering@lucent.com>
27758
27759         * lib/long-options.c: Don't include closeout.h.
27760         (parse_long_options): Don't call close_stdout for --version.
27761
27762 2000-05-06  Paul Eggert  <eggert@twinsun.com>
27763
27764         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
27765         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
27766         2.1.3 bug.  This avoids a clash when files like regex.c define
27767         _GNU_SOURCE.
27768
27769 2000-05-06  Jim Meyering  <meyering@lucent.com>
27770
27771         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
27772         (AC_REPLACE_FUNCS): Add strnlen.
27773
27774         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
27775         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
27776
27777         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
27778         AC_SEARCH_LIBS call for nanosleep.
27779         (LIB_NANOSLEEP): Set and AC_SUBST.
27780
27781 2000-05-06  Jim Meyering  <meyering@lucent.com>
27782
27783         * lib/strnlen.c: Undefine __strnlen and strnlen.
27784         [!weak_alias]: Define __strnlen to strnlen.
27785
27786         * lib/atexit.c: New file, from libiberty.
27787
27788 2000-05-06  Jim Meyering  <meyering@lucent.com>
27789
27790         * lib/closeout.c (close_stdout_status): Also check for errors on the
27791         stderr stream.
27792
27793 2000-05-05  Jim Meyering  <meyering@lucent.com>
27794
27795         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
27796         AC_SEARCH_LIBS call for clock_gettime.
27797         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
27798
27799         * m4/search-libs.m4: Update from autoconf.
27800
27801         su doesn't work on Solaris 2.6.
27802         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
27803         <shadow.h>.  Reported by Dragos Harabor.
27804
27805 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
27806
27807         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
27808         memcpy instead of xmalloc, xrealloc, path_concat.
27809         (locale_charset): Treat empty environment variables as absent.
27810         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
27811
27812 2000-05-04  Jim Meyering  <meyering@lucent.com>
27813
27814         * lib/getopt.c: Update from glibc.
27815         * lib/obstack.c: Likewise.
27816         * lib/obstack.h: Likewise.
27817         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
27818         file
27819
27820         * lib/regex.h: Likewise.
27821         * lib/strndup.c: Likewise.
27822         * lib/strnlen.c: New file, from glibc.
27823
27824 2000-05-03  Jim Meyering  <meyering@lucent.com>
27825
27826         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
27827
27828 2000-05-02  Paul Eggert  <eggert@twinsun.com>
27829
27830         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
27831         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
27832         compile-time test, rather than inspecting host and OS, to
27833         decide whether to define _LARGEFILE_SOURCE.
27834
27835 2000-05-01  Jim Meyering  <meyering@lucent.com>
27836
27837         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
27838
27839         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
27840         Based on a patch from Bruno Haible.
27841
27842 2000-05-01  Jim Meyering  <meyering@lucent.com>
27843
27844         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
27845
27846 2000-04-29  Jim Meyering  <meyering@lucent.com>
27847
27848         * lib/path-concat.c: Declare strdup only if it's not defined.
27849         * lib/canon-host.c: Likewise.
27850
27851 2000-04-28  Jim Meyering  <meyering@lucent.com>
27852
27853         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
27854         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
27855         is included first, then limits.h is included by locale.h by libintl.h.
27856         From John David Anglin.
27857
27858 2000-04-25  Jim Meyering  <meyering@lucent.com>
27859
27860         * lib/makepath.c (S_IRWXUGO): Define.
27861         (make_path): Always perform explicit chmod if MODE specifies any
27862         of the `special' permission bits.  Prompted by a bug report against
27863         install from Mate Wierdl and Joost van Baal.
27864
27865 2000-04-18  Jim Meyering  <meyering@lucent.com>
27866
27867         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
27868         (jm_PREREQ): Use it.
27869
27870 2000-04-18  Jim Meyering  <meyering@lucent.com>
27871
27872         * lib/README: New file.
27873
27874         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
27875         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
27876
27877 2000-04-17  Jim Meyering  <meyering@lucent.com>
27878
27879         Get it right :-)
27880         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
27881         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
27882         Suggestion from Akim Demaille.
27883
27884 2000-04-17  Jim Meyering  <meyering@lucent.com>
27885
27886         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
27887         the definition of it to rpl_strftime also defined-away the system's
27888         declaration.
27889
27890 2000-04-15  Jim Meyering  <meyering@lucent.com>
27891
27892         Use `C' to denote so-called `contiguous' files, the same way
27893         that tar does.
27894         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
27895         (ftypelet): Use S_ISCTG.
27896         From Michael Deutschmann.
27897
27898 2000-04-14  Jim Meyering  <meyering@lucent.com>
27899
27900         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
27901         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
27902         clobbered.
27903
27904 2000-04-14  Jim Meyering  <meyering@lucent.com>
27905
27906         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
27907
27908 2000-04-13  Jim Meyering  <meyering@lucent.com>
27909
27910         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
27911         AH_VERBATIM to insert required #ifndef into config.h.in.
27912         Suggestion from Akim Demaille.
27913
27914 2000-04-12  Jim Meyering  <meyering@lucent.com>
27915
27916         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
27917         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
27918         Christian Krackowizer.
27919
27920         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
27921         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
27922         (AC_SYS_LARGEFILE): Require.
27923         (AM_C_PROTOTYPES): Require.
27924
27925 2000-04-08  Jim Meyering  <meyering@lucent.com>
27926
27927         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
27928         names don't conflict.  Reported by Eli Zaretskii.
27929
27930 2000-04-07  Jim Meyering  <meyering@lucent.com>
27931
27932         * lib/putenv.c: Move inclusion of errno.h so it follows that of
27933         sys/types.h, to work around system header problems on AIX 3.2.5.
27934         From Bruno Haible.
27935
27936 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
27937
27938         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
27939         bug.  Deal with the different error behavior of Irix iconv.
27940
27941 2000-04-05  Paul Eggert  <eggert@twinsun.com>
27942
27943         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
27944         IRIX if the installer said otherwise.
27945
27946 2000-04-05  Jim Meyering  <meyering@lucent.com>
27947
27948         Portability tweaks required for ultrix4.3.
27949         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
27950         (jm_CHECK_DECLS): Add getutent to the list of functions.
27951         (_jm_DECL_HEADERS): Add utmpx.h.
27952         From John David Anglin.
27953
27954         * m4/strftime.m4: Back out the 2000-04-02 change.
27955         Instead of that change, simply undefine putenv in the test program.
27956
27957 2000-04-05  Jim Meyering  <meyering@lucent.com>
27958
27959         Portability tweaks required for ultrix4.3.
27960         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
27961         getutent.
27962         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
27963         * lib/canon-host.c: Declare strdup.
27964         * lib/path-concat.c: Likewise.
27965         From John David Anglin.
27966
27967 2000-04-04  Jim Meyering  <meyering@lucent.com>
27968
27969         Be more DOS 8.3-friendly.
27970         * lib/ref-add.sin: Renamed from ref-add.sed.in.
27971         * lib/ref-del.sin: Renamed from ref-del.sed.in.
27972         * lib/Makefile.am: Reflect renaming.
27973         Reported by Eli Zaretskii.
27974
27975         Use a temporary file name that won't clash with `charset.alias'
27976         in the DOS 8.3 name space.
27977         * lib/Makefile.am (charset_tmp): Define.
27978         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
27979         (uninstall-local): Likewise.
27980         Reported by Eli Zaretskii.
27981
27982 2000-04-03  Jim Meyering  <meyering@lucent.com>
27983
27984         * m4/gettext.m4: Fix typo in comment.
27985
27986         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
27987         textutils/configure.in).  Suggestion from Paul Eggert.
27988         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
27989
27990 2000-04-02  Paul Eggert  <eggert@twinsun.com>
27991
27992         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
27993         variable in the shell rather than using putenv, which isn't
27994         portable.  This avoids the configure-time inter-test dependency
27995         on the potentially-renamed putenv function.
27996
27997 2000-03-30  Paul Eggert  <eggert@twinsun.com>
27998
27999         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
28000         before checking struct stat.st_blksize, so that
28001         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
28002
28003 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28004
28005         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
28006         since strftime.c uses HAVE_STRFTIME to decide whether to use
28007         the underlying strftime.
28008
28009 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28010
28011         * lib/time/strftime.c (my_strftime): Make sure we call the system
28012         strftime, not ourselves, when invoking the underlying strftime.
28013
28014 2000-03-24  Jim Meyering  <meyering@lucent.com>
28015
28016         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
28017         (charset_alias): Define.
28018         (install-exec-local): Factor out common code.
28019         (uninstall-local): Split lines longer than 80.
28020         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
28021         (SUFFIXES): Define.
28022         (.sed.in.sed): New rule.  Don't redirect directly to $@.
28023         (CLEANFILES): Add ref-add.sed and ref-del.sed.
28024
28025 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
28026
28027         * lib/config.charset: Output a line containing "Packages using this
28028         file".
28029         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
28030         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
28031         ref-del.sed): New rules.
28032
28033 2000-03-17  Jim Meyering  <meyering@lucent.com>
28034
28035         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
28036         Otherwise, include <strings.h>
28037
28038 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
28039
28040         * lib/unicodeio.c (utf8_wctomb): New function.
28041         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
28042         format instead of in UCS-4 with platform dependent endianness.
28043
28044 2000-03-10  Jim Meyering  <meyering@lucent.com>
28045
28046         * m4/lib-check.m4: Look for getspnam in -lgen, too.
28047         From Marco Franzen.
28048
28049 2000-03-07  Paul Eggert  <eggert@twinsun.com>
28050
28051         * lib/savedir.c (savedir): Work even if directory size is
28052         negative; this can happen with some screwy NFS configurations.
28053
28054 2000-03-06  Jim Meyering  <meyering@lucent.com>
28055
28056         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
28057         if it's NULL (because we ran out of memory).  From Bruno Haible.
28058
28059 2000-03-05  Jim Meyering  <meyering@lucent.com>
28060
28061         * lib/localcharset.c ("path-concat.h"): Include.
28062         (get_charset_aliases): Use path_concat instead of ANSI string
28063         concatenation.
28064
28065         * lib/unicodeio.h (PARAMS): Define.
28066         Use it to guard prototype.
28067
28068 2000-03-04  Jim Meyering  <meyering@lucent.com>
28069
28070         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
28071         for lib/localcharset.c.
28072
28073 2000-03-04  Jim Meyering  <meyering@lucent.com>
28074
28075         * lib/Makefile.am (install-exec-local): Create $(libdir) before
28076         installing into it.
28077         (uninstall-local): Uncomment this rule so `make distcheck' works
28078         once again.
28079
28080         * lib/unicodeio.c (<errno.h>): Include it.
28081         (errno): Declare if not defined.
28082
28083         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
28084
28085         * lib/config.charset: New version, incorporating remarks from a linux
28086         i18n mailing list.  From Bruno Haible.
28087
28088 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
28089
28090         * m4/codeset.m4: New file.
28091         * m4/iconv.m4: New file.
28092         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
28093
28094 2000-03-03  Jim Meyering  <meyering@lucent.com>
28095
28096         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
28097
28098 2000-03-02  Jim Meyering  <meyering@lucent.com>
28099
28100         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
28101         the messages come out on separate lines.
28102
28103         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
28104         rather than jm_CHECK_DECLARATIONS.
28105         * m4/decl.m4: Remove now-unused file.
28106
28107         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
28108         geteuid.
28109
28110 2000-03-02  Jim Meyering  <meyering@lucent.com>
28111
28112         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
28113
28114 2000-03-01  Jim Meyering  <meyering@lucent.com>
28115
28116         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
28117         * lib/unicodeio.c: Likewise.
28118
28119 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
28120
28121         * lib/config.charset: New file.
28122         * lib/localcharset.c: New file.
28123         * lib/unicodeio.h, lib/unicodeio.c: New files.
28124         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
28125         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
28126         (noinst_HEADERS): Add unicodeio.h.
28127         (all-local, install-exec-local, charset.alias): New targets.
28128
28129 2000-02-28  Paul Eggert  <eggert@twinsun.com>
28130
28131         * lib/quotearg.c (ALERT_CHAR): New macro.
28132         (quotearg_buffer_restyled): Use it.
28133
28134 2000-02-27  Jim Meyering  <meyering@lucent.com>
28135
28136         * m4/check-decl.m4: Add getenv to the list.
28137
28138 2000-02-27  Jim Meyering  <meyering@lucent.com>
28139
28140         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
28141         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
28142
28143         * lib/backupfile.c: Guard inclusion of stdlib.h with
28144         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
28145         Declare malloc if needed.
28146
28147         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
28148         `#ifndef HAVE_DECL..'
28149         now that autoconf always defines the HAVE_DECL_ symbols.
28150         * lib/human.c: Likewise.
28151         * lib/same.c: Likewise.
28152         * lib/strtoumax.c: Likewise.
28153
28154         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
28155         declaration check was not run.
28156         * lib/hash.c: Likewise.
28157         * lib/human.c: Likewise.
28158         * lib/same.c: Likewise.
28159         * lib/strtoumax.c: Likewise.
28160
28161         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
28162         `.', then first look up the entire `.'-containing string as a login
28163         name.
28164
28165 2000-02-23  Jim Meyering  <meyering@lucent.com>
28166
28167         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
28168         in place of my hack.
28169
28170 2000-02-18  Paul Eggert  <eggert@twinsun.com>
28171
28172         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
28173         (textint): New typedef.
28174         (parser_control): Member year changed from int to textint.
28175         All uses changed.
28176         (YYSTYPE): Removed; replaced by %union with int and textint members.
28177         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
28178         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
28179         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
28180         (tSNUMBER, tUNUMBER): Now of type <textintval>.
28181         (date, number, to_year): Use width of number in digits, not its value,
28182         to determine whether it's a 2-digit year, or a 2-digit time.
28183         (yylex): Store number of digits of numeric tokens.
28184         Reported by John Kendall.
28185
28186         (parser_control): Changed from struct parser_control to typedef (for
28187         consistency).  All uses changed.
28188
28189         (tID): Removed; not used.
28190         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
28191
28192 2000-02-14  Paul Eggert  <eggert@twinsun.com>
28193
28194         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
28195         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
28196
28197 2000-02-12  Jim Meyering  <meyering@lucent.com>
28198
28199         * lib/userspec.c (ISDIGIT): Define it.
28200         (isdigit): Remove definition.
28201         (is_number): Use ISDIGIT, not isdigit.
28202         <libintl.h>: Include.
28203         (_ and N_): Define.
28204         (parse_user_spec): Mark translatable strings.
28205
28206 2000-02-10  Jim Meyering  <meyering@lucent.com>
28207
28208         With these changes, nanosleep.[ch] are finally enough like the other
28209         lib/* replacement files to compile on a few more losing systems.
28210
28211         * lib/nanosleep.h: Don't include config.h.
28212         Remove prototype from declaration of nanosleep.
28213         (PARAMS): Remove now-unneeded definition.
28214         * lib/nanosleep.c: #undef nanosleep.
28215         (rpl_nanosleep): Rename from nanosleep.
28216
28217 2000-02-10  Jim Meyering  <meyering@lucent.com>
28218
28219         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
28220         gnu_nanosleep to rpl_nanosleep.
28221
28222 2000-02-09  Jim Meyering  <meyering@lucent.com>
28223
28224         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
28225         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
28226
28227 2000-02-08  Akim Demaille  <akim@epita.fr>
28228
28229         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
28230         `[' and `]' and remove uses of `changequote'.
28231         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
28232         (AC_SYS_LARGEFILE): Likewise.
28233         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
28234         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
28235         of changequote.
28236         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
28237         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
28238         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
28239         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
28240
28241 2000-02-05  Jim Meyering  <meyering@lucent.com>
28242
28243         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
28244         Remove explicit use of AC_HEADER_TIME.  It is required by
28245         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
28246         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
28247         in autoconf whereby the expansion of the latter ended up preceding
28248         the expansion of its prerequisite, AC_HEADER_TIME.
28249         Reported by Volker Borchert.
28250
28251 2000-02-03  Jim Meyering  <meyering@lucent.com>
28252
28253         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
28254
28255 2000-02-03  Jim Meyering  <meyering@lucent.com>
28256
28257         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
28258         rather than with `#if HAVE_UTMPNAME'.
28259
28260 2000-02-02  Jim Meyering  <meyering@lucent.com>
28261
28262         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
28263         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
28264         Reported by Eli Zaretskii.
28265
28266 2000-02-01  Jim Meyering  <meyering@lucent.com>
28267
28268         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
28269
28270 2000-01-31  Jim Meyering  <meyering@lucent.com>
28271
28272         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
28273         functions.  Add the time.h and sys/time.h headers along with the
28274         AC_REQUIRE'ment of AC_HEADER_TIME.
28275
28276 2000-01-31  Jim Meyering  <meyering@lucent.com>
28277
28278         * lib/nanosleep.h (nanosleep): Guard declaration with
28279         `#if ! HAVE_DECL_NANOSLEEP'.
28280         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
28281         the declaration in that vendor's sys/timers.h.
28282         Reported by Christian Krackowizer.
28283
28284         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
28285         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
28286         (ISPRINT): Likewise.
28287         Reported by Tom Tromey.
28288
28289 2000-01-30  Jim Meyering  <meyering@lucent.com>
28290
28291         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
28292
28293         * m4/prereq.m4 (utmp_includes): Define.
28294         Check for ut_user and ut_name members in both struct utmpx
28295         and struct utmp.
28296
28297 2000-01-30  Jim Meyering  <meyering@lucent.com>
28298
28299         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
28300         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
28301         header files where only utmpx.ut_user is declared.
28302
28303         * lib/readutmp.h (UT_USER): Define.
28304
28305 2000-01-29  Jim Meyering  <meyering@lucent.com>
28306
28307         * m4/lib-check.m4: New file containing library-related checks from
28308         fileutils and sh-utils (textutils had none).
28309
28310 2000-01-28  Jim Meyering  <meyering@lucent.com>
28311
28312         * m4/perl.m4: Change format of warning message to look more like that
28313         from the missing script.  Suggestion from François Pinard.
28314
28315 2000-01-25  Jim Meyering  <meyering@lucent.com>
28316
28317         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
28318         well as time.h in the compile check.
28319         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
28320         Fix typo in cross-compiling case: s/yes/no/.
28321
28322 2000-01-23  Jim Meyering  <meyering@lucent.com>
28323
28324         * m4/jm-macros.m4: Move df-related tests here from
28325         fileutils/configure.in
28326
28327         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
28328         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
28329
28330         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
28331         s/space/ac_fsusage_space/.
28332         (jm_FILE_SYSTEM_USAGE): Take two parameters.
28333
28334         * m4/ftruncate.m4: New file (derived from part of
28335         fileutils/configure.in).
28336         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
28337         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
28338
28339         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
28340         AC_SUBST these here, rather than just in sh-util/configure.in, so
28341         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
28342         all the same.
28343         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
28344         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
28345         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
28346         (AC_SUBST(POW_LIBM)): Likewise.
28347         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
28348
28349 2000-01-23  Jim Meyering  <meyering@lucent.com>
28350
28351         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
28352         obstack.c.
28353
28354 2000-01-22  Jim Meyering  <meyering@lucent.com>
28355
28356         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
28357
28358         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
28359
28360         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
28361         configure.in
28362         (AC_CHECK_HEADERS): Likewise for sh-utils.
28363         (AC_CHECK_HEADERS): Likewise for textutils.
28364         Merge the three lists of headers.
28365
28366         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
28367         from fileutils' configure.in.
28368
28369         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
28370         code. Moved tests into their own function (_jm_DECL_HEADERS) in
28371         check-decl.m4.
28372
28373         * m4/check-decl.m4: Use #if rather than #ifdef.
28374         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
28375         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
28376         (_jm_DECL_HEADERS): Define new function.
28377         (jm_CHECK_DECLARATIONS): Require it.
28378
28379 2000-01-22  Jim Meyering  <meyering@lucent.com>
28380
28381         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
28382         [! HAVE_DECL_STRTOULL]: Declare strtoull.
28383         Required for some AIX systems.  Reported by Christian Krackowizer.
28384         [TESTING] (main): New function.
28385
28386         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
28387         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
28388         letters.
28389
28390         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
28391         iswprint.
28392
28393         * lib/strverscmp.c (ISDIGIT): Define.
28394         (strverscmp): Use ISDIGIT, not isdigit.
28395
28396 2000-01-19  Jim Meyering  <meyering@lucent.com>
28397
28398         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
28399         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
28400         defines `struct timespec' in <sys/time.h>
28401
28402         * m4/c-bs-a.m4: Remove uses of changequote altogether.
28403         Thanks to Akim for explaining.
28404
28405 2000-01-17  Paul Eggert  <eggert@twinsun.com>
28406
28407         * lib/nanosleep.c (nanosleep):
28408         Don't use SA_INTERRUPT to decide whether to call sigaction, as
28409         POSIX.1 doesn't require SA_INTERRUPT and some systems
28410         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
28411         it's been part of POSIX.1 since day 1 (in 1988).
28412
28413 2000-01-17  Jim Meyering  <meyering@lucent.com>
28414
28415         * lib/interlock: Remove unused file.  Reported by François Pinard.
28416
28417 2000-01-16  Paul Eggert  <eggert@twinsun.com>
28418
28419         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
28420         alert, backslash, formfeed, and vertical tab unnecessarily in
28421         shell quoting style.
28422
28423 2000-01-16  Jim Meyering  <meyering@lucent.com>
28424
28425         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
28426         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
28427         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
28428         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
28429
28430 2000-01-16  Jim Meyering  <meyering@lucent.com>
28431
28432         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
28433         because the latter didn't work.
28434
28435 2000-01-15  Jim Meyering  <meyering@lucent.com>
28436
28437         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
28438         (AC_REPLACE_FUNCS): Add memcpy and memset.
28439         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
28440         Add strpbrk.
28441         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
28442
28443 2000-01-12  Jim Meyering  <meyering@lucent.com>
28444
28445         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
28446         (jm_PREREQ): Use it.
28447         (jm_PREREQ_READUTMP): New macro.
28448         (jm_PREREQ): Use it.
28449
28450 2000-01-11  Paul Eggert  <eggert@twinsun.com>
28451
28452         Quote multibyte characters correctly.
28453         * m4/c-bs-a.m4: New file.
28454         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
28455         (jm_PREREQ): Use it.
28456
28457 2000-01-11  Paul Eggert  <eggert@twinsun.com>
28458
28459         * m4/uintmax_t.m4: Port to autoconf 2.13.
28460
28461 2000-01-08  Jim Meyering  <meyering@ascend.com>
28462
28463         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
28464         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
28465
28466 2000-01-04  Jim Meyering  <meyering@ascend.com>
28467
28468         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
28469         jm_STRUCT_DIRENT_D_TYPE.
28470         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
28471         jm_STRUCT_DIRENT_D_INO.
28472         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
28473         jm_STRUCT_UTIMBUF.
28474         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
28475         renamings.
28476         * m4/utime.m4: Likewise.
28477
28478         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
28479         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
28480
28481 2000-01-03  Paul Eggert  <eggert@twinsun.com>
28482
28483         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
28484         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
28485
28486 2000-01-02  Jim Meyering  <meyering@ascend.com>
28487
28488         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
28489         remember if this is necessary.
28490
28491 1999-12-26  Jim Meyering  <meyering@ascend.com>
28492
28493         * m4/jm-macros.m4: Use it here.
28494         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
28495
28496 1999-12-23  Jim Meyering  <meyering@ascend.com>
28497
28498         * m4/jm-macros.m4: Check for clock_gettime (moved from
28499         fileutils/configure.in)
28500         Check for gettimeofday.
28501
28502 1999-12-20  Jim Meyering  <meyering@ascend.com>
28503
28504         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
28505         autoconf-2.14a-1999-12-20.
28506
28507 1999-12-19  Jim Meyering  <meyering@ascend.com>
28508
28509         * m4/lstat-slash.m4: New file.
28510         * m4/jm-macros.m4: Use the new macro:
28511         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28512
28513 1999-12-07  Jim Meyering  <meyering@ascend.com>
28514
28515         * m4/perl.m4: Require that File::Compare be available, too.
28516         Too many systems seem to lack it.
28517
28518         * m4/strftime.m4: Add checks for most of the cpp macros tested in
28519         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
28520
28521 1999-11-18  Paul Eggert  <eggert@twinsun.com>
28522
28523         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
28524         problem with the QNX 4.25 shell, which doesn't propagate exit
28525         status of failed commands inside shell assignments.
28526
28527 1999-11-17  Jim Meyering  <meyering@ascend.com>
28528
28529         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
28530
28531 1999-11-07  Jim Meyering  <meyering@ascend.com>
28532
28533         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
28534
28535 1999-11-06  Jim Meyering  <meyering@ascend.com>
28536
28537         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
28538         * m4/jm-macros.m4 (jm_MACROS): Use it here.
28539
28540 1999-11-05  Jim Meyering  <meyering@ascend.com>
28541
28542         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
28543         configure.in of textutils, fileutils, and sh-utils into this one
28544         (shared between those packages) file.
28545         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
28546         AC_STRUCT_ST_BLKSIZE.
28547
28548 1999-11-03  Jim Meyering  <meyering@ascend.com>
28549
28550         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
28551         of AC_CHECK_TYPE checks includes unistd.h.
28552         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
28553         Suggestion from Akim Demaille.
28554
28555 1999-10-30  Jim Meyering  <meyering@ascend.com>
28556
28557         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
28558         m4-quoted string.
28559         * m4/ls-mntd-fs.m4: Likewise.
28560         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
28561         * m4/jm-winsz1.m4: Likewise.
28562
28563         * m4/const.m4: Remove file, since the fix made it into the experimental
28564         version of autoconf.
28565         * m4/mktime.m4: Likewise.
28566
28567         * m4/check-type.m4: Remove file, now that the latest version of
28568         AC_CHECK_TYPE takes a third arg to specify additional #includes.
28569
28570         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
28571         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
28572         AC_CHECK_TYPE.
28573
28574 1999-10-04  Jim Meyering  <meyering@ascend.com>
28575
28576         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
28577
28578 1999-09-22  Paul Eggert  <eggert@twinsun.com>
28579
28580         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
28581         2.95.1 bug with HP-UX 10.20.
28582
28583 1999-09-17  Jim Meyering  <meyering@ascend.com>
28584
28585         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
28586         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
28587         due to missing strdup (against sh-utils-2.0).
28588
28589 1999-08-29  Jim Meyering  <meyering@ascend.com>
28590
28591         * m4/jm-macros.m4: Require jm_BISON.
28592         * m4/bison.m4: New file.
28593
28594 1999-08-17  Paul Eggert  <eggert@twinsun.com>
28595
28596         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
28597         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
28598
28599 1999-08-05  Jim Meyering  <meyering@ascend.com>
28600
28601         * m4/getline.m4: Rename test file from conftestdata to conftest.data
28602         to avoid conflicts with `conftest' on 8+3 filesystems.
28603         Suggestion from Eli Zaretskii.
28604
28605 1999-08-04  Jim Meyering  <meyering@ascend.com>
28606
28607         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
28608         fileutils and sh-utils (textutils's getline test was inadequate).
28609         (AM_FUNC_GETLINE): Run this test.
28610         (AC_CHECK_FUNCS): Check for getdelim.
28611         Reported by Bob Proulx.
28612
28613 1999-08-02  Jim Meyering  <meyering@ascend.com>
28614
28615         * m4/jm-macros.m4: Add a comment.
28616
28617 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28618
28619         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
28620         <inttypes.h> defines strtoumax as a macro (and not as a
28621         function).
28622
28623 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28624
28625         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
28626         that we can shift, multiply and divide unsigned long long
28627         values; Ultrix cc can't do it.
28628
28629 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28630
28631         * m4/mktime.m4: New file, which is a preview of what should appear
28632         in the next public autoconf release.
28633
28634 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28635
28636         * m4/lfs.m4: Remove this file.
28637         * m4/largefile.m4: New file.  It contains the old contents of
28638         lfs.m4, except that all names with prefix AC_LFS have been
28639         changed to use the prefix AC_SYS_LARGEFILE instead, to be
28640         compatible with future autoconf versions.  Also, some minor m4
28641         quoting problems have been fixed.
28642
28643 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28644
28645         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
28646         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
28647         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
28648         and simplify the shell code.
28649
28650 1999-08-01  Jim Meyering  <meyering@ascend.com>
28651
28652         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
28653         m4.
28654
28655 1999-07-20  Jim Meyering  <meyering@ascend.com>
28656
28657         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
28658
28659 1999-07-15  Jim Meyering  <meyering@ascend.com>
28660
28661         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
28662
28663 1999-05-22  Jim Meyering  <meyering@ascend.com>
28664
28665         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
28666
28667 1999-05-20  Jim Meyering  <meyering@ascend.com>
28668
28669         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
28670         Add a colon after each `then' in case $4 is empty.
28671
28672 1999-05-16  Jim Meyering  <meyering@ascend.com>
28673
28674         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
28675
28676 1999-05-10  Jim Meyering  <meyering@ascend.com>
28677
28678         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
28679
28680         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
28681         AC_FUNC_MKTIME.
28682
28683 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
28684
28685         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
28686
28687 1999-05-04  Paul Eggert  <eggert@twinsun.com>
28688
28689         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
28690         not CPPFLAGS, so that linking works correctly in IRIX.
28691
28692 1999-04-30  Paul Eggert  <eggert@twinsun.com>
28693
28694         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
28695
28696 1999-04-20  Paul Eggert  <eggert@twinsun.com>
28697
28698         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
28699         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
28700         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
28701         jm_AC_TYPE_UNSIGNED_LONG_LONG.
28702         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
28703
28704         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
28705
28706 1999-04-20  Jim Meyering  <meyering@ascend.com>
28707
28708         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
28709         AC_REPLACE xstroull if necessary.  From Paul Eggert.
28710         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
28711
28712 1999-04-18  Jim Meyering  <meyering@ascend.com>
28713
28714         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
28715         * m4/jm-macros.m4: Use it.
28716
28717 1999-04-06  Jim Meyering  <meyering@ascend.com>
28718
28719         * m4/strftime.m4: Remove test for %f.
28720
28721 1999-03-29  Jim Meyering  <meyering@ascend.com>
28722
28723         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
28724         superset of the AC_TYPE_* checks in the textutils, fileutils,
28725         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
28726         AC_TYPE_PID_T.
28727
28728 1999-03-28  Jim Meyering  <meyering@ascend.com>
28729
28730         * m4/jm-macros.m4: Define GNU_PACKAGE here.
28731         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
28732         replaced e.g., in the *.sh files of the sh-utils.
28733
28734 1999-03-20  Jim Meyering  <meyering@ascend.com>
28735
28736         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
28737         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
28738         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
28739
28740 1999-03-19  Jim Meyering  <meyering@ascend.com>
28741
28742         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
28743
28744 1999-03-12  Jim Meyering  <meyering@ascend.com>
28745
28746         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
28747
28748 1999-03-07  Jim Meyering  <meyering@ascend.com>
28749
28750         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
28751         declared.
28752
28753 1999-02-17  Jim Meyering  <meyering@ascend.com>
28754
28755         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
28756         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
28757
28758 1999-02-07  Jim Meyering  <meyering@ascend.com>
28759
28760         * m4/group-member.m4: New file -- extracted from sh-utils'
28761         configure.in.
28762
28763         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
28764         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
28765
28766 1999-02-06  Jim Meyering  <meyering@ascend.com>
28767
28768         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
28769         * m4/fnmatch.m4: Likewise.
28770         * m4/getgroups.m4: Likewise.
28771         * m4/lstat.m4: Likewise.
28772         * m4/malloc.m4: Likewise.
28773         * m4/putenv.m4: Likewise.
28774         * m4/realloc.m4: Likewise.
28775         * m4/regex.m4: Likewise.
28776         * m4/stat.m4: Likewise.
28777         * m4/strftime.m4: Likewise.
28778         Suggestion from Alain Magloire.
28779
28780         * m4/chown.m4: Use `.$ac_objext', not `.o'.
28781         * m4/fnmatch.m4: Likewise.
28782         * m4/getgroups.m4: Likewise.
28783         * m4/getline.m4: Likewise.
28784         * m4/lstat.m4: Likewise.
28785         * m4/malloc.m4: Likewise.
28786         * m4/memcmp.m4: Likewise.
28787         * m4/putenv.m4: Likewise.
28788         * m4/realloc.m4: Likewise.
28789         * m4/regex.m4: Likewise.
28790         * m4/stat.m4: Likewise.
28791         * m4/strftime.m4: Likewise.
28792         Suggestion from Alain Magloire.
28793
28794         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
28795         an argument.
28796
28797         * m4/regex.m4: Add a run-time Test for proper operation of
28798         re_compile_pattern.
28799
28800 1999-01-31  Jim Meyering  <meyering@ascend.com>
28801
28802         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
28803
28804 1999-01-30  Jim Meyering  <meyering@ascend.com>
28805
28806         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
28807
28808         * m4/jm-mktime.m4: Make this a wrapper around the official
28809         AM_FUNC_MKTIME rather than my private copy, now that the official one
28810         is up to date.
28811         * m4/mktime.m4: Remove file.
28812
28813         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
28814         * m4/uptime.m4: Likewise.
28815         * m4/uintmax_t.m4: Likewise.
28816
28817 1999-01-28  Jim Meyering  <meyering@ascend.com>
28818
28819         * m4/jm-macros.m4: Use jm_AFS.
28820         * m4/afs.m4: New file (from fileutils' configure.in).
28821
28822         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
28823         * m4/chown.m4: Likewise.
28824         * m4/d-ino.m4: Likewise.
28825         * m4/d-type.m4: Likewise.
28826         * m4/fnmatch.m4: Likewise.
28827         * m4/getgroups.m4: Likewise.
28828         * m4/gettext.m4: Likewise.
28829         * m4/jm-mktime.m4: Likewise.
28830         * m4/jm-winsz2.m4: Likewise.
28831         * m4/lcmessage.m4: Likewise.
28832         * m4/ls-mntd-fs.m4: Likewise.
28833         * m4/malloc.m4: Likewise.
28834         * m4/memcmp.m4: Likewise.
28835         * m4/putenv.m4: Likewise.
28836         * m4/realloc.m4: Likewise.
28837         * m4/st_mtim.m4: Likewise.
28838         * m4/strftime.m4: Likewise.
28839
28840 1999-01-16  Jim Meyering  <meyering@ascend.com>
28841
28842         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
28843         (ARGMATCH_DIE_DECL): Define.
28844
28845 1999-01-12  Jim Meyering  <meyering@ascend.com>
28846
28847         * m4/Makefile.am.in: Rewrite to avoid using fmt.
28848         Reported by Lars Hecking.
28849
28850 1999-01-10  Jim Meyering  <meyering@ascend.com>
28851
28852         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
28853         gross kludge.
28854         * m4/inttypes_h.m4: Likewise.
28855         * m4/lstat.m4: Likewise.
28856         * m4/malloc.m4: Likewise.
28857         * m4/readdir.m4: Likewise.
28858         * m4/realloc.m4: Likewise.
28859         * m4/st_dm_mode.m4: Likewise.
28860         * m4/stat.m4: Likewise.
28861         * m4/utimbuf.m4: Likewise.
28862         * m4/utimes.m4: Likewise.
28863
28864         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
28865         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
28866         comments in config.h.in are meaningful.
28867
28868         * m4/jm-macros.m4: Require autoconf-2.13 here.
28869
28870         * m4/regex.m4: By default, don't use the included regex.c on systems
28871         with glibc 2.  Suggestion from Uli Drepper.
28872
28873 1999-01-02  Jim Meyering  <meyering@ascend.com>
28874
28875         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
28876
28877 1998-12-18  Jim Meyering  <meyering@ascend.com>
28878
28879         * m4/Makefile.am.in (Makefile.am): Simplify rule.
28880         Based on a suggestion from Lars Hecking.
28881
28882 1998-11-16  Paul Eggert  <eggert@twinsun.com>
28883
28884         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
28885
28886 1998-11-16  Jim Meyering  <meyering@ascend.com>
28887
28888         * m4/lfs.m4: Double-quote the `uname...` expression.
28889
28890 1998-11-14  Jim Meyering  <meyering@ascend.com>
28891
28892         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
28893         * m4/stat.m4: Likewise.
28894
28895 1998-11-03  Jim Meyering  <meyering@ascend.com>
28896
28897         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
28898         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
28899
28900 1998-10-18  Jim Meyering  <meyering@ascend.com>
28901
28902         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
28903
28904 1998-10-17  Jim Meyering  <meyering@ascend.com>
28905
28906         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
28907         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
28908         calls for those previously hard-coded headers.  Instead, take a new
28909         parameter.
28910         (jm_CHECK_DECLARATIONS): Reflect interface change.
28911         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
28912         (jm_CHECK_DECL_LOCALTIME_R): New macro.
28913
28914         * m4/mktime.m4: Test for spring-forward gap before long-running test.
28915
28916 1998-10-14  Jim Meyering  <meyering@ascend.com>
28917
28918         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
28919         instead of "TZ=America/Vancouver".  From Paul Eggert.
28920
28921 1998-10-11  Jim Meyering  <meyering@ascend.com>
28922
28923         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
28924         This adds a test for a recently added compatibility fix for mktime.c.
28925         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
28926
28927 1998-09-27  Jim Meyering  <meyering@ascend.com>
28928
28929         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
28930
28931         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
28932         ../configure.in, including a change from Gordon Matzigkeit to allow
28933         cross-compiling for the Hurd.
28934
28935         * m4/glibc.m4: New file/macro to test for the GNU C Library
28936         versions 1 and 2.  From Gordon Matzigkeit.
28937         Indent.
28938
28939 1998-09-21  Jim Meyering  <meyering@ascend.com>
28940
28941         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
28942
28943 1998-08-18  Paul Eggert  <eggert@twinsun.com>
28944
28945         Port nanosecond-resolution times to UnixWare 2.1.2 and
28946         pedantic Solaris 2.6.
28947
28948         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
28949         AC_STRUCT_ST_MTIM.
28950         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
28951         Generate name of ns member, instead of just 1 or undef.
28952         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
28953
28954 1998-08-15  Jim Meyering  <meyering@ascend.com>
28955
28956         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
28957         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
28958         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
28959         instead of jm_TYPE_SSIZE_T.
28960
28961 1998-08-12  Jim Meyering  <meyering@ascend.com>
28962
28963         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
28964
28965 1998-08-02  Jim Meyering  <meyering@ascend.com>
28966
28967         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
28968         in acconfig.h manually.
28969
28970 1998-07-31  Paul Eggert  <eggert@twinsun.com>
28971
28972         * m4/st_mtim.m4: New file.
28973
28974 1998-07-28  Jim Meyering  <meyering@ascend.com>
28975
28976         * m4/utimes.m4: Undef stat.
28977
28978 1998-07-25  Jim Meyering  <meyering@ascend.com>
28979
28980         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
28981         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
28982
28983 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
28984
28985         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
28986         uid and gid actually remain unchanged.
28987
28988 1998-07-07  Jim Meyering  <meyering@ascend.com>
28989
28990         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
28991
28992 1998-07-04  Jim Meyering  <meyering@ascend.com>
28993
28994         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
28995         to prove that this macro can be used in packages without regex.c.
28996
28997 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
28998
28999         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
29000         is to be used.
29001
29002 1998-07-03  Jim Meyering  <meyering@ascend.com>
29003
29004         * m4/gettext.m4: Add -lintl if it's found to be necessary.
29005
29006         * m4/gettext.m4: New file -- from gettext-0.10.35.
29007         * m4/lcmessage.m4: Likewise.
29008         * m4/progtest.m4: Likewise.
29009
29010         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
29011         * m4/jm-macros.m4: Require the new macro.
29012
29013 1998-06-29  Jim Meyering  <meyering@ascend.com>
29014
29015         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
29016         for the definition of NGROUPS (used in a system header included
29017         by sys/mount.h).
29018
29019 1998-06-28  Jim Meyering  <meyering@ascend.com>
29020
29021         * m4/ls-mntd-fs.m4: New file.
29022         * m4/fstypename.m4: New file.
29023
29024         * m4/jm-macros.m4: Require the new macro.
29025         * m4/jm-glibc-io.m4: New file.
29026
29027 1998-05-19  Jim Meyering  <meyering@ascend.com>
29028
29029         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
29030         * m4/lchown.m4: New file.
29031
29032         * m4/Makefile.am.in: New file.
29033         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
29034
29035 1998-05-14  Jim Meyering  <meyering@ascend.com>
29036
29037         * m4/Makefile.am (EXTRA_DIST): Add them.
29038         * m4/jm-macros.m4: New file.
29039         * m4/utimbuf.m4: New file.
29040
29041 1998-05-12  Jim Meyering  <meyering@ascend.com>
29042
29043         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
29044
29045 1998-05-11  Jim Meyering  <meyering@ascend.com>
29046
29047         * m4/isc-posix.m4: New file.
29048
29049 1998-05-10  Jim Meyering  <meyering@ascend.com>
29050
29051         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
29052
29053 1998-05-09  Jim Meyering  <meyering@ascend.com>
29054
29055         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
29056         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
29057         with automake.
29058
29059         * m4/ssize_t.m4: New file.
29060         * m4/mktime.m4: Remove file -- the new automake has this now.
29061
29062 1998-04-26  Jim Meyering  <meyering@ascend.com>
29063
29064         * m4/assert.m4: New file.
29065         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
29066
29067 1998-04-05  Jim Meyering  <meyering@ascend.com>
29068
29069         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
29070         (jm_PREREQ): Use it here.
29071
29072 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
29073
29074         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
29075         in acconfig.h.
29076
29077 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
29078
29079         * m4/prereq.m4: New file.
29080         * m4/error.m4: New file.
29081         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
29082
29083 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
29084
29085         * m4/getline.m4: Don't set am_cv_func_working_getline before the
29086         cache-check for the same variable -- that defeated the purpose of
29087         the test; the test program was never run.  This was a problem only
29088         on systems with losing getline functions -- HP-UX 10.20 is one.
29089         Reported by Bjorn Helgaas.
29090
29091 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
29092
29093         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
29094
29095 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
29096
29097         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
29098
29099         * m4/const.m4: New file.  Use an initializer in this declaration
29100         typedef int charset[2]; const charset x;
29101         Reported by Bob Glickstein.
29102
29103 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
29104
29105         * m4/chown.m4: Fix reversed types on -1 args to chown.
29106         From Kaveh Ghazi.
29107
29108 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
29109
29110         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
29111         Add lseek and memchr.
29112
29113         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
29114         T.E.Dickey <dickey@clark.net> said that some older preprocessors
29115         have a 20-character limit on names.
29116
29117 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
29118
29119         * m4/inttypes_h.m4: New file.
29120         * m4/uintmax_t.m4: New file.
29121         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
29122
29123 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
29124   Free Software Foundation, Inc.
29125 Copying and distribution of this file, with or without modification,
29126 are permitted provided the copyright notice and this notice are preserved.