New module 'fchdir'.
[gnulib.git] / ChangeLog
1 2006-12-30  Bruno Haible  <bruno@clisp.org>
2
3         * modules/fchdir: New file.
4         * modules/unistd (Files): Add lib/unistd_.h.
5         (Makefile.am): Generate unistd.h from unistd_.h.
6         * lib/fchdir.c: New file.
7         * lib/dirent_.h: New file.
8         * lib/unistd_.h: New file.
9         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
10         * m4/fchdir.m4: New file.
11         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
12         (gl_HEADER_UNISTD): Invoke it.
13         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
14         function.
15         * lib/backupfile.c (opendir, closedir): Undefine.
16         * lib/chown.c (open, close): Undefine.
17         * lib/clean-temp.c (open, close): Undefine.
18         * lib/copy-file.c (open, close): Undefine.
19         * lib/execute.c (open, close): Undefine.
20         * lib/fsusage.c (open, close): Undefine.
21         * lib/gc-gnulib.c (open, close): Undefine.
22         * lib/getcwd.c (opendir, closedir): Undefine.
23         * lib/glob.c (opendir, closedir): Undefine.
24         * lib/javacomp.c (open, close): Undefine.
25         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
26         * lib/openat-proc.c (open, close): Undefine.
27         * lib/pagealign_alloc.c (open, close): Undefine.
28         * lib/pipe.c (open, close): Undefine.
29         * lib/progreloc.c (open, close): Undefine.
30         * lib/savedir.c (opendir, closedir): Undefine.
31         * lib/utime.c (open, close): Undefine.
32         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
33
34 2007-01-10  Bruno Haible  <bruno@clisp.org>
35
36         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
37
38 2007-01-12  Eric Blake  <ebb9@byu.net>
39
40         Provide a robust <wchar.h>.  Further simplifications are now
41         possible in other modules, but not included here.
42         * modules/wchar: New module.
43         * m4/wchar.m4: New file.
44         * lib/wchar_.h: Likewise.
45         * modules/mbchar (Depends-on): Depend on wchar, as the first use
46         of the new module.
47         * MODULES.html.sh (Extended multibyte and wide character utilities):
48         New section.
49
50 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
51
52         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
53         to a reasonable default for memory allocation.
54         (xreadlink): Don't allocate a huge buffer, to work around a buggy
55         file system that reports garbage st_size values for symlinks.
56         Problem reported by Liyang Hu.
57
58 2007-01-11  Simon Josefsson  <simon@josefsson.org>
59
60         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
61         Emacs .#* auto-save files).
62
63 2007-01-11  Bruno Haible  <bruno@clisp.org>
64
65         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
66         directory.
67
68 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
69
70         Use @...@ consistently in lib/wctype_.h.
71         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
72         on it being set to 1 or 0.
73         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
74         go back to AC_SUBSTing it.
75         * modules/wctype (Makefile.am): Undo previous change.
76
77 2007-01-10  Eric Blake  <ebb9@byu.net>
78
79         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
80         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
81         * modules/wctype (Makefile.am): Likewise.
82         Reported by Chris McGuire.
83
84 2007-01-10  Jim Meyering  <jim@meyering.net>
85
86         fts.c: a small readability/maintainability improvement
87         * lib/fts.c (fts_read): Make this code slightly more readable and
88         maintainable by hoisting the "sp->fts_cur = p" assignments to
89         immediately follow the statements that set P.  Derived from
90         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
91
92 2007-01-10  Eric Blake  <ebb9@byu.net>
93
94         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
95         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
96         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
97         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
98         Reported by Chris McGuire.
99
100 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
101
102         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
103         in sed script.
104
105 2007-01-09  Bruno Haible  <bruno@clisp.org>
106
107         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
108         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
109         variables.
110         (func_module): Use them.
111
112 2007-01-09  Bruno Haible  <bruno@clisp.org>
113
114         * modules/unistr/base: New file.
115         * lib/unistr.h: New file.
116
117         * modules/unistr/u8-to-u16: New file.
118         * lib/unistr/u8-to-u16.c: New file.
119
120         * modules/unistr/u8-to-u32: New file.
121         * lib/unistr/u8-to-u32.c: New file.
122
123         * modules/unistr/u16-to-u8: New file.
124         * lib/unistr/u16-to-u8.c: New file.
125
126         * modules/unistr/u16-to-u32: New file.
127         * lib/unistr/u16-to-u32.c: New file.
128
129         * modules/unistr/u32-to-u8: New file.
130         * lib/unistr/u32-to-u8.c: New file.
131
132         * modules/unistr/u32-to-u16: New file.
133         * lib/unistr/u32-to-u16.c: New file.
134
135         * modules/unistr/u8-check: New file.
136         * modules/unistr/u16-check: New file.
137         * modules/unistr/u32-check: New file.
138         * lib/unistr/u8-check.c: New file.
139         * lib/unistr/u16-check.c: New file.
140         * lib/unistr/u32-check.c: New file.
141
142         * modules/unistr/u8-chr: New file.
143         * modules/unistr/u16-chr: New file.
144         * modules/unistr/u32-chr: New file.
145         * lib/unistr/u8-chr.c: New file.
146         * lib/unistr/u16-chr.c: New file.
147         * lib/unistr/u32-chr.c: New file.
148
149         * modules/unistr/u8-cmp: New file.
150         * modules/unistr/u16-cmp: New file.
151         * modules/unistr/u32-cmp: New file.
152         * lib/unistr/u8-cmp.c: New file.
153         * lib/unistr/u16-cmp.c: New file.
154         * lib/unistr/u32-cmp.c: New file.
155
156         * modules/unistr/u8-cpy: New file.
157         * modules/unistr/u16-cpy: New file.
158         * modules/unistr/u32-cpy: New file.
159         * lib/unistr/u8-cpy.c: New file.
160         * lib/unistr/u16-cpy.c: New file.
161         * lib/unistr/u32-cpy.c: New file.
162         * lib/unistr/u-cpy.h: New file.
163
164         * modules/unistr/u8-cpy-alloc: New file.
165         * modules/unistr/u16-cpy-alloc: New file.
166         * modules/unistr/u32-cpy-alloc: New file.
167         * lib/unistr/u8-cpy-alloc.c: New file.
168         * lib/unistr/u16-cpy-alloc.c: New file.
169         * lib/unistr/u32-cpy-alloc.c: New file.
170         * lib/unistr/u-cpy-alloc.h: New file.
171
172         * modules/unistr/u8-endswith: New file.
173         * modules/unistr/u16-endswith: New file.
174         * modules/unistr/u32-endswith: New file.
175         * lib/unistr/u8-endswith.c: New file.
176         * lib/unistr/u16-endswith.c: New file.
177         * lib/unistr/u32-endswith.c: New file.
178         * lib/unistr/u-endswith.h: New file.
179
180         * modules/unistr/u8-mblen: New file.
181         * modules/unistr/u16-mblen: New file.
182         * modules/unistr/u32-mblen: New file.
183         * lib/unistr/u8-mblen.c: New file.
184         * lib/unistr/u16-mblen.c: New file.
185         * lib/unistr/u32-mblen.c: New file.
186
187         * modules/unistr/u8-mbtouc: New file.
188         * modules/unistr/u16-mbtouc: New file.
189         * modules/unistr/u32-mbtouc: New file.
190         * lib/unistr/u8-mbtouc.c: New file.
191         * lib/unistr/u16-mbtouc.c: New file.
192         * lib/unistr/u32-mbtouc.c: New file.
193
194         * modules/unistr/u8-mbtouc-safe: New file.
195         * modules/unistr/u16-mbtouc-safe: New file.
196         * modules/unistr/u32-mbtouc-safe: New file.
197         * lib/unistr/u8-mbtouc-safe.c: New file.
198         * lib/unistr/u16-mbtouc-safe.c: New file.
199         * lib/unistr/u32-mbtouc-safe.c: New file.
200
201         * modules/unistr/u8-move: New file.
202         * modules/unistr/u16-move: New file.
203         * modules/unistr/u32-move: New file.
204         * lib/unistr/u8-move.c: New file.
205         * lib/unistr/u16-move.c: New file.
206         * lib/unistr/u32-move.c: New file.
207         * lib/unistr/u-move.h: New file.
208
209         * modules/unistr/u8-next: New file.
210         * modules/unistr/u16-next: New file.
211         * modules/unistr/u32-next: New file.
212         * lib/unistr/u8-next.c: New file.
213         * lib/unistr/u16-next.c: New file.
214         * lib/unistr/u32-next.c: New file.
215
216         * modules/unistr/u8-prev: New file.
217         * modules/unistr/u16-prev: New file.
218         * modules/unistr/u32-prev: New file.
219         * lib/unistr/u8-prev.c: New file.
220         * lib/unistr/u16-prev.c: New file.
221         * lib/unistr/u32-prev.c: New file.
222
223         * modules/unistr/u8-set: New file.
224         * modules/unistr/u16-set: New file.
225         * modules/unistr/u32-set: New file.
226         * lib/unistr/u8-set.c: New file.
227         * lib/unistr/u16-set.c: New file.
228         * lib/unistr/u32-set.c: New file.
229         * lib/unistr/u-set.h: New file.
230
231         * modules/unistr/u8-startswith: New file.
232         * modules/unistr/u16-startswith: New file.
233         * modules/unistr/u32-startswith: New file.
234         * lib/unistr/u8-startswith.c: New file.
235         * lib/unistr/u16-startswith.c: New file.
236         * lib/unistr/u32-startswith.c: New file.
237         * lib/unistr/u-startswith.h: New file.
238
239         * modules/unistr/u8-stpcpy: New file.
240         * modules/unistr/u16-stpcpy: New file.
241         * modules/unistr/u32-stpcpy: New file.
242         * lib/unistr/u8-stpcpy.c: New file.
243         * lib/unistr/u16-stpcpy.c: New file.
244         * lib/unistr/u32-stpcpy.c: New file.
245         * lib/unistr/u-stpcpy.h: New file.
246
247         * modules/unistr/u8-stpncpy: New file.
248         * modules/unistr/u16-stpncpy: New file.
249         * modules/unistr/u32-stpncpy: New file.
250         * lib/unistr/u8-stpncpy.c: New file.
251         * lib/unistr/u16-stpncpy.c: New file.
252         * lib/unistr/u32-stpncpy.c: New file.
253         * lib/unistr/u-stpncpy.h: New file.
254
255         * modules/unistr/u8-strcat: New file.
256         * modules/unistr/u16-strcat: New file.
257         * modules/unistr/u32-strcat: New file.
258         * lib/unistr/u8-strcat.c: New file.
259         * lib/unistr/u16-strcat.c: New file.
260         * lib/unistr/u32-strcat.c: New file.
261         * lib/unistr/u-strcat.h: New file.
262
263         * modules/unistr/u8-strchr: New file.
264         * modules/unistr/u16-strchr: New file.
265         * modules/unistr/u32-strchr: New file.
266         * lib/unistr/u8-strchr.c: New file.
267         * lib/unistr/u16-strchr.c: New file.
268         * lib/unistr/u32-strchr.c: New file.
269
270         * modules/unistr/u8-strcmp: New file.
271         * modules/unistr/u16-strcmp: New file.
272         * modules/unistr/u32-strcmp: New file.
273         * lib/unistr/u8-strcmp.c: New file.
274         * lib/unistr/u16-strcmp.c: New file.
275         * lib/unistr/u32-strcmp.c: New file.
276
277         * modules/unistr/u8-strcpy: New file.
278         * modules/unistr/u16-strcpy: New file.
279         * modules/unistr/u32-strcpy: New file.
280         * lib/unistr/u8-strcpy.c: New file.
281         * lib/unistr/u16-strcpy.c: New file.
282         * lib/unistr/u32-strcpy.c: New file.
283         * lib/unistr/u-strcpy.h: New file.
284
285         * modules/unistr/u8-strcspn: New file.
286         * modules/unistr/u16-strcspn: New file.
287         * modules/unistr/u32-strcspn: New file.
288         * lib/unistr/u8-strcspn.c: New file.
289         * lib/unistr/u16-strcspn.c: New file.
290         * lib/unistr/u32-strcspn.c: New file.
291         * lib/unistr/u-strcspn.h: New file.
292
293         * modules/unistr/u8-strdup: New file.
294         * modules/unistr/u16-strdup: New file.
295         * modules/unistr/u32-strdup: New file.
296         * lib/unistr/u8-strdup.c: New file.
297         * lib/unistr/u16-strdup.c: New file.
298         * lib/unistr/u32-strdup.c: New file.
299         * lib/unistr/u-strdup.h: New file.
300
301         * modules/unistr/u8-strlen: New file.
302         * modules/unistr/u16-strlen: New file.
303         * modules/unistr/u32-strlen: New file.
304         * lib/unistr/u8-strlen.c: New file.
305         * lib/unistr/u16-strlen.c: New file.
306         * lib/unistr/u32-strlen.c: New file.
307         * lib/unistr/u-strlen.h: New file.
308
309         * modules/unistr/u8-strmblen: New file.
310         * modules/unistr/u16-strmblen: New file.
311         * modules/unistr/u32-strmblen: New file.
312         * lib/unistr/u8-strmblen.c: New file.
313         * lib/unistr/u16-strmblen.c: New file.
314         * lib/unistr/u32-strmblen.c: New file.
315
316         * modules/unistr/u8-strmbtouc: New file.
317         * modules/unistr/u16-strmbtouc: New file.
318         * modules/unistr/u32-strmbtouc: New file.
319         * lib/unistr/u8-strmbtouc.c: New file.
320         * lib/unistr/u16-strmbtouc.c: New file.
321         * lib/unistr/u32-strmbtouc.c: New file.
322
323         * modules/unistr/u8-strncat: New file.
324         * modules/unistr/u16-strncat: New file.
325         * modules/unistr/u32-strncat: New file.
326         * lib/unistr/u8-strncat.c: New file.
327         * lib/unistr/u16-strncat.c: New file.
328         * lib/unistr/u32-strncat.c: New file.
329         * lib/unistr/u-strncat.h: New file.
330
331         * modules/unistr/u8-strncmp: New file.
332         * modules/unistr/u16-strncmp: New file.
333         * modules/unistr/u32-strncmp: New file.
334         * lib/unistr/u8-strncmp.c: New file.
335         * lib/unistr/u16-strncmp.c: New file.
336         * lib/unistr/u32-strncmp.c: New file.
337
338         * modules/unistr/u8-strncpy: New file.
339         * modules/unistr/u16-strncpy: New file.
340         * modules/unistr/u32-strncpy: New file.
341         * lib/unistr/u8-strncpy.c: New file.
342         * lib/unistr/u16-strncpy.c: New file.
343         * lib/unistr/u32-strncpy.c: New file.
344         * lib/unistr/u-strncpy.h: New file.
345
346         * modules/unistr/u8-strnlen: New file.
347         * modules/unistr/u16-strnlen: New file.
348         * modules/unistr/u32-strnlen: New file.
349         * lib/unistr/u8-strnlen.c: New file.
350         * lib/unistr/u16-strnlen.c: New file.
351         * lib/unistr/u32-strnlen.c: New file.
352         * lib/unistr/u-strnlen.h: New file.
353
354         * modules/unistr/u8-strpbrk: New file.
355         * modules/unistr/u16-strpbrk: New file.
356         * modules/unistr/u32-strpbrk: New file.
357         * lib/unistr/u8-strpbrk.c: New file.
358         * lib/unistr/u16-strpbrk.c: New file.
359         * lib/unistr/u32-strpbrk.c: New file.
360         * lib/unistr/u-strpbrk.h: New file.
361
362         * modules/unistr/u8-strrchr: New file.
363         * modules/unistr/u16-strrchr: New file.
364         * modules/unistr/u32-strrchr: New file.
365         * lib/unistr/u8-strrchr.c: New file.
366         * lib/unistr/u16-strrchr.c: New file.
367         * lib/unistr/u32-strrchr.c: New file.
368
369         * modules/unistr/u8-strspn: New file.
370         * modules/unistr/u16-strspn: New file.
371         * modules/unistr/u32-strspn: New file.
372         * lib/unistr/u8-strspn.c: New file.
373         * lib/unistr/u16-strspn.c: New file.
374         * lib/unistr/u32-strspn.c: New file.
375         * lib/unistr/u-strspn.h: New file.
376
377         * modules/unistr/u8-strstr: New file.
378         * modules/unistr/u16-strstr: New file.
379         * modules/unistr/u32-strstr: New file.
380         * lib/unistr/u8-strstr.c: New file.
381         * lib/unistr/u16-strstr.c: New file.
382         * lib/unistr/u32-strstr.c: New file.
383         * lib/unistr/u-strstr.h: New file.
384
385         * modules/unistr/u8-strtok: New file.
386         * modules/unistr/u16-strtok: New file.
387         * modules/unistr/u32-strtok: New file.
388         * lib/unistr/u8-strtok.c: New file.
389         * lib/unistr/u16-strtok.c: New file.
390         * lib/unistr/u32-strtok.c: New file.
391         * lib/unistr/u-strtok.h: New file.
392
393         * modules/unistr/u8-uctomb: New file.
394         * modules/unistr/u16-uctomb: New file.
395         * modules/unistr/u32-uctomb: New file.
396         * lib/unistr/u8-uctomb.c: New file.
397         * lib/unistr/u16-uctomb.c: New file.
398         * lib/unistr/u32-uctomb.c: New file.
399
400         * MODULES.html.sh (Unicode string functions): Add the new modules.
401
402 2007-01-08  Bruno Haible  <bruno@clisp.org>
403
404         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
405         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
406         subdirectories.
407
408 2007-01-08  Karl Berry  <karl@gnu.org>
409
410         * doc/error.texi: mention that main() fns must set program_name
411         when progname is used.
412
413 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
414
415         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
416         WCTYPE_H is empty, for the benefit of builds from non-distclean
417         directories.  Problem reported by Eric Blake in
418         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
419
420 2007-01-08  Bruno Haible  <bruno@clisp.org>
421
422         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
423         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
424         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
425         PROVIDE_CANONICALIZE_FILENAME_MODE.
426         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
427
428 2007-01-08  Bruno Haible  <bruno@clisp.org>
429
430         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
431         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
432         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
433         * lib/fts.c: Likewise.
434         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
435
436 2006-12-25  Bruno Haible  <bruno@clisp.org>
437
438         * modules/utf8-ucs4-safe: New file.
439         * lib/utf8-ucs4-safe.h: New file.
440         * lib/unistr/utf8-ucs4-safe.c: New file.
441
442         * modules/utf16-ucs4-safe: New file.
443         * lib/utf16-ucs4-safe.h: New file.
444         * lib/unistr/utf16-ucs4-safe.c: New file.
445
446         * MODULES.html.sh (Unicode string functions): Add the new modules.
447
448 2007-01-08  Bruno Haible  <bruno@clisp.org>
449
450         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
451         (Depends-on): Add unitypes.
452         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
453         (u8_mbtouc_aux): Move out to separate file.
454         (u8_mbtouc): Use ucs4_t, uint8_t types.
455         * lib/unistr/utf8-ucs4.c: New file.
456
457         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
458         (Depends-on): Add unitypes.
459         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
460         (u16_mbtouc_aux): Move out to separate file.
461         (u16_mbtouc): Use ucs4_t, uint16_t types.
462         * lib/unistr/utf16-ucs4.c: New file.
463
464         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
465         (Depends-on): Add unitypes.
466         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
467         (u8_uctomb_aux): Move out to separate file.
468         (u8_uctomb): Use ucs4_t, uint8_t types.
469         * lib/unistr/ucs4-utf8.c: New file.
470
471         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
472         (Depends-on): Add unitypes.
473         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
474         (u16_uctomb_aux): Move out to separate file.
475         (u16_uctomb): Use ucs4_t, uint16_t types.
476         * lib/unistr/ucs4-utf16.c: New file.
477
478 2006-12-25  Bruno Haible  <bruno@clisp.org>
479
480         * modules/unitypes: New file.
481         * lib/unitypes.h: New file.
482         * MODULES.html.sh (func_all_modules): New section "Unicode string
483         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
484         this section. Add unitypes.
485
486 2007-01-08  Bruno Haible  <bruno@clisp.org>
487
488         Avoid variable names that conflict with those from libtool.
489         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
490         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
491         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
492         library_names_spec to acl_library_names_spec, hardcode_* to
493         acl_hardcode_*.
494         Reported by Ralf Wildenhues.
495
496 2007-01-08  Bruno Haible  <bruno@clisp.org>
497
498         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
499         definition.
500         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
501         definition.
502         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
503         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
504         definition.
505         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
506         definition.
507         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
508         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
509         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
510         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
511         definition.
512         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
513         definition.
514         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
515         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
516         GC_USE_<algorithm>.
517         * lib/gc-libgcrypt.c: Likewise.
518         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
519         * modules/gc-arctwo (configure.ac): Likewise.
520         * modules/gc-des (configure.ac): Likewise.
521         * modules/gc-hmac-md5 (configure.ac): Likewise.
522         * modules/gc-hmac-sha1 (configure.ac): Likewise.
523         * modules/gc-md2 (configure.ac): Likewise.
524         * modules/gc-md4 (configure.ac): Likewise.
525         * modules/gc-md5 (configure.ac): Likewise.
526         * modules/gc-random (configure.ac): Likewise.
527         * modules/gc-rijndael (configure.ac): Likewise.
528         * modules/gc-sha1 (configure.ac): Likewise.
529
530 2007-01-08  Bruno Haible  <bruno@clisp.org>
531
532         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
533         macro definition.
534         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
535         definition.
536         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
537         definition.
538         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
539         * modules/fcntl-safer (configure.ac): Likewise.
540         * modules/fopen-safer (configure.ac): Likewise.
541         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
542         GNULIB_FWRITEERROR macro definition.
543
544 2007-01-08  Bruno Haible  <bruno@clisp.org>
545
546         * m4/gnulib-common.m4: New file.
547         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
548         (func_get_filelist): Add m4/gnulib-common.m4.
549
550 2007-01-08  Bruno Haible  <bruno@clisp.org>
551
552         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
553         command.
554
555 2007-01-08  Jim Meyering  <jim@meyering.net>
556
557         Use a more robust test for a "can't happen" condition.
558         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
559         narrowed the st_size value.  Presuming the "can't happen" condition
560         is true, that narrowing could conceivably convert an invalid st_size
561         value into a valid one.  Instead, use a change based on Matthew
562         Woehlke's original patch.
563
564         Slight readability improvement: use an assert-like macro
565         in place of literal "abort ()" uses.
566         * lib/fts.c (fts_assert): Define.
567         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
568         Use this macro instead of a bare 'abort'.
569
570 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
571
572         Don't worry about using IRIX 5.3's wctype.h broken definitions;
573         simply work around them.
574         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
575         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
576         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
577         Don't bother to define as macros, since the standard doesn't require it.
578         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
579         longer worry about IRIX 5.3.
580         (HAVE_WCTYPE_CTMP_BUG): Remove.
581
582 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
583
584         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
585         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
586         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
587         Problems reported by Georg Schwarz for IRIX 5.3.
588
589         * gnulib-tool (autoconf_minversion): Take the maximum version number
590         found, not the minimum.  Problem reported by James Youngman.
591
592 2007-01-03  Karl Berry  <karl@gnu.org>
593
594         * doc/error.texi: new file, explaining interaction with progname.
595         * doc/gnulib.texi: include it.  Update copyright.
596
597 2007-01-03  Simon Josefsson  <simon@josefsson.org>
598
599         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
600         AC_CANONICAL_HOST, to improve autobuild outputs.
601
602 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
603             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
604
605         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
606         sockets, server sockets, and other file descriptors.  Count errors
607         to compute the return value.  Reorder the code a bit to be easier
608         to follow.  Don't set event bits that were not requested (except
609         POLLERR and POLLHUP).
610
611 2007-01-01  Bruno Haible  <bruno@clisp.org>
612
613         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
614
615 2007-01-03  Jim Meyering  <jim@meyering.net>
616
617         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
618
619 2007-01-02  Bruno Haible  <bruno@clisp.org>
620
621         * modules/settime (Include): Require timespec.h.
622         * modules/nanosleep (Include): Likewise.
623
624 2007-01-01  Bruno Haible  <bruno@clisp.org>
625
626         * gnulib-tool (func_emit_copyright_notice): Bump year.
627         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
628
629 2007-01-01  Bruno Haible  <bruno@clisp.org>
630
631         Improve support for OpenBSD.
632         * build-aux/config.rpath (libname_spec): Export.
633         (library_names_spec): New variable. Export.
634         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
635         library_names_spec from the config.rpath output. Locate shared library
636         through the name pattern in library_names_spec.
637
638 2007-01-01  Eric Blake  <ebb9@byu.net>
639
640         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
641
642 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
643
644         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
645         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
646         assume the C locale, and avoid an "eval" that could cause trouble.
647         Problem with SORT reported by Bob Proulx.
648
649         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
650         Define.  Trivial patch from Henning Nielsen Lund, originally
651         sent to bug-grep@gnu.org today.
652
653 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
654
655         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
656         struct stat.  Problem reported by Henning Nielsen Lund.
657         * lib/acl.c: Include acl.h first, to check interface.  Don't
658         bother to include sys/types.h and sys/stat.h again.
659
660 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
661
662         Import the following change from libc; problem reported by
663         Sven Verdoolaege.
664
665         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
666
667         [BZ #1373]
668         * lib/argp.h: Remove __NTH for __argp_usage inline function.
669
670 2006-12-28  Jim Meyering  <jim@meyering.net>
671
672         * build-aux/announce-gen: Do not assume that the package
673         builds any of tar.gz, tar.bz2, and .xdelta files.
674         Suggestion from Simon Josefsson.
675
676 2006-12-28  Simon Josefsson  <simon@josefsson.org>
677
678         * modules/announce-gen: New file.
679
680 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
681
682         * lib/mbchar.h: Just include <wctype.h>; the wctype module
683         handles its gotchas now.
684         * lib/mbswidth.c: Likewise.
685         * lib/wcwidth.h: Likewise.
686         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
687         and iswcntrl; the wctype module does this stuff now.
688         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
689         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
690         * modules/mbchar (Depends-on): Add wctype.
691         * modules/mbswidth (Depends-on): Likewise.
692         * modules/wcwidth (Depends-on): Likewise.
693
694 2006-12-27  Eric Blake  <ebb9@byu.net>
695
696         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
697         module uses more than what <wctype.h> is required to provide.
698
699 2006-12-26  Eric Blake  <ebb9@byu.net>
700
701         * gnulib-tool (sed_extract_prog): Avoid space-tab.
702
703 2006-12-26  Eric Blake  <ebb9@byu.net>
704
705         * modules/absolute-header: New module.
706         * modules/fcntl (Depends-on): Depend on it.
707         * modules/inttypes (Depends-on): Likewise.
708         * modules/stdint (Depends-on): Likewise.
709         * modules/sys_stat (Depends-on): Likewise.
710         * modules/wctype (Depends-on): Likewise.
711         * MODULES.html.sh (Support for building libraries and
712         executables): Document it.
713
714 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
715
716         * gnulib-tool (SED): Remove, undoing previous change.
717         The problem was that it broke coreutils on Solaris, because
718         "sed --posix" leaked into a makefile.
719         (sed): New alias, if 'alias' and GNU sed.
720
721 2006-12-24  Jim Meyering  <jim@meyering.net>
722
723         Work around an fchownat bug in glibc-2.4:
724         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
725         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
726         in spite of the -P option.
727         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
728         New macros.
729         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
730         * modules/openat (Files): Add lib/fchownat.c.
731         * lib/openat.c (fchownat): Don't define here.  Move to...
732         * lib/fchownat.c: ...this new file.
733
734 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
735
736         Fix bug reported by Bruno Haible in
737         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
738         where quotearg.c didn't compile on Mac OS X 10.2 because it
739         lacks <wchar.h> and wint_t.
740         * lib/wctype_.h (__wctype_wint_t): New type.
741         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
742         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
743         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
744         Arg is now of type __wctype_wint_t, not wint_t.
745         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
746         substitute HAVE_WINT_T.
747         * modules/wctype (Files): Add m4/wint_t.m4.
748         (wctype.h): Substitute HAVE_WINT_T.
749
750 2006-12-23  Bruno Haible  <bruno@clisp.org>
751
752         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
753
754 2006-12-23  Bruno Haible  <bruno@clisp.org>
755
756         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
757         S_ISLNK.
758         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
759         mingw.
760
761 2006-12-22  Bruno Haible  <bruno@clisp.org>
762
763         * lib/copy-file.c: Include acl.h.
764         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
765         Close the file descriptors only after being done with copy_acl.
766         * modules/copy-file (Depends-on): Add acl.
767
768 2006-12-22  Bruno Haible  <bruno@clisp.org>
769
770         * gnulib-tool (SED): New variable.
771         Use $SED instead of sed everywhere.
772
773 2006-12-22  Bruno Haible  <bruno@clisp.org>
774
775         * modules/no-c++: New file.
776         * m4/no-c++.m4: New file.
777         * MODULES.html.sh (Support for building libraries and executables):
778         Add no-c++.
779
780 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
781
782         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
783         Include <limits.h>, and use its INT_MAX to rewrite the
784         j loop so that it does not overflow 'int'.  Problem reported by
785         Ralf Wildenhues in
786         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
787         Play it safe by shifting left by 1 rather than multiplying by 2,
788         as GCC is less likely to optimize this away when the value
789         is signed (when it assumes overflow leads to undefined behavior).
790         Also, don't assume time_t uses two's complement.
791
792 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
793
794         * MODULES.html.sh: New module wctype.
795         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
796         * lib/fnmatch.c: Don't bother to include <wchar.h> before
797         <wctype.h>, since the new wctype module should fix this.
798         * lib/quotearg.c: Include <wctype.h> unconditionally, since
799         the wctype module should arrange for it.
800         * lib/regex_internal.h: Likewise.
801         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
802         since the wctype module should handle this now.
803         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
804         * modules/fnmatch (Depends-on): Add wctype.
805         * modules/quotearg (Depends-on): Likewise.
806         * modules/regex (Depends-on): Likewise.
807
808 2006-12-19  Bruno Haible  <bruno@clisp.org>
809
810         * lib/strdup.h [C++]: Wrap definitions in extern "C".
811         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
812
813 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
814
815         * modules/savewd (Depends-on): Fix dependency on fcntl.
816
817 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
818
819         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
820         conforms to C99, rather than relying on the user's environment
821         setting of STDINT_H.
822
823 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
824         and Eric Blake  <ebb9@byu.net>
825
826         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
827         This is more consistent with the other defines here.
828         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
829         Port to z/OS.  Problem reported by Paul Gilmartin.
830         Change local vars to use gl_ prefix rather than ac_.
831         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
832         with other defines.
833         * modules/double-slash-root: New module.
834         * modules/dirname (Files): Remove m4/double-slash-root.m4.
835         (Depends-on): Add double-slash-root.
836         * MODULES.html.sh (File system functions): Mention new module.
837
838 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
839
840         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
841         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
842         This is for the benefit of gzip, which doesn't do i18n.
843
844 2006-12-12  Jim Meyering  <jim@meyering.net>
845
846         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
847         Reported by Andreas Schwab <schwab@suse.de>.
848
849 2006-12-12  Bruno Haible  <bruno@clisp.org>
850
851         Merge these changes.
852         2006-09-05  Bruno Haible  <bruno@clisp.org>
853         * lib/iconvme.c (iconv_string): No need to save and restore errno when
854         iconv_alloc succeeded.
855         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
856         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
857         test for " && dest " at the end - dest is always != NULL there. Call
858         iconv with 4xNULL arguments initially, to reset the state. Call iconv
859         with 2xNULL arguments, also to flush the state storage. Handle the
860         IRIX iconv behaviour. Realloc the final result, to throw away unused
861         memory.
862
863 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
864
865         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
866         and fchmodat unconditionally, since glibc 2.4 has them.
867         Problem reported by Arkadiusz Miskiewicz.
868
869 2006-12-10  Bruno Haible  <bruno@clisp.org>
870
871         * gnulib-tool (func_import): Show the include files only for those
872         modules that are copied and specified.
873         Reported by Karl Berry.
874
875 2006-12-08  Jim Meyering  <jim@meyering.net>
876
877         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
878         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
879
880         * build-aux/announce-gen: Add two new options, both optional:
881         --bootstrap-tools=TOOL_LIST
882               a comma-separated list of tools, e.g.,
883               autoconf,automake,bison,gnulib
884         --gnulib-snapshot-date=DATE
885               if gnulib is in the bootstrap tool list,
886               then report this as the snapshot date.
887               If not specified, use the current date/time.
888               If you specify a date here, be sure it's UTC.
889
890 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
891
892         * tests/test-argp-2.sh: Fix test to match actual output.
893         (func_compare): Fix sed script to be portable.
894
895 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
896
897         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
898         workaround for this case.  It is not autoconfigured now; offhand
899         it's hard to see how to autoconfigure it.
900
901 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
902
903         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
904         a directory that is about to be chowned.  Such a directory's
905         initial file permissions should permit the owner only and this
906         should not be changed until after the chown, since the group and
907         other bits would be incorrect if they granted permission before
908         the chown.
909
910         Fix porting problem for iswctype reported by Georg Schwarz in:
911         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
912         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
913         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
914         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
915         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
916
917 2006-12-03  Jim Meyering  <jim@meyering.net>
918
919         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
920         p->fts_statp may not yet be defined.
921         (fts_read): Instead, set it in the caller, once p->fts_statp is
922         sure to be defined, and corresponds to a top-level directory.
923         This bug made du -x fail.  Here's the coreutils test case:
924         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
925         Reported by Mike Frysinger.
926
927 2006-12-01  Jim Meyering  <jim@meyering.net>
928
929         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
930         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
931         Reported by Simon Josefsson.
932
933 2006-11-30  Jim Meyering  <jim@meyering.net>
934
935         * m4/warning.m4: Use the all-permissive copyright notice
936         recommended by RMS (rather than LGPL).
937         * m4/vararrays.m4: Likewise.
938         * m4/flexmember.m4: Likewise.
939
940 2006-11-29  Bruno Haible  <bruno@clisp.org>
941
942         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
943         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
944         using +=.
945         Reported by Simon Josefsson <simon@josefsson.org>.
946
947 2006-11-28  James Youngman <jay@gnu.org>
948
949         * README: Advise users that they might find the bug-gnulib@gnu.org
950         and autotools-announce@gnu.org mailing lists useful.
951
952 2006-11-28  Bruno Haible  <bruno@clisp.org>
953
954         * m4/ptrdiff_max.m4: Remove file.
955
956 2006-11-21  Bruno Haible  <bruno@clisp.org>
957
958         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
959         _AC_COMPUTE_INT.
960         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
961         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
962         _AC_COMPUTE_INT.
963         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
964         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
965         _AC_COMPUTE_INT.
966         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
967
968 2006-11-28  Jim Meyering  <jim@meyering.net>
969
970         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
971         warning from "gcc -Wshadow" about shadowing the builtin.
972
973 2006-11-27  Bruno Haible  <bruno@clisp.org>
974
975         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
976         _AC_COMPUTE_INT.
977         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
978
979 2006-11-27  Bruno Haible  <bruno@clisp.org>
980             Paul Eggert  <eggert@cs.ucla.edu>
981
982         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
983
984 2006-11-26  Bruno Haible  <bruno@clisp.org>
985
986         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
987         noinst_LTLIBRARIES.
988
989 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
990             Bruno Haible  <bruno@clisp.org>
991
992         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
993         if compiling with "gcc -ansi".
994
995 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
996
997         Fix some incompatibilities with gcc -ansi -pedantic.
998         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
999         if compiling pedantically with GCC, unless it's C99 or later.
1000         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
1001         it mishandles gcc -ansi -pedantic as well.
1002         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
1003         if gcc -pedantic.
1004         * lib/regexec.c (check_node_accept_bytes): Don't use auto
1005         initializers for struct if -pedantic, unless it's C99 or later.
1006
1007 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
1008
1009         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
1010         Don't close an fd more than once. Identical atimes indicate
1011         success, not failure.
1012
1013 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
1014
1015         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
1016
1017 2006-11-23  Jim Meyering  <jim@meyering.net>
1018
1019         * build-aux/announce-gen: New file.  From coreutils.
1020
1021 2006-11-22  Jim Meyering  <jim@meyering.net>
1022
1023         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
1024         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
1025         (fts_read): Use a temporary to narrow the overused st_size member
1026         before using it in a switch statement.  Reported by Matthew Woehlke.
1027
1028         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
1029         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
1030
1031 2006-11-20  Bruno Haible  <bruno@clisp.org>
1032
1033         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
1034         changequote instead of pairs of brackets.
1035         Reported by Andreas Schwab <schwab@suse.de>.
1036
1037 2006-11-21  Jim Meyering  <jim@meyering.net>
1038
1039         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
1040         so as to remain compatible with older compilers.
1041         Patch from Michael Deutschmann.
1042
1043 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1044
1045         * MODULES.html.sh (File system functions): Add openat.
1046
1047         * lib/openat.h (rpl_fstatat): New macro, if
1048         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
1049         (fstatat): Define to rpl_fstatat under the same conditions,
1050         unless COMPILING_FSTATAT.
1051         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
1052         seems to have the bug.
1053         * lib/fstatat.c: New file.
1054         * modules/openat (Files): Add it.
1055
1056 2006-11-20  Bruno Haible  <bruno@clisp.org>
1057
1058         * Makefile: New file.
1059
1060 2006-11-20  Jim Meyering  <jim@meyering.net>
1061
1062         The beginnings of syntax-related checks for gnulib.
1063         * lib/Makefile: New file.
1064         * lib/t-idcache: New script.  Ensure that the two halves of
1065         idcache.c stay in sync.
1066
1067         * lib/idcache.c: Adjust comments in user- and group- portions to
1068         be more accurate, and to be consistent with one another.
1069
1070 2006-11-20  Jim Meyering  <jim@meyering.net>
1071
1072         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
1073         continue using the flexible array member (thus, this module performs
1074         half as many malloc calls), with the addition that...
1075         (getgroup, getuser): Consistently record a non-match via an empty
1076         "name" string, and map an empty string match to a NULL return value.
1077         * modules/idcache (Depends-on): Re-add flexmember.
1078
1079         * lib/idcache.c (getuser): Remove all uses of the register keyword.
1080         (getuidbyname, getgroup, getgidbyname): Likewise.
1081
1082         Use cleaner syntax: NULL rather than 0.
1083         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
1084
1085 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1086
1087         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
1088         It mishandled the case where the group was missing.
1089         Problem reported by Greg Schafer.
1090         * modules/idcache: Likewise.
1091
1092 2006-11-18  Jim Meyering  <jim@meyering.net>
1093
1094         * check-module (%exempt_header): Add exception for some
1095         conditionally-included headers.
1096
1097         * modules/i-ring (Depends-on): Add verify.
1098         (License): Change to LGPL.
1099
1100 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1101
1102         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
1103         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
1104         and inttostr.h.  Use snprintf rather than uinttostr, so that
1105         LGPLed code doesn't depend on GPLed.
1106
1107 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
1108
1109         * modules/inline (License): Change from GPL to LGPL.
1110
1111 2006-11-17  Jim Meyering  <jim@meyering.net>
1112
1113         * modules/d-type (License): Switch to LGPL.
1114
1115 2006-11-15  Bruno Haible  <bruno@clisp.org>
1116
1117         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
1118
1119 2006-11-15  Eric Blake  <ebb9@byu.net>
1120
1121         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
1122         the module dependency.
1123
1124 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1125             Bruno Haible  <bruno@clisp.org>
1126
1127         * gnulib-tool (func_create_testdir): Add license consistency check.
1128
1129 2006-11-15  Eric Blake  <ebb9@byu.net>
1130
1131         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
1132         random "(cached)" in configure output.
1133
1134 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1135
1136         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
1137         test for conforming inttypes.h is both announced and cached.
1138
1139         * MODULES.html.sh (seen_modules, seen_files): New variables.
1140         (func_module): Rewrite to use a few less gnulib-tool and sed
1141         invocations.  Avoid a couple of quadratic algorithms for ...
1142         (missed_modules, missed_files): ... these, with ...
1143         (func_append, func_tmpdir): ... these new functions, from
1144         gnulib-tool.  Analogously, install traps for cleanup.
1145
1146         * tests/test-gc.c (main): Remove unused variables.
1147         * tests/test-read-file.c: Include stdlib.h, for 'free'.
1148
1149 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
1150
1151         * modules/inttostr (License): Change to LGPL.
1152
1153 2006-11-14  Eric Blake  <ebb9@byu.net>
1154
1155         * modules/tempname (License): Change to LGPL.
1156
1157 2006-11-14  Eric Blake  <ebb9@byu.net>
1158
1159         * doc/functions.texi (Function Portability): *printf functions on
1160         Cygwin now understand all POSIX size specifiers.
1161
1162 2006-11-14  Bruno Haible  <bruno@clisp.org>
1163
1164         * modules/c-ctype (License): Change to LGPL.
1165
1166 2006-11-12  Bruno Haible  <bruno@clisp.org>
1167
1168         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
1169         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
1170         for GNOME libraries, for which the include files are installed in
1171         subdirectories of $prefix/include.
1172
1173 2006-11-12  Bruno Haible  <bruno@clisp.org>
1174
1175         * m4/lib-link.m4: Require at least autoconf-2.54.
1176         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
1177         name to underscores for the --with option.
1178
1179 2006-11-13  Bruno Haible  <bruno@clisp.org>
1180
1181         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
1182         the tests directory.
1183         Reported by Ralf Wildenhues.
1184
1185 2006-11-13  Bruno Haible  <bruno@clisp.org>
1186
1187         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
1188         (func_emit_initmacro_end): Undo the override here.
1189         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
1190         Works around the famous automake error in coreutils.
1191
1192 2006-11-13  Eric Blake  <ebb9@byu.net>
1193
1194         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
1195         element, not its node.
1196
1197 2006-11-12  Bruno Haible  <bruno@clisp.org>
1198
1199         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
1200         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
1201
1202 2006-11-12  Bruno Haible  <bruno@clisp.org>
1203
1204         * gnulib-tool: New option --local-symlink.
1205         (func_usage): Document it.
1206         (lsymbolic): New variable.
1207         (func_import, func_create_testdir): If --symlink was not specified,
1208         test whether --local-symlink was specified and the file comes from
1209         the local_gnulib_dir.
1210
1211 2006-11-12  Bruno Haible  <bruno@clisp.org>
1212
1213         * gnulib-tool (func_ln): New function.
1214         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
1215
1216 2006-11-12  Bruno Haible  <bruno@clisp.org>
1217
1218         Finish support for source files in subdirectories.
1219         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
1220         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
1221         AUTOMAKE_OPTIONS.
1222         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
1223
1224 2006-11-12  Bruno Haible  <bruno@clisp.org>
1225
1226         * gnulib-tool (func_get_automake_snippet): Synthesize also an
1227         EXTRA_lib_SOURCES augmentation.
1228         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
1229
1230 2006-11-12  Jim Meyering  <jim@meyering.net>
1231
1232         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
1233         file descriptors.  This also averts a failure on systems with
1234         native openat support when a traversed directory lacks "x" access.
1235         * lib/fts_.h: Include "i-ring.h"
1236         (struct FTS) [fts_fd_ring]: New member.
1237         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
1238         (FCHDIR): Add parentheses.
1239         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
1240         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
1241         When descending, rather than simply closing the previous
1242         fts_cwd_fd value, push that file descriptor onto the ring.
1243         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
1244         (fts_open): Initialize the new fd_ring member.
1245         (fts_close): Clear the ring.
1246         (fts_safe_changedir): When possible, use our new fd_ring to skip
1247         the diropen and fstat and dev/ino comparison that would normally
1248         accompany a virtual `chdir ("..")'.
1249
1250         * modules/fts (Depends-on): Add i-ring.
1251         * modules/i-ring: New module.
1252         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
1253         * m4/i-ring.m4: New file.
1254
1255 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1256
1257         * gnulib-tool (func_create_testdir): Fix replacement of
1258         `build-aux' in configure.ac.  Run autotools in gltests
1259         subdirectory.
1260         (func_create_testdir, func_create_megatestdir, test): There is
1261         no need for '--force' in most autotool invocations in a new
1262         tree.  Actually fail the whole test if any of the tools, or the
1263         configure or make stages fail.
1264
1265         Sync from Automake.
1266         * build-aux/gnupload: Revert last change.  Add pointer to upload
1267         instructions of the GNU Maintenance Instructions.
1268         Suggestion by Karl Berry.
1269
1270 2006-11-10  Jim Meyering  <jim@meyering.net>
1271
1272         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
1273
1274 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1275
1276         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
1277         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
1278         (bind_textdomain_codeset) [! ENABLE_NLS]:
1279         Evaluate all the arguments.  That way, callers get compatible behavior
1280         if the arguments have side effects.  Also, it avoids some GCC
1281         diagnostics in some cases; Joel E. Denny reported problems when Bison
1282         was configured with --enable-gcc-warnigs.
1283
1284 2006-11-10  Jim Meyering  <jim@meyering.net>
1285
1286         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
1287         relevant options in CFLAGS (like -O, -fno-inline) are taken into
1288         account.
1289
1290 2006-11-10  Jim Meyering  <jim@meyering.net>
1291
1292         * modules/inline: New file/module.
1293         * modules/xalloc (Files): Remove m4/inline.m4.
1294         (Depends-on): Add inline, instead.
1295         * modules/oset: Likewise.
1296         * modules/list: Likewise.
1297
1298 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1299
1300         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
1301         Problem reported by Matthew Woehlke.
1302
1303 2006-11-09  Bruno Haible  <bruno@clisp.org>
1304
1305         * lib/tempname.c (gen_tempname): Remove variant that invokes
1306         __gen_tempname.
1307         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
1308         __gen_tempname.
1309
1310 2006-11-08  Bruno Haible  <bruno@clisp.org>
1311
1312         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
1313         to 'yes' instead of 'cross-compiling'.
1314
1315 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
1316
1317         * lib/quotearg.h (quotearg_free): New decl.
1318         * lib/quotearg.c (quotearg_free): New function.
1319         (slot0, nslots, slotvec0, slotvec):
1320         Now file-scope so that quotearg_free can get at them.
1321
1322 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1323
1324         Sync from Automake.
1325         * build-aux/gnupload: Add missing 'gnu' to example URL.
1326         Report by Karl Berry.
1327
1328 2006-11-08  Bruno Haible  <bruno@clisp.org>
1329
1330         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
1331         Suggested by Paul Eggert.
1332
1333 2006-11-08  Jim Meyering  <jim@meyering.net>
1334
1335         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
1336         It's already included if !_LIBC.
1337         (fts_safe_changedir): Add a comment.
1338
1339 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1340
1341         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
1342         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
1343         Matthew Woehlke.
1344
1345         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
1346         definitions up, to avoid colliding with change below.
1347         (static_inline) [HAVE_INLINE]: New macro.
1348         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
1349         Provide extern decls when !HAVE_INLINE.  Do not define unless
1350         static_inline is defined, either by us or by xmalloc.c.  Use
1351         static_inline rather than static inline.
1352         (XCALLOC): Optimize sizeof(T) = 1 case.
1353         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
1354
1355 2006-11-07  Bruno Haible  <bruno@clisp.org>
1356
1357         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
1358         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
1359         AC_C_INLINE.
1360         * modules/xalloc (Files): Add m4/inline.m4.
1361
1362 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1363
1364         * README: Fix typo.
1365         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
1366         (Miscellanous Notes): ...from this.
1367
1368 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1369
1370         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
1371         Mention that offsetof should be used instead of sizeof.
1372         From Bruno Haible.
1373
1374 2006-11-07  Bruno Haible  <bruno@clisp.org>
1375
1376         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
1377
1378 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1379
1380         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1381         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
1382         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1383         (gl_tree_add_before, gl_tree_add_after):
1384         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
1385         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
1386         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
1387         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
1388         (gl_linked_add_after, gl_linked_add_at): Likewise.
1389         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
1390         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1391         (gl_tree_add_before, gl_tree_add_after): Likewise.
1392         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
1393         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
1394         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
1395
1396 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1397
1398         * lib/gl_oset.h: Use C comment style, not C++ comment style.
1399
1400 2006-11-06  Bruno Haible  <bruno@clisp.org>
1401
1402         * m4/inline.m4: New file.
1403         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
1404         * modules/list (Files): Add m4/inline.m4.
1405         * modules/oset (Files): Likewise.
1406
1407 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1408
1409         * lib/idcache.c: Include <stddef.h>, for offsetof.
1410         (struct userid.name): Change from char * to a flexible array member.
1411         All uses changed.
1412         * modules/idcache (Depends-on): Add flexmember.
1413
1414         * MODULES.html.sh (Core language properties): New module flexmember.
1415         * modules/flexmember, m4/flexmember.m4: New files.
1416
1417         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
1418         inline functions that are identical with the old xnmalloc_inline,
1419         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
1420         that we can avoid some unnecessary integer multiplications and
1421         divisions in the common case where the element size is known at
1422         compile time.
1423         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
1424         needed.
1425         (xnboundedmalloc): Remove.
1426         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
1427         arguments, for consistency with rest of this header.
1428         (xcharalloc): Rewrite using XNMALLOC.
1429         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
1430         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
1431         versions have been moved to lib/xalloc.h and renamed to be the
1432         non-*_inline versions.
1433         (xmalloc, xrealloc): Implement without reference to the xnmalloc
1434         and xnrealloc functions, since those functions are now inline and
1435         now call us.
1436         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
1437         renaming described above.
1438         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
1439         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
1440         captures the dependency in AC_C_INLINE.
1441
1442         New module canonicalize-lgpl, proposed by Charles Wilson in
1443         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
1444         with a few small changes afterwards.
1445         * MODULES.html.sh (File system functions): New module
1446         canonicalize-lgpl.
1447         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
1448         and canonicalize_file_name.
1449         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
1450         * modules/canonicalize-lgpl: New files.
1451
1452 2006-11-05  Bruno Haible  <bruno@clisp.org>
1453
1454         * gnulib-tool (func_import, func_create_testdir): Create directories
1455         also for files in subdirectories of lib/.
1456
1457 2006-11-05  Bruno Haible  <bruno@clisp.org>
1458
1459         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
1460         ANSI C compliant.
1461
1462 2006-11-03  Bruno Haible  <bruno@clisp.org>
1463
1464         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1465         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
1466         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
1467         (xnboundedmalloc): New inline function.
1468         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
1469         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
1470         xmalloc.
1471         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
1472         xmalloc.
1473         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
1474         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
1475         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
1476         xmalloc.
1477         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1478         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
1479         xmalloc.
1480         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
1481         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1482         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
1483         xmalloc.
1484         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1485         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
1486         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1487         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
1488         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
1489         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
1490         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
1491
1492 2006-11-03  Bruno Haible  <bruno@clisp.org>
1493
1494         * lib/c-ctype.h [C++]: Define functions without name mangling.
1495         * lib/fwriteerror.h [C++]: Likewise.
1496         * lib/gcd.h [C++]: Likewise.
1497         * lib/linebreak.h [C++]: Likewise.
1498
1499 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
1500
1501         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
1502         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
1503         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
1504         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
1505         Check for functions and headers just once.
1506         Check for declaration of canonicalize_file_name.
1507         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
1508
1509 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1510
1511         * gnulib-tool (func_import): Fix typo in actioncmd.
1512
1513 2006-11-02  Bruno Haible  <bruno@clisp.org>
1514
1515         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
1516         newline sequence in the Makefile.am snippet as a space, like "make"
1517         does.
1518         Reported by Roger Persson <perrog@gmail.com>.
1519
1520 2006-11-01  Bruno Haible  <bruno@clisp.org>
1521
1522         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
1523         already declared in <string.h>.
1524         * lib/strcase.h (strncasecmp): Don't declare it if yes.
1525
1526 2006-11-01  Bruno Haible  <bruno@clisp.org>
1527
1528         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
1529         * lib/strcase.h: Include <string.h>.
1530         (strcasecmp): Define to rpl_strcasecmp here.
1531
1532 2006-11-01  Bruno Haible  <bruno@clisp.org>
1533
1534         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
1535
1536 2006-11-01  Eric Blake  <ebb9@byu.net>
1537
1538         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
1539
1540         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
1541
1542 2006-10-29  Bruno Haible  <bruno@clisp.org>
1543
1544         Make it compile in C++ mode.
1545         * lib/full-write.c (full_rw): Add a cast.
1546
1547 2006-11-01  Bruno Haible  <bruno@clisp.org>
1548
1549         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
1550         be POSIX compliant.
1551         Reported by Roger Persson <perrog@gmail.com>.
1552
1553 2006-11-01  Eric Blake  <ebb9@byu.net>
1554
1555         * lib/getopt_.h: Fix comments.
1556
1557 2006-10-31  Eric Blake  <ebb9@byu.net>
1558
1559         * modules/tmpdir (Depends-on): Add sys_stat.
1560         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
1561         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
1562         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
1563         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
1564         tempname.
1565
1566 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
1567
1568         Avoid some C++ diagnostics reported by Bruno Haible.
1569         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
1570         xmalloc.
1571         (quotearg_alloc): Use xcharalloc rather than xmalloc.
1572         (struct slotvec): Move to top level.
1573         (quotearg_n_options): Rewrite to avoid xmalloc.
1574         * lib/xalloc.h (xcharalloc): New function.
1575         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
1576         [defined __cplusplus]: Add function template that provides result
1577         type propagation.  This part of the change is from Bruno Haible.
1578
1579 2006-10-29  Bruno Haible  <bruno@clisp.org>
1580
1581         Make it compile in C++ mode.
1582         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
1583         * lib/strnlen1.c (strnlen1): Cast memchr result.
1584         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
1585         * lib/clean-temp.c (string_equals, string_hash): Add casts.
1586         (create_temp_dir): Rename local variable 'template'.
1587         (compile_csharp_using_sscli): Add cast.
1588         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
1589         * lib/findprog.c (find_in_path): Likewise.
1590         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
1591         * lib/wait-process.c (register_slave_subprocess): Likewise.
1592
1593 2006-10-22  Bruno Haible  <bruno@clisp.org>
1594
1595         * modules/tsearch: New file.
1596         * lib/tsearch.h: New file.
1597         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
1598         * m4/tsearch.m4: New file.
1599         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
1600
1601 2006-10-29  Eric Blake  <ebb9@byu.net>
1602
1603         * lib/arcfour.c: Assume config.h.
1604         * lib/arctwo.c: Likewise.
1605         * lib/base64.c: Likewise.
1606         * lib/check-version.c: Likewise.
1607         * lib/crc.c: Likewise.
1608         * lib/des.c: Likewise.
1609         * lib/gc-gnulib.c: Likewise.
1610         * lib/gc-libgcrypt.c: Likewise.
1611         * lib/gc-pbkdf2-sha1.c: Likewise.
1612         * lib/getaddrinfo.c: Likewise.
1613         * lib/getdelim.c: Likewise.
1614         * lib/getline.c: Likewise.
1615         * lib/hmac-md5.c: Likewise.
1616         * lib/hmac-sha1.c: Likewise.
1617         * lib/iconvme.c: Likewise.
1618         * lib/md2.c: Likewise.
1619         * lib/md4.c: Likewise.
1620         * lib/memxor.c: Likewise.
1621         * lib/read-file.c: Likewise.
1622         * lib/readline.c: Likewise.
1623         * lib/rijndael-alg-fst.c: Likewise.
1624         * lib/rijndael-api-fst.c: Likewise.
1625         * lib/xgetdomainname.c: Likewise.
1626
1627 2006-10-28  Eric Blake  <ebb9@byu.net>
1628
1629         * lib/xstrndup.c: Assume config.h.
1630
1631 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
1632
1633         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
1634         stat-macros.h is now for our own macros, whereas stat_h is for
1635         macros in the <sys/stat.h> name space.
1636         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
1637         (STAT_MACROS_H): Remove.
1638         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
1639         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
1640         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
1641         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
1642         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
1643         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
1644         Move these macros to ...
1645         * lib/stat_.h: here.  Don't include stat-macros.h.
1646         * lib/canonicalize.c: Don't include stat-macros.h.
1647         * lib/chown.c: Likewise.
1648         * lib/euidaccess.c: Likewise.
1649         * lib/file-type.c: Likewise.
1650         * lib/filemode.c: Likewise.
1651         * lib/glob.c: Likewise.
1652         * lib/isapipe.c: Likewise.
1653         * lib/lchown.c: Likewise.
1654         * lib/lstat.c: Likewise.
1655         * lib/mkdir-p.c: Likewise.
1656         * lib/rmdir.c: Likewise.
1657         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
1658         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
1659         unless mkdir isn't declared, to speed up 'configure'.
1660         Always create sys/stat.h, since it's unlikely any real sys/stat.h
1661         would define all the S_* symbols.
1662         * modules/canonicalize (Depends-on):
1663         Depend on sys_stat, not stat-macros.
1664         * modules/chown: Likewise.
1665         * modules/euidaccess: Likewise.
1666         * modules/filemode: Likewise.
1667         * modules/file-type: Likewise.
1668         * modules/glob: Likewise.
1669         * modules/isapipe: Likewise.
1670         * modules/lchown: Likewise.
1671         * modules/lstat: Likewise.
1672         * modules/mkancesdirs: Likewise.
1673         * modules/rmdir: Likewise.
1674         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
1675         * modules/modechange: Likewise.
1676         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
1677         (configure.ac): Remove gl_STAT_MACROS.
1678         * modules/sys_stat (Depends-on): Remove stat-macros.
1679
1680 2006-10-27  Bruno Haible  <bruno@clisp.org>
1681
1682         * m4/signed.m4: Remove file.
1683         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
1684         invocation.
1685         * modules/vasnprintf (Files): Remove m4/signed.m4.
1686
1687 2006-10-27  Bruno Haible  <bruno@clisp.org>
1688
1689         Update to GNU gettext 0.16.
1690         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
1691         m4/inttypes-h.m4, m4/signed.m4.
1692         * m4/gettext.m4: Update to GNU gettext 0.16.
1693         * m4/intl.m4: New file, from GNU gettext.
1694         * m4/intldir.m4: New file, from GNU gettext.
1695         * config/srclist.txt: Update
1696
1697 2006-10-27  Eric Blake  <ebb9@byu.net>
1698
1699         * MODULES.html.sh: Document tempname.
1700         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
1701         dependencies.
1702         (Files): Move lib/tempname.c...
1703         * modules/tempname: ...to this new module.
1704         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
1705         (gl_PREREQ_TEMPNAME): Move...
1706         * m4/tempname.m4: ...to this new file.
1707         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
1708         * modules/sys_stat (Depends-on): Add stat-macros.
1709         * lib/stat_.h (includes): Pick up stat macros.
1710         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
1711         if stat macros are broken.
1712         * lib/tempname.c (includes): No need to include "stat-macros.h".
1713         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
1714         (direxists, __path_search) [!_LIBC]: Don't compile these in
1715         gnulib; the tmpdir module covers that.
1716         * lib/tempname.h: New file.
1717
1718 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
1719
1720         * COPYING: Explain how gnulib-tool converts licence headers.
1721         Almost all wording by Eric Blake.
1722
1723 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
1724
1725         * lib/mbchar.h (is_basic_table): Make read-only.
1726         * lib/mbchar.c (is_basic_table): Likewise.
1727         Reported by John Darrington.
1728
1729 2006-10-25  Bruno Haible  <bruno@clisp.org>
1730
1731         * lib/progname.h (set_program_name): Undefine before defining.
1732
1733 2006-10-25  Bruno Haible  <bruno@clisp.org>
1734
1735         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
1736         false for non-gcc C++ compilers.
1737         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
1738
1739 2006-10-24  Bruno Haible  <bruno@clisp.org>
1740
1741         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
1742         iconv implementations like Irix iconv.
1743
1744 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1745
1746         * modules/vararrays: New file.
1747         * m4/vararrays.m4: New file, taken from diffutils.
1748         * MODULES.html.sh: New module vararrays.
1749
1750 2006-10-24  Karl Berry  <karl@gnu.org>
1751
1752         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
1753         Don't call GNU Unix.
1754
1755 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1756
1757         * users.txt: Add Libtool.
1758
1759         Sync from Libtool:
1760
1761         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1762
1763         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
1764         to gnulib's policy of including config.h unconditionally.
1765
1766 2006-10-24  Bruno Haible  <bruno@clisp.org>
1767
1768         * modules/wcwidth (Files): Add m4/wint_t.m4.
1769         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
1770         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
1771
1772 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1773
1774         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
1775         to pacify GCC with some -W flags enabled.  Problem reported by
1776         Bruno Haible.
1777
1778 2006-10-24  Jim Meyering  <jim@meyering.net>
1779
1780         * MODULES.html.sh: Remove uinttostr.  It's not a module.
1781         Reported by Karl Berry.
1782
1783 2006-10-23  Bruno Haible  <bruno@clisp.org>
1784
1785         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
1786
1787 2006-10-24  Bruno Haible  <bruno@clisp.org>
1788
1789         * lib/gl_list.h: Use C comment style, not C++ comment style.
1790
1791 2006-10-23  Eric Blake  <ebb9@byu.net>
1792
1793         * lib/getaddrinfo.c (includes): Add missing include.
1794
1795 2006-10-23  Bruno Haible  <bruno@clisp.org>
1796             Paul Eggert  <eggert@cs.ucla.edu>
1797
1798         Ability to rename obstack_free.
1799         * lib/obstack.h (__obstack_free): New macro. Declare instead of
1800         obstack_free.
1801         (obstack_free): Invoke the __obstack_free macro.
1802         * lib/obstack.c (obstack_free): Use __obstack_free macro.
1803
1804 2006-10-23  Bruno Haible  <bruno@clisp.org>
1805             Paul Eggert  <eggert@cs.ucla.edu>
1806
1807         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
1808         __argc, __argv from the declaration. (They are defined as macros on
1809         mingw.)
1810
1811 2006-10-22  Bruno Haible  <bruno@clisp.org>
1812
1813         * doc/gnulib-intro.texi: New file.
1814         * doc/gnulib.texi: Include it.
1815
1816 2006-10-21  Bruno Haible  <bruno@clisp.org>
1817
1818         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
1819         "Introduction", "Miscellanous Notes", "Particular Modules".
1820
1821 2006-10-21  Bruno Haible  <bruno@clisp.org>
1822
1823         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1824         Change mostlyclean-local rule to avoid sh syntax error from bash
1825         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
1826
1827 2006-10-23  Jim Meyering  <jim@meyering.net>
1828
1829         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
1830         in place of snprintf.
1831
1832         * modules/inttostr (Files): Add lib/uinttostr.c.
1833         * lib/uinttostr.c (inttostr): New file/function.
1834         * lib/inttostr.h (uinttostr): Declare.
1835         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
1836         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
1837         Add uinttostr.
1838         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
1839
1840 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1841
1842         * lib/canonicalize.c (ELOOP): Define if not already defined.
1843         Problem reported by Bruno Haible in
1844         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
1845
1846 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1847
1848         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
1849         Problem reported by Perry Smith and Ville Laurikari.
1850
1851         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
1852         uses.
1853
1854 2006-10-19  Bruno Haible  <bruno@clisp.org>
1855
1856         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
1857         for mingw.
1858
1859 2006-10-19  Bruno Haible  <bruno@clisp.org>
1860
1861         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
1862         Needed for mingw.
1863
1864 2006-10-19  Bruno Haible  <bruno@clisp.org>
1865
1866         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
1867
1868 2006-10-19  Bruno Haible  <bruno@clisp.org>
1869
1870         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
1871         it.
1872
1873 2006-10-19  Bruno Haible  <bruno@clisp.org>
1874
1875         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
1876         invocation.
1877
1878 2006-10-19  Bruno Haible  <bruno@clisp.org>
1879
1880         * gnulib-tool (func_create_testdir): Don't include ftruncate and
1881         mountlist by default.
1882
1883 2006-10-16  Bruno Haible  <bruno@clisp.org>
1884
1885         * lib/c-strstr.c: Include c-strstr.h.
1886
1887 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1888
1889         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
1890         in a slash.
1891
1892 2006-10-18  Bruno Haible  <bruno@clisp.org>
1893
1894         * lib/lock.h [C++]: Wrap definitions in extern "C".
1895
1896 2006-10-18  Bruno Haible  <bruno@clisp.org>
1897
1898         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
1899         gl_LIBOBJS list.
1900
1901 2006-10-18  Bruno Haible  <bruno@clisp.org>
1902
1903         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
1904
1905 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
1906
1907         * lib/xstrtol.h: Include gettext.h.
1908         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
1909         Problem reported by Eric Blake.
1910         * modules/xstrtol (Depends-on): Add gettext-h.
1911
1912 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1913
1914         * lib/strftime.c (advance): New macro.
1915         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
1916         incomplete type, so you can't add 0 to it.  Problem and patch
1917         reported by Eelco Dolstra for dietlibc.
1918
1919 2006-10-18  Jim Meyering  <jim@meyering.net>
1920
1921         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
1922         type for a local, and rename it: s/up/user_proc/.
1923
1924 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
1925
1926         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
1927         READ_UTMP_USER_PROCESS.
1928         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
1929
1930 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
1931
1932         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
1933         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
1934
1935 2006-10-17  Eric Blake  <ebb9@byu.net>
1936
1937         * lib/sigprocmask.c (sigprocmask): Fix typo.
1938
1939         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
1940
1941         * modules/clean-temp (Makefile.am): Don't add to make output...
1942         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
1943         config.h.
1944
1945 2006-10-17  Bruno Haible  <bruno@clisp.org>
1946
1947         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
1948         differently if DEFAULT_TEXT_DOMAIN is set.
1949
1950 2006-10-16  Bruno Haible  <bruno@clisp.org>
1951
1952         * lib/clean-temp.c: Include fwriteerror.h.
1953
1954 2006-10-16  Bruno Haible  <bruno@clisp.org>
1955
1956         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
1957
1958 2006-10-16  Bruno Haible  <bruno@clisp.org>
1959
1960         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
1961         * lib/sigprocmask.h: Include <sys/types.h>.
1962         (sigset_t): Use the system's definition if present.
1963
1964 2006-10-17  Eric Blake  <ebb9@byu.net>
1965
1966         * lib/xvasprintf.c (includes): Assume config.h.
1967         * lib/xasprintf.c (includes): Likewise.
1968
1969 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
1970
1971         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
1972         at least as wide as intmax_t.
1973
1974 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
1975
1976         (Imported from Automake.)
1977         * build-aux/gnupload: Update to version 1.1 of directive file.
1978
1979 2006-10-16  Eric Blake  <ebb9@byu.net>
1980
1981         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
1982         match Automake 1.10a.
1983
1984 2006-10-14  Bruno Haible  <bruno@clisp.org>
1985
1986         * modules/sigprocmask: New file.
1987         * lib/sigprocmask.h: New file.
1988         * lib/sigprocmask.c: New file.
1989         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
1990         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
1991         request sigprocmask.o.
1992         (gl_PREREQ_SIGPROCMASK): New macro.
1993         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
1994         (Depends-on): Add sigprocmask.
1995         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
1996         gt_SIGNALBLOCKING. Test for 'raise' only once.
1997         * lib/fatal-signal.c: Include sigprocmask.h.
1998         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
1999         unblock_fatal_signals): Define always.
2000         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2001         sigprocmask.
2002
2003 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
2004
2005         Sync from Automake.
2006         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
2007         which incorrectly sets the mode of an existing destination
2008         directory.  In some cases the unpatched install-sh could do the
2009         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
2010         system.  We hope this is rare in practice, but it's clearly worth
2011         fixing.  Problem reported by Alex Unleashed in
2012         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
2013         Also, don't bother to check for -m bugs unless we're using -m;
2014         suggested by Stepan Kasal.
2015
2016 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2017
2018         Sync from Automake.
2019         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
2020         `-c' flag, so they appear at the same position as in %FASTDEP%
2021         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
2022         which ignores unknown options only after the first non-option.
2023         Bug report against M4 by Nelson H. F. Beebe.
2024
2025 2006-10-13  Jim Meyering  <jim@meyering.net>
2026
2027         Fix a bug in yesterday's change.
2028         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
2029         p->fts_statp->st_dev would be used uninitialized.
2030         Ensures that we always call fts_stat on the very first entry.
2031         Miklos Szeredi reported that find -xdev stopped working.
2032
2033 2006-10-12  Bruno Haible  <bruno@clisp.org>
2034
2035         * gnulib-tool (func_get_automake_snippet): Append an automatically
2036         computed EXTRA_DIST augmentation.
2037         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
2038         * modules/alloca-opt (Makefile.am): Likewise.
2039         * modules/allocsa (Makefile.am): Likewise.
2040         * modules/arcfour (Makefile.am): Likewise.
2041         * modules/arctwo (Makefile.am): Likewise.
2042         * modules/argmatch (Makefile.am): Likewise.
2043         * modules/argz (Makefile.am): Likewise.
2044         * modules/atexit (Makefile.am): Likewise.
2045         * modules/backupfile (Makefile.am): Likewise.
2046         * modules/byteswap (Makefile.am): Likewise.
2047         * modules/c-strtod (Makefile.am): Likewise.
2048         * modules/c-strtold (Makefile.am): Likewise.
2049         * modules/calloc (Makefile.am): Likewise.
2050         * modules/canon-host (Makefile.am): Likewise.
2051         * modules/canonicalize (Makefile.am): Likewise.
2052         * modules/chdir-long (Makefile.am): Likewise.
2053         * modules/chdir-safer (Makefile.am): Likewise.
2054         * modules/check-version (Makefile.am): Likewise.
2055         * modules/chown (Makefile.am): Likewise.
2056         * modules/cloexec (Makefile.am): Likewise.
2057         * modules/close-stream (Makefile.am): Likewise.
2058         * modules/closeout (Makefile.am): Likewise.
2059         * modules/crc (Makefile.am): Likewise.
2060         * modules/csharpexec (Makefile.am): Likewise.
2061         * modules/cycle-check (Makefile.am): Likewise.
2062         * modules/des (Makefile.am): Likewise.
2063         * modules/dev-ino (Makefile.am): Likewise.
2064         * modules/dirfd (Makefile.am): Likewise.
2065         * modules/dirname (Makefile.am): Likewise.
2066         * modules/dup2 (Makefile.am): Likewise.
2067         * modules/eealloc (Makefile.am): Likewise.
2068         * modules/error (Makefile.am): Likewise.
2069         * modules/euidaccess (Makefile.am): Likewise.
2070         * modules/exclude (Makefile.am): Likewise.
2071         * modules/exitfail (Makefile.am): Likewise.
2072         * modules/fcntl-safer (Makefile.am): Likewise.
2073         * modules/fcntl (Makefile.am): Likewise.
2074         * modules/file-type (Makefile.am): Likewise.
2075         * modules/fileblocks (Makefile.am): Likewise.
2076         * modules/filemode (Makefile.am): Likewise.
2077         * modules/filenamecat (Makefile.am): Likewise.
2078         * modules/fnmatch (Makefile.am): Likewise.
2079         * modules/fopen-safer (Makefile.am): Likewise.
2080         * modules/fpending (Makefile.am): Likewise.
2081         * modules/fprintftime (Makefile.am): Likewise.
2082         * modules/free (Makefile.am): Likewise.
2083         * modules/fsusage (Makefile.am): Likewise.
2084         * modules/ftruncate (Makefile.am): Likewise.
2085         * modules/fts (Makefile.am): Likewise.
2086         * modules/gc-arcfour (Makefile.am): Likewise.
2087         * modules/gc-des (Makefile.am): Likewise.
2088         * modules/gc-hmac-md5 (Makefile.am): Likewise.
2089         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
2090         * modules/gc-md4 (Makefile.am): Likewise.
2091         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2092         * modules/gc-sha1 (Makefile.am): Likewise.
2093         * modules/gc (Makefile.am): Likewise.
2094         * modules/getaddrinfo (Makefile.am): Likewise.
2095         * modules/getcwd (Makefile.am): Likewise.
2096         * modules/getdelim (Makefile.am): Likewise.
2097         * modules/getdomainname (Makefile.am): Likewise.
2098         * modules/getgroups (Makefile.am): Likewise.
2099         * modules/gethostname (Makefile.am): Likewise.
2100         * modules/gethrxtime (Makefile.am): Likewise.
2101         * modules/getline (Makefile.am): Likewise.
2102         * modules/getloadavg (Makefile.am): Likewise.
2103         * modules/getlogin_r (Makefile.am): Likewise.
2104         * modules/getndelim2 (Makefile.am): Likewise.
2105         * modules/getopt (Makefile.am): Likewise.
2106         * modules/getpagesize (Makefile.am): Likewise.
2107         * modules/getpass-gnu (Makefile.am): Likewise.
2108         * modules/getpass (Makefile.am): Likewise.
2109         * modules/getsubopt (Makefile.am): Likewise.
2110         * modules/gettime (Makefile.am): Likewise.
2111         * modules/gettimeofday (Makefile.am): Likewise.
2112         * modules/getugroups (Makefile.am): Likewise.
2113         * modules/getusershell (Makefile.am): Likewise.
2114         * modules/glob (Makefile.am): Likewise.
2115         * modules/group-member (Makefile.am): Likewise.
2116         * modules/hard-locale (Makefile.am): Likewise.
2117         * modules/hash (Makefile.am): Likewise.
2118         * modules/hmac-md5 (Makefile.am): Likewise.
2119         * modules/hmac-sha1 (Makefile.am): Likewise.
2120         * modules/human (Makefile.am): Likewise.
2121         * modules/idcache (Makefile.am): Likewise.
2122         * modules/imaxabs (Makefile.am): Likewise.
2123         * modules/imaxdiv (Makefile.am): Likewise.
2124         * modules/inet_ntop (Makefile.am): Likewise.
2125         * modules/inet_pton (Makefile.am): Likewise.
2126         * modules/intprops (Makefile.am): Likewise.
2127         * modules/inttostr (Makefile.am): Likewise.
2128         * modules/inttypes (Makefile.am): Likewise.
2129         * modules/isapipe (Makefile.am): Likewise.
2130         * modules/javaversion (Makefile.am): Likewise.
2131         * modules/lchmod (Makefile.am): Likewise.
2132         * modules/lchown (Makefile.am): Likewise.
2133         * modules/localcharset (Makefile.am): Likewise.
2134         * modules/long-options (Makefile.am): Likewise.
2135         * modules/lstat (Makefile.am): Likewise.
2136         * modules/malloc (Makefile.am): Likewise.
2137         * modules/mathl (Makefile.am): Likewise.
2138         * modules/mbchar (Makefile.am): Likewise.
2139         * modules/md2 (Makefile.am): Likewise.
2140         * modules/md4 (Makefile.am): Likewise.
2141         * modules/md5 (Makefile.am): Likewise.
2142         * modules/memcasecmp (Makefile.am): Likewise.
2143         * modules/memchr (Makefile.am): Likewise.
2144         * modules/memcmp (Makefile.am): Likewise.
2145         * modules/memcoll (Makefile.am): Likewise.
2146         * modules/memcpy (Makefile.am): Likewise.
2147         * modules/memmem (Makefile.am): Likewise.
2148         * modules/memmove (Makefile.am): Likewise.
2149         * modules/mempcpy (Makefile.am): Likewise.
2150         * modules/memrchr (Makefile.am): Likewise.
2151         * modules/memset (Makefile.am): Likewise.
2152         * modules/memxor (Makefile.am): Likewise.
2153         * modules/mkancesdirs (Makefile.am): Likewise.
2154         * modules/mkdir-p (Makefile.am): Likewise.
2155         * modules/mkdir (Makefile.am): Likewise.
2156         * modules/mkdtemp (Makefile.am): Likewise.
2157         * modules/mkstemp (Makefile.am): Likewise.
2158         * modules/mktime (Makefile.am): Likewise.
2159         * modules/modechange (Makefile.am): Likewise.
2160         * modules/mountlist (Makefile.am): Likewise.
2161         * modules/nanosleep (Makefile.am): Likewise.
2162         * modules/obstack (Makefile.am): Likewise.
2163         * modules/openat (Makefile.am): Likewise.
2164         * modules/pagealign_alloc (Makefile.am): Likewise.
2165         * modules/pathmax (Makefile.am): Likewise.
2166         * modules/physmem (Makefile.am): Likewise.
2167         * modules/poll (Makefile.am): Likewise.
2168         * modules/posixtm (Makefile.am): Likewise.
2169         * modules/posixver (Makefile.am): Likewise.
2170         * modules/putenv (Makefile.am): Likewise.
2171         * modules/quote (Makefile.am): Likewise.
2172         * modules/quotearg (Makefile.am): Likewise.
2173         * modules/raise (Makefile.am): Likewise.
2174         * modules/read-file (Makefile.am): Likewise.
2175         * modules/readline (Makefile.am): Likewise.
2176         * modules/readlink (Makefile.am): Likewise.
2177         * modules/readtokens (Makefile.am): Likewise.
2178         * modules/readutmp (Makefile.am): Likewise.
2179         * modules/realloc (Makefile.am): Likewise.
2180         * modules/regex (Makefile.am): Likewise.
2181         * modules/rename-dest-slash (Makefile.am): Likewise.
2182         * modules/rename (Makefile.am): Likewise.
2183         * modules/rijndael (Makefile.am): Likewise.
2184         * modules/rmdir (Makefile.am): Likewise.
2185         * modules/rpmatch (Makefile.am): Likewise.
2186         * modules/safe-read (Makefile.am): Likewise.
2187         * modules/safe-write (Makefile.am): Likewise.
2188         * modules/same-inode (Makefile.am): Likewise.
2189         * modules/same (Makefile.am): Likewise.
2190         * modules/save-cwd (Makefile.am): Likewise.
2191         * modules/savedir (Makefile.am): Likewise.
2192         * modules/setenv (Makefile.am): Likewise.
2193         * modules/settime (Makefile.am): Likewise.
2194         * modules/sha1 (Makefile.am): Likewise.
2195         * modules/sig2str (Makefile.am): Likewise.
2196         * modules/snprintf (Makefile.am): Likewise.
2197         * modules/stat-macros (Makefile.am): Likewise.
2198         * modules/stat-time (Makefile.am): Likewise.
2199         * modules/stdbool (Makefile.am): Likewise.
2200         * modules/stdint (Makefile.am): Likewise.
2201         * modules/stdlib-safer (Makefile.am): Likewise.
2202         * modules/stpcpy (Makefile.am): Likewise.
2203         * modules/stpncpy (Makefile.am): Likewise.
2204         * modules/strcase (Makefile.am): Likewise.
2205         * modules/strcasestr (Makefile.am): Likewise.
2206         * modules/strchrnul (Makefile.am): Likewise.
2207         * modules/strcspn (Makefile.am): Likewise.
2208         * modules/strdup (Makefile.am): Likewise.
2209         * modules/strerror (Makefile.am): Likewise.
2210         * modules/strftime (Makefile.am): Likewise.
2211         * modules/strndup (Makefile.am): Likewise.
2212         * modules/strnlen (Makefile.am): Likewise.
2213         * modules/strpbrk (Makefile.am): Likewise.
2214         * modules/strsep (Makefile.am): Likewise.
2215         * modules/strstr (Makefile.am): Likewise.
2216         * modules/strtod (Makefile.am): Likewise.
2217         * modules/strtoimax (Makefile.am): Likewise.
2218         * modules/strtok_r (Makefile.am): Likewise.
2219         * modules/strtol (Makefile.am): Likewise.
2220         * modules/strtoll (Makefile.am): Likewise.
2221         * modules/strtoul (Makefile.am): Likewise.
2222         * modules/strtoull (Makefile.am): Likewise.
2223         * modules/strtoumax (Makefile.am): Likewise.
2224         * modules/strverscmp (Makefile.am): Likewise.
2225         * modules/sys_socket (Makefile.am): Likewise.
2226         * modules/sys_stat (Makefile.am): Likewise.
2227         * modules/sysexits (Makefile.am): Likewise.
2228         * modules/time_r (Makefile.am): Likewise.
2229         * modules/timegm (Makefile.am): Likewise.
2230         * modules/timespec (Makefile.am): Likewise.
2231         * modules/tmpfile-safer (Makefile.am): Likewise.
2232         * modules/trim (Makefile.am): Likewise.
2233         * modules/unistd-safer (Makefile.am): Likewise.
2234         * modules/unlinkdir (Makefile.am): Likewise.
2235         * modules/unlocked-io (Makefile.am): Likewise.
2236         * modules/userspec (Makefile.am): Likewise.
2237         * modules/utime (Makefile.am): Likewise.
2238         * modules/utimecmp (Makefile.am): Likewise.
2239         * modules/utimens (Makefile.am): Likewise.
2240         * modules/vasnprintf (Makefile.am): Likewise.
2241         * modules/vasprintf (Makefile.am): Likewise.
2242         * modules/vsnprintf (Makefile.am): Likewise.
2243         * modules/xalloc (Makefile.am): Likewise.
2244         * modules/xgetcwd (Makefile.am): Likewise.
2245         * modules/xnanosleep (Makefile.am): Likewise.
2246         * modules/xreadlink (Makefile.am): Likewise.
2247         * modules/xstrtod (Makefile.am): Likewise.
2248         * modules/xstrtol (Makefile.am): Likewise.
2249         * modules/xstrtold (Makefile.am): Likewise.
2250         * modules/yesno (Makefile.am): Likewise.
2251         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
2252
2253 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2254
2255         * modules/error (Makefile.am): Distribute files through
2256         EXTRA_DIST, not lib_SOURCES.
2257
2258 2006-10-12  Eric Blake  <ebb9@byu.net>
2259
2260         * modules/error (Makefile.am): Distribute files in /lib.
2261         * modules/obstack (Makefile.am): Likewise.
2262
2263 2006-10-12  Bruno Haible  <bruno@clisp.org>
2264
2265         * modules/acl (Makefile.am): Distribute all files in lib/ through
2266         EXTRA_DIST.
2267         * modules/arcfour (Makefile.am): Likewise.
2268         * modules/arctwo (Makefile.am): Likewise.
2269         * modules/argmatch (Makefile.am): Likewise.
2270         * modules/argz (Makefile.am): Likewise.
2271         * modules/atexit (Makefile.am): Likewise.
2272         * modules/backupfile (Makefile.am): Likewise.
2273         * modules/c-strtod (Makefile.am): Likewise.
2274         * modules/c-strtold (Makefile.am): Likewise.
2275         * modules/calloc (Makefile.am): Likewise.
2276         * modules/canon-host (Makefile.am): Likewise.
2277         * modules/canonicalize (Makefile.am): Likewise.
2278         * modules/chdir-long (Makefile.am): Likewise.
2279         * modules/chdir-safer (Makefile.am): Likewise.
2280         * modules/check-version (Makefile.am): Likewise.
2281         * modules/chown (Makefile.am): Likewise.
2282         * modules/cloexec (Makefile.am): Likewise.
2283         * modules/close-stream (Makefile.am): Likewise.
2284         * modules/closeout (Makefile.am): Likewise.
2285         * modules/crc (Makefile.am): Likewise.
2286         * modules/cycle-check (Makefile.am): Likewise.
2287         * modules/des (Makefile.am): Likewise.
2288         * modules/dirfd (Makefile.am): Likewise.
2289         * modules/dirname (Makefile.am): Likewise.
2290         * modules/dup2 (Makefile.am): Likewise.
2291         * modules/euidaccess (Makefile.am): Likewise.
2292         * modules/exclude (Makefile.am): Likewise.
2293         * modules/exitfail (Makefile.am): Likewise.
2294         * modules/fcntl-safer (Makefile.am): Likewise.
2295         * modules/file-type (Makefile.am): Likewise.
2296         * modules/fileblocks (Makefile.am): Likewise.
2297         * modules/filemode (Makefile.am): Likewise.
2298         * modules/filenamecat (Makefile.am): Likewise.
2299         * modules/fnmatch (Makefile.am): Likewise.
2300         * modules/fopen-safer (Makefile.am): Likewise.
2301         * modules/fpending (Makefile.am): Likewise.
2302         * modules/fprintftime (Makefile.am): Likewise.
2303         * modules/free (Makefile.am): Likewise.
2304         * modules/fsusage (Makefile.am): Likewise.
2305         * modules/ftruncate (Makefile.am): Likewise.
2306         * modules/fts (Makefile.am): Likewise.
2307         * modules/gc (Makefile.am): Likewise.
2308         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2309         * modules/getaddrinfo (Makefile.am): Likewise.
2310         * modules/getcwd (Makefile.am): Likewise.
2311         * modules/getdelim (Makefile.am): Likewise.
2312         * modules/getdomainname (Makefile.am): Likewise.
2313         * modules/getgroups (Makefile.am): Likewise.
2314         * modules/gethostname (Makefile.am): Likewise.
2315         * modules/gethrxtime (Makefile.am): Likewise.
2316         * modules/getline (Makefile.am): Likewise.
2317         * modules/getloadavg (Makefile.am): Likewise.
2318         * modules/getlogin_r (Makefile.am): Likewise.
2319         * modules/getopt (Makefile.am): Likewise.
2320         * modules/getpass (Makefile.am): Likewise.
2321         * modules/getpass-gnu (Makefile.am): Likewise.
2322         * modules/getsubopt (Makefile.am): Likewise.
2323         * modules/gettime (Makefile.am): Likewise.
2324         * modules/gettimeofday (Makefile.am): Likewise.
2325         * modules/getugroups (Makefile.am): Likewise.
2326         * modules/getusershell (Makefile.am): Likewise.
2327         * modules/glob (Makefile.am): Likewise.
2328         * modules/group-member (Makefile.am): Likewise.
2329         * modules/hard-locale (Makefile.am): Likewise.
2330         * modules/hash (Makefile.am): Likewise.
2331         * modules/hmac-md5 (Makefile.am): Likewise.
2332         * modules/hmac-sha1 (Makefile.am): Likewise.
2333         * modules/human (Makefile.am): Likewise.
2334         * modules/idcache (Makefile.am): Likewise.
2335         * modules/imaxabs (Makefile.am): Likewise.
2336         * modules/imaxdiv (Makefile.am): Likewise.
2337         * modules/inet_ntop (Makefile.am): Likewise.
2338         * modules/inet_pton (Makefile.am): Likewise.
2339         * modules/inttostr (Makefile.am): Likewise.
2340         * modules/isapipe (Makefile.am): Likewise.
2341         * modules/lchown (Makefile.am): Likewise.
2342         * modules/long-options (Makefile.am): Likewise.
2343         * modules/lstat (Makefile.am): Likewise.
2344         * modules/malloc (Makefile.am): Likewise.
2345         * modules/mathl (Makefile.am): Likewise.
2346         * modules/mbchar (Makefile.am): Likewise.
2347         * modules/md2 (Makefile.am): Likewise.
2348         * modules/md4 (Makefile.am): Likewise.
2349         * modules/md5 (Makefile.am): Likewise.
2350         * modules/memcasecmp (Makefile.am): Likewise.
2351         * modules/memchr (Makefile.am): Likewise.
2352         * modules/memcmp (Makefile.am): Likewise.
2353         * modules/memcoll (Makefile.am): Likewise.
2354         * modules/memcpy (Makefile.am): Likewise.
2355         * modules/memmem (Makefile.am): Likewise.
2356         * modules/memmove (Makefile.am): Likewise.
2357         * modules/mempcpy (Makefile.am): Likewise.
2358         * modules/memrchr (Makefile.am): Likewise.
2359         * modules/memset (Makefile.am): Likewise.
2360         * modules/memxor (Makefile.am): Likewise.
2361         * modules/mkancesdirs (Makefile.am): Likewise.
2362         * modules/mkdir (Makefile.am): Likewise.
2363         * modules/mkdir-p (Makefile.am): Likewise.
2364         * modules/mkdtemp (Makefile.am): Likewise.
2365         * modules/mkstemp (Makefile.am): Likewise.
2366         * modules/mktime (Makefile.am): Likewise.
2367         * modules/modechange (Makefile.am): Likewise.
2368         * modules/mountlist (Makefile.am): Likewise.
2369         * modules/nanosleep (Makefile.am): Likewise.
2370         * modules/openat (Makefile.am): Likewise.
2371         * modules/pagealign_alloc (Makefile.am): Likewise.
2372         * modules/physmem (Makefile.am): Likewise.
2373         * modules/poll (Makefile.am): Likewise.
2374         * modules/posixtm (Makefile.am): Likewise.
2375         * modules/posixver (Makefile.am): Likewise.
2376         * modules/putenv (Makefile.am): Likewise.
2377         * modules/quote (Makefile.am): Likewise.
2378         * modules/quotearg (Makefile.am): Likewise.
2379         * modules/raise (Makefile.am): Likewise.
2380         * modules/read-file (Makefile.am): Likewise.
2381         * modules/readline (Makefile.am): Likewise.
2382         * modules/readlink (Makefile.am): Likewise.
2383         * modules/readtokens (Makefile.am): Likewise.
2384         * modules/readutmp (Makefile.am): Likewise.
2385         * modules/realloc (Makefile.am): Likewise.
2386         * modules/regex (Makefile.am): Likewise.
2387         * modules/rename (Makefile.am): Likewise.
2388         * modules/rename-dest-slash (Makefile.am): Likewise.
2389         * modules/rijndael (Makefile.am): Likewise.
2390         * modules/rmdir (Makefile.am): Likewise.
2391         * modules/rpmatch (Makefile.am): Likewise.
2392         * modules/safe-read (Makefile.am): Likewise.
2393         * modules/safe-write (Makefile.am): Likewise.
2394         * modules/same (Makefile.am): Likewise.
2395         * modules/save-cwd (Makefile.am): Likewise.
2396         * modules/savedir (Makefile.am): Likewise.
2397         * modules/setenv (Makefile.am): Likewise.
2398         * modules/settime (Makefile.am): Likewise.
2399         * modules/sha1 (Makefile.am): Likewise.
2400         * modules/sig2str (Makefile.am): Likewise.
2401         * modules/snprintf (Makefile.am): Likewise.
2402         * modules/stdlib-safer (Makefile.am): Likewise.
2403         * modules/stpcpy (Makefile.am): Likewise.
2404         * modules/stpncpy (Makefile.am): Likewise.
2405         * modules/strcase (Makefile.am): Likewise.
2406         * modules/strcasestr (Makefile.am): Likewise.
2407         * modules/strchrnul (Makefile.am): Likewise.
2408         * modules/strcspn (Makefile.am): Likewise.
2409         * modules/strdup (Makefile.am): Likewise.
2410         * modules/strerror (Makefile.am): Likewise.
2411         * modules/strftime (Makefile.am): Likewise.
2412         * modules/strndup (Makefile.am): Likewise.
2413         * modules/strnlen (Makefile.am): Likewise.
2414         * modules/strpbrk (Makefile.am): Likewise.
2415         * modules/strsep (Makefile.am): Likewise.
2416         * modules/strstr (Makefile.am): Likewise.
2417         * modules/strtod (Makefile.am): Likewise.
2418         * modules/strtoimax (Makefile.am): Likewise.
2419         * modules/strtok_r (Makefile.am): Likewise.
2420         * modules/strtol (Makefile.am): Likewise.
2421         * modules/strtoll (Makefile.am): Likewise.
2422         * modules/strtoul (Makefile.am): Likewise.
2423         * modules/strtoull (Makefile.am): Likewise.
2424         * modules/strtoumax (Makefile.am): Likewise.
2425         * modules/strverscmp (Makefile.am): Likewise.
2426         * modules/time_r (Makefile.am): Likewise.
2427         * modules/timegm (Makefile.am): Likewise.
2428         * modules/tmpfile-safer (Makefile.am): Likewise.
2429         * modules/unistd-safer (Makefile.am): Likewise.
2430         * modules/unlinkdir (Makefile.am): Likewise.
2431         * modules/userspec (Makefile.am): Likewise.
2432         * modules/utime (Makefile.am): Likewise.
2433         * modules/utimecmp (Makefile.am): Likewise.
2434         * modules/utimens (Makefile.am): Likewise.
2435         * modules/vasnprintf (Makefile.am): Likewise.
2436         * modules/vasprintf (Makefile.am): Likewise.
2437         * modules/vsnprintf (Makefile.am): Likewise.
2438         * modules/xalloc (Makefile.am): Likewise.
2439         * modules/xgetcwd (Makefile.am): Likewise.
2440         * modules/xnanosleep (Makefile.am): Likewise.
2441         * modules/xreadlink (Makefile.am): Likewise.
2442         * modules/xstrtod (Makefile.am): Likewise.
2443         * modules/xstrtol (Makefile.am): Likewise.
2444         * modules/xstrtold (Makefile.am): Likewise.
2445         * modules/yesno (Makefile.am): Likewise.
2446
2447 2006-10-12  Jim Meyering  <jim@meyering.net>
2448
2449         * m4/getloadavg.m4: Revert the change below.
2450
2451         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
2452         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
2453         fail with a symlink, which is what coreutils' ./bootstrap now
2454         creates by default.
2455
2456 2006-10-12  Bruno Haible  <bruno@clisp.org>
2457
2458         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
2459         mingw.
2460         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
2461         MSVC and mingw explicitly.
2462
2463 2006-10-11  Simon Josefsson  <jas@extundo.com>
2464             Bruno Haible  <bruno@clisp.org>
2465
2466         Add support for multiple gnulib-tool invocations in the scope of a
2467         single configure.ac file.
2468         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
2469         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
2470         with the same contents as the _LIBADD variable.
2471         (func_emit_initmacro_start, func_emit_initmacro_end,
2472         func_emit_initmacro_done): New functions.
2473         (func_import, func_create_testdir): Invoke them. Allow the identifiers
2474         gl_LIBOBJS and gl_LTLIBOBJS.
2475
2476 2006-10-11  Bruno Haible  <bruno@clisp.org>
2477
2478         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
2479         (func_create_testdir): Don't create po/Makefile.am, don't invoke
2480         autoreconf. Instead, invoke autopoint explicitly but move back the
2481         *.m4 files from gnulib.
2482
2483 2006-10-11  Bruno Haible  <bruno@clisp.org>
2484
2485         * gnulib-tool (func_usage): Make module names after --create-testdir
2486         optional.
2487         (func_create_testdir): If no module was specified, use nearly all
2488         modules.
2489
2490 2006-10-12  Jim Meyering  <jim@meyering.net>
2491
2492         Big performance improvement for fts-based tools that use FTS_NOSTAT.
2493         Avoid spurious inode-mismatch problems on non-POSIX file systems.
2494         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
2495         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
2496         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
2497         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
2498         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
2499         (fts_set_stat_required): New function.
2500         (fts_open): Defer the calls to fts_stat, if possible or requested.
2501         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
2502         into fts_stat itself.
2503         (fts_read): Perform any required (deferred) fts_stat call.
2504         (fts_build): Likewise, for the directory we're about to open and read.
2505         In the readdir loop, carefully decide whether each entry will require
2506         an eventual call to fts_stat, using dirent.d_type info if available.
2507         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
2508         a command line argument into this function.  Update all callers.
2509         Map a return value of FTS_DOT to FTS_D for a command line argument.
2510         * modules/fts (Depends-on): Add d-type.  Alphabetize.
2511         Thanks to Miklos Szeredi for his tenacity and for the initial
2512         bug report about "find" failing on a FUSE-based file system.
2513
2514         * lib/fts.c (fts_open): Use consistent indentation.
2515
2516 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2517
2518         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
2519         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
2520         reported by Jim Meyering.  All uses of cache variables renamed
2521         to match Autoconf's.
2522         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
2523         the other one.
2524
2525         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
2526         Fix misspelling in diagnostic.
2527
2528 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2529
2530         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
2531         defined.  Problem reported by Matthew Woehlke.
2532
2533         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
2534         Add support for Tandem NonStop R series.
2535         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
2536         Use new macro.
2537
2538         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
2539         (has_trailing_slash): Omit size arg; all callers changed.
2540         Omit 'inline', since it doesn't help performance and we'd
2541         need to configure it.
2542         Don't count //, ///, etc. as having a trailing slash.
2543         As a side effect, this removes a C99ism reported by Matthew Woehlke.
2544         (rpl_rename_dest_slash): On failure, use rename's errno rather
2545         than (in some cases) an incorrect or junk errno.
2546         Simplify code by removing need to compute length; this does
2547         cause it to make two passes instead of one over the file name,
2548         but it's worth it.
2549
2550         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
2551         change, since Autoconf's version may no longer be appropriate now
2552         that we are using CVS Autoconf's version.  Add support for Tandem.
2553
2554 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2555             Bruno Haible  <bruno@clisp.org>
2556
2557         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
2558         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
2559         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
2560         gl_AC_TYPE_LONG_LONG.
2561
2562         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
2563         instead of HAVE_LONG_LONG.
2564         * lib/printf-args.c (printf_fetchargs): Likewise.
2565         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
2566         * lib/vasnprintf.c (VASNPRINTF): Likewise.
2567         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
2568         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
2569         gl_AC_TYPE_LONG_LONG.
2570
2571 2006-10-11  Bruno Haible  <bruno@clisp.org>
2572
2573         * m4/longlong.m4: Add comments.
2574         * m4/ulonglong.m4: Likewise.
2575
2576 2006-10-10  Bruno Haible  <bruno@clisp.org>
2577
2578         Make it possible to #define stpcpy, strdup to aliases.
2579         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
2580         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
2581
2582 2006-10-10  Bruno Haible  <bruno@clisp.org>
2583
2584         Make it possible to #define gcd to an alias.
2585         * lib/gcd.c: Include config.h.
2586
2587 2006-10-10  Bruno Haible  <bruno@clisp.org>
2588
2589         Make it possible to #define c_isascii to an alias.
2590         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
2591         defined. Undefine the macros before defining them, to avoid gcc
2592         warnings.
2593         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
2594         define NO_C_CTYPE_MACROS early.
2595
2596 2006-10-10  Bruno Haible  <bruno@clisp.org>
2597
2598         Make it possible to #define set_program_name to an alias.
2599         * lib/progname.c: Don't undefine set_program_name; instead, undefine
2600         ENABLE_RELOCATABLE early.
2601
2602 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
2603
2604         Port to Tandem NSK OSS, which has 64-bit signed int but at most
2605         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
2606         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
2607         More generally, don't assume that 64-bit signed int is available
2608         if unsigned int is, and vice versa.
2609         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
2610         unsigned symbols, not on their signed counterparts.
2611         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
2612         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
2613         (UINT64_C, UINTMAX_C):
2614         Likewise.
2615         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
2616         unsigned counterparts.
2617         (Have_long_long, Unsigned): New macros.
2618         (Int): Renamed from INT.
2619         (strtoimax): Use the new macros.
2620         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
2621         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
2622         * modules/inttypes (inttypes.h): Substitute
2623         HAVE_UNSIGNED_LONG_LONG_INT.
2624         * modules/stdint (stdint.h): Likewise.
2625         (Files): Add m4/ulonglong.m4.
2626
2627 2006-10-10  Bruno Haible  <bruno@clisp.org>
2628
2629         Fix a gcc -Wshadow warning.
2630         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
2631         to 'bucket'.
2632         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
2633         gl_linked_indexof_from_to): Likewise.
2634         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
2635         Likewise.
2636         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
2637         Likewise.
2638         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
2639         Reported by Eric Blake.
2640
2641 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
2642
2643         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
2644         for NetBSD.  Problem reported by Bruno Haible.
2645
2646 2006-10-09  Jim Meyering  <jim@meyering.net>
2647
2648         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
2649         Patch from Bruno Haible.
2650
2651 2006-10-09  Jim Meyering  <jim@meyering.net>
2652
2653         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
2654         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
2655         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
2656
2657 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2658
2659         Don't include <config.h> twice; this doesn't work in some cases,
2660         e.g., when config.h has "#define intmax_t long long int" and
2661         we include <config.h>, <inttypes.h>, <config.h> in that order.
2662         Problem reported by Matthew Woehlke in:
2663         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
2664         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
2665         * lib/fts-cycle.c: Don't include config.h.
2666         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
2667         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
2668         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
2669         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
2670         inttypes.h.
2671         * lib/xstrtoumax.c: Likewise.
2672         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
2673         __strtol and the like, so that this module is more like its siblings.
2674         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
2675         Remove; no longer needed now that we assume gnulib inttypes.h.
2676
2677 2006-10-08  Bruno Haible  <bruno@clisp.org>
2678
2679         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
2680         option.
2681
2682 2006-10-07  Jim Meyering  <jim@meyering.net>
2683
2684         * modules/inttypes (inttypes.h): Revert what seems to have been
2685         an inadvertent part of today's change: use "|", not "/" in the
2686         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
2687
2688 2006-10-07  Bruno Haible  <bruno@clisp.org>
2689
2690         * modules/sublist: New file.
2691
2692 2006-10-07  Bruno Haible  <bruno@clisp.org>
2693
2694         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
2695         * modules/argz (argz.h): Likewise.
2696         * modules/arpa_inet (arpa/inet.h): Likewise.
2697         * modules/byteswap (byteswap.h): Likewise.
2698         * modules/configmake (configmake.h): Likewise.
2699         * modules/fcntl (fcntl.h): Likewise.
2700         * modules/fnmatch (fnmatch.h): Likewise.
2701         * modules/getopt (getopt.h): Likewise.
2702         * modules/glob (glob.h): Likewise.
2703         * modules/inttypes (inttypes.h): Likewise.
2704         * modules/netinet_in (netinet/in.h): Likewise.
2705         * modules/poll (poll.h): Likewise.
2706         * modules/stdbool (stdbool.h): Likewise.
2707         * modules/stdint (stdint.h): Likewise.
2708         * modules/sys_select (sys/select.h): Likewise.
2709         * modules/sys_socket (sys/socket.h): Likewise.
2710         * modules/sys_stat (sys/stat.h): Likewise.
2711         * modules/sysexits (sysexits.h): Likewise.
2712         * modules/unistd (unistd.h): Likewise.
2713         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2714         Add a "DO NOT EDIT" comment to the generated file.
2715         (func_import): Likewise for gnulib-comp.m4.
2716
2717 2006-10-07  Bruno Haible  <bruno@clisp.org>
2718
2719         * lib/gl_sublist.h: New file.
2720         * lib/gl_sublist.c: New file.
2721
2722 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
2723
2724         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
2725         name (relative to the original working directory) and the file
2726         name component (relative to the temporary working directory).  All
2727         callers changed.
2728         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
2729         * lib/mkdir-p.c (make_dir_parents): Likewise.
2730         * lib/mkdir-p.h (make_dir_parents): Likewise.
2731
2732 2006-10-06  Eric Blake  <ebb9@byu.net>
2733
2734         Define several macros for use by the clean-temp module.
2735         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
2736         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
2737         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
2738
2739         * lib/clean-temp.h (close_stream_temp): New declaration.
2740         * lib/clean-temp.c (includes): Pull in headers according to what
2741         other modules are in use.
2742         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
2743
2744 2006-10-06  Bruno Haible  <bruno@clisp.org>
2745
2746         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
2747         instead of fopen, fwriteerror.
2748
2749 2006-10-06  Bruno Haible  <bruno@clisp.org>
2750
2751         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
2752         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
2753         int.
2754         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
2755         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
2756         Return an error indicator.
2757         Suggested by Eric Blake.
2758
2759 2006-10-06  Bruno Haible  <bruno@clisp.org>
2760
2761         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
2762         Reported by Eric Blake.
2763
2764 2006-10-06  Bruno Haible  <bruno@clisp.org>
2765
2766         * modules/closeout (Description): Mention stderr too.
2767
2768 2006-10-06  Bruno Haible  <bruno@clisp.org>
2769         and Paul Eggert  <eggert@cs.ucla.edu>
2770
2771         * lib/closeout.c (close_stdout): Also close stderr.
2772         * lib/closeout.h: Update comment.
2773
2774 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
2775
2776         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
2777         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
2778         * lib/dirchownmod.c: Include lchown.h.
2779         * lib/lchown.c: Don't include files that lchown.h now includes.
2780         Don't declare chown, since lchown.h now does that.
2781         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
2782         (lchown): Define to rpl_chown if lchown is declared but
2783         does not exist.  Declare using a prototype if lchown is not
2784         declared.  Add a copyright notice.
2785         * lib/mkstemp.h: Include <unistd.h>.
2786         * lib/openat.c: Include lchown.h.
2787
2788         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
2789         we now test for that separately.
2790         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
2791         rather than O_NOFOLLOW, when testing whether it's possible to
2792         avoid a race condition reliably.
2793         * lib/savewd.c (savewd_chdir): Likewise.
2794
2795         Remove macros that are no longer needed now that stdint.h is
2796         reliable.
2797         * lib/fsusage.c (UINTMAX_MAX): Remove.
2798         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
2799         * lib/utimecmp.c (SIZE_MAX): Remove.
2800
2801         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
2802
2803         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
2804         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
2805         O_NOATIME works.
2806
2807 2006-10-05  Bruno Haible  <bruno@clisp.org>
2808
2809         * lib/gl_list.h (gl_sortedlist_search_from_to,
2810         gl_sortedlist_indexof_from_to): New declarations.
2811         (gl_list_implementation): New fields sortedlist_search_from_to,
2812         sortedlist_indexof_from_to.
2813         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
2814         inline functions.
2815         * lib/gl_list.c (gl_sortedlist_search_from_to,
2816         gl_sortedlist_indexof_from_to): New functions.
2817         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
2818         function.
2819         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
2820         (gl_array_sortedlist_search_from_to): New function.
2821         (gl_array_list_implementation): Update.
2822         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
2823         function.
2824         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
2825         (gl_carray_sortedlist_search_from_to): New function.
2826         (gl_carray_list_implementation): Update.
2827         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
2828         gl_linked_sortedlist_indexof_from_to): New functions.
2829         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2830         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2831         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
2832         gl_tree_sortedlist_indexof_from_to): New functions.
2833         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2834         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2835         Update.
2836         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2837         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
2838         Update.
2839
2840 2006-10-05  Bruno Haible  <bruno@clisp.org>
2841
2842         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
2843         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
2844         (struct gl_list_implementation): Add fields search_from_to,
2845         indexof_from_to. Remove fields search, indexof.
2846         (gl_list_search): Use the search_from_to method.
2847         (gl_list_search_from, gl_list_search_from_to): New functions.
2848         (gl_list_indexof): Use the indexof_from_to method.
2849         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2850         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
2851         (gl_list_search_from, gl_list_search_from_to): New functions.
2852         (gl_list_indexof): Use the indexof_from_to method.
2853         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2854         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
2855         gl_array_indexof. Add start_index, end_index arguments.
2856         (gl_array_search_from_to): Renamed from gl_array_search. Add
2857         start_index, end_index arguments.
2858         (gl_array_remove, gl_array_list_implementation): Update.
2859         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
2860         gl_carray_indexof. Add start_index, end_index arguments.
2861         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
2862         start_index, end_index arguments.
2863         (gl_carray_remove, gl_carray_list_implementation): Update.
2864         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
2865         gl_linked_search. Add start_index, end_index arguments.
2866         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
2867         start_index, end_index arguments.
2868         (gl_linked_remove): Update.
2869         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2870         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2871         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
2872         field to 'size_t'.
2873         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
2874         gl_tree_search. Add start_index, end_index arguments.
2875         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2876         start_index, end_index arguments.
2877         (gl_tree_remove): Update.
2878         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2879         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2880         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
2881         function.
2882         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
2883         gl_tree_search. Add start_index, end_index arguments.
2884         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2885         start_index, end_index arguments.
2886         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2887         Update.
2888         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
2889
2890 2006-10-05  Bruno Haible  <bruno@clisp.org>
2891
2892         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
2893
2894         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
2895         fwriteerror_temp): New declarations.
2896         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
2897         (descriptors): New variable.
2898         (cleanup): First, close the descriptors.
2899         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
2900         fclose_temp, fwriteerror_temp): New functions.
2901
2902 2006-10-04  Jim Meyering  <jim@meyering.net>
2903
2904         * lib/fts.c (fts_open): Tiny comment change.
2905
2906 2006-10-04  Bruno Haible  <bruno@clisp.org>
2907
2908         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
2909         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
2910         gl_LOCK_BODY.
2911         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
2912         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
2913         gl_LOCK_EARLY_BODY.
2914         (gl_LOCK): Require gl_LOCK_BODY.
2915
2916 2006-10-04  Bruno Haible  <bruno@clisp.org>
2917
2918         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
2919         (gl_oset_search_atleast): New declaration.
2920         (struct gl_oset_implementation): Add field 'search_atleast'.
2921         (gl_oset_search_atleast): New inline function.
2922         * lib/gl_oset.c (gl_oset_search_atleast): New function.
2923         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
2924         (gl_array_oset_implementation): Update.
2925         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
2926         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
2927         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
2928
2929 2006-10-04  Bruno Haible  <bruno@clisp.org>
2930
2931         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
2932
2933 2006-10-03  Bruno Haible  <bruno@clisp.org>
2934
2935         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
2936         from gl_avltreehash_list_implementation.
2937
2938 2006-10-03  Bruno Haible  <bruno@clisp.org>
2939
2940         * lib/gl_oset.c (gl_oset_add): Fix return type.
2941
2942 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
2943
2944         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
2945
2946 2006-10-02  Eric Blake  <ebb9@byu.net>
2947
2948         * modules/strnlen (Depends-on): Add extensions.
2949
2950 2006-10-02  Eric Blake  <ebb9@byu.net>
2951
2952         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
2953         definition in 2.60+.
2954
2955 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
2956
2957         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
2958         checks.
2959
2960 2006-10-02  Bruno Haible  <bruno@clisp.org>
2961
2962         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
2963         to the AUTOMAKE_OPTIONS.
2964         Reported by Jim Meyering.
2965
2966 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
2967
2968         Work around bug in Solaris 10 /proc file system:
2969         /proc/self/fd/NNN/.. isn't the parent directory of
2970         the directory whose file descriptor is NNN.  This needs to
2971         be worked around at run time, not compile time, since a
2972         program might be built on Solaris 8, where things work, and
2973         run on Solaris 10.
2974         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
2975         to use the following interface instead:
2976         (OPENAT_BUFFER_SIZE): New macro.
2977         (openat_proc_name): New function.
2978         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
2979         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
2980         Likewise.
2981         * lib/openat-proc.c: New file.
2982         * modules/openat (Files): Add lib/openat-proc.c.
2983         (Depends-on): Add same-inode, stdbool.
2984         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
2985
2986 2006-09-29  Bruno Haible  <bruno@clisp.org>
2987
2988         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
2989         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
2990         argument. Set stdout_closed before testing for ferror, not after.
2991         (fwriteerror, fwriteerror_no_ebadf): New functions.
2992
2993 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2994
2995         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
2996
2997 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
2998
2999         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
3000         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
3001
3002 2006-09-28  Jim Meyering  <jim@meyering.net>
3003
3004         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
3005         Include <unistd.h>.
3006
3007 2006-09-28  Bruno Haible  <bruno@clisp.org>
3008
3009         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
3010         * modules/linkedhash-list (Depends-on): Likewise.
3011         * modules/rbtreehash-list (Depends-on): Likewise.
3012
3013 2006-09-28  Bruno Haible  <bruno@clisp.org>
3014
3015         * lib/strndup.h: Simplify the redefinition of strndup.
3016         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
3017         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
3018
3019 2006-09-28  Bruno Haible  <bruno@clisp.org>
3020
3021         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
3022         * lib/gl_linkedhash_list.c: Likewise.
3023         * lib/gl_rbtreehash_list.c: Likewise.
3024
3025 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
3026
3027         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
3028         getaddrinfo.
3029
3030         * lib/__fpending.h: Don't include <stdio_ext.h> unless
3031         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
3032         it causes <stdio_ext.h> to cause a compile-time error.
3033         Problem reported by Nelson H. F. Beebe.
3034         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
3035         of HAVE_DECL___PENDING.
3036
3037         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
3038         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
3039         declaration.
3040
3041 2006-09-27  Jim Meyering  <jim@meyering.net>
3042
3043         This file could end up with a definition for a function
3044         named __strndup, rather than rpl_strndup on a system with
3045         incomplete weak_alias support.
3046         * lib/strndup.c (strndup): Rename from __strndup.
3047         Remove #defines that used to map __strndup to strndup.
3048         Don't use K&R prototypes.
3049         Remove LIBC-related code, since this file is not sync'd with glibc.
3050         * lib/strndup.h: Revamp, accordingly.
3051         * m4/strndup.m4: Modernize.
3052
3053 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3054
3055         * modules/savewd (Depends-on): Add 'raise'.
3056         * lib/savewd.c: Include <signal.h>, for 'raise'.
3057
3058 2006-09-26  Jim Meyering  <jim@meyering.net>
3059
3060         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
3061         when we detect Darwin 8.7.0's acl_get_file bug.
3062         Rearrange to perform the new (below) run-test while $LIBS
3063         contains any acl-related library.  Set USE_ACL at the end.
3064         (gl_ACL_GET_FILE): New function.
3065
3066 2006-09-26  Eric Blake  <ebb9@byu.net>
3067
3068         * lib/verror.c: Include <config.h> unconditionally.
3069
3070 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3071
3072         * modules/clock-time (Maintainer): Add self.
3073         * modules/getlogin_r (Depends-on): Add extensions.
3074
3075 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3076
3077         * modules/clock-time: New module.
3078         * modules/nanosleep (Depends-on): Add clock-time.
3079         * modules/gethrxtime (Depends-on): Likewise.
3080         * modules/gettime (Depends-on): Likewise.
3081         * modules/settime (Depends-on): Likewise.
3082
3083         * modules/fts-lgpl: Depend on openat.
3084         * modules/mkancesdirs: Depend on savewd.
3085         * modules/mkdir-p: Likewise.
3086
3087 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3088
3089         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
3090
3091         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
3092         `gl_have_arbitrary_file_name_length_limit' to
3093         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
3094         actually works between configure runs.
3095
3096 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3097             Bruno Haible  <bruno@clisp.org>
3098
3099         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
3100
3101 2006-09-25  Jim Meyering  <jim@meyering.net>
3102
3103         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
3104         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
3105
3106 2006-09-25  Eric Blake  <ebb9@byu.net>
3107
3108         * gnulib-tool (func_import, func_create_testdir): Fix typos in
3109         exec's in 2006-09-18 patch when shuffling fds.
3110
3111 2006-09-25  Bruno Haible  <bruno@clisp.org>
3112
3113         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
3114         Reported by Jim Meyering.
3115
3116 2006-09-24  Jim Meyering  <jim@meyering.net>
3117
3118         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
3119         compare a pointer against a literal "0".  That caused failures with
3120         at least HP-UX's hpcc.
3121
3122 2006-09-22  Simon Josefsson  <jas@extundo.com>
3123
3124         * modules/gc-sha1:
3125         * modules/gc-md4:
3126         * modules/gc-hmac-sha1:
3127         * modules/gc-hmac-md5:
3128         * modules/gc-des:
3129         * modules/gc-arcfour: Distribute more files.
3130
3131 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3132
3133         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
3134         (gl_linked_iterator_from_to): Initialize struct completely.
3135         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
3136         (gl_tree_iterator_from_to): Likewise
3137         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
3138         * lib/gl_array_list.c [lint] (gl_array_iterator)
3139         (gl_array_iterator_from_to): Likewise.
3140         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
3141         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
3142         (gl_carray_iterator_from_to): Likewise.
3143
3144         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
3145         * lib/md4.c (md4_process_block): Remove unused variable.
3146         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
3147         parentheses for clarity.
3148
3149 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3150
3151         * modules/bison-i18n (Depends-on): Add gettext.
3152
3153 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3154
3155         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
3156         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
3157         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
3158         also add missing comma that caused broken test.
3159         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
3160         stdlib.h, for `abort'.
3161         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
3162         variables.
3163         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
3164         include unistd.h if present, for `rmdir'.
3165         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
3166         variables.
3167         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
3168         in the process include standard headers for prototypes.
3169         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
3170         gets declared on GNU/Linux.
3171         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
3172         unistd.h, for `rmdir'.
3173         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
3174
3175         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
3176         always true.
3177         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
3178
3179         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
3180
3181 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3182
3183         * gnulib-tool (func_version): Create output all at once.  This
3184         may help avoid triggering unnecessary SIGPIPEs, and at any
3185         rate it doesn't hurt.
3186
3187 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3188             Bruno Haible  <bruno@clisp.org>
3189
3190         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
3191         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3192         * m4/signed.m4 (bh_C_SIGNED): Likewise.
3193
3194         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
3195         (gl_FUNC_VASPRINTF): Invoke it.
3196
3197 2006-09-22  Bruno Haible  <bruno@clisp.org>
3198
3199         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
3200         getloadavg.c as first argument.
3201
3202 2006-09-22  Bruno Haible  <bruno@clisp.org>
3203
3204         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
3205         at the beginning of the gl_INIT macro.
3206         * modules/getloadavg (configure.ac): Pass $gl_source_base to
3207         gl_GETLOADAVG.
3208
3209 2006-09-22  Bruno Haible  <bruno@clisp.org>
3210
3211         * gnulib-tool (func_create_megatestdir): Don't include the config-h
3212         module.
3213         Suggested by Ralf Wildenhues.
3214
3215 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
3216
3217         Import this patch from libc:
3218
3219         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
3220
3221         * lib/regex_internal.c (re_string_reconstruct): Handle
3222         offset < pstr->valid_raw_len && pstr->offsets_needed case.
3223         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
3224         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
3225         re_string_context_at.
3226
3227         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
3228         now requires it.
3229         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
3230         gl_REGEX now does it for us.
3231         (gl_REGEX): Add test taken from
3232         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
3233
3234         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
3235         Check that large offsets work.  Modernize Autoconf usages.
3236         Prefer "yes" to mean a good thing rather than a bad.
3237         Don't put "#define mkstemp" in config.h, as this might interfere
3238         with standard system headers that "#define mkstemp mkstemp64".
3239
3240         * modules/mkstemp (Depends-on): Add extensions, so that
3241         mkstemp is visible on some platforms.
3242         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
3243         (Include): Change to "mkstemp.h" from <stdlib.h>.
3244         (Files): Add mkstemp.h.
3245
3246         * lib/mkstemp.h: New file, since some standard headers
3247         #define mkstemp.
3248         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
3249         Include "mkstemp.h".
3250         Make the _LIBC code resemble glibc original more,
3251         e.g., use K&R style.
3252         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
3253         (mkstemp): Remove, since mkstemp.h does this for us.
3254         * lib/stdlib--.h: Include mkstemp.h.
3255
3256         Import this patch from libc:
3257
3258         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3259
3260         * lib/tempname.c (__gen_tempname): Change attempts_min
3261         into a macro.  Use preprocessor to decide how to initialize
3262         attempts [Coverity CID 67].
3263
3264 2006-09-20  Bruno Haible  <bruno@clisp.org>
3265
3266         * lib/mkdtemp.c: Import from libc.
3267         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3268                 * sysdeps/posix/tempname.c (__gen_tempname): Change
3269                 attempts_min into a macro.  Use preprocessor to decide how to
3270                 initialize attempts [Coverity CID 67].
3271         2001-11-27  Paul Eggert  <eggert@twinsun.com>
3272                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
3273                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
3274
3275 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3276
3277         * gnulib-tool (func_exit): New function, to allow to pass the
3278         exit status portably through the trap.  Use everywhere.
3279         (--help, --version): Signal a write error.
3280         (trap): catch SIGPIPE, for write errors.
3281         Exit at the end of the trap, with the correct exit status.
3282
3283 2006-09-19  Karl Berry  <karl@gnu.org>
3284
3285         * doc/gnulib.texi: note about the license texinfo files.
3286
3287 2006-09-19  Eric Blake  <ebb9@byu.net>
3288
3289         * gnulib-tool: Avoid space-tab.
3290
3291 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3292
3293         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
3294         that prevented coreutils 6.1 from building.  Problem reported
3295         by Petter Reinholdtsen.
3296
3297 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3298
3299         * gnulib-tool (avoidlist): Fix typo that broke options like
3300         --avoid=lock that are used by coreutils bootstrap.
3301
3302 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
3303
3304         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
3305         more systematically.
3306
3307 2006-09-18  Jim Meyering  <jim@meyering.net>
3308
3309         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
3310
3311 2006-09-18  Bruno Haible  <bruno@clisp.org>
3312
3313         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
3314
3315 2006-09-18  Bruno Haible  <bruno@clisp.org>
3316
3317         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
3318         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
3319         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
3320         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
3321         * m4/gettext.m4: Require autoconf >= 2.52.
3322         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
3323         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
3324         of gl_cv_header_inttypes_h.
3325
3326 2006-09-18  Bruno Haible  <bruno@clisp.org>
3327
3328         * lib/javaversion.c: Include configmake.h.
3329
3330 2006-09-18  Bruno Haible  <bruno@clisp.org>
3331
3332         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
3333         avoid that the while loops be executed in a subshell.
3334
3335 2006-09-18  Bruno Haible  <bruno@clisp.org>
3336
3337         * MODULES.html.sh (func_module): Break long lines.
3338         Suggested by Bruce Korb <bkorb@gnu.org>.
3339
3340 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3341
3342         Speed up by a factor of 1.12.
3343         * gnulib-tool (nl): New variable.
3344         (func_import): Rewrite include directive extraction to only read each
3345         directive once.
3346
3347 2006-09-17  Bruno Haible  <bruno@clisp.org>
3348
3349         * modules/javaversion (Makefile.am): Remove DEFS setting.
3350         (Depends-on): Add configmake, for PKGDATADIR definition.
3351
3352 2006-09-17  Bruno Haible  <bruno@clisp.org>
3353
3354         * gnulib-tool (func_create_testdir): Rewrite all files at once.
3355
3356 2006-09-17  Bruno Haible  <bruno@clisp.org>
3357
3358         * gnulib-tool (func_append): New function, stolen from libtool.m4.
3359         (func_modules_transitive_closure, func_modules_add_dummy,
3360         func_modules_to_filelist, func_import, func_create_testdir,
3361         func_create_megatestdir, ...): Use it wherever possible.
3362         Suggested by Ralf Wildenhues.
3363
3364 2006-09-16  Karl Berry  <karl@gnu.org>
3365
3366         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
3367         to avoid sectioning errors.
3368         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
3369         [ifinfo]: blank line after @center-ed titles.
3370         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
3371         Spell FSF address consistently with others.
3372         (These changes approved by rms.)
3373
3374 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3375
3376         Speed up by a factor of 1.61.
3377         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
3378         already checked module names again.
3379
3380 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3381
3382         Speed up by a factor of 1.13.
3383         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
3384         for new_files, and the input to func_add_or_update.
3385
3386 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3387
3388         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
3389         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
3390
3391 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3392
3393         * modules/mkancesdirs (Depends-on): Add fcntl.
3394         * modules/savewd: New file.
3395         * MODULES.html.sh (File system functions): Add savewd.
3396
3397         * modules/configmake (Makefile.am): Add support for the
3398         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
3399
3400 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3401
3402         * m4/savewd.m4: New file.
3403
3404 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3405
3406         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
3407         (dirchownmod): New arg FD.  All callers changed.
3408         Use FD rather than opening the directory ourself, as opening is
3409         now the caller's responsibility.
3410         * lib/dirchownmod.h: Likewise.
3411         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
3412         hosts that require <sys/types.h> before <sys/stat.h>.  Include
3413         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
3414         (test_dir): Remove.
3415         (mkancesdirs): Return length of prefix of FILE that has already
3416         been made, or -2 if there is a child doing the work.  Redo
3417         algorithm so that it is O(N) rather than O(N**2).  Optimize away
3418         ".", and treat ".." specially since it might stray back into
3419         already-created areas.  Use a subprocess if necessary.  New arg
3420         WD; all users changed.  MAKE_DIR function should now return 1
3421         if it creates a directory that is not readable.  Return -2 if
3422         a child process is spun off.
3423         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
3424         Adjust signature to match code.
3425         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
3426         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
3427         all users changed.
3428         * lib/savewd.c, lib/savewd.h: New files.
3429
3430 2006-09-15  Jim Meyering  <jim@meyering.net>
3431
3432         * modules/rename-dest-slash: New module.
3433         * MODULES.html.sh (posix_compat): Add it here.
3434
3435         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
3436
3437 2006-09-15  Jim Meyering  <jim@meyering.net>
3438
3439         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
3440         file.
3441
3442         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
3443
3444 2006-09-15  Jim Meyering  <jim@meyering.net>
3445
3446         * lib/rename-dest-slash.c (has_trailing_slash): Use
3447         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
3448         (rpl_rename_dest_slash): Perform the cheaper trailing slash
3449         test before testing whether SRC is a directory.
3450         Suggestions from Bruno Haible.
3451
3452         Avoid a warning about an unused variable.
3453         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
3454         into the #ifdef block where it's used.
3455
3456         * lib/rename-dest-slash.c: New file.
3457
3458 2006-09-14  Bruno Haible  <bruno@clisp.org>
3459
3460         * lib/allocsa.c: Include <config.h> unconditionally.
3461         * lib/asnprintf.c: Likewise.
3462         * lib/asprintf.c: Likewise.
3463         * lib/c-strcasecmp.c: Likewise.
3464         * lib/c-strcasestr.c: Likewise.
3465         * lib/c-strncasecmp.c: Likewise.
3466         * lib/c-strstr.c: Likewise.
3467         * lib/classpath.c: Likewise.
3468         * lib/clean-temp.c: Likewise.
3469         * lib/concatpath.c: Likewise.
3470         * lib/copy-file.c: Likewise.
3471         * lib/csharpcomp.c: Likewise.
3472         * lib/csharpexec.c: Likewise.
3473         * lib/execute.c: Likewise.
3474         * lib/fatal-signal.c: Likewise.
3475         * lib/findprog.c: Likewise.
3476         * lib/fwriteerror.c: Likewise.
3477         * lib/gl_array_list.c: Likewise.
3478         * lib/gl_array_oset.c: Likewise.
3479         * lib/gl_avltree_list.c: Likewise.
3480         * lib/gl_avltree_oset.c: Likewise.
3481         * lib/gl_avltreehash_list.c: Likewise.
3482         * lib/gl_carray_list.c: Likewise.
3483         * lib/gl_linked_list.c: Likewise.
3484         * lib/gl_linkedhash_list.c: Likewise.
3485         * lib/gl_list.c: Likewise.
3486         * lib/gl_oset.c: Likewise.
3487         * lib/gl_rbtree_list.c: Likewise.
3488         * lib/gl_rbtree_oset.c: Likewise.
3489         * lib/gl_rbtreehash_list.c: Likewise.
3490         * lib/imaxabs.c: Likewise.
3491         * lib/imaxdiv.c: Likewise.
3492         * lib/javacomp.c: Likewise.
3493         * lib/javaexec.c: Likewise.
3494         * lib/javaversion.c: Likewise.
3495         * lib/linebreak.c: Likewise.
3496         * lib/localcharset.c: Likewise.
3497         * lib/lock.c: Likewise.
3498         * lib/mbchar.c: Likewise.
3499         * lib/mbswidth.c: Likewise.
3500         * lib/mkdtemp.c: Likewise.
3501         * lib/pipe.c: Likewise.
3502         * lib/printf-args.c: Likewise.
3503         * lib/printf-parse.c: Likewise.
3504         * lib/progname.c: Likewise.
3505         * lib/progreloc.c: Likewise.
3506         * lib/readlink.c: Likewise.
3507         * lib/sh-quote.c: Likewise.
3508         * lib/stpcpy.c: Likewise.
3509         * lib/stpncpy.c: Likewise.
3510         * lib/strcasecmp.c: Likewise.
3511         * lib/strcasestr.c: Likewise.
3512         * lib/strcspn.c: Likewise.
3513         * lib/striconv.c: Likewise.
3514         * lib/strncasecmp.c: Likewise.
3515         * lib/strnlen1.c: Likewise.
3516         * lib/strstr.c: Likewise.
3517         * lib/strtok_r.c: Likewise.
3518         * lib/tls.c: Likewise.
3519         * lib/tmpdir.c: Likewise.
3520         * lib/unicodeio.c: Likewise.
3521         * lib/unsetenv.c: Likewise.
3522         * lib/vasnprintf.c: Likewise.
3523         * lib/vasprintf.c: Likewise.
3524         * lib/wait-process.c: Likewise.
3525         * lib/xallocsa.c: Likewise.
3526         * lib/xsetenv.c: Likewise.
3527         * lib/xstriconv.c: Likewise.
3528
3529 2006-09-13  Simon Josefsson  <jas@extundo.com>
3530
3531         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
3532         that internally, suggested by Ralf Wildenhues
3533         <Ralf.Wildenhues@gmx.de>.
3534
3535 2006-09-13  Simon Josefsson  <jas@extundo.com>
3536
3537         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
3538         @LIBOBJS@.
3539         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3540
3541 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
3542
3543         * lib/_fpending.c: Include <config.h> unconditionally, since we no
3544         longer worry about uses that don't define HAVE_CONFIG_H.
3545         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
3546         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
3547         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
3548         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
3549         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
3550         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
3551         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
3552         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
3553         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
3554         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
3555         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
3556         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
3557         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
3558         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
3559         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
3560         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
3561         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
3562         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
3563         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
3564         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
3565         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
3566         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
3567         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
3568         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
3569         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
3570         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
3571         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
3572         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
3573         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
3574         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
3575         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
3576         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
3577         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
3578         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
3579         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
3580         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
3581         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
3582         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
3583         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
3584         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
3585         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
3586         Likewise.
3587
3588 2006-09-13  Eric Blake  <ebb9@byu.net>
3589
3590         * lib/getopt.c: Fix typo in last commit.
3591
3592 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
3593
3594         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
3595         dgettext.
3596
3597 2006-09-12  Jim Meyering  <jim@meyering.net>
3598
3599         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
3600         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
3601         Reported by Nelson H. F. Beebe.
3602
3603 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
3604
3605         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
3606         program_invocation_name and program_invocation_short_name are
3607         initialized.
3608         * lib/argp-namefrob.h: Move declarations of program_invocation_name
3609         and program_invocation_short_name to argp.h, so they are visible
3610         to user programs.
3611         * lib/argp.h: Likewise
3612
3613 2006-09-10  Bruno Haible  <bruno@clisp.org>
3614
3615         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3616         m4/inttypes_h.m4, m4/uintmax_t.m4.
3617
3618 2006-09-10  Bruno Haible  <bruno@clisp.org>
3619
3620         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
3621         gl_AC_TYPE_UINTMAX_T.
3622
3623 2006-09-10  Bruno Haible  <bruno@clisp.org>
3624
3625         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
3626
3627 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
3628
3629         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
3630         convention.  Text proposed by Bruno Haible.
3631         (struct argp_option): Document the use of N_() wrappers.
3632
3633         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
3634         '\v', and translate the two parts separately, instead of feeding
3635         the whole string to gettext.  This allows to exclude
3636         '\v' from the strings visible to the translator by writing doc
3637         strings as N_("..") "\v" N_("..").
3638
3639 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
3640
3641         * config/srclist.txt: Undo latest change; the bug was fixed.
3642
3643 2006-09-09  Bruno Haible  <bruno@clisp.org>
3644
3645         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
3646         assignments if building a library without libtool.
3647         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
3648         in func_emit_lib_Makefile_am.
3649         (func_import): When building a static library libfoo.a, arrange to
3650         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
3651         (func_create_testdir): Likewise.
3652         * modules/gc (configure.ac, Makefile.am): If building statically,
3653         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
3654         * modules/iconvme (configure.ac, Makefile.am): Likewise.
3655         * modules/striconv (configure.ac, Makefile.am): Likewise.
3656         Based on a suggestion by Ralf Wildenhues.
3657
3658 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3659
3660         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3661         Check for unistd.h too, since Autoconf doesn't assume POSIX.
3662         Also:
3663
3664         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3665         Add year_2050_test to catch glibc bug 2821
3666         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3667
3668         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3669         Prefer #ifdef to #if.
3670
3671         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
3672         Return from 'main' instead of calling 'exit'.
3673
3674 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3675
3676         * lib/mktime.c (guess_time_tm): Fix bug where mktime
3677         returned the maximum time_t value rather than (time_t) -1.
3678         Problem originally reported by William Bardwell
3679         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3680
3681         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3682         Moved to here ...
3683         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3684         ... from here.
3685
3686 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3687
3688         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
3689         2821 is fixed.
3690
3691 2006-09-08  Jim Meyering  <jim@meyering.net>
3692
3693         Don't make generated files read-only.  That would bother too many
3694         people.  However, do retain the ability to work when targets are
3695         read-only: remove the destination and temporary files before writing
3696         them (when generated via sed or echo), or by using the -f option for
3697         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
3698         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3699         * modules/byteswap, modules/configmake, modules/fcntl:
3700         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3701         * modules/localcharset, modules/netinet_in, modules/poll:
3702         * modules/stdbool, modules/stdint, modules/sys_select:
3703         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3704
3705 2006-09-08  Jim Meyering  <jim@meyering.net>
3706
3707         Avoid new build failure on FreeBSD 6.0.
3708         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
3709         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
3710         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
3711
3712 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3713
3714         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
3715
3716 2006-09-07  Jim Meyering  <jim@meyering.net>
3717
3718         Fix global typo in last change: use chmod u-w, not chmod u-x.
3719         Spotted by Paul Eggert and Bruce Korb.
3720         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3721         * modules/byteswap, modules/configmake, modules/fcntl:
3722         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3723         * modules/localcharset, modules/netinet_in, modules/poll:
3724         * modules/stdbool, modules/stdint, modules/sys_select:
3725         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3726
3727 2006-09-06  Jim Meyering  <jim@meyering.net>
3728
3729         Make generated files be read-only.
3730         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
3731         Ensure that each generated file is now read-only.
3732         * modules/argz: Likewise.
3733         * modules/arpa_inet: Likewise.
3734         * modules/byteswap: Likewise.
3735         * modules/configmake: Likewise.
3736         * modules/fcntl: Likewise.
3737         * modules/fnmatch: Likewise.
3738         * modules/getopt: Likewise.
3739         * modules/glob: Likewise.
3740         * modules/inttypes: Likewise.
3741         * modules/netinet_in: Likewise.
3742         * modules/poll: Likewise.
3743         * modules/stdbool: Likewise.
3744         * modules/stdint: Likewise.
3745         * modules/sys_select: Likewise.
3746         * modules/sys_socket: Likewise.
3747         * modules/sys_stat: Likewise.
3748         * modules/sysexits: Likewise.
3749         * modules/localcharset: Same as above, but continue using temporary
3750         file named "t-$@" (why different?) rather than the "$@-t" used
3751         everywhere else.
3752
3753         * modules/sysexits (Makefile.am): Replace literal occurrences
3754         of "sysexit.h" more readable, and more consistent, "$@".
3755
3756 2006-09-06  Bruno Haible  <bruno@clisp.org>
3757
3758         * modules/striconv: New file.
3759         * modules/xstriconv: New file.
3760         * MODULES.html.sh (Internationalization functions): Add striconv,
3761         xstriconv.
3762
3763 2006-09-06  Bruno Haible  <bruno@clisp.org>
3764
3765         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
3766         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
3767         not using libtool correctly.
3768
3769 2006-09-06  Bruno Haible  <bruno@clisp.org>
3770
3771         * lib/striconv.h: New file.
3772         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
3773         iconvstring.c.
3774         * lib/xstriconv.h: New file.
3775         * lib/xstriconv.c: New file.
3776
3777 2006-09-06  Bruno Haible  <bruno@clisp.org>
3778
3779         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3780         lib_..._LDFLAGS.
3781
3782 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3783
3784         * lib/argz_.h: Sync from Libtool.
3785
3786         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
3787                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3788
3789         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
3790
3791 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3792
3793         * modules/trim: New file.
3794
3795 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3796
3797         * lib/trim.h: New file.
3798         * lib/trim.c: New file.
3799
3800 2006-09-05  Bruno Haible  <bruno@clisp.org>
3801
3802         * MODULES.html.sh (String handling): Add trim.
3803
3804 2006-09-04  Karl Berry  <karl@gnu.org>
3805
3806         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
3807         until next release.
3808
3809 2006-09-03  Bruno Haible  <bruno@clisp.org>
3810
3811         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
3812         correctly.
3813
3814 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3815
3816         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
3817         not gl_GETLOADAVG.  Omit unneeded semicolons.
3818         Problems reported by Ralf Wildenhues in
3819         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3820         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
3821         at the end, which is the usual gnulib style.
3822
3823         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
3824         of doing all the work ourselves.
3825         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
3826         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
3827
3828 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3829
3830         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
3831         Problem reported by Ralf Wildenhues in
3832         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3833
3834         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
3835         HAVE_STRUCT_STATFS_F_FSTYPENAME.
3836
3837 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3838
3839         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
3840         yesterday's patch by changing test -n to test -z.
3841
3842 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3843
3844         * modules/getloadavg (Files): Add m4/getloadavg.m4.
3845         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
3846         the former is now obsolescent.
3847
3848         * modules/chdir-long (Depends-on): Add fcntl.
3849
3850 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3851
3852         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
3853         obsolescent, and programs should use gnulib instead.
3854         * m4/getloadavg.m4: New file, with contents taken from Autoconf
3855         but with prefixes changed.
3856
3857 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3858
3859         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
3860         or stdbool.h, because they might not exist while configuring.
3861
3862         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
3863         Don't include unistd.h or limits.h; not needed, since chdir-long.h
3864         does that for us.
3865         (O_DIRECTORY): Remove.
3866
3867 2006-08-31  Eric Blake  <ebb9@byu.net>
3868
3869         * gnulib-tool: Don't let emacs change spaces to TAB.
3870
3871 2006-08-31  Bruno Haible  <bruno@clisp.org>
3872
3873         * gnulib-tool: When calling func_import more than once, do it in a
3874         subshell.
3875         Reported by Eric Blake <ebb9@byu.net>.
3876
3877 2006-08-31  Bruno Haible  <bruno@clisp.org>
3878
3879         * gnulib-tool (nl): Remove variable.
3880         (sed_transform_lib_file): Use more robust test for config-h module.
3881         (func_import): Fix typo in 2006-08-25 patch.
3882
3883 2006-08-31  Bruno Haible  <bruno@clisp.org>
3884
3885         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
3886         specified, augment Makefile.am variables instead of assigning them.
3887
3888 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3889
3890         Work around a bug in both the Linux and SunOS 64-bit kernels:
3891         nanosleep mishandles sleeps for longer than 2**31 seconds.
3892         Problem reported by Frank v Waveren in
3893         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3894         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
3895         Check for nanosleep bug.
3896         (LIB_NANOSLEEP): Append clock_gettime library if needed.
3897
3898 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3899
3900         Work around a bug in both the Linux and SunOS 64-bit kernels:
3901         nanosleep mishandles sleeps for longer than 2**31 seconds.
3902         Problem reported by Frank v Waveren in
3903         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3904         * lib/nanosleep.c (BILLION): New constant.
3905         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
3906         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
3907         implementation.
3908
3909 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3910
3911         * modules/nanosleep (Depends-on): Add gettime.
3912
3913 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3914         and Simon Josefsson  <jas@extundo.com>
3915         and Oskar Liljeblad  <oskar@osk.mine.nu>
3916
3917         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
3918         * gnulib-tool (func_import): New license type 'unmodifiable license
3919         text'.
3920         * modules/fdl: Use it.  Longer description.
3921         * module/gpl, module/lgpl: New files.
3922
3923 2006-08-30  Jim Meyering  <jim@meyering.net>
3924
3925         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
3926         shadowing the parameter.
3927
3928 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3929
3930         Sync from Libtool:
3931
3932         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3933
3934         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
3935         sharing with gnulib.  Report by Eric Blake.
3936
3937 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3938
3939         * modules/isapipe: New file.
3940         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
3941
3942 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3943
3944         * modules/configmake (Makefile.am): Add a comment, and omit
3945         the CONFIGMAKE_ prefix from generated macro names.  Suggested
3946         by Bruno Haible.
3947
3948 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3949
3950         * m4/isapipe.m4: New file.
3951
3952 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3953
3954         * lib/isapipe.c, lib/isapipe.h: New files.
3955
3956 2006-08-29  Jim Meyering  <jim@meyering.net>
3957
3958         * modules/configmake (Makefile.am): Make configmake.h depend on
3959         Makefile.  Otherwise, a stale configmake.h could hang around.
3960
3961 2006-08-29  Eric Blake  <ebb9@byu.net>
3962
3963         * lib/error.c (error_at_line, print_errno_message): Match libc, after
3964         resolution of upstream bug 3044.
3965
3966 2006-08-29  Bruno Haible  <bruno@clisp.org>
3967
3968         * modules/localcharset (Depends-on): Add configmake.
3969         (Makefile.am): Remove setting of LIBDIR through DEFS.
3970
3971 2006-08-29  Bruno Haible  <bruno@clisp.org>
3972
3973         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
3974         defined.
3975
3976 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3977
3978         * modules/fcntl: New file.
3979         * modules/chdir-safer (Depends-on): Add fcntl.
3980         * modules/fts: Likewise.
3981         * modules/mkdir-p: Likewise.
3982
3983         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
3984         This undoes the most recent change, since we're now addressing the
3985         problem in a different way.
3986
3987         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
3988         into output, since the output might be called Makefile.am even
3989         if $makefile_name is something different.
3990         (func_import): Use $makefile_am rather than
3991         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
3992         empty.
3993
3994         * modules/inttypes (Files): Add m4/inttypes-h.m4.
3995
3996 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3997
3998         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
3999         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
4000         recent change to stdint.m4, since we're now addressing the problem in a
4001         different way.
4002
4003 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4004
4005         * m4/fcntl_h.m4: New file.
4006
4007 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4008
4009         * lib/fcntl_.h: New file.
4010         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
4011         the fcntl module.
4012         * lib/dirchownmod.c: Likewise.
4013         * lib/fts.c: Likewise.
4014
4015         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
4016         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
4017         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
4018         just before including <inttypes.h>, to avoid circular inclusion.
4019
4020 2006-08-28  Jim Meyering  <jim@meyering.net>
4021
4022         * doc/visibility.texi: Actually read and correct the grammar of the
4023         sentence affected by yesterday's change.
4024
4025 2006-08-28  Eric Blake  <ebb9@byu.net>
4026
4027         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
4028         needs wrapper.
4029
4030 2006-08-28  Eric Blake  <ebb9@byu.net>
4031
4032         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
4033
4034 2006-08-28  Eric Blake  <ebb9@byu.net>
4035
4036         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
4037
4038 2006-08-28  Bruno Haible  <bruno@clisp.org>
4039
4040         * modules/c-strstr: New file, from GNU gettext.
4041         * MODULES.html.sh (String handling): Add c-strstr.
4042
4043 2006-08-28  Bruno Haible  <bruno@clisp.org>
4044
4045         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
4046         macros.
4047         Reported by Eric Blake.
4048
4049 2006-08-28  Bruno Haible  <bruno@clisp.org>
4050
4051         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
4052         (VASNPRINTF): Return a string of length > INT_MAX without failing.
4053         * lib/vasprintf.c: Include errno.h, limits.h.
4054         (EOVERFLOW): New fallback definition.
4055         (vasprintf): Test here whether the string length is > INT_MAX.
4056         * lib/vsnprintf.c: Include errno.h, limits.h.
4057         (EOVERFLOW): New fallback definition.
4058         (vsnprintf): Fix bug when generated string was too long for the buffer.
4059         Test here whether the string length is > INT_MAX.
4060
4061 2006-08-28  Bruno Haible  <bruno@clisp.org>
4062
4063         * lib/inttypes_.h (SCNX*): Remove definitions.
4064         Reported by Eric Blake.
4065
4066 2006-08-28  Bruno Haible  <bruno@clisp.org>
4067
4068         * lib/c-strstr.h: New file, from GNU gettext.
4069         * lib/c-strstr.c: New file, from GNU gettext.
4070
4071 2006-08-28  Bruno Haible  <bruno@clisp.org>
4072
4073         * gnulib-tool: Reorder some statements.
4074
4075 2006-08-28  Bruno Haible  <bruno@clisp.org>
4076
4077         * gnulib-tool: New option --makefile-name.
4078         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
4079         $makefile_name.
4080         (func_import): Write $makefile_name to the cache file, and read it from
4081         there unless explicitly specified. Use $makefile_name as file name
4082         instead of Makefile.am. Adjust the recommendations accordingly.
4083
4084 2006-08-28  Bruno Haible  <bruno@clisp.org>
4085
4086         * gnulib-tool (func_verify_module): Check against misapplying patch.
4087
4088 2006-08-28  Bruno Haible  <bruno@clisp.org>
4089
4090         * gnulib-tool (func_relativize, func_relconcat): New functions.
4091         Give an error if --local-dir is given with --update.
4092         Remove trailing slashes from $local_gnulib_dir.
4093         (func_import): Store the relativized $local_gnulib_dir in
4094         gnulib-cache.m4, and read it from there if not specified explicitly.
4095
4096 2006-08-28  Bruno Haible  <bruno@clisp.org>
4097
4098         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
4099         is the current directory. Respect also $local_gnulib_dir.
4100
4101 2006-08-28  Bruno Haible  <bruno@clisp.org>
4102             Simon Josefsson  <jas@extundo.com>
4103
4104         BeOS portability.
4105         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
4106
4107 2006-08-27  Jim Meyering  <jim@meyering.net>
4108
4109         * doc/visibility.texi: Remove duplicate word: "pointer".
4110
4111 2006-08-26  Bruno Haible  <bruno@clisp.org>
4112
4113         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
4114         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
4115         (Makefile.am): Create inttypes.h from inttypes_.h.
4116         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
4117
4118         * modules/imaxabs: New file.
4119
4120         * modules/imaxdiv: New file.
4121
4122 2006-08-26  Bruno Haible  <bruno@clisp.org>
4123
4124         * m4/inttypes.m4: New file.
4125         * m4/_inttypes_h.m4: Remove file.
4126         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
4127         PRI_MACROS_BROKEN.
4128         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
4129
4130         * m4/imaxabs.m4: New file.
4131
4132         * m4/imaxdiv.m4: New file.
4133
4134 2006-08-26  Bruno Haible  <bruno@clisp.org>
4135
4136         * lib/inttypes_.h: New file.
4137         * lib/inttypes.h: Remove file.
4138         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
4139
4140         * lib/imaxabs.c: New file.
4141
4142         * lib/imaxdiv.c: New file.
4143
4144 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4145
4146         New config-h module, so that "make" output needn't be cluttered
4147         by -DHAVE_CONFIG_H.
4148         * MODULES.html.sh (Support for building libraries and executables):
4149         Add config-h.
4150         * modules/config-h: New file.
4151         * gnulib-tool (nl, sed_transform_lib_file): New vars.
4152         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
4153         the config-h module is used.
4154
4155         New configmake module, so that "make" output needn't be cluttered
4156         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
4157         * MODULES.html.sh (Support for building libraries and executables):
4158         Add configmake.
4159         * modules/configmake: New file.
4160
4161 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4162
4163         * m4/config-h.m4: New file.
4164
4165 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4166
4167         * config/srclist.txt: Add elisp-comp.
4168
4169 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4170
4171         * MODULES.html.sh (Support for building libraries and executables):
4172         Add elisp-comp.
4173         * build-aux/elisp-comp: New file.
4174         * modules/elisp-comp: New file.
4175
4176 2006-08-24  Bruno Haible  <bruno@clisp.org>
4177
4178         * gnulib-tool (func_create_testdir): Use non-default values of
4179         sourcebase and m4base.
4180
4181 2006-08-24  Bruno Haible  <bruno@clisp.org>
4182
4183         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
4184         HTML structure.
4185
4186 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
4187
4188         * modules/openat (Depends-on): Add lchown.
4189
4190 2006-08-23  Bruno Haible  <bruno@clisp.org>
4191
4192         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
4193         of gl_LOCK_EARLY instead of gl_LOCK.
4194
4195 2006-08-23  Bruno Haible  <bruno@clisp.org>
4196
4197         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
4198         on OSF/1 to no.
4199         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
4200
4201 2006-08-23  Bruno Haible  <bruno@clisp.org>
4202
4203         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
4204         as unusable.
4205
4206         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
4207         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
4208         (gl_LOCK): New macro.
4209
4210 2006-08-22  Simon Josefsson  <jas@extundo.com>
4211
4212         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
4213         to md5 module.
4214
4215 2006-08-22  Simon Josefsson  <jas@extundo.com>
4216
4217         * MODULES.html.sh: Add "Support for maintaining and release
4218         projects".
4219
4220         * build-aux/gnupload: New file, from coreutils.
4221
4222 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4223
4224         Avoid the need for AC_LIBSOURCES in m4 macros.
4225         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
4226         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
4227         * modules/check-version (EXTRA_DIST): Add check-version.h.
4228         * modules/crc (EXTRA_DIST): Add crc.h.
4229         * modules/des (EXTRA_DIST): Add des.h.
4230         * modules/gc (EXTRA_DIST): Add gc.h.
4231         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
4232         * modules/getline (EXTRA_DIST): Add getline.h.
4233         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
4234         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
4235         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
4236         * modules/md2 (EXTRA_DIST): Add md2.h.
4237         * modules/md4 (EXTRA_DIST): Add md4.h.
4238         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
4239         * modules/read-file (EXTRA_DIST): Add read-file.h.
4240         * modules/readline (EXTRA_DIST): Add readline.h.
4241         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
4242         rijndael-api-fst.h.
4243
4244 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4245
4246         * m4/rijndael.m4 (gl_ARCFOUR):
4247         * m4/arctwo.m4 (gl_ARCTWO):
4248         * m4/check-version.m4 (gl_CHECK_VERSION):
4249         * m4/crc.m4 (gl_CRC):
4250         * m4/des.m4 (gl_DES):
4251         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
4252         * m4/gc.m4 (gl_GC):
4253         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
4254         * m4/getline.m4 (gl_FUNC_GETLINE):
4255         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
4256         * m4/hmac-md5.m4 (gl_HMAC_MD5):
4257         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
4258         * m4/md2.m4 (gl_MD2):
4259         * m4/md4.m4 (gl_MD4):
4260         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
4261         * m4/read-file.m4 (gl_FUNC_READ_FILE):
4262         * m4/readline.m4 (gl_FUNC_READLINE):
4263         * m4/rijndael.m4 (gl_RIJNDAEL):
4264         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4265         to get the necessary .h files and whatnot.
4266
4267 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4268
4269         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
4270         gnulib rather than the other way around.
4271         * config/srclistvars.sh (COREUTILS): Remove.
4272
4273 2006-08-22  Jim Meyering  <jim@meyering.net>
4274
4275         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
4276
4277         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
4278
4279 2006-08-22  Eric Blake  <ebb9@byu.net>
4280
4281         * modules/regexprops-generic: New file.
4282         * MODULES.html.sh (Support for building documentation): List it.
4283
4284 2006-08-22  Eric Blake  <ebb9@byu.net>
4285
4286         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
4287         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
4288         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
4289         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
4290
4291 2006-08-22  Bruno Haible  <bruno@clisp.org>
4292
4293         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
4294         and lib_LTLIBRARIES like the other lib_* variables.
4295
4296 2006-08-22  Bruno Haible  <bruno@clisp.org>
4297
4298         * build-aux/x-to-1.in: New file, from GNU gettext.
4299
4300 2006-08-22  Bruno Haible  <bruno@clisp.org>
4301
4302         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
4303         <utmpx.h> exists.
4304
4305 2006-08-22  Bruno Haible  <bruno@clisp.org>
4306
4307         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
4308         <utmpx.h> exists.
4309
4310 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4311
4312         BeOS portability.
4313         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
4314         exist.
4315         Problem reported by Bruno Haible.
4316
4317 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4318
4319         Avoid the need for AC_LIBSOURCES in m4 macros.
4320         * modules/acl (EXTRA_DIST): Add acl.h.
4321         * modules/argmatch (Files): Add m4/argmatch.m4.
4322         (configure.ac): Add gl_ARGMATCH.
4323         (EXTRA_DIST): Renamed from lib_SOURCES, for
4324         consistency with the other modules.  Remove argmatch.c.
4325         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
4326         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
4327         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
4328         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
4329         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
4330         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
4331         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
4332         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
4333         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
4334         * modules/closeout (EXTRA_DIST): Add closeout.h.
4335         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
4336         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
4337         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
4338         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
4339         dirname.h; remove basename.c and stripslash.c.
4340         * modules/exclude (EXTRA_DIST): Add exclude.h.
4341         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
4342         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
4343         * modules/file-type (EXTRA_DIST): Add file-type.h.
4344         * modules/filemode (EXTRA_DIST): Add filemode.h.
4345         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
4346         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4347         * modules/fpending (EXTRA_DIST): Add __fpending.h.
4348         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
4349         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
4350         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
4351         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
4352         * modules/getdate (EXTRA_DIST): Add getdate.c.
4353         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
4354         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
4355         * modules/getpass (EXTRA_DIST): Add getpass.h.
4356         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
4357         * modules/group-member (EXTRA_DIST): Add group-member.h.
4358         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
4359         * modules/hash (EXTRA_DIST): Add hash.h.
4360         * modules/human (EXTRA_DIST): Add human.h.
4361         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
4362         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
4363         * modules/lchown (EXTRA_DIST): Add lchown.h.
4364         * modules/long-options (EXTRA_DIST): Add long-options.h.
4365         * modules/lstat (EXTRA_DIST): Add lstat.h.
4366         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
4367         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
4368         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
4369         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
4370         * modules/memxor (EXTRA_DIST): Add memxor.h.
4371         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
4372         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
4373         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
4374         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
4375         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
4376         * modules/physmem (EXTRA_DIST): Add physmem.h.
4377         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
4378         * modules/posixver (EXTRA_DIST): Add posixver.h.
4379         * modules/quote (EXTRA_DIST): Add quote.h.
4380         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
4381         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
4382         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
4383         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
4384         regex_internal.h regexec.c.
4385         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
4386         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
4387         * modules/same (EXTRA_DIST): Add same.h.
4388         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
4389         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
4390         * modules/savedir (EXTRA_DIST): Add savedir.h.
4391         * modules/sha1 (EXTRA_DIST): Add sha1.h.
4392         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
4393         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
4394         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
4395         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
4396         * modules/strdup (EXTRA_DIST): Add strdup.h.
4397         * modules/strftime (EXTRA_DIST): Add strftime.h.
4398         * modules/strndup (EXTRA_DIST): Add strndup.h.
4399         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
4400         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
4401         * modules/time_r (EXTRA_DIST): Add time_r.h.
4402         * modules/timespec (EXTRA_DIST): Add timespec.h.
4403         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4404         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
4405         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
4406         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
4407         * modules/userspec (EXTRA_DIST): Add userspec.h.
4408         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
4409         * modules/utimens (EXTRA_DIST): Add utimens.h.
4410         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
4411         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
4412         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
4413         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
4414         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
4415         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
4416         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
4417         * modules/yesno (EXTRA_DIST): Add yesno.h.
4418
4419 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4420
4421         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
4422
4423         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
4424         * m4/dev-ino.m4, same-inode.m4: Remove.
4425
4426         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
4427         * m4/acl.m4 (AC_FUNC_ACL):
4428         * m4/backupfile.m4 (gl_BACKUPFILE):
4429         * m4/c-strtod.m4 (gl_C99_STRTOLD):
4430         * m4/canon-host.m4 (gl_CANON_HOST):
4431         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4432         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
4433         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
4434         * m4/cloexec.m4 (gl_CLOEXEC):
4435         * m4/close-stream.m4 (gl_CLOSE_STREAM):
4436         * m4/closeout.m4 (gl_CLOSEOUT):
4437         * m4/dirfd.m4 (gl_FUNC_DIRFD):
4438         * m4/dirname.m4 (gl_DIRNAME):
4439         * m4/exclude.m4 (gl_EXCLUDE):
4440         * m4/exitfail.m4 (gl_EXITFAIL):
4441         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
4442         * m4/file-type.m4 (gl_FILE_TYPE):
4443         * m4/filemode.m4 (gl_FILEMODE):
4444         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
4445         * m4/fpending.m4 (gl_FUNC_FPENDING):
4446         * m4/fprintftime.m4 (gl_FPRINTFTIME):
4447         * m4/fts.m4 (gl_FUNC_FTS):
4448         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
4449         * m4/getdate.m4 (gl_GETDATE):
4450         * m4/gethrxtime.m4 (gl_GETHRXTIME):
4451         * m4/getpagesize.m4 (gl_GETPAGESIZE):
4452         * m4/getpass.m4 (gl_FUNC_GETPASS):
4453         * m4/gettime.m4 (gl_GETTIME):
4454         * m4/getugroups.m4 (gl_GETUGROUPS):
4455         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
4456         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
4457         * m4/hard-locale.m4 (gl_HARD_LOCALE):
4458         * m4/hash.m4 (gl_HASH):
4459         * m4/idcache.m4 (gl_IDCACHE):
4460         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
4461         * m4/lchown.m4 (gl_FUNC_LCHOWN):
4462         * m4/long-options.m4 (gl_LONG_OPTIONS):
4463         * m4/lstat.m4 (gl_FUNC_LSTAT):
4464         * m4/md5.m4 (gl_MD5):
4465         * m4/memcasecmp.m4 (gl_MEMCASECMP):
4466         * m4/memcoll.m4 (gl_MEMCOLL):
4467         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
4468         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
4469         * m4/memxor.m4 (gl_MEMXOR):
4470         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
4471         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
4472         * m4/modechange.m4 (gl_MODECHANGE):
4473         * m4/mountlist.m4 (gl_MOUNTLIST):
4474         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4475         * m4/openat.m4 (gl_FUNC_OPENAT):
4476         * m4/pathmax.m4 (gl_PATHMAX):
4477         * m4/physmem.m4 (gl_PHYSMEM):
4478         * m4/posixtm.m4 (gl_POSIXTM):
4479         * m4/posixver.m4 (gl_POSIXVER):
4480         * m4/quote.m4 (gl_QUOTE):
4481         * m4/quotearg.m4 (gl_QUOTEARG):
4482         * m4/readtokens.m4 (gl_READTOKENS):
4483         * m4/readutmp.m4 (gl_READUTMP):
4484         * m4/regex.m4 (gl_REGEX):
4485         * m4/safe-read.m4 (gl_SAFE_READ):
4486         * m4/safe-write.m4 (gl_SAFE_WRITE):
4487         * m4/same.m4 (gl_SAME):
4488         * m4/save-cwd.m4 (gl_SAVE_CWD):
4489         * m4/savedir.m4 (gl_SAVEDIR):
4490         * m4/settime.m4 (gl_SETTIME):
4491         * m4/sha1.m4 (gl_SHA1):
4492         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
4493         * m4/stat-macros.m4 (gl_STAT_MACROS):
4494         * m4/stat-time.m4 (gl_STAT_TIME):
4495         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
4496         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
4497         * m4/strdup.m4 (gl_FUNC_STRDUP):
4498         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
4499         * m4/strndup.m4 (gl_FUNC_STRNDUP):
4500         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
4501         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
4502         * m4/time_r.m4 (gl_TIME_R):
4503         * m4/timespec.m4 (gl_TIMESPEC):
4504         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
4505         * m4/unlinkdir.m4 (gl_UNLINKDIR):
4506         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
4507         * m4/userspec.m4 (gl_USERSPEC):
4508         * m4/utimecmp.m4 (gl_UTIMECMP):
4509         * m4/utimens.m4 (gl_UTIMENS):
4510         * m4/xalloc.m4 (gl_XALLOC):
4511         * m4/xgetcwd.m4 (gl_XGETCWD):
4512         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
4513         * m4/xreadlink.m4 (gl_XREADLINK):
4514         * m4/xstrtod.m4 (gl_XSTRTOD):
4515         * m4/yesno.m4 (gl_YESNO):
4516         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4517         to get the necessary .h files and whatnot.
4518
4519 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
4520             Bruno Haible  <bruno@clisp.org>
4521
4522         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
4523         /bin/sh understanding of '!' conditional negation.
4524
4525 2006-08-21  Jim Meyering  <jim@meyering.net>
4526
4527         * modules/openat (Depends-on): Really alphabetize.
4528
4529         * modules/acl (Depends-on): Add error and quote.
4530
4531         * check-module (find_included_lib_files): Add at-func.c to the
4532         ok-to-include-more-than-once white list.
4533
4534         * modules/openat (Depends-on): Add lstat.  Alphabetize.
4535
4536 2006-08-21  Bruno Haible  <bruno@clisp.org>
4537
4538         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4539         Emit a pkgdata_DATA variable only if some snippets add contents to it.
4540         Reported by Martin Lambers <marlam@marlam.de>.
4541
4542 2006-08-21  Bruno Haible  <bruno@clisp.org>
4543
4544         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
4545         specify an installation location, don't emit a noinst_LIBRARIES or
4546         noinst_LTLIBRARIES assignment.
4547
4548 2006-08-21  Bruno Haible  <bruno@clisp.org>
4549
4550         BeOS portability.
4551         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
4552         BeOS has mbrtowc() but no <wctype.h>.
4553
4554 2006-08-21  Bruno Haible  <bruno@clisp.org>
4555
4556         BeOS portability.
4557         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
4558         exist.
4559
4560 2006-08-21  Bruno Haible  <bruno@clisp.org>
4561
4562         BeOS portability.
4563         * lib/mbchar.h: Include <wctype.h> only if it exists.
4564
4565 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4566
4567         Remove files that are no longer needed by their respective modules.
4568         * m4/obstack.m4: Remove.
4569         * m4/strerror_r.m4: Remove.
4570         * m4/uint32_t.m4: Remove.
4571         * m4/uintptr_t.m4: Remove.
4572         * m4/ullong_max.m4: Remove.
4573         * m4/xstrtoimax.m4: Remove.
4574         * m4/xstrtoumax.m4: Remove.
4575
4576         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
4577         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
4578         dependencies now capture this.
4579
4580         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
4581         Do not use AC_LIBSOURCES, since gnulib modules now do this.
4582         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
4583         * m4/human.m4 (gl_HUMAN): Likewise.
4584         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
4585         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
4586
4587         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
4588
4589         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
4590         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
4591         stdint.
4592         * m4/human.m4 (gl_HUMAN): Likewise.
4593         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
4594         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
4595         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4596         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4597         * m4/xstrtol (gl_XSTRTOL): Likewise.
4598
4599         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
4600         AC_TYPE_LONG_LONG_INT.
4601         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4602         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
4603         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
4604         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4605
4606         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
4607         on stdbool.
4608
4609         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
4610         (gl_PREREQ_XSTRTOUL): Remove.
4611
4612         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
4613
4614         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
4615         mode.
4616
4617 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4618
4619         Add and change modules to make it easier for coreutils to use
4620         gnulib-tool.
4621         * modules/backupfile (Files): Remove m4/d-ino.m4.
4622         (Depends-on): Add d-ino.
4623         * modules/cycle-check (Depends-on): Add stdint.
4624         (lib_SOURCES): Add cycle-check.h.
4625         * modules/d-ino: New module.
4626         * modules/d-type: New module.
4627         * modules/error (Files): Remove m4/strerror_r.m4.
4628         * modules/filemode (Files): Add m4/st_dm_mode.m4.
4629         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4630         m4/inttypes_h.m4, m4/uintmax_t.m4.
4631         (Depends-on): Add stdint.
4632         (lib_SOURCES): Add fsusage.h.
4633         * modules/getcwd (Files): Remove d-ino.m4.
4634         (Depends-on): Add d-ino.
4635         * modules/getndelim2 (Depends-on): Add stdint.
4636         * modules/glob (Files): Remove m4/d-type.m4.
4637         (Depends-on): Add d-type.
4638         * modules/host-os: New module.
4639         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
4640         m4/inttypes_h.m4, m4/uintmax_t.m4.
4641         * Depends-on: Add stdint.
4642         (lib_SOURCES): Add human.h.
4643         * modules/inttostr (Files): Remove m4/intmax_t.m4,
4644         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
4645         m4/uintmax_t.m4, m4/ulonglong.m4.
4646         (Depends-on): Add stdint.
4647         (EXTRA_DIST): Add inttostr.h.
4648         * modules/lchmod: New module.
4649         * modules/link-follow: New module.
4650         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
4651         (Depends-on): Add lchmod.
4652         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
4653         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
4654         (Depends-on): Add stdint.
4655         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
4656         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4657         (Depends-on): Add stdint.
4658         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
4659         * modules/perl: New module.
4660         * modules/regex (Depends-on): Add stdint.
4661         * modules/rmdir-errno: New module.
4662         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4663         m4/intmax_t.m4.
4664         (Depends-on): Add stdint.
4665         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4666         m4/uintmax_t.m4.
4667         (Depends-on): Add stdint.
4668         * modules/unlink-busy: New module.
4669         * modules/utimecmp (Depends-on): Add stdint.
4670         * modules/uptime: New module.
4671         * modules/winsz-ioctl: New module.
4672         * modules/winsz-termios: New module.
4673         * modules/xnanosleep (Depends-on): Add nanosleep.
4674         * modules/ullong_max: Remove.
4675         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
4676         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
4677         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
4678         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
4679         (Depends-on): Add inttypes.
4680         (lib_SOURCES): Add xstrtol.h.
4681         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
4682         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
4683         * MODULES.html.sh: Move 'assert' into the assert section.
4684         Move 'dummy' into the linking section.
4685         Remove ullong_max.
4686         Add section for compatibility checks for POSIX:2001 functions,
4687         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
4688         winsz-ioctl, and winsz-termios into it.
4689         Add lchmod.
4690         Add top-level Misc section and put host-os, perl, and uptime
4691         into it.
4692
4693 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4694
4695         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
4696         now assume the stdint module.  Do not include inttypes.h.
4697         * lib/fsusage.h: Likewise.
4698         * lib/getndelim2.c: Likewise.
4699         * lib/human.h: Likewise.
4700         * lib/inttostr.h: Likewise.
4701         * lib/obstack.c: Likewise.
4702         * lib/regex_internal.h: Likewise.
4703         * lib/tempname.c: Likewise.
4704         * lib/utimecmp.c: Likewise.
4705         * lib/xstrtol.h: Likewise.
4706
4707         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
4708
4709         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
4710         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
4711         * lib/xtime.h: Likewise.
4712
4713 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4714
4715         * modules/openat (Files): Add lib/fchmodat.c.
4716         Fixes problem reported by Jay Youngman.
4717
4718 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4719
4720         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
4721         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
4722
4723 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
4724             Bruno Haible  <bruno@clisp.org>
4725
4726         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4727         and is a script that invokes bison. Tighten the code. Add comments.
4728
4729 2006-08-18  Jim Meyering  <jim@meyering.net>
4730
4731         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
4732         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
4733         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
4734         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
4735
4736 2006-08-18  Bruno Haible  <bruno@clisp.org>
4737
4738         * modules/bison-i18n: New file.
4739         * MODULES.html.sh (Internationalization functions): Add it.
4740
4741 2006-08-18  Bruno Haible  <bruno@clisp.org>
4742
4743         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
4744         sys/statvfs.h. When getmntinfo was found, check its declaration and
4745         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
4746
4747 2006-08-18  Bruno Haible  <bruno@clisp.org>
4748
4749         * m4/bison-i18n.m4: New file, from bison.
4750
4751 2006-08-18  Bruno Haible  <bruno@clisp.org>
4752
4753         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
4754         (ME_DUMMY): Treat "kernfs" as a dummy.
4755         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
4756
4757 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4758
4759         Update from coreutils.
4760
4761         2006-08-15  Jim Meyering  <jim@meyering.net>
4762
4763         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
4764
4765         2006-01-17  Jim Meyering  <jim@meyering.net>
4766
4767         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
4768
4769         2006-01-11  Jim Meyering  <jim@meyering.net>
4770
4771         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
4772         Check for the lchmod function.
4773
4774 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4775
4776         Update from coreutils.
4777
4778         * lib/__fpending.h: Add copyright notice.
4779         * lib/fprintftime.h: Likewise.
4780         * lib/savedir.c: Use (C) in copyright notice.
4781         * lib/savedir.h: Likewise.
4782
4783         2006-08-15  Jim Meyering  <jim@meyering.net>
4784
4785         * lib/at-func.c: New file, with the logic of all emulated at-functions.
4786         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
4787         in support of the EXPECTED_ERRNO macro.
4788         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
4789         definitions.  Instead, define the appropriate symbols and include
4790         "at-func.c".
4791         * lib/mkdirat.c (mkdirat): Likewise.
4792         * lib/fchmodat.c (fchmodat): Likewise.
4793         (ENOSYS): Remove definition.
4794         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
4795         it.  Don't include "unistd--.h" -- it wasn't ever used.
4796
4797         2006-01-17  Jim Meyering  <jim@meyering.net>
4798
4799         Rewrite fts.c not to change the current working directory,
4800         by using openat, fstatat, fdopendir, etc..
4801
4802         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
4803         (HAVE_OPENAT_SUPPORT): Define.
4804         [_LIBC] (fchdir): Don't undef or define; no longer used.
4805         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
4806         Now, this `function' always succeeds, and consumes its file descriptor
4807         parameter -- so callers must not close such FDs.  Update callers.
4808         (diropen_fd, opendirat, cwd_advance_fd): New functions.
4809         (diropen): Add parameter, SP.  Adjust all callers.
4810         Implement using diropen_fd, rather than open.
4811         (fts_open): Initialize new member, fts_cwd_fd.
4812         Remove fts_rft-setting code.
4813         (fts_close): Close fts_cwd_fd, if necessary.
4814         (__opendir2): Define in terms of opendir or opendirat,
4815         depending on whether the FST_NOCHDIR flag is set.
4816         (fts_build): Since fts_safe_changedir consumes its FD, and since
4817         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
4818         and close the dup'd file descriptor upon failure.
4819         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
4820         (fts_safe_changedir): Tweak semantics to reflect that this function
4821         now calls cwd_advance_fd and hence consumes its FD argument.
4822         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
4823         [struct FTS] (fts_rft): Remove now-unused member.
4824         [struct FTS] (fts_cycle.state): Improve comment.
4825
4826         * lib/openat.c (openat_needs_fchdir): New function.
4827         * lib/openat.h (openat_needs_fchdir): Declare it.
4828
4829 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
4830
4831         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
4832         Problem and fix reported by Pádraig Brady in
4833         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
4834
4835 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4836
4837         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
4838
4839 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4840
4841         * lib/memcoll.c (memcoll): Optimize for the common case where the
4842         arguments are bytewise equal.
4843
4844 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4845
4846         * doc/regexprops-generic.texi: Add a copyright notice.
4847
4848 2006-08-15  Bruno Haible  <bruno@clisp.org>
4849
4850         * modules/tmpdir (License): Change to LGPL.
4851
4852 2006-08-15  Bruno Haible  <bruno@clisp.org>
4853
4854         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
4855         module.
4856
4857 2006-08-14  Simon Josefsson  <jas@extundo.com>
4858
4859         * config/srclist.txt: Add gnupload.
4860
4861 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4862
4863         Change copyright notice from LGPL 2 to GPL 2, since that's the
4864         standard form used in the gnulib repository.
4865         * tests/test-lock.c: Likewise.
4866         * tests/test-stdint.c: Likewise.
4867         * tests/test-tls.c: Likewise.
4868
4869         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
4870         prelude-manager.  User shorter URLs for GNU projects, without '?'.
4871         Add copyright notice.
4872
4873         * check-module: Add copyright notice.  Output a copyright
4874         notice if "--version" is specified.
4875         * modules/COPYING: New file.
4876         * tests/test-getaddrinfo.c: Add copyright notice.
4877         * tests/test-verify.c: Likewise.
4878
4879 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4880
4881         Change copyright notice from LGPL 2 to GPL 2, since that's the
4882         standard form used in the gnulib repository.
4883         * lib/lock.c: LGPL -> GPL.
4884         * lib/lock.h: Likewise.
4885         * lib/strnlen1.c: Likewise.
4886         * lib/strnlen1.h: Likewise.
4887         * lib/tls.c: Likewise.
4888         * lib/tls.h: Likewise.
4889         * lib/tmpdir.c: Likewise.
4890
4891         * lib/TODO: Remove; this belongs only in coreutils.
4892
4893 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4894
4895         Add copyright notices to long-enough files that lack them, since
4896         otherwise the files aren't clearly free.  Use the same notice that
4897         getdate.texi already uses.
4898         * doc/alloca-opt.texi: Add copyright notice.
4899         * doc/alloca.texi: Likewise.
4900         * doc/ctime.texi: Likewise.
4901         * doc/functions.texi: Likewise.
4902         * doc/gcd.texi: Likewise.
4903         * doc/gnulib-tool.texi: Likewise.
4904         * doc/inet_ntoa.texi: Likewise.
4905         * doc/visibility.texi: Likewise.
4906
4907         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
4908         * doc/quote.texi: Add copyright notice.
4909
4910         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
4911         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
4912         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
4913         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
4914         is now obsolete, and give a pointer to the Sun list.
4915         Add copyright notice.
4916
4917 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4918
4919         * config/srclistvars.sh: Add copyright notice.
4920
4921 2006-08-14  Eric Blake  <ebb9@byu.net>
4922
4923         Import the following change from libc:
4924
4925         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4926
4927         Upstream bug 2997.
4928         * lib/misc/error.c: Add space between program name and message if file
4929         name is missing.
4930
4931 2006-08-12  Karl Berry  <karl@gnu.org>
4932
4933         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
4934         remove, these originate in gnulib now.
4935
4936 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4937
4938         * doc/Makefile (standards.info standards.html standards.dvi):
4939         Also depend on make-stds.texi.
4940
4941 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
4942
4943         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
4944         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
4945
4946         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
4947         in wchar_t.  Problem reported by Eric Blake.
4948
4949         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
4950         LEN is smaller than SIZE.  Suggested by Bruno Haible.
4951         Also, help the compiler to keep LEN in a register.
4952
4953 2006-08-11  Eric Blake  <ebb9@byu.net>
4954
4955         * users.txt: Sort.  Add tar.
4956
4957 2006-08-11  Bruno Haible  <bruno@clisp.org>
4958
4959         * users.txt: New file.
4960
4961 2006-08-11  Bruno Haible  <bruno@clisp.org>
4962
4963         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
4964         before <wchar.h>. Needed for OSF/1 and BSD/OS.
4965
4966 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4967
4968         * modules/snprintf (Depends-on): Remove minmax.
4969         (Maintainer): Add self and Bruno.
4970
4971 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4972
4973         * lib/.cppi-disable: Add snprintf.h, socket_.h.
4974         * lib/snprintf.c: Include <errno.h> and <limits.h>.
4975         (EOVERFLOW): Define if the system does not.
4976         Do not include "minmax.h"; it wasn't used.
4977         (snprintf): Don't assume size_t promotes to an unsigned type.
4978         Fix bug when generated string was too long for the buffer: the
4979         buffer's contents are supposed to be the initial prefix of the
4980         output.  Don't assume vasnprintf returns EOVERFLOW if the size
4981         exceeds INT_MAX; do the check ourselves.
4982
4983         Import the following changes from libc:
4984
4985         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
4986
4987         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
4988         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
4989         set wc to the byte which couldn't be converted.
4990         (re_string_reconstruct): Don't clear valid_raw_len before calling
4991         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
4992         tip_context using re_string_context_at.
4993
4994         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
4995
4996         * lib/posix/regex.h: g++ still cannot handled [restrict].
4997
4998         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
4999
5000         * lib/posix/regex.h: Remove special handling for VMS.
5001
5002 2006-08-10  Jim Meyering  <jim@meyering.net>
5003
5004         * modules/same-inode: New module.
5005         * modules/dev-ino: New module.
5006         * modules/cycle-check: Depend on these modules, rather than simply
5007         including their .h files.
5008         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
5009         required via m4/cycle-check.m4.
5010         * modules/same: Depend on new same-inode module, rather than
5011         including same-inode.h.
5012         * modules/chdir-safer: New file.
5013
5014         * modules/chown (Depends-on): Add stat-macros.
5015
5016 2006-08-10  Jim Meyering  <jim@meyering.net>
5017
5018         * m4/cycle-check.m4: New file.
5019         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
5020         * m4/dev-ino.m4, m4/same-inode.m4: New files.
5021
5022 2006-08-10  Eric Blake  <ebb9@byu.net>
5023
5024         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
5025         in from original proposal.
5026
5027 2006-08-10  Eric Blake  <ebb9@byu.net>
5028         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5029
5030         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
5031         namespace.
5032
5033 2006-08-10  Bruno Haible  <bruno@clisp.org>
5034
5035         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
5036         as well.
5037
5038 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5039
5040         Sync from coreutils.
5041
5042         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
5043
5044         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
5045         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
5046
5047 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5048
5049         * modules/restrict: Remove; no longer needed now that we assume
5050         Autoconf 2.59 or later.
5051         * MODULES.html.sh: Remove 'restrict'.
5052         * modules/argp (Depends-on): Remove 'restrict'.
5053         * modules/base64 (Depends-on): Likewise.
5054         * modules/gc (Depends-on): Likewise.
5055         * modules/getaddrinfo (Depends-on): Likewise.
5056         * modules/glob (Depends-on): Likewise.
5057         * modules/inet_ntop (Depends-on): Likewise.
5058         * modules/inet_pton (Depends-on): Likewise.
5059         * modules/memxor (Depends-on): Likewise.
5060         * modules/regex (Depends-on): Likewise.
5061         * modules/strtok_r (Depends-on): Likewise.
5062         * modules/time_r (Depends-on): Likewise.
5063
5064 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5065
5066         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
5067         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
5068         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5069         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
5070         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
5071         * m4/memxor.m4 (gl_MEMXOR): Likewise.
5072         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
5073         gl_C_RESTRICT replaced by AC_C_RESTRICT.
5074
5075         Merge from coreutils.
5076         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
5077         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
5078         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5079         * m4/time_r.m4 (gl_TIME_R): Likewise.
5080
5081 2006-08-09  Karl Berry  <karl@gnu.org>
5082
5083         * config/srclist.txt: no more gettext-tools, per Bruno.
5084
5085 2006-08-08  Eric Blake  <ebb9@byu.net>
5086
5087         * modules/verror: New module.
5088         * MODULES.html.sh: Document it.
5089
5090 2006-08-08  Eric Blake  <ebb9@byu.net>
5091
5092         * lib/verror.h, lib/verror.c: New files.
5093
5094 2006-08-08  Eric Blake  <ebb9@byu.net>
5095
5096         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
5097         verror_at_line output complies with GNU Coding Standards even when
5098         file is NULL.
5099
5100 2006-08-07  Bruno Haible  <bruno@clisp.org>
5101
5102         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
5103         versions of AIX.
5104         Reported by Ralf Wildenhues.
5105
5106 2006-08-07  Bruno Haible  <bruno@clisp.org>
5107
5108         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
5109         in an AC_DEFUN. Needed so that the autoconf snippets can use
5110         AC_REQUIRE.
5111
5112 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5113
5114         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5115         Initialize pkgdata_DATA.
5116         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
5117         overriding it.
5118
5119 2006-08-06  Eric Blake  <ebb9@byu.net>
5120
5121         * lib/error.h: Fold in some upstream changes from glibc.
5122         * lib/error.c: Likewise.
5123
5124 2006-08-04  Bruno Haible  <bruno@clisp.org>
5125
5126         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5127         Make the mostlyclean-local rule depend on mostlyclean-generic.
5128         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
5129
5130 2006-07-31  Bruno Haible  <bruno@clisp.org>
5131
5132         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
5133         <stdlib.h>, <string.h>.
5134
5135 2006-07-30  Bruno Haible  <bruno@clisp.org>
5136
5137         * modules/readlink (License): Change to LGPL.
5138
5139 2006-07-30  Bruno Haible  <bruno@clisp.org>
5140
5141         * modules/javaversion (Makefile.am): Distribute javaversion.java and
5142         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
5143         set PKGDATADIR to point to it.
5144
5145 2006-07-30  Bruno Haible  <bruno@clisp.org>
5146
5147         * modules/csharpexec (configure.ac): Comment out macro invocation.
5148         * modules/javaexec (configure.ac): Likewise.
5149         * modules/javacomp-script (configure.ac): Likewise.
5150
5151         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
5152
5153 2006-07-30  Bruno Haible  <bruno@clisp.org>
5154
5155         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
5156         linked-list.
5157
5158 2006-07-30  Bruno Haible  <bruno@clisp.org>
5159
5160         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
5161
5162 2006-07-30  Bruno Haible  <bruno@clisp.org>
5163
5164         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5165         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
5166         get removed.
5167
5168 2006-07-29  Bruno Haible  <bruno@clisp.org>
5169
5170         Make it possible for gnulib-tool to work with locally modified or
5171         augmented gnulib repositories.
5172         * gnulib-tool (func_usage): Document --local-dir option.
5173         (local_gnulib_dir): New variable.
5174         Handle --local-dir option.
5175         (func_lookup_file): New function.
5176         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
5177         (func_get_description, func_get_filelist, func_get_description,
5178         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
5179         func_get_automake_snippet, func_get_include_directive,
5180         func_get_license, func_get_maintainer): Use func_lookup_file.
5181         (func_import, func_create_testdir): Use func_lookup_file.
5182
5183 2006-07-29  Bruno Haible  <bruno@clisp.org>
5184
5185         * modules/setenv (Depends-on): Add unistd.
5186
5187 2006-07-29  Bruno Haible  <bruno@clisp.org>
5188
5189         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
5190
5191 2006-07-29  Bruno Haible  <bruno@clisp.org>
5192
5193         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
5194
5195 2006-07-29  Bruno Haible  <bruno@clisp.org>
5196
5197         * gnulib-tool (import, update): If there is no Makefile.am, look at
5198         aclocal.m4, instead of bailing out.
5199
5200 2006-07-29  Bruno Haible  <bruno@clisp.org>
5201
5202         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
5203         Categorize the options by when they are useful.
5204
5205 2006-07-29  Bruno Haible  <bruno@clisp.org>
5206
5207         * gnulib-tool (func_usage): Document option --no-libtool.
5208         Handle option --no-libtool.
5209         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
5210         for changed semantics of $libtool variable.
5211         (func_import): Likewise. If libtool is not used, show this through
5212         an option --no-libtool.
5213         (func_create_testdir): Update.
5214
5215 2006-07-29  Bruno Haible  <bruno@clisp.org>
5216
5217         * gnulib-tool (func_import): Extend error message about missing
5218         --doc-base.
5219
5220 2006-07-29  Bruno Haible  <bruno@clisp.org>
5221
5222         * gnulib-tool (func_import): Don't create the $docbase directory if
5223         there is no file to store there.
5224
5225 2006-07-29  Bruno Haible  <bruno@clisp.org>
5226
5227         * gnulib-tool (autoconf_minversion): If a --dir option is given and
5228         relevant, look for configure.ac there, not in the current directory.
5229         Also use a simple search for AC_PREREQ, not "autoconf --trace".
5230
5231 2006-07-29  Bruno Haible  <bruno@clisp.org>
5232
5233         * gnulib-tool (SORT): New variable.
5234         (func_usage): Undocument --assume-autoconf option.
5235         Remove --assume-autoconf option handling.
5236         (autoconf_minversion): Determine from the contents of configure.ac.
5237         (func_import): Remove autoconf_minversion handling.
5238         Suggested by Eric Blake.
5239
5240 2006-07-29  Bruno Haible  <bruno@clisp.org>
5241
5242         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
5243
5244 2006-07-29  Bruno Haible  <bruno@clisp.org>
5245
5246         * config/srclist.txt (*setenv.[ch]): Remove rules.
5247
5248 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5249
5250         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
5251
5252 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5253
5254         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
5255         arpa/inet.h.
5256
5257 2006-07-28  Simon Josefsson  <jas@extundo.com>
5258
5259         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
5260         * modules/inet_pton (Depends-on): Likewise.
5261
5262 2006-07-28  Simon Josefsson  <jas@extundo.com>
5263
5264         * m4/netinet_in_h.m4: New file.
5265
5266 2006-07-28  Simon Josefsson  <jas@extundo.com>
5267
5268         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
5269         #include's.
5270
5271 2006-07-28  Simon Josefsson  <jas@extundo.com>
5272
5273         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
5274         #include's.
5275
5276 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
5277
5278         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
5279         setgid on directories only if they set these bits.
5280         * lib/modechange.h: Remove obsolete comment about masks.
5281
5282 2006-07-28  Eric Blake  <ebb9@byu.net>
5283
5284         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
5285         macro expansion.
5286
5287 2006-07-28  Bruno Haible  <bruno@clisp.org>
5288
5289         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
5290
5291 2006-07-28  Bruno Haible  <bruno@clisp.org>
5292
5293         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
5294
5295 2006-07-28  Bruno Haible  <bruno@clisp.org>
5296
5297         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
5298         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
5299         Define fallbacks.
5300         Avoids link error on FreeBSD 4.x.
5301         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
5302
5303         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
5304         encoding.
5305         * lib/mbswidth.c (iswcntrl): Likewise.
5306
5307 2006-07-27  Bruno Haible  <bruno@clisp.org>
5308
5309         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
5310         test.
5311
5312 2006-07-27  Bruno Haible  <bruno@clisp.org>
5313
5314         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
5315         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
5316         defined.
5317
5318 2006-07-26  Eric Blake  <ebb9@byu.net>
5319
5320         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
5321
5322 2006-07-26  Eric Blake  <ebb9@byu.net>
5323
5324         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
5325         like mingw that lack mkstemp.
5326         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
5327         avoid compilation warning on mingw.
5328
5329 2006-07-26  Bruno Haible  <bruno@clisp.org>
5330
5331         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
5332         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
5333         INT_FAST*_MIN, INTPTR_MIN.
5334
5335 2006-07-25  Bruno Haible  <bruno@clisp.org>
5336
5337         * modules/version-etc (Depends-on): Add stdarg.
5338
5339 2006-07-25  Bruno Haible  <bruno@clisp.org>
5340
5341         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
5342         complex commands.
5343
5344 2006-07-25  Bruno Haible  <bruno@clisp.org>
5345
5346         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
5347         defined in <stdarg.h> or config.h.
5348
5349 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5350
5351         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
5352         (gl_STDIO_SAFER): Remove.
5353
5354 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5355
5356         * MODULES.html.sh (File stream based Input/Output):
5357         Add fopen-safer, tmpfile-safer; remove stdio-safer.
5358         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
5359         * modules/fopen-safer, modules/tmpfile-safer: New files.
5360         * modules/stdio-safer: Remove.
5361
5362 2006-07-24  Bruno Haible  <bruno@clisp.org>
5363
5364         * modules/tmpdir: New file.
5365         * MODULES.html.sh (File system functions): Add it.
5366
5367 2006-07-24  Bruno Haible  <bruno@clisp.org>
5368
5369         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
5370         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
5371
5372 2006-07-24  Bruno Haible  <bruno@clisp.org>
5373
5374         * modules/clean-temp: New file.
5375
5376 2006-07-24  Bruno Haible  <bruno@clisp.org>
5377
5378         * m4/tmpdir.m4: New file, from GNU gettext.
5379
5380 2006-07-24  Bruno Haible  <bruno@clisp.org>
5381
5382         * lib/tmpdir.h: New file, from GNU gettext.
5383         * lib/tmpdir.c: New file, from GNU gettext.
5384
5385 2006-07-24  Bruno Haible  <bruno@clisp.org>
5386
5387         * lib/clean-temp.h: New file, from GNU gettext.
5388         * lib/clean-temp.c: New file, from GNU gettext.
5389
5390 2006-07-23  Eric Blake  <ebb9@byu.net>
5391
5392         * modules/stdio-safer (Files): Add tmpfile-safer.c.
5393         (Depends-on): Add binary-io.
5394
5395 2006-07-23  Eric Blake  <ebb9@byu.net>
5396
5397         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
5398
5399 2006-07-23  Eric Blake  <ebb9@byu.net>
5400
5401         * lib/tmpfile-safer.c: New file.
5402         * lib/stdio-safer.h (fopen_safer): Add prototype.
5403         * lib/stdio--.h (tmpfile): Make safer.
5404
5405 2006-07-23  Bruno Haible  <bruno@clisp.org>
5406
5407         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
5408         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
5409         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
5410         gl_linked_remove_at): Use it.
5411
5412 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5413         and Simon Josefsson <jas@extundo.com>
5414
5415         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
5416
5417         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
5418
5419 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5420
5421         * modules/close-stream: New file.
5422         * modules/closeout (Description): Make it clear that it exits
5423         with a diagnostic on error.
5424         (Depends-on): Add close-stream.  Remove fpending, stdbool.
5425         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
5426
5427 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5428
5429         * m4/close-stream.m4: New file.
5430
5431 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5432
5433         * lib/close-stream.c, lib/close-stream.h: New files.
5434
5435 2006-07-22  Bruno Haible  <bruno@clisp.org>
5436
5437         Merge from GNU gettext 0.15.
5438
5439         2006-05-01  Bruno Haible  <bruno@clisp.org>
5440
5441                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
5442
5443         2006-07-22  Bruno Haible  <bruno@clisp.org>
5444
5445                 * modules/javaversion: New file.
5446                 * MODULES.html.sh (Java): Add javaversion.
5447
5448         2006-03-12  Bruno Haible  <bruno@clisp.org>
5449
5450                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
5451
5452         2005-12-04  Bruno Haible  <bruno@clisp.org>
5453
5454                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
5455                 (untested).
5456
5457         2006-06-21  Bruno Haible  <bruno@clisp.org>
5458
5459                 Avoid warnings from recent versions of mcs.
5460                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
5461                 -o, -L, -r any more. Use options documented since mcs-1.0
5462                 instead. Similarly for -g.
5463
5464         2005-12-04  Bruno Haible  <bruno@clisp.org>
5465
5466                 * build-aux/csharpcomp.sh.in: Suffix for resources is
5467                 .resources, not .resource.
5468
5469         2005-07-09  Bruno Haible  <bruno@clisp.org>
5470
5471                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
5472                 add a .dll suffix.
5473                 Reported by Mark Junker <mjscod@gmx.de>.
5474
5475         2006-07-22  Bruno Haible  <bruno@clisp.org>
5476
5477                 * modules/gettext: Upgrade to gettext-0.15.
5478                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
5479                 m4/visibility.m4.
5480                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
5481
5482 2006-07-22  Bruno Haible  <bruno@clisp.org>
5483
5484         Merge from GNU gettext 0.15.
5485
5486         2006-03-25  Bruno Haible  <bruno@clisp.org>
5487
5488                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
5489
5490         2006-07-21  Bruno Haible  <bruno@clisp.org>
5491
5492                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
5493                 "1.1".
5494
5495         2006-05-09  Bruno Haible  <bruno@clisp.org>
5496
5497                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
5498                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
5499                 for the conftestver execution.
5500
5501         2006-05-01  Bruno Haible  <bruno@clisp.org>
5502
5503                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
5504                 optional target-version argument. Verify that the compiler
5505                 groks source of the specified source-version, or add -source
5506                 option as necessary. Verify that the compiler produces
5507                 bytecode in the specified target-version, or add -target and
5508                 -source options as necessary. Make the result of the test
5509                 available as variable CONF_JAVAC. Also log error output in
5510                 config.log.
5511
5512         2006-03-11  Bruno Haible  <bruno@clisp.org>
5513
5514                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
5515
5516         2006-05-09  Bruno Haible  <bruno@clisp.org>
5517
5518                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
5519                 CLASSPATH_SEPARATOR to a semicolon.
5520
5521         2006-03-12  Bruno Haible  <bruno@clisp.org>
5522
5523                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
5524                 available as variable CONF_JAVA, for subsequent autoconf
5525                 tests. Also log error output in config.log.
5526
5527         2006-07-19  Bruno Haible  <bruno@clisp.org>
5528
5529                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
5530                 that getline works on glibc2 systems. Needed to avoid trouble
5531                 in relocatable.c.
5532                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
5533
5534         2005-12-04  Bruno Haible  <bruno@clisp.org>
5535
5536                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
5537                 launcher (untested).
5538
5539         2005-12-04  Bruno Haible  <bruno@clisp.org>
5540
5541                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
5542
5543         2006-07-22  Bruno Haible  <bruno@clisp.org>
5544
5545                 * gettext.m4: Update from GNU gettext-0.15.
5546                 * nls.m4: Likewise.
5547                 * po.m4: Likewise.
5548                 * inttypes-pri.m4: Likewise.
5549                 * inttypes-h.m4: Renamed from inttypes.m4.
5550                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
5551
5552 2006-07-22  Bruno Haible  <bruno@clisp.org>
5553
5554         Merge from GNU gettext 0.15.
5555
5556         2005-07-05  Bruno Haible  <bruno@clisp.org>
5557
5558                 * printf-args.c (printf_fetchargs): Work around broken
5559                 definition of wint_t on mingw.
5560
5561         2005-02-12  Bruno Haible  <bruno@clisp.org>
5562
5563                 * xallocsa.h: Add extern "C" for C++.
5564
5565         2006-05-17  Bruno Haible  <bruno@clisp.org>
5566
5567                 Cygwin portability.
5568                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
5569
5570         2006-04-30  Bruno Haible  <bruno@clisp.org>
5571
5572                 * progreloc.c: Include <mach-o/dyld.h> if available.
5573                 (find_executable): Use _NSGetExecutablePath when possible.
5574
5575         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5576
5577                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
5578                 function.
5579
5580         2005-12-29  Bruno Haible  <bruno@clisp.org>
5581
5582                 * progreloc.c (set_program_name_and_installdir): Fix
5583                 compilation error.
5584
5585         2005-12-04  Bruno Haible  <bruno@clisp.org>
5586
5587                 Cygwin portability.
5588                 * progreloc.c: Include <windows.h> also on Cygwin.
5589                 (find_executable): Add support for Cygwin.
5590                 (set_program_name_and_installdir): Handle also platforms with
5591                 nonempty EXEEXT.
5592
5593         2006-07-11  Bruno Haible  <bruno@clisp.org>
5594
5595                 * javacomp.c: Fix a comment.
5596                 Reported by Jim Meyering.
5597
5598         2006-04-30  Bruno Haible  <bruno@clisp.org>
5599
5600                 * javacomp.h (compile_java_class): Add source_version,
5601                 target_version arguments.
5602                 * javacomp.c: Rewritten to choose only a compiler that
5603                 respects the specified source_version and target_version.
5604
5605         2006-06-27  Bruno Haible  <bruno@clisp.org>
5606
5607                 Assume correct S_ISDIR macro.
5608                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
5609
5610         2006-07-22  Bruno Haible  <bruno@clisp.org>
5611
5612                 * javaversion.h: New file, from GNU gettext.
5613                 * javaversion.c: New file, from GNU gettext.
5614                 * javaversion.java: New file, from GNU gettext.
5615                 * javaversion.class: New file, from GNU gettext.
5616
5617         2006-05-17  Bruno Haible  <bruno@clisp.org>
5618
5619                 Cygwin portability.
5620                 * javaexec.c (execute_java_class): Test for jview program
5621                 also on Cygwin.
5622
5623         2006-04-09  Bruno Haible  <bruno@clisp.org>
5624
5625                 * fatal-signal.c: Don't include string.h.
5626                 (at_fatal_signal): Use a copying loop instead of memcpy.
5627
5628         2005-12-04  Bruno Haible  <bruno@clisp.org>
5629
5630                 * csharpexec.c: Add support for 'clix' launcher (untested).
5631                 (execute_csharp_using_sscli): New function.
5632                 (execute_csharp_program): Call it.
5633
5634         2006-06-21  Bruno Haible  <bruno@clisp.org>
5635
5636                 Avoid warnings from recent versions of mcs.
5637                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
5638                 -o, -L, -r any more. Use options documented since mcs-1.0
5639                 instead. Similarly for -g.
5640
5641         2005-07-09  Bruno Haible  <bruno@clisp.org>
5642
5643                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
5644                 add a .dll suffix.
5645                 Reported by Mark Junker <mjscod@gmx.de>.
5646
5647         2006-06-17  Bruno Haible  <bruno@clisp.org>
5648
5649                 * config.charset: Update for NetBSD 3.0.
5650
5651         2006-05-17  Bruno Haible  <bruno@clisp.org>
5652
5653                 Cygwin portability.
5654                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
5655
5656         2006-05-16  Bruno Haible  <bruno@clisp.org>
5657
5658                 * localcharset.c [CYGWIN]: Include <windows.h>.
5659                 (get_charset_aliases): For Cygwin, return the same CPxxx
5660                 aliases list as under WIN32.
5661                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
5662                 the environment variables. Fall back to GetACP().
5663
5664         2006-04-05  Bruno Haible  <bruno@clisp.org>
5665
5666                 * config.charset: Update Juan Manuel Guerrero's address.
5667
5668         2005-02-12  Bruno Haible  <bruno@clisp.org>
5669
5670                 * allocsa.h: Add extern "C" for C++.
5671
5672         2005-02-10  Bruno Haible  <bruno@clisp.org>
5673
5674                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
5675                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
5676
5677         2006-07-22  Bruno Haible  <bruno@clisp.org>
5678
5679                 * gettext.h: Update to GNU gettext-0.15.
5680
5681 2006-07-22  Bruno Haible  <bruno@clisp.org>
5682
5683         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
5684         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
5685         lib-prefix.m4, longdouble.m4, ssize_t.m4.
5686
5687 2006-07-21  Eric Blake  <ebb9@byu.net>
5688
5689         * modules/stdlib-safer: New file.
5690         * MODULES.html.sh (File stream based Input/Output): Add
5691         stdlib-safer.
5692
5693 2006-07-21  Eric Blake  <ebb9@byu.net>
5694
5695         * lib/stdlib-safer.h: New file from coreutils, required by
5696         stdlib--.h.
5697
5698 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
5699
5700         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
5701
5702 2006-07-20  Bruno Haible  <bruno@clisp.org>
5703
5704         * gnulib-tool: Recognize new option --assume-autoconf.
5705         (autoconf_minversion): New variable.
5706         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
5707
5708 2006-07-20  Bruno Haible  <bruno@clisp.org>
5709
5710         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
5711
5712 2006-07-19  Derek R. Price  <derek@ximbiot.com>
5713
5714         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
5715         Reindent and repaginate.
5716
5717 2006-07-19  Derek Price  <derek@ximbiot.com>
5718
5719         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
5720         Correct grammar.
5721
5722 2006-07-17  Bruno Haible  <bruno@clisp.org>
5723
5724         * modules/list: New file.
5725         * modules/array-list: New file.
5726         * modules/carray-list, modules/carray-list-tests: New files.
5727         * modules/linked-list, modules/linked-list-tests: New files.
5728         * modules/avltree-list, modules/avltree-list-tests: New files.
5729         * modules/rbtree-list, modules/rbtree-list-tests: New files.
5730         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
5731         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
5732         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
5733         * modules/oset: New file.
5734         * modules/array-oset: New file.
5735         * modules/avltree-oset, modules/avltree-oset-tests: New files.
5736         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
5737         * tests/test-carray_list.c: New file.
5738         * tests/test-linked_list.c: New file.
5739         * tests/test-avltree_list.c: New file.
5740         * tests/test-rbtree_list.c: New file.
5741         * tests/test-linkedhash_list.c: New file.
5742         * tests/test-avltreehash_list.c: New file.
5743         * tests/test-rbtreehash_list.c: New file.
5744         * tests/test-avltree_oset.c: New file.
5745         * tests/test-rbtree_oset.c: New file.
5746         * MODULES.html.sh (Container data structures): New section.
5747
5748 2006-07-17  Bruno Haible  <bruno@clisp.org>
5749
5750         * m4/gl_list.m4: New file.
5751
5752 2006-07-17  Bruno Haible  <bruno@clisp.org>
5753
5754         * lib/gl_list.h: New file.
5755         * lib/gl_list.c: New file.
5756         * lib/gl_array_list.h: New file.
5757         * lib/gl_array_list.c: New file.
5758         * lib/gl_carray_list.h: New file.
5759         * lib/gl_carray_list.c: New file.
5760         * lib/gl_linked_list.h: New file.
5761         * lib/gl_linked_list.c: New file.
5762         * lib/gl_anylinked_list1.h: New file.
5763         * lib/gl_anylinked_list2.h: New file.
5764         * lib/gl_avltree_list.h: New file.
5765         * lib/gl_avltree_list.c: New file.
5766         * lib/gl_anyavltree_list1.h: New file.
5767         * lib/gl_anyavltree_list2.h: New file.
5768         * lib/gl_rbtree_list.h: New file.
5769         * lib/gl_rbtree_list.c: New file.
5770         * lib/gl_anyrbtree_list1.h: New file.
5771         * lib/gl_anyrbtree_list2.h: New file.
5772         * lib/gl_anytree_list1.h: New file.
5773         * lib/gl_anytree_list2.h: New file.
5774         * lib/gl_linkedhash_list.h: New file.
5775         * lib/gl_linkedhash_list.c: New file.
5776         * lib/gl_anyhash_list1.h: New file.
5777         * lib/gl_anyhash_list2.h: New file.
5778         * lib/gl_avltreehash_list.h: New file.
5779         * lib/gl_avltreehash_list.c: New file.
5780         * lib/gl_rbtreehash_list.h: New file.
5781         * lib/gl_rbtreehash_list.c: New file.
5782         * lib/gl_anytreehash_list1.h: New file.
5783         * lib/gl_anytreehash_list2.h: New file.
5784
5785         * lib/gl_oset.h: New file.
5786         * lib/gl_oset.c: New file.
5787         * lib/gl_array_oset.h: New file.
5788         * lib/gl_array_oset.c: New file.
5789         * lib/gl_avltree_oset.h: New file.
5790         * lib/gl_avltree_oset.c: New file.
5791         * lib/gl_rbtree_oset.h: New file.
5792         * lib/gl_rbtree_oset.c: New file.
5793         * lib/gl_anytree_oset.h: New file.
5794
5795 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5796
5797         * m4/mkancesdirs.m4: New file.
5798         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
5799         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
5800         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
5801         it.
5802
5803 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5804
5805         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
5806         * lib/mkancesdirs.h: New files.
5807         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
5808         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
5809         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
5810         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
5811         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
5812         callers changed.  Revamp internals significantly, by not
5813         attempting to create directories that are temporarily more
5814         permissive than the final results.  Do not attempt to use
5815         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
5816         This removes some race conditions, fixes some bugs, and simplifies
5817         things.  Use new dirchownmod function to do owner and mode changes.
5818         * lib/mkdir-p.h: Likewise.
5819         * lib/modechange.c (octal_to_mode): New function.
5820         (struct mode_change): New member mentioned.
5821         (make_node_op_equals): New arg mentioned.  All callers changed.
5822         (mode_compile): Keep track of which mode bits the user has explicitly
5823         mentioned.
5824         (mode_adjust): New arg DIR, so that we implement the X op correctly.
5825         New arg PMODE_BITS, to keep track of which mode bits the user
5826         mentioned; it treats S_ISUID and S_ISGID speciall.
5827         All callers changed.
5828         * lib/modechange.h: Likewise.
5829
5830 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5831
5832         * MODULES.html.sh: Add mkancestors.
5833         * modules/mkancesdirs: New module.
5834         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
5835         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
5836         The chdir-safer and afs files are now orphans; I'll remove them
5837         unless someone speaks up.
5838         Add lib/dirchownmod.c, lib/dirchownmod.h.
5839         (Depends-on): Remove alloca, chown, save-cwd, dirname.
5840         Add lchown, mkancesdirs.
5841         (Maintainer): Add self.
5842
5843 2006-07-15  Karl Berry  <karl@gnu.org>
5844
5845         * gnulib-tool: help message wording/arrangement.
5846
5847 2006-07-14  Simon Josefsson  <jas@extundo.com>
5848
5849         * doc/gnulib.texi (Libtool and Windows): New section.
5850
5851 2006-07-12  Simon Josefsson  <jas@extundo.com>
5852
5853         * modules/gendocs (License): Fix license, approved by Karl.
5854
5855 2006-07-12  Eric Blake  <ebb9@byu.net>
5856
5857         * MODULES.html.sh: Add gendocs.
5858
5859 2006-07-11  Eric Blake  <ebb9@byu.net>
5860
5861         * modules/fdl: New module, to install doc/fdl.texi.
5862         * MODULES.html.sh: Add new section for documentation modules.
5863         * gnulib-tool: Avoid space-tab.
5864         (--doc-base): New option, to manage files from doc.
5865
5866 2006-07-11  Eric Blake  <ebb9@byu.net>
5867
5868         * m4/absolute-header.m4: Fix comments to match recent change.
5869
5870 2006-07-11  Eric Blake  <ebb9@byu.net>
5871
5872         * gnulib-tool: List --doc-base before --tests-base.
5873
5874 2006-07-11  Derek R. Price  <derek@ximbiot.com>
5875
5876         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
5877
5878 2006-07-11  Bruno Haible  <bruno@clisp.org>
5879
5880         * README: Mention where to put documentation.
5881
5882 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5883
5884         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
5885
5886 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5887
5888         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
5889         to stdint.m4.
5890
5891 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5892
5893         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
5894         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
5895         "no/such/file/stdint.h" when there is no such file, so that
5896         the resulting C code can be parsed by dodgy compilers.
5897         Problems reported by Bob Proulx.
5898
5899 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5900
5901         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
5902         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5903         macros into the GNU _D_EXACT_NAMLEN.
5904         * lib/savedir.c:  Likewise.
5905         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
5906
5907 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5908         and Paul Eggert  <eggert@cs.ucla.edu>
5909
5910         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
5911         * m4/savedir.m4:
5912         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5913         macros into the GNU _D_EXACT_NAMLEN.
5914
5915 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5916
5917         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
5918         around the absolute name, to work around a problem with the HP-UX
5919         11.23 native C compiler, reported by Bob Proulx.
5920
5921 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5922
5923         * doc/maintain.texi, make-stds.texi: Sync from
5924         <http://savannah.gnu.org/projects/gnustandards>.
5925
5926 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5927
5928         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
5929
5930 2006-07-09  Jim Meyering  <jim@meyering.net>
5931
5932         * m4/glob.m4: Remove a doubled word in a comment.
5933
5934 2006-07-09  Jim Meyering  <jim@meyering.net>
5935
5936         * lib/argp-pv.c: Remove a doubled word in a comment.
5937         * lib/check-version.c (check_version): Likewise.
5938         * lib/javacomp.c (compile_java_class): Likewise.
5939
5940 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
5941
5942         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
5943         for the benefit of people using Autoconf 2.60.  If you want to
5944         support older Autoconf versions you can copy m4/onceonly_2_57.m4
5945         (or m4/onceonly.m4, if pre-2.57) manually.
5946
5947 2006-07-08  Jim Meyering  <jim@meyering.net>
5948
5949         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
5950         comment.
5951         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
5952         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
5953         comment.
5954
5955 2006-07-08  Jim Meyering  <jim@meyering.net>
5956
5957         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
5958
5959 2006-07-07  Simon Josefsson  <jas@extundo.com>
5960
5961         * tests/test-crc.c: Change expected crc value, the test vector
5962         were probably computed using the old broken crc.c?
5963
5964 2006-07-06  Simon Josefsson  <jas@extundo.com>
5965
5966         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
5967         now the canonical place for the M4 file).
5968
5969         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
5970         from the sys_socket dependency now.
5971
5972         * modules/inet_pton (Files): Ditto.
5973
5974         * modules/inet_ntop (Files): Ditto.
5975
5976 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
5977
5978         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
5979         not gl_PREREQ_GETUSERSHELL.
5980
5981 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5982
5983         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
5984         with only one argument, for Autoconf 2.60.
5985         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
5986         expand to nothing, so add a shell command to avoid syntax error.
5987         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
5988
5989 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5990
5991         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
5992
5993 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5994
5995         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
5996         no longer needed.  Check for isblank decl.
5997         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
5998         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
5999         of existence.
6000
6001 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6002
6003         * lib/getloadavg.c: Use __VMS, not VMS.
6004         * lib/getopt.c: Likewise.
6005         * lib/getpagesize.h: Likewise.
6006         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
6007         and probably does not work.
6008
6009 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6010
6011         * lib/.cppi-disable: Add wcwidth.
6012         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
6013         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
6014         (ISGRAPH): Remove.  All uses changed to isgraph.
6015         (FOLD) [!defined _LIBC]: Remove special case.
6016         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
6017         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
6018         HAVE_ISBLANK.
6019         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
6020         case.
6021
6022 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6023
6024         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
6025         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
6026         brackets.  Other minor changes to suppress some compiler
6027         warnings.
6028
6029 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6030         and Paul Eggert  <eggert@cs.ucla.edu>
6031
6032         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
6033         of invoking obsolescent AC_HEADER_DIRENT macro.
6034         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
6035         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
6036         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
6037         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
6038         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
6039         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6040         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
6041         * m4/readdir.m4: Remove; no longer needed.
6042
6043 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6044         and Paul Eggert  <eggert@cs.ucla.edu>
6045
6046         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
6047         Don't worry about this obsolete case any more.
6048         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
6049         directories.
6050         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
6051         worry about this obsolete case any more.
6052         * lib/fts.c: Likewise.
6053         * lib/getcwd.c: Likewise.
6054         * lib/glob.h: Likewise.
6055         * lib/savedir.c: Likewise.
6056
6057 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6058
6059         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
6060         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
6061         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
6062         needed.
6063         All uses removed.
6064         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6065         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6066         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
6067         needed.
6068         * m4/getdate.m4 (gl_GETDATE): Likewise.
6069         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6070         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6071         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6072         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6073         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6074         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6075         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
6076         needed.
6077
6078 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6079
6080         * lib/memcasecmp.c: Include <limits.h>.
6081         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
6082         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
6083         Don't assume isdigit succeeds only on '0' through '9'.
6084
6085 2006-07-05  Eric Blake  <ebb9@byu.net>
6086
6087         * modules/getaddrinfo (Depends-on): Add snprintf.
6088
6089 2006-07-05  Eric Blake  <ebb9@byu.net>
6090
6091         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
6092         to avoid 'header present but could not be compiled' on cygwin.
6093
6094 2006-07-05  Eric Blake  <ebb9@byu.net>
6095
6096         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
6097         missing from netdb.h.
6098         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
6099
6100 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6101
6102         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
6103         no longer needed.
6104         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
6105         * m4/getdate.m4 (gl_GETDATE): Likewise.
6106         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6107         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6108         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6109         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6110         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6111
6112 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6113
6114         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
6115         All uses of is_space replaced by isspace.
6116         * lib/exit.h: Don't talk about STDC_HEADERS.
6117         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
6118         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
6119         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
6120         replaced by isprint etc.
6121         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
6122         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6123         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
6124         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
6125         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
6126         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6127
6128 2006-07-05  Bruno Haible  <bruno@clisp.org>
6129
6130         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
6131         the function exists, before testing against AIX.
6132         Reported by Martin Lambers <marlam@marlam.de>.
6133
6134 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6135
6136         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
6137         From Mark D. Baushke.
6138
6139 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6140
6141         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
6142         to the absolute name, not just one, to bypass Sun C 5.8's
6143         "warning: #include of /usr/include/... may be non-portable".
6144
6145 2006-07-04  Eric Blake  <ebb9@byu.net>
6146
6147         * modules/dirname-tests: New test module.
6148         * tests/test-dirname.c: New file, replacing dirname.c
6149         TEST_DIRNAME section that was recently deleted.
6150
6151 2006-07-04  Bruno Haible  <bruno@clisp.org>
6152
6153         Assume ANSI C header files and <ctype.h> functions.
6154         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
6155         (mbsnwidth): Use isprint, iscntrl instead.
6156
6157 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6158
6159         Merge from coreutils.
6160         * MODULES.html.sh: Add xstrtold.
6161         * modules/xstrtold: New file.
6162         * modules/cycle-check (Files): Add lib/same-inode.h.
6163         * modules/dirname (Files): Add m4/double-slash-root.m4.
6164         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
6165         * modules/mkdir-p (Files): Add lib/same-inode.h.
6166         * modules/same (Files): Add lib/same-inode.h.
6167
6168 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6169
6170         * m4/absolute-header.m4: Renamed from full-header-path.m4.
6171         This is to keep the terminology clean; POSIX talks about
6172         "absolute pathnames", not "full pathnames", but the GNU
6173         Coding Standards say to use "path" for something else;
6174         so use "absolute" to keep both sides happy.
6175         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
6176         Set gl_absolute_header, not gl_full_header_path.
6177         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
6178         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
6179         All uses changed.
6180
6181         Merge from coreutils.
6182
6183         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6184
6185         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
6186         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
6187         want to require the building of c-strtod.o.
6188         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
6189         needs -lm directly.
6190         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
6191
6192         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6193
6194         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
6195         --as-needed option if available.  Problem reported by Albert Chin in
6196         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
6197         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
6198         cc merely issues a bunch of annoying warnings for --as-needed
6199         (this problem was reported by Bob Proulx).  Also, try linking with
6200         -lm to detect a bug in binutils 2.16 (this problem was reported
6201         by Ralf Wildenhues).
6202
6203         2006-06-18  Jim Meyering  <jim@meyering.net>
6204
6205         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
6206         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
6207         macro.
6208         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
6209         also check for glibc-2.4's abort-inducing bug.
6210
6211         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
6212         Low-probability clean-up should be to use rmdir to get rid of
6213         the just-created directory, not unlink.
6214
6215         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
6216         configure fail, and request a bug report to inform us about it.
6217         Add a comment that, barring reports to the contrary, in 2007 we'll
6218         assume ftruncate is universally available.
6219
6220         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6221
6222         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
6223
6224         2006-03-12  Jim Meyering  <jim@meyering.net>
6225
6226         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
6227         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
6228         * m4/same.m4 (gl_SAME): Likewise.
6229         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
6230
6231         2006-03-11  Eric Blake  <ebb9@byu.net>
6232
6233         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
6234         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
6235         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
6236         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
6237
6238 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6239
6240         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
6241         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
6242         reported by Mark D. Baushke, one in
6243         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
6244
6245         Merge from coreutils.
6246
6247         * lib/.cppi-disable: Add stdint_.h.
6248         * lib/.cvsignore: Add stdint.h.
6249
6250         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6251
6252         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
6253         both double and long double versions.
6254         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
6255         * lib/xstrtold.c: New file.
6256         * lib/xstrtod.h (xstrtold): New decl.
6257
6258         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
6259
6260         * lib/filemode.c (setst): Remove.
6261         (strmode): Rewrite to avoid setst.  This makes the code shorter,
6262         (arguably) clearer, and the generated code is a bit smaller on my
6263         Debian GNU/Linux stable x86 host.
6264
6265         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6266
6267         * lib/filemode.c: Include "filemode.h" first, to test the interface.
6268         Assume that filemode.h includes sys/types.h and sys/stat.h.
6269         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
6270         (ftypelet): Reorder to put common cases first, for efficiency.
6271         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
6272         to do 'M'.
6273         (strmode): Renamed from mode_string, and now stores 12 bytes instead
6274         of 10, for compatibility with FreeBSD.  All callers changed.
6275         (filemodestring): Now stores 12 bytes instead of 10, and sets file
6276         types that can't be deduced solely from st_mode.  First arg is now a
6277         const pointer.
6278         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
6279         (strmode): Renamed from mode_string.
6280         (filemodestring): New decl.
6281         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
6282         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
6283         needed.
6284         (S_ISPORT, S_ISWHT): New macros, if not already defined.
6285
6286         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
6287
6288         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
6289         fsusage.h now does that.  Include fsusage.h first, to test interface.
6290         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
6291         at most one method (the old code could have generated decls that
6292         didn't conform to C89, not that this was ever exercised).
6293         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
6294
6295         2006-03-19  Jim Meyering  <jim@meyering.net>
6296
6297         Work even in a chroot where d_ino values for entries in "/"
6298         don't match the stat.st_ino values for the same names.
6299         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
6300         number, iterate through all entries again, using lstat instead.
6301         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
6302         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
6303
6304         * lib/getcwd.c (__getcwd): Clarify a comment.
6305         Use memcpy in place of a call to strcpy.
6306
6307         2006-03-12  Jim Meyering  <jim@meyering.net>
6308
6309         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
6310         matches that of the current directory (which we're about to chdir ".."
6311         out of), then save the dev-ino of the parent, instead.
6312
6313         * lib/same-inode.h (SAME_INODE): New file/macro.
6314         * lib/chdir-safer.c (SAME_INODE): Remove definition.
6315         Include "same-inode.h", instead.
6316         * lib/same.c: Likewise.
6317         * lib/cycle-check.h: Include "same-inode.h".
6318         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
6319         * lib/cycle-check.c (SAME_INODE): Remove definition.
6320         * lib/root-dev-ino.h: Include "same-inode.h".
6321
6322         2006-03-11  Eric Blake  <ebb9@byu.net>
6323
6324         * lib/same.c (same_name): s/base_name/last_component/
6325         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
6326         * lib/filenamecat.c (file_name_concat): Likewise.
6327
6328         2006-03-11  Eric Blake  <ebb9@byu.net>,
6329                     Paul Eggert  <eggert@cs.ucla.edu>
6330
6331         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
6332         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
6333         drive prefix.
6334         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
6335         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
6336         (last_component): New method.
6337         * lib/dirname.c (dir_len): Determine when drive letters need a
6338         subsequent slash.  Preserve // when it is special.
6339         (dir_name): Don't append dot when drive letter is absolute.
6340         [TEST_DIRNAME]: Move into a full-blown gnulib test.
6341         * lib/basename.c (base_name): New semantics - malloc the result.
6342         Preserve // when it is special.  Preserve relative files that look
6343         like drive letters.
6344         (base_len): Preserve // when it is special.
6345         (last_component): New method, similar to old base_name semantics.
6346         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
6347         base_name.  Strip redundant slashes from ///.
6348
6349 2006-07-03  Jim Meyering  <jim@meyering.net>
6350
6351         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
6352         macro is used before the first cycle_check call.
6353
6354 2006-07-03  Eric Blake  <ebb9@byu.net>
6355
6356         * modules/dirname (Depends-on): Add xstrndup.
6357
6358 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6359
6360         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
6361         test cases, so that config.log is a bit easier to follow.
6362
6363 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6364
6365         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
6366         both are 64 bits, since this seems to be the tradition, and this
6367         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
6368         we ever run into a host that prefers long long to long in this
6369         case, we'll need another configure-time test.  Problem reported by
6370         Jim Meyering.
6371
6372 2006-07-02  Eric Blake  <ebb9@byu.net>
6373
6374         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
6375
6376 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6377
6378         * modules/inttypes (Depends-on): No longer depends on stdint.
6379         * modules/stdint (Description): Say more about assumptions.
6380         Say that the fast types might differ.  Say macros are used.
6381         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
6382         (Makefile.am): Revise list of substituted symbols to match
6383         new stdint.m4.
6384         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
6385         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
6386         * tests/test-stdint.c (verify_same_types)
6387         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
6388         the code conforms to C99/C89.
6389         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
6390         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
6391
6392 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6393
6394         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
6395         but fix a bug, by requiring at least 64 bits.
6396         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
6397         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
6398         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
6399         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
6400
6401         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
6402         changes.  Make 2.59 a prerequisite.  Check and substitute for
6403         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
6404         inttypes.h.  Do not use special include files; just use the
6405         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
6406         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
6407         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
6408         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
6409         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
6410         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
6411         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
6412         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
6413         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
6414         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
6415         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
6416         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
6417         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
6418         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
6419         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
6420         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
6421         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
6422         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
6423         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
6424         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
6425         WINT_MAX.  Check for C99 conformance more strictly, by detecting
6426         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
6427         not check for things that C99 does not require, e.g., int8_t.  If
6428         a test isn't needed unless <stdint.h> isn't working, and is
6429         unlikely to be needed for any other reason, then don't do it
6430         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
6431         size_t, since we assume C89 freestanding at least.  Do not check
6432         for sig_atomic_t, wchar_t, or wint_t, since the code now does
6433         the right thing even if the types are not defined.  Instead use:
6434         (gl_STDINT_TYPE_PROPERTIES): New macro.
6435         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
6436         testing whether <sys/types.h> clashes, as Autoconf does this for
6437         us now.  All uses removed.
6438         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
6439         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
6440         (gl_CHECK_TYPE_SAME):
6441         Remove; no longer needed.
6442         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
6443         exists, since we'll return 0 anyway in that case.
6444         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
6445
6446 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6447
6448         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
6449         possible collision with system files.
6450         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
6451         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
6452         WCHAR_MIN and WCHAR_MAX in this case.
6453         (<stddef.h>): Do not include; no longer needed.
6454         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
6455         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
6456         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
6457         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
6458         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
6459         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
6460         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
6461         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
6462         !defined(__c99))]: Include in this case too, since it's harmless
6463         now.
6464         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
6465         dangerous to do so.
6466         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
6467         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
6468         (_STDINT_MIN, _STDINT_MAX): New macros.
6469         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
6470         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
6471         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
6472         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
6473         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
6474         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
6475         macros, not typedefs; this simplifies things quite a bit.
6476         Use long int for all types narrower than int64_t.
6477         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
6478         Define in terms of long long int or int64_t or long int,
6479         not int64_t or int32_t.  This saves some compile-time testing.
6480         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
6481         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
6482         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
6483         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
6484         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
6485         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
6486         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
6487         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
6488         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
6489         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
6490         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6491         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6492         undef any previous version and define our own version, for
6493         simplicity and consistency with the new macros for types.
6494         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6495         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6496         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
6497         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
6498         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
6499         @WINT_T_SUFFIX@ to keep things simple here.
6500         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
6501         Simplify by assuming typical 8/16/32/64 host, since we're
6502         already doing that elsewhere anyway.
6503         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
6504         and assume long long int is 64 bits if available.  This
6505         speeds up 'configure'.
6506
6507 2006-07-01  Eric Blake  <ebb9@byu.net>
6508
6509         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
6510         Reported by Andreas Buening.
6511
6512 2006-07-01  Eric Blake  <ebb9@byu.net>
6513
6514         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
6515
6516 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6517
6518         * lib/getaddrinfo.c: fixed typo
6519
6520 2006-06-29  Jim Meyering  <jim@meyering.net>
6521
6522         * modules/strftime (Maintainer): Add my name, since with the
6523         FPRINTFTIME changes strftime.c has forked from glibc.
6524
6525 2006-06-29  Eric Blake  <ebb9@byu.net>
6526
6527         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
6528
6529 2006-06-29  Eric Blake  <ebb9@byu.net>
6530
6531         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
6532
6533 2006-06-29  Eric Blake  <ebb9@byu.net>
6534
6535         * lib/stat_.h: New file.
6536
6537 2006-06-29  Eric Blake  <ebb9@byu.net>
6538
6539         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
6540         unused static function.
6541
6542 2006-06-29  Eric Blake  <ebb9@byu.net>
6543
6544         * doc/functions.texi (Function Portability): Document missing lstat
6545         on mingw.
6546
6547 2006-06-29  Eric Blake  <ebb9@byu.net>
6548
6549         * MODULES.html.sh: Add sys_stat.
6550         * modules/sys_stat: New module.
6551         * modules/mkstemp (Depends-on): Add sys_stat.
6552
6553 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6554
6555         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
6556
6557 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6558
6559         * m4/c-bs-a.m4: Removed.
6560
6561 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6562
6563         * lib/strftime.c: Assume strftime() exists.
6564
6565 2006-06-29  Derek Price  <derek@ximbiot.com>
6566
6567         * modules/c-bs-a: Removed - \a is C89.
6568         * MODULES.html.sh: Remove c-bs-a.
6569
6570 2006-06-29  Bruno Haible  <bruno@clisp.org>
6571
6572         * modules/wcwidth (License): Change to LGPL.
6573
6574 2006-06-28  Simon Josefsson  <jas@extundo.com>
6575
6576         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
6577         on _WIN32.
6578
6579         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
6580         getnameinfo.
6581
6582 2006-06-28  Simon Josefsson  <jas@extundo.com>
6583
6584         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
6585
6586 2006-06-28  Simon Josefsson  <jas@extundo.com>
6587
6588         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
6589         functions there.  It will succeed on Windows XP, but on Windows
6590         2000 and (presumably) earlier, it will fail, and use the internal
6591         re-implementation.
6592         (use_win32_p): New function.
6593         (getaddrinfo): Use strtoul on servname, to support numeric ports.
6594         Support AI_NUMERICSERV to disable getservbyname.
6595         (getnameinfo): New function, only supports
6596         NI_NUMERICHOST|NI_NUMERICSERV for now.
6597
6598         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
6599         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
6600         getnameinfo.
6601
6602 2006-06-28  Eric Blake  <ebb9@byu.net>
6603
6604         * modules/wcwidth: New file.
6605         * modules/mbchar (Depends-on): Add wcwidth.
6606         * modules/mbswidth (Depends-on): Add wcwidth.
6607         * MODULES.html.sh: Add wcwidth.
6608
6609 2006-06-28  Eric Blake  <ebb9@byu.net>
6610
6611         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
6612         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
6613
6614 2006-06-28  Eric Blake  <ebb9@byu.net>
6615
6616         * lib/xvasprintf.h: Fix comments.
6617
6618 2006-06-28  Eric Blake  <ebb9@byu.net>
6619
6620         * lib/mbchar.h (wcwidth): Include wcwidth.h.
6621         * lib/mbswidth.c (wcwidth): Move from here...
6622         * lib/wcwidth.h: ...to this new file.
6623
6624 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6625
6626         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
6627
6628         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
6629         it's obsolete.
6630         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
6631
6632 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6633
6634         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
6635         Autoconf 2.60 says this stuff was obsolete.
6636
6637 2006-06-28  Bruno Haible  <bruno@clisp.org>
6638
6639         * modules/wcwidth (Files): Add m4/wchar_t.m4.
6640
6641 2006-06-28  Bruno Haible  <bruno@clisp.org>
6642
6643         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
6644         gt_TYPE_WCHAR_T.
6645
6646 2006-06-28  Bruno Haible  <bruno@clisp.org>
6647
6648         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
6649         declaration for wcwidth.
6650         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
6651
6652 2006-06-28  Bruno Haible  <bruno@clisp.org>
6653
6654         * lib/mkdtemp.c [MINGW]: Include <io.h>.
6655         (mkdir): Define using _mkdir.
6656
6657 2006-06-28  Bruno Haible  <bruno@clisp.org>
6658
6659         * lib/getaddrinfo.h: Fix POSIX URL.
6660         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
6661         _WIN32.
6662         (use_win32_p): Make static.
6663         (getaddrinfo): Reject service name if it is empty or does not consist
6664         solely of decimal digits, or if its value is > 65535.
6665         (getnameinfo): Remove useless casts.
6666
6667 2006-06-27  Simon Josefsson  <jas@extundo.com>
6668
6669         * modules/sys_select: New file, suggested by Bruno Haible, Paul
6670         Eggert and Martin Lambers.
6671
6672 2006-06-27  Simon Josefsson  <jas@extundo.com>
6673
6674         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
6675         Eggert and Martin Lambers.
6676
6677 2006-06-27  Bruno Haible  <bruno@clisp.org>
6678
6679         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
6680         result to 0, not to empty.
6681         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
6682
6683 2006-06-27  Bruno Haible  <bruno@clisp.org>
6684
6685         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
6686
6687 2006-06-26  Simon Josefsson  <jas@extundo.com>
6688
6689         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
6690         present.
6691
6692 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
6693
6694         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
6695         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
6696         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
6697
6698 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
6699
6700         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
6701
6702 2006-06-26  Bruno Haible  <bruno@clisp.org>
6703
6704         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
6705
6706 2006-06-26  Bruno Haible  <bruno@clisp.org>
6707
6708         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
6709
6710 2006-06-26  Bruno Haible  <bruno@clisp.org>
6711
6712         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
6713         SGI C compiler in pre-C99 mode.
6714         Suggested by Mark D. Baushke and Larry Jones.
6715
6716 2006-06-26  Bruno Haible  <bruno@clisp.org>
6717
6718         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
6719         WCHAR_MAX.
6720         Reported by Mark D. Baushke and Larry Jones.
6721
6722 2006-06-26  Bruno Haible  <bruno@clisp.org>
6723
6724         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
6725         in pre-C99 mode.
6726         Suggested by Mark D. Baushke and Larry Jones.
6727
6728 2006-06-23  Simon Josefsson  <jas@extundo.com>
6729             Bruno Haible  <bruno@clisp.org>
6730
6731         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
6732         Emit mostlyclean-local rule.
6733         (func_emit_tests_Makefile_am): Likewise.
6734         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
6735
6736 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
6737
6738         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
6739
6740 2006-06-23  Bruno Haible  <bruno@clisp.org>
6741
6742         * tests/test-stdint.c: Update to match ISO C 99 Technical
6743         Corrigendum 1.
6744
6745 2006-06-23  Bruno Haible  <bruno@clisp.org>
6746
6747         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
6748
6749 2006-06-23  Bruno Haible  <bruno@clisp.org>
6750
6751         * lib/stdint_.h: Treat IRIX like OpenBSD.
6752
6753 2006-06-23  Bruno Haible  <bruno@clisp.org>
6754
6755         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
6756         ISO C 99 Technical Corrigendum 1.
6757
6758 2006-06-22  Simon Josefsson  <jas@extundo.com>
6759
6760         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
6761         MinGW.
6762
6763 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
6764
6765         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
6766         needed.  Some compiler complained about some of them.  Problem reported
6767         by Larry Jones in
6768         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
6769
6770 2006-06-21  Simon Josefsson  <jas@extundo.com>
6771
6772         * tests/test-getaddrinfo.c: New file.
6773
6774         * modules/getaddrinfo-tests: New file.
6775
6776         * MODULES.html.sh: Add inet_pton.
6777
6778         * modules/inet_pton: New file.
6779
6780 2006-06-21  Simon Josefsson  <jas@extundo.com>
6781
6782         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
6783         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
6784         of using the (limited) gnulib implementation on Windows XP.
6785
6786         * m4/inet_pton.m4: New file.
6787
6788 2006-06-21  Simon Josefsson  <jas@extundo.com>
6789
6790         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
6791         variable.
6792
6793         * lib/socket_.h: Don't define WINVER.
6794
6795         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
6796         slightly modified to work in gnulib.
6797
6798 2006-06-21  Simon Josefsson  <jas@extundo.com>
6799
6800         * doc/gnulib.texi (Windows sockets): Add.
6801
6802 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
6803
6804         * lib/read-file.c (fread_file): Start with buffer allocation of
6805         0 bytes rather than 1 byte; this simplifies the code.
6806         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
6807         code to free buffer and save/restore errno.
6808         (internal_read_file): Remove unused local.
6809
6810 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
6811
6812         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
6813         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
6814         Problem reported by Denis Excoffier in
6815         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
6816
6817 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6818
6819         * modules/sys_socket, modules/socklen: Include sys/types since
6820         FreeBSD 4.x's sys/socket.h needs it.
6821
6822 2006-06-19  Simon Josefsson  <jas@extundo.com>
6823
6824         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
6825
6826 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6827
6828         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
6829
6830 2006-06-19  Bruno Haible  <bruno@clisp.org>
6831
6832         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
6833         and FULL_PATH_INTTYPES_H in angle brackets.
6834         Reported by Mark D. Baushke <mdb@gnu.org>.
6835
6836 2006-06-17  Eric Blake  <ebb9@byu.net>
6837
6838         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
6839         errno.
6840
6841 2006-06-17  Bruno Haible  <bruno@clisp.org>
6842
6843         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
6844         <sys/inttypes.h>.
6845
6846 2006-06-17  Bruno Haible  <bruno@clisp.org>
6847
6848         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
6849         whether errno is declared. Assume <errno.h> declares errno.
6850
6851 2006-06-17  Bruno Haible  <bruno@clisp.org>
6852
6853         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
6854
6855 2006-06-17  Bruno Haible  <bruno@clisp.org>
6856
6857         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
6858         problem on Solaris 2.5.1.
6859
6860 2006-06-16  Eric Blake  <ebb9@byu.net>
6861
6862         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
6863         * lib/unicodeio.c [!defined errno]: Likewise.
6864         * lib/strtol.c [!defined errno]: Likewise.
6865         * lib/strtod.c [!defined errno]: Likewise.
6866
6867 2006-06-15  Eric Blake  <ebb9@byu.net>
6868
6869         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
6870
6871 2006-06-15  Eric Blake  <ebb9@byu.net>
6872
6873         * config/srclist.txt (ssize_t.m4): Lose sync.
6874
6875 2006-06-15  Bruno Haible  <bruno@clisp.org>
6876
6877         * modules/stdint (Files): Include m4/full-header-path.m4,
6878         m4/size_max.m4, m4/wchar_t.m4.
6879         (Makefile.am): Many more substitutions.
6880         * modules/stdint-tests: New file.
6881         * tests/test-stdint.c: New file.
6882
6883 2006-06-15  Bruno Haible  <bruno@clisp.org>
6884
6885         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
6886         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
6887         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
6888         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
6889         gl_CHECK_TYPE_SAME): New macros.
6890
6891 2006-06-15  Bruno Haible  <bruno@clisp.org>
6892
6893         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
6894
6895 2006-06-15  Bruno Haible  <bruno@clisp.org>
6896
6897         * lib/stdint_.h: Rewritten to be fully auto-configured.
6898         Fixes bug on HP-UX/IA64.
6899
6900 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
6901
6902         * lib/getdate.y (__attribute__): Don't define if already defined.
6903         Problem reported by Larry Jones.
6904         * lib/utimens.c (__attribute__): Likewise.
6905
6906 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
6907
6908         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
6909         reported by Andreas Schwab.
6910
6911 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6912             Bruno Haible  <bruno@clisp.org>
6913
6914         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
6915         check for the declaration of strnlen and a run test that exposes the
6916         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
6917         rpl_strndup.
6918
6919 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6920             Bruno Haible  <bruno@clisp.org>
6921
6922         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
6923
6924 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6925
6926         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
6927         compile test, for Tru64 4.0D.
6928
6929 2006-05-28  Karl Berry  <karl@gnu.org>
6930
6931         * config/srclist.txt (printf-args.c): lose sync.
6932
6933 2006-05-26  Martin Lambers  <marlam@marlam.de>
6934
6935         * lib/getpass.c: Updates the test for the native W32 API, and adds
6936         missing includes, thus fixing compilation warnings.
6937
6938 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
6939
6940         * lib/exclude.c (exclude_fnmatch): New function.
6941         (excluded_file_name): Call exclude_fnmatch.
6942         * lib/exclude.h (excluded_file_name): New prototype
6943
6944 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
6945
6946         * lib/tempname.c (small_open, large_open): New macros.
6947         (__open, __open64) [!_LIBC]: Remove.
6948         (__gen_tempname): Use small_open and large_open instead of __open
6949         and __open64.  This fixes a portability bug on HP-UX 11.11i
6950         reported by Simon Wing-Tang in
6951         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
6952
6953 2006-05-24  Bruno Haible  <bruno@clisp.org>
6954
6955         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
6956         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
6957         Reported by Thorsten Maerz <torte@netztorte.de> via
6958         Aaron Stone <aaron@serendipity.cx>.
6959
6960 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6961
6962         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
6963         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
6964         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
6965         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
6966         not really conditional on the cache.
6967         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
6968
6969 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6970
6971         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
6972         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
6973         (my_usleep): Don't mishandle maximum value.
6974
6975 2006-05-19  Jim Meyering  <jim@meyering.net>
6976
6977         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
6978
6979 2006-05-17  Bruno Haible  <bruno@clisp.org>
6980
6981         Cygwin portability.
6982         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
6983
6984 2006-05-17  Bruno Haible  <bruno@clisp.org>
6985
6986         * lib/stdint_.h: Fix recognition of Cygwin.
6987
6988 2006-05-15  Bruno Haible  <bruno@clisp.org>
6989
6990         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
6991         on libtool patch by Ralf Wildenhues.
6992
6993 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
6994
6995         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
6996         test for C99 conformance; (bool) 0.5 is an integer constant
6997         expression, but (bool) -0.5 is not.  Problem reported by Fedor
6998         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
6999
7000 2006-05-11  Simon Josefsson  <jas@extundo.com>
7001
7002         * m4/xvasprintf.m4: Fix obvious typo.
7003
7004 2006-05-11  Jim Meyering  <jim@meyering.net>
7005
7006         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
7007         James Lemley.
7008
7009 2006-05-10  Simon Josefsson  <jas@extundo.com>
7010
7011         * lib/md4.c: Typo fix, update copyright years.
7012         (K1, K2): Don't use L because it turn computations into 64-bit on
7013         64-bit platforms.
7014
7015 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
7016
7017         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
7018         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
7019         unwanted sign propagation, e.g., on hosts with 64-bit int.
7020         There still are some problems with reeelly weird theoretical hosts
7021         (e.g., 33-bit int) but it's not worth worrying about now.
7022         * lib/sha1.c (rol): Likewise.
7023         (K1, K2, K3, K4): Remove unnecessary L suffix.
7024
7025 2006-05-10  Bruno Haible  <bruno@clisp.org>
7026
7027         * lib/des.c: Cast to avoid warnings.
7028
7029 2006-05-09  Bruno Haible  <bruno@clisp.org>
7030
7031         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
7032         (Depends-on): Depend also on xsize, stdarg.
7033         (configure.ac): Add gl_XVASPRINTF.
7034
7035 2006-05-09  Bruno Haible  <bruno@clisp.org>
7036
7037         * m4/xvasprintf.m4: New file.
7038
7039 2006-05-09  Bruno Haible  <bruno@clisp.org>
7040
7041         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
7042         (EOVERFLOW): Define fallback value.
7043         (xstrcat): New function.
7044         (xvasprintf): Recognize the special case of a string concatenation.
7045
7046 2006-05-08  Eric Blake  <ebb9@byu.net>
7047
7048         * gnulib-tool (func_version): Base copyright year on CVS date.
7049         (func_emit_copyright_notice): New function.
7050         (func_emit_lib_Makefile_am): Use it.
7051         (func_emit_tests_Makefile_am): Likewise.
7052         (func_import): Likewise.
7053
7054 2006-05-08  Bruno Haible  <bruno@clisp.org>
7055
7056         * modules/stdarg: New file.
7057         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
7058
7059 2006-05-08  Bruno Haible  <bruno@clisp.org>
7060
7061         * m4/stdarg.m4: New file, from GNU gettext.
7062
7063 2006-05-08  Bruno Haible  <bruno@clisp.org>
7064
7065         * config/srclist.txt (build-aux/config.rpath): different from latest
7066         release.
7067
7068 2006-05-08  Bruno Haible  <bruno@clisp.org>
7069
7070         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
7071
7072 2006-05-05  Jim Meyering  <jim@meyering.net>
7073
7074         * m4/warning.m4: New file, derived from bison's file by the same name.
7075
7076 2006-05-03  Bruno Haible  <bruno@clisp.org>
7077
7078         * lib/stdint_.h: Shorter URL.
7079         * lib/inttypes.h: Likewise.
7080
7081 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7082
7083         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
7084
7085 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7086
7087         * lib/verify.h: Document the internals better.  Most of this change
7088         was written by Bruno Haible.
7089
7090 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7091
7092         * doc/verify.texi: New file, partly based on a proposal by
7093         Bruno Haible.
7094
7095 2006-05-02  Bruno Haible  <bruno@clisp.org>
7096
7097         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
7098         test from here...
7099         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
7100
7101 2006-04-29  Bruno Haible  <bruno@clisp.org>
7102
7103         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
7104         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
7105
7106 2006-04-29  Bruno Haible  <bruno@clisp.org>
7107
7108         * gnulib-tool: Make --update option actually work.
7109
7110 2006-04-29  Bruno Haible  <bruno@clisp.org>
7111
7112         * doc/gcd.texi: New file.
7113         * doc/gnulib.texi: Include it.
7114
7115 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7116
7117         * lib/getdate.y (get_date): When adding relative date, start with the
7118         initial time, not with the result of the first mktime call.
7119
7120 2006-04-25  Bruno Haible  <bruno@clisp.org>
7121
7122         * gnulib-tool (func_import): Output the include directives in three
7123         blocks, sorted separately.
7124         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7125
7126 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7127
7128         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
7129         to define main with arguments, for C++.  Reported by Eric Blake.
7130         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
7131         Prefer 'int main ()' to 'int main (void)', for C++.
7132         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
7133         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
7134         for 'main', for C99 and C++.
7135
7136 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7137
7138         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
7139         Don't assume that exit status -1 is valid.
7140         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7141         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
7142         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
7143         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
7144         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
7145         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
7146         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
7147         functions can be used without declaring them, or that you can
7148         exit with status -1.
7149         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
7150
7151 2006-04-24  Karl Berry  <karl@gnu.org>
7152
7153         * config/srclist.txt (longdouble.m4): sync lost.
7154
7155 2006-04-24  Eric Blake  <ebb9@byu.net>
7156
7157         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
7158
7159 2006-04-24  Bruno Haible  <bruno@clisp.org>
7160
7161         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
7162         poll() implementation in AIX.
7163         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7164
7165 2006-04-24  Bruno Haible  <bruno@clisp.org>
7166
7167         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
7168         assigned exactly once.
7169
7170 2006-04-23  Claudio Fontana  <claudio@gnu.org>
7171             Bruno Haible  <bruno@clisp.org>
7172
7173         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
7174         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
7175         for AM_CPPFLAGS.
7176
7177 2006-04-23  Bruno Haible  <bruno@clisp.org>
7178
7179         * modules/copy-file: Depend on unistd.
7180         * modules/execute: Likewise.
7181         * modules/fatal-signal: Likewise.
7182         * modules/findprog: Likewise.
7183         * modules/mkdtemp : Likewise.
7184         * modules/pipe: Likewise.
7185         * modules/wait-process: Likewise.
7186
7187 2006-04-23  Bruno Haible  <bruno@clisp.org>
7188
7189         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
7190         condition was already detected.
7191         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7192
7193 2006-04-23  Bruno Haible  <bruno@clisp.org>
7194
7195         * lib/copy-file.c: Include <unistd.h> unconditionally.
7196         * lib/execute.c: Likewise.
7197         * lib/fatal-signal.c: Likewise.
7198         * lib/findprog.c: Likewise.
7199         * lib/mkdtemp.c: Likewise.
7200         * lib/pipe.h: Likewise.
7201         * lib/pipe.c: Likewise.
7202         * lib/wait-process.h: Likewise.
7203
7204 2006-04-23  Bruno Haible  <bruno@clisp.org>
7205
7206         * gnulib-tool (func_usage): Fix --import description. Document
7207         --update.
7208         (func_import): Create temporary file in a temporary directory, if
7209         --dry-run is specified. Silence errors from 'grep' when there are no
7210         m4 files in $m4dir.
7211         (func_create_testdir): Silence errors from 'grep' when there are no
7212         m4 files in $m4dir.
7213         Reported by Karl Berry <karl@freefriends.org>.
7214
7215 2006-04-20  Bruno Haible  <bruno@clisp.org>
7216
7217         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
7218         one argument, so that the code will be portable to Autoconf 2.60.
7219         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
7220         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7221         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
7222
7223 2006-04-19  Derek Price  <derek@ximbiot.com>
7224             Eric Blake  <ebb9@byu.net>
7225
7226         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
7227         rather than "/full/path.h".  Update comment to match.  Shorten &
7228         generalize m4_translit call via AS_TR_CPP.
7229
7230 2006-04-19  Derek Price  <derek@ximbiot.com>
7231             Eric Blake  <ebb9@byu.net>
7232
7233         * lib/inttypes.h: Correct grammar in comment.
7234
7235 2006-04-18  Derek Price  <derek@ximbiot.com>
7236             Paul Eggert  <eggert@cs.ucla.edu>
7237
7238         * modules/inttypes: New file.
7239         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
7240
7241 2006-04-18  Derek Price  <derek@ximbiot.com>
7242             Paul Eggert  <eggert@cs.ucla.edu>
7243
7244         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
7245         New files.
7246
7247 2006-04-18  Derek Price  <derek@ximbiot.com>
7248             Paul Eggert  <eggert@cs.ucla.edu>
7249
7250         * lib/inttypes.h: New file.
7251         * lib/strtoimax.c: Assume <inttypes.h>.
7252
7253 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
7254
7255         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
7256         isn't mounted.  Problem reported by Kir Kolyshkin.
7257
7258 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
7259
7260         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
7261         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
7262         Derek R. Price.
7263         * lib/regex.h (RE_DUP_MAX): Update comment to match current
7264         implementation.
7265
7266 2006-04-12  Eric Blake  <ebb9@byu.net>
7267
7268         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
7269         is now done automatically by the corresponding Autoconf macro.
7270
7271 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
7272
7273         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
7274         time_r.h.
7275
7276 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7277
7278         Merge regex changes from libc, removing some of our
7279         POSIX-conformance changes that were rejected and redoing them in a
7280         less-intrusive way.
7281
7282         * lib/regcomp.c (re_compile_internal, init_dfa):
7283         Length arg is now size_t, not Idx.  All uses changed.
7284         (peek_token): Forward decl now says internal_function.
7285         (__re_error_msgid, __re_error_msgid_idx):
7286         Now static rather than extern with attribute_hidden.
7287         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
7288         For some reason libc prefers K&R style defns for external functions.
7289         (regerror) [!defined _LIBC]: Likewise.
7290         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
7291         (seek_collating_symbol_entry, lookup_collation_sequence_value):
7292         (build_range_exp, build_collating_symbol):
7293         Use K&R-style defn.
7294         (re_compile_fastmap): Use '\0' to memset, not 0.
7295         (utf8_sb_map): Make the calculations more obvious.
7296         (init_dfa, parse_bracket_exp, build_charclass_op):
7297         Call calloc and cast result, as glibc does.
7298         (init_word_char, fetch_token, peek_token, peek_token_bracket):
7299         (build_range_exp, build_collating_symbol):
7300         Now internal functions.
7301
7302         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
7303
7304         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
7305         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
7306         Don't depend on VMS; depend on __VMS instead, for POSIX
7307         namespace cleanness.
7308         (regoff_t): Define to ssize_t, not long int.
7309
7310         Remove the REG_ macros named below.  Instead, make the old names
7311         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
7312         __USE_GNU_REGEX.
7313         (REG_BACKSLASH_ESCAPE_IN_LISTS):
7314         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
7315         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
7316         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
7317         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
7318         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
7319         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
7320         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
7321         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
7322         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
7323         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
7324         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
7325         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
7326         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
7327         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
7328         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
7329         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
7330         (REG_NREGS):
7331         Remove.  All uses replaced by the old RE_* names.
7332         (RE_BACKSLASH_ESCAPE_IN_LISTS):
7333         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
7334         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
7335         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
7336         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
7337         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
7338         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
7339         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
7340         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
7341         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
7342         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
7343         Don't bother having these macros be independent of each others'
7344         values, since they no longer exist in the POSIX name space.
7345
7346         Rename the following member names back to their old names,
7347         unless !__USE_GNU_REGEX.  All uses changed back.
7348         (buffer): Renamed from re_buffer.
7349         (allocated): Renamed from re_allocated.
7350         (used): Renamed from re_used.
7351         (syntax): Renamed from re_syntax.
7352         (fastmap): Renamed from re_fastmap.
7353         (translate): Renamed from re_translate.
7354         (can_be_null): Renamed from re_can_be_null.
7355         (regs_allocated): Renamed from re_regs_allocated.
7356         (fastmap_accurate): Renamed from re_fastmap_accurate.
7357         (no_sub): Renamed from re_no_sub.
7358         (not_bol): Renamed from re_not_bol.
7359         (not_eol): Renamed from re_not_eol.
7360         (newline_anchor): Renamed from re_newline_anchor.
7361         (num_regs): Renamed from rm_num_regs.
7362         (start): Renamed from rm_start.
7363         (end): Renamed from rm_end.
7364
7365         (free_state): Move up a bit.
7366
7367         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
7368         #define to be empty.
7369         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
7370         when that is what is intended.
7371         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
7372         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
7373         (MAX): New macro.
7374         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
7375         All uses changed back to re_malloc, etc.  It's now the caller's
7376         responsibility to check for overflow; all callers changed.
7377         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
7378         (re_x2nrealloc): Remove.
7379         (free_state): Remove decl.
7380
7381         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
7382         (re_set_registers, re_exec):
7383         Use K&R-style defn.
7384
7385         2006-01-31  Roland McGrath  <roland@redhat.com>
7386
7387         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
7388         Reported by Mike Frysinger <vapier@gentoo.org>.
7389
7390         2006-01-15  Andreas Jaeger  <aj@suse.de>
7391
7392         [BZ #1950]
7393         * lib/regex_internal.c (re_string_reconstruct): Adjust for
7394         build_wcs_upper_buffer change.
7395         (build_wcs_upper_buffer): Change return type.
7396
7397         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
7398
7399         * lib/regex_internal.h: Include <stdint.h> if available.
7400
7401         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
7402
7403         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
7404
7405         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7406
7407         * lib/regcomp.c: Adjust for changed secondary hash function.
7408
7409         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
7410
7411         * lib/regex.h: Pretty printing.
7412         Clean up namespace a bit.
7413
7414         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
7415
7416         * lib/regexec.c (update_cur_sifted_state, check_arrival,
7417         check_arrival_add_next_nodes): Avoid using uninitialized variable.
7418
7419         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
7420                     Ulrich Drepper  <drepper@redhat.com>
7421
7422         [BZ #1302]
7423         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
7424         changed.
7425         (bitset_word_t): Renamed from bitset_word.  All uses changed.
7426
7427         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
7428
7429         [BZ #281]
7430         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
7431         * lib/regcomp.c: Remove unnecessary uses of
7432         unsigned RE_TRANSLATE_TYPE.
7433         * lib/regex_internal.h: Likewise.
7434         * lib/regex_internal.c: Likewise.
7435         * lib/regexec.c: Likewise.
7436         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
7437
7438         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
7439
7440         * lib/regexec.c (find_recover_state): Remove unnecessary
7441         initialization.
7442         (transit_state_bkref): Make DFA a const pointer.
7443         (get_subexp): Likewise.
7444         (check_arrival): Likewise.
7445         (update_cur_sifted_state): Likewise.
7446         (re_search_internal): Likewise.
7447         (prune_impossible_nodes): Likewise.
7448         (acquire_init_state_context): Likewise.
7449         (proceed_next_node): Likewise.
7450         (set_regs): Likewise.
7451         (free_fail_stack_return): Likewise.
7452         (check_arrival_expand_ecl): Mark DFA parameter as const.
7453         (check_arrival_expand_ecl_sub): Likewise.
7454         (check_subexp_limits): Likewise.
7455         (sub_epsilon_src_nodes):  Likewise.
7456         (add_epsilon_src_nodes):  Likewise.
7457         (merge_state_array): Likewise.
7458         (update_regs): Likewise.
7459         (build_trtable): Likewise.
7460         (sift_states_backward): Mark MCTX parameter as const.
7461         (build_sifted_states): Likewise.
7462         (update_cur_sifted_state): Likewise.
7463         (sift_states_mkref): Likewise.
7464         (check_arrival_expand_ecl): Mark eclosure as const.
7465         (check_dst_limits_calc_pos_1): Likewise.
7466         * lib/regex_internal.h (re_match_context_t): Make dfa a const
7467         pointer.
7468
7469         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
7470
7471         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
7472         (transit_state_sb): Likewise.
7473         (transit_state_mb): Likewise.
7474         (sift_states_iter_mb): Likewise.
7475         (check_arrival_add_next_nodes): Likewise.
7476         (check_node_accept_bytes): Change first parameter to pointer-to-const.
7477         [_LIBC] (re_search_2_stub): Use mempcpy.
7478
7479         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
7480         mbrtowc for very simple UTF-8 case.
7481
7482         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
7483         a pointer-to-const.
7484         (re_acquire_state_context): Likewise.
7485         * lib/regex_internal.h: Adjust prototypes.
7486
7487         * lib/regex.c: Prevent using C++ compilers.
7488
7489         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
7490         (re_acquire_state_context): Likewise.
7491
7492 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7493
7494         * modules/regex (Depends-on): Add ssize_t.
7495
7496 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7497
7498         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
7499         translation table.
7500
7501 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7502
7503         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
7504
7505 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
7506             Bruno Haible  <bruno@clisp.org>
7507
7508         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
7509         <sys/types.h> and <inttypes.h>.
7510
7511 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7512
7513         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
7514         `__error_t_defined', so argp.h will not typedef the former.
7515
7516 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
7517
7518         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
7519         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
7520         glibc names.  Even if glibc is changed to conform to POSIX, the
7521         traditional names will be available anyway, since regex depends on
7522         the extensions module.  Also, fix a longstanding typo in the
7523         implementation of Spencer ERE test #75 from grep 2.3.  Problems
7524         reported by Emanuele Giaquinta.  Also, change sense of cached
7525         variable, so that the message makes sense.
7526
7527 2006-03-24  Simon Josefsson  <jas@extundo.com>
7528
7529         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
7530         including some doc fixes.
7531         (base64_encode_alloc): Fix +1 bug on allocation failures.
7532
7533 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7534
7535         * lib/base64.c (base64_encode): Do not read past end of array with
7536         unsanitized input on systems with CHAR_BIT > 8.
7537
7538 2006-03-24  Eric Blake  <ebb9@byu.net>
7539
7540         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
7541
7542 2006-03-22  Karl Berry  <karl@gnu.org>
7543
7544         * config/srclist.txt (*setenv.[ch]): get from coreutils.
7545         * config/srclistvars.sh (COREUTILS): new var.
7546
7547 2006-03-17  Jim Meyering  <jim@meyering.net>
7548
7549         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
7550         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
7551
7552 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7553
7554         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
7555         no longer needs it.  Instead, check that regoff_t is as least
7556         as wide as ptrdiff_t.
7557
7558         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
7559         so that our regex.h stays compatible with the installed regex.
7560         This is helpful for installers who configure --without-included-regex.
7561         Problem reported by Emanuele Giaquinta.
7562
7563 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7564
7565         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
7566         Typedef to long int, not to off_, as POSIX will likely change
7567         in that direction.
7568
7569 2006-03-15  Eric Blake  <ebb9@byu.net>
7570
7571         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
7572
7573 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7574
7575         * lib/argp-help.c (validate_uparams): Fix typo
7576         * lib/argp-parse.c (argp_default_options): Consistently begin help
7577         messages with a lowercase letter.
7578
7579 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
7580
7581         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
7582         overrun buffers and shouldn't be used (much as gets shouldn't be
7583         used).
7584         * lib/time_r.c (asctime_r, ctime_r): Likewise.
7585
7586 2006-03-08  Simon Josefsson  <jas@extundo.com>
7587
7588         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
7589         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7590
7591 2006-03-08  Simon Josefsson  <jas@extundo.com>
7592
7593         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
7594         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7595
7596 2006-03-08  Simon Josefsson  <jas@extundo.com>
7597
7598         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
7599         signal that configure disabled the device.
7600
7601 2006-03-08  Simon Josefsson  <jas@extundo.com>
7602
7603         * build-aux/maint.mk: Fix refresh-po, to handle no translated
7604         languages.
7605
7606 2006-03-07  Simon Josefsson  <jas@extundo.com>
7607
7608         * modules/getopt (Depends-on): Add unistd.
7609
7610         * modules/unistd: New file.
7611
7612 2006-03-07  Simon Josefsson  <jas@extundo.com>
7613
7614         * modules/gc-random: New file.
7615
7616 2006-03-07  Simon Josefsson  <jas@extundo.com>
7617
7618         * m4/unistd_h.m4: New file.
7619
7620 2006-03-07  Simon Josefsson  <jas@extundo.com>
7621
7622         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
7623         test to be side-effect free by storing the result in the cache
7624         variable gl_cv_lib_readline, and moving the assignment of
7625         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
7626         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7627
7628 2006-03-07  Simon Josefsson  <jas@extundo.com>
7629
7630         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
7631         error on missing devices (the functions will return an error).
7632
7633         * m4/gc.m4: Move random stuff to gc-random.m4
7634
7635 2006-03-07  Simon Josefsson  <jas@extundo.com>
7636
7637         * lib/unistd_.h: New file.
7638
7639 2006-03-07  Simon Josefsson  <jas@extundo.com>
7640
7641         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
7642
7643 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7644
7645         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
7646         Problem reported by Juan Manuel Guerrero.
7647
7648 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7649
7650         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
7651         the unistd module.
7652         * lib/getlogin_r.c: Likewise.
7653         * lib/getlogin_r.h: Likewise.
7654         * lib/glob.c: Likewise.
7655         * lib/pagealign_alloc.c: Likewise.
7656         * lib/unistd_.h: Remove; no longer needed.
7657
7658 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7659
7660         * MODULES.html.sh (Support for systems lacking POSIX:2001):
7661         Add unistd.
7662         * modules/c-stack (Depends-on): Add unistd.
7663         * modules/getlogin_r: Likewise.
7664         * modules/glob: Likewise.
7665         * modules/pagealign_alloc: Likewise.
7666         * modules/unistd (Files): Remove lib/unistd_.h.
7667         (EXTRA_DIST): Remove.
7668         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
7669         need unistd_.h.
7670         (MOSTLYCLEANFILES): Remove unistd.h-t.
7671
7672 2006-03-03  Simon Josefsson  <jas@extundo.com>
7673
7674         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
7675
7676 2006-03-03  Simon Josefsson  <jas@extundo.com>
7677
7678         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
7679         libidn and bison.
7680
7681 2006-03-03  Simon Josefsson  <jas@extundo.com>
7682
7683         * build-aux/maint.mk: Add indent target.
7684
7685 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
7686
7687         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
7688         our replacement poll.h in any case, to avoid a differing
7689         declaration from a system header.  Seen on AIX.
7690
7691 2006-03-01  Simon Josefsson  <jas@extundo.com>
7692
7693         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
7694         <kasal@ucw.cz>.
7695
7696 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7697
7698         * modules/gettime (Depends-on): Add extensions module.
7699         * modules/nanosleep (Depends-on): Likewise.
7700         * modules/settime (Depends-on): Likewise.
7701
7702 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7703
7704         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
7705         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
7706         pedantically.
7707         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7708         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
7709
7710         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
7711         not "==".  Reported by Ralf Wildenhues.
7712
7713 2006-03-01  Karl Berry  <karl@gnu.org>
7714
7715         * doc/Copyright/request-*: new files, synced from gnuorg.
7716
7717 2006-03-01  Karl Berry  <karl@gnu.org>
7718
7719         * config/srclist.txt (Copyright/*): new entries.
7720
7721 2006-02-28  Simon Josefsson  <jas@extundo.com>
7722
7723         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
7724
7725 2006-02-27  Simon Josefsson  <jas@extundo.com>
7726
7727         * lib/base64.h: Indent #define's.  From Jim Meyering
7728         <jim@meyering.net>.
7729
7730 2006-02-27  Jim Meyering  <jim@meyering.net>
7731
7732         Revert the change of 2006-02-24, so these files can continue
7733         to be sync'd from gettext.
7734         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
7735         of `config.h'.
7736
7737 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
7738
7739         * modules/intprops: New file.
7740         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
7741         Add intprops.
7742         * modules/getloadavg (Files): Remove lib/intprops.h.
7743         (Depends-on): Add intprops.
7744         * modules/human: Likewise.
7745         * modules/inttostr: Likewise.
7746         * modules/openat: Likewise.
7747         * modules/sig2str: Likewise.
7748         * modules/userspec: Likewise.
7749         * modules/utimecmp: Likewise.
7750         * modules/xnanosleep: Likewise.
7751         * modules/xstrtol: Likewise.
7752
7753 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
7754
7755         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
7756         * modules/lock-tests (TESTS): Use $(EXEEXT).
7757         * modules/tls-tests: Likewise.
7758         * modules/argp-tests: Likewise.
7759         (check_PROGRAMS): New var, replacing...
7760         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
7761
7762 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7763
7764         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
7765         `config.h'.
7766
7767 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
7768
7769         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
7770
7771 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7772
7773         Sync from coreutils.
7774         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
7775         gl_CHDIR_SAFER.
7776
7777 2006-02-22  Jim Meyering  <jim@meyering.net>
7778
7779         Sync from coreutils.
7780         * m4/chdir-safer.m4: New file.
7781
7782 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
7783
7784         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
7785         AT_FDCWD exceeds INT_MAX.
7786         * lib/openat.h (AT_FDCWD): Likewise.
7787
7788 2006-02-17  Eric Blake  <address@hidden>
7789
7790         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
7791
7792 2006-02-16  Simon Josefsson  <jas@extundo.com>
7793
7794         * modules/getaddrinfo (Depends-on): Add sys_socket.
7795
7796 2006-02-15  Simon Josefsson  <jas@extundo.com>
7797
7798         * build-aux/maint.mk: Add dsyntax-check rule.
7799
7800 2006-02-15  Eric Blake  <ebb9@byu.net>
7801
7802         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
7803         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
7804         'present but cannot compile' warnings on cygwin.
7805         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
7806         use ws2tcpip.h if sys/socket.h works.
7807         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
7808         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
7809
7810 2006-02-14  Simon Josefsson  <jas@extundo.com>
7811
7812         * modules/maintainer-makefile (Files): Rename.
7813
7814         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
7815         and (the local) Makefile.cfg to maint-cfg.mk.
7816
7817         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
7818         to the latter.
7819
7820         * modules/maintainer-makefile: New module.
7821
7822         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
7823         severaly stripped to make it possible to build it up from scratch
7824         with reliable tests.
7825
7826         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
7827         fixes to permit overriding the default actions when configure and
7828         makefile are not available.
7829
7830 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
7831
7832         Sync from coreutils.
7833         * modules/lstat (Depends-on): Don't depend on xalloc.
7834         (License): Change from GPL to LGPL, since this is now simply a
7835         replacement for a libc function.
7836
7837 2006-02-14  Jim Meyering  <jim@meyering.net>
7838
7839         Sync from coreutils.
7840
7841         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
7842         failure on deficient systems, and simplify gnulib lgpl dependencies.
7843         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
7844         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
7845
7846         * lib/xalloc-die.c: Remove unused definition of N_.
7847
7848 2006-02-14  Jim Meyering  <jim@meyering.net>
7849
7850         Sync from coreutils.
7851         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
7852         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
7853         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
7854         double-quote uses of that variable, to accommodate the rare case in
7855         which getmntent is available in none of the libraries checked.  This
7856         happens at least on FreeBSD 5.0.
7857
7858 2006-02-13  Simon Josefsson  <jas@extundo.com>
7859
7860         * gnulib-tool (Usage): Fix --import, from
7861         karl@freefriends.org (Karl Berry).
7862
7863 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7864
7865         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
7866
7867 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
7868
7869         * lib/argp-namefrob.h: Restore changes accidentally lost during the
7870         "autoupdate" on 2005-12-12.
7871
7872 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7873
7874         * modules/closeout (Depends-on): Remove atexit.
7875
7876 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7877
7878         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
7879         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
7880
7881 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
7882
7883         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
7884         __EXTENSIONS__ if this causes compilation to fail.  Problem
7885         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
7886         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
7887
7888 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
7889
7890         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
7891         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
7892         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
7893         All uses changed.
7894
7895 2006-01-26  Simon Josefsson  <jas@extundo.com>
7896
7897         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
7898         prototype is visible on mingw32.
7899
7900         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
7901         for mingw32.
7902
7903         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
7904         mingw32).
7905
7906 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7907
7908         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
7909         attempt to open for write; this always fails, at least on POSIX
7910         hosts.  This reinstates the 2006-01-09 change, which was
7911         inadvertently removed.
7912
7913 2006-01-26  Bruno Haible  <bruno@clisp.org>
7914
7915         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
7916         Reported by Paul Eggert.
7917
7918 2006-01-26  Bruno Haible  <bruno@clisp.org>
7919             Paul Eggert  <eggert@cs.ucla.edu>
7920
7921         * lib/stdbool_.h (_Bool)
7922         [(! (defined __cplusplus || defined __BEOS__)
7923           && !defined __GNUC__
7924           && !(defined __HP_cc || defined __xlc__
7925                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
7926                || defined __sgi))]:
7927         #define to signed char in these cases too; this simplifies
7928         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
7929         etc., separately) and makes it more conservative.
7930
7931 2006-01-25  Simon Josefsson  <jas@extundo.com>
7932
7933         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
7934         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
7935         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
7936
7937 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7938
7939         * lib/argp-namefrob.h: Bugfix. Remove stray #
7940
7941 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
7942
7943         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
7944         so that we test the test.
7945         Check for yet another HP-UX cc bug involving *bool |= bool.
7946
7947 2006-01-25  Karl Berry  <karl@gnu.org>
7948
7949         * config/srclist.txt (vasnprintf.c): sync lost.
7950
7951 2006-01-25  Jim Meyering  <jim@meyering.net>
7952
7953         Sync from the stable (b5) branch of coreutils:
7954
7955         * lib/fts.c (fts_children): Don't let close() clobber errno from
7956         failed fchdir().
7957
7958         * lib/fts.c (fts_stat): When following a symlink-to-directory,
7959         don't necessarily interpret stat-fails+lstat-succeeds as indicating
7960         a dangling symlink.  That can also happen at least for ELOOP.
7961         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
7962         FYI, this bug predates the inclusion of fts.c in coreutils.
7963
7964         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
7965         in their own block, so pre-c99 compilers don't object.
7966
7967         Avoid the double-free (first in fts_read, second in fts_close) that
7968         would occur when an `active' directory is made inaccessible (e.g.,
7969         via chmod a-x) during a traversal.
7970         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
7971         before returning.  Reproduce this failure by
7972         mkdir -p a/b; cd a; chmod a-x . b
7973         Reported by Stavros Passas.
7974
7975 2006-01-25  Jim Meyering  <jim@meyering.net>
7976
7977         * lib/fileblocks.c: Remove more useless parentheses.
7978         * lib/readutmp.h: Likewise.
7979
7980 2006-01-25  Bruno Haible  <bruno@clisp.org>
7981
7982         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
7983         warnings.
7984         Reported by Paul Eggert.
7985
7986 2006-01-25  Bruno Haible  <bruno@clisp.org>
7987
7988         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
7989         rid of a trap command. For Solaris sh.
7990         Reported by Mark D. Baushke <mdb@gnu.org>.
7991
7992 2006-01-24  Simon Josefsson  <jas@extundo.com>
7993
7994         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
7995         Bruno.
7996
7997 2006-01-24  Karl Berry  <karl@gnu.org>
7998
7999         * config/srclist.txt (argp-namefrob.h): sync lost.
8000
8001 2006-01-24  Jim Meyering  <jim@meyering.net>
8002
8003         * modules/openat (Files): Add lib/intprops.h.
8004         From Mark D. Baushke.
8005
8006 2006-01-24  Jim Meyering  <jim@meyering.net>
8007
8008         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
8009         Reported by Mark D. Baushke.
8010
8011 2006-01-24  Jim Meyering  <jim@meyering.net>
8012
8013         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
8014
8015 2006-01-24  Bruno Haible  <bruno@clisp.org>
8016
8017         * modules/strnlen (Maintainer): Change from glibc to all.
8018
8019 2006-01-24  Bruno Haible  <bruno@clisp.org>
8020
8021         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
8022         Patch by Paul Eggert.
8023
8024 2006-01-24  Bruno Haible  <bruno@clisp.org>
8025
8026         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
8027         already has it.
8028         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
8029         2005-11-26.
8030
8031         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
8032         'signed char' to avoid problems with the built-in _Bool type.
8033         Reported by Paul Eggert on 2005-11-26.
8034
8035 2006-01-24  Bruno Haible  <bruno@clisp.org>
8036
8037         * gnulib-tool (func_import): Avoid constructing complicated sed
8038         expressions inside backquote.
8039         Report and solution by Mark D. Baushke <mdb@gnu.org>.
8040
8041 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
8042
8043         These changes imported from libc.
8044         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
8045         test and two separate function calls.
8046         * lib/strndup.c (__strndup): Add libc_hidden_def.
8047
8048 2006-01-23  Simon Josefsson  <jas@extundo.com>
8049
8050         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
8051         Remove the test_*_SOURCES variable: automake infers it by default.
8052         * modules/tls-tests: Likewise.
8053
8054 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8055
8056         Work around porting bugs reported by Dieter in
8057         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
8058         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
8059         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
8060         Include "getopt.h" first, to check interface.
8061         (getenv): Declare only if defined HAVE_DECL_GETENV &&
8062         !HAVE_DECL_GETENV.
8063         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
8064         (__strndup): Revert to K&R-style function dfns, the glibc style.
8065         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
8066         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
8067         Include strnlen.h first, to get prototype properly.
8068         (strnlen): Renamed from __strnlen.
8069         Remove weak alias.
8070
8071 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8072
8073         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
8074
8075 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8076
8077         * config/srclist.txt: Adjust to reflect glibc reorganization.
8078         This affects only comments.
8079
8080 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8081
8082          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
8083          Reported by Bruce Korb <bkorb@gnu.org>.
8084
8085 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
8086
8087         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
8088         to pacify gcc -Wswitch-default.
8089
8090 2006-01-22  Bruno Haible  <bruno@clisp.org>
8091
8092         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
8093         temporary buffer for sprintf, take into account the precision also
8094         for 'd', 'i', 'u', 'o', 'x', 'X'.
8095
8096 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8097
8098         * modules/argp-tests: New module
8099         * tests/test-argp.c: New file
8100         * tests/test-argp-2.sh: New file
8101
8102 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8103
8104         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
8105         (__argp_base_name): Removed
8106         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
8107         typo.
8108         (__argp_base_name): Provide macro definition or extern declaration
8109         depending on the configuration
8110
8111 2006-01-20  Simon Josefsson  <jas@extundo.com>
8112
8113         * modules/inet_ntop (Depends-on): Depend on sys_socket.
8114
8115 2006-01-20  Simon Josefsson  <jas@extundo.com>
8116
8117         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
8118
8119 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
8120
8121         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
8122         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
8123         Suggested by Bruno Haible.
8124
8125 2006-01-20  Karl Berry  <karl@gnu.org>
8126
8127         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
8128         until changes propagate, I guess.
8129
8130 2006-01-19  Simon Josefsson  <jas@extundo.com>
8131
8132         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
8133
8134 2006-01-19  Simon Josefsson  <jas@extundo.com>
8135
8136         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
8137
8138 2006-01-19  Simon Josefsson  <jas@extundo.com>
8139
8140         * gnulib-tool: Set check_PROGRAMS.
8141
8142         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8143         modules/des-tests, modules/gc-arcfour-tests,
8144         modules/gc-arctwo-tests, modules/gc-des-tests,
8145         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8146         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8147         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8148         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8149         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8150         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
8151         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
8152         test_*_SOURCES.
8153
8154 2006-01-18  Simon Josefsson  <jas@extundo.com>
8155
8156         * modules/socklen (Depends-on): Depend on sys_socket.
8157
8158 2006-01-18  Simon Josefsson  <jas@extundo.com>
8159
8160         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8161         modules/des-tests, modules/gc-arcfour-tests,
8162         modules/gc-arctwo-tests, modules/gc-des-tests,
8163         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8164         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8165         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8166         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8167         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8168         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
8169         $(EXEEXT) to automake TESTS variable, for mingw32.
8170
8171 2006-01-17  Simon Josefsson  <jas@extundo.com>
8172
8173         * modules/socklen (Include): Need sys/socket.h.
8174
8175 2006-01-17  Bruno Haible  <bruno@clisp.org>
8176
8177         * modules/ssize_t (Include): Add <sys/types.h>.
8178
8179 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
8180
8181         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
8182         it's not portable and it doesn't work with cross-compiles.
8183         Problem reported by Bruno Haible.  Fix missing-$ typo in
8184         'test "gl_cv_ignore_unused_libraries" ...' that prevented
8185         -zignore from being used with Sun's C compiler.
8186
8187 2006-01-12  Simon Josefsson  <jas@extundo.com>
8188
8189         * lib/base64.c: Fix warning, reported by Bruno Haible
8190         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
8191
8192 2006-01-12  Bruno Haible  <bruno@clisp.org>
8193
8194         * modules/ldd: New file.
8195         * build-aux/ldd.sh.in: New file.
8196         * MODULES.html.sh (Support for building libraries and executables): Add
8197         ldd.
8198
8199 2006-01-12  Bruno Haible  <bruno@clisp.org>
8200
8201         * m4/ldd.m4: New file.
8202
8203 2006-01-12  Bruno Haible  <bruno@clisp.org>
8204
8205         * gnulib-tool (func_import, func_create_testdir): Don't go into an
8206         endless loop while replacing $auxdir with build-aux.
8207
8208 2006-01-11  Simon Josefsson  <jas@extundo.com>
8209
8210         * lib/stdint_.h (SIZE_MAX): Add missing (.
8211
8212 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
8213
8214         Sync from coreutils.
8215         * lib/md5.c: Fix commentary typos.
8216         (alignof, UNALIGNED_P): No need for a GCC-specific version.
8217         * lib/md5.h (__attribute__): Remove; unused.
8218         * lib/sha1.c: Fix commentary to match md5 better.
8219         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
8220         so that we don't need to worry about alignment.  All uses changed.
8221         This merges the 2005-10-28 md5 change into sha1.
8222
8223 2006-01-11  Jim Meyering  <jim@meyering.net>
8224
8225         Sync from coreutils.
8226         * lib/md5.c (OP): Fix spacing.
8227
8228 2006-01-11  Bruno Haible  <bruno@clisp.org>
8229
8230         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8231         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
8232         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
8233
8234 2006-01-11  Bruno Haible  <bruno@clisp.org>
8235
8236         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8237         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
8238         the "early" section as well.
8239
8240 2006-01-11  Bruno Haible  <bruno@clisp.org>
8241
8242         Avoid "ar: no archive members specified" error on MacOS X.
8243         * gnulib-tool (func_modules_add_dummy): New function.
8244         (func_import, func_create_testdir): Invoke it.
8245
8246 2006-01-11  Bruno Haible  <bruno@clisp.org>
8247
8248         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
8249         with $auxdir in AC_CONFIG_FILES statements.
8250
8251 2006-01-11  Bruno Haible  <bruno@clisp.org>
8252
8253         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8254         Initialize also noinst_HEADERS to empty.
8255
8256 2006-01-11  Bruno Haible  <bruno@clisp.org>
8257
8258         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
8259         variables.
8260         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
8261         autoreconf.
8262
8263 2006-01-11  Bruno Haible  <bruno@clisp.org>
8264
8265         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
8266         overridable by the user.
8267         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8268
8269 2006-01-10  Simon Josefsson  <jas@extundo.com>
8270
8271         * modules/sys_socket: New file.
8272
8273 2006-01-10  Simon Josefsson  <jas@extundo.com>
8274
8275         * m4/sys_socket_h.m4: New file.
8276
8277 2006-01-10  Simon Josefsson  <jas@extundo.com>
8278
8279         * lib/socket_.h: New file.
8280
8281 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8282
8283         * modules/readutmp (Maintainer): Add myself.
8284
8285 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8286
8287         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
8288         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
8289         People who are still concerned with buggy memcmp implementations
8290         can invoke gl_FUNC_MEMCMP themselves.
8291
8292 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8293
8294         * lib/regex_internal.h (BITSET_WORD_BITS):
8295         Work around a bug in 64-bit PGC (before version 6.1-2), where the
8296         preprocessor mishandles large unsigned values as if they were signed.
8297         Problem reported by Claudio Fontana in
8298         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
8299
8300 2006-01-10  Jim Meyering  <jim@meyering.net>
8301
8302         Avoid the double-free (first in fts_read, second in fts_close) that
8303         would occur when an `active' directory is made inaccessible (e.g.,
8304         via chmod a-x) during a traversal.
8305         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8306         before returning.  Reproduce this failure by
8307         mkdir -p a/b; cd a; chmod a-x . b
8308         Reported by Stavros Passas.
8309
8310         Sync from coreutils.
8311         * lib/sha1.c: Tweak grammar in a comment.
8312
8313 2006-01-10  Jim Meyering  <jim@meyering.net>
8314
8315         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
8316         Patch by Joerg Sonnenberger.
8317
8318 2006-01-10  Bruno Haible  <bruno@clisp.org>
8319
8320         * modules/readutmp: Depend on module free.
8321         * modules/strtok_r: Depend on module restrict.
8322
8323 2006-01-10  Bruno Haible  <bruno@clisp.org>
8324
8325         * modules/gettext (configure.ac): Add an invocation of
8326         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
8327
8328 2006-01-10  Bruno Haible  <bruno@clisp.org>
8329
8330         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
8331         Reported by Werner Lemberg <wl@gnu.org>.
8332
8333 2006-01-10  Bruno Haible  <bruno@clisp.org>
8334
8335         * lib/localcharset.c: Update from GNU gettext.
8336
8337 2006-01-10  Bruno Haible  <bruno@clisp.org>
8338
8339         * lib/argp.h (__const): Remove macro. Use const instead.
8340         * lib/argp-fmtstream.h (__const): Likewise.
8341         * lib/glob_.h (__const): Remove macro.
8342         * lib/glob-libc.h: Use const instead of __const.
8343
8344 2006-01-10  Bruno Haible  <bruno@clisp.org>
8345
8346         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
8347         variable.
8348         Needed to avoid an automake error regarding the 'gettext' module.
8349
8350 2006-01-09  Simon Josefsson  <jas@extundo.com>
8351
8352         * modules/inet_ntop (Depends-on): Add restrict.
8353
8354 2006-01-09  Simon Josefsson  <jas@extundo.com>
8355
8356         * modules/gc-rijndael-tests (License): Put under LGPL.
8357
8358         * modules/gc-des-tests (License): Likewise.
8359
8360         * modules/gc-arcfour-tests (License): Likewise.
8361
8362         * modules/gc-arctwo-tests (License): Likewise.
8363
8364         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
8365
8366         * modules/gc-hmac-sha1-tests (Files): Likewise.
8367
8368         * modules/gc-hmac-md5-tests (License): Likewise.
8369
8370         * modules/gc-sha1-tests (License): Likewise.
8371
8372         * modules/gc-md5-tests (License): Likewise.
8373
8374         * modules/gc-md4-tests (License): Likewise.
8375
8376         * modules/gc-md2-tests (License): Likewise.
8377
8378         * modules/gc-tests (License): Likewise.
8379
8380         * modules/des-tests (License): Likewise.
8381
8382         * modules/md4-tests (License): Likewise.
8383
8384         * modules/md2-tests (License): Likewise.
8385
8386 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8387
8388         Sync from coreutils:
8389
8390         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
8391         * modules/lib-ignore: New file.
8392         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
8393         chdir-safer.m4, lchmod.m4.
8394         * modules/openat: Add mkdirat.c, openat-priv.h.
8395
8396 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8397
8398         Sync from coreutils.
8399         * m4/lib-ignore.m4: New file.
8400         * m4/lchmod.m4: New file.
8401
8402 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8403
8404         Sync from coreutils.
8405         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
8406         for write access: POSIX says that must fail.
8407         * lib/fts.c (diropen): Likewise.
8408         * lib/save-cwd.c (save_cwd): Likewise.
8409         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
8410         well, for minor improvements on hosts that lack O_DIRECTORY.
8411         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
8412         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
8413         Fall back on chown if open failed with EACCES.
8414
8415         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
8416         Report an error at compile-time if only a 1-second nominal clock
8417         resolution is found.
8418
8419         * lib/lchmod.h: New file.
8420         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
8421         (make_dir_parents): Use lchown rather than chown, and
8422         lchmod rather than chmod.
8423
8424         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
8425         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
8426         "proc" reported by n0dalus.
8427
8428         * lib/mountlist.c: Include <limits.h>.
8429         (dev_from_mount_options)
8430         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
8431         New function.  It no longer assumes "dev=" has the System V meaning
8432         on Linux (since it doesn't).  It also parses "dev=" more carefully.
8433         (read_file_system_list)
8434         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
8435         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
8436         dev= in that case.
8437
8438         * lib/posixtm.h (PDS_PRE_2000): New macro.
8439         * lib/posixtm.c (year): Arg is now syntax_bits rather than
8440         allow_century.  All usages changed.  Reject dates outside the range
8441         1969-1999 if PDS_PRE_2000 is used.
8442
8443 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8444
8445         Sync from coreutils.
8446         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
8447         (Time of day items): Mention the possibility of leap seconds.
8448         Problem reported by Dr. David Alan Gilbert.
8449
8450 2006-01-09  Jim Meyering  <jim@meyering.net>
8451
8452         Sync from coreutils.
8453
8454         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
8455
8456         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
8457
8458         * lib/modechange.c (mode_compile): Reject an invalid mode string
8459         that starts with an octal digit.  From Andreas Gruenbacher.
8460
8461         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
8462         and dup to open_safer and dup_safer, respectively.
8463         (openat_permissive): Fix typo in comment.
8464
8465         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
8466         "gettext.h"; either no longer needed or are guaranteed by openat.h.
8467         (_): Remove; no longer needed.
8468         (openat): Renamed from rpl_openat; no need for rpl_openat
8469         since openat.h renames openat for us.
8470         Replace most of the body with a call to openat_permissive,
8471         to avoid duplicate code.
8472         Port to (probably hypothetical) environments were mode_t is
8473         wider than int.
8474         (openat_permissive): Require mode arg, so that we can check
8475         types better.  Put it just after flags.  Change cwd failure
8476         indicator from pointer-to-bool to pointer-to-errno-value.
8477         All callers changed.
8478         Invoke openat_save_fail and/or openat_restore_fail if
8479         cwd_errno is null, so that openat can call us.
8480         (openat_permissive, fdopendir, fstatat, unlinkat):
8481         Simplify errno handling to avoid some duplicate code,
8482         as it's OK to set errno on success.
8483         * lib/openat.h: Revamp code so that function macros depend on
8484         __OPENAT_PREFIX only, not also on AT_FDCWD.
8485         (openat_ro): Remove.  Caller changed to use openat_permissive.
8486         (openat_permissive): Now a macro, if not a function.
8487         (openat_restore_fail, openat_save_fail): Now always functions,
8488         since mkdirat needs them even if __OPENAT_PREFIX is defined.
8489
8490         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
8491         and openat.c.
8492         * lib/mkdirat.c: Include openat-priv.h.
8493         Remove definitions of macros defined therein.
8494         * lib/openat.c: Likewise.
8495
8496         * lib/mkdirat.c (mkdirat): New file and function.
8497         * lib/openat.h (mkdirat): Declare.
8498
8499         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
8500
8501         * lib/openat.h (openat_permissive): Declare.
8502         (openat_ro): Define.
8503
8504         * lib/openat.c (EXPECTED_ERRNO): New macro.
8505         (openat_permissive): New function -- used in remove.c rewrite.
8506         (all functions): Set errno just before returning, only if there
8507         was an actual failure.
8508         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
8509
8510         Emulate openat-family functions using Linux's procfs, if possible.
8511         Idea and some code based on Ulrich Drepper's glibc changes.
8512
8513         * lib/openat.c: (BUILD_PROC_NAME): New macro.
8514         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
8515         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
8516         before falling back on save_cwd and restore_cwd.
8517         (fdopendir, fstatat, unlinkat): Likewise.
8518
8519         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
8520         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
8521
8522         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
8523         as second argument to va_arg.  Otherwise, some versions of gcc
8524         warn that `if this code is reached, the program will abort'.
8525
8526 2006-01-09  Jim Meyering  <jim@meyering.net>
8527
8528         Sync from coreutils.
8529         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
8530         Require openat-priv.h.
8531
8532 2006-01-09  Bruno Haible  <bruno@clisp.org>
8533
8534         * modules/strnlen (Include): Use strnlen.h.
8535
8536 2006-01-09  Bruno Haible  <bruno@clisp.org>
8537
8538         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
8539
8540 2006-01-09  Bruno Haible  <bruno@clisp.org>
8541
8542         * lib/sysexit_.h (EX_OK): New macro.
8543         Suggested by Martin Lambers <marlam@marlam.de>.
8544
8545 2006-01-09  Bruno Haible  <bruno@clisp.org>
8546
8547         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
8548         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
8549
8550 2006-01-09  Bruno Haible  <bruno@clisp.org>
8551
8552         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
8553         numbers.
8554
8555 2006-01-09  Bruno Haible  <bruno@clisp.org>
8556
8557         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
8558         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
8559         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
8560         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
8561
8562 2006-01-09  Bruno Haible  <bruno@clisp.org>
8563
8564         * build-aux/javacomp.sh.in: New file, moved from lib/.
8565         * modules/javacomp-script (Files): Update.
8566         (configure.ac): Add AC_CONFIG_FILES invocation.
8567         (EXTRA_DIST): Remove variable.
8568
8569         * build-aux/javaexec.sh.in: New file, moved from lib/.
8570         * modules/javaexec (Files): Update.
8571         (configure.ac): Add AC_CONFIG_FILES invocation.
8572         (EXTRA_DIST): Remove javaexec.sh.in.
8573
8574         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
8575         * modules/csharpcomp-script (Files): Update.
8576         (configure.ac): Add AC_CONFIG_FILES invocation.
8577         (EXTRA_DIST): Remove variable.
8578
8579         * build-aux/csharpexec.sh.in: New file, moved from lib/.
8580         * modules/csharpexec (Files): Update.
8581         (configure.ac): Add AC_CONFIG_FILES invocation.
8582         (EXTRA_DIST): Remove csharpexec.sh.in.
8583
8584 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8585
8586         Sync from coreutils.
8587
8588         Add POSIX ACL support
8589         * lib/acl.h (copy_acl, set_acl): Add declarations.
8590         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
8591         systems other than Linux.
8592         (chmod_or_fchmod): New function: use fchmod when possible,
8593         and chmod otherwise.
8594         (file_has_acl): Add a POSIX ACL implementation, with a
8595         Linux-specific subcase.
8596         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
8597         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
8598         acls are unsupported.
8599         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
8600         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
8601         are unsupported.
8602
8603 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8604
8605         Sync from coreutils.
8606         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
8607
8608 2006-01-07  Bruno Haible  <bruno@clisp.org>
8609
8610         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
8611         gl_EARLY.
8612
8613 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8614
8615         * lib/strftime.c (tzname): Don't declare if it is already #defined.
8616         Problem reported for Mingw by Mark Junker.
8617
8618 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8619
8620         * README: Gnulib normally doesn't generate a tarball.
8621
8622 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
8623
8624         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
8625         long int, not int, for nanosecond counts, so that people who are
8626         used to POSIX struct timespec won't be surprised.  Reported by Jim
8627         Meyering.
8628
8629 2005-12-28  Bruno Haible  <bruno@clisp.org>
8630
8631         * build-aux/config.rpath: Update from GNU gettext.
8632
8633 2005-12-16  Jim Meyering  <jim@meyering.net>
8634
8635         * modules/fprintftime: New module.
8636         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
8637
8638 2005-12-16  Jim Meyering  <jim@meyering.net>
8639
8640         * m4/fprintftime.m4: New file.
8641
8642 2005-12-16  Jim Meyering  <jim@meyering.net>
8643
8644         * lib/fprintftime.c, lib/fprintftime.h: New files.
8645
8646 2005-12-15  Simon Josefsson  <jas@extundo.com>
8647
8648         * modules/socklen (configure.ac): Fix M4 macro name, to align with
8649         new m4/socklen.m4.
8650
8651 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8652
8653         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
8654         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
8655
8656 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8657
8658         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
8659         * lib/argp-help.c (fill_in_uparams): Check if the constructed
8660         struct uparams is valid. Fall back to the default values if it is
8661         not.
8662
8663 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8664
8665         * modules/argp (Files): Add argp-pin.c
8666         (Depends-on): dirname
8667         (lib_SOURCES): Add argp-pin.c
8668
8669 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8670
8671         * m4/argp.m4:  Check if program_invocation_name and
8672         program_invocation_short_name are declared and define appropriate
8673         macros if they are not.
8674
8675 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8676
8677         * lib/argp-help.c (__argp_base_name): New function
8678         (__argp_short_program_name): Rewrite using __argp_base_name
8679         * lib/argp-namefrob.h: Define program_invocation_name and
8680         program_invocation_short_name if requested
8681         (__argp_base_name): Add prototype
8682         * lib/argp-parse.c (argp_def): Use gettext wrappers
8683         (argp_default_parser): Use __argp_base_name
8684         * lib/argp-pin.c: New file. Defines program_invocation_name and
8685         program_invocation_short_name on systems that lack them.
8686
8687 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8688
8689         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
8690         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8691         porting problem reported by Georg Schwarz in
8692         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8693
8694 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8695
8696         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
8697         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8698         porting problem reported by Georg Schwarz in
8699         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8700
8701 2005-12-05  Bruno Haible  <bruno@clisp.org>
8702
8703         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
8704         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
8705         Reported by Mark Junker <mjscod@gmx.de>.
8706
8707 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
8708
8709         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
8710         Use implementation from Albert Chin, with some
8711         comments/corrections by Stepan Kasal and myself.
8712
8713 2005-12-02  Bruno Haible  <bruno@clisp.org>
8714
8715         * gnulib-tool (func_import): Accept GPLed build tool modules when
8716         --lgpl is given.
8717         * modules/csharpcomp-script: New file.
8718         * modules/csharpcomp: Depend on it.
8719         * modules/javacomp-script: New file.
8720         * modules/javacomp: Depend on it.
8721         Suggested by Simon Josefsson.
8722
8723 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
8724
8725         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
8726         statement, to work around an HP-UX 10.20 compiler bug reported by
8727         Peter O'Gorman.
8728
8729 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8730
8731         * modules/savedir (Depends-on): Add openat.
8732
8733 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8734
8735         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
8736         (uintmax_t) [defined uintmax_t]: Do not declare.
8737         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
8738         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
8739         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
8740         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
8741         sake of portability to weird hosts that C allows (though we don't
8742         know of any practical examples).
8743
8744         * lib/savedir.h (fdsavedir): New decl.
8745         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
8746         contains most of the former guts of savedir.
8747         (savedir): Use savedirstream.
8748         Include "openat.h".
8749
8750 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
8751
8752         * modules/obstack (Files): Add m4/ulonglong.m4.
8753         Problem reported by Davide Angelocola.
8754
8755 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
8756
8757         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
8758         coreutils no longer futzes with rounding modes.
8759
8760 2005-11-14  Jim Meyering  <jim@meyering.net>
8761
8762         * lib/mkstemp-safer.c: Include <config.h>, required for possible
8763         replacement of mkstemp.
8764
8765 2005-11-10  Simon Josefsson  <jas@extundo.com>
8766
8767         * lib/readline.c: Remove EOL.
8768
8769 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8770
8771         * modules/gethrxtime (Depends-on): Add gettime.
8772
8773 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8774
8775         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
8776         or gettimeofday; no longer needed.
8777
8778 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8779
8780         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
8781         time business.
8782         (gethrxtime) [! (HAVE_NANOUPTIME
8783         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
8784         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
8785         our own approximation.
8786
8787 2005-11-08  Eric Blake  <ebb9@byu.net>
8788
8789         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8790
8791 2005-11-08  Eric Blake  <ebb9@byu.net>
8792
8793         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8794
8795 2005-11-04  Bruno Haible  <bruno@clisp.org>
8796
8797         * gnulib-tool: Implement --update mode.
8798
8799 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8800
8801         Fix porting problem reported by Theodoros V. Kalamatianos.
8802         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
8803         Don't assume that futimes failing means we must fail.
8804
8805 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8806
8807         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
8808         variables to suggest the intended function of the PATH_MAX check.
8809
8810 2005-10-30  Kean Johnston  <jkj@sco.com>
8811
8812         Trivial changes to support SCO systems.
8813         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
8814         as PATH_MAX.
8815         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
8816         where __ptr is null when no I/O is pending.
8817
8818 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
8819
8820         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
8821         leave errno alone.  Problem reported by Dmitry V. Levin.
8822
8823 2005-10-28  Simon Josefsson  <jas@extundo.com>
8824
8825         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
8826         Test more.
8827
8828         * tests/test-gc-md2.c, tests/test-md2.c: New files.
8829
8830         * modules/md2, modules/md2-tests: New files.
8831
8832 2005-10-28  Simon Josefsson  <jas@extundo.com>
8833
8834         * m4/inet_ntop.m4: More tests.
8835
8836         * m4/gc-md2.m4, md2.m4: New file.
8837
8838 2005-10-28  Simon Josefsson  <jas@extundo.com>
8839
8840         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
8841         "restrict" keywords, as per POSIX.  Protect the function
8842         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
8843         Don't use K&R prototypes.  Check the sprintf return values.
8844         Re-define EAFNOSUPPORT if not present.  Indent.
8845
8846         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
8847         suggested by Bruno Haible <bruno@clisp.org>.
8848
8849         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
8850
8851         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
8852
8853         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
8854         libgcrypt).
8855
8856         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
8857
8858         * lib/md2.h, lib/md2.c: New files.
8859
8860 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
8861
8862         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
8863         errno alone.  Problem reported by Frederic Jolliton.
8864
8865 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8866
8867         * modules/verify (License): Change from GPL to LGPL.  This is a
8868         tiny module and there are apparently near-equivalents that are
8869         under the BSD license.
8870
8871 2005-10-24  Simon Josefsson  <jas@extundo.com>
8872
8873         * modules/sha1: Relicense to LGPL.
8874
8875 2005-10-24  Simon Josefsson  <jas@extundo.com>
8876
8877         * lib/md4.h: Shrink buffer size, now that we changed the type.
8878
8879 2005-10-23  Simon Josefsson  <jas@extundo.com>
8880
8881         * gnulib-tool (func_import): Fix --tests-base.
8882
8883 2005-10-22  Simon Josefsson  <jas@extundo.com>
8884
8885         * modules/arcfour (Depends-on): Need stdint.
8886
8887 2005-10-22  Simon Josefsson  <jas@extundo.com>
8888
8889         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
8890         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
8891
8892 2005-10-22  Simon Josefsson  <jas@extundo.com>
8893
8894         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
8895         suggested by Bruno Haible <bruno@clisp.org>.
8896
8897 2005-10-22  Simon Josefsson  <jas@extundo.com>
8898
8899         * lib/crc.h: Include stddef.h, for size_t.
8900
8901 2005-10-22  Simon Josefsson  <jas@extundo.com>
8902
8903         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
8904         arcfour_context struct (simplify test vector testing in GNU
8905         Shishi).
8906
8907 2005-10-21  Simon Josefsson  <jas@extundo.com>
8908
8909         * modules/des, modules/des-tests: New files.
8910
8911         * modules/gc-des, modules/gc-des-tests: New files.
8912
8913         * tests/test-des.c, tests/test-gc-des.c: New file.
8914
8915 2005-10-21  Simon Josefsson  <jas@extundo.com>
8916
8917         * modules/arctwo, modules/arctwo-tests: New files.
8918
8919         * tests/test-arctwo.c: New file.
8920
8921         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
8922
8923         * tests/test-gc-arctwo.c: New file.
8924
8925 2005-10-21  Simon Josefsson  <jas@extundo.com>
8926
8927         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
8928         Bruno Haible <bruno@clisp.org>.
8929
8930         * m4/gc-des.m4: New file.
8931
8932 2005-10-21  Simon Josefsson  <jas@extundo.com>
8933
8934         * m4/arctwo.m4: New file.
8935
8936         * m4/gc-arctwo.m4: New file.
8937
8938 2005-10-21  Simon Josefsson  <jas@extundo.com>
8939
8940         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
8941         block.
8942
8943 2005-10-21  Simon Josefsson  <jas@extundo.com>
8944
8945         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
8946         <bruno@clisp.org>.
8947
8948         * lib/hmac-sha1.c (hmac_sha1): Likewise.
8949
8950         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
8951         Bruno Haible <bruno@clisp.org>.
8952
8953         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
8954         <bruno@clisp.org>.
8955
8956 2005-10-21  Simon Josefsson  <jas@extundo.com>
8957
8958         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
8959
8960 2005-10-21  Simon Josefsson  <jas@extundo.com>
8961
8962         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
8963
8964 2005-10-21  Simon Josefsson  <jas@extundo.com>
8965
8966         * lib/des.h, lib/des.c: New files.
8967
8968         * lib/gc-gnulib.c: Support DES.c
8969
8970 2005-10-21  Simon Josefsson  <jas@extundo.com>
8971
8972         * lib/arctwo.h, lib/arctwo.c: New files.
8973
8974         * lib/gc-gnulib.c: Support ARCTWO.
8975
8976 2005-10-21  Simon Josefsson  <jas@extundo.com>
8977
8978         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
8979         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8980
8981 2005-10-21  Simon Josefsson  <jas@extundo.com>
8982
8983         * gnulib-tool (func_import, func_create_testdir): Define automake
8984         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
8985         Makefile.am snippet),
8986         suggested by Bruno Haible <bruno@clisp.org>.
8987
8988         * modules/gc (Makefile.am): Use it.
8989
8990 2005-10-21  Bruno Haible  <bruno@clisp.org>
8991
8992         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
8993         patch.
8994
8995 2005-10-19  Simon Josefsson  <jas@extundo.com>
8996
8997         * tests/test-gc-rijndael.c: New file.
8998
8999         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
9000
9001 2005-10-19  Simon Josefsson  <jas@extundo.com>
9002
9003         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
9004         interface too.
9005
9006 2005-10-19  Simon Josefsson  <jas@extundo.com>
9007
9008         * tests/test-gc-arcfour.c: New file.
9009
9010         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
9011
9012 2005-10-19  Simon Josefsson  <jas@extundo.com>
9013
9014         * modules/gc-md4, modules/gc-md4-tests: New file.
9015
9016         * tests/test-gc-md4.c: New file.
9017
9018 2005-10-19  Simon Josefsson  <jas@extundo.com>
9019
9020         * m4/gc-md4.m4: New file.
9021
9022 2005-10-19  Simon Josefsson  <jas@extundo.com>
9023
9024         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
9025         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
9026         <kasal@ucw.cz>.
9027
9028 2005-10-19  Simon Josefsson  <jas@extundo.com>
9029
9030         * m4/gc-arcfour.m4: New file.
9031
9032         * m4/gc-rijndael.m4: New file.
9033
9034 2005-10-19  Simon Josefsson  <jas@extundo.com>
9035
9036         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
9037
9038 2005-10-19  Simon Josefsson  <jas@extundo.com>
9039
9040         * lib/gc-gnulib.c: Support ARCFOUR.
9041
9042 2005-10-19  Simon Josefsson  <jas@extundo.com>
9043
9044         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
9045         support.
9046
9047         * lib/gc.h: Add ECB enum type.
9048
9049         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
9050
9051 2005-10-18  Simon Josefsson  <jas@extundo.com>
9052
9053         * tests/test-md5.c: New file.
9054
9055         * modules/md5-tests: New file.
9056
9057 2005-10-18  Simon Josefsson  <jas@extundo.com>
9058
9059         * tests/test-md4.c: New file.
9060
9061         * modules/md4, modules/md4-tests: New files.
9062
9063 2005-10-18  Simon Josefsson  <jas@extundo.com>
9064
9065         * m4/md4.m4: New file.
9066
9067 2005-10-18  Simon Josefsson  <jas@extundo.com>
9068
9069         * lib/md4.h, lib/md4.c: New files, based on md5.?.
9070
9071 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
9072
9073         * gnulib-tool (func_create_testdir): Omit the second check whether
9074         BUILT_SOURCES in nonempty.
9075
9076 2005-10-17  Simon Josefsson  <jas@extundo.com>
9077
9078         * tests/test-rijndael.c: New file.
9079
9080 2005-10-17  Simon Josefsson  <jas@extundo.com>
9081
9082         * modules/sha1: Depend on stdint instead of md5.
9083
9084         * modules/md5: Depend on stdint, remove uint32_t.
9085
9086 2005-10-17  Simon Josefsson  <jas@extundo.com>
9087
9088         * modules/gc-sha1-tests: New file.
9089
9090         * tests/test-gc-sha1.c: New file.
9091
9092 2005-10-17  Simon Josefsson  <jas@extundo.com>
9093
9094         * m4/md5.m4: Remove call to uint32_t.m4.
9095
9096 2005-10-17  Simon Josefsson  <jas@extundo.com>
9097
9098         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
9099
9100         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
9101         md5.h.
9102
9103         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
9104
9105         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
9106
9107 2005-10-17  Simon Josefsson  <jas@extundo.com>
9108
9109         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
9110
9111 2005-10-17  Simon Josefsson  <jas@extundo.com>
9112
9113         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
9114
9115 2005-10-17  Simon Josefsson  <jas@extundo.com>
9116
9117         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
9118
9119         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
9120
9121 2005-10-17  Bruno Haible  <bruno@clisp.org>
9122
9123         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
9124         that it can also be used in a test.
9125
9126 2005-10-16  Bruno Haible  <bruno@clisp.org>
9127
9128         * gnulib-tool (func_emit_tests_Makefile_am): Also define
9129         TESTS_ENVIRONMENT, so that individual tests can augment it.
9130
9131         * gnulib-tool (func_create_testdir): Use an intermediate target for
9132         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
9133         macros, like $(ALLOCA_H), which cannot be passed through the command
9134         line.
9135
9136 2005-10-15  Simon Josefsson  <jas@extundo.com>
9137
9138         * modules/rijndael-tests: New file.
9139
9140         * modules/rijndael: New file.
9141
9142 2005-10-15  Simon Josefsson  <jas@extundo.com>
9143
9144         * m4/rijndael.m4: New file.
9145
9146 2005-10-15  Simon Josefsson  <jas@extundo.com>
9147
9148         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
9149
9150         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
9151
9152 2005-10-14  Simon Josefsson  <jas@extundo.com>
9153
9154         * tests/test-arcfour.c: New file.
9155
9156         * modules/arcfour, modules/arcfour-tests: New files.
9157
9158 2005-10-14  Simon Josefsson  <jas@extundo.com>
9159
9160         * m4/arcfour.m4: New file.
9161
9162 2005-10-14  Simon Josefsson  <jas@extundo.com>
9163
9164         * lib/arcfour.h, lib/arcfour.c: New files.
9165
9166 2005-10-14  Roland McGrath  <roland@redhat.com>
9167
9168         Import from libc.  [BZ #1331]
9169         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
9170         macro argument.
9171         Reported by Matej Vela <vela@debian.org>.
9172
9173 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9174
9175         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
9176         include <wchar.h>; no longer needed.
9177
9178 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9179
9180         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
9181
9182 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
9183         and  Ulrich Drepper  <drepper@redhat.com>
9184
9185         Import from libc.
9186         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
9187         instead of inline stream orientation test and two separate
9188         function calls.  Pay no attention to USE_IN_LIBIO.
9189
9190 2005-10-13  Simon Josefsson  <jas@extundo.com>
9191
9192         * modules/gc-hmac-md5-tests: New file.
9193
9194         * tests/test-gc-hmac-sha1.c: New file.
9195
9196         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
9197
9198         * modules/gc-hmac-md5-tests: New file.
9199
9200         * tests/test-gc-md5.c: New file.
9201
9202         * modules/gc-md5-tests: New file.
9203
9204 2005-10-13  Simon Josefsson  <jas@extundo.com>
9205
9206         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
9207         Move memory allocation outside of loop.
9208
9209 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
9210
9211         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
9212         intermediate directory is in a read-only file system.  Problem
9213         reported by Eric Blake.
9214
9215 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
9216
9217         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
9218
9219 2005-10-12  Simon Josefsson  <jas@extundo.com>
9220
9221         * tests/test-hmac-sha1.c: New file.
9222
9223         * modules/hmac-sha1-tests: New file.
9224
9225         * modules/hmac-sha1: New file.
9226
9227 2005-10-12  Simon Josefsson  <jas@extundo.com>
9228
9229         * modules/gc-sha1: New file.
9230
9231 2005-10-12  Simon Josefsson  <jas@extundo.com>
9232
9233         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
9234
9235         * tests/test-gc-pbkdf2-sha1.c: New file.
9236
9237 2005-10-12  Simon Josefsson  <jas@extundo.com>
9238
9239         * modules/gc-md5, modules/gc-hmac-md5: New files.
9240
9241         * modules/gc (Files): Remove md5, memxor and hmac files.
9242
9243 2005-10-12  Simon Josefsson  <jas@extundo.com>
9244
9245         * m4/gc-pbkdf2-sha1.m4: New file.
9246
9247         * m4/gc-hmac-sha1.m4: New file.
9248
9249         * m4/gc-sha1: New file.
9250
9251         * m4/hmac-sha1.m4: New file.
9252
9253 2005-10-12  Simon Josefsson  <jas@extundo.com>
9254
9255         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
9256
9257         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
9258
9259 2005-10-12  Simon Josefsson  <jas@extundo.com>
9260
9261         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
9262         suggested by Bruno Haible <bruno@clisp.org>.
9263
9264 2005-10-12  Simon Josefsson  <jas@extundo.com>
9265
9266         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
9267
9268 2005-10-12  Simon Josefsson  <jas@extundo.com>
9269
9270         * lib/gc-pbkdf2-sha1.c: New file.
9271
9272         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
9273
9274 2005-10-12  Simon Josefsson  <jas@extundo.com>
9275
9276         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
9277
9278         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
9279
9280 2005-10-12  Simon Josefsson  <jas@extundo.com>
9281
9282         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
9283         GC_USE_HMAC_MD5, respectively.
9284
9285         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
9286         (gc_md5): Fix typo.
9287
9288         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
9289
9290         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
9291
9292         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
9293
9294 2005-10-12  Bruno Haible  <bruno@clisp.org>
9295
9296         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
9297         Reported by Stepan Kasal <kasal@ucw.cz>.
9298
9299 2005-10-11  Simon Josefsson  <jas@extundo.com>
9300
9301         * tests/test-crc.c: New file.
9302
9303         * modules/crc, modules/crc-tests: New files.
9304
9305 2005-10-11  Simon Josefsson  <jas@extundo.com>
9306
9307         * m4/crc.m4: New file.
9308
9309 2005-10-11  Simon Josefsson  <jas@extundo.com>
9310
9311         * lib/gc.h: Add gc_hash and gc_hash_buffer.
9312
9313         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
9314
9315         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
9316
9317 2005-10-11  Simon Josefsson  <jas@extundo.com>
9318
9319         * lib/crc.h, lib/crc.c: New files.
9320
9321         * lib/gc.h (gc_hash_buffer): Add doc.
9322
9323 2005-10-11  Bruno Haible  <bruno@clisp.org>
9324
9325         * modules/c-strcasestr: New file.
9326         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
9327
9328 2005-10-11  Bruno Haible  <bruno@clisp.org>
9329
9330         * modules/c-strcase: New file.
9331         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
9332
9333 2005-10-11  Bruno Haible  <bruno@clisp.org>
9334
9335         * lib/strcasecmp.c: Include limits.h.
9336         (strcasecmp): Avoid integer overflow on exotic platforms.
9337         * lib/strncasecmp.c: Include limits.h.
9338         (strncasecmp): Avoid integer overflow on exotic platforms.
9339         Reported by Paul Eggert.
9340
9341 2005-10-11  Bruno Haible  <bruno@clisp.org>
9342
9343         * lib/c-strcasestr.h: New file, from GNU gettext.
9344         * lib/c-strcasestr.c: New file, from GNU gettext.
9345
9346 2005-10-11  Bruno Haible  <bruno@clisp.org>
9347
9348         * lib/c-strcase.h: New file, from GNU gettext.
9349         * lib/c-strcasecmp.c: New file, from GNU gettext.
9350         * lib/c-strncasecmp.c: New file, from GNU gettext.
9351
9352 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9353
9354         * modules/mempcpy (License): GPL -> LGPL.
9355         * modules/strchrnul (License): Likewise.
9356         * modules/sysexits (License): Likewise.
9357
9358 2005-10-08  Simon Josefsson  <jas@extundo.com>
9359
9360         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
9361
9362 2005-10-07  Simon Josefsson  <jas@extundo.com>
9363
9364         * m4/memxor.m4: Remove gl_C_RESTRICT call.
9365
9366 2005-10-06  Simon Josefsson  <jas@extundo.com>
9367
9368         * tests/test-hmac-md5.c: New file.
9369
9370         * modules/hmac-md5-tests: New file.
9371
9372         * modules/hmac-md5: New file.
9373
9374 2005-10-06  Simon Josefsson  <jas@extundo.com>
9375
9376         * m4/hmac-md5.m4: New file.
9377
9378         * m4/memxor.m4: Require gl_C_RESTRICT.
9379
9380 2005-10-06  Simon Josefsson  <jas@extundo.com>
9381
9382         * lib/memxor.c (memxor): Avoid casts and warnings.
9383
9384 2005-10-06  Simon Josefsson  <jas@extundo.com>
9385
9386         * lib/hmac-md5.c: New file.
9387
9388         * lib/hmac.h: New file.
9389
9390 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9391
9392         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
9393         promotes to int, not unsigned int, to catch the AIX 5.3
9394         compiler bug.
9395
9396 2005-10-05  Simon Josefsson  <jas@extundo.com>
9397
9398         * modules/memxor: New file.
9399
9400         * modules/iconv (Files): Move config.rpath to havelib, it is used
9401         there.
9402
9403         * modules/havelib (Files): Add config.rpath.
9404
9405 2005-10-05  Simon Josefsson  <jas@extundo.com>
9406
9407         * m4/memxor.m4: New file.
9408
9409 2005-10-05  Simon Josefsson  <jas@extundo.com>
9410
9411         * lib/memxor.c (memxor): Fix compiler error.
9412
9413         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
9414         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
9415
9416         * lib/memxor.h, lib/memxor.c: New files.
9417
9418         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
9419         we assume all systems have it, suggested by Jim Meyering
9420         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
9421         any systems lack sys/socket.h; mingw32 is known to lack it, but we
9422         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
9423         same reasons.
9424
9425 2005-10-05  Simon Josefsson  <jas@extundo.com>
9426
9427         * config/srclist.txt: Add glibc bug 1423 for md5.h.
9428
9429 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9430
9431         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
9432         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
9433         needed, since the source code now assumes these .h files.
9434
9435 2005-10-05  Derek Price  <derek@ximbiot.com>
9436
9437         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
9438
9439 2005-10-05  Bruno Haible  <bruno@clisp.org>
9440
9441         * modules/stdint (License): Change to LGPL.
9442
9443 2005-10-04  Simon Josefsson  <jas@extundo.com>
9444
9445         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
9446         D. Baushke" <mdb@gnu.org>.
9447
9448 2005-10-04  Bruno Haible  <bruno@clisp.org>
9449
9450         * lib/verify.h (verify_true): Provide alternative definition for C++.
9451
9452 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9453
9454         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
9455         (SSIZE_MAX): New macro, if not already defined.
9456         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
9457         than 2 GiB.
9458
9459 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9460
9461         Sync from coreutils.
9462         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
9463         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
9464         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
9465         ULLONG_MAX doesn't work with 2.7.2.1.
9466
9467 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9468
9469         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
9470         From Ben Pfaff.
9471
9472         * modules/exclude (Depends-on): Depend on verify.
9473         * modules/strtoimax (Depends-on): Likewise.
9474         * modules/utimecmp (Depends-on): Likewise.
9475
9476 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9477
9478         * lib/exclude.c: Include verify.h.
9479         (verify): Remove.  All callers changed to use verify.h's version.
9480         * lib/strtoimax.c: Likewise.
9481         * lib/utimecmp.c: Likewis.e
9482
9483         Sync from coreutils.
9484         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
9485         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
9486         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
9487         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
9488         bother returning ENOSYS if settimeofday or stime fails; just let
9489         them return whatever errno they want to return.
9490         * lib/utimens.c: Include unistd.h, for dup2.
9491         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
9492         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
9493
9494 2005-10-02  Jim Meyering  <jim@meyering.net>
9495
9496         Sync from coreutils.
9497         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
9498         from glibc-2.2.5 that fails for read-only files.
9499
9500 2005-10-02  Jim Meyering  <jim@meyering.net>
9501
9502         Sync from coreutils.
9503         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
9504         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
9505         `#if HAVE_CONFIG_H'.
9506         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
9507         Remove AT_FDCWD test.
9508         Do not consume the fd unless successful.
9509         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
9510         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
9511         block, so that we don't even try to compile it if settimeofday is
9512         available.  This works around a compilation failure on OSF1 V5.1,
9513         due to stime requiring a `long int*' while tv_sec is `int'.
9514
9515 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
9516
9517         Sync from coreutils.
9518         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
9519         against `yes', rather than just testing for nonempty.
9520
9521 2005-10-01  Simon Josefsson  <jas@extundo.com>
9522
9523         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
9524         and Darwin.
9525
9526         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
9527         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
9528         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
9529         freeaddrinfo and gai_strerror are declared by the POSIX headers.
9530         Check if struct addrinfo is declared.
9531
9532 2005-10-01  Simon Josefsson  <jas@extundo.com>
9533
9534         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
9535         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
9536         AI_* and EAI_* definitions.  Protect function declarations.
9537
9538 2005-10-01  Jim Meyering  <jim@meyering.net>
9539
9540         Sync from coreutils.
9541
9542         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
9543         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
9544         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
9545         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9546         in the inet and nsl libraries.  Required on Solaris 5.7.
9547
9548 2005-10-01  Jim Meyering  <jim@meyering.net>
9549
9550         Sync from coreutils.
9551         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9552         in the inet and nsl libraries.  Required on Solaris 5.7.
9553
9554 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
9555
9556         * lib/getdelim.c (getdelim): Remove unused variables.
9557
9558 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
9559
9560         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
9561         so that the code works even with ancient cpp.  Portability problem
9562         with GCC 2.7.2.1 reported by Thomas M.Ott.
9563
9564 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
9565
9566         * modules/regex (Depends-on): Add strcase.
9567
9568         * modules/gethostname (Licence): Change from GPL to LGPL, since
9569         gethostname.c is a trivial implementation of a standard library
9570         function.
9571         * modules/poll (License): Change from GPL to LGPL, since it's
9572         derived from LGPL code.
9573
9574 2005-09-27  Jim Meyering  <jim@meyering.net>
9575
9576         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
9577         HAVE_CONFIG_H.
9578
9579         * lib/intprops.h (signed_type_or_expr__): Define.
9580         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
9581         for unsigned types.
9582
9583 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
9584
9585         * lib/verify.h (verify_expr): Remove, replacing with:
9586         (verify_true): New macro that returns true instead of void.
9587         (verify_type__): Remove.
9588         (verify): Use verify_true rather than verify_type__.
9589
9590 2005-09-26  Bruno Haible  <bruno@clisp.org>
9591
9592         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
9593         is necessary.
9594         (lib_SOURCES): Remove mbchar.c.
9595         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
9596         (Files): Add m4/mbrtowc.m4.
9597         * modules/mbiter: Likewise.
9598         * modules/mbuiter: Likewise.
9599
9600 2005-09-26  Bruno Haible  <bruno@clisp.org>
9601
9602         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
9603         compile mbchar.c if they are not both present.
9604         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
9605         * m4/mbiter.m4 (gl_MBITER): Likewise.
9606         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
9607         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
9608         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
9609
9610 2005-09-25  Jim Meyering  <jim@meyering.net>
9611
9612         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
9613         also uses socklen_t.
9614
9615 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
9616
9617         * lib/utimens.c (ENOSYS): Define if not already defined.
9618         (futimens): Support having a null PATH if the file descriptor
9619         is nonnegative.
9620
9621         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
9622         Remove.
9623         (__attribute): Define to empty unless GCC 3.1 or later.
9624         This works around a core dump on OpenBSD 3.4, which has GCC
9625         2.95.3, which dumps core when given __attribute__(()).  It also
9626         simplifies other tests, since we really don't want to bother with
9627         worrying about which ancient version of GCC supported what.
9628         Original problem reported by Yoann Vandoorselaere, with part of
9629         the fix suggested by Derek Price.
9630
9631 2005-09-24  Jim Meyering  <jim@meyering.net>
9632
9633         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
9634         so we can once again use a positive bitfield width of 1 -- now we
9635         don't have to explain why we were using a bitfield width of 2.
9636
9637 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9638
9639         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
9640         and similarly for the other external symbols.  Problem reported
9641         by James Gallager.
9642
9643         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
9644         bug reported by Jim Meyering.
9645
9646         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
9647         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
9648         not needed, since socklen is a prerequisite module.
9649
9650 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9651
9652         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
9653         Problem reported by Eric Blake.
9654         (getaddrinfo): Initialize se so that it's not garbage.
9655         Redo internal storage allocation so that it doesn't make unportable
9656         assumptions about alignment.
9657         Fix a memory leak.
9658
9659         * lib/utimens.c (futimens): Use futimesat if available.
9660         Prefer it to futimes since it doesn't have the futimes bug.
9661
9662         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
9663         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
9664         Instead, declare a function that returns a pointer to an array,
9665         and use verify_type__ to declare the size of the array.
9666         Problem and germ of a solution reported by Bruno Haible.
9667         (verify_type__): Use 2, not 1, for bitfield size, to avoid
9668         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
9669
9670 2005-09-23  Jim Meyering  <jim@meyering.net>
9671
9672         Sync from coreutils.
9673         Correct build failure (socklen_t not defined) on at least
9674         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
9675         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
9676
9677 2005-09-23  Jim Meyering  <jim@meyering.net>
9678
9679         * modules/getaddrinfo (Depends-on): Add socklen.
9680
9681 2005-09-23  Bruno Haible  <bruno@clisp.org>
9682
9683         * tests/test-verify.c: New file.
9684
9685 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9686
9687         Sync from coreutils.
9688
9689         * modules/argmatch (Depends-on): Add verify.
9690         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
9691         unistd-safer.
9692         * modules/save-cwd (Depends-on): Likewise.
9693
9694         * modules/openat (Files): Add lib/openat-die.c.
9695         (Depends-on): Remove error, exitfail.
9696         Add dirname.
9697
9698         * modules/verify: New file.
9699         * MODULES.html.sh (Diagnostics <assert.h>): New section,
9700         with "verify" module.
9701
9702 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9703
9704         Sync from coreutils.
9705
9706         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
9707         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
9708         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
9709         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
9710         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
9711         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
9712         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
9713         Don't bother checking for string.h, stdlib.h, unistd.h.
9714         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
9715         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
9716         module's job.
9717         * m4/jm-macros.m4 (gl_MACROS): Likewise.
9718         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
9719
9720         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
9721         (gl_GETDATE): Use it.
9722
9723         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
9724
9725 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9726
9727         Sync from coreutils.
9728
9729         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
9730         stat-time.h.
9731         * lib/argmatch.h: Include verify.h
9732         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
9733         (ARGMATCH_ASSERT): Remove; unused.
9734         * lib/canonicalize.c: Assume STDC_HEADERS.
9735         * lib/exclude.c: Include "strcase.h".
9736         * lib/regex_internal.h [!defined _LIBC]: Likewise.
9737         * lib/getusershell.c: Include stdio--.h rather than stdio.h
9738         and stdio-safer.h.
9739         (getusershell): Call fopen, not fopen_safer.
9740         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
9741         Do not include unistd-safer.h.
9742         (save_cwd): Don't call fd_safer; no longer needed
9743         now that we include fcntl--.h.
9744
9745         * lib/getdate.y (relative_time): New type.
9746         (RELATIVE_TIME_0): New constant.
9747         (parser_control): Use relative_time instead of doing it ourselves.
9748         (%union): Add new relative_time rel member.
9749         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
9750         Now typeless.
9751         (relunit, relunit_snumber): Now of type rel.
9752         (zone, rel, relunit, get_date): Adjust to above changes.
9753
9754         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
9755         Do not include unistd-safer.h.
9756         (getloadavg): Don't call fd_safer; no longer needed
9757         now that we include fcntl--.h.
9758
9759         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
9760         (make_dir_parents): Treat ENOSYS like EEXIST.
9761
9762         Improve quality of diagnostics on restore_cwd failure.
9763         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
9764         (make_dir_parents): Last arg is now int * (for errno), not bool *.
9765         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
9766         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
9767         each time through the loop.  Do not diagnose restore_cwd failure;
9768         that is the caller's job (and perhaps the caller does not care).
9769
9770         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
9771         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
9772         If the file already exists but is not a directory, don't bother
9773         to try to make its parents.
9774         Close potential file descriptor leak if we can't chdir("/") (!).
9775         Don't always return true if chdir($PWD) fails; return true only
9776         if the requested action was done successfully (except for the
9777         chdir($PWD)).
9778         Don't log final directory unless we actually made it.
9779         Refactor to avoid duplicate code to fix up permissions.
9780         Don't attempt to fix up parent permissions if chdir($PWD) fails.
9781
9782         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
9783         to make it a bit faster and (I hope) clearer.
9784         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
9785         Fix bug in formats like %2N.
9786
9787         * lib/verify.h: New file.
9788
9789 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9790
9791         Sync from coreutils.
9792         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
9793
9794 2005-09-22  Jim Meyering  <jim@meyering.net>
9795
9796         Sync from coreutils.
9797
9798         * m4/lstat.m4 (gl_FUNC_LSTAT):
9799         Use AC_LIBSOURCES to require lstat.c and lstat.h.
9800         Remove obsolete comment.
9801         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
9802         * m4/xstrtod.m4: Likewise.
9803
9804         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
9805
9806 2005-09-22  Jim Meyering  <jim@meyering.net>
9807
9808         Sync from coreutils.
9809
9810         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
9811
9812         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
9813         the .tm_year member, since otherwise gcc-4.0 would now warn about
9814         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
9815
9816         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
9817         order to avoid an unsuppressible warning from gcc on 64-bit systems.
9818
9819         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
9820         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
9821         when run in a time zone for which daylight savings time is in effect
9822         for the starting date.
9823
9824         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
9825         stop us from restricting permissions of just-created absolute-named
9826         directories.
9827         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
9828         to restore initial working directory.
9829         * lib/mkdir-p.c (make_dir_parents): New parameter:
9830         different_working_dir, to tell caller if/when we change the working
9831         directory and are unable to return to the initial one.
9832         * lib/mkdir-p.h (make_dir_parents): Update prototype.
9833         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
9834         `return false'.  This fixes a bug introduced on 2004-07-30.
9835
9836         * lib/openat.c (fdopendir): Be sure to close the supplied
9837         file descriptor before returning.  This makes our replacement
9838         implementation a little closer to Solaris's, where fdopendir
9839         ties the file descriptor to the returned DIR* pointer.
9840         * lib/openat.c (unlinkat): New function.
9841         * lib/openat.h (unlinkat): Add prototype.
9842         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
9843         (openat_restore_fail): Rename from openat_restore_die.
9844         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
9845
9846         Provide an alternative to exiting immediately upon save_cwd or
9847         restore_cwd failure.  Now, an application can arrange e.g.,
9848         to perform a longjump in that case.
9849         * lib/openat.c: Include dirname.h.
9850         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
9851         (rpl_openat, fdopendir, fstatat): Call openat_save_die
9852         and openat_restore_die rather than calling error directly.
9853         Don't include "error.h" or "exitfail.h"; they're no longer needed.
9854
9855         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
9856         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
9857         define.
9858
9859         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
9860         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
9861                             int utc, int nanoseconds);
9862         Background:
9863         date should not have to allocate a megabyte of virtual memory to
9864         handle a format argument like +%1048575T.  When implemented with
9865         strftime, it must allocate such a buffer, use strftime to fill it
9866         in, print it, then free it.
9867         With fprintftime, it simply prints everything and exits.
9868         With no need for memory allocation, that's one fewer way to fail.
9869         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
9870         optional field width, not before, so we accept %9:z, not %:9z.
9871         (my_strftime): Be sure to use L_('x') for literals.
9872
9873         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
9874         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
9875         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
9876         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
9877         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
9878         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
9879         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
9880         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
9881         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
9882         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
9883         * lib/xgethostname.c, lib/xreadlink.c:
9884         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
9885
9886         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
9887         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
9888         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
9889         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
9890         and don't include <sys/file.h>).
9891
9892 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
9893
9894         Sync from coreutils.
9895
9896         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
9897         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
9898         [!LDAV_DONE]: Avoid unused variable warning.
9899
9900 2005-09-21  Bruno Haible  <bruno@clisp.org>
9901
9902         * lib/unicodeio.h (unicode_to_mb): New declaration.
9903
9904 2005-09-20  Derek Price  <derek@ximbiot.com>
9905
9906         * lib/getaddrinfo.c: Don't include <netdb.h> included from
9907         getaddrinfo.h.
9908
9909 2005-09-20  Bruno Haible  <bruno@clisp.org>
9910
9911         * gnulib-tool: Remove trailing slashes from the values specified for
9912         --source-base, --m4-base, --tests-base, --aux-dir.
9913         Suggested by Simon Josefsson <jas@extundo.com>.
9914
9915 2005-09-20  Bruno Haible  <bruno@clisp.org>
9916
9917         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
9918         func_modules_to_filelist, func_import, func_create_testdir): Make all
9919         sorting results locale-independent, so that gnulib-cache.m4 doesn't
9920         change when gnulib-tool is invoked in a different locale.
9921
9922 2005-09-19  Simon Josefsson  <jas@extundo.com>
9923
9924         * m4/socklen.m4: Fix typo.
9925
9926 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9927
9928         Use a consistent style for including <config.h>.
9929         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
9930         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
9931         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
9932         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
9933         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
9934         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
9935         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
9936         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
9937         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
9938         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
9939         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
9940         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
9941         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
9942         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
9943         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
9944         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
9945         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
9946         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
9947         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
9948         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
9949         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
9950         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
9951         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
9952         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
9953         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
9954         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
9955         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
9956         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
9957         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
9958         lib/xstrtoumax.c, lib/yesno.c:
9959         Standardize inclusion of config.h.
9960         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
9961         lib/inttostr.h:  Removed inclusion of config.h from header files.
9962         * lib/inttostr.c:  Adjusted in-tree users.
9963         * lib/timespec.h: Remove superfluous warning to include config.h.
9964         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
9965         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
9966         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
9967         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
9968         config.h with HAVE_CONFIG_H.
9969
9970 2005-09-19  Jim Meyering  <jim@meyering.net>
9971
9972         * modules/pathmax (License): Change to LGPL.
9973
9974 2005-09-19  Derek Price  <derek@ximbiot.com>
9975
9976         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
9977
9978 2005-09-19  Bruno Haible  <bruno@clisp.org>
9979
9980         * gnulib-tool (import): Provide default for --tests-base.
9981
9982 2005-09-19  Bruno Haible  <bruno@clisp.org>
9983
9984         * doc/quote.texi: New file, extracted from gnulib.texi.
9985         * doc/ctime.texi: New file, extracted from gnulib.texi.
9986         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
9987         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
9988         * doc/gnulib.texi: Include them.
9989
9990 2005-09-18  Bruno Haible  <bruno@clisp.org>
9991
9992         Portability fix.
9993         * gnulib-tool (func_readlink): New function.
9994         (func_ln_if_changed): Use it.
9995
9996 2005-09-18  Bruno Haible  <bruno@clisp.org>
9997
9998         * gnulib-tool: Support --with-tests also with --import.
9999         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
10000         (func_import): Use variables $testsbase and $inctests. Emit a
10001         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
10002         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
10003         SUBDIRS += $testsdir.
10004         (func_create_testdir): Update.
10005
10006 2005-09-18  Bruno Haible  <bruno@clisp.org>
10007
10008         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
10009         instead of $dry_run.
10010         (func_cp_if_changed, func_mv_if_changed): Remove functions.
10011         (func_ln_if_changed): Don't handle dry-run here.
10012         (func_import): In dry-run mode, detect more precisely which actions
10013         would be performed, and don't use "...ing" verbs.
10014
10015 2005-09-18  Bruno Haible  <bruno@clisp.org>
10016
10017         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
10018         (func_import): Use join on two temporary files instead of three nested
10019         loops, in order to determine which files are new or old.
10020
10021 2005-09-18  Bruno Haible  <bruno@clisp.org>
10022
10023         * gnulib-tool (func_import): Comment out code that spits out the
10024         new files with --dry-run.
10025
10026 2005-09-18  Bruno Haible  <bruno@clisp.org>
10027
10028         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
10029
10030 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10031
10032         * lib/stat-time.h: New file.
10033         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
10034         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
10035         in a different way.
10036         (timespec_cmp): New function.
10037         * lib/utimecmp.c: Include stat-time.h.
10038         (SYSCALL_RESOLUTION): Depend on whether various struct stat
10039         members exist, not on the obsolescent ST_MTIM_NSEC.
10040         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
10041
10042 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10043
10044         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
10045
10046 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10047
10048         * MODULES.html.sh (File system functions): Add stat-time.
10049         * modules/stat-time: New file.
10050         * modules/timespec (Files): Remove m4/st_mtim.m4; this
10051         is now done in a different way, by the stat-time module.
10052         * modules/utimecmp (Depends-on): Add stat-time.
10053
10054 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10055
10056         * m4/st_mtim.m4: Remove.  Superseded by...
10057         * m4/stat-time.m4: New file.
10058         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
10059         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
10060
10061 2005-09-15  Derek Price  <derek@ximbiot.com>
10062
10063         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
10064
10065 2005-09-15  Derek Price  <derek@ximbiot.com>
10066
10067         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
10068         * lib/regex_internal.c: Ditto, using this...
10069         (__GNUC_PREREQ): ...new macro.
10070         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
10071         using...
10072         (__GNUC_PREREQ): ...this new macro.
10073
10074         * lib/strstr.h: Include string.h. Define strstr as a macro here.
10075
10076 2005-09-15  Derek Price  <derek@ximbiot.com>
10077             Paul Eggert  <eggert@cs.ucla.edu>
10078
10079         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
10080         changes, consolidating in...
10081         * lib/regex_internal.h: ...this file.
10082
10083 2005-09-13  Jim Meyering  <jim@meyering.net>
10084
10085         * lib/canon-host.c: Filter through gnu indent and reword comments
10086         slightly.
10087         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
10088
10089 2005-09-13  Derek Price  <derek@ximbiot.com>
10090
10091         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
10092         failure.
10093         Reported by Jim Meyering  <jim@meyering.net>.
10094
10095 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10096
10097         * lib/base64.c: Typo.
10098         (base64_encode): Put b64str in initialized data section.
10099
10100 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
10101
10102         Merge glibc and coreutils changes into gnulib, plus a few
10103         extra fixes.
10104         * lib/md5.c: Use #error rather than a string.
10105         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
10106         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
10107         (__attribute__): Define to empty for non recent-GCC.
10108         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
10109         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
10110         Renamed from their non-__ counterparts, with new macros replacing
10111         them if not _LIBC.  Add __THROW attribute.
10112         (rol): Remove.
10113         (struct md5_ctx): Align buffer if using GCC.
10114         * lib/sha1.h (struct sha1_ctx): Likewise.
10115         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
10116         The old name was backwards.
10117         (NOTSWAP): Remove; not used.
10118         (rol): New macro, moved here from md5.h.
10119         (sha1_process_block): Remove a FIXME that doesn't make sense.
10120
10121 2005-09-12  Derek Price  <derek@ximbiot.com>
10122
10123         Return usable errors from canon-host.
10124         * lib/canon-host.h: New file.
10125         * lib/canon-host.c (canon_host): Wrap...
10126         (canon_host_r): ...this new function, which now relies exclusively on
10127         getaddrinfo.
10128         (ch_strerror): New function.
10129         (last_cherror): New global.
10130         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
10131         interface.
10132         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
10133         void *.
10134         (freeaddrinfo): Free ai->ai_canonname when set.
10135
10136 2005-09-12  Derek Price  <derek@ximbiot.com>
10137
10138         Make canon-host require getaddrinfo.
10139         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
10140         AC_LIBSOURCE canon-host.h.  Call...
10141         (gl_PREREQ_CANON_HOST): ...this new function, which requires
10142         gl_GETADDRINFO.
10143         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
10144
10145 2005-09-12  Derek Price  <derek@ximbiot.com>
10146
10147         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
10148         LGPL.
10149         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
10150
10151 2005-09-12  Derek Price  <derek@ximbiot.com>
10152
10153         * lib/gai_strerror.c: Include config.h when available.  Include
10154         getaddrinfo.h before other headers to test interface.
10155         Reported by Larry Jones <lawrence.jones@ugs.com>.
10156
10157 2005-09-12  Derek Price  <derek@ximbiot.com>
10158             Paul Eggert  <eggert@cs.ucla.edu>
10159
10160         * modules/glob (Files): Add glob-libc.h.
10161
10162 2005-09-12  Derek Price  <derek@ximbiot.com>
10163             Paul Eggert  <eggert@cs.ucla.edu>
10164
10165         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
10166         glob_.h, glob-libc.h.
10167         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
10168
10169 2005-09-12  Derek Price  <derek@ximbiot.com>
10170             Paul Eggert  <eggert@cs.ucla.edu>
10171
10172         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
10173         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
10174         protecting things that should be done only in gnulib contexts.
10175         * lib/glob_.h: New file, containing only the glob things needed for
10176         gnulib.
10177         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
10178         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
10179         (glob, globfree, glob_pattern_p): Now defined simply in terms of
10180         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
10181         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
10182         and to respect the namespace rules better.
10183
10184 2005-09-08  Simon Josefsson  <jas@extundo.com>
10185
10186         * modules/socklen: New file.
10187
10188 2005-09-08  Simon Josefsson  <jas@extundo.com>
10189
10190         * m4/socklen.m4: New file.
10191
10192 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10193
10194         * modules/utimens (Files): Add m4/utimbuf.m4, since
10195         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
10196         Reported by Sergey Poznyakoff.
10197
10198 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10199
10200         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
10201         definitions, since that's the preferred style in glibc.
10202         Fix a minor spacing issue, and update copyright notice to match
10203         glibc's.
10204
10205 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10206
10207         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
10208
10209 2005-09-06  Simon Josefsson  <jas@extundo.com>
10210
10211         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
10212         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
10213
10214 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10215
10216         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
10217         warning.
10218
10219 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10220
10221         * config/srclist.txt: Add glibc bug 1302.
10222
10223 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
10224
10225         Change bitset word type from unsigned int to unsigned long int,
10226         as this has better performance on typical 64-bit hosts.
10227         Port bitset code to hosts with unusual word sizes.
10228         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
10229         (build_collating_symbol):
10230         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
10231         argument is a bitset.  This is merely a style issue, but it makes
10232         it clearer that an entire array is expected.
10233         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
10234         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
10235         Port to the case where bitset_word is not the same as unsigned int.
10236         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10237         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
10238         Likewise.
10239         * lib/regexec.c (check_dst_limits_calc_pos_1,
10240         check_subexp_matching_top):
10241         (build_trtable, group_nodes_into_DFAstates):
10242         Likewise.
10243         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
10244         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
10245         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
10246         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
10247         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
10248         * lib/regcomp.c (optimize_subexps, lower_subexp):
10249         Work even if bitset_word has holes in its bitwise representation.
10250         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
10251         * lib/regexec.c (check_dst_limits_calc_pos_1,
10252         check_subexp_matching_top):
10253         Likewise.
10254         * lib/regex_internal.c (re_string_reconstruct):
10255         Don't assume UCHAR_MAX == 255.
10256         * lib/regex_internal.h (bitset_set_all): Likewise.
10257         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
10258         All uses changed.
10259         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
10260         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
10261         All uses changed.
10262         (BITSET_WORD_MAX): New macro.
10263         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
10264         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
10265         (bitset_empty, bitset_copy):
10266         Prefer sizeof (bitset) to multiplying it out ourselves.
10267         (bitset_not_merge): Remove; unused.
10268         (bitset_contain): Return bool, not unsigned int with one bit on.
10269         All callers changed.
10270         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
10271         alignment than re_node_set; do this by defining a new internal
10272         type struct dests_alloc and using it to allocate memory.
10273
10274 2005-09-05  Bruno Haible  <bruno@clisp.org>
10275
10276         * gnulib-tool (func_import): Fix comparison in handling of symbolic
10277         links.
10278
10279 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
10280
10281         * modules/size_max (Makefile.am): Add size_max.h
10282
10283 2005-09-04  Derek Price  <derek@ximbiot.com>
10284
10285         * gnulib-tool (func_import): Fix reversed $symbolic logic.
10286
10287 2005-09-03  Simon Josefsson  <jas@extundo.com>
10288
10289         * gnulib-tool: Fix typo.
10290
10291 2005-09-03  Simon Josefsson  <jas@extundo.com>
10292
10293         * config/srclist.txt: Add glibc bug 1293.
10294
10295 2005-09-03  Derek Price  <derek@ximbiot.com>
10296
10297         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
10298         From Larry Jones <lawrence.jones@ugs.com>.
10299
10300 2005-09-02  Simon Josefsson  <jas@extundo.com>
10301
10302         * modules/socklen: New file.
10303
10304 2005-09-02  Simon Josefsson  <jas@extundo.com>
10305
10306         * modules/havelib: New module.
10307
10308         * modules/gettext, modules/iconv, modules/lock, modules/readline:
10309         Use havelib.
10310
10311 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10312
10313         Check for arithmetic overflow when calculating sizes, to prevent
10314         some buffer-overflow issues.  These patches are conservative, in the
10315         sense that when I couldn't determine whether an overflow was possible,
10316         I inserted a run-time check.
10317         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
10318         macros.
10319         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
10320         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
10321         (re_xnrealloc, re_x2nrealloc): New inline functions.
10322         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
10323         parse_bracket_exp):
10324         (build_equiv_class, build_charclass): Check for arithmetic overflow
10325         in size expression calculations.
10326         * lib/regex_internal.c (re_string_realloc_buffers):
10327         (build_wcs_upper_buffer, re_node_set_add_intersect):
10328         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
10329         (re_dfa_add_node, register_state): Likewise.
10330         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
10331         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
10332         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
10333         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
10334
10335 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10336
10337         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
10338         m4/ulonglong.m4.  Problem reported by Martin Lambers.
10339
10340 2005-09-02  Bruno Haible  <bruno@clisp.org>
10341
10342         Support for lib vs. lib64 distinction on biarch platforms.
10343         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
10344         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
10345         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
10346
10347 2005-09-02  Bruno Haible  <bruno@clisp.org>
10348
10349         * gnulib-tool (import): In the other first-use case, provide defaults
10350         as well.
10351
10352 2005-09-02  Bruno Haible  <bruno@clisp.org>
10353
10354         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
10355         patches not yet found in the latest gettext release.
10356
10357 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10358
10359         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
10360         to avoid a collision with bits/local_lim.h in glibc.
10361         All uses changed.  Problem reported by Dmitry V. Levin in
10362         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
10363
10364         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
10365         bugs in int versus size_t comparisons.
10366         (re_string_context_at): Fix bug where the code assumed that
10367         Idx is signed.
10368
10369         Use bool where appropriate.
10370         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
10371         All callers changed.
10372         (calc_eclosure_iter): Likewise, for ROOT arg.
10373         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
10374         (build_charclass_op): Likewise, for NON_MATCH arg.
10375         * lib/regex_internal.c (re_string_allocate, re_string_construct):
10376         (re_string_construct_common): Likewise, for ICASE arg.
10377         * lib/regexec.c (re_search_2_stub, re_search_stub):
10378         Likewise, for RET_LEN arg.
10379         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
10380         (set_regs): Likewise, for FL_BACKTRACK arg.
10381         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
10382         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
10383         (calc_eclosure_iter, parse_bracket_exp):
10384         Use bool for internal variables that are booleans.
10385         * lib/regexec.c (re_search_internal, check_matching,
10386         proceed_next_node):
10387         (set_regs, build_sifted_states, sift_states_bkref):
10388         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
10389         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10390         (find_collation_sequence_value):
10391         Likewise.
10392         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
10393         (re_node_set_compare):
10394         Return bool, not int. All callers changed.
10395         * lib/regexec.c (check_halt_node_context, check_dst_limits):
10396         (build_trtable, check_node_accept): Likewise.
10397         * lib/regex_internal.h: Include stdbool.h.
10398
10399         Fix bugs uncovered when converting to bool.
10400         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
10401         failure instead of charging ahead blindly.
10402         * lib/regex_internal.c (register_state): Likewise.
10403         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
10404         for freeing internal storage.
10405         (group_nodes_into_DFA_states): Use unsigned int, not int, for
10406         bitset pieces used as boolean, to avoid undefined behavior
10407         on hosts that do int overflow checking.
10408
10409 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10410
10411         * config/srclist.txt: Add glibc bugs 1285-1287.
10412
10413 2005-09-01  Jim Meyering  <jim@meyering.net>
10414
10415         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
10416         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
10417         Require gl_STAT_MACROS, too.
10418
10419 2005-09-01  Bruno Haible  <bruno@clisp.org>
10420
10421         * gnulib-tool (import): In the first-use case, provide defaults.
10422
10423 2005-09-01  Bruno Haible  <bruno@clisp.org>
10424
10425         * gnulib-tool (func_import): Remove the .tmp files.
10426
10427 2005-09-01  Bruno Haible  <bruno@clisp.org>
10428
10429         * gnulib-tool (func_import): Fix handling of symbolic links.
10430
10431 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10432
10433         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
10434         old glibc regex code mishandles strings longer than 2**31 bytes.
10435         This patch fixes this when the regex code is used in gnulib
10436         (i.e., outside glibc).
10437
10438         This patch should not affect the use of the regex code inside
10439         glibc.  No doubt this problem also needs to be handled for glibc
10440         as well, but the result will be an incompatible change to the
10441         glibc ABI, and the old ABI will have to be supported too.  That
10442         can be the the subject for another patch.
10443
10444         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
10445         governing whether the rest of this patch is active.  By default,
10446         the macro is disabled and the patch has no effect.
10447         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
10448         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
10449         (struct re_pattern_buffer, re_search, re_search_2, re_match):
10450         (re_match_2, re_set_registers): Use the new types.
10451         * lib/regex_internal.h (Idx, re_hashval_t): New types.
10452         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
10453         New macros.
10454         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
10455         (re_string_context_at, bin_tree_t, re_dfastate_t):
10456         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
10457         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
10458         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
10459         (re_string_char_size_at, re_string_wchar_at):
10460         (re_string_elem_size_at):
10461         Use the new types and macros to port to 64-bit hosts.
10462         Use unsigned types for internal values, so that the code
10463         mostly works even for arrays larger than SSIZE_MAX.
10464         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
10465         (search_duplicated_node, calc_eclosure_iter, fetch_number):
10466         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
10467         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
10468         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
10469         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
10470         (calc_inveclosure, parse_dup_op, build_range_exp):
10471         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
10472         (fetch_number, create_token_tree, mark_opt_subexp):
10473         Likewise.
10474         * lib/regex_internal.c (re_string_construct_common,
10475         create_ci_newstate):
10476         (create_cd_newstate, re_string_allocate, re_string_construct):
10477         (re_string_realloc_buffers, build_wcs_upper_buffer):
10478         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10479         (re_string_reconstruct, re_string_peek_byte_case):
10480         (re_string_fetch_byte_case, re_string_context_at):
10481         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10482         (re_node_set_init_copy, re_node_set_add_intersect):
10483         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10484         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10485         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10486         (re_acquire_state, re_acquire_state_context, register_state):
10487         Likewise.
10488         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
10489         search_cur_bkref_entry):
10490         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
10491         (re_search_internal, re_search_2_stub, re_search_stub)
10492         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
10493         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
10494         (update_cur_sifted_state, check_dst_limits):
10495         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10496         (check_subexp_limits, sift_states_bkref, merge_state_array):
10497         (check_subexp_matching_top, get_subexp, get_subexp_sub):
10498         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
10499         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
10500         (expand_bkref_cache, check_node_accept_bytes):
10501         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
10502         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
10503         (acquire_init_state_context, check_halt_node_context):
10504         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
10505         (sift_states_backward, clean_state_log_if_needed):
10506         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
10507         (find_recover_state, transit_state_sb, transit_state_mb):
10508         (transit_state_bkref, build_trtable, match_ctx_clean):
10509         Likewise.
10510         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
10511         to work around an assumption that REG_MISSING is negative.
10512
10513         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
10514         (seek_collating_symbol_entry) [defined _LIBC]:
10515         (lookup_collation_sequence_value) [defined _LIBC]:
10516         (build_range_exp, build_collating_symbol) [defined _LIBC]:
10517         Use prototypes rather than old-style function definitions.
10518         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
10519         (transit_state_sb) [0]:
10520         (find_collation_sequence_value) [defined _LIBC]: Likewise.
10521
10522         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
10523         rm_eo.
10524
10525         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
10526         (optimize_subexps, lower_subexp):
10527         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
10528         since the signed shift might overflow.  Use 1u<<31 instead.
10529         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10530         Likewise.
10531         * lib/regexec.c (check_dst_limits_calc_pos_1,
10532         check_subexp_matching_top): Likewise.
10533
10534         * lib/regcomp.c (optimize_subexps, lower_subexp):
10535         Use CHAR_BIT rather than 8, for clarity.
10536         * lib/regexec.c (check_dst_limits_calc_pos_1):
10537         (check_subexp_matching_top): Likewise.
10538         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
10539         have to worry about portability issues when shifting it left.
10540         Remove no-longer-needed test for table_size > 0.
10541         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
10542         in a word, as the resulting behavior is undefined.
10543         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
10544         in one case, a <= should have been an <, and in another case the
10545         whole test was missing.
10546         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
10547         the standard name CHAR_BIT.
10548         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
10549         this is not true on one's complement and signed-magnitude hosts.
10550
10551         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
10552         next_last_offset.
10553         (struct re_dfa_t): Remove unused member states_alloc.
10554         * lib/regcomp.c (init_dfa): Don't initialize unused members.
10555
10556 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10557
10558         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
10559         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
10560         and large-file glibc and in 32-bit large-file Solaris.
10561
10562 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10563
10564         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
10565         lengths fit in regoff_t; this isn't true if regoff_t is the same
10566         width as size_t.
10567         * lib/regex.c (re_search_internal): 5th arg is LAST_START
10568         (= START + RANGE) instead of RANGE.  This avoids overflow
10569         problems when regoff_t is the same width as size_t.
10570         All callers changed.
10571         (re_search_2_stub): Check for overflow when adding the
10572         sizes of the two strings.
10573         (re_search_stub): Check for overflow when adding START
10574         to RANGE; if it occurs, substitute the extreme value.
10575
10576 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10577
10578         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
10579
10580 2005-08-31  Jim Meyering  <jim@meyering.net>
10581
10582         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
10583         a pointer-to-const.
10584         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
10585         (register_state): Likewise.
10586         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
10587         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10588         (group_nodes_into_DFAstates): Likewise.
10589
10590 2005-08-31  Jim Meyering  <jim@meyering.net>
10591
10592         * check-module: Add a FIXME comment.
10593
10594 2005-08-31  Eric Blake  <ebb9@byu.net>
10595
10596         * modules/unistd-safer (Files): Add unistd--.h.
10597         * modules/stdio-safer (Files): Add stdio--.h.
10598
10599 2005-08-31  Derek Price  <derek@ximbiot.com>
10600
10601         * lib/getdelim.c (getdelim): Return EOF on EOF.
10602         Reported by Larry Jones <lawrence.jones@ugs.com>.
10603
10604 2005-08-31  Bruno Haible  <bruno@clisp.org>
10605
10606         Avoid unnecessary diffs in the generated lib/Makefile.am.
10607         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
10608         the generated files.
10609         (func_import): Don't set cmd.
10610
10611 2005-08-31  Bruno Haible  <bruno@clisp.org>
10612
10613         * lib/strstr.c: Include <stddef.h>, for NULL.
10614         * lib/strcasestr.c: Likewise.
10615         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10616
10617 2005-08-31  Bruno Haible  <bruno@clisp.org>
10618
10619         * gnulib-tool: New option --macro-prefix.
10620         (func_import): Use macro_prefix.
10621         (import): Handle option --macro-prefix.
10622
10623 2005-08-31  Bruno Haible  <bruno@clisp.org>
10624
10625         * gnulib-tool (import): Rename most ac_* variables to cached_*.
10626         Also use new variables cached_lgpl, cached_libtool.
10627
10628 2005-08-31  Bruno Haible  <bruno@clisp.org>
10629
10630         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
10631         always instantiating them.
10632
10633 2005-08-31  Bruno Haible  <bruno@clisp.org>
10634
10635         * gnulib-tool (func_import): Read the previous cached settings
10636         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
10637         earlier added by gnulib but are now dropped. Warn when a gnulib file
10638         overwrites a non-gnulib file.
10639
10640 2005-08-31  Bruno Haible  <bruno@clisp.org>
10641
10642         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
10643         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
10644         projects that don't keep autogenerated files in CVS. Put into
10645         actioncmd only the specified modules, not the transitive closure.
10646
10647 2005-08-31  Bruno Haible  <bruno@clisp.org>
10648
10649         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
10650         Create directories that shall be filled.
10651         (import): Don't look for gl_* macros in configure.ac. Recurse across
10652         all directories containing a gnulib-cache.m4 files, if meaningful.
10653
10654 2005-08-31  Bruno Haible  <bruno@clisp.org>
10655
10656         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
10657         (import): Set seen_libtool when we see gl_LIBTOOL.
10658
10659 2005-08-31  Bruno Haible  <bruno@clisp.org>
10660
10661         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
10662         declaration macro definitions from generated gnulib.m4.
10663
10664 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
10665
10666         * lib/iconvme.h: Add prototype for iconv_alloc.
10667
10668 2005-08-29  Simon Josefsson  <jas@extundo.com>
10669
10670         * lib/iconvme.c: Fix errno.
10671
10672 2005-08-29  Bruno Haible  <bruno@clisp.org>
10673
10674         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
10675         that it works when the directory contains spaces.
10676
10677 2005-08-29  Bruno Haible  <bruno@clisp.org>
10678
10679         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
10680
10681 2005-08-29  Bruno Haible  <bruno@clisp.org>
10682
10683         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
10684         Emit more advice.
10685
10686 2005-08-29  Bruno Haible  <bruno@clisp.org>
10687         and Stepan Kasal  <kasal@ucw.cz>
10688
10689         * check-module: If more parameters are given, check each of them
10690         separately; add more exceptions, as noted by Jim Meyering.
10691         (check_module): New procedure.
10692         (%exempt_header): Now contains all exceptions.
10693
10694 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
10695
10696         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
10697
10698 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
10699
10700         * lib/iconvme.c: Split iconv_string into iconv_alloc.
10701
10702 2005-08-28  Bruno Haible  <bruno@clisp.org>
10703
10704         * m4/gnulib-tool.m4: New file.
10705
10706 2005-08-27  Jim Meyering  <jim@meyering.net>
10707
10708         * modules/unistd-safer (Files): Add pipe-safer.c.
10709         * modules/fcntl-safer (Files): Add creat-safer.c.
10710
10711 2005-08-27  Jim Meyering  <jim@meyering.net>
10712
10713         * m4/stdlib-safer.m4: New file.  From coreutils.
10714         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
10715         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
10716         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
10717         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
10718         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
10719
10720 2005-08-27  Jim Meyering  <jim@meyering.net>
10721
10722         * lib/fopen-safer.c: Merge minor changes from coreutils.
10723         * lib/dup-safer.c: Likewise.
10724         * lib/fd-safer.c: Likewise.
10725
10726         Merge from coreutils.
10727         * lib/stdio--.h: New file.
10728         * lib/stdlib--.h: New file.
10729         * lib/mkstemp-safer.c: New file.
10730
10731         GNU tar needs these.
10732         * lib/pipe-safer.c: New file.
10733         * lib/creat-safer.c: New file.
10734         * lib/fcntl--.h (creat): Define to creat_safer.
10735         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
10736         * lib/unistd--.h (pipe): Define to pipe_safer.
10737         * lib/unistd-safer.h: Declare pipe_safer.
10738
10739 2005-08-26  Simon Josefsson  <jas@extundo.com>
10740
10741         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
10742         Haible <bruno@clisp.org>.
10743
10744 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
10745
10746         * lib/regex_internal.h: Remove all references to
10747         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
10748         or better.
10749         (bitset_not, bitset_merge, bitset_not_merge):
10750         (bitset_mask, re_string_allocate, re_string_construct):
10751         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
10752         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
10753         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
10754         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
10755         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10756         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10757         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
10758         (re_acquire_state_context):
10759         Remove unnecessary forward decls.
10760         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
10761         Put __attribute at function definition,
10762         now that the function decl has been removed.
10763         * lib/regex_internal.c (re_string_peek_byte_case):
10764         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
10765         Likewise.
10766
10767 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
10768
10769         * m4/regex.m4: Add AC_PREREQ(2.50).
10770         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
10771
10772 2005-08-25  Simon Josefsson  <jas@extundo.com>
10773
10774         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
10775         __fsetlocking.
10776
10777 2005-08-25  Simon Josefsson  <jas@extundo.com>
10778
10779         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
10780         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
10781         GLIBC specific code.
10782
10783 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10784
10785         Make regex safe for g++.  This fixes one real bug (an "err"
10786         that should have been "*err").  g++ problem reported by
10787         Sam Steingold.
10788         * lib/regex_internal.h (re_calloc): New macro, consistent with
10789         re_malloc etc.  All callers of calloc changed to use re_calloc.
10790         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
10791         not int.  All callers changed.
10792         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
10793         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
10794         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
10795         (find_recover_state): Change "err" to "*err"; this fixes what
10796         appears to be a real bug.
10797         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
10798         versus int.
10799
10800 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10801
10802         * modules/regex (Depends-on): Add malloc, since the code
10803         assumes that !malloc(0) means failure.
10804
10805 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10806
10807         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
10808
10809         alloca modernization/simplification for regex.
10810         * lib/regex.c: Remove portability cruft for alloca.  This no longer
10811         needs to be at the start of the file, and can be moved into
10812         regex_internal.h and simplified.
10813         * lib/regex_internal.h: Include <alloca.h>.
10814         (__libc_use_alloca) [!defined _LIBC]: New macro.
10815         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
10816         now works outside glibc.
10817
10818 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10819
10820         * config/srclist.txt: Add glibc bugs 1241, 1245.
10821
10822 2005-08-25  Jim Meyering  <jim@meyering.net>
10823
10824         * lib/open-safer.c: Include <config.h>.
10825         Otherwise, we'd lose LARGEFILE support in any file using
10826         e.g. "fcntl--.h"
10827
10828 2005-08-25  Bruno Haible  <bruno@clisp.org>
10829
10830         * m4/minmax.m4: Require autoconf 2.52.
10831         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
10832         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
10833         alternatives of translit over the alphabet.
10834         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
10835
10836 2005-08-24  Simon Josefsson  <jas@extundo.com>
10837
10838         * tests/test-getpass.c: New file.
10839
10840 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10841
10842         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
10843         for GNU regex features.
10844
10845 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10846
10847         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
10848         * lib/regex.h (regerror): Likewise.
10849
10850         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
10851         requires this.  (The code never needed it.)
10852
10853         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
10854         All uses of recently-renamed identifiers changed to use the new,
10855         POSIX-compliant names.  The code will build and run just fine
10856         without these changes, but it's better to eat our own dog food
10857         and use the standard-conforming names.
10858
10859         * lib/regex.h: Fix a multitude of POSIX name space violations.
10860         These changes have an effect only for programs that define
10861         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
10862         do not change anything for programs compiled in the normal way.
10863         Also, there is no effect on the ABI.
10864
10865         (_REGEX_SOURCE): New macro.
10866         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
10867         defined and _GNU_SOURCE is not; this fixes a name space violation.
10868
10869         Rename the following macros to obey POSIX requirements.
10870         The old names are still visible as macros if _REGEX_SOURCE is defined.
10871         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
10872         RE_BACKSLASH_ESCAPE_IN_LISTS.
10873         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
10874         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
10875         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
10876         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
10877         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
10878         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
10879         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
10880         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
10881         (REG_INTERVALS): renamed from RE_INTERVALS.
10882         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
10883         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
10884         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
10885         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
10886         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
10887         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
10888         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
10889         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
10890         RE_UNMATCHED_RIGHT_PAREN_ORD.
10891         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
10892         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
10893         (REG_DEBUG): renamed from RE_DEBUG.
10894         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
10895         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
10896         unusual, since we can't clash with the POSIX REG_ICASE.
10897         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
10898         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
10899         (REG_NO_SUB): renamed from RE_NO_SUB.
10900         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
10901         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
10902         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
10903         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
10904         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
10905         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
10906         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
10907         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
10908         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
10909         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
10910         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
10911         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
10912         RE_SYNTAX_POSIX_MINIMAL_BASIC.
10913         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
10914         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
10915         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
10916         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
10917         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
10918         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
10919         (REG_FIXED): Renamed from REGS_FIXED.
10920         (REG_NREGS): Renamed from RE_NREGS.
10921
10922         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
10923         of other REG_* macros, since POSIX says the user is allowed to
10924         #undef these macros selectively.
10925
10926         (reg_errcode_t): Update comment stating what other tables need
10927         to be consistent.
10928
10929         Rename the following enum values to obey POSIX requirements.
10930         The old names are still visible as macros.
10931         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
10932         is not defined, since GNU is supposed to be a superset of POSIX as
10933         much as possible, and since we want reg_errcode_t to be a signed
10934         type for implementation consistency.
10935         (_REG_NOERROR): Renamed from REG_NOERROR.
10936         (_REG_NOMATCH): Renamed from REG_NOMATCH.
10937         (_REG_BADPAT): Renamed from REG_BADPAT.
10938         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
10939         (_REG_ECTYPE): Renamed from REG_ECTYPE.
10940         (_REG_EESCAPE): Renamed from REG_EESCAPE.
10941         (_REG_ESUBREG): Renamed from REG_ESUBREG.
10942         (_REG_EBRACK): Renamed from REG_EBRACK.
10943         (_REG_EPAREN): Renamed from REG_EPAREN.
10944         (_REG_EBRACE): Renamed from REG_EBRACE.
10945         (_REG_BADBR): Renamed from REG_BADBR.
10946         (_REG_ERANGE): Renamed from REG_ERANGE.
10947         (_REG_ESPACE): Renamed from REG_ESPACE.
10948         (_REG_BADRPT): Renamed from REG_BADRPT.
10949         (_REG_EEND): Renamed from REG_EEND.
10950         (_REG_ESIZE): Renamed from REG_ESIZE.
10951         (_REG_ERPAREN): Renamed from REG_ERPAREN.
10952         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
10953         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
10954         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
10955         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
10956
10957         (_REG_RE_NAME, _REG_RM_NAME): New macros.
10958         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
10959         changed.  But support the old name if the new one is not defined
10960         and if _REGEX_SOURCE.
10961
10962         Change the following member names in struct re_pattern_buffer.
10963         The old names are still supported if !_REGEX_SOURCE.
10964         The new names are always supported, regardless of _REGEX_SOURCE.
10965         (re_buffer): Renamed from buffer.
10966         (re_allocated): Renamed from allocated.
10967         (re_used): Renamed from used.
10968         (re_syntax): Renamed from syntax.
10969         (re_fastmap): Renamed from fastmap.
10970         (re_translate): Renamed from translate.
10971         (re_can_be_null): Renamed from can_be_null.
10972         (re_regs_allocated): Renamed from regs_allocated.
10973         (re_fastmap_accurate): Renamed from fastmap_accurate.
10974         (re_no_sub): Renamed from no_sub.
10975         (re_not_bol): Renamed from not_bol.
10976         (re_not_eol): Renamed from not_eol.
10977         (re_newline_anchor): Renamed from newline_anchor.
10978
10979         Change the following member names in struct re_registers.
10980         The old names are still supported if !_REGEX_SOURCE.
10981         The new names are always supported, regardless of _REGEX_SOURCE.
10982         (rm_num_regs): Renamed from num_regs.
10983         (rm_start): Renamed from start.
10984         (rm_end): Renamed from end.
10985
10986         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
10987         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
10988         Prepend __ to parameter names.
10989
10990         Undo yesterday's changes.
10991
10992 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10993
10994         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
10995         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
10996         lib/regex.c.
10997
10998 2005-08-24  Jim Meyering  <jim@meyering.net>
10999
11000         Sync from coreutils.
11001         * m4/fcntl-safer.m4: New file.
11002
11003         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
11004         and object files for this module.
11005
11006 2005-08-24  Jim Meyering  <jim@meyering.net>
11007
11008         Sync from coreutils.
11009         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
11010
11011 2005-08-24  Jim Meyering  <jim@meyering.net>
11012
11013         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
11014         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
11015
11016 2005-08-24  Jim Meyering  <jim@meyering.net>
11017
11018         * modules/fcntl-safer: New module.
11019         * modules/fts (Depends-on): Add fcntl-safer.
11020         * MODULES.html.sh (File descriptor based Input/Output):
11021         Add fcntl-safer.
11022
11023 2005-08-24  Bruno Haible  <bruno@clisp.org>
11024
11025         Support for unit test modules.
11026         * modules/README: Mention tests modules.
11027         * modules/TEMPLATE-TESTS: New file.
11028         * gnulib-tool: New options --extract-tests-module, --with-tests and
11029         --tests-base (unused for the moment).
11030         (testsbase, inctests): New variables.
11031         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
11032         (func_verify_module): Exclude TEMPLATE-TESTS.
11033         (func_verify_nontests_module, func_verify_tests_module): New functions.
11034         (func_get_dependencies): Add implicit dependency for tests modules.
11035         (func_get_tests_module): New function.
11036         (func_modules_transitive_closure): When --with-tests was specified,
11037         include the unit tests as well, unless explicitly avoided.
11038         (func_emit_lib_Makefile_am): Ignore the tests modules here.
11039         (func_emit_tests_Makefile_am): New function.
11040         (func_create_testdir): When --with-tests was specified, emit a
11041         tests/ directory.
11042         * MODULES.html.sh (Future developments): Update.
11043
11044 2005-08-24  Bruno Haible  <bruno@clisp.org>
11045
11046         * modules/tls-tests: New file.
11047         * tests/test-tls.c: New file, from GNU gettext.
11048
11049 2005-08-24  Bruno Haible  <bruno@clisp.org>
11050
11051         * modules/lock-tests: New file.
11052         * tests/test-lock.c: New file, from GNU gettext.
11053
11054 2005-08-24  Bruno Haible  <bruno@clisp.org>
11055
11056         * lib/lock.h: Add multiple inclusion guard.
11057         * lib/tls.h: Add multiple inclusion guard.
11058
11059 2005-08-24  Bruno Haible  <bruno@clisp.org>
11060
11061         * gnulib-tool: Add support for the --aux-dir option to
11062         --create-testdir, --create-megatestdir, --test, --megatest.
11063         (func_create_testdir, func_create_megatestdir): Optionally emit a
11064         AC_CONFIG_AUX_DIR directive.
11065         (create-testdir, create-megatestdir, test, megatest): Provide a
11066         default value for $auxdir.
11067
11068 2005-08-24  Bruno Haible  <bruno@clisp.org>
11069
11070         * gnulib-tool (import): Use compound statement instead of subshell
11071         where possible.
11072
11073 2005-08-24  Bruno Haible  <bruno@clisp.org>
11074
11075         * gnulib-tool (import): Change --aux-dir default to "build-aux".
11076
11077 2005-08-24  Bruno Haible  <bruno@clisp.org>
11078
11079         * gnulib-tool (func_version): Update.
11080
11081 2005-08-24  Bruno Haible  <bruno@clisp.org>
11082
11083         * gnulib-tool (func_import, func_create_testdir,
11084         func_create_megatestdir): Quote all autoconf macro arguments.
11085
11086 2005-08-24  Bruno Haible  <bruno@clisp.org>
11087
11088         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
11089         option --force, because --force causes the aclocal.m4 of each
11090         subdirectory to be newer than the corresponding config.h.in.
11091
11092 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11093
11094         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
11095         All contents moved to gl_REGEX.
11096         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
11097         assume that it does.
11098
11099 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11100
11101         * lib/regex.h (REG_NOSYS)
11102         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
11103         Define, since POSIX requires it as of 2001.
11104         (_REG_ENOSYS)
11105         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
11106         New private symbol, used to keep the enum signed in all cases.
11107         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
11108         Youngman in
11109         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
11110
11111         * lib/regex_internal.c (re_string_skip_chars, register_state):
11112         (calc_state_hash):
11113         Remove forward decls; no longer needed now that we use prototypes.
11114         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
11115         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
11116         (clean_state_log_if_needed): Likewise.
11117
11118 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11119
11120         * config/srclist.txt: Add glibc bugs 1231-1233.
11121
11122 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11123
11124         Fix problems reported by Sam Steingold in
11125         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
11126         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
11127         assumed that reg_errcode_t is a signed type, which is not
11128         necessarily true if _XOPEN_SOURCE is not defined.
11129         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
11130         since some compilers warn about it otherwise.
11131
11132 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11133
11134         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
11135         (init_word_char, create_initial_state, duplicate_node_closure):
11136         (fetch_token, peek_token_bracket, build_range_exp):
11137         (build_collating_symbol): Remove forward decls; no longer needed
11138         now that we use prototypes.
11139
11140         * lib/regcomp.c:
11141         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
11142         (re_compile_fastmap_iter, regcomp, regerror, regfree):
11143         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
11144         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
11145         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
11146         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
11147         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
11148         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
11149         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
11150         (build_range_exp, build_collating_symbol, parse_bracket_exp):
11151         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
11152         (build_charclass, build_charclass_op, fetch_number, create_tree):
11153         (create_token_tree, mark_opt_subexp, duplicate_tree):
11154         Use prototypes rather than old-style definitions.
11155
11156         * lib/regex_internal.c:
11157         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
11158         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
11159         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11160         (re_string_reconstruct, re_string_peek_byte_case):
11161         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
11162         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11163         (re_node_set_init_copy, re_node_set_add_intersect):
11164         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11165         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11166         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11167         (re_acquire_state, re_acquire_state_context, register_state):
11168         (create_ci_newstate, create_cd_newstate, free_state):
11169         Likewise.
11170         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
11171         re_search_2):
11172         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
11173         (re_search_internal, prune_impossible_nodes):
11174         (acquire_init_state_context, check_matching, static):
11175         (check_halt_node_context, check_halt_state_context, proceed_next_node):
11176         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
11177         (update_regs, sift_states_backward, build_sifted_states):
11178         (clean_state_log_if_needed, merge_state_array):
11179         (update_cur_sifted_state, add_epsilon_src_nodes):
11180         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
11181         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
11182         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
11183         (find_recover_state, check_subexp_matching_top, transit_state_mb):
11184         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
11185         (check_arrival, check_arrival_add_next_nodes):
11186         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11187         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11188         (check_node_accept_bytes, check_node_accept, extend_buffers):
11189         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
11190         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
11191         (sift_ctx_init):
11192         Likewise.
11193
11194         * lib/regex_internal.h:
11195         (re_string_allocate, re_string_construct, re_string_reconstruct):
11196         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
11197         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
11198         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
11199         (re_string_context_at, re_string_peek_byte_case):
11200         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
11201         is defined, since we now use prototypes always.
11202
11203         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
11204         C89 or better.  All uses removed.
11205
11206 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11207
11208         * config/srclist.txt: Add glibc bugs 1220-1227.
11209
11210 2005-08-20  Jim Meyering  <jim@meyering.net>
11211
11212         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
11213         of unused local, dfa.
11214
11215 2005-08-20  Bruno Haible  <bruno@clisp.org>
11216
11217         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
11218
11219 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11220
11221         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
11222         (re_node_set_insert_last, re_dfa_add_node):
11223         Rename local variables to avoid GCC shadowing warnings.
11224
11225 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11226
11227         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
11228         [defined lint]: Suppress bogus uninitialized-variable warnings.
11229
11230         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
11231         and let the caller return REG_ESPACE if out of space.  This
11232         removes an uninitialied-variable warning with GCC 4.0.1, and also
11233         avoids taking the address of a local variable.  All callers
11234         changed.
11235
11236 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11237
11238         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
11239         $LIBCSRC/posix/regexec.c.
11240         Add glibc bug 1217 for regcomp.c.
11241
11242 2005-08-19  Jim Meyering  <jim@meyering.net>
11243
11244         * lib/regexec.c (proceed_next_node): Redo local variables to
11245         avoid GCC shadowing warnings.
11246
11247 2005-08-18  Bruno Haible  <bruno@clisp.org>
11248
11249         * lib/strstr.c (strstr): Fix return value in multibyte case.
11250         * lib/strcasestr.c (strcasestr): Likewise.
11251
11252 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11253
11254         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
11255
11256 2005-08-17  Jim Meyering  <jim@meyering.net>
11257
11258         Make the %s format (seconds since the epoch) work for a negative
11259         number and when used with a zero-padded field width, e.g. %015s.
11260
11261         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
11262         label so that it precedes the code to set `digits'.  Otherwise,
11263         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
11264         print `00-22'.  Now, it prints `-0022', as it should.
11265
11266 2005-08-17  Bruno Haible  <bruno@clisp.org>
11267
11268         * modules/strstr (Files): Add m4/mbrtowc.m4.
11269         (Depends-on): Add mbuiter.
11270
11271 2005-08-17  Bruno Haible  <bruno@clisp.org>
11272
11273         * modules/strcasestr: New file.
11274         * MODULES.html.sh (String handling, based on ANSI C 89): Add
11275         strcasestr.
11276
11277 2005-08-17  Bruno Haible  <bruno@clisp.org>
11278
11279         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
11280
11281 2005-08-17  Bruno Haible  <bruno@clisp.org>
11282
11283         * modules/mbuiter: New file.
11284         * MODULES.html.sh (Extended multibyte and wide character utilities):
11285         Add mbuiter.
11286
11287 2005-08-17  Bruno Haible  <bruno@clisp.org>
11288
11289         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
11290         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
11291
11292 2005-08-17  Bruno Haible  <bruno@clisp.org>
11293
11294         * m4/strcasestr.m4: New file.
11295
11296 2005-08-17  Bruno Haible  <bruno@clisp.org>
11297
11298         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
11299         * lib/strstr.c: Completely rewritten, with multibyte locale support.
11300
11301 2005-08-17  Bruno Haible  <bruno@clisp.org>
11302
11303         * lib/strcasestr.h: New file.
11304         * lib/strcasestr.c: New file.
11305
11306 2005-08-17  Bruno Haible  <bruno@clisp.org>
11307
11308         * lib/strcasecmp.c: Use mbuiter.h.
11309
11310 2005-08-17  Bruno Haible  <bruno@clisp.org>
11311
11312         * lib/mbuiter.h: New file.
11313
11314 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11315
11316         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
11317         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
11318         and gl_GETOPT are both invoked via different paths (as happens
11319         with GNU tar CVS because it uses both argp and getopt), the former
11320         wins.
11321
11322 2005-08-16  Bruno Haible  <bruno@clisp.org>
11323
11324         * modules/tls: New file.
11325         * MODULES.html.sh (Multithreading): Add tls.
11326
11327 2005-08-16  Bruno Haible  <bruno@clisp.org>
11328
11329         * modules/strnlen1: New file.
11330         * MODULES.html.sh (String handling): Add strnlen1.
11331
11332 2005-08-16  Bruno Haible  <bruno@clisp.org>
11333
11334         * modules/strcase (Files): Add m4/mbrtowc.m4.
11335         (Depends-on): Add strnlen1, mbchar.
11336
11337 2005-08-16  Bruno Haible  <bruno@clisp.org>
11338
11339         * modules/mbiter: New file.
11340         * MODULES.html.sh (Extended multibyte and wide character utilities):
11341         Add mbiter.
11342
11343 2005-08-16  Bruno Haible  <bruno@clisp.org>
11344
11345         * modules/mbfile: New file.
11346         * MODULES.html.sh (Extended multibyte and wide character utilities):
11347         Add mbfile.
11348
11349 2005-08-16  Bruno Haible  <bruno@clisp.org>
11350
11351         * modules/mbchar: New file.
11352         * MODULES.html.sh (Extended multibyte and wide character utilities):
11353         New section.
11354
11355 2005-08-16  Bruno Haible  <bruno@clisp.org>
11356
11357         * m4/tls.m4: New file, from GNU gettext.
11358
11359 2005-08-16  Bruno Haible  <bruno@clisp.org>
11360
11361         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
11362         always.
11363         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
11364
11365 2005-08-16  Bruno Haible  <bruno@clisp.org>
11366
11367         * m4/mbiter.m4: New file.
11368
11369 2005-08-16  Bruno Haible  <bruno@clisp.org>
11370
11371         * m4/mbfile.m4: New file.
11372
11373 2005-08-16  Bruno Haible  <bruno@clisp.org>
11374
11375         * m4/mbchar.m4: New file.
11376
11377 2005-08-16  Bruno Haible  <bruno@clisp.org>
11378
11379         * lib/tls.h: New file, from GNU gettext.
11380         * lib/tls.c: New file, from GNU gettext.
11381
11382 2005-08-16  Bruno Haible  <bruno@clisp.org>
11383
11384         * lib/strnlen1.h: New file.
11385         * lib/strnlen1.c: New file.
11386
11387 2005-08-16  Bruno Haible  <bruno@clisp.org>
11388
11389         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
11390         (mbi_init): Update.
11391         (mbi_avail, mbi_advance): Let the iteration end before the terminating
11392         NUL byte, not after it.
11393
11394 2005-08-16  Bruno Haible  <bruno@clisp.org>
11395
11396         * lib/strcase.h (strcasecmp): Add note in comments.
11397         * lib/strncasecmp.c: Use code from strcasecmp.c.
11398         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
11399         (strcasecmp): Work correctly in multibyte locales.
11400
11401 2005-08-16  Bruno Haible  <bruno@clisp.org>
11402
11403         * lib/mbiter.h: New file.
11404
11405 2005-08-16  Bruno Haible  <bruno@clisp.org>
11406
11407         * lib/mbfile.h: New file.
11408
11409 2005-08-16  Bruno Haible  <bruno@clisp.org>
11410
11411         * lib/mbchar.h: New file.
11412         * lib/mbchar.c: New file.
11413
11414 2005-08-16  Bruno Haible  <bruno@clisp.org>
11415
11416         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
11417         the valid ones. Makes the comparison operations transitive:
11418         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
11419         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
11420
11421 2005-08-15  Simon Josefsson  <jas@extundo.com>
11422
11423         * modules/ssize_t (License): Change to 'unlimited'.
11424
11425         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
11426
11427 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11428
11429         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
11430         Add comments for each pending glibc patch.
11431
11432 2005-08-15  Bruno Haible  <bruno@clisp.org>
11433
11434         * lib/regex.h (__restrict_arr): Don't define to __restrict if
11435         __cplusplus is defined.
11436
11437 2005-08-14  Jim Meyering  <jim@meyering.net>
11438
11439         Sync from coreutils.
11440
11441         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
11442         Use the hash-table-based cycle-detection code not just when
11443         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
11444         Reported by James Youngman in
11445         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
11446         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
11447         FTS_TIGHT_CYCLE_CHECK.
11448         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
11449         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
11450         once again.
11451         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
11452         * lib/fts.c (fd_safer): Remove decl.
11453         Include fcntl--.h rather than unistd-safer.h
11454         (fts_safe_changedir): Don't call fd_safer; no longer needed
11455         now that we include fcntl--.h.
11456
11457 2005-08-12  Simon Josefsson  <jas@extundo.com>
11458
11459         * modules/getndelim2: Use ssize_t module.
11460         * modules/getnline: Likewise.
11461         * modules/safe-read: Likewise.
11462         * modules/xreadlink: Likewise.
11463
11464         * modules/ssize_t: New file.
11465
11466 2005-08-12  Simon Josefsson  <jas@extundo.com>
11467
11468         * m4/readline.m4: Look for termcap, curses or ncurses if required.
11469
11470 2005-08-12  Simon Josefsson  <jas@extundo.com>
11471
11472         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11473         ssize_t.
11474
11475 2005-08-12  Simon Josefsson  <jas@extundo.com>
11476
11477         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
11478         readline, getdelim and check_version.
11479         (Support for systems lacking ISO C 99: Sizes of integer types):
11480         Add size_max.
11481
11482 2005-08-12  Bruno Haible  <bruno@clisp.org>
11483
11484         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
11485
11486 2005-08-11  Simon Josefsson  <jas@extundo.com>
11487
11488         * modules/readline: New file.
11489
11490         * modules/strnlen (Files): Add strnlen.h.
11491
11492 2005-08-11  Simon Josefsson  <jas@extundo.com>
11493
11494         * m4/readline.m4: New file.
11495
11496 2005-08-11  Simon Josefsson  <jas@extundo.com>
11497
11498         * lib/readline.h, readline.c: New file.
11499
11500 2005-08-11  Simon Josefsson  <jas@extundo.com>
11501
11502         * doc/gnulib.texi (Initial import, Finishing touches): Mention
11503         gl_AVOID.
11504
11505 2005-08-11  Bruno Haible  <bruno@clisp.org>
11506
11507         * lib/strnlen.h (strnlen): Change parameter name to match comment.
11508
11509 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
11510
11511         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
11512
11513 2005-08-10  Simon Josefsson  <jas@extundo.com>
11514
11515         * tests/test-iconvme.c: New file.
11516
11517 2005-08-10  Simon Josefsson  <jas@extundo.com>
11518
11519         * m4/strnlen.m4: New file.
11520
11521         * m4/strndup.m4: Don't check for strnlen declaration, done in
11522         strnlen.m4.
11523
11524 2005-08-10  Simon Josefsson  <jas@extundo.com>
11525
11526         * lib/strndup.c: Use strnlen.h.
11527
11528         * lib/strnlen.h: New file.
11529
11530 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11531
11532         * README: Typos.
11533
11534 2005-08-02  Simon Josefsson  <jas@extundo.com>
11535
11536         * modules/readline: New file.
11537
11538 2005-08-02  Simon Josefsson  <jas@extundo.com>
11539
11540         * modules/getdelim: New file.
11541
11542         * modules/getline: Rewrite, don't use getndelim2.
11543
11544 2005-08-02  Simon Josefsson  <jas@extundo.com>
11545
11546         * m4/getline.m4: Separate out getdelim stuff into separate module.
11547
11548         * m4/getdelim.m4: New file.
11549
11550 2005-08-02  Simon Josefsson  <jas@extundo.com>
11551
11552         * lib/getline.h, getline.c: Rewrite.
11553
11554         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
11555
11556 2005-07-31  Bruno Haible  <bruno@clisp.org>
11557
11558         * lib/lock.h (gl_lock_initializer): New macro.
11559         (gl_lock_define_initialized): Use it.
11560         (gl_rwlock_initializer): New macro.
11561         (gl_rwlock_define_initialized): Use it.
11562         (gl_recursive_lock_initializer): New macro.
11563         (gl_recursive_lock_define_initialized): Use it.
11564
11565 2005-07-30  Karl Berry  <karl@gnu.org>
11566
11567         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
11568         Report from Ben Pfaff, regarding getopt.
11569
11570 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
11571
11572         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
11573         normal way.
11574         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
11575         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
11576         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
11577         (gl_GETOPT): Use the new macros.  Most of the implementation
11578         is moved to the new macros.  This is for programs like Emacs
11579         that don't want all the functionality of gl_GETOPT.
11580
11581 2005-07-26  Bruno Haible  <bruno@clisp.org>
11582
11583         * m4/lock.m4: Update from GNU gettext.
11584
11585 2005-07-26  Bruno Haible  <bruno@clisp.org>
11586
11587         * lib/lock.h: Update from GNU gettext.
11588         * lib/lock.c: Update from GNU gettext.
11589
11590 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
11591
11592         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
11593         obsolescent AC_TRY_RUN.  Include the default includes files, for
11594         'exit'.
11595
11596 2005-07-24  Bruno Haible  <bruno@clisp.org>
11597
11598         * modules/visibility: New file.
11599         * MODULES.html.sh (Misc): Add visibility.
11600
11601 2005-07-24  Bruno Haible  <bruno@clisp.org>
11602
11603         * m4/visibility.m4: New file.
11604
11605 2005-07-24  Bruno Haible  <bruno@clisp.org>
11606
11607         * doc/visibility.texi: New file.
11608
11609 2005-07-22  Bruno Haible  <bruno@clisp.org>
11610
11611         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
11612         $(ALLOCA_H), redundant through BUILT_SOURCES.
11613         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
11614         redundant through BUILT_SOURCES.
11615         * modules/byteswap (Makefile.am): Remove explicit dependency on
11616         $(BYTESWAP_H), redundant through BUILT_SOURCES.
11617         * modules/fnmatch (Makefile.am): Remove explicit dependency on
11618         $(FNMATCH_H), redundant through BUILT_SOURCES.
11619         * modules/getopt (Makefile.am): Remove explicit dependency on
11620         $(GETOPT_H), redundant through BUILT_SOURCES.
11621         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
11622         redundant through BUILT_SOURCES.
11623         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
11624         redundant through BUILT_SOURCES.
11625         * modules/stdbool (Makefile.am): Remove explicit dependency on
11626         $(STDBOOL_H), redundant through BUILT_SOURCES.
11627         * modules/stdint (Makefile.am): Remove explicit dependency on
11628         $(STDINT_H), redundant through BUILT_SOURCES.
11629         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
11630         Remove explicit dependency on $(SYSEXITS_H).
11631         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
11632
11633 2005-07-18  Simon Josefsson  <jas@extundo.com>
11634
11635         * lib/check-version.c (check_version): Accept identical versions too.
11636
11637 2005-07-18  Bruno Haible  <bruno@clisp.org>
11638
11639         * modules/lock: New file.
11640         * MODULES.html.sh (Multithreading): New section.
11641
11642 2005-07-18  Bruno Haible  <bruno@clisp.org>
11643
11644         * m4/lock.m4: New file, from GNU gettext.
11645
11646 2005-07-18  Bruno Haible  <bruno@clisp.org>
11647
11648         * lib/lock.h: New file, from GNU gettext.
11649         * lib/lock.c: New file, from GNU gettext.
11650
11651 2005-07-18  Bruno Haible  <bruno@clisp.org>
11652
11653         * lib/lock.h (gl_once_t): New type.
11654         (gl_once_define, gl_once): New macros.
11655         * lib/lock.c (fresh_once): New variable.
11656         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
11657         functions.
11658
11659 2005-07-16  Simon Josefsson  <jas@extundo.com>
11660
11661         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
11662         workaround, suggested by Bruno.
11663
11664 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11665
11666         * modules/xalloc (Depends-on): Add xalloc-die.
11667         * modules/xvasprintf (Depends-on): Add xalloc-die.
11668
11669 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11670
11671         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
11672         with a minor change.
11673
11674 2005-07-15  Bruno Haible  <bruno@clisp.org>
11675
11676         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
11677         When using lib/poll.c, define poll as rpl_poll.
11678
11679 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
11680
11681         * modules/argp (Depends-on): Remove unlocked-io.
11682
11683 2005-07-14  Derek Price  <derek@ximbiot.com>
11684
11685         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
11686         for glob symlink bug.
11687
11688 2005-07-14  Bruno Haible  <bruno@clisp.org>
11689
11690         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
11691         Instead, test for *_unlocked function declarations directly.
11692
11693 2005-07-11  Simon Josefsson  <jas@extundo.com>
11694
11695         * modules/size_max: New file.
11696
11697         * modules/xsize: Depend on size_max module for size_max.m4.
11698
11699 2005-07-11  Simon Josefsson  <jas@extundo.com>
11700
11701         * lib/size_max.h: New file.
11702
11703 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
11704
11705         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
11706         copyright symbol and the year.
11707         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
11708         (version_etc_va): Use parameterized copyright notice.
11709         Reword to conform to the current GNU coding standards.
11710
11711 2005-07-11  Karl Berry  <karl@gnu.org>
11712
11713         * doc/gnulib.texi (Quoting): new node.
11714         (Initial import): more info, from Patrice.
11715
11716 2005-07-11  Bruno Haible  <bruno@clisp.org>
11717
11718         * gnulib-tool (func_usage): Document option --avoid.
11719         (Command line options): Handle --avoid.
11720         (func_acceptable): New function.
11721         (func_modules_transitive_closure): Use it.
11722
11723 2005-07-11  Bruno Haible  <bruno@clisp.org>
11724
11725         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
11726         Reported by Jim Meyering.
11727
11728 2005-07-10  Bruno Haible  <bruno@clisp.org>
11729
11730         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
11731         Needed when size_t is smaller than 'unsigned int'.
11732         Reported by Paul Eggert.
11733
11734 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11735
11736         * modules/argp (Depends-on): Add unlocked-io
11737
11738 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11739
11740         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
11741         block of defines.
11742
11743 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
11744
11745         * config/srclist.txt: Comment out regcomp.c, since we have a porting
11746         fix now.
11747
11748 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
11749         and Paul Eggert  <eggert@cs.ucla.edu>
11750
11751         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
11752         in wint_t, not wchar_t.  Remove now-unnecessary cast.
11753
11754 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11755
11756         * modules/regex (Files): Add lib/regex_internal.c,
11757         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
11758         (Depends-on): Add extensions.
11759         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
11760
11761 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11762
11763         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
11764         pathconf.
11765         * m4/same.m4 (gl_SAME): Likewise.
11766         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
11767
11768         * m4/regex.m4: Adjust to new libc regex implementation.
11769         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
11770         all the .c and .h parts of (the new) regex.
11771         Quote the m4 stuff better.
11772         Check for RE_ICASE bug of old gnulib.
11773         Check for REG_STARTEND of recent libc.
11774         Rename local variables from jm_* to gl_*.
11775         Quote operand of "test -f".
11776         Say "recent enough" version of libc, not "version 2".
11777         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
11778         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
11779         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
11780         Remove check for btowc, isascii.
11781         Require AM_LANGINFO_CODESET.
11782
11783 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11784
11785         * lib/regex.c, regex.h: Sync from libc.
11786         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
11787         * lib/regexec.c:
11788         New files, synced from libc, except that regex_internal.h
11789         currently has a small porting fix.
11790
11791 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11792
11793         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
11794         regex_internal.c, regexec.c.
11795         Add regex_internal.h too, but as a comment, since the libc version
11796         is currently broken in gnulib mode.
11797
11798 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11799
11800         Support programs like Emacs that use gnulib but not gettext.
11801         * MODULES.html.sh (Internationalization functions): Add gettext-h.
11802         * modules/gettext-h: New file.
11803         * modules/gettext (Files): Remove lib/gettext.h.
11804         (Depends-on): Add gettext-h.
11805         (Makefile.am): Remove lib_SOURCES.
11806         * modules/argmatch, modules/c-stack, modules/closeout:
11807         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
11808         * modules/execute, modules/file-type, modules/getaddrinfo:
11809         * modules/getopt, modules/human, modules/javacomp:
11810         * modules/javaexec, modules/mkdir-p, modules/obstack:
11811         * modules/openat, modules/pagealign_alloc, modules/pipe:
11812         * modules/quotearg, modules/regex, modules/rpmatch:
11813         * modules/unicodeio, modules/userspec, modules/version-etc:
11814         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
11815         * modules/xsetenv:
11816         Depend on gettext-h, not gettext.
11817
11818 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
11819
11820         * gnulib-tool (func_import): Add support for 'public domain' license.
11821         * modules/alloca, modules/atexit, modules/memmove:
11822         Now public domain, not GPL.
11823         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
11824         * modules/realloc, modules/strerror, modules/strtod:
11825         Now LGPL, not GPL.
11826
11827 2005-07-05  Bruno Haible  <bruno@clisp.org>
11828
11829         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
11830         autoconf CVS. Needed for mingw.
11831
11832 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11833
11834         Remove the dependency of the strftime module on the tzset module.
11835         * modules/strftime (Depends-on): Remove dependency on tzset.
11836
11837 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11838
11839         Remove the dependency of the strftime module on the tzset module.
11840         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
11841         gl_FUNC_TZSET_CLOBBER.
11842
11843 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11844
11845         Remove the dependency of the strftime module on the tzset module.
11846         * lib/strftime.c (my_strftime)
11847         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
11848         Copy the input structure, to work around some of the bug with
11849         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
11850         Solaris releases, you should also use the tzset module, but we won't
11851         require it as a dependency any more since we don't want LGPLed code
11852         to depend on GPLed code.
11853
11854 2005-07-02  Jim Meyering  <jim@meyering.net>
11855
11856         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
11857         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
11858         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
11859         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
11860
11861 2005-07-02  Jim Meyering  <jim@meyering.net>
11862
11863         * lib/backupfile.c (backup_args): Change a `0' to NULL.
11864
11865 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11866
11867         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
11868         declares only 'struct timespec;' (!).
11869
11870 2005-07-01  Jim Meyering  <jim@meyering.net>
11871
11872         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
11873         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
11874         * lib/save-cwd.c, tempname.c:
11875         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11876         and don't include <sys/file.h>).
11877
11878 2005-06-29  Jim Meyering  <jim@meyering.net>
11879
11880         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
11881         type name.  Use the variable name instead.
11882         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
11883         Likewise.
11884
11885 2005-06-28  Simon Josefsson  <jas@extundo.com>
11886
11887         * modules/check-version (Files): Add check-version.m4.
11888
11889 2005-06-28  Simon Josefsson  <jas@extundo.com>
11890
11891         * m4/check-version.m4: New file, suggested by Jim Meyering
11892         <jim@meyering.net>.
11893
11894 2005-06-28  Simon Josefsson  <jas@extundo.com>
11895
11896         * lib/check-version.h, lib/check-version.c: New files.
11897
11898 2005-06-28  Simon Josefsson  <jas@extundo.com>
11899
11900         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
11901         collision with global variable.  Better indentation.  Don't
11902         increment buffer pointer beyond buffer end.  Based on comments
11903         from Paul Eggert <eggert@cs.ucla.edu>.
11904
11905         * lib/base64.h: Indent.
11906
11907 2005-06-28  Simon Josefsson  <jas@extundo.com>
11908
11909         * doc/gnulib.texi (Library version handling): New section.
11910
11911 2005-06-28  Jim Meyering  <jim@meyering.net>
11912
11913         * check-module (find_included_lib_files): Hard-code another
11914         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
11915         but modules/fts-lgpl (correctly) does not list those files.
11916
11917         * modules/canonicalize (Files): Add lib/pathmax.h.
11918
11919 2005-06-25  Simon Josefsson  <jas@extundo.com>
11920
11921         * modules/check-version: New file.
11922
11923 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
11924
11925         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
11926         initializer of struct addrinfo, as an indication that we don't
11927         care how many members the structure has.
11928
11929 2005-06-24  Derek Price  <derek@ximbiot.com>
11930         and Bruno Haible  <bruno@clisp.org>
11931
11932         Remove stat module & update lstat.
11933         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
11934         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
11935         * m4/stat.m4: Remove this file.
11936
11937 2005-06-24  Derek Price  <derek@ximbiot.com>
11938         and Bruno Haible  <bruno@clisp.org>
11939
11940         Remove stat module & update lstat.
11941         * lib/stat.c: Remove this file...
11942         (slash_aware_lstat): ...moving this content and its support...
11943         * lib/lstat.c (rpl_lstat): ...into here.
11944         * lib/lstat.h: New file.
11945
11946 2005-06-24  Derek Price  <derek@ximbiot.com>
11947         and Bruno Haible  <bruno@clisp.org>
11948
11949         Remove stat module & update lstat.
11950         * config/srclist.txt (libc sources): Remove stat.
11951
11952 2005-06-24  Derek Price  <derek@ximbiot.com>
11953         and Bruno Haible  <bruno@clisp.org>
11954
11955         Remove stat module & update lstat.
11956         * MODULES.html.sh (stat): Remove.
11957         * MODULES.html: Regenerated.
11958         * modules/lstat (Description): Correct function name.
11959         (Files): Add "lstat.h".
11960         (Depends-on): Remove stat, add xalloc, stat-macros.
11961         * modules/stat: Remove this file.
11962         (Include): Add "lstat.h", remove <sys/stat.h>.
11963
11964 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
11965
11966         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
11967         (ranged_convert): Don't save conversion in a temporary struct.
11968         This causes a warning with GCC 4.0.0, and anyway in the typical
11969         case it's not worth the extra 100 bytes or so of code.
11970         (ranged_convert, __mktime_internal): When calling a function via a
11971         pointer P, use P () rather than (*P) (), as we now assume C89 or
11972         better.
11973
11974 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
11975
11976         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
11977         "who -r" failed to give output.  Problem reported by Tim Waugh.
11978
11979         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
11980         (xcalloc): Use it to avoid needless tests.
11981         Problem reported by Jim Meyering.
11982
11983 2005-06-20  Derek Price  <derek@ximbiot.com>
11984
11985         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
11986         unnecessary for Autoconfs > 2.59c.
11987
11988 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11989
11990         * lib/argp.h (__option_is_short): Check upper limit of
11991         __key. Isprint() requires its argument to have the value
11992         of an unsigned char or EOF.
11993
11994 2005-06-16  Jim Meyering  <jim@meyering.net>
11995
11996         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
11997         when either N or S is zero.
11998
11999 2005-06-16  Derek Price  <derek@ximbiot.com>
12000
12001         * m4/bison.m4: Declare YACC & YFLAGS precious.
12002
12003 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
12004
12005         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
12006         multibyte string or pattern, fall back on unibyte matching.
12007         Problem reported by James Youngman.
12008
12009 2005-06-08  Bruno Haible  <bruno@clisp.org>
12010
12011         * modules/csharpcomp: New file.
12012         * MODULES.html.sh (C#): Add csharpcomp.
12013
12014 2005-06-08  Bruno Haible  <bruno@clisp.org>
12015
12016         * m4/csharpcomp.m4: New file, from GNU gettext.
12017
12018 2005-06-08  Bruno Haible  <bruno@clisp.org>
12019
12020         * lib/csharpcomp.h: New file, from GNU gettext.
12021         * lib/csharpcomp.c: New file, from GNU gettext.
12022         * lib/csharpcomp.sh.in: New file, from GNU gettext.
12023
12024 2005-06-08  Bruno Haible  <bruno@clisp.org>
12025
12026         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
12027         warning on mingw.
12028
12029 2005-06-07  Derek Price  <derek@ximbiot.com>
12030
12031         Sync from CVS.
12032         * lib/glob_.h: Indent nested #ifdef.
12033
12034 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12035
12036         Sync from coreutils.
12037         Use "file name" when talking about file names, instead of "filename"
12038         or "path", as per the GNU coding standards.
12039         * lib/mkdir-p.c: Renamed from makepath.c.
12040         (make_dir_parents): Renamed from make_path.  All callers changed.
12041         * lib/mkdir-p.h: Likewise.  All includers changed.
12042         * lib/filenamecat.c: Renamed from path-concat.c.
12043         (file_name_concat): Renamed from path_concat.  All callers changed.
12044         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
12045         * lib/filenamecat.h: Likewise.  All includers changed.
12046         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
12047         in comments or local variable names.
12048         * lib/basename.c: Likewise.
12049         * lib/canonicalize.c, canonicalize.h: Likewise.
12050         * lib/dirname.c, dirname.h: Likewise.
12051         * lib/euidaccess.c: Likewise.
12052         * lib/exclude.c: Likewise
12053         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
12054         * lib/fsusage.c, fsuage.h: Likewise.
12055         * lib/fts.c, fts_.h: Likewise.
12056         * lib/getcwd.c: Likewise.
12057         * lib/getloadavg.c: Likewise.
12058         * lib/mkstemp.c: Likewise.
12059         * lib/mountlist.c, mountlist.h: Likewise.
12060         * lib/openat.c, openat.h: Likewise.
12061         * lib/readlink-stub.c: Likewise.
12062         * lib/readutmp.c, readutmp.h: Likewise.
12063         * lib/rename.c: Likewise.
12064         * lib/rmdir.c: Likewise.
12065         * lib/same.c: Likewise.
12066         * lib/savedir.c: Likewise.
12067         * lib/stripslash.c: Likewise.
12068         * lib/tempname.c: Likewise.
12069         * lib/xreadlink.c: Likewise.
12070         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
12071         All uses changed.
12072         * lib/exclude.h: Likewise.
12073
12074         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
12075         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12076         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
12077         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12078         * lib/pathmax.h: Include <limits.h> unconditionally, since other
12079         files have been getting away with it for years (MORE/BSD 4.3
12080         is extinct now).
12081         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
12082         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12083
12084         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
12085         Define to 256, not 255, as per modern POSIX.
12086
12087 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12088
12089         Sync from coreutils.
12090         Use "file name" when talking about file names, instead of "filename"
12091         or "path", as per the GNU coding standards.
12092         * MODULES.html.sh: mkdir-p renamed from makepath.
12093         filenamecat renamed from path-concat.
12094         * modules/filenamecat: Renamed from modules/path-concat.
12095         (Files): filenamecat.h and filenamecat.c renamed from
12096         path-concat.h and path-concat.c.
12097         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
12098         (Include): filenamecat.h, not path-concat.h.
12099         * modules/mkdir-p: Renamed from modules/makepath.
12100         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
12101         makepath.c.
12102         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
12103         (Include): mkdir-p.h, not makepath.h.
12104
12105 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12106
12107         Sync from coreutils.
12108         * m4/mkdir-p.m4: Renamed from makepath.m4.
12109         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
12110         Rename files from makepath.c to mkdir-p.c, and from
12111         makepath.h to mkdir-p.h.
12112         * m4/filenamecat.m4: Renamed from path-concat.m4.
12113         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
12114         Rename files from path-concat.c to filenamecat.c,
12115         and from path-concat.h to filenamecat.h.
12116         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
12117         "file name" in local variables or comments.
12118         * m4/rename.m4: Likewise.
12119
12120 2005-06-01  Bruno Haible  <bruno@clisp.org>
12121
12122         * modules/csharpexec: New file.
12123         * MODULES.html.sh (C#): New section.
12124
12125 2005-06-01  Bruno Haible  <bruno@clisp.org>
12126
12127         * m4/csharp.m4: New file, from GNU gettext.
12128         * m4/csharpexec.m4: New file, from GNU gettext.
12129
12130 2005-06-01  Bruno Haible  <bruno@clisp.org>
12131
12132         * lib/csharpexec.h: New file, from GNU gettext.
12133         * lib/csharpexec.c: New file, from GNU gettext.
12134         * lib/csharpexec.sh.in: New file, from GNU gettext.
12135
12136 2005-05-31  Derek Price  <derek@ximbiot.com>
12137             Paul Eggert  <eggert@cs.ucla.edu>
12138
12139         Sync from cvs.
12140         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12141
12142 2005-05-31  Derek Price  <derek@ximbiot.com>
12143             Paul Eggert  <eggert@cs.ucla.edu>
12144
12145         Sync from cvs.
12146         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12147
12148 2005-05-29  Derek Price  <derek@ximbiot.com>
12149
12150         * config/srclist.txt (glob_.h, glob.c): Add these files.
12151
12152 2005-05-29  Derek Price  <derek@ximbiot.com>
12153
12154         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
12155         * modules/glob: New file.
12156         * modules/getlogin_r: Add link to POSIX spec in description.
12157
12158 2005-05-29  Derek Price  <derek@ximbiot.com>
12159             Paul Eggert  <eggert@cs.ucla.edu>
12160
12161         * m4/glob.m4: New file.
12162
12163 2005-05-29  Derek Price  <derek@ximbiot.com>
12164             Paul Eggert  <eggert@cs.ucla.edu>
12165
12166         * lib/glob_.h, lib/glob.c: New files.
12167
12168 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12169
12170         * modules/fts (Files): Remove m4/inttypes-pri.m4.
12171         * modules/fts-lgpl (Depends-on): Remove gettext.
12172
12173 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12174
12175         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
12176         and don't require gt_INTTYPES_PRI.
12177
12178 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12179
12180         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
12181
12182         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
12183         the configuration hassle isn't worth it.
12184         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
12185         (LONGEST_MODIFIER, PRIuMAX): Remove.
12186
12187 2005-05-27  Bruno Haible  <bruno@clisp.org>
12188
12189         * lib/getlogin_r.h: Remove second include of <stddef.h>.
12190
12191 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
12192
12193         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
12194         _POSIX_PTHREAD_SEMANTICS for Solaris.
12195
12196 2005-05-25  Derek Price  <derek@ximbiot.com>
12197
12198         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
12199
12200 2005-05-25  Derek Price  <derek@ximbiot.com>
12201             Paul Eggert  <eggert@cs.ucla.edu>
12202
12203         * modules/getlogin_r, m4/getlogin_r.m4: New files.
12204         * lib/getlogin_r.c, getlogin_r.h: New files.
12205
12206 2005-05-25  Bruno Haible  <bruno@clisp.org>
12207             Derek Price  <derek@ximbiot.com>
12208
12209         * lib/getlogin_r.h: Simplify API documentation.
12210
12211 2005-05-23  Derek Price  <derek@ximbiot.com>
12212
12213         * modules/minmax (Files): Add m4/minmax.m4.
12214         (configure.ac): Add gl_MINMAX.
12215
12216 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
12217
12218         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
12219         so that unistd-safer.h (GPL'ed code) need not be included.
12220
12221 2005-05-22  Bruno Haible  <bruno@clisp.org>
12222
12223         * m4/minmax.m4: New file.
12224         Based on a patch by Derek Price <derek@ximbiot.com>.
12225
12226 2005-05-22  Bruno Haible  <bruno@clisp.org>
12227
12228         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
12229         (INT64_MIN): Fix definition.
12230         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
12231
12232         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
12233         NEED_SIGNED_INT_TYPES.
12234
12235         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
12236         HAVE_SYSTEM_INTTYPES.
12237
12238 2005-05-22  Bruno Haible  <bruno@clisp.org>
12239
12240         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
12241         Also include <sys/param.h> if it defines MIN, MAX.
12242         Based on a patch by Derek Price <derek@ximbiot.com>.
12243
12244 2005-05-21  Jim Meyering  <jim@meyering.net>
12245
12246         * modules/fts (Files): Add m4/inttypes-pri.m4.
12247         (Depends-on): Add lstat and remove gettext.  Alphabetize.
12248
12249 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12250
12251         New fts module.
12252         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
12253         (setup_dir, free_dir): New functions.
12254         (enter_dir, leave_dir): Define trivial
12255         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
12256         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
12257         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
12258         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
12259         Move to fts-cycle.c.
12260         (fts_open): Use setup_dir.
12261         (fts_close): Use free_dir.
12262         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
12263         This adds a label and some gotos, but the alternatives were messier.
12264         Check for memory allocation failure when entering a dir.
12265         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
12266         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
12267         (FTS): New member fts_cycle, that is a union that contains the
12268         old active_dir_ht and cycle_state.  All uses changed to mention
12269         fts_cycle.ht and fts_cycle.state.
12270         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
12271         fts.c, with the following changes:
12272         (setup_dir, free_dir): New functions.
12273         (enter_dir): Now returns bool.  Return true if successful, false
12274         if memory exhausted.  All callers changed.
12275         Do not bother partly cleaning up on
12276         memory allocation failure; that is free_dir's job.
12277         However, free ad if hash_insert fails, to avoid memory leak.
12278         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
12279         fts->fts_options to see which union member to use.
12280
12281 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12282
12283         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
12284         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
12285
12286 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12287
12288         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
12289
12290 2005-05-20  Jim Meyering  <jim@meyering.net>
12291
12292         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
12293         Now a macro, to pacify GCC.
12294
12295 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12296
12297         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
12298         of -1.
12299
12300 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12301
12302         * lib/chown.c (rpl_chown): Return -1 on failure.
12303
12304 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12305
12306         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
12307         Don't check for stddef.h.
12308         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
12309         don't use its results.
12310         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
12311         since we include them unconditionally.  Don't require
12312         AM_STDBOOL_H, since stdbool is a prerequisite.
12313         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
12314         since we assume C89 or better.
12315         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
12316         as we don't use their results.
12317         Don't check for fchdir, memmove, memset, strrchr, as we use
12318         them unconditionally.
12319         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
12320         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
12321
12322 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12323
12324         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
12325         Include <stddef.h> unconditionally, since we assume C89 now.
12326         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
12327         * lib/fts.c: Include fts_.h first, to check interface.
12328         Do not include intprops.h; no longer needed.
12329         Include cycle-check.h and hash.h, since fts_.h no longer does.
12330         Remove unnecessary casts of closedir to void.
12331         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
12332         decide whether to decrement nlinks.
12333         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
12334         (FTS): Use struct hash_table * instead of Hash_table, so that
12335         we no longer need to include hash.h here.
12336
12337 2005-05-18  Jim Meyering  <jim@meyering.net>
12338
12339         * modules/dirfd (License): Change to LGPL.  Most of the code
12340         is already in the public domain.
12341
12342 2005-05-18  Jim Meyering  <jim@meyering.net>
12343
12344         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
12345         Reported by Yoann Vandoorselaere.
12346
12347 2005-05-17  Jim Meyering  <jim@meyering.net>
12348
12349         * m4/fts.m4: New file, from coreutils.
12350
12351 2005-05-17  Jim Meyering  <jim@meyering.net>
12352
12353         * lib/fts.c, lib/fts_.h: New files, from coreutils.
12354
12355 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12356
12357         Sync from coreutils.
12358         * m4/unlinkdir.m4: New file.
12359
12360 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12361
12362         Sync from coreutils.
12363         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
12364         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
12365         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
12366         White space changes only.
12367         * lib/makepath.c (make_path): Port to hosts where leading "//" is
12368         special.
12369         * lib/yesno.c: Include getline.h, not ctype.h.
12370         (yesno): Don't remove leading white space; POSIX doesn't allow it.
12371         Use getline to remove arbitrary restriction on response length.
12372
12373 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12374
12375         * config/srclist-update: Spell out "Street" in FSF postal
12376         mail address; this is the style the FSF seems to prefer.
12377
12378         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
12379         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
12380         this updates FSF postal mail address.
12381
12382         Sync from coreutils.
12383         * modules/unlinkdir: New file.
12384         * modules/yesno (Depends-on): Add getline.
12385         * MODULES.html.sh (File system functions): Add unlinkdir.
12386
12387 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12388
12389         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
12390         lib/strsep.h:
12391         Change the initial comment to refer to GPL, not LGPL.
12392         gnulib-tool will change it to LGPL as needed.
12393
12394         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
12395         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
12396         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
12397         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
12398         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
12399         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
12400         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
12401         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
12402         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
12403         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
12404         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
12405         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
12406         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
12407         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
12408         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
12409         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
12410         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
12411         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
12412         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
12413         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
12414         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
12415         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
12416         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
12417         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
12418         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
12419         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
12420         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
12421         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
12422         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
12423         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
12424         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
12425         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
12426         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
12427         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
12428         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
12429         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
12430         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
12431         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
12432         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
12433         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
12434         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
12435         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
12436         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
12437         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
12438         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
12439         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
12440         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
12441         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
12442         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
12443         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
12444         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
12445         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
12446         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
12447         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
12448         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
12449         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
12450         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
12451         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
12452         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
12453         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
12454         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
12455         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
12456         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
12457         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
12458         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
12459         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
12460         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
12461         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
12462         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
12463         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
12464         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
12465         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
12466         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
12467         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
12468         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
12469         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
12470         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
12471         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
12472         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
12473         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
12474         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
12475         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
12476         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
12477         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
12478         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
12479         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
12480         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
12481         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
12482         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
12483         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
12484         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
12485         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
12486         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
12487         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
12488         lib/yesno.c, lib/yesno.h:
12489         Update FSF postal mail address.
12490
12491 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12492
12493         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
12494         tests/test-memmem.c, tests/test-stpncpy.c:
12495         Update FSF postal mail address.
12496
12497 2005-05-13  Bruno Haible  <bruno@clisp.org>
12498
12499         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
12500         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
12501         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
12502         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
12503         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
12504         Add support for 64-bit integers in the MSVC compiler.
12505
12506 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12507
12508         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
12509
12510 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
12511
12512         * gnulib-tool (func_import): Sort and uniquify recommended includes.
12513
12514 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
12515
12516         * doc/getdate.texi (General date syntax): Don't say that date
12517         date --iso-8601=ns generates acceptable dates; it doesn't yet.
12518         Problem reported by Nic Ferrier.
12519
12520 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12521
12522         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
12523         specified in ai_socktype. Fix invalid ai_protocol
12524         check. ai_protocol is usually set to 0 or depending on
12525         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
12526         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
12527         ai_socktype / ai_protocol in the returned addrinfo structure.
12528
12529 2005-05-10  Simon Josefsson  <jas@extundo.com>
12530
12531         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
12532         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12533
12534 2005-05-10  Karl Berry  <karl@gnu.org>
12535
12536         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
12537         (from http://www.gnu.org/licenses).
12538         * doc/COPYING.LIB: also rename to COPYING.LESSER.
12539         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
12540         fdl.texi suffices.
12541
12542 2005-05-10  Karl Berry  <karl@gnu.org>
12543
12544         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
12545         (COPYING.DOC): remove.
12546
12547         * config/srclist-update: new FSF address.
12548
12549 2005-05-10  Derek Price  <derek@ximbiot.com>
12550
12551         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
12552         possible.
12553
12554 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12555             Bruno Haible  <bruno@clisp.org>
12556
12557         * modules/inet_ntop: New file.
12558         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12559         inet_ntop.
12560
12561 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12562             Bruno Haible  <bruno@clisp.org>
12563
12564         * m4/inet_ntop.m4: New file.
12565
12566 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12567             Bruno Haible  <bruno@clisp.org>
12568
12569         * lib/inet_ntop.h: New file.
12570         * lib/inet_ntop.c: New file, from glibc with modifications.
12571
12572 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
12573
12574         * modules/time_r (License): Change to LGPL.
12575         * modules/extensions (License): Change to LGPL.  Actually,
12576         the license is more permissive than that, but currently gnulib-tool
12577         doesn't know how to handle more-permissive licenses.
12578
12579         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
12580         Problem reported by Dave Love.
12581
12582 2005-05-08  Jim Meyering  <jim@meyering.net>
12583
12584         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
12585         blank.
12586
12587 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
12588
12589         * modules/argmatch (Depends-on): Add stdbool.
12590         * modules/backupfile (Depends-on): Likewise.
12591         * modules/chdir-long (Depends-on): Likewise.
12592         * modules/closeout (Depends-on): Likewise.
12593         * modules/cycle-check (Depends-on): Likewise.
12594         * modules/dirname (Depends-on): Likewise.
12595         * modules/fnmatch (Depends-on): Likewise.
12596         * modules/fsusage (Depends-on): Likewise.
12597         * modules/fwriteerror (Depends-on): Likewise.
12598         * modules/getcwd (Depends-on): Likewise.
12599         * modules/getloadavg (Depends-on): Likewise.
12600         * modules/hard-locale (Depends-on): Likewise.
12601         * modules/makepath (Depends-on): Likewise.
12602         * modules/mountlist (Depends-on): Likewise.
12603         * modules/nanosleep (Depends-on): Likewise.
12604         * modules/posixtm (Depends-on): Likewise.
12605         * modules/quotearg (Depends-on): Likewise.
12606         * modules/readtokens (Depends-on): Likewise.
12607         * modules/readtokens0 (Depends-on): Likewise.
12608         * modules/readutmp (Depends-on): Likewise.
12609         * modules/save-cwd (Depends-on): Likewise.
12610         * modules/strftime (Depends-on): Likewise.
12611         * modules/userspec (Depends-on): Likewise.
12612         * modules/utimecmp (Depends-on): Likewise.
12613         * modules/xgetcwd (Depends-on): Likewise.
12614         * modules/xnanosleep (Depends-on): Likewise.
12615         * modules/xstrtod (Depends-on): Likewise.
12616         * modules/yesno (Depends-on): Likewise.
12617
12618 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
12619
12620         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
12621         needless checks.
12622
12623 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12624
12625         Merge from coreutils.  Among other things,
12626         add bulletproofing for cases where stdin, stdout, or stderr are closed.
12627         * lib/fd-safer.c: New file.
12628         * lib/fcntl-safer.h, open-safer.c: Remove.
12629         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
12630         * lib/dup-safer.c: Include unistd-safer.h first.
12631         Don't include errno.h.
12632         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
12633         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
12634         * lib/file-type.c: Rely on file-type.h change.
12635         * lib/getloadavg.c: Include unistd-safer.h.
12636         (getloadavg): Use safer open.
12637         * lib/getusershell.c: Include "stdio-safer.h".
12638         (getusershell): Use safer fopen.
12639         * lib/long-options.c (long_options): Use NULL rather than 0.
12640         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
12641         'free'.
12642         * lib/modechange.c: Likewise.
12643         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
12644         (MODE_DONE): New constant.
12645         (struct mode_change): Remove 'next' member.
12646         (make_node_op_equals): New function; like the old one of the
12647         same name, except it allocates an array.
12648         (mode_compile, mode_create_from_ref): Use it.
12649         (mode_compile): Allocate result as an array, not a linked list.
12650         Parse octal string ourself, so that we catch mistakes like "+0".
12651         (mode_adjust): Arg is an array, not a linked list.
12652         * lib/modechange.c: Include stat-macros.h, xalloc.h.
12653         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
12654         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
12655         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
12656         Remove.  This is now stat-macros.h's job.
12657         (talloc): Remove.  All callers replaced by xalloc, so that
12658         our invokers don't have to worry about reporting memory failures.
12659         (make_node_op_equals): Remove.
12660         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12661         New constants.
12662         (struct mode_change): Moved here from modechange.h.
12663         (mode_append_entry): Remove.
12664         (mode_compile): Remove MASKED_OPS arg, since it encouraged
12665         apps to have incorrect behavior.  Use simpler algorithm for head
12666         and tail.  Don't futz with umask; that's now the job of mode_adjust.
12667         Detect more invalid usages rather than having somewhat-random behavior.
12668         Don't insert an "a=" action, as that leads to incorrect behavior.
12669         (mode_compile, mode_create_from_ref): Return NULL on error instead
12670         of an enum, since now there's only one way to have an error.  All
12671         callers changed.
12672         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
12673         at the correct time.  Simplify calculation of "+u" and its ilk.
12674         Don't mishandle "+X".
12675         (mode_free): Remove "register" and localize decls.
12676         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12677         (struct mode_change): Move to modechange.c; callers don't
12678         need to see this stuff.
12679         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
12680         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
12681         (mode_change, mode_adjust): Reflect the new signatures noted above.
12682         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
12683         that might redefine system include files.
12684         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
12685         (my_usleep): Use NULL rather than (void *) 0.
12686         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
12687         Use siginterrupt to specify that system calls should be interrupted.
12688         (rpl_nanosleep): Move initialization of suspended closer to call of
12689         my_usleep.
12690         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
12691         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
12692         (desirable_utmp_entry): New function.
12693         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
12694         using x2nrealloc, to simplify logic.
12695         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
12696         size calculation.  Do not assume utmp file is a regular file.
12697         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
12698         (READ_UTMP_CHECK_PIDS): New constant.
12699         * lib/save-cwd.c: Include unistd-safer.h.
12700         (save_cwd): Use fd_safer.
12701         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
12702         [!_LIBC] Include "stat-macros.h" instead.
12703         * lib/unistd-safer.h (fd_safer): New decl.
12704
12705 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12706
12707         * modules/getloadavg (Depends-on): Add unistd-safer.
12708         * modules/getusershell (Depends-on): Add stdio-safer.
12709         * modules/lstat (Depends-on): Remove xalloc.
12710         * modules/mkstemp (Depends-on): Add stat-macros.
12711         * modules/modechange (Depends-on): Remove xstrtol.
12712         Add stat-macros, xalloc.
12713         * modules/save-cwd (Depends-on): Add unistd-safer.
12714         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
12715         * modules/unistd-safer (Files): Add lib/fd-safer.c
12716         (Makefile.am): Remove lib_SOURCES.
12717
12718         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
12719         Remove fcntl-safer; unistd-safer supersedes it.
12720
12721 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12722
12723         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
12724         AC_HEADER_STAT.
12725         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
12726         (gl_PREREQ_CHOWN): Remove.
12727         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
12728         it.  Don't require AC_HEADER_STAT.
12729         (gl_PREREQ_LSTAT): Remove.
12730         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
12731         Don't require AC_HEADER_STAT.
12732         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
12733         (gl_PREREQ_RMDIR): Remove.
12734         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
12735         mention stat-macros.h or AC_HEADER_STAT, since we'll make
12736         the stat-macros module a prerequisite.
12737         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
12738         * m4/filemode.m4 (gl_FILEMODE): Likewise.
12739         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
12740         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
12741         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
12742         variable names.
12743         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
12744         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
12745         variable prefixes.
12746         * m4/fcntl-safer.m4: Remove.
12747         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
12748         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
12749         Invoke gl_PREREQ_FD_SAFER.
12750         (gl_PREREQ_FD_SAFER): New macro.
12751         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
12752         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
12753         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
12754         Remove duplicate call to AC_LIBOBJ(readutmp).
12755         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
12756
12757         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
12758         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
12759
12760 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12761
12762         * MODULES.html.sh (Misc): Add byteswap.
12763
12764 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12765
12766         * modules/getcwd (Depends-on): Add extensions.
12767         * modules/openat (Depends-on): Likewise.
12768
12769 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12770
12771         * modules/byteswap: New file.
12772
12773 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12774
12775         * m4/byteswap.m4: New file.
12776
12777 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12778
12779         * lib/byteswap_.h: New file.
12780
12781 2005-04-25  Karl Berry  <karl@gnu.org>
12782
12783         * m4/gettext.m4: Update from GNU gettext 0.14.4.
12784
12785 2005-04-25  Albert Chin  <china@thewrittenword.com>
12786
12787         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
12788         Toolkit C bug.
12789
12790 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
12791
12792         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
12793         (func_ln_if_changed) Remove forcibly for no error message
12794         in case file does not exist.
12795
12796 2005-04-19  Simon Josefsson  <jas@extundo.com>
12797
12798         * gnulib-tool (Options): Make --symlink mean --symbolic.
12799
12800 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
12801
12802         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
12803
12804 2005-04-16  Simon Josefsson  <jas@extundo.com>
12805
12806         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
12807
12808 2005-04-15  Simon Josefsson  <jas@extundo.com>
12809
12810         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
12811
12812 2005-04-15  Simon Josefsson  <jas@extundo.com>
12813
12814         * gnulib-tool: Rename --symlink to --symbolic.
12815
12816 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
12817
12818         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
12819         symbolic links to files instead of copying/moving.  Add --aux-dir,
12820         specifying directory relative --dir where auxiliary build tools
12821         are placed.
12822
12823 2005-04-14  Bruno Haible  <bruno@clisp.org>
12824
12825         * modules/allocsa (License): Change to LGPL.
12826         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
12827
12828 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
12829
12830         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
12831         that "UTC +1 second" continues to work.  Problem reported
12832         by Dmitry V. Levin.
12833         (relunit_snumber): New rule.
12834         (relunit): Use it.
12835
12836 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
12837
12838         * lib/getdate.y (universal_time_zone_table): New constant.
12839         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
12840         universal_time_zone_table.
12841         (lookup_zone): Prefer universal_time_zone_table to
12842         local_time_zone_table, so that "GMT" time stamps are allowed in
12843         London during the summer.  Problem reported by Ian Abbott.
12844
12845 2005-04-12  Jim Meyering  <jim@meyering.net>
12846
12847         * lib/human.c (humblock): Set *options even when returning due to
12848         xstrtoumax conversion failure.  Thanks to a used-uninitialized
12849         warning from gcc-4.
12850
12851 2005-04-09  Jim Meyering  <jim@meyering.net>
12852
12853         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
12854         -Wuninitialized: initialize tm0.tm_year.
12855
12856 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
12857
12858         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
12859         count, since there's no maximum.  All uses changed.
12860         Add member dsts_seen.
12861         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
12862         not being INT_MAX.
12863         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
12864         Use pc_rels_seen to decide whther a date is absolute.
12865
12866         * lib/getdate.y (number): Don't overwrite year.
12867         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
12868         check.
12869
12870 2005-04-02  Simon Josefsson  <jas@extundo.com>
12871
12872         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
12873         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
12874
12875 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
12876
12877         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
12878         where no absolute path name can be longer than PATH_MAX.
12879
12880 2005-03-27  Jim Meyering  <jim@meyering.net>
12881
12882         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
12883
12884 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
12885
12886         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
12887         "one's complement" -> "ones' complement" in comment, as per Knuth.
12888         "value of type" -> "type or expression" in comment.
12889         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
12890
12891 2005-03-26  Jim Meyering  <jim@meyering.net>
12892
12893         Comment nits.
12894         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
12895         Correct typos: s/or/of/.
12896
12897 2005-03-26  Jim Meyering  <jim@meyering.net>
12898
12899         * modules/check-include-files: Move to ../ and rename to...
12900         * check-module: ...this.
12901
12902 2005-03-25  Jim Meyering  <jim@meyering.net>
12903
12904         * modules/xvasprintf (Files): Add xalloc.h.
12905
12906 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
12907
12908         * modules/gettext (Files): config/config.rpath ->
12909         build-aux/config.rpath
12910         * modules/iconv (Files): Likewise.
12911         Problem reported by Oskar Liljeblad.
12912
12913 2005-03-23  Jim Meyering  <jim@meyering.net>
12914
12915         * modules/check-include-files: New script to check for
12916         missing dependencies, multiple includes, etc.
12917
12918         * modules/c-strtold (Depends-on): Add xalloc.
12919         * modules/c-strtod (Depends-on): Add xalloc.
12920         * modules/hash (Depends-on): Add xalloc.
12921         (Files): Remove lib/xalloc.h.
12922
12923         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
12924         * modules/userspec (Files): Add lib/inttostr.h.
12925
12926 2005-03-23  Jim Meyering  <jim@meyering.net>
12927
12928         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
12929
12930 2005-03-22  Jim Meyering  <jim@meyering.net>
12931
12932         * modules/stat-macros: New module.
12933         * modules/canonicalize, modules/euidaccess, modules/file-type,
12934         * modules/filemode, modules/lchown, modules/makepath,
12935         * modules/rmdir, modules/stat: Depend on new stat-macros module
12936         rather than listing lib/stat-macros.h manually.
12937         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
12938
12939 2005-03-22  Jim Meyering  <jim@meyering.net>
12940
12941         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
12942
12943 2005-03-22  Bruno Haible  <bruno@clisp.org>
12944
12945         * config/srclist.txt: Replace target directory 'config' with
12946         'build-aux'.
12947         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
12948         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
12949         ../build-aux/.
12950
12951 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
12952
12953         * modules/chdir-long (Depends-on): Add mempcpy.
12954
12955         * modules/acl, modules/backupfile, modules/c-strtod,
12956         modules/c-strtold, modules/canon-host, modules/canonicalize,
12957         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
12958         modules/exclude, modules/exitfail, modules/file-type,
12959         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
12960         modules/getdate, modules/getline, modules/getpagesize,
12961         modules/getpass, modules/getugroups, modules/group-member,
12962         modules/hard-locale, modules/hash, modules/human, modules/idcache,
12963         modules/inttostr, modules/long-options, modules/makepath,
12964         modules/md5, modules/memcasecmp, modules/memcoll,
12965         modules/modechange, modules/mountlist, modules/path-concat,
12966         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
12967         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
12968         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
12969         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
12970         modules/strftime, modules/strndup, modules/strverscmp,
12971         modules/timespec, modules/unlocked-io, modules/userspec,
12972         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
12973         modules/yesno:
12974         Remove lib_SOURCES line from Makefile.am section, as this is now
12975         done automatically by the corresponding Autoconf macro.
12976
12977 2005-03-21  Jim Meyering  <jim@meyering.net>
12978
12979         Changes imported from coreutils.
12980
12981         * lib/cycle-check.c: Don't include xalloc.h.
12982
12983         * lib/path-concat.c: Don't include assert.h.
12984         (path_concat): Remove assertion that would have triggered
12985         for ABASE starting with more than one slash.
12986         Reported by Andreas Schwab.
12987
12988         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
12989         properly when ABASE is an absolute file name.
12990         Correct the description of this function.
12991         Include <assert.h>.
12992         Add an assertion and a test driver.
12993         This fixes a bug introduced on 2004-07-02.
12994         Andreas Schwab reported the resulting failure of cp --parents:
12995         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
12996
12997 2005-03-21  Jim Meyering  <jim@meyering.net>
12998
12999         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
13000         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
13001
13002 2005-03-21  Jim Meyering  <jim@meyering.net>
13003         and  Paul Eggert  <eggert@cs.ucla.edu>
13004
13005         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
13006         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
13007         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
13008         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
13009         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
13010         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
13011         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
13012         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
13013         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
13014         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
13015         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
13016         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
13017         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
13018         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
13019         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
13020         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
13021         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
13022         for these modules.
13023
13024 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
13025
13026         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
13027         (which shouldn't happen), generate nothing instead of returning 0
13028         immediately, so that nstrftime (NULL, ...) doesn't return 0.
13029
13030 2005-03-16  Bruno Haible  <bruno@clisp.org>
13031
13032         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
13033         HAVE_LONGLONG_64BIT.
13034
13035 2005-03-16  Bruno Haible  <bruno@clisp.org>
13036
13037         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
13038         HAVE_LONGLONG_64BIT.
13039
13040 2005-03-16  Bruno Haible  <bruno@clisp.org>
13041
13042         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
13043         HAVE_LONGLONG_64BIT.
13044
13045 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13046
13047         * lib/strftime.c (my_strftime): Prepend space to format so that we can
13048         reliably distinguish strftime failure from empty output on POSIX
13049         hosts.
13050
13051 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13052
13053         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
13054         (iconv_string): Don't guess a size-zero buffer, as that might cause
13055         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
13056         result would be 'too large', where 'too large' is (heuristically)
13057         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
13058         overflow concerns.  This will prevent some unwanted malloc failures
13059         when the inputs are very large.
13060
13061 2005-03-15  Karl Berry  <karl@gnu.org>
13062
13063         * config/srclist.txt (config.rpath): from gettext.
13064         * config/config.rpath: update.
13065
13066 2005-03-15  Bruno Haible  <bruno@clisp.org>
13067
13068         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
13069         to 'negate'.
13070
13071         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
13072         variable.
13073
13074         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
13075         results.
13076
13077 2005-03-14  Simon Josefsson  <jas@extundo.com>
13078
13079         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
13080         <fx@gnu.org>.
13081
13082 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
13083
13084         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
13085         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
13086         intprops.h.
13087         * lib/strtol.c: Likewise.
13088
13089 2005-03-14  Jim Meyering  <jim@meyering.net>
13090
13091         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
13092         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
13093         to be nonzero so that we (and caller) can detect the difference
13094         between a valid zero-length expansion and an error return, even
13095         when the underlying strftime fails before writing anything into
13096         that location.
13097
13098 2005-03-14  Bruno Haible  <bruno@clisp.org>
13099
13100         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
13101         Update from GNU gettext 0.14.3.
13102
13103 2005-03-10  Jim Meyering  <jim@meyering.net>
13104
13105         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
13106
13107 2005-03-10  Jim Meyering  <jim@meyering.net>
13108
13109         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
13110         so that this module works on systems without fchdir.
13111
13112 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
13113
13114         Factor int-properties macros into a single file, except for
13115         glibc-related files.
13116         * lib/intprops.h: New file.
13117         * lib/getloadavg.c: Include it instead of limits.h.
13118         (INT_STRLEN_BOUND): Remove.
13119         * lib/human.c: Include intprops.h.
13120         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
13121         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
13122         302/1000.
13123         * lib/inttostr.h: Include intprops.h instead of limits.h.
13124         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
13125         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
13126         for consistency with intprops.h.
13127         (time_t_is_integer, twos_complement_arithmetic): Use them.
13128         * lib/sig2str.h: Include <signal.h>, intprops.h.
13129         (INT_STRLEN_BOUND): Remove.
13130         * lib/strftime.c (TYPE_SIGNED): Remove.
13131         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
13132         * lib/strtol.c: Adjust comments to match intprops.h.
13133         * lib/userspec.c: Include intprops.h.
13134         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
13135         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
13136         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
13137         instead of rolling our own expressions.
13138         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
13139
13140         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
13141         instead of int.
13142         (my_strftime): Do not mishandle years close to INT_MAX, by doing
13143         the right thing even if adding 1900 would overflow.  Similarly
13144         for tm_mon + 1 and tm_yday + 1.
13145         Make %Y always equivalent to %C%y, and similarly for %G and %g.
13146         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
13147         (DO_SIGNED_NUMBER): New macro.
13148         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
13149
13150 2005-03-07  Bruno Haible  <bruno@clisp.org>
13151
13152         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
13153
13154 2005-03-07  Bruno Haible  <bruno@clisp.org>
13155
13156         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
13157
13158 2005-03-04  Derek R. Price  <derek@ximbiot.com>
13159
13160         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
13161         (func_import): Only replace files via --import when they have actually
13162         changed.
13163
13164 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13165
13166         * m4/mmap-anon.m4: New file.
13167         * m4/pagealign_alloc.m4: New file.
13168
13169 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13170             Bruno Haible  <bruno@clisp.org>
13171
13172         * modules/pagealign_alloc: New file.
13173         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
13174
13175 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13176             Bruno Haible  <bruno@clisp.org>
13177
13178         * lib/pagealign_alloc.h: New file.
13179         * lib/pagealign_alloc.c: New file.
13180
13181 2005-03-03  Bruno Haible  <bruno@clisp.org>
13182
13183         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
13184         Use an all-permissive copyright notice, recommended by RMS.
13185
13186 2005-03-02  Bruno Haible  <bruno@clisp.org>
13187
13188         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
13189         of AIX, the replacement has to be done only after <string.h> is
13190         included, therefore not in config.h. stpncpy.h does the replacement,
13191         and stpncpy.c uses it.
13192
13193 2005-03-02  Bruno Haible  <bruno@clisp.org>
13194
13195         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
13196         stpncpy.c uses it.
13197
13198 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13199
13200         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
13201         The workaround isn't strictly needed for POSIX conformance, and
13202         it's too much of a pain to configure and maintain.  We'll ask
13203         people to fix their kernels instead.
13204         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
13205         (NANOSLEEP_BUG_WORKAROUND): Remove.
13206         (xnanosleep): Remove the workaround.
13207
13208 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13209
13210         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
13211         Reported by Derek Price.
13212         (Include): Add "timespec.h".
13213
13214         * modules/xnanosleep (Depends-on): Remove gethrxtime.
13215
13216 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13217
13218         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
13219         to detect nanosleep bug.
13220
13221 2005-03-01  Bruno Haible  <bruno@clisp.org>
13222
13223         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
13224
13225 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
13226
13227         * modules/gethrxtime: New file.
13228         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
13229         (Depends-on): Add gethrxtime.
13230         (configure.ac): Add gl_XNANOSLEEP.
13231         (Makefile.am): Remove lib_SOURCES line.
13232
13233 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13234
13235         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
13236         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
13237
13238 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13239
13240         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
13241         * lib/timespec.h (gettime): Return void, since it always
13242         succeeds now.  All uses changed.
13243         * lib/gettime.c (gettime) Likewise.
13244         [HAVE_NANOTIME]: Prefer nanotime.
13245         Assume gettimeofday succeeds, as POSIX requires.
13246         Assime time () succeeds, since other code already does.
13247         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
13248         (timespec_subtract): Remove.
13249         (NANOSLEEP_BUG_WORKAROUND): New constant.
13250         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
13251         things considerably.  Use it only on GNU/Linux hosts, since the
13252         workaround shouldn't be needed elsewhere.
13253
13254 2005-02-24  Bruno Haible  <bruno@clisp.org>
13255
13256         * modules/gettext (Files): Add m4/glibc2.m4.
13257
13258 2005-02-24  Bruno Haible  <bruno@clisp.org>
13259
13260         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
13261         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
13262         * m4/progtest.m4:
13263         Update from GNU gettext 0.14.2.
13264         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
13265
13266 2005-02-24  Bruno Haible  <bruno@clisp.org>
13267
13268         * lib/localcharset.c: Update from GNU gettext 0.14.2.
13269         * lib/config.charset: Update from GNU gettext 0.14.2.
13270
13271 2005-02-24  Bruno Haible  <bruno@clisp.org>
13272
13273         * lib/gettext.h: Update from GNU gettext 0.14.2.
13274
13275 2005-02-23  Simon Josefsson  <jas@extundo.com>
13276
13277         * m4/iconvme.m4: New file.
13278
13279 2005-02-23  Jim Meyering  <jim@meyering.net>
13280
13281         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
13282         change.
13283         Thanks to Bruno Haible for catching it.
13284
13285 2005-02-22  Simon Josefsson  <jas@extundo.com>
13286
13287         * modules/iconvme: New file.
13288
13289         * MODULES.html.sh: Add iconvme.
13290
13291 2005-02-22  Simon Josefsson  <jas@extundo.com>
13292
13293         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
13294
13295 2005-02-22  Simon Josefsson  <jas@extundo.com>
13296
13297         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
13298
13299 2005-02-22  Jim Meyering  <jim@meyering.net>
13300
13301         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
13302         s/ifndef/ifdef/.
13303
13304 2005-02-20  Neil Conway  <neilc@samurai.com>
13305
13306         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
13307         returned by OSX/Darwin if the specified buffer is not large
13308         enough for the hostname.
13309
13310 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13311
13312         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
13313         pass it to _help, otherwise the latter coredumps trying to
13314         dereference state.root_argp.
13315
13316 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13317
13318         * modules/chdir-long (Depends-on): Add memrchr.
13319         * modules/memrchr (Files): Add lib/memrchr.h.
13320         (Include): "memrchr.h".
13321
13322 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13323
13324         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
13325
13326 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13327
13328         * lib/memrchr.h: New file.
13329         * lib/chdir-long.c: Include it.
13330         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
13331         Don't bother including stddef.h.
13332
13333 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
13334
13335         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
13336         inclusion.
13337         Include <sys/types.h>, for dev_t.
13338         (ME_DUMMY, ME_REMOTE): Move from here....
13339         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
13340         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
13341         Dmitry V. Levin.
13342         Include mountlist.h first, to test the interface.
13343
13344 2005-01-29  Bruno Haible  <bruno@clisp.org>
13345
13346         * lib/progname.c (program_name): Initialize.
13347         Needed when linking statically on MacOS X.
13348
13349 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13350
13351         Sync from coreutils.
13352         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
13353         (Depends-on): Add c-strtod.
13354         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
13355
13356 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13357
13358         Sync from coreutils.
13359         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
13360
13361         Remove files that are specific to coreutils.
13362         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
13363
13364 2005-01-28  Bruno Haible  <bruno@clisp.org>
13365
13366         * modules/javacomp: New file.
13367         * MODULES.html.sh (Java): Add javacomp.
13368
13369 2005-01-28  Bruno Haible  <bruno@clisp.org>
13370
13371         * m4/javacomp.m4: New file, from GNU gettext.
13372
13373 2005-01-28  Bruno Haible  <bruno@clisp.org>
13374
13375         * lib/javacomp.sh.in: New file, from GNU gettext.
13376         * lib/javacomp.h: New file, from GNU gettext.
13377         * lib/javacomp.c: New file, from GNU gettext.
13378
13379 2005-01-26  Simon Josefsson  <jas@extundo.com>
13380
13381         * lib/gai_strerror.c: Use GPL in header.
13382
13383 2005-01-26  Bruno Haible  <bruno@clisp.org>
13384
13385         * modules/javaexec: New file.
13386         * MODULES.html.sh (Java): Add javaexec.
13387
13388 2005-01-26  Bruno Haible  <bruno@clisp.org>
13389
13390         * m4/javaexec.m4: New file, from GNU gettext.
13391
13392 2005-01-26  Bruno Haible  <bruno@clisp.org>
13393
13394         * lib/javaexec.sh.in: New file, from GNU gettext.
13395         * lib/javaexec.h: New file, from GNU gettext.
13396         * lib/javaexec.c: New file, from GNU gettext.
13397
13398 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13399
13400         * modules/lchown (Depends-on): Remove lchown.h
13401
13402 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13403
13404         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
13405         must be defined if the header file was not found, in order
13406         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
13407
13408 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13409
13410         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
13411         initializers for struct pentry_state.
13412         (__argp_error): Check return value of __asprintf
13413         (__argp_failure): Translate error message
13414
13415         * lib/argp-parse.c: Removed braces around the expansion of N_()
13416
13417 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13418
13419         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
13420         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
13421         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
13422         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
13423         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
13424         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
13425         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
13426         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
13427         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
13428         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
13429         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
13430         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
13431         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
13432         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
13433         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
13434         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
13435         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
13436         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
13437         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
13438         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
13439         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
13440         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
13441         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
13442         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
13443         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
13444         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
13445         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
13446         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
13447         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
13448         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
13449         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
13450         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
13451         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
13452         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
13453         xstrtol.m4, xstrtoumax.m4, yesno.m4:
13454         Use an all-permissive copyright notice, recommended by RMS.
13455
13456 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
13457
13458         * modules/chdir-long (Depends-on): Remove mempcpy.
13459
13460 2005-01-21  Jim Meyering  <jim@meyering.net>
13461
13462         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
13463         same value as for Solaris 9.
13464
13465         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
13466         component length.  This included changing the parameter to be
13467         of type `char *' rather than `char const *'.
13468         * lib/chdir-long.h (chdir_long): Update prototype.
13469
13470         * lib/openat.c (fdopendir, fstatat): New functions.
13471         * lib/openat.h: Include headers required for use of DIR and struct
13472         stat.
13473         [AT_SYMLINK_NOFOLLOW]: Define.
13474         (fdopendir, fstatat): Add prototypes.
13475
13476 2005-01-21  Bruno Haible  <bruno@clisp.org>
13477
13478         * modules/classpath: New file.
13479         * MODULES.html.sh (Java): Add classpath.
13480
13481 2005-01-21  Bruno Haible  <bruno@clisp.org>
13482
13483         * lib/classpath.h: New file, from GNU gettext.
13484         * lib/classpath.c: New file, from GNU gettext.
13485
13486 2005-01-20  Simon Josefsson  <jas@extundo.com>
13487
13488         * modules/version-etc-fsf: New file.
13489
13490 2005-01-20  Simon Josefsson  <jas@extundo.com>
13491
13492         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
13493         * lib/version-etc.c: Remove version_etc_copyright.
13494         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
13495         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
13496
13497 2005-01-20  Simon Josefsson  <jas@extundo.com>
13498
13499         * lib/base64.h (isbase64): Add.
13500
13501         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
13502         using a unsigned prototype, don't inline.
13503         (base64_decode): Use it.
13504
13505 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13506
13507         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
13508         it.
13509
13510 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13511
13512         * lib/save-cwd.c (save_cwd): Remove code to support the case
13513         where fchdir is missing or flaky.
13514
13515 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13516
13517         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
13518
13519 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
13520
13521         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
13522         AC_LIBSOURCES now does this.
13523         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
13524         with new ullong_max module.
13525
13526 2005-01-19  Bruno Haible  <bruno@clisp.org>
13527
13528         * modules/sh-quote: New file.
13529         * MODULES.html.sh (Executing programs): Add sh-quote.
13530
13531 2005-01-19  Bruno Haible  <bruno@clisp.org>
13532
13533         * lib/sh-quote.h: New file, from GNU gettext.
13534         * lib/sh-quote.c: New file, from GNU gettext.
13535
13536 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13537
13538         Merge from coreutils.
13539         * m4/ullong_max.m4: New file.
13540         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
13541         (gl_MACROS): Assume localeconv exists.
13542
13543 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13544
13545         Merge changes from coreutils, as described below in several
13546         changelogs dated today.
13547
13548         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
13549         (O_DIRECTORY): Remove; not needed here, since "." must be
13550         a directory.  All uses removed.
13551         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
13552         universal on Suns, and we also need to test for IRIX.
13553         Revamp code to use 'if' rather than '#if'.
13554         Avoid unnecessary comparison of cwd->desc to 0.
13555
13556         * lib/utimens.c (futimens): Robustify the previous patch, by checking
13557         for known valid error numbers rather than observed invalid ones.
13558
13559 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13560
13561         * modules/ullong_max: New file.
13562
13563         * modules/chdir-long, modules/openat: New files.
13564         * modules/save-cwd (Depends-on): Depend on chdir-long.
13565         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
13566
13567 2005-01-18  Jim Meyering  <jim@meyering.net>
13568
13569         Merge from coreutils.
13570         * m4/chdir-long.m4, m4/openat.m4: New files.
13571         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
13572         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
13573         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
13574         is sane and DOES follow symlinks.  Besides, testing 20 different
13575         systems found no broken chown implementations.
13576         Prompted by a change in rsync's copy of this macro.
13577         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
13578
13579         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
13580
13581         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
13582         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
13583         NULL-means-set-to-current-time semantics.
13584         Remove temporary file immediately, rather than waiting
13585         for configure's at-exit trap code to do it.
13586
13587 2005-01-18  Jim Meyering  <jim@meyering.net>
13588
13589         * lib/version-etc.c (version_etc_copyright): Update copyright date.
13590
13591         * lib/utimens.c (futimens): Account for the fact that futimes
13592         can also fail with errno == ENOSYS or errno == ENOENT.
13593         Patch from Dmitry V. Levin.
13594
13595         Change the name of the robust chdir function from chdir to chdir_long.
13596         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
13597         (restore_cwd): Use chdir_long, not chdir.
13598         * lib/chdir-long.c: Renamed from chdir.c.
13599         * lib/chdir-long.h: Renamed from chdir.h.
13600         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
13601         Hurd.
13602
13603 2005-01-18  Bruno Haible  <bruno@clisp.org>
13604
13605         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
13606         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
13607         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
13608         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
13609         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
13610         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
13611         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
13612         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
13613         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
13614         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
13615         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
13616         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
13617         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
13618         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
13619         Use an all-permissive copyright notice, recommended by RMS.
13620
13621 2005-01-18  Bob Proulx  <bob@proulx.com>
13622
13623         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
13624         simplify offsetof() macro construct to avoid compile failure with
13625         native HP-UX 11.0 ANSI C compiler.
13626
13627 2005-01-17  Bruno Haible  <bruno@clisp.org>
13628
13629         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
13630         redundant because stpncpy.m4 takes care of it.
13631
13632 2005-01-17  Bruno Haible  <bruno@clisp.org>
13633
13634         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
13635
13636 2005-01-17  Bruno Haible  <bruno@clisp.org>
13637
13638         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
13639         used.
13640
13641 2005-01-17  Bruno Haible  <bruno@clisp.org>
13642
13643         * lib/fwriteerror.h (fwriteerror): Change specification to include
13644         fclose.
13645         * lib/fwriteerror.c: Include <stdbool.h>.
13646         (fwriteerror): At the end, close the file stream. Record whether
13647         stdout was already closed.
13648
13649 2005-01-17  Bruno Haible  <bruno@clisp.org>
13650
13651         * lib/execute.c (environ): Declare if needed.
13652         * lib/pipe.c (environ): Likewise.
13653         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
13654
13655 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13656
13657         * modules/argp: Depend on vsnprintf
13658
13659 2005-01-10  Jim Meyering  <jim@meyering.net>
13660
13661         * modules/closeout (Depends-on): Add atexit.
13662
13663 2005-01-06  Bruno Haible  <bruno@clisp.org>
13664
13665         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
13666
13667 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13668
13669         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
13670         definitions to be after all include files, to avoid collisions.
13671         Problem reported by Bob Proulx.
13672
13673 2005-01-04  Jim Meyering  <jim@meyering.net>
13674
13675         Changes imported from coreutils.
13676         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
13677         as the mkstemp template, use a temporary directory and an
13678         8.3-friendly template to avoid trouble on systems like DJGPP.
13679         Reported by Juan M. Guerrero via Stepan Kasal.
13680         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
13681         close. Remove the temporary directory right away, rather than waiting
13682         for configure's at-exit trap code to do it.
13683         Suggestion from Stepan Kasal.
13684
13685 2005-01-01  Simon Josefsson  <jas@extundo.com>
13686
13687         * gnulib-tool: Print #include directives when --import'ing.
13688
13689 2004-12-28  Simon Josefsson  <jas@extundo.com>
13690
13691         * tests/test-base64.c: Include required header files.  Remove
13692         unused variables.
13693
13694 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13695
13696         * modules/error (Depends-on): Remove gettext.
13697
13698 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13699
13700         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
13701         not needed.  This removes a dependency on the gettext module.
13702         [defined _LIBC]: Do not include <libintl.h>; not needed.
13703
13704 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13705
13706         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
13707         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
13708
13709 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13710
13711         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
13712         HAVE_DECL_STRTOLD.
13713
13714 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13715
13716         * modules/getdate (Depends-on): Remove alloca-opt.
13717
13718 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13719
13720         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
13721
13722 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13723
13724         * lib/argp-parse.c: Include <stddef.h>.
13725         (alignof, alignto): New macros.
13726         (parser_init): Don't assume that void * is aligned sufficiently
13727         for struct option.
13728
13729         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
13730         need to extend the stack.
13731         (YYINITDEPTH): New macro, so that the initial stack isn't overly
13732         large.
13733
13734 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13735
13736         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
13737
13738 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13739
13740         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
13741         (2004-10-24) change.  Apparently this was a false alarm.
13742
13743         * modules/getdate: Depend on alloca-opt, not alloca.
13744
13745 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13746
13747         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
13748         Remove now-obsolete comment about AIX.
13749         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
13750         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
13751         (YYMAXDEPTH): New macro.
13752
13753 2004-12-18  Simon Josefsson  <jas@extundo.com>
13754
13755         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
13756
13757 2004-12-18  Bruno Haible  <bruno@clisp.org>
13758
13759         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
13760
13761 2004-12-18  Bruno Haible  <bruno@clisp.org>
13762
13763         * lib/fatal-signal.c (fatal_signals): Make non-const.
13764         (init_fatal_signals): New function.
13765         (uninstall_handlers, install_handlers): Ignore signals that were set to
13766         SIG_IGN.
13767         (at_fatal_signal): Call init_fatal_signals.
13768         (init_fatal_signal_set): Likewise. Ignore signals that were set to
13769         SIG_IGN.
13770         Reported by Paul Eggert.
13771
13772 2004-12-18  Bruno Haible  <bruno@clisp.org>
13773
13774         * doc/alloca.texi: New file.
13775         * doc/alloca-opt.texi: New file.
13776
13777 2004-12-17  Jim Meyering  <jim@meyering.net>
13778
13779         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
13780         Otherwise, install-sh could exit with improper exit status when
13781         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
13782
13783 2004-12-16  Simon Josefsson  <jas@extundo.com>
13784
13785         * tests/test-base64.c: Add license.
13786
13787 2004-12-15  Stepan Kasal  <address@hidden>
13788
13789         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
13790
13791 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
13792
13793         * modules/getcwd (Files): Add m4/d-ino.m4.
13794         Suggested by Mark D. Baushke.
13795
13796 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13797
13798         * lib/getdate.y (textint): New member "negative".
13799         (time_zone_hhmm): New function.
13800         Expect 14 shift-reduce conflicts, not 13.
13801         (o_colon_minutes): New rule.
13802         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
13803         (yylex): Set the "negative" member of signed numbers.
13804
13805 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13806
13807         * doc/getdate.texi (Time of day items, Time zone items):
13808         Describe new formats +00:00, UTC+00:00.
13809
13810 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13811
13812         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
13813         spurious "-l"s.  Problem reported by Stepan Kasal.
13814
13815 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
13816
13817         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
13818         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
13819
13820 2004-12-04  Simon Josefsson  <jas@extundo.com>
13821
13822         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
13823         Vandoorselaere <yoann@prelude-ids.org>.
13824
13825 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13826
13827         Changes imported from coreutils.
13828         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
13829         exist.
13830         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
13831
13832 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13833
13834         Changes imported from coreutils.
13835         * lib/hard-locale.c: Assume <locale.h> exists.
13836         Include "strdup.h".
13837         (GLIBC_VERSION): New macro.
13838         (hard_locale): Assume setlocale exists.
13839         Rewrite to avoid #ifdef.
13840         Use strdup rather than malloc + strcpy.
13841         * lib/human.c: Assume <locale.h> exists.
13842         (human_readable): Assume localeconv exists.
13843
13844 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13845
13846         * modules/hard-locale (Depends-on): Add strdup.
13847
13848 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
13849
13850         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
13851         convert T2, not T.  (Imported from libc.)
13852
13853 2004-11-30  Simon Josefsson  <jas@extundo.com>
13854
13855         * modules/restrict (License): Change to LGPL.
13856
13857 2004-11-30  Simon Josefsson  <jas@extundo.com>
13858
13859         * m4/restrict.m4: Add copyright and copying conditions.
13860
13861 2004-11-30  Simon Josefsson  <jas@extundo.com>
13862
13863         * m4/base64.m4: New file.
13864
13865 2004-11-30  Simon Josefsson  <jas@extundo.com>
13866
13867         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
13868         base64.
13869
13870         * tests/test-base64.c: New file.
13871
13872         * modules/base64: New file.
13873
13874 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13875
13876         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
13877         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
13878
13879         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
13880
13881 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13882
13883         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
13884         (__getcwd.c): Don't restore errno; glibc doesn't.
13885         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
13886         first, falling back to our code only if its results look suspicious.
13887         Ensure that the resulting buffer is only as large as necessary.
13888
13889         * lib/readutmp.c: Include readutmp.h first.
13890         Include <errno.h>, since readutmp.h no longer does that.
13891         * lib/readutmp.h: Don't include <errno.h>,
13892         <sys/param.h>, <time.h>; not needed to establish interface.
13893         (errno): Remove decl.
13894         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
13895         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
13896         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
13897
13898 2004-11-28  Simon Josefsson  <jas@extundo.com>
13899
13900         * lib/base64.h, base64.c: New file.
13901
13902 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
13903
13904         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
13905
13906 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
13907
13908         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
13909         (Depends-on): Remove pathmax, same.  Add mempcpy.
13910         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
13911         (Makefile.am): Append getcwd.h to lib_SOURCES.
13912         (Include): Add getcwd.h.
13913         (Maintainer): Change from Jim Meyering to "all, glibc",
13914         since getdate now uses intended-for-glibc code.
13915         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
13916         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
13917
13918 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13919
13920         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
13921         HP's ANSI C compiler.
13922         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
13923         Declaring int functions causes warnings on some modern systems and
13924         shouldn't be needed to compile on ancient ones.
13925         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
13926         defined.
13927
13928         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
13929         with the following changes.
13930         (__set_errno): Parenthesize properly.
13931         Include <stdbool.h>.
13932         (MIN, MAX, MATCHING_INO): New macros.
13933         (__getcwd): Define with prototype, not K&R form.
13934         Use heuristics to allocate default buffer on stack if possible.
13935         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
13936         behavior, and to avoid the PATH_MAX limit when computing
13937         ../../../../...
13938         Use MATCHING_INO to compare inode number to file.
13939         Check for arithmetic overflow in size calculations.
13940         Fix bug in reallocation of dot array that caused getcwd to fail
13941         on directories nested deeper than 75.
13942         Be more careful about saving errno on error.
13943         Do not use realloc; use only free+malloc, as this is a bit
13944         more flexible and avoids a needless copy operation.
13945         Do not inspect st_dev and st_ino for symbolic links; POSIX
13946         doesn't specify the latter.
13947         Check for closedir errors.
13948         Avoid needless casts.
13949         Use "#ifdef weak_alias" around weak_alias, to be like other
13950         glibc code.
13951         The following changes to getcwd.c have effect only when used in
13952         gnulib; they have no effect inside glibc proper.
13953         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
13954         as alloca isn't used.
13955         (alloca, __alloca): Likewise.
13956         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
13957         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
13958         unconditionally, as gnulib assumes C89 or better.
13959         Do not include <sys/param.h>.
13960         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
13961         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
13962         better.
13963         (NULL) [!defined NULL]: Remove; we assume C89 or better.
13964         Include <dirent.h> in a way that is compatible with modern Autoconf.
13965         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
13966         New macros, if not already defined.
13967         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
13968         Use "_LIBC", not "defined _LIBC", for consistency.
13969         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
13970         a mempcpy module.
13971         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
13972         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
13973         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
13974         credit only to Jim Meyering and adjust the copyright dates.
13975         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
13976         <stdlib.h>, <unistd.h>, "pathmax.h".
13977         Instead, include "xgetcwd.h" (first) and "getcwd.h".
13978         (INITIAL_BUFFER_SIZE): Remove.
13979         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
13980
13981 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13982
13983         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
13984         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
13985         Use the _ONCE methods, for efficiency.
13986         Check for fcntl.h.  In test program, include <errno.h>
13987         and <fcntl.h> if available.  Remove old K&R cruft from
13988         test program.  Check for common errors in GNU/Linux,
13989         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
13990         don't do AC_LIBOBJ, as that's getcwd.m4's job.
13991         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
13992         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
13993         name accordingly.
13994         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
13995         accommodate new getcwd.c.
13996         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
13997         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
13998         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
13999         that's all we need now.
14000
14001 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14002
14003         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
14004         argp-parse.c depends on getopt internals, that means we should
14005         always use our getopt, to be on the safe side.
14006         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
14007         order not to spoil the result of an eventual previous invocation
14008         of gl_GETOPT_SUBSTITUTE.
14009
14010 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14011
14012         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
14013         redefinition warnings. To avoid them, include the defines
14014         in `#if !defined __need_getopt ... #endif'. The only place
14015         where __getopt_argv_const is used is in definitions
14016         of getopt_long and getopt_long_only below, which are as well
14017         protected by `#ifndef __need_getopt'.
14018         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
14019         __need_getopt after including <stdio.h> and <unistd.h> These
14020         headers might have defined it.
14021
14022 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14023
14024         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
14025
14026 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14027
14028         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
14029         (futimens): New function, which uses futimes if available.
14030         (futimens, utimens): Support timespec==NULL, with same semantics
14031         as utime and utimens.
14032         * lib/utimens.h (futimens): New decl.
14033
14034 2004-11-23  Jim Meyering  <jim@meyering.net>
14035
14036         * lib/getopt_.h: Remove trailing blanks.
14037
14038 2004-11-23  Jim Meyering  <jim@meyering.net>
14039
14040         * lib/__fpending.c: Add comment.
14041
14042 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
14043
14044         * modules/canonicalize (Depends-on): Add xreadlink.
14045         Problem reported by James Youngman.
14046
14047 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
14048
14049         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
14050         New macros.
14051         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
14052         optopt): Use them instead of invoking ## directly; otherwise, the
14053         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
14054
14055 2004-11-19  Bruno Haible  <bruno@clisp.org>
14056
14057         * lib/strtok_r.c: Move comments from here...
14058         * lib/strtok_r.h: ... to here.
14059
14060 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14061
14062         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
14063         implementations that mishandle size_t overflow.
14064
14065 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14066
14067         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
14068         might fail.  Problem reported by Yoann Vandoorselaere.
14069         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
14070         implementations that mishandle size_t overflow.
14071
14072 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14073
14074         * modules/canon-host (Depends-on): Add strdup.
14075
14076 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14077
14078         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
14079
14080 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14081
14082         * lib/canon-host.c: Include "strdup.h".
14083         (canon_host): Use getaddrinfo if available, so that IPv6 works.
14084         Use strdup instead of malloc/strcpy to duplicate strings.
14085
14086         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
14087         (human_space_before_unit): New constant.
14088         * lib/human.c (human_readable): Support it.
14089
14090         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
14091         (xgetcwd): Set errno correctly when failing.
14092         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
14093         the failure is actually due to a PATH_MAX problem.
14094
14095         Further getopt changes to make it more likely that glibc will
14096         buy the changes back.
14097         * lib/getopt.c (POSIXLY_CORRECT): New constant.
14098         (getopt): Use it, so to preserve glibc semantic
14099         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
14100         when compiling for libc.
14101         * lib/getopt_.h (__getopt_argv_const): Bring it back.
14102         (getopt_long, getopt_long_only): Use it.
14103
14104         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14105         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
14106         (getopt): Argv is now char * const *, as per standard.
14107         (_getopt_internal_r, _getopt_internal): Argv is now char **,
14108         not char *__getopt_argv_const *.
14109         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14110         _getopt_long_only_r): Likewise.
14111         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
14112         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14113         _getopt_long_r, _getopt_long_only_r): Likewise.
14114         * lib/getopt_.h (__getopt_argv_const): Remove.
14115         (getopt): Argv is now char * const *, as per standard.
14116
14117         * lib/getdate.y (tORDINAL): New token.
14118         (day, relunit): Allow it for relative times.
14119         (relative_time_table): Use tORDINAL for ordinals.
14120
14121 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14122
14123         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
14124         Document that "second" isn't allowed as an ordinal number.
14125
14126 2004-11-16  Jim Meyering  <jim@meyering.net>
14127
14128         * modules/closeout (Depends-on): Add fpending.
14129
14130 2004-11-15  Jim Meyering  <jim@meyering.net>
14131
14132         * lib/closeout.c: Include "__fpending.h" once again.
14133         Include <stdbool.h>.
14134         (close_stdout): Don't fail just because stdout was closed initially,
14135         since some programs don't write to stdout in the normal course of
14136         operation (other than --version and --help), and we don't want this
14137         function to make e.g. `touch file >&-' fail.
14138         But do fail if it was closed and someone has tried to write to it.
14139         E.g., `printf foo >&-' must fail.
14140
14141 2004-11-13  Jim Meyering  <jim@meyering.net>
14142
14143         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
14144
14145 2004-11-12  Simon Josefsson  <jas@extundo.com>
14146
14147         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
14148         small doc fix is still pending.
14149
14150 2004-11-11  Simon Josefsson  <jas@extundo.com>
14151
14152         * modules/strtok_r: New file.
14153
14154         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14155         strtok_r.
14156
14157 2004-11-11  Simon Josefsson  <jas@extundo.com>
14158
14159         * m4/strtok_r.m4: New file.
14160
14161         * m4/getopt.m4: Replace opterr.
14162
14163 2004-11-11  Simon Josefsson  <jas@extundo.com>
14164
14165         * lib/strtok_r.h, strtok_r.c: New file.
14166
14167 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14168
14169         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
14170         of replacing opterr, getopt, etc.  This should handle the
14171         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
14172
14173 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14174
14175         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
14176         we can stop lying to compilers about the constness of argv when we
14177         are compiled outside glibc.
14178         (getopt, getopt_long, getopt_long_only): Use it.
14179         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14180         _getopt_internal, getopt): Likewise.
14181         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14182         _getopt_long_only_r): Likewise.
14183         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14184         _getopt_long_r, _getopt_long_only_r): Likewise.
14185
14186         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
14187         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
14188         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
14189         the other external symbols.
14190         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
14191         declaration, since the above renaming now works around collisions.
14192
14193 2004-11-11  Jim Meyering  <jim@meyering.net>
14194
14195         * lib/linebreak.c: Remove trailing blanks.
14196         * lib/alloca_.h: Likewise.
14197         * lib/acosl.c: Likewise.
14198         * lib/euidaccess.c: Likewise.
14199         * lib/allocsa.h: Likewise.
14200
14201 2004-11-10  Simon Josefsson  <jas@extundo.com>
14202
14203         * m4/getaddrinfo.m4: New file.
14204
14205 2004-11-10  Simon Josefsson  <jas@extundo.com>
14206
14207         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
14208
14209 2004-11-10  Simon Josefsson  <jas@extundo.com>
14210
14211         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14212         getaddrinfo.
14213
14214         * modules/getaddrinfo: New file.
14215
14216 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14217
14218         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
14219
14220 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14221
14222         * lib/mktime.c (SHR): New macro, which is a portable
14223         substitute for >> that should work even on Crays.
14224         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
14225         Problem reported by Mark D. Baushke in
14226         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
14227         * lib/getdate.y (SHR): Likewise.
14228         (tm_diff): Use it.
14229         * lib/strftime.c (SHR): Likewise.
14230         (tm_diff): Use it.
14231         * lib/quotearg.c (struct quoting_options): Use unsigned int for
14232         quote_these_too, so that right shifts are well defined.  All uses
14233         changed.
14234
14235 2004-11-10  Jim Meyering  <jim@meyering.net>
14236
14237         Ensure that no close failure goes unreported.
14238         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
14239         return early when it seems there's nothing to flush.
14240         Don't include __fpending.h.
14241
14242 2004-11-10  Jim Meyering  <jim@meyering.net>
14243
14244         * modules/closeout (Depends-on): Remove fpending.
14245
14246 2004-11-10  Jim Meyering  <jim@meyering.net>
14247
14248         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
14249
14250 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14251
14252         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
14253         gl_FUNC_STRFTIME.
14254         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
14255         and AC_REQUIRE when possible, to avoid duplicate checks.
14256         Check for <wchar.h>.
14257
14258 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14259
14260         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
14261
14262 2004-11-09  Bruno Haible  <bruno@clisp.org>
14263
14264         * m4/sockpfaf.m4: New file.
14265
14266 2004-11-05  Bruno Haible  <bruno@clisp.org>
14267
14268         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
14269         Reported by Mark D. Baushke <mdb@cvshome.org>.
14270
14271 2004-11-04  Bruno Haible  <bruno@clisp.org>
14272
14273         2004-09-11  Bruno Haible  <bruno@clisp.org>
14274                 * allocsa.valgrind: New file.
14275         2004-02-06  Bruno Haible  <bruno@clisp.org>
14276                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
14277                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
14278                 Reported by Christopher Seip <chris.seip@hp.com>.
14279
14280 2004-11-04  Bruno Haible  <bruno@clisp.org>
14281
14282         * modules/allocsa (Files): Add lib/allocsa.valgrind.
14283         (Makefile.am): Distribute it.
14284
14285 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
14286
14287         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
14288         with errno == ERANGE if the buffer is too small.
14289         Problem reported by Mark D. Baushke.
14290
14291 2004-11-03  Albert Chin  <china@thewrittenword.com>
14292             Paul Eggert  <eggert@cs.ucla.edu>
14293
14294         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
14295         equivalent, substitute $ac_type for equivalent type rather than
14296         blindly using uint32_t *always* which won't work if uint32_t is not
14297         available.  Define _UINT32_T to work around typedef of uint32_t if
14298         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
14299         2.5.1.
14300
14301 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14302
14303         * m4/jm-macros.m4: Sync from coreutils.
14304         (gl_MACROS): Check for mbrlen, for pathchk.
14305         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
14306
14307 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14308
14309         * lib/xreadlink.c (MAXSIZE): New macro.
14310         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
14311         size does not exceed MAXSIZE.  Avoid cast.
14312         As suggested by Mark D. Baushke in
14313         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
14314         if readlink fails with buffer size just under MAXSIZE, try again
14315         with MAXSIZE.
14316
14317 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14318
14319         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
14320
14321 2004-11-02  Derek R. Price  <derek@ximbiot.com>
14322         and  Paul Eggert  <eggert@cs.ucla.edu>
14323
14324         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
14325         (get_date): Overparenthesize to avoid GCC warning.
14326
14327 2004-11-02  Bruno Haible  <bruno@clisp.org>
14328
14329         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
14330         returns void.
14331
14332 2004-11-02  Bruno Haible  <bruno@clisp.org>
14333
14334         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
14335         function returns void.
14336
14337 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14338
14339         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
14340         fflush_unlocked, flockfile, funlockfile, funlockfile,
14341         fputs_unlocked, putc_unlocked.
14342
14343 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14344
14345         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14346         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
14347         already declared.
14348
14349 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14350
14351         * modules/getdate (Files): Add doc/getdate.texi.
14352         (Depends-on): Add setenv, xalloc.
14353
14354 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14355
14356         * lib/getdate.y: Add support for TZ="foo" within a date string.
14357         Fix some bugs near time_t boundaries.  Reject dates with
14358         out-of-range components, e.g., "Sept 31".
14359         Include <stdlib.h>, "setenv.h", "xalloc.h".
14360         (ISDIGIT_LOCALE): Remove; unused.
14361         Note that the TZ and time functions used here are not reentrant.
14362         (mktime_ok, get_tz): New functions.
14363         (TZBUFSIZE): New constant.
14364         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
14365         This requires that we sometimes generate our own TZ="XXX..." setting.
14366
14367 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14368
14369         * doc/getdate.texi: New file, from coreutils with modifications for
14370         the new TZ parsing.
14371
14372 2004-10-27  Derek R. Price  <derek@ximbiot.com>
14373
14374         * lib/mktime.c (not_equal_tm): Remove redundant check.
14375
14376 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14377
14378         * modules/regex (lib_SOURCES): Add regex.c.
14379         Reported by James Youngman in
14380         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
14381
14382 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14383
14384         * lib/getdate.y: Use Bison 1.875 features, and some minor
14385         code cleanups.  This change does not affect semantics.
14386         Don't include <stdlib.h>; no longer needed.
14387         Don't include unlocked-io.h; only the "#if TEST" code uses
14388         stdio, and performance isn't crucial there.
14389         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
14390         Bison 1.875 features as described below.
14391         All uses of "PC." replaced by "pc->".
14392         (YYSTYPE): Add a forward declaration.
14393         (yylex, yyerror): Use full prototypes in forward decls.
14394         Use "%pure-parser" rather than obsolescent "%pure_parser".
14395         Use %parse-param and %lex-param instead of obsolescent
14396         YYPARSE_PARAM and YYLEX_PARAM.
14397         (meridian_table, month_and_day_table, time_units_table,
14398         relative_time_table, time_zone_table, military_table,
14399         lookup_zone, lookup_word, get_date):
14400         Use NULL instead of 0 where appropriate.
14401         (to_hour): Avoid abort (), to avoid a dependency on
14402         stdlib.h.
14403         (yyerror, yylex): Now accepts parser_control * arg.
14404         (main) [TEST]: Use '\0' rather than 0 for char.
14405
14406 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14407
14408         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
14409
14410 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14411
14412         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
14413         It's now the caller's responsibility to handle the case where
14414         !HAVE_GETPAGESIZE && !defined getpagesize.
14415
14416         * lib/mktime.c (leapyear): Arg is long int, not int.
14417
14418 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
14419
14420         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
14421
14422 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
14423
14424         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
14425         missing.  Problem reported by James Youngman.
14426
14427 2004-10-16  Simon Josefsson  <jas@extundo.com>
14428
14429         * gnulib-tool: Fix comments.  Fix parse problem.
14430         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
14431
14432 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
14433
14434         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
14435         implementation of getopt_long.  Problem reported by Alexander Taler in:
14436         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
14437
14438 2004-10-15  Bruno Haible  <bruno@clisp.org>
14439
14440         * gnulib-tool: Untabify. Initialize supplied_libname.
14441         (func_usage): More homogenous output.
14442         (func_modules_transitive_closure, func_modules_to_filelist,
14443         func_emit_lib_Makefile_am): New functions.
14444         (func_import): New function, extracted from big case statement. Use
14445         func_get_license, func_modules_transitive_closure,
14446         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
14447         opt_lgpl. Don't use test -a, as it's not portable.
14448         (func_create_testdir): Use func_modules_transitive_closure,
14449         func_modules_to_filelist, func_emit_lib_Makefile_am.
14450
14451 2004-10-15  Bruno Haible  <bruno@clisp.org>
14452
14453         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
14454
14455 2004-10-15  Bruno Haible  <bruno@clisp.org>
14456
14457         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
14458         the portions belonging to each module.
14459         Suggested by Derek Robert Price <derek@ximbiot.com>.
14460
14461 2004-10-12  Simon Josefsson  <jas@extundo.com>
14462
14463         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14464         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
14465         to real functions.
14466
14467 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14468
14469         * modules/vsnprintf: New file.
14470
14471 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14472
14473         * m4/vsnprintf.m4: New file.
14474
14475 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14476
14477         * lib/vsnprintf.h: New file.
14478         * lib/vsnprintf.c: New file.
14479
14480 2004-10-11  Bruno Haible  <bruno@clisp.org>
14481
14482         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
14483         vsnprintf.
14484
14485 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
14486
14487         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
14488
14489 2004-10-07  Bruno Haible  <bruno@clisp.org>
14490
14491         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
14492         fits into the provided buffer.
14493
14494 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
14495
14496         * lib/diacrit.c, diacrit.h: Add GPL notice.
14497
14498         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
14499         notice.
14500         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
14501         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
14502         This avoids a potential constant-folding bug.
14503
14504 2004-10-05  Bruno Haible  <bruno@clisp.org>
14505
14506         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
14507         for the declaration of strsep.
14508
14509 2004-10-05  Bruno Haible  <bruno@clisp.org>
14510
14511         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
14512
14513 2004-10-04  Simon Josefsson  <jas@extundo.com>
14514
14515         * modules/memmem: New file.
14516         * tests/test-memmem.c: New file.
14517         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
14518
14519 2004-10-04  Simon Josefsson  <jas@extundo.com>
14520
14521         * m4/memmem.m4: New file.
14522
14523 2004-10-04  Simon Josefsson  <jas@extundo.com>
14524
14525         * lib/memmem.h: New file.
14526         * lib/memmem.c: New file, taken from glibc.
14527
14528 2004-10-04  Simon Josefsson  <jas@extundo.com>
14529
14530         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
14531         '#ifdef USE_UNLOCKED_IO'.
14532
14533 2004-10-04  Simon Josefsson  <jas@extundo.com>
14534
14535         * config/srclist.txt: Add memmem from glibc.
14536
14537 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14538
14539         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
14540
14541         * modules/argmatch, modules/argp, modules/closeout, modules/error,
14542         modules/exclude, modules/getdate, modules/getline,
14543         modules/getndelim2, modules/getpass, modules/getpass-gnu,
14544         modules/getusershell, modules/linebuffer, modules/md5,
14545         modules/mountlist, modules/posixtm, modules/readtokens,
14546         modules/readutmp, modules/regex, modules/sha1,
14547         modules/version-etc, modules/yesno:
14548         Remove dependency on unlocked-io.
14549
14550 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14551
14552         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
14553
14554         * m4/unlocked-io.m4: Add copyright notice.
14555         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
14556
14557 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14558
14559         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
14560         * lib/xmalloc.c (xmemdup): Likewise.
14561         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
14562         XFREE): Remove these long-obsolescent macros.
14563         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
14564         * lib/xstrdup.c: Remove.
14565
14566         * lib/regex.c (re_comp): Cast gettext return value to char *,
14567         Problem reported by Martin Neitzel via Mark D. Baushke.
14568
14569 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14570
14571         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
14572         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
14573         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
14574         regex.c, sha1.c, version-etc.c, yesno.c:
14575         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
14576         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
14577         the includer's responsibility.
14578
14579         Sync from coreutils.
14580
14581         * lib/modechange.c (mode_compile): Don't decrement a pointer that
14582         points to the start of a string, as the C Standard says the
14583         resulting behavior is undefined.
14584
14585         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
14586         simple -> simple_backups, numbered_existing ->
14587         numbered_existing_backups, numbered -> numbered_backups
14588         to avoid shadowing problems.  All uses changed.
14589         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
14590         * lib/backupfile.c (check_extension, numbered_backup):
14591         Rename locals to avoid shadowing 'basename'.
14592         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
14593         once.
14594
14595         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
14596         * lib/.cvsignore: Add getopt.h.
14597
14598 2004-10-04  Bruno Haible  <bruno@clisp.org>
14599
14600         * modules/README: New file.
14601         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
14602         not a module.
14603
14604 2004-10-02  Jim Meyering  <jim@meyering.net>
14605
14606         * lib/dirfd.h, getpagesize.h: Add copyright notice.
14607
14608 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14609
14610         * modules/strsep: New file.
14611
14612 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14613
14614         * m4/strsep.m4: New file.
14615
14616 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14617
14618         * lib/strsep.h: New file.
14619         * lib/strsep.c: New file.
14620
14621 2004-10-01  Simon Josefsson  <jas@extundo.com>
14622
14623         * lib/snprintf.c (snprintf): Handle size==0.
14624
14625 2004-10-01  Simon Josefsson  <jas@extundo.com>
14626             Bruno Haible  <bruno@clisp.org>
14627
14628         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
14629         (snprintf): Declare 'args'.
14630
14631 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
14632
14633         * lib/snprintf.c: Remove comments as to why each header is needed.
14634
14635 2004-10-01  Bruno Haible  <bruno@clisp.org>
14636
14637         * MODULES.html.sh: Add strsep.
14638
14639 2004-09-30  Simon Josefsson  <jas@extundo.com>
14640
14641         * modules/snprintf: New file.
14642
14643 2004-09-30  Simon Josefsson  <jas@extundo.com>
14644
14645         * m4/snprintf.m4: New file.
14646
14647 2004-09-30  Simon Josefsson  <jas@extundo.com>
14648
14649         * lib/snprintf.h, lib/snprintf.c: New files.
14650
14651 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14652
14653         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
14654         (hol_entry_help): Never translate an empty string.
14655         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
14656         * lib/argp.h (OPTION_NO_TRANS): New option.
14657
14658 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14659
14660         * modules/argp (Maintainer): Replace Simon Josefsson
14661         by Sergey Poznyakoff.
14662
14663 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14664
14665         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
14666         changes merged back into glibc.
14667
14668 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14669
14670         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
14671
14672 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14673
14674         * lib/xvasprintf.c: Include xalloc.h.
14675         (xvasprintf): Use xalloc_die, not xmalloc_die.
14676
14677 2004-09-29  Bruno Haible  <bruno@clisp.org>
14678
14679         * modules/alloca-opt: New file, derived from modules/alloca.
14680         * modules/allocsa: Depend on alloca-opt instead of alloca.
14681         * modules/setenv: Likewise.
14682         * modules/vasnprintf: Likewise.
14683         * MODULES.html.sh: Add alloca-opt.
14684
14685 2004-09-28  Simon Josefsson  <jas@extundo.com>
14686
14687         * gnulib-tool: New parameter --lgpl, to asseert that modules are
14688         LGPL, and to replace license template from GPL to LGPL.
14689
14690 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14691
14692         * modules/dummy: Change license to LGPL.
14693
14694 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14695
14696         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
14697
14698 2004-09-24  Simon Josefsson  <jas@extundo.com>
14699
14700         * modules/minmax (License): Change from GPL to LGPL.
14701
14702 2004-09-23  Simon Josefsson  <jas@extundo.com>
14703
14704         * gnulib-tool (--import): Typo.
14705
14706 2004-09-23  Simon Josefsson  <jas@extundo.com>
14707
14708         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
14709
14710 2004-09-22  Bruno Haible  <bruno@clisp.org>
14711
14712         * modules/*: Add 'License' field.
14713         * gnulib-tool: Accept --extract-license option.
14714         (func_get_license): New function.
14715
14716 2004-09-21  Bruno Haible  <bruno@clisp.org>
14717
14718         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
14719         Reported by Simon Josefsson.
14720
14721 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14722
14723         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
14724         gl_AC_TYPE_LONG_LONG.
14725
14726 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14727
14728         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
14729
14730 2004-09-18  Simon Josefsson  <jas@extundo.com>
14731         and  Paul Eggert  <eggert@cs.ucla.edu>
14732
14733         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
14734         calls with autoreconf.  Define GL_LIB.
14735
14736 2004-09-14  Karl Berry  <karl@gnu.org>
14737
14738         * config/srclist.txt: unsync setenv.c, sigh.
14739
14740 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14741
14742         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
14743         Problem reported by Bruno Haible in:
14744         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
14745
14746 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14747
14748         * config/srclist.txt: Comment out argp-pvh.c.
14749
14750 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
14751
14752         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
14753         in case some system header has #define'd it.  Problem reported by
14754         Soeren D. Schulze in
14755         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
14756
14757 2004-09-09  Karl Berry  <karl@gnu.org>
14758
14759         * regex.[ch]: delete from the root.  These were supposed to be
14760                 synced with emacs cvs, but this has not happened for about
14761                 a year, and anyway nothing else uses emacs regex.[ch].
14762                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
14763                 lib/regex[.ch] is untouched.
14764
14765 2004-09-09  Bruno Haible  <bruno@clisp.org>
14766
14767         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
14768
14769 2004-09-09  Bruno Haible  <bruno@clisp.org>
14770
14771         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
14772         modifications.
14773         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
14774
14775 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14776
14777         * modules/xvasprintf: New file.
14778         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
14779
14780 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14781
14782         * lib/xvasprintf.h: New file.
14783         * lib/xvasprintf.c: New file.
14784         * lib/xasprintf.c: New file.
14785
14786 2004-09-08  Bruno Haible  <bruno@clisp.org>
14787
14788         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
14789
14790 2004-09-08  Bruno Haible  <bruno@clisp.org>
14791
14792         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
14793         length is > INT_MAX.
14794         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
14795         more.
14796
14797 2004-09-08  Bruno Haible  <bruno@clisp.org>
14798
14799         * lib/stdint_.h: New file, taken from GNU clisp.
14800
14801 2004-09-08  Bruno Haible  <bruno@clisp.org>
14802             Oskar Liljeblad  <oskar@osk.mine.nu>
14803
14804         * modules/stdint: New file.
14805         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
14806
14807 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14808
14809         Import from coreutils.
14810         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
14811         strings on unbounded length.  alloca's performance benefits aren't
14812         that important here.
14813         (V_STRDUP): Remove.
14814         (parse_with_separator): New function, with most of the internals
14815         of the old parse_user_spec.  Allow user to omit both user and group,
14816         for compatibility with FreeBSD.
14817         Clone only the user name, not the entire spec.
14818         Do not set *uid, *gid unless entirely successful.
14819         Avoid memory leak in some failing cases.
14820         Fix regression for USER.GROUP reported by Dmitry V. Levin in
14821         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
14822         (parse_user_spec): Rewrite to use parse_with_separator.
14823
14824 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14825
14826         * modules/userspec: Don't depend on alloca.
14827
14828 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14829
14830         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
14831
14832 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
14833
14834         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
14835         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
14836         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
14837
14838 2004-08-16  Simon Josefsson  <jas@extundo.com>
14839
14840         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
14841         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
14842         Add --dry-run for --import.
14843         Let user provided command line parameters override configure.ac
14844         settings.
14845
14846 2004-08-12  Simon Josefsson  <jas@extundo.com>
14847
14848         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
14849         as discussed with Paul Eggert in threads rooted at
14850         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
14851         and
14852         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
14853         Before, the test was empty, and relied on ELIDE_CODE in source
14854         code.)
14855         (gl_PREREQ_GETOPT): New macro.
14856         (gl_GETOPT): Use them.
14857
14858 2004-08-12  Simon Josefsson  <jas@extundo.com>
14859
14860         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
14861         * lib/getopt_.h: Renamed from getopt.h.
14862
14863 2004-08-12  Simon Josefsson  <jas@extundo.com>
14864
14865         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
14866         Change default library name from libfoo to libgnu.
14867         Now, if you have a configure.ac that says:
14868                 gl_SOURCE_BASE(gl)
14869                 gl_M4_BASE(gl/m4)
14870                 gl_MODULES(error getopt etcetera)
14871                 gl_INIT
14872         you can import all you need by running:
14873                 ../gnulib/gnulib-tool --import
14874
14875         * modules/getopt (Files): Rename getopt.h to getopt_.h.
14876         (Makefile.am): Rewrite, use logic from argz.
14877         (Include): Use <getopt.h> instead of "getopt.h".
14878
14879 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14880
14881         * modules/argp (Files): Add m4/unlocked-io.m4.
14882         (Depends-on): Add extensions.
14883
14884 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14885
14886         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
14887         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
14888         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
14889         Check for program_invocation_name, program_invocation_short_name,
14890         flockfile, funlockfile, features.h, _getopt_long_only_r.
14891
14892 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14893
14894         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
14895         its complicated substitute.
14896         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
14897         and program_invocation_name.
14898         (__argp_basename) [!_LIBC]: Remove; the only use was
14899         replaced by its body.
14900         (__argp_short_program_name): Change condition from
14901         !defined __argp_short_program_name to
14902         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
14903         to match argp-namefrob.h.
14904         (__argp_failure): Don't assume strerror_r returns char *.
14905         * lib/argp-parse.c (N_): Define unconditionally.
14906         (argp_default_options): Fill out initializers with 0 to avoid
14907         gcc warnings.
14908
14909 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14910
14911         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
14912         getopt1.c.
14913
14914 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14915
14916         Merge from coreutils.
14917
14918         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
14919
14920         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
14921         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
14922
14923 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14924
14925         Merge from coreutils.
14926
14927         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
14928         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
14929         for Reliant Unix 5.43.
14930
14931         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
14932         (union fooround): Use uintmax_t, not long int.
14933         The rest is a merge from libc:
14934         [defined _LIBC]: Include <shlib-compat.h>.
14935         (_obstack) [defined _LIBC]: Remove after 2.3.4.
14936
14937         * lib/settime.c (settime): Recode to avoid warning with
14938         Sun Forte C 6U2.
14939
14940         * lib/strverscmp.c: Convert to UTF-8.
14941
14942 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14943
14944         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
14945         m4/uintmax_t.m4.
14946
14947 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14948
14949         * modules/xalloc-die: New file.
14950         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
14951
14952         * modules/md5 (Files): Add m4/uint32_t.m4.
14953         * modules/sha1: Renamed from modules/sha.
14954         (Files):
14955         Rename lib/sha.h to lib/sha1.h.
14956         Rename lib/sha.c to lib/sha1.c.
14957         Rename m4/sha.m4 to m4/sha1.m4.
14958         (lib_SOURCES): Likewise.
14959         (configure.ac): Rename gl_SHA to gl_SHA1.
14960         (Include): sha.h -> sha1.h.
14961
14962 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14963
14964         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
14965         * m4/sha1.m4: Renamed from sha.m4.
14966         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
14967
14968 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14969
14970         * lib/obstack.h (obstack_empty_p):
14971         Don't assume that chunk->contents is suitably aligned.
14972         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
14973         Likewise. Problem reported by Benno in
14974         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
14975
14976         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
14977         readable.  This could be improved further but it'd take some work.
14978
14979 2004-08-08  Simon Josefsson  <jas@extundo.com>
14980
14981         * modules/xgethostname (Depends-on): Remove exit and error (not
14982         used).
14983
14984         * modules/getpass-gnu: Add getpass.h.
14985         (Depends-on): Add stdbool.
14986         * modules/getpass: Add getpass.h.
14987
14988 2004-08-08  Simon Josefsson  <jas@extundo.com>
14989
14990         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
14991         Check getpass declaration.
14992
14993 2004-08-08  Simon Josefsson  <jas@extundo.com>
14994
14995         * lib/xgethostname.c: Don't include error.h (not used).
14996
14997         * lib/getpass.h: Add.
14998         * lib/getpass.c: Include getpass.h first.
14999
15000 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
15001
15002         * lib/xalloc-die.c: New file.
15003         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
15004         All uses removed.
15005         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
15006         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
15007         xalloc-die.c.
15008         (_, N_, xalloc_die): Move to xalloc-die.c.
15009         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
15010         so that we needn't mess with xalloc_msg_memory_exhausted.
15011
15012         * lib/sha1.h: Renamed from sha.h.
15013         (SHA1_H): Renamed from _SHA_H.
15014         (sha1_ctx): Renamed from sha_ctx.
15015         (sha1_init_ctx): Renamed from sha_init_ctx.
15016         (sha1_process_block): Renamed from sha_process_block.
15017         (sha1_process_bytes): Renamed from sha_process_bytes.
15018         (sha1_finish_ctx): Renamed from sha_finish_ctx.
15019         (sha1_read_ctx): Renamed from sha_read_ctx.
15020         (sha1_stream): Renamed from sha_stream.
15021         (sha1_buffer): Renamed from sha_buffer.
15022         * lib/sha1.c: Likewise; renamed from sha.c.
15023         Do not include <sys/types.h>.
15024         Include <stddef.h> rather than <stdlib.h>.
15025
15026 2004-08-08  Bruno Haible  <bruno@clisp.org>
15027
15028         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
15029         FILESYSTEM_PREFIX_LEN.
15030         * lib/progreloc.c: Likewise.
15031         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
15032
15033 2004-08-06  Simon Josefsson  <jas@extundo.com>
15034
15035         * modules/progname (Depends-on): Don't depend on stdbool.
15036
15037 2004-08-06  Simon Josefsson  <jas@extundo.com>
15038
15039         * modules/getsubopt: New file.
15040         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15041         getsubopt.
15042
15043 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15044
15045         More merge from coreutils.
15046
15047         * m4/utimens.m4, m4/utimecmp.m4: New files.
15048         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
15049         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
15050         prereq.m4, sha.m4: Import changes from coreutils.
15051
15052 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15053
15054         More merge from coreutils.
15055         * modules/raise, modules/readtokens0, modules/utimens:
15056         * modules/utimecmp, module/xnanosleep: New files.
15057         * modules/strftime: Add lib/strftime.h.
15058         Change include from <time.h> to "strftime.h".
15059         * modules/yesno: Add lib/yesno.h.
15060         * modules/backupfile: Remove lib/addext.c.
15061         * modules/euidaccess: Add stat-macros.h.
15062         * modules/canonicalize, modules/euidaccess,
15063         modules/filemode, modules/lchown, modules/makepath,
15064         modules/rmdir, modules/stat: Likewise.
15065
15066 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15067
15068         Merge from tar.
15069         * lib/argp-help.c (make_hol, hol_append): Don't assume that
15070         SIZE_MAX is a valid preprocessor constant.
15071         (__argp_basename): Change from "#ifndef _LIBC"
15072         to "#ifndef __argp_short_program_name", so that
15073         we don't compile these functions for tar.
15074
15075         More merges from coreutils.
15076         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
15077         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
15078         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
15079         * lib/addext.c: Remove; no longer needed.
15080         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
15081         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
15082         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
15083         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
15084         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
15085         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
15086         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
15087         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
15088         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
15089         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15090         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
15091         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
15092         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
15093         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
15094         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
15095         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
15096         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
15097         Import changes from coreutils.
15098
15099 2004-08-05  Simon Josefsson  <jas@extundo.com>
15100
15101         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
15102
15103 2004-08-05  Simon Josefsson  <jas@extundo.com>
15104
15105         * m4/getsubopt.m4: New file.
15106
15107 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15108
15109         Merge from coreutils.
15110
15111         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
15112         * m4/getcwd-path-max.m4: New files.
15113
15114         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
15115         FILESYSTEM_PREFIX_LEN ->
15116         FILE_SYSTEM_PREFIX_LEN.
15117         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
15118         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
15119         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
15120         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
15121
15122         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
15123         prerequisite modules now handle the DOS stuff.
15124         Don't check for unistd.h.
15125
15126 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15127
15128         Merge from coreutils.
15129
15130         * lib/.gdb-history: Remove; this doesn't belong here.
15131
15132         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
15133         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
15134         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
15135         * lib/getcwd.c: New files.
15136
15137         * lib/dirname.h: Include <stdbool.h>.
15138         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
15139         for consistency with POSIX terminology.  All uses changed.
15140         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
15141         (strip_trailing_slashes): Use bool for booleans.
15142         * lib/stripslash.c (strip_trailing_slashes): Likewise.
15143
15144         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
15145         sometimes returns a positive errno value even when it succeeds.
15146         (print_errno_message) [!LIBC]: Fall back on strerror if
15147         __strerror_r fails.
15148
15149         * lib/path-concat.c (mempcpy): Don't define if a system header defines
15150         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
15151         (longest_relative_suffix): New function.
15152         (path_concat): Use it.  Assume first argument is not NULL.
15153         Port to DOS.  Omit redundant separators.
15154         Report an error instead of returning NULL.
15155         Use mempcpy instead of memcpy.
15156         (xpath_concat): Remove: not declared or used.
15157
15158         * lib/same.h: Include <stdbool.h>
15159         (same_name): Return bool, not int.
15160         * lib/same.c (same_name): Likewise.
15161         (errno): Don't declare; we assume C89 or better now.
15162
15163         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
15164         if not already defined.
15165
15166         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
15167         * lib/dup-safer.c (errno): Likewise.
15168
15169 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15170
15171         Merge from coreutils.
15172         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
15173         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
15174         * modules/path-concat: Don't depend on strdup.
15175
15176 2004-08-03  Simon Josefsson  <jas@extundo.com>
15177
15178         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
15179         * lib/progname.h: Don't include stdbool.h.
15180
15181 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15182
15183         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
15184         * MODULES.html.sh (func_all_modules): Remove fatal.
15185
15186 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15187
15188         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
15189
15190 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15191
15192         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
15193         working.
15194
15195 2004-08-02  Simon Josefsson  <jas@extundo.com>
15196
15197         * lib/getsubopt.h: New file, with comments from Bruno Haible.
15198         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
15199         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
15200
15201 2004-08-01  Simon Josefsson  <jas@extundo.com>
15202
15203         * lib/xgetdomainname.c: Include stdlib.h, for free().
15204
15205 2004-07-19  Bruno Haible  <bruno@clisp.org>
15206
15207         * MODULES.html.sh (func_all_modules): Add dummy.
15208
15209 2004-07-16  Simon Josefsson  <jas@extundo.com>
15210
15211         * modules/dummy: New file.
15212
15213 2004-07-16  Simon Josefsson  <jas@extundo.com>
15214
15215         * lib/dummy.c: New file.
15216
15217 2004-07-16  Bruno Haible  <bruno@clisp.org>
15218
15219         * lib/backupfile.h: Add extern "C" for C++.
15220         * lib/closeout.h: Likewise.
15221         * lib/copy-file.h: Likewise.
15222         * lib/findprog.h: Likewise.
15223         * lib/full-write.h: Likewise.
15224         * lib/pathname.h: Likewise.
15225         * lib/progname.h: Likewise.
15226         * lib/stpcpy.h: Likewise.
15227         * lib/stpncpy.h: Likewise.
15228         * lib/strcase.h: Likewise.
15229         * lib/strstr.h: Likewise.
15230         * lib/xalloc.h: Likewise.
15231
15232         * lib/mbswidth.h: Add extern "C" for C++.
15233         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
15234
15235 2004-07-13  Robert Millan  <robertmh@gnu.org>
15236
15237         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
15238
15239 2004-07-09  Simon Josefsson  <jas@extundo.com>
15240
15241         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
15242         failed without this.)
15243
15244 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15245
15246         * modules/chown (Files): Add lib/fchown-stub.c, since
15247         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
15248
15249 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15250
15251         * lib/fchown-stub.c: New file.
15252
15253 2004-06-24  Jim Meyering  <jim@meyering.net>
15254
15255         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
15256
15257 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15258
15259         * modules/argz: Omit "#include".
15260
15261         * MODULES.html.sh (func_all_modules): Add calloc, to match
15262         2004-06-01 addition of calloc module.
15263
15264 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15265
15266         * m4/argz.m4: New file, which is autoupdated from libtool.
15267
15268 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15269
15270         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
15271         libtool.
15272
15273 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15274
15275         * config/srclist-update: Don't insist on "USA." before the
15276         close-comment, as libtool omits the period and puts the */ on a
15277         separate line.
15278         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
15279         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
15280
15281 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
15282
15283         * modules/argz: New file.
15284         * MODULES.html.sh (func_all_modules): Add argz.
15285
15286 2004-06-12  Jim Meyering  <jim@meyering.net>
15287         and  Paul Eggert  <eggert@cs.ucla.edu>
15288
15289         * modules/hash (Files): Add lib/xalloc.h.
15290         * modules/pipe (Depends-on): Add wait-process.
15291         * modules/stat (Depends-on): Add xalloc.
15292         * modules/userspec (Files): Add lib/userspec.h.
15293         * modules/xstrto
15294
15295         Upgrade from gettext-0.13.
15296         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
15297         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
15298         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
15299
15300 2004-06-10  Jim Meyering  <jim@meyering.net>
15301
15302         * lib/calloc.c: New file.
15303
15304 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
15305
15306         * lib/getdate.y (yylex): Allow space between sign and number.
15307         Problem reported by Dan Jacobson.
15308
15309 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15310
15311         Merge from coreutils CVS.
15312
15313         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
15314         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
15315         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
15316         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
15317         xstrtol.m4: Fix copyright date and/or serial number.
15318
15319         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
15320         See if we need an fchown replacement.
15321         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
15322         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
15323         and use the replacement function if we detect either defect.
15324
15325         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
15326         gl_UTIMECMP.
15327
15328 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15329         and  Jim Meyering  <jim@meyering.net>
15330
15331         Merge from coreutils CVS.
15332
15333         * lib/stat-macros.h: New file, with contents from file-type.h
15334         and coreutils' system.h.
15335         * lib/file-type.c: Include "stat-macros.h".
15336         * lib/file-type.h (file_type): Move all macro definitions to new file,
15337         stat-macros.h.
15338
15339         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
15340         Wrap old code with this conditional.
15341         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
15342         function that does not dereference symlinks.
15343         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
15344
15345         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
15346         dependency problems.
15347         (xreadlink): Accept new arg SIZE, for efficiency.
15348         All decls and uses changed.
15349         * lib/xreadlink.h: Include <stddef.h>, for size_t.
15350
15351         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
15352         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
15353
15354         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
15355         sysexits.h.
15356
15357 2004-06-01  Jim Meyering  <jim@meyering.net>
15358
15359         * m4/calloc.m4: New file.
15360
15361 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
15362
15363         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
15364         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
15365         Also, fix a typo in a diagnostic.
15366
15367 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15368
15369         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
15370         or AC_FUNC_REALLOC.
15371
15372 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15373
15374         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
15375         macros to be defined.
15376         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
15377         the allocator returns NULL because the requested size is zero.
15378
15379 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15380
15381         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
15382         var.  Add comment explaining why libc still defines it.  This
15383         merges the following patch from glibc:
15384         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
15385
15386 2004-05-20  Andreas Schwab  <schwab@suse.de>
15387
15388         * m4/free.m4: Replace free if it not known to work, not the other
15389         way round.
15390
15391 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15392
15393         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
15394         present in glibc since revision 1.1 of this file.
15395         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
15396         obstack_alignment_mask, obstack_alloc, obstack_base,
15397         obstack_blank, obstack_blank_fast, obstack_chunk_size,
15398         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
15399         obstack_grow0, obstack_init, obstack_int_grow,
15400         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
15401         obstack_next_free, obstack_object_size, obstack_ptr_grow,
15402         obstack_ptr_grow_fast, obstack_room): Remove declarations of
15403         nonexistent functions.
15404
15405 2004-05-18  Karl Berry  <karl@gnu.org>
15406
15407         * config/srclist.txt: break link for vasnprintf.c.
15408
15409 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15410
15411         Port obstack to the AS/400, where pointers are 16 bytes wide and
15412         you cannot cast an integer to a valid pointer.  This patch is
15413         currently waiting to be integrated into glibc; see
15414         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
15415
15416         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
15417         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
15418         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
15419         (struct obstack): temp member is now a union of a pointer and
15420         an integer, instead of an integer.  All integer uses changed.
15421         This does not affect the physical layout of struct obstack,
15422         except on hosts (like the AS/400) where the size or alignment of
15423         void * is greater than that of ptrdiff_t.
15424         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
15425         __STDC__)]: Store temporary in pointer member of union, not
15426         integer member.
15427         * lib/obstack.c: Include <stddef.h>, for offsetof.
15428         (struct fooalign): Remove; it doesn't need a name.
15429         (union fooround): Change double to long double, and add void *.
15430         (DEFAULT_ALIGNMENT): Use offsetof to compute.
15431         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
15432         not a macro.  Hence the values are always int; so remove all
15433         casts-to-int in uses.
15434
15435 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15436
15437         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
15438         we can get this patch merged into glibc.
15439
15440 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15441             Paul Eggert  <eggert@cs.ucla.edu>
15442
15443         * m4/argp: Depend on alloca.
15444
15445 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15446             Paul Eggert  <eggert@cs.ucla.edu>
15447
15448         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
15449         freecoding.
15450
15451 2004-05-17  Bruno Haible  <bruno@clisp.org>
15452
15453         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
15454         precision that consists of a '.' followed by an empty digit string.
15455         Patch by Tor Lillqvist <tml@iki.fi>.
15456
15457 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15458
15459         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
15460         for backward compatibility with older code.  We need our own
15461         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
15462         it under some other name, and our alloca.h will define it.
15463
15464 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15465             Derek Price  <derek@ximbiot.com>
15466
15467         * lib/alloca.c: Include <alloca.h>, to get our interface.
15468         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
15469         include <alloca.h> first.  Use C89 prototype for alloca; this
15470         requires including <stddef.h> for size_t.  Use extern "C" if C++.
15471         Use #elif for simplicity, since we can assume C89 now.
15472         Don't try to source the system alloca.h since it will not be found
15473         and to prevent recursively including its replacement.
15474         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
15475         * lib/regex.c: Likewise.
15476
15477 2004-05-16  Derek Price  <derek@ximbiot.com>
15478             Paul Eggert  <eggert@cs.ucla.edu>
15479
15480         getline cleanup.  This changes the getndelim2 API: both order of
15481         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
15482         no delimiter).
15483
15484         * lib/getline.c: Don't include stddef.h or stdio.h, since our
15485         interface does that.
15486         (getline): Always use getdelim, so that we don't have two
15487         copies of this code.
15488         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
15489         if available.
15490         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
15491         (GETNDELIM2_MAXIMUM): New macro.
15492         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
15493         instead of the old practice of delim2==0.  All callers changed.
15494         Return -1 on overflow, instead of returning junk.
15495         Do not set *linesize unless allocation succeeds.
15496         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
15497         that we include sys/types.h.
15498         * lib/getnline.h: Likewise.
15499         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
15500         (getndelim2): Reorder arguments.
15501         * lib/getnline.c (getnline, getndelim):
15502         Don't discard the NMAX argument.
15503         (getnline): Invoke getndelim, to avoid code duplication.
15504         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
15505         of (size_t) -1 by callers of the getnline family.
15506
15507 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15508
15509         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
15510         Check for gettimeofday.
15511         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
15512         Check for settimeofday, stime.
15513
15514 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15515
15516         * lib/nanosleep.c (suspended): Change its type from int to
15517         sig_atomic_t volatile.
15518         (first_call): Make it private to rpl_nanosleep, and have it
15519         be zero initially as that's a bit faster.
15520         (my_usleep): Round up fractional times instead of truncating them,
15521         as this is the usual meaning for 'sleep'.
15522
15523         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
15524         doesn't work.
15525         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
15526         (ENOSYS): Define if not defined.
15527         (settime): Fall back on stime if it exists and settimeofday fails.
15528         But don't bother with fallbacks if a method fails with errno == EPERM.
15529
15530 2004-05-11  Jim Meyering  <jim@meyering.net>
15531
15532         Prior to this change, the save_cwd caller required read access to the
15533         current directory on most systems (ones with the fchdir function).
15534
15535         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
15536         fails, try write-only, and finally, resort to using xgetcwd.
15537
15538 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15539
15540         * lib/obstack.c, obstack.h: Import changes from libc.
15541
15542 2004-04-28  Bruno Haible  <bruno@clisp.org>
15543
15544         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
15545         also implicitly appends .exe to executables.
15546         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
15547         accepts Windows pathnames.
15548         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15549         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15550         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15551         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15552         Reported by Derek Robert Price <derek@ximbiot.com>.
15553
15554 2004-04-21  Karl Berry  <karl@gnu.org>
15555
15556         * config/srclist.txt (localcharset.c): break sync.
15557
15558 2004-04-20  Paul Eggert  <eggert@twinsun.com>
15559
15560         * m4/host-os.m4: Add a copyright notice.
15561
15562 2004-04-20  Jim Meyering  <jim@meyering.net>
15563
15564         Change UTILS_ to gl_ in AC_DEFINE'd names.
15565         Change utils_- and jm_-prefixed variables, too.
15566         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
15567         UTILS_FUNC_MKDIR_TRAILING_SLASH.
15568         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
15569
15570         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
15571         Don't emit trailing blanks.
15572         Also rename jm_-prefixed variables to have gl_ prefix.
15573
15574         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
15575         Also rename jm_-prefixed variables to have gl_ prefix.
15576
15577         * m4/jm-macros.m4: Reflect the renamings.
15578         * m4/prereq.m4: Likewise.
15579
15580 2004-04-20  Jim Meyering  <jim@meyering.net>
15581
15582         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
15583         memory.
15584
15585 2004-04-20  Jim Meyering  <jim@meyering.net>
15586             Bruno Haible  <bruno@clisp.org>
15587
15588         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
15589         memory when realloc fails.
15590
15591 2004-04-19  Jim Meyering  <jim@meyering.net>
15592
15593         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
15594         now that readutmp.c may call `free (0)'.
15595
15596 2004-04-19  Bruno Haible  <bruno@clisp.org>
15597
15598         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
15599         * m4/inttypes_h.m4: Likewise.
15600         * m4/stdint_h.m4: Likewise.
15601         * m4/intmax_t.m4: Likewise.
15602         * m4/uintmax_t.m4: Likewise.
15603
15604 2004-04-18  Jim Meyering  <jim@meyering.net>
15605
15606         * m4/prereq.m4: Don't forbid jm_ prefix.
15607
15608         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
15609         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
15610         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
15611         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
15612         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
15613         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
15614         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
15615         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
15616         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
15617         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
15618         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
15619         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
15620         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
15621         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
15622         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
15623         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
15624         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
15625         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
15626         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
15627
15628 2004-04-18  Jim Meyering  <jim@meyering.net>
15629
15630         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
15631         failure, don't leak memory and do call END_UTMP_ENT.
15632
15633 2004-04-16  Jim Meyering  <jim@meyering.net>
15634
15635         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
15636         coreutils' stat program.
15637         (gl_PREREQ): Don't require jm_PREREQ_STAT.
15638
15639 2004-04-11  Paul Eggert  <eggert@twinsun.com>
15640
15641         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
15642         C89.
15643         (CHAR_BIT): Remove, since we assume C89.
15644         Include <stdint.h> if available, as per current Autoconf CVS advice.
15645
15646 2004-03-31  Jim Meyering  <jim@meyering.net>
15647
15648         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
15649         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
15650         * m4/xalloc.m4: Likewise.
15651
15652 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15653
15654         Merge from coreutils.
15655
15656         * m4/inttostr.m4: New file.
15657         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
15658         Require AM_STDBOOL_H and gl_TIMESPEC instead.
15659         Require gl_CLOCK_TIME.
15660         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
15661
15662 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15663
15664         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
15665         not bool, to be more consistent with Unix conventions.
15666         Suggested by Bruno Haible.
15667
15668         Merge from coreutils.
15669
15670         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
15671         * lib/umaxtostr.c: New files.
15672
15673         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
15674         the usual <time.h> dance.
15675         (get_date): Change signature to support fractional time stamps.
15676         All callers changed.
15677         * lib/getdate.y: Include "getdate.h" first, as we can now
15678         assume C89 and don't need to worry about 'const'.
15679         Similarly, include "unlocked-io.h" near start, not in middle.
15680         Include <limits.h>.
15681         (textint.value): Use long int rather than int.
15682         (textint.digits): Use size_t rather than int.
15683         (BILLION, LOG10_BILLION): New constants.
15684         (parser_control): New member rel_ns.  Members day_ordinal,
15685         time_zone, month, day, hour, minutes, rel_year, rel_month,
15686         rel_day, rel_hour, rel_minutes, rel_seconds
15687         are now long int, not int.  Member seconds is now struct timespec,
15688         not int.  New member timespec_seen.  Members dates_seen, days_seen,
15689         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
15690         not int.
15691         (%union.intval): Now long int, not int.
15692         New member timespec.
15693         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
15694         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
15695         (spec): Now is a timespec or an item list.
15696         (timespec, items): New nonterminals.
15697         (time, rel, relunit, number, get_date):
15698         Add support for fractional seconds.
15699         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
15700         (gmtime, localtime, mktime): Remove decls; not needed with C89.
15701         (to_hour): First arg is now long int, not int.
15702         (to_year): Returns long int, not int.
15703         Don't treat year -70 like 70.
15704         (tm_diff): Returns long int, not int.
15705         (lookup_word): Use bool instead of int when appropriate.
15706         (yylex): Use size_t for count, not int.
15707         Detect overflow when parsing large integer constants.
15708         Add support for fractions.
15709         (get_date): Make pointers 'const' if possible.
15710         Use more-portable code to detect integer overflow.
15711         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
15712         Don't use ctime; it's not reliable if the year has >4 digits.
15713
15714         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
15715         This is for compatibility with BSD.
15716
15717         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
15718         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
15719         From coreutils' system.h.
15720
15721         * lib/userspec.c: Don't include "posixver.h".
15722         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
15723         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
15724         compatible extension.  Simplify code by removing a boolean int
15725         that was always nonzero if a string was nonnull.
15726
15727 2004-03-30  Jim Meyering  <jim@meyering.net>
15728
15729         Merge from coreutils.
15730
15731         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
15732         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
15733         on some systems one must include <grp.h> before it.
15734         Reported by Christian Krackowizer.
15735
15736 2004-03-30  Jim Meyering  <jim@meyering.net>
15737
15738         Merge from coreutils.
15739
15740         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
15741
15742         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
15743         an empty input stream.
15744
15745         * lib/readtokens.c: Include <stdbool.h>.
15746         (readtoken): Use `size_t' rather than int/long.
15747         All callers adjusted.
15748         Use `bool' rather than `int' where appropriate.
15749         Use memset rather than an explicit loop.
15750         Use x2nrealloc rather than xrealloc.
15751         Allow the use of `\0' as a delimiter.
15752         (readtokens): Likewise.
15753         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
15754
15755 2004-03-30  Jim Meyering  <jim@meyering.net>
15756
15757         * m4/realloc.m4: Remove file, since now it does no more than
15758         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
15759         the `configure.ac' section of module/realloc.
15760         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
15761
15762 2004-03-30  Bruno Haible  <bruno@clisp.org>
15763
15764         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
15765         nonnull.
15766
15767 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15768
15769         Merge changes to getloadavg.c from coreutils and Emacs.
15770
15771         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
15772         Define to an expression, not to the empty string.
15773         Include cloexec.h and xalloc.h.
15774         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
15775         Use set_cloexec_flag rather than rolling our own.
15776         * lib/cloexec.c, lib/cloexec.h: New files.
15777
15778 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15779
15780         * m4/cloexec.m4: New file.
15781
15782 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15783
15784         * lib/getopt.h: Sync with libc CVS.
15785
15786 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15787             Bruno Haible  <bruno@clisp.org>
15788
15789         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
15790         mbswidth.
15791
15792 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15793             Bruno Haible  <bruno@clisp.org>
15794
15795         * lib/mbswidth.h: Include <wchar.h> only if
15796         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
15797         <wchar.h>.
15798         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
15799
15800 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15801
15802         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
15803         Sync with libc CVS.
15804         * lib/getopt_int.h: New file, also synced from libc.
15805
15806 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15807
15808         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
15809         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
15810         Bring back getopt.c, getopt.h, getopt1.c.
15811
15812 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15813
15814         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
15815         All uses changed.  Check for sa_sigaction member; this fixes
15816         a bug first reported by Jason Andrade in
15817         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15818
15819 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15820
15821         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
15822         '#if' expressions.  Unlike the code it replaces, it does not
15823         depend on (defined _SC_PAGESIZE).  However, it does depend on
15824         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
15825         first reported by Jason Andrade in
15826         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15827
15828 2004-02-25  Simon Josefsson  <jas@extundo.com>
15829
15830         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
15831
15832 2004-02-25  Simon Josefsson  <jas@extundo.com>
15833
15834         * lib/strdup.h: New file.
15835         * lib/strdup.c: Include it.
15836         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
15837         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
15838
15839 2004-02-23  Karl Berry  <karl@gnu.org>
15840
15841         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
15842         (from fencepost.gnu.org:/gd/gnuorg).
15843
15844 2004-02-23  Karl Berry  <karl@gnu.org>
15845
15846         * config/srclistvars.sh (GNUORG) [karl]: redefine.
15847         * config/srclist.txt: add maintain/standards documents.
15848
15849 2004-02-18  Bruno Haible  <bruno@clisp.org>
15850
15851         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
15852         Reported by Derek Robert Price <derek@ximbiot.com>.
15853
15854 2004-02-16  Karl Berry  <karl@gnu.org>
15855
15856         * config/mkinstalldirs, install-sh: update from automake.
15857
15858 2004-02-06  Karl Berry  <karl@gnu.org>
15859
15860         * m4/po.m4: update from gettext 0.14.1.
15861
15862 2004-02-06  Karl Berry  <karl@gnu.org>
15863
15864         * lib/config.charset: update from gettext 0.14.1.
15865
15866 2004-02-05  Paul Eggert  <eggert@twinsun.com>
15867
15868         Add comments and code, prompted by suggestions from Bruno Haible
15869         for sh-quote.
15870         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
15871         describing the enum quoting_style values.
15872         * lib/quotearg.c (quotearg_alloc): New function.
15873         (quotearg_buffer_restyled): Treat lone { and } as special.
15874         Treat = as special.  Work around bug with older shells
15875         that "see" a '\' that is really the 2nd byte of a multibyte char.
15876         Quote empty string with shell_quoting_style.
15877
15878 2004-02-03  Bruno Haible  <bruno@clisp.org>
15879
15880         * m4/pipe.m4: New file, from GNU gettext.
15881
15882 2004-02-03  Bruno Haible  <bruno@clisp.org>
15883
15884         * lib/pipe.h: New file, from GNU gettext.
15885         * lib/pipe.c: New file, from GNU gettext.
15886
15887 2004-01-27  Bruno Haible  <bruno@clisp.org>
15888
15889         * m4/execute.m4: New file, from GNU gettext.
15890
15891 2004-01-27  Bruno Haible  <bruno@clisp.org>
15892
15893         * lib/execute.h: New file, from GNU gettext.
15894         * lib/execute.c: New file, from GNU gettext.
15895         * lib/w32spawn.h: New file, from GNU gettext.
15896
15897 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15898
15899         Merge from diffutils.
15900
15901         * lib/file-type.c (file_type): Add typed memory objects.
15902         * lib/file-type.h (S_TYPEISTMO): New macro.
15903
15904         * lib/c-stack.h (c_stack_action): Remove argv argument.
15905         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
15906         (die): Don't calculate message unless segv_action returns.
15907         (get_stack_location, min_address_from_argv, max_address_from_argv,
15908         volatile stack_base, volatile_stack_size): Remove.
15909         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
15910         that every segmentation violation is a stack overflow.  (Ouch!)
15911         See Debian bug 136249 (still outstanding) for more info about why
15912         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
15913
15914 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15915
15916         Exit-status fix from coreutils.
15917
15918         Use exit_failure consistently in place of EXIT_FAILURE,
15919         so that program exit statuses are consistent on failure.
15920
15921         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
15922         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
15923         * lib/argmatch.h: Comment fix to match the above.
15924         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
15925         Now a macro referring to exit_failure, instead of a separate
15926         variable.  Include "exitfail.h" to get it.
15927         * lib/xstrtol.h: Include "exitfail.h".
15928         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
15929
15930         * lib/long-options.c (parse_long_options): Use prototype
15931         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
15932         for clarity.
15933
15934 2004-01-21  Jim Meyering  <jim@meyering.net>
15935
15936         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
15937         so as not to conflict with a different-sized __mktime_internal
15938         function in GNU libc.
15939         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
15940         Problem building statically-linked `ls' reported by Michael Brunnbauer.
15941
15942 2004-01-20  Karl Berry  <karl@gnu.org>
15943
15944         * config/config.guess: update from config.
15945
15946         * config/srclistvars.sh: GNUWWWLICENSES for karl.
15947
15948 2004-01-20  Bruno Haible  <bruno@clisp.org>
15949
15950         Safer stack allocation.
15951         * lib/setenv.c: Include allocsa.h.
15952         (alloca): Remove fallback definition.
15953         (freea): Remove macro.
15954         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
15955         instead of freea.
15956
15957 2004-01-20  Bruno Haible  <bruno@clisp.org>
15958
15959         * m4/eealloc.m4: New file, from GNU gettext.
15960
15961 2004-01-20  Bruno Haible  <bruno@clisp.org>
15962
15963         * m4/allocsa.m4: New file, from GNU gettext.
15964
15965 2004-01-20  Bruno Haible  <bruno@clisp.org>
15966
15967         * lib/xallocsa.h: New file, from GNU gettext.
15968         * lib/xallocsa.c: New file, from GNU gettext.
15969
15970 2004-01-20  Bruno Haible  <bruno@clisp.org>
15971
15972         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
15973
15974 2004-01-20  Bruno Haible  <bruno@clisp.org>
15975
15976         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
15977         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
15978         specially.
15979
15980 2004-01-20  Bruno Haible  <bruno@clisp.org>
15981
15982         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
15983         patch.
15984
15985 2004-01-20  Bruno Haible  <bruno@clisp.org>
15986
15987         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
15988
15989 2004-01-20  Bruno Haible  <bruno@clisp.org>
15990
15991         * lib/eealloc.h: New file.
15992
15993 2004-01-20  Bruno Haible  <bruno@clisp.org>
15994
15995         * lib/binary-io.h: Avoid warnings on Cygwin.
15996
15997 2004-01-20  Bruno Haible  <bruno@clisp.org>
15998
15999         * lib/allocsa.h: New file, from GNU gettext.
16000         * lib/allocsa.c: New file, from GNU gettext.
16001
16002 2004-01-18  Karl Berry  <karl@gnu.org>
16003
16004         * doc/gpl.texi, doc/lgpl.texi: new files.
16005
16006 2004-01-18  Karl Berry  <karl@gnu.org>
16007
16008         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
16009         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
16010
16011 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16012
16013         Merge from coreutils.
16014
16015         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
16016         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
16017         (gl_DEFAULT_POSIX2_VERSION): Move
16018         the documentation from 'configure' into 'config.hin',
16019         so that 'configure --help' isn't burdened by it and
16020         we don't have to worry about its formatting there.
16021         Reword the documentation so that it's more succinct
16022         and can be run together into a single paragraph.
16023         * m4/same.m4 (gl_SAME): Check for pathconf.
16024
16025 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16026
16027         Merge from coreutils.
16028
16029         * lib/posixver.c: Include posixver.h.
16030
16031         * lib/same.c: Include <stdbool.h>, <limits.h>.
16032         (_POSIX_NAME_MAX): Define if not defined.
16033         (MIN): New macro.
16034         (same_name): If file names are silently truncated, report
16035         that the file names are the same if they are the same after
16036         the silent truncation.
16037
16038         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
16039         conversion function.
16040         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
16041         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
16042         longer needed.
16043
16044 2004-01-15  Jim Meyering  <jim@meyering.net>
16045
16046         Merge from coreutils.
16047
16048         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
16049         if no library is required.
16050         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
16051         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
16052         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
16053         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
16054         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
16055         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
16056         value, $ac_cv_search_crypt, if it's "none required".
16057         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
16058         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
16059         not gl_FUNC_GETLOADAVG.
16060         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
16061         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
16062
16063 2004-01-15  Jim Meyering  <jim@meyering.net>
16064
16065         Merge from coreutils.
16066
16067         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
16068         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
16069         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
16070
16071         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
16072         optional configure-time default.
16073
16074         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16075
16076         * lib/xreadlink.c (xreadlink): Correct outdated comment.
16077
16078 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
16079
16080         Merge from coreutils.
16081
16082         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
16083         value, $ac_cv_search_nanosleep, if it's "none required".
16084
16085 2004-01-14  Paul Eggert  <eggert@twinsun.com>
16086
16087         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
16088         with like-named macro in fnmatch.c.
16089         (EXT): Use an internal constant instead.
16090
16091         Merge fnmatch patches from glibc.
16092         * lib/fnmatch.c (mbsinit): Remove define.
16093         Add libc_hidden_ver (__fnmatch, fnmatch).
16094         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
16095         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
16096
16097 2004-01-14  Karl Berry  <karl@gnu.org>
16098
16099         * config/install-sh: update from automake.
16100
16101 2004-01-13  Karl Berry  <karl@gnu.org>
16102
16103         * config/install-sh: update from automake.
16104
16105 2004-01-09  Karl Berry  <karl@gnu.org>
16106
16107         * config/install-sh: update from automake.
16108
16109 2004-01-05  Karl Berry  <karl@gnu.org>
16110
16111         * config/config.{sub,guess}: update from config.
16112
16113 2003-12-31  Karl Berry  <karl@gnu.org>
16114
16115         * config/depcomp: update from automake.
16116
16117 2003-12-14  Karl Berry  <karl@gnu.org>
16118
16119         * lib/config.charset: update from gettext-runtime.
16120
16121 2003-12-03  Paul Eggert  <eggert@twinsun.com>
16122
16123         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
16124         Bug reported by Alfred M. Szmidt.
16125
16126 2003-12-03  Bruno Haible  <bruno@clisp.org>
16127
16128         * m4/gettext.m4: Upgrade from gettext-0.13.
16129         * m4/po.m4: Upgrade from gettext-0.13.
16130         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
16131         * m4/intmax.m4: New file, from gettext-0.13.
16132         * m4/printf-posix.m4: New file, from gettext-0.13.
16133
16134 2003-11-29  Karl Berry  <karl@gnu.org>
16135
16136         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
16137
16138 2003-11-25  Paul Eggert  <eggert@twinsun.com>
16139             Bruno Haible  <bruno@clisp.org>
16140
16141         * lib/printf-parse.h: Don't include sys/types.h.
16142         (ARG_NONE): New macro.
16143         (char_directive): Change type of *arg_index fields to size_t.
16144         * lib/printf-parse.c: Don't include sys/types.h.
16145         (SSIZE_MAX): Remove macro.
16146         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
16147         Remove unnecessary overflow check.
16148         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
16149         fields.
16150
16151 2003-11-25  Bruno Haible  <bruno@clisp.org>
16152
16153         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
16154
16155 2003-11-25  Bruno Haible  <bruno@clisp.org>
16156
16157         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
16158         gt_TYPE_SSIZE_T.
16159
16160 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16161
16162         * modules/alloca: Remove dependency on xalloc.
16163
16164 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16165
16166         * lib/alloca.c: Remove dependency on xalloc module.
16167         (xalloc_die): Remove.
16168         (memory_full) [!defined emacs]: New macro.
16169         [!defined emacs]: Don't include xalloc.h.
16170         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
16171         address arithmetic overflows.  Change datatypes a bit to avoid
16172         unnecessary casts.
16173
16174 2003-11-22  Jim Meyering  <jim@meyering.net>
16175
16176         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
16177         s/size/size_t/.
16178
16179 2003-11-21  Karl Berry  <karl@gnu.org>
16180
16181         * config/config.{sub,guess}: update from config.
16182
16183 2003-11-18  Karl Berry  <karl@gnu.org>
16184
16185         * config/config.{sub,guess}: update from config.
16186
16187         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
16188
16189 2003-11-17  Paul Eggert  <eggert@twinsun.com>
16190
16191         * README: Mention that S+T cannot overflow if S is the size of
16192         an existing object and T is sufficiently small.
16193
16194 2003-11-17  Jim Meyering  <jim@meyering.net>
16195
16196         On systems without utime and without a utimes function capable of
16197         dealing with a NULL struct utimbuf* argument, this utime replacement
16198         could -- in unusual circumstances -- leak a file descriptor.
16199         * lib/utime.c: Include <unistd.h> and <errno.h>.
16200         (utime_null): Be sure to close `fd' and to preserve errno.
16201         Reported by Geoff Collyer via Arnold Robbins.
16202
16203 2003-11-17  Bruno Haible  <bruno@clisp.org>
16204
16205         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
16206         (Depends-on): Add xsize.
16207
16208 2003-11-17  Bruno Haible  <bruno@clisp.org>
16209
16210         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
16211
16212 2003-11-17  Bruno Haible  <bruno@clisp.org>
16213
16214         * lib/vasnprintf.c (alloca): Remove fallback definition.
16215         (freea): Remove definition.
16216         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
16217         Reported by Paul Eggert.
16218
16219 2003-11-16  Paul Eggert  <eggert@twinsun.com>
16220             Bruno Haible  <bruno@clisp.org>
16221
16222         Protect against address arithmetic overflow.
16223         * lib/printf-args.h: Include stddef.h.
16224         (arguments): Change type of field 'count' to size_t.
16225         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
16226         'unsigned int' where appropriate.
16227         * lib/printf-parse.h: Include sys/types.h.
16228         (char_directive): Change type of *arg_index fields to ssize_t.
16229         (char_directives): Change type of fields 'count', max_*_length to
16230         size_t.
16231         * lib/printf-parse.c: Include sys/types.h and xsize.h.
16232         (SSIZE_MAX): Define fallback value.
16233         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
16234         instead of 'int' where appropriate. Check a_allocated, d_allocated
16235         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
16236         * lib/vasnprintf.c: Include xsize.h.
16237         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
16238         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
16239         overflow. Avoid wraparound when converting a width or precision from
16240         decimal to binary.
16241
16242 2003-11-16  Bruno Haible  <bruno@clisp.org>
16243
16244         Update from GNU gettext.
16245         * lib/printf-parse.c: Generalize to it can be compiled for wide
16246         strings.
16247         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
16248         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
16249         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
16250         SNPRINTF): New macros.
16251         Don't include <alloca.h> if the file is used inside libintl.
16252         (local_wcslen): New function, for Solaris 2.5.1.
16253         (VASNPRINTF): Use it instead of wcslen.
16254
16255 2003-11-16  Bruno Haible  <bruno@clisp.org>
16256
16257         * lib/xsize.h (xmax): New function.
16258         (xsum, xsum3, xsum4): Declare as "pure" functions.
16259
16260 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16261
16262         * modules/xalloc (Files): Undo latest change, since xalloc.h
16263         no longer needs SIZE_MAX or PTRDIFF_MAX.
16264
16265 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16266
16267         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
16268         gl_PTRDIFF_MAX.
16269
16270 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16271
16272         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
16273         "return", to pacify some unknown compiler.  Problem reported
16274         by Joerg Schilling.
16275
16276 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16277
16278         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
16279         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
16280         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
16281         heuristic is just as accurate as far as we know, and it removes a
16282         dependency on size_max.m4 and ptrdiff_max.m4.
16283
16284 2003-11-11  Bruno Haible  <bruno@clisp.org>
16285
16286         * modules/xsize (Files): Add m4/size_max.m4.
16287         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
16288
16289 2003-11-11  Bruno Haible  <bruno@clisp.org>
16290
16291         * m4/size_max.m4: New file.
16292         * m4/ptrdiff_max.m4: New file.
16293         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
16294         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
16295         (gl_XALLOC): Invoke it.
16296
16297 2003-11-11  Bruno Haible  <bruno@clisp.org>
16298
16299         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
16300         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
16301         defined.
16302
16303 2003-11-10  Paul Eggert  <eggert@twinsun.com>
16304
16305         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
16306         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
16307         rejected some allocations of exactly SIZE_MAX - 2 bytes.
16308         From Bruno Haible.
16309         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
16310         not (size_t) -1, since it's defined here.
16311
16312 2003-11-09  Karl Berry  <karl@gnu.org>
16313
16314         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
16315
16316 2003-11-06  Paul Eggert  <eggert@twinsun.com>
16317
16318         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
16319         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
16320         Reject sizes of exactly SIZE_MAX bytes.
16321         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
16322         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
16323
16324 2003-11-05  Bruno Haible  <bruno@clisp.org>
16325
16326         * lib/xsize.h: Include limits.h, to avoid a possible collision with
16327         SIZE_MAX defined in <limits.h> on Solaris.
16328
16329 2003-11-04  Jim Meyering  <jim@meyering.net>
16330
16331         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
16332         variable names, rather than @VAR@.
16333         * modules/poll: Likewise.
16334
16335 2003-11-04  Bruno Haible  <bruno@clisp.org>
16336
16337         * modules/xsize: New file.
16338         * modules/linebreak: Depend on xsize.
16339         * MODULES.html.sh (func_all_modules): Add xsize.
16340
16341 2003-11-04  Bruno Haible  <bruno@clisp.org>
16342
16343         * m4/xsize.m4: New file.
16344
16345 2003-11-04  Bruno Haible  <bruno@clisp.org>
16346
16347         * lib/xsize.h: New file.
16348         * lib/linebreak.c: Include xsize.h.
16349         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
16350         argument for overflow.
16351         Suggested by Paul Eggert.
16352
16353 2003-11-03  Karl Berry  <karl@gnu.org>
16354
16355         * config/config.{guess,sub}: update from config.
16356
16357 2003-11-03  Jim Meyering  <jim@meyering.net>
16358
16359         * modules/userspec (lib_SOURCES): Add userspec.h.
16360         (Include): Add "userspec.h".
16361         Improve description.
16362
16363 2003-11-03  Jim Meyering  <jim@meyering.net>
16364
16365         * lib/userspec.c: Include "userspec.h".
16366         * lib/userspec.h: New file.
16367
16368 2003-11-03  Bruno Haible  <bruno@clisp.org>
16369
16370         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
16371
16372 2003-11-03  Bruno Haible  <bruno@clisp.org>
16373
16374         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
16375         available, to avoid (extremely rare) race condition.
16376         Suggested by Paul Eggert.
16377
16378 2003-11-02  Karl Berry  <karl@gnu.org>
16379
16380         * config/srclist.txt (vasprintf.c): sync broken, sigh.
16381
16382 2003-10-31  Paul Eggert  <eggert@twinsun.com>
16383
16384         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
16385         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
16386         (read_filesystem_list): Set and use me_type_malloced.
16387         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
16388         whatever the type happens to be), for brevity and consistency.
16389         Check for size calculation overflow on Alphas running OSF/1.
16390
16391 2003-10-31  Jim Meyering  <jim@meyering.net>
16392
16393         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
16394
16395         * lib/linebuffer.c: Include <string.h> for declaration of memset.
16396
16397 2003-10-30  Paul Eggert  <eggert@twinsun.com>
16398             Bruno Haible  <bruno@clisp.org>
16399
16400         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
16401         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
16402
16403 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16404
16405         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
16406         netbsd*-gnu*.  Suggested by Robert Millan.
16407
16408 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16409
16410         * modules/group-member: Depend on stdbool.
16411
16412 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16413
16414         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
16415
16416 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16417
16418         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
16419         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
16420         after the 'gnu' in these cases.  This fixes some bugs in the
16421         previous change, and is based on suggestions by Robert Millan.
16422
16423 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16424
16425         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
16426         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
16427         no longer needed.
16428         * lib/quotearg.c (quotearg_n_options): Use it.
16429         * lib/group-member.c: Include <stdbool.h>.
16430         (free_group_info): Arg is now const *; don't free arg.
16431         (get_group_info): Now returns bool and accepts struct group_info *,
16432         rather than returning a malloc'ed struct group_info *.
16433         All uses changed.  Check for overflow in internal size calculation.
16434
16435         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
16436         rather than xmalloc/xrealloc.
16437         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
16438         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
16439         conformance bug: the old code used a pointer after freeing the
16440         storage that it addressed.
16441         * lib/hash.c (hash_initialize): Simplify the code by using
16442         xalloc_oversized rather than doing it by hand.
16443         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
16444         the buffer preserved.  Use free and xmalloc instead.
16445         * lib/quotearg.c (quotearg_n_options): Likewise.
16446         Use a simpler test for size overflow.  Don't use xalloc_oversized
16447         because unsigned int might be wider than size_t (!); this suggests
16448         that we should switch from unsigned int to size_t for slot numbers.
16449
16450 2003-10-28  Paul Eggert  <eggert@twinsun.com>
16451
16452         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
16453         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
16454         NetBSD kernels.  Requested by Richard Stallman.
16455
16456 2003-10-27  Paul Eggert  <eggert@twinsun.com>
16457
16458         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
16459         to allocate the returned structure.  Do not allocate a subarray,
16460         as x2nrealloc will do that.
16461         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
16462         instead of xnrealloc.
16463         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
16464
16465 2003-10-27  Bruno Haible  <bruno@clisp.org>
16466
16467         * lib/stdbool_.h: Better support for BeOS.
16468
16469 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16470
16471         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
16472         now uses inline.
16473
16474 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16475
16476         * lib/xalloc.h (xalloc_oversized): New static inline function, for
16477         callers that want to do their own size-overflow checking.  Include
16478         <stdbool.h>, since xalloc_oversized returns bool.
16479         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
16480         to use xalloc_oversized.
16481
16482         Add two functions x2realloc, x2nrealloc, for programs that grow
16483         arrays dynamically by doubling their sizes.
16484         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
16485         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
16486         New functions.
16487
16488         Port to C99 semantics for 'inline' of external functions.
16489         Bug reported by Bruno Haible.
16490         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
16491         with the old contents of xnmalloc.
16492         (xnmalloc, xmalloc): Use it.
16493         (xnrealloc_inline): New static inline function,
16494         with the old contents of xnrealloc.
16495         (xnrealloc, xrealloc): Use it.
16496
16497         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
16498         that.
16499
16500 2003-10-26  Karl Berry  <karl@gnu.org>
16501
16502         * config/srclist.txt (COPYING.DOC): no longer available from
16503         /gd/gnuorg; don't know where the ultimate source is.
16504
16505 2003-10-25  Paul Eggert  <eggert@twinsun.com>
16506
16507         Fix several address-calculation bugs in the hash modules,
16508         plus some minor code cleanup.
16509
16510         * lib/hash.h: Include <stdbool.h>, for bool.
16511         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
16512         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
16513         hash_get_n_entries, hash_get_max_bucket_length,
16514         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
16515         hash_rehash): Use size_t rather than unsigned.
16516         * lib/hash.c (struct hash_table, hash_get_n_buckets,
16517         hash_get_n_buckets_used, hash_get_n_entries,
16518         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
16519         hash_get_entries, hash_do_for_each, hash_string, is_prime,
16520         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
16521         Likewise.
16522         (SIZE_MAX): Define if not defined.
16523         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
16524         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
16525         hash_print):
16526         Use const * when possible.
16527         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
16528         (check_tuning): Fix bug: if tuning parameters were very close to
16529         0 or 1, rounding errors could have caused subscript violations.
16530         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
16531         (hash_initialize): Add 'fail:' label
16532         to free table and return NULL, and use it to simplify code.
16533         Use calloc rather than clearing the storage ourself.
16534         (hash_initialize, hash_rehash): Check for arithmetic overflow in
16535         buffer size calculations.
16536         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
16537         Include <stddef.h>, for size_t.
16538         * lib/hash-pjw.c (hash_pjw): Likewise.
16539         Switch to method described by Bruno Haible.
16540         Include <limits.h>, for CHAR_BIT.
16541         (SIZE_BITS): New macro.
16542
16543 2003-10-23  Paul Eggert  <eggert@twinsun.com>
16544
16545         * m4/getline.m4 (AM_FUNC_GETLINE):
16546         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
16547         hosts.  Problem reported by Derek Robert Price in
16548         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
16549         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
16550         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
16551
16552 2003-10-21  Paul Eggert  <eggert@twinsun.com>
16553
16554         * lib/getndelim2.c (getndelim2): When size calculation overflows,
16555         ceiling the allocation at NMAX bytes rather than silently
16556         discarding input bytes before NMAX is reached.  This makes
16557         a difference only if NMAX exceeds SIZE_MAX / 2.
16558
16559         * lib/obstack.c: Merge from glibc.
16560         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
16561         Add libc_hidden_def (_obstack_newchunk).
16562         (_obstack_free) [! defined _LIBC]: Remove.
16563         [defined _LIBC]: Make a strong alias from obstack_free, rather than
16564         a clone of the function body.
16565         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
16566         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
16567
16568         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
16569         glibc.
16570         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
16571         arg to memcpy.
16572
16573         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
16574         (obstack_ptr_grow_fast, obstack_int_grow_fast):
16575         Don't use lvalue casts, as GCC plans to remove support for them
16576         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
16577         was also present in the non-GCC version, indicating that this
16578         code had always been buggy and had never been widely used.
16579         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
16580         Use the fast variant of each macro, rather than copying the
16581         definiens of the fast variant; that way, we'll be more likely to
16582         catch future bugs in the fast variants.
16583
16584 2003-10-20  Bruno Haible  <bruno@clisp.org>
16585
16586         * modules/wait-process: New file.
16587         * MODULES.html.sh (func_all_modules): Add wait-process.
16588
16589 2003-10-20  Bruno Haible  <bruno@clisp.org>
16590
16591         * m4/wait-process.m4: New file.
16592
16593 2003-10-20  Bruno Haible  <bruno@clisp.org>
16594
16595         * lib/wait-process.h: New file, from GNU gettext.
16596         * lib/wait-process.c: New file, from GNU gettext.
16597
16598 2003-10-19  Jim Meyering  <jim@meyering.net>
16599
16600         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
16601         HPUX 10.20.
16602
16603 2003-10-18  Karl Berry  <karl@gnu.org>
16604
16605         * config/config.guess: update from config.
16606
16607 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16608
16609         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
16610         (getgroups): First arg is int, not size_t.
16611         Don't let 'free' mangle errno.
16612
16613 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16614
16615         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
16616
16617 2003-10-16  Karl Berry  <karl@gnu.org>
16618
16619         * config/config.{guess,sub}: update from config.
16620
16621 2003-10-16  Jim Meyering  <jim@meyering.net>
16622
16623         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
16624         memcpy.
16625
16626 2003-10-15  Paul Eggert  <eggert@twinsun.com>
16627
16628         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
16629         (SIZE_MAX): Remove.
16630         (new_exclude, add_exclude_file): Initial size no longer needs to
16631         be a power of 2.
16632         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
16633         our own address arithmetic overflow checking.
16634
16635         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
16636         (fnmatch): Do not alloca more than 2000 wide characters;
16637         instead, use malloc for large buffers.
16638         Check for address arithmetic overflow, and return -1
16639         with errno set to ENOMEM in that case.
16640         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
16641         (NEW_PATTERN): Do not alloca more than 8000 bytes;
16642         instead, return -1.  Check for address arithmetic overflow.
16643
16644 2003-10-14  Paul Eggert  <eggert@twinsun.com>
16645
16646         Handle invalid suffixes and overflow independently, so that
16647         callers can treat them independently as needed.  Fix some bugs in
16648         suffix handling, e.g., "100k@" was not diagnosed as an invalid
16649         suffix for a human-readable blocksize.  The major caller-visible
16650         change is the addition of a new
16651         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
16652         that both overflow and suffix chars were found.
16653
16654         * lib/human.c (humblock): Don't check separately for invalid suffix
16655         char; that is xstrtoumax's job (now that its bug is fixed).
16656         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
16657         INTMAX_MAX]: New macros.
16658         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
16659         TYPE_MAXIMUM): New macros.
16660         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
16661         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
16662         if overflow occurs, as it's what __strtol does and it's more useful
16663         in practice.
16664         (__xstrtol): If __strtol reports some error other than ERANGE,
16665         reflect it to the caller as LONGINT_INVALID.  If it reports
16666         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
16667         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
16668         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
16669         value.
16670         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
16671         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
16672         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
16673         [defined UINTMAX_MAX]: New macros.
16674
16675 2003-10-14  Bruno Haible  <bruno@clisp.org>
16676
16677         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
16678
16679 2003-10-14  Bruno Haible  <bruno@clisp.org>
16680
16681         * m4/sig_atomic_t: New file, from GNU gettext.
16682         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
16683
16684 2003-10-14  Bruno Haible  <bruno@clisp.org>
16685
16686         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
16687         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
16688         Also use volatile where needed.
16689
16690 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16691
16692         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
16693         Change maintainer from Bruno Haible to 'all'.
16694
16695 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16696
16697         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
16698
16699 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16700
16701         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
16702         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
16703         and define in terms of the other primitives.
16704         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
16705         (SIZE_MAX): Define if not already defined.
16706         (array_size_overflow): New function.
16707         (xalloc_die): Abort instead of exiting if 'error' returns.
16708         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
16709         (xmalloc, xrealloc): Use them.
16710         (xcalloc): Check for address arithmetic overflow.
16711         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
16712         a bit faster than strcpy.
16713
16714 2003-10-10  Simon Josefsson  <jas@extundo.com>
16715
16716         * modules/argp (Depends-on): Add restrict and strcase.
16717
16718 2003-10-10  Simon Josefsson  <jas@extundo.com>
16719
16720         * m4/argp.m4: Add AC_C_INLINE.
16721
16722 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16723
16724         Merge getpass from libc, plus a few fixes.
16725
16726         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
16727         Include <stdbool.h>.
16728         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
16729         __fsetlocking to empty.
16730         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
16731         do include <bits/libc-lock.h>.
16732         Do not include <fcntl.h>; not needed.
16733         [_LIBC]: Include <wchar.h>.
16734         (NOTCANCEL_MODE): New macro.
16735         (flockfile, funlockfile) [_LIBC]: New macros.
16736         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
16737         [!_LIBC]: New macros.
16738         (call_fclose): New function.
16739         (getpass): Use it.  Save tty stream separately; this simplifies the
16740         code and makes it more reliable if stdin happens to equal stdout.
16741         Invoke __fsetlocking on tty.
16742         Handle thread cancellation if needed.
16743         Namespace cleanup (use __tcgetattr, __getline).
16744         Use bool for Booleans.
16745         [USE_IN_LIBIO]: Handle wide streams.
16746         [!_LIBC]: Unconditionally do the fseek, since we don't know what
16747         stream might go where.
16748
16749         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
16750         doesn't have to include <stdio.h> before us.
16751         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
16752         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
16753         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
16754         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
16755         if not declared, so that we can use getpass.c code from libc without
16756         rewriting it.
16757         (flockfile, ftrylockfile, funlockfile): New macros.
16758
16759 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16760
16761         * modules/getpass: Depend on stdbool.
16762
16763 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16764
16765         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
16766
16767 2003-10-07  Karl Berry  <karl@gnu.org>
16768
16769         * config/config.{guess,sub}: update from config.
16770
16771 2003-10-06  Jim Meyering  <jim@meyering.net>
16772             Bruno Haible  <bruno@clisp.org>
16773
16774         This lets translators provide better translations for the
16775         "Written by ..." part of --version output.
16776         * lib/version-etc.h: Include stdarg.h.
16777         (version_etc_copyright): Declare as readonly.
16778         (version_etc): Make this function variadic with a NULL-terminated list
16779         of author name strings.
16780         (version_etc_va): New declaration.
16781         * lib/version-etc.c: Include stdarg.h, stdlib.h.
16782         (version_etc_copyright): Declare as readonly.
16783         (version_etc_va): New function. Provide a different translatable string
16784         for each possible number of authors < 10. Abbreviate when there are 10
16785         authors or more.
16786         (version_etc): Make this function variadic. Call version_etc_va.
16787         Suggestion from Gary V. Vaughan.
16788
16789         * lib/long-options.h (parse_long_options): Change prototype: the
16790         authors string is moved to the end and becomes variadic.
16791         * lib/long-options.c: Include stdarg.h.
16792         (parse_long_options): Make this function variadic, too.
16793         Call version_etc_va, not version_etc.
16794
16795 2003-10-06  Bruno Haible  <bruno@clisp.org>
16796
16797         * modules/version-etc-2: Remove file.
16798         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
16799
16800 2003-10-06  Bruno Haible  <bruno@clisp.org>
16801
16802         * modules/fatal-signal: New file.
16803         * MODULES.html.sh (func_all_modules): Add fatal-signal.
16804
16805 2003-10-06  Bruno Haible  <bruno@clisp.org>
16806
16807         * m4/fatal-signal.m4: New file.
16808         * m4/signalblocking.m4: New file, from GNU gettext.
16809
16810 2003-10-06  Bruno Haible  <bruno@clisp.org>
16811
16812         * lib/version-etc-2.h: Remove file.
16813         * lib/version-etc-2.c: Remove file.
16814
16815 2003-10-06  Bruno Haible  <bruno@clisp.org>
16816
16817         * lib/fatal-signal.h: New file, from GNU gettext.
16818         * lib/fatal-signal.c: New file, from GNU gettext.
16819
16820 2003-10-05  Paul Eggert  <eggert@twinsun.com>
16821
16822         * README: Rework advice for preventing empty .o files.
16823         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
16824         not <sys/types.h>.
16825
16826 2003-10-04  Karl Berry  <karl@gnu.org>
16827
16828         * lib/argp*: update from libc.
16829
16830 2003-10-04  Karl Berry  <karl@gnu.org>
16831
16832         * config/config.{guess,sub}: update from config.
16833
16834 2003-10-02  Bruno Haible  <bruno@clisp.org>
16835
16836         * modules/lchown (Include): Add lchown.h.
16837         * modules/time_r (Include): Use "..." syntax.
16838         * modules/xgetdomainname (Include): Add xgetdomainname.h.
16839
16840 2003-10-01  Simon Josefsson  <jas@extundo.com>
16841
16842         * MODULES.html.sh (func_all_modules): Move gethostname from section
16843         'based on' to section 'lacking' POSIX:2001.
16844
16845 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
16846
16847         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
16848         to output mode on the same stream.
16849
16850 2003-09-29  Paul Eggert  <eggert@twinsun.com>
16851
16852         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
16853         Fix arg typo in previous patch.
16854
16855 2003-09-28  Jim Meyering  <jim@meyering.net>
16856
16857         * lib/error.c: Correct cpp indentation.
16858
16859 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16860
16861         * modules/free: New file.
16862
16863 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16864
16865         * m4/free.m4: New file.
16866
16867 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16868
16869         * lib/minmax.h (MIN, MAX)
16870         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
16871         Omit the special code that used __typeof__, since we worry that
16872         it could be more trouble than it's worth.  See:
16873         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
16874         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
16875
16876         * lib/free.c: New file.
16877
16878 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
16879
16880         Trivial fixes to Makefile.am parts of module listings.
16881         * modules/strstr: Append strstr.h to lib_SOURCES.
16882         * modules/strcase: Likewise, for strcase.h.
16883
16884 2003-09-27  Karl Berry  <karl@gnu.org>
16885
16886         * config/mkinstalldirs: update from automake.
16887
16888 2003-09-26  Paul Eggert  <eggert@twinsun.com>
16889
16890         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
16891         (error_tail): Do not loop, reallocating temporary buffer, since
16892         the output cannot contain more wide characters than the input
16893         contains bytes, the size must be big enough already.  This avoids
16894         one potential size overflow calculation.  Check for size overflow
16895         when calculating temporary buffer size.  Free temporary buffer
16896         when done, if it was allocated with malloc; this plugs a memory
16897         leak.  Remove casts from void * to pointers, that are no longer
16898         needed now that we're assuming C89 or better.
16899
16900         Merge error changes from glibc.
16901
16902         * lib/error.c, error.h: Update copyright notice header to match glibc.
16903         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
16904         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
16905         Disable cancellation while printing error.
16906         * lib/error.h: Prepend __ to parameter names.
16907
16908 2003-09-26  Jim Meyering  <jim@meyering.net>
16909
16910         * lib/error.c (error_tail): Move some declarations
16911         into inner scope where the local variables are used.
16912
16913 2003-09-26  Bruno Haible  <bruno@clisp.org>
16914
16915         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
16916         stpncpy().
16917         Don't define stpncpy through config.h; it's now done through stpncpy.h.
16918
16919 2003-09-26  Bruno Haible  <bruno@clisp.org>
16920
16921         * lib/stpncpy.h (gnu_stpncpy): New declaration.
16922         (stpncpy): Define as alias for gnu_stpncpy.
16923         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
16924
16925 2003-09-25  Simon Josefsson  <jas@extundo.com>
16926
16927         * lib/xgetdomainname.h: New file.
16928         * lib/xgetdomainname.c: New file.
16929
16930 2003-09-25  Simon Josefsson  <jas@extundo.com>
16931             Bruno Haible  <bruno@clisp.org>
16932
16933         * modules/getdomainname: New file.
16934         * modules/xgetdomainname: New file.
16935         * MODULES.html.sh (func_all_modules): Add getdomainname,
16936         xgetdomainname.
16937
16938 2003-09-25  Simon Josefsson  <jas@extundo.com>
16939             Bruno Haible  <bruno@clisp.org>
16940
16941         * m4/getdomainname.m4: New file.
16942
16943 2003-09-25  Simon Josefsson  <jas@extundo.com>
16944             Bruno Haible  <bruno@clisp.org>
16945
16946         * lib/getdomainname.h: New file.
16947         * lib/getdomainname.c: New file.
16948
16949 2003-09-25  Karl Berry  <karl@gnu.org>
16950
16951         * lib/argp-fmtstream.c, argp-help.c: update from libc.
16952
16953 2003-09-25  Karl Berry  <karl@gnu.org>
16954
16955         * config/install-sh: update from automake.
16956
16957 2003-09-25  Bruno Haible  <bruno@clisp.org>
16958
16959         * modules/version-etc-2: New file, from modules/version-etc with
16960         modifications.
16961         * MODULES.html.sh (func_all_modules): Add version-etc-2.
16962
16963 2003-09-25  Bruno Haible  <bruno@clisp.org>
16964
16965         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
16966         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
16967
16968 2003-09-24  Simon Josefsson  <jas@extundo.com>
16969
16970         * modules/xgethostname: Add xgethostname.h.
16971
16972 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16973
16974         * lib/linebuffer.c (freebuffer): Don't free the argument, just
16975         the buffer associated with the argument.  Bug reported by
16976         Simon Josefsson.
16977
16978 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16979
16980         * README: Document assumptions that 'int' is at least 32 bits
16981         wide, that integer arithmetic is 2's complement without overflow,
16982         that there are no holes in integer values, that adding sizes of
16983         two nonoverlapping objects can't overflow, and that all-bits-zero
16984         yields scalar zero.  Fix spelling and capitalization typos.
16985
16986 2003-09-19  Karl Berry  <karl@gnu.org>
16987
16988         * lib/argp.h: update from libc.
16989
16990 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16991
16992         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
16993         to avoid spurious warnings like "AC_RUN_IFELSE was called before
16994         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
16995
16996 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16997
16998         * gnulib-tool: Use "test -h", not "test -L", for portability
16999         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
17000         (tags_regexp): Remove, since \| doesn't conform to POSIX.
17001         (sed_extract_prog): Issue s commands one-by-one, rather than
17002         using \| in one s command.
17003
17004 2003-09-16  Paul Eggert  <eggert@twinsun.com>
17005
17006         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
17007         input error, instead of returning NULL the next time we are called
17008         (and therefore losing track of errno).
17009
17010 2003-09-16  Bruno Haible  <bruno@clisp.org>
17011
17012         * gnulib-tool (func_create_testdir): Warn about duplicated
17013         dependencies.
17014
17015 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17016
17017         * modules/argmatch, modules/fatal, modules/obstack,
17018         modules/xalloc, modules/xgethostname: Sort dependencies by
17019         importance, not alphabetically.
17020
17021 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17022
17023         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
17024         fails, so that the caller gets the proper errno.
17025
17026         * lib/readutmp.c (read_utmp): Likewise.
17027         Check for fstat error.  Close stream and free storage
17028         when failing.
17029
17030 2003-09-14  Karl Berry  <karl@gnu.org>
17031
17032         * config/srclist.txt (strdup.c): disable for c89 changes.
17033
17034 2003-09-14  Jim Meyering  <jim@meyering.net>
17035
17036         * lib/getloadavg.c: Correct cpp indentation.
17037         * lib/strdup.c: Likewise.
17038         * lib/vasnprintf.c: Likewise.
17039
17040 2003-09-14  Bruno Haible  <bruno@clisp.org>
17041
17042         * modules/fwriteerror: New file.
17043         * MODULES.html.sh (func_all_modules): Add fwriteerror.
17044
17045 2003-09-14  Bruno Haible  <bruno@clisp.org>
17046
17047         * lib/fwriteerror.h: New file.
17048         * lib/fwriteerror.c: New file.
17049
17050 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17051
17052         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
17053         modules/xgethostname, modules/xalloc: Depend on exit.
17054
17055 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17056
17057         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
17058
17059         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
17060         and AC_MINIX, too, so that their extensions are available.
17061
17062         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
17063         This macro has been superseded by gl_BACKUPFILE.
17064
17065         More patches to assume C89 or better.
17066
17067         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
17068
17069         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
17070         unconditionally.
17071         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
17072         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
17073         Include <string.h>, <stdlib.h> unconditionally.
17074         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
17075         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
17076         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
17077         headers or for string.h.
17078         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
17079         or strtoul.
17080
17081         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
17082         headers.
17083         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
17084         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17085         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
17086         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
17087         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17088         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
17089         memcpy, memset.
17090         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
17091         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
17092         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
17093         strtol.
17094         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
17095         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
17096         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
17097         strtoul.
17098
17099 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17100
17101         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
17102         * lib/obstack.c [!defined _LIBC]: Likewise.
17103         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
17104         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
17105         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
17106
17107         More changes to assume C89 or better.
17108
17109         * lib/error.c (error_tail): Assume vprintf.
17110
17111         * lib/argmatch.c (getenv): Remove decl.
17112         * lib/progreloc.c (get_full_program_name): Define via prototype.
17113         * lib/setenv.c (clearenv): Likewise.
17114         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
17115         needed.
17116         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
17117         (malloc, memcpy): Remove decls.
17118         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
17119         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
17120         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17121         (memcpy): Remove macro.
17122         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
17123         (__P): Remove.  All uses removed.
17124         (PTR): Remove.  All uses changed to void *.
17125         (CHAR_BIT, NULL): Remove.
17126         (spaces, zeros, memset_space, memset_zero)
17127         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
17128         Remove.
17129         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
17130         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
17131         Define with prototype.
17132         Remove now-unnecessary prototype decl.
17133         (extra_args_spec): Assume ANSI C.  All uses changed.
17134         (extra_args_spec_iso): Remove.
17135         (my_strftime, emacs_strftimeu): Define via prototype.
17136         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
17137         unconditionally.
17138         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
17139         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
17140         (strtoul, strtol): Remove decls.
17141         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
17142         LONG_MAX): Remove.
17143         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17144         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
17145         (LOCALE_PARAM_PROTO): New macro.
17146         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
17147         (INTERNAL (strtol), strtol): Define with a prototype.
17148         (PARAMS): Remove.  All uses removed.
17149         * lib/tempname.c: Include <string.h> unconditionally.
17150         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
17151         * lib/xgethostname.c (main): Define with a prototype.
17152         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
17153         Include <stdlib.h> unconditionally.
17154         (calloc, malloc, realloc, free): Remove decls.
17155         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
17156         Include <stdlib.h> unconditionally.  Sort include file names.
17157         (strtod): Remove.
17158         (xstrtod): Define with a prototype.
17159         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
17160         (strtol, strtoul): Remove decls.
17161
17162 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17163
17164         More patches to assume C89 or better.
17165         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
17166         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
17167         string.h, memchr, STDC_HEADERS.
17168
17169 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17170
17171         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
17172         Include <stdlib.h>, <string.h> unconditionally.
17173         Remove now-unnecessary cast to char *.
17174         * lib/strnlen.c: Include <string.h> unconditionally.
17175         * lib/yesno.c (yesno): Define with a prototype.
17176
17177 2003-09-11  Bruno Haible  <bruno@clisp.org>
17178
17179         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
17180
17181 2003-09-10  Jim Meyering  <jim@meyering.net>
17182
17183         * lib/error.c: Correct indentation of cpp directives.
17184
17185 2003-09-10  Bruno Haible  <bruno@clisp.org>
17186
17187         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
17188         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
17189         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
17190         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
17191         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
17192         <stdlib.h> and <string.h> checks.
17193         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
17194         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
17195
17196 2003-09-10  Bruno Haible  <bruno@clisp.org>
17197
17198         * lib/strcspn.c: Include <string.h> unconditionally.
17199         * lib/strpbrk.c: Include <string.h> unconditionally.
17200         * lib/strstr.c: Include <string.h> unconditionally.
17201         * lib/unicodeio.c: Include <string.h> unconditionally.
17202         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
17203         * lib/unsetenv.c: Likewise.
17204         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
17205         * lib/yesno.c: Include <stdlib.h> unconditionally.
17206         (rpmatch): Add prototype.
17207
17208 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17209
17210         More patches to assume C89 or better.
17211         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
17212         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
17213         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
17214         or for string.h.
17215         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
17216         stdlib.h.
17217         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
17218         C headers.
17219         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
17220         string.h.
17221         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
17222         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
17223         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
17224         or for string.h.
17225         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
17226         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
17227         C headers.
17228         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
17229         memcpy.
17230         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
17231         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
17232         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
17233         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
17234         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
17235         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
17236         string.h, free.
17237         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
17238         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
17239         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
17240         C headers, or for string.h.
17241         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
17242         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
17243         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
17244         headers, memory.h, stdlib.h, string.h, strings.h.
17245         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
17246         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
17247         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
17248         strchr.
17249         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
17250         headers, memory.h, string.h.
17251         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
17252         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
17253         free.
17254         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
17255         headers.
17256         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
17257         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
17258         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
17259         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
17260         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
17261
17262 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17263
17264         More K&R removal.
17265
17266         * lib/acosl.c (main): Use a prototype.
17267         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
17268         tanl.c: Likewise.
17269
17270         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
17271
17272         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
17273         (getopt, etopt_long, getopt_long_only, _getopt_internal)
17274         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
17275         with a prototype.
17276         * lib/getopt.c (const): Remove macro.
17277         Include <string.h> unconditionally.
17278         (my_index): Remove; all uses changed to strchr.
17279         (strlen): Remove decl.
17280         (exchange): Remove forward decl; no longer needed.
17281         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
17282         Define with prototype.
17283         * lib/getopt1.c (const): Remove macro.
17284         (getopt_long, getopt_long_only, main): Define with prototype.
17285
17286         * lib/getugroups.c: Include <string.h> unconditionally.
17287
17288         * lib/getusershell.c: Include <stdlib.h> unconditionally.
17289         (getusershell, setusershell, endusershell, readname, main):
17290         Define with prototypes.
17291
17292         * lib/group-member.c: Include group-member.h first.
17293         Include <stdlib.h> unconditionally.
17294
17295         * lib/hard-locale.c: Include hard-locale.h first.
17296         Include <stdlib.h>, <string.h> unconditionally.
17297
17298         * lib/hash.c (free, malloc): Remove decls.
17299         Include <stdlib.h> unconditionally.
17300
17301         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
17302         (getenv): Do not declare.
17303
17304         * lib/idcache.c: Include <string.h> unconditionally.
17305
17306         * lib/long-options.c: Include long-options.h first, to test interface.
17307         Include <stdlib.h> unconditionally.
17308
17309         * lib/makepath.c: Include makepath.h first, to test interface.
17310         Include <stdlib.h> and <string.h> unconditionally.
17311
17312         * lib/linebuffer.c: Include <stdlib.h>.
17313         (free): Remove decl.
17314
17315         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
17316         stddef.h. rpl_malloc returns void *, not char *.
17317         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
17318         prototype.
17319
17320         * lib/md5.h: Include <limits.h> unconditionally.
17321         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
17322         (__P): Remove; all uses removed.
17323         * lib/md5.c: Include "md5.h" first.
17324         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
17325         md5_buffer, md5_process_bytes, md5_process_block):
17326         Define with prototypes.
17327         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
17328         * lib/sha.c: Include "sha.h" first.
17329         Include <stdlib.h>, <string.h> unconditionally.
17330
17331         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
17332         * lib/memcmp.c (__ptr_t): Likewise.
17333         * lib/memrchr.c (__ptr_t): Likewise.
17334         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
17335         Include <string.h> unconditionally.
17336         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
17337         * lib/memchr.c: Include <stdlib.h> unconditionally.
17338         * lib/memchr.c (LONG_MAX): Remove.
17339         * lib/memrchr.c (LONG_MAX): Likewise.
17340         * lib/memchr.c (__memchr): Define via a prototype.
17341         * lib/memrchr.c (__memrchr): Likewise.
17342         * lib/memcmp.c (__P): Remove, and remove all uses.
17343         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
17344         Remove forward decls; no longer needed.
17345         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
17346         Use types required by C89 in prototype.
17347
17348         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
17349         * lib/savedir.c: Likewise.
17350         * lib/mkdir.c (free): Remove decl.
17351         * lib/rmdir.c (rmdir): Define with a prototype.
17352         * lib/savedir.c: Include savedir.h first, to test interface.
17353
17354         * lib/mktime.c (STDC_HEADERS): Remove.
17355         Include <stdlib.h>, <string.h> unconditionally.
17356
17357         * lib/modechange.c: Include <stdlib.h> unconditionally.
17358         (malloc): Remove decl.
17359
17360         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
17361         (free): Remove decl.
17362
17363         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
17364         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
17365         (This type really should be intptr_t, but that's a C99ism.)
17366         (_obstack_memcpy): Remove: all uses changed to memcpy.
17367         Include <string.h> unconditionally.
17368         (struct obstack): Assume __STDC__ for types of members
17369         chunkfun, freefun, extra_arg.
17370         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
17371         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
17372         obstack_begin, obstack_specify_allocation,
17373         obstack_specify_allocation_with_arg, obstack_chunkfun,
17374         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
17375         Remove unprototyped decls and the macros that use them.
17376         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
17377         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
17378         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
17379         (defined __STDC__ && __STDC__)]:
17380         Remove nonprototyped code.
17381         Include <stdlib.h> unconditionally.
17382         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
17383         _obstack_allocated_p, _obstack_free, obstack_free,
17384         _obstack_memory_used, print_and_abort):
17385         Define using prototypes.
17386         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
17387         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
17388         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
17389         obstack_next_free, obstack_object_size, obstack_room) [0]:
17390         Remove unused, unprototyped code.
17391
17392         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
17393
17394         * lib/physmem.c (physmem_total, physmem_available, main): Define
17395         with prototypes.
17396
17397         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
17398         (main): Define with a prototype.
17399
17400         * lib/posixver.c (getenv): Remove decl.
17401
17402         * lib/putenv.c (malloc): Returns void *, not char *.
17403         Include <string.h> unconditionally.
17404         (strchr, memcpy, NULL): Do not define.
17405
17406         * lib/readtokens.c: Include readtokens.h first, to test interface.
17407         Include <stdlib.h>, <string.h> unconditionally.
17408         (init_tokenbuffer): Define with a prototype.
17409
17410         * lib/regex.c (PARAMS): Remove.  All uses removed.
17411         All uses of _RE_ARGS removed, too.
17412         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17413         unconditionally.
17414         (bzero): Assume memset exists.
17415         (memcmp, memcpy, NULL): Remove.
17416         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
17417         char, or assignments to local vars of type signed char.
17418         (init_syntax_once, PREFIX(extract_number_and_incr),
17419         PREFIX(print_partial_compiled_pattern),
17420         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
17421         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
17422         PREFIX(regex_grow_registers), PREFIX(regex_compile),
17423         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
17424         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
17425         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
17426         wcs_compile_range, byte_compile_range, truncate_wchar,
17427         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
17428         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
17429         count_mbs_length, wcs_re_match_2_internal,
17430         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
17431         PREFIX(alt_match_null_string_p),
17432         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
17433         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
17434         regfree, PREFIX(extract_number)): Define with prototype.  Remove
17435         now-unnecessary declaration, if any.
17436         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
17437         regcomp, regexec):
17438         Remove now-unnecessary casts among pointer types.
17439         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
17440
17441         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
17442         (free): Remove decl.
17443
17444         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
17445
17446         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
17447         (free): Remove decl.
17448
17449         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
17450         * lib/xgetcwd.c: Likewise.
17451
17452         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
17453         (free): Remove decl.
17454
17455         * lib/strchrnul.c (strchrnul): Define with a prototype.
17456         Fix bug: c_in was not converted to char before searching.
17457
17458         The following changes are not K&R related:
17459
17460         * lib/group-member.h: Include <sys/types.h>, so that this file is
17461         self-contained.
17462         * lib/makepath.h: Likewise.
17463
17464         * lib/getusershell.c (readname, default_index, line_size, readname):
17465         Use size_t, not int, for sizes.
17466         (readname): If the size overflows, report an error instead of
17467         looping forever.
17468
17469 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17470
17471         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
17472         libc.
17473
17474 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17475
17476         * README: New section: portability guidelines.
17477
17478 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17479
17480         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
17481         C89 spec.
17482
17483 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17484
17485         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
17486
17487 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17488
17489         Assume C89 or better; remove K&R cruft.
17490         A few of these changes were first proposed by Derek Robert Price
17491         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
17492
17493         * lib/addext.c: Include <string.h> unconditionally.
17494         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
17495         Don't declare getenv or malloc.
17496
17497         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
17498         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
17499         (NULL): Remove.
17500         (find_stack_direction, alloca): Use prototypes.
17501
17502         * lib/atexit.c (atexit): Define using a prototype.
17503
17504         * lib/basename.c, dirname.c, stripslash.c:
17505         Include <string.h> unconditionally.
17506
17507         * lib/bcopy.c: Include <stddef.h>.
17508         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
17509
17510         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
17511
17512         * lib/error.h (error, error_at_line, error_print_progname)
17513         [! (defined (__STDC__) && __STDC__)]: Remove decls.
17514         * lib/error.c: Include error.h first, to check interface.
17515         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17516         (VA_START): Remove; all uses changeed to va_start.
17517         (exit, strerror): Remove decls.
17518         (error_print_progname): Prototype uncondionally.
17519         Don't include <errno.h>; no longer needed.
17520         (private_strerror): Remove.
17521         (error_tail): Always define.
17522         (error, error_at_line): Assume C89 or better; always use prototypes.
17523         * lib/fatal.c: Include "fatal.h" first, to test interface.
17524         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17525         (VA_START): Remove; all uses changed to va_start.
17526         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
17527         this case.
17528         (exit): Remove decl.
17529         (fatal): Prototype unconditionally.  Assume va_start works.
17530         Abort at end, to pacify gcc.
17531
17532         * lib/euidaccess.c (main): Define with a prototype.
17533
17534         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
17535
17536         * lib/exitfail.c: Include <stdlib.h> unconditionally.
17537
17538         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
17539         prototypes.
17540         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
17541         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
17542         (getenv): Remove decl.
17543         (fnmatch): Define using a prototype.
17544         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
17545         (FCT): Define using a prototype.
17546
17547         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
17548
17549         * lib/gethostname.c: Include <stddef.h>.
17550         (gethostname): Define with prototype.  Length is size_t, not int.
17551
17552 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17553
17554         Assume C89 or better; remove K&R cruft.
17555         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
17556         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
17557         string.h, getenv, malloc.
17558         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
17559         headers.
17560         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
17561         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
17562         do not check for strerror.
17563         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
17564         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
17565         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
17566         do not check for doprnt or vprintf.
17567         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
17568         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
17569
17570 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17571
17572         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
17573         getversion.c should have been removed then, but was accidentally
17574         preserved.
17575
17576         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
17577         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
17578
17579 2003-09-08  Karl Berry  <karl@gnu.org>
17580
17581         * config/config.sub, config.guess, srclistvars.sh: update from savannah
17582                 config, forget about prep.
17583
17584         * config/depcomp, missing: update from automake.
17585
17586 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17587
17588         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
17589         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17590
17591 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17592
17593         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
17594         copy_tm_result.  Bug reported by Simon Josefsson in
17595         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17596
17597 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17598
17599         * m4/time_r.m4: New file.
17600         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
17601         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
17602         is. Check for timegm declaration.
17603         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
17604         Do not check for gmtime_r.
17605         Replace mktime if __mktime_internal does not exist and if mktime
17606         hasn't been replaced already.
17607
17608 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17609
17610         * lib/time_r.c, lib/time_r.h: New files.
17611
17612         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
17613         __localtime_r.
17614         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
17615         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
17616
17617         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
17618         __gmtime_r.
17619         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
17620         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
17621         Include <time_r.h>.
17622
17623         * lib/timegm.c: Switch to glibc implementation, with the following
17624         changes:
17625         [defined HAVE_CONFIG_H]: Include <config.h>.
17626         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
17627         (__mktime_internal) [!defined _LIBC]: New decl.
17628         (__gmtime_r) [!defined _LIBC]: New macro and function.
17629         (timegm): Use a prototype, since gnulib assumes C89.
17630         Do not bother declaring tmp to be const, as it's not really usefu.
17631         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
17632         (timegm): Declare only if HAVE_DECL_TIMEGM.
17633
17634 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17635
17636         * MODULES.html.sh (func_all_modules): Add time_r.
17637         * modules/time_r: New file.
17638         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
17639         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
17640
17641 2003-09-03  Paul Eggert  <eggert@twinsun.com>
17642
17643         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
17644         Bug reported by Lute Kamstra in
17645         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
17646
17647         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
17648         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
17649         course with correspondingly smaller numbers for tomorrow and
17650         yesterday.  From Tadayoshi Funaba.  Originally installed into
17651         sh-utils on 1999-08-07, but the patch got lost (I guess during the
17652         coreutils merge?).
17653
17654 2003-08-31  Simon Josefsson  <jas@extundo.com>
17655
17656         * modules/timegm: New file.
17657         * MODULES.html.sh (func_all_modules): Add timegm.
17658
17659 2003-08-31  Simon Josefsson  <jas@extundo.com>
17660
17661         * m4/timegm.m4: New file.
17662
17663 2003-08-31  Simon Josefsson  <jas@extundo.com>
17664
17665         * lib/timegm.h: New file.
17666         * lib/timegm.c: New file.  Based on
17667         wget-1.8.2/src/http.c:mktime_from_utc.
17668
17669 2003-08-31  Karl Berry  <karl@gnu.org>
17670
17671         * lib/argp.h: update from libc.
17672
17673 2003-08-28  Bruno Haible  <bruno@clisp.org>
17674
17675         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
17676         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
17677         followed by '#define fnmatch fnmatch_posix' gives an error.
17678
17679 2003-08-28  Bruno Haible  <bruno@clisp.org>
17680
17681         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
17682         warning on QNX, which defines O_BINARY to 000000.
17683
17684 2003-08-27  Jim Meyering  <jim@meyering.net>
17685
17686         * m4/mkstemp.m4: Require that the system mkstemp be able to create
17687         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
17688         would fail after 32.  Reported by Danny Levinson.  Details here:
17689         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
17690
17691 2003-08-24  Bruno Haible  <bruno@clisp.org>
17692
17693         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
17694         MSVC7 <stdio.h> is included later.
17695
17696 2003-08-22  Simon Josefsson  <jas@extundo.com>
17697
17698         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
17699
17700 2003-08-20  Karl Berry  <karl@gnu.org>
17701
17702         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
17703
17704 2003-08-20  Bruno Haible  <bruno@clisp.org>
17705
17706         * modules/progname: New file.
17707         * MODULES.html.sh (func_all_modules): Add progname.
17708
17709 2003-08-20  Bruno Haible  <bruno@clisp.org>
17710
17711         * lib/progname.h: New file, from GNU gettext.
17712         * lib/progname.c: New file, from GNU gettext.
17713         * lib/progreloc.c: New file, from GNU gettext.
17714
17715 2003-08-19  Jim Meyering  <jim@meyering.net>
17716
17717         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
17718         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
17719
17720 2003-08-19  Bruno Haible  <bruno@clisp.org>
17721
17722         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
17723         more.
17724
17725 2003-08-19  Bruno Haible  <bruno@clisp.org>
17726
17727         * lib/xstrdup.c: Assume <string.h> exists.
17728
17729 2003-08-18  Paul Eggert  <eggert@twinsun.com>
17730
17731         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
17732         in makefile rules.
17733
17734 2003-08-18  Jim Meyering  <jim@meyering.net>
17735
17736         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
17737         * m4/lib-ld.m4: Likewise.
17738
17739 2003-08-18  Jim Meyering  <jim@meyering.net>
17740
17741         * lib/setenv.h: Indent nested cpp directive.
17742         * lib/vasnprintf.c: Remove trailing blanks.
17743
17744 2003-08-17  Simon Josefsson  <jas@extundo.com>
17745
17746         * modules/xstrndup: New file.
17747         * MODULES.html.sh (func_all_modules): Add xstrndup.
17748
17749 2003-08-17  Simon Josefsson  <jas@extundo.com>
17750
17751         * modules/argp: Fix autoconf macro name. Add more dependencies.
17752
17753 2003-08-17  Simon Josefsson  <jas@extundo.com>
17754
17755         * m4/xstrndup.m4: New file.
17756
17757 2003-08-17  Simon Josefsson  <jas@extundo.com>
17758
17759         * m4/argp.m4: New file.
17760
17761 2003-08-17  Simon Josefsson  <jas@extundo.com>
17762             Bruno Haible  <bruno@clisp.org>
17763
17764         * lib/xstrndup.h: New file.
17765         * lib/xstrndup.c: New file.
17766
17767 2003-08-17  Bruno Haible  <bruno@clisp.org>
17768
17769         * modules/strndup (Files, Include): Add lib/strndup.h.
17770
17771 2003-08-17  Bruno Haible  <bruno@clisp.org>
17772
17773         * modules/euidaccess (Files): Add lib/euidaccess.h.
17774
17775 2003-08-17  Bruno Haible  <bruno@clisp.org>
17776
17777         * lib/strndup.h: New file.
17778
17779 2003-08-17  Bruno Haible  <bruno@clisp.org>
17780
17781         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
17782         like AC_GNU_SOURCE.
17783         * modules/extensions (configure.ac): Comment out the invocation of
17784         gl_USE_SYSTEM_EXTENSIONS.
17785
17786 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17787
17788         Merges from coreutils, etc.
17789         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
17790         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
17791         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
17792         fixing a typo.
17793         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
17794         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
17795
17796 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17797
17798         Document merge from coreutils.
17799         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
17800         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
17801         * modules/utime: Add m4/utimes-null.m4.
17802
17803 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17804
17805         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
17806         space, undoing this 2003-08-12 change:
17807         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17808
17809 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17810
17811         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
17812         strtoul.c from libc, undoing this 2003-08-12 change:
17813         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17814
17815 2003-08-16  Jim Meyering  <jim@meyering.net>
17816
17817         Merges from coreutils.
17818         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
17819         prefix.  Adjust cache variables similarly.  Create 500 rather than
17820         just 300 files, to exercise bug on Darwin6.5, too.
17821         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
17822         $missing_dir.
17823         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
17824         AM_SYS_POSIX_TERMIOS.
17825         Reported by mkc@mathdogs.com.
17826         Also change use of $am_cv_sys_posix_termios
17827         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
17828         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
17829         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
17830         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
17831         in /proc/mounts until it finds one with matching device number.  This
17832         is unnecessary when the FILE argument *is* a mount point.  No stat call
17833         is necessary in that case.  So, disable the statvfs-testing code on
17834         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
17835         as RedHat bug# 84846.
17836         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17837         to 1MB, so as not to render systems with no stack size limit (e.g.,
17838         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17839         Include <unistd.h>.  On some systems,
17840         it is required for the definition of _SC_PAGESIZE.
17841
17842 2003-08-16  Jim Meyering  <jim@meyering.net>
17843
17844         Merge from coreutils.
17845         * lib/xstrtoimax.c: #else #if -> #elif.
17846         * lib/xstrtoumax.c: Likewise.
17847
17848 2003-08-16  Jim Meyering  <jim@meyering.net>
17849
17850         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
17851         * m4/utimes.m4: Removed.
17852         * m4/utimes-null.m4: Renamed from utimes.m4.
17853
17854         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17855         to 1MB, so as not to render systems with no stack size limit (e.g.,
17856         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17857         Include <unistd.h>.  On some systems,
17858         it is required for the definition of _SC_PAGESIZE.
17859
17860 2003-08-16  Jim Meyering  <jim@meyering.net>
17861         and Paul Eggert  <eggert@cs.ucla.edu>
17862
17863         Merges from coreutils, etc.
17864
17865         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
17866         using the latest version from cvs.  This avoids problems with #line
17867         directives using a vendor (Sun) compiler.
17868         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
17869         Don't set GETGROUPS_LIB here; now it's
17870         done via getgroups.m4's wrapper function.
17871         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
17872         rather than just in sh-util/configure.in, so that the
17873         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
17874         same.
17875         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
17876         AC_FUNC_GETLOADAVG where to find getloadavg.c.
17877         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
17878         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
17879         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
17880         Remove code that is now done by the newly-required macros.
17881         Append $(EXEEXT) to DF_PROG.
17882         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
17883         Do not invoke or require the following here,
17884         since prereq.m4 or some gnulib .m4 now does this for us:
17885         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
17886         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
17887         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
17888         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
17889         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
17890         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
17891         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
17892         AC_FUNC_OBSTACK.
17893         Do not replace the following functions, as this is now the job
17894         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
17895         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
17896         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
17897         atexit getpass, strdup, getpagesize.
17898         Replace 'raise'.
17899         Do not check for the following functions, as this is now the job
17900         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
17901         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
17902         setregid.
17903         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
17904         Check for sys/sysctl.h.
17905         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
17906         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
17907         of checking for ssize_t ourselves.
17908
17909         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
17910         Require every macro that gnulib/modules/* suggests for us.
17911         (jm_PREREQ_ADDEXT): New macro.
17912         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
17913         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
17914
17915         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
17916         (gl_PHYSMEM): Use it.
17917         Also check for `table' function.
17918         Check for new headers and functions.
17919         Add check for sys/sysmp.h.
17920         With suggestions from Kaveh Ghazi.
17921         Ignore headers that are present but cannot be compiled.  This
17922         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
17923         C 5.4.
17924
17925 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17926
17927         Document merge from coreutils.
17928         * modules/userspec: Depend on posixver.
17929         * modules/strftime: Depend on tzset.
17930
17931 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17932
17933         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
17934         rather than tab, after '#' in shell-script copyright notices.
17935         Suggested by Bruno Haible.
17936
17937 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17938
17939         * config/srclist-update: Use three spaces, rather than tab, after '#'
17940         in shell-script copyright notices.  Suggested by Bruno Haible.
17941         Remove unnecessary parenthesization in regular expression.
17942
17943 2003-08-15  Jim Meyering  <jim@meyering.net>
17944
17945         Merge from coreutils.
17946         * lib/xgethostname.c: Include <stdlib.h>.
17947         (xghostname): Don't exit for anything other than memory-related
17948         failure; just return NULL.
17949         * lib/userspec.c: Include "posixver.h".
17950         (parse_user_spec): Accept `.' as a separator only
17951         in pre-POSIX-200112 mode.
17952         * lib/strtoimax.c: Use #elif rather than #else #if.
17953         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
17954         Remove function, now that we can rely on a working tzset function.
17955         [!_LIBC]: Ensure that the required autoconf test has been run.
17956         [!defined _NL_CURRENT && HAVE_STRFTIME]:
17957         Use underlying_strftime for %r.
17958         * lib/sha.c: Merge in some clean-up and optimization changes from
17959         glibc.
17960         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
17961         Ensure that it is a multiple of 64.
17962         Rearrange loop exit tests so as to avoid performing an
17963         additional fread after encountering an error or EOF.
17964         * lib/realloc.c: Update copyright date.
17965
17966 2003-08-15  Jim Meyering  <jim@meyering.net>
17967         and Paul Eggert  <eggert@twinsun.com>
17968
17969         Merge from coreutils.
17970         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
17971         member but strut utmpx does not.  Needed for AIX 4.3.3.
17972         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
17973
17974 2003-08-15  Jim Meyering  <jim@meyering.net>
17975         and Paul Eggert  <eggert@cs.ucla.edu>
17976
17977         Merges from coreutils, etc.
17978         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
17979         Require gl_FUNC_TZSET_CLOBBER.
17980         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
17981         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
17982         members.
17983
17984 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17985
17986         Help the merge from coreutils.
17987         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
17988         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
17989         * m4/tzset.m4: Use it too.
17990
17991 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17992
17993         * modules/tzset: New file.
17994
17995 2003-08-14  Jim Meyering  <jim@meyering.net>
17996
17997         Merges from coreutils.
17998         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
17999         variable names, rather than @FNMATCH_H@.
18000         * modules/alloca: Likewise for $(ALLOCA_H).
18001
18002         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
18003         the three copies of the literal target, `fnmatch.h'.
18004         * modules/alloca (alloca.h): Likewise.
18005
18006 2003-08-14  Jim Meyering  <jim@meyering.net>
18007
18008         Merge from coreutils.
18009         * m4/tzset.m4: New file.
18010         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
18011         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
18012         otherwise, AIX 5.1 systems would end up using the latter.
18013         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
18014         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
18015         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
18016         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
18017
18018 2003-08-14  Jim Meyering  <jim@meyering.net>
18019
18020         Merge from coreutils.
18021         * lib/obstack.h: Whitespace changes.
18022         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
18023         and xcalloc return values.
18024         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
18025         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
18026         hang on OSF/1 5.1 for DIR on both local and remote file systems.
18027         Reported by (and fix confirmed by) Nelson H. F. Beebe.
18028         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18029         error from mntctl.
18030         Use mntctl's return value to drive the entry-processing loop, since
18031         we can't rely on the value of the vmt_length member in the last
18032         entry.  On some systems doing so could result in exhausting
18033         virtual memory.  Based in part on a patch from Mike Jetzer.
18034
18035 2003-08-14  Jim Meyering  <jim@meyering.net>
18036         and Paul Eggert  <eggert@twinsun.com>
18037
18038         Merges from coreutils, plus other fixes.
18039         * lib/physmem.c: Merge in portability changes from gcc/libiberty
18040         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
18041         for credits and details.  Thanks to Kaveh Ghazi for helping
18042         to keep these files in sync.
18043         (ARRAY_SIZE): Define it.
18044         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
18045         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
18046         (memcasecmp): Don't assume size_t fits in unsigned int.
18047         Remove casts and duplicate code.
18048         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
18049         (memcpy): Remove definition.
18050         Merge in some clean-up and optimization changes from glibc.
18051         [BLOCKSIZE]: Move definition to top of file.
18052         Ensure that it is a multiple of 64.
18053         Rearrange loop exit tests so as to avoid performing an
18054         additional fread after encountering an error or EOF.
18055         * lib/md5.h (md5_uintptr): Define.
18056         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
18057         return to the initial working directory.  Preserve errno
18058         for caller.
18059         * lib/idcache.c: Include "xalloc.h".
18060         (xmalloc, xrealloc): Remove decls.
18061         (getuser): Remove casts no longer required in C89.
18062         * lib/human.c: Include stdio.h, for sprintf.
18063         * lib/group-member.c: Include "xalloc.h".
18064         (xmalloc, xrealloc): Remove decls.
18065         (get_group_info): Remove casts no longer required in C89.
18066         * lib/getusershell.c (readname): Remove casts no longer required in
18067         C89.
18068         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
18069         * lib/getline.c: Whitespace fix, from coreutils.
18070
18071 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18072
18073         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
18074         Check for isascii.
18075
18076         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18077         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18078         Undo previous (whitespace-only) change.
18079
18080 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18081
18082         * lib/exclude.c: Include <ctype.h>
18083         (IN_CTYPE_DOMAIN): New macro.
18084         (is_space): New fn.
18085         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
18086         and empty lines.
18087
18088         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18089         Undo previous (whitespace-only) change.
18090
18091 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18092
18093         * config/srclist-update: Change update back to the old behavior,
18094         leaving whitespace alone.  Use one 'sed' command rather than a
18095         pipeline.
18096         (fixlicense): Now a variable, not a function.
18097         (remove_trailing_blanks): Remove.
18098         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
18099         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18100         Undo previous (whitespace-only) change.
18101
18102 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18103
18104         Merge from coreutils.
18105         * modules/euidaccess: Add lib_SOURCES, include for new
18106         file euidaccess.h
18107
18108 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18109
18110         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18111         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18112         Normalize leading white space and remove trailing white space.
18113
18114         Merge from coreutils
18115         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
18116
18117         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
18118         0.12.1.  These files are now being upgraded automatically by
18119         ../config/srclist-update.
18120
18121 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18122
18123         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18124         Normalize leading white space and remove trailing white space.
18125         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
18126         notice, as per ../config/srclist-update.
18127
18128         Merge from coreutils.
18129         * lib/euidaccess.h: New file.
18130         * lib/euidaccess.c: Include it.
18131         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
18132         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
18133         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
18134
18135 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18136
18137         * config/srclist-update: Add copyright notice.
18138         (remove_id_lines, remove_trailing_blanks): New constants.
18139         (fixfile): Use them to normalize spacing a bit in copied files.
18140         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18141         Normalize leading white space and remove trailing white space.
18142
18143         * config/texinfo.tex: Sync with texinfo.
18144
18145         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
18146         strtoul.c from libc, to merge coreutils whitespace changes.
18147
18148         * config/srclist.txt: Get the following m4 files from gettext:
18149         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
18150         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
18151         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
18152         wint_t.m4.
18153
18154 2003-08-12  Karl Berry  <karl@gnu.org>
18155
18156         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
18157         been made.
18158
18159 2003-08-11  Paul Eggert  <eggert@twinsun.com>
18160
18161         * modules/gnu-source, m4/gnu-source.m4:
18162         Remove; we're assuming Autoconf 2.54 or later now.
18163         Suggested by Bruno Haible.
18164         * MODULES.html.sh (func_all_modules): Remove gnu-source.
18165
18166 2003-08-11  Bruno Haible  <bruno@clisp.org>
18167
18168         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
18169
18170 2003-08-11  Bruno Haible  <bruno@clisp.org>
18171
18172         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
18173         (vasnprintf): Use it instead of wcslen.
18174
18175 2003-08-11  Bruno Haible  <bruno@clisp.org>
18176
18177         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
18178         value to ensure that _Bool promotes to int. Use #define for _Bool when
18179         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
18180
18181 2003-08-10  Karl Berry  <karl@gnu.org>
18182
18183         * lib/regex.h: update from libc (whitespace fix).
18184
18185 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18186
18187         Merge some files from coreutils.  These changes were
18188         originally made by Jim Meyering.
18189         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
18190         many older Unixes require this.
18191         * lib/alloca.c (alloca): Remove cast to argument of free;
18192         no longer needed in C89.
18193         * lib/alloca_.h, regex.h: Fix white space to match
18194         what GNU indent does.
18195
18196 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18197
18198         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
18199         apparently Emacs's Unicode mode got confused before my 2003-08-05
18200         checkin.
18201
18202 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18203
18204         * m4/extensions.m4: New file.
18205         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
18206         Require gl_USE_SYSTEM_EXTENSIONS.
18207         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
18208         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
18209
18210 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18211
18212         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
18213         * modules/extensions, modules/gnu-source: New files.
18214         * modules/timespec, modules/unlocked-io: Depend on extensions.
18215
18216 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18217
18218         * modules/restrict: New file.
18219         * MODULES.html.sh (func_all_modules): Add restrict.
18220         * modules/regex: Depend on restrict.
18221
18222 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18223
18224         * m4/restrict.m4: New file.
18225         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
18226
18227 2003-08-07  Bruno Haible  <bruno@clisp.org>
18228
18229         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
18230         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
18231
18232 2003-08-07  Bruno Haible  <bruno@clisp.org>
18233
18234         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
18235         makes the module 'getndelim2' compatible with the module 'getline'.
18236
18237 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18238
18239         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
18240         byte with "\201" to avoid glitches when editing that source file
18241         with multi-gnome-terminal.
18242
18243 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18244
18245         * lib/bumpalloc.h: Remove.
18246
18247 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18248
18249         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
18250         * modules/bumpalloc: Remove.
18251
18252 2003-08-04  Paul Eggert  <eggert@twinsun.com>
18253
18254         * lib/getloadavg.c: Change copyright notice and spacing to conform to
18255         GNU coding style.
18256
18257         Merge from coreutils.
18258         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
18259         1. From glibc.
18260         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
18261         from Karl Berry, implemented by Jim Meyering.
18262         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
18263         from Dmitry V. Levin.
18264         Remove anachronistic cast of xrealloc.
18265         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
18266         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
18267         type. Otherwise, it wouldn't compile with at least /bin/cc on
18268         ymp-cray-unicos9.0.2.X.
18269         Combine two mostly-identical uses of alloca into one.
18270         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
18271
18272 2003-08-04  Dave Love  <d.love@dl.ac.uk>
18273
18274         [From Emacs.]
18275
18276         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
18277         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
18278         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
18279         obsolete NLIST_NAME_UNION.
18280         [__GNU__]: Undef BSD and FSCALE.
18281         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
18282
18283 2003-08-03  Paul Eggert  <eggert@twinsun.com>
18284
18285         * lib/stdbool_.h (_Bool): Make it signed char, instead of
18286         an enum type, so that it's guaranteed to promote to int.  See:
18287         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
18288
18289 2003-08-03  Karl Berry  <karl@gnu.org>
18290
18291         * config/depcomp: update from automake.
18292
18293 2003-07-31  Paul Eggert  <eggert@twinsun.com>
18294
18295         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
18296         (strerror): Don't assume that a printable int fits in 14 bytes.
18297
18298 2003-07-31  Bruno Haible  <bruno@clisp.org>
18299
18300         * modules/getpass-gnu: New file.
18301         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
18302
18303 2003-07-31  Bruno Haible  <bruno@clisp.org>
18304
18305         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
18306
18307 2003-07-24  Karl Berry  <karl@gnu.org>
18308
18309         * config/missing: update from automake.
18310
18311 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
18312             Bruno Haible  <bruno@clisp.org>
18313
18314         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
18315         * lib/getline.c (getline, getdelim): Likewise.
18316         Remove _GNU_SOURCE define; now it's defined in config.h through
18317         m4/getline.m4.
18318
18319 2003-07-23  Karl Berry  <karl@gnu.org>
18320
18321         * config/config.sub: update from prep.
18322
18323 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18324
18325         * modules/xalloc (Depends-on): Add exitfail.
18326         * modules/xmemcoll: Likewise.
18327
18328 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18329
18330         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
18331         over-parenthesization in macros.
18332
18333         Sync with coreutils.
18334
18335         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
18336         required by C99.
18337
18338         Use `exit_failure' for xalloc and xmemcoll instead of their own
18339         private exit-failure variables.
18340         * lib/xalloc.h (xalloc_exit_failure): Remove.
18341         * lib/xmalloc.c: Likewise.  Include exitfail.h.
18342         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
18343         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
18344         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
18345         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
18346
18347 2003-07-20  Jim Meyering  <jim@meyering.net>
18348
18349         * modules/closeout (Depends-on): Add exitfail.
18350         Suggestion from Bruno Haible.
18351
18352 2003-07-19  Karl Berry  <karl@gnu.org>
18353
18354         * config/config.sub: update from prep.
18355
18356 2003-07-18  Paul Eggert  <eggert@twinsun.com>
18357
18358         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
18359         Remove.
18360         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
18361         to test that it can stand by itself.  Include "exitfail.h".
18362         Clients should set exit_failure instead.
18363         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
18364
18365 2003-07-18  Bruno Haible  <bruno@clisp.org>
18366
18367         * modules/getndelim2: New file.
18368         * modules/getline: Share files with module getndelim2.
18369         * modules/getnline: Depend on getndelim2 instead of sharing files with
18370         it. Add getnline.c to lib_SOURCES.
18371         * MODULES.html.sh (func_all_modules): Add getndelim2.
18372
18373 2003-07-18  Bruno Haible  <bruno@clisp.org>
18374
18375         * m4/getndelim2.m4: New file.
18376         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
18377         invoke gl_PREREQ_GETNDELIM2.
18378         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
18379         gl_PREREQ_GETNDELIM2.
18380         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
18381         gl_GETNDELIM2.
18382
18383 2003-07-18  Bruno Haible  <bruno@clisp.org>
18384
18385         * lib/getndelim2.h: New file.
18386         * lib/getndelim2.c: Make into a module of its own. Include config.h,
18387         getndelim2.h.
18388         (getndelim2): Make non-static. Change return type to ssize_t.
18389         * lib/getline.h: Change argument names.
18390         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
18391         * lib/getnline.c: Include getndelim2.h.
18392
18393 2003-07-18  Andreas Schwab  <schwab@suse.de>
18394
18395         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
18396
18397 2003-07-17  Karl Berry  <karl@gnu.org>
18398
18399         * config/config.sub: update from prep.
18400
18401 2003-07-17  Bruno Haible  <bruno@clisp.org>
18402
18403         * modules/getnline: New file.
18404         * modules/getline: Add lib/getndelim2.c to source file list.
18405         * MODULES.html.sh (func_all_modules): Add getnline.
18406
18407 2003-07-17  Bruno Haible  <bruno@clisp.org>
18408
18409         * m4/getnline.m4: New file.
18410
18411 2003-07-17  Bruno Haible  <bruno@clisp.org>
18412
18413         * m4/Makefile.am.in: Remove file.
18414         * m4/Makefile.am: Remove file.
18415         * m4/Makefile.in: Remove file.
18416
18417 2003-07-17  Bruno Haible  <bruno@clisp.org>
18418
18419         * lib/getnline.h: New file.
18420         * lib/getnline.c: New file.
18421         * lib/getndelim2.c: New file, extracted from getline.c.
18422         (getndelim2): Renamed from getdelim2, with added nmax argument.
18423         * lib/getline.c: Include getndelim2.c.
18424         (getdelim2): Moved out to getndelim2.c.
18425         (getline, getdelim): Update.
18426
18427 2003-07-17  Bruno Haible  <bruno@clisp.org>
18428
18429         * lib/Makefile.am: Remove file.
18430         * lib/Makefile.in: Remove file.
18431
18432 2003-07-17  Bruno Haible  <bruno@clisp.org>
18433
18434         * configure.in: Remove file.
18435         * Makefile.in: Remove file.
18436
18437 2003-07-17  Bruno Haible  <bruno@clisp.org>
18438
18439         * MODULES.html.sh: Put the </BODY> right before </HTML>.
18440
18441 2003-07-16  Karl Berry  <karl@gnu.org>
18442
18443         * config/srclist-update: was running fixlicense twice, which caused
18444                 texinfo.tex to be nullified for some reason.  Simplify,
18445                 $gplsrc is no longer needed as far as I can see?
18446
18447 2003-07-16  Jim Meyering  <jim@meyering.net>
18448
18449         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
18450
18451 2003-07-15  Paul Eggert  <eggert@twinsun.com>
18452
18453         * config/srclist.txt: Get the following files from gettext-runtime/intl
18454         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
18455         ref-del.sin.  From Bruno Haible.
18456         * config/srclist-update (fixfile): Change grep pattern again, since the
18457         previous fix didn't work (there was another trailing $).  Use
18458         '[$]' to escape the $s.
18459
18460 2003-07-15  Karl Berry  <karl@gnu.org>
18461
18462         * lib/vasnprintf.c: update from gettext.
18463
18464 2003-07-15  Karl Berry  <karl@gnu.org>
18465
18466         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
18467         gets expanded when surrounded by '$'.
18468
18469 2003-07-15  Jim Meyering  <jim@meyering.net>
18470
18471         * modules/save-cwd: Don't depend on error.  From Derek Price.
18472
18473 2003-07-15  Jim Meyering  <jim@meyering.net>
18474
18475         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
18476
18477 2003-07-14  Simon Josefsson  <jas@extundo.com>
18478
18479         * modules/mempcpy: New file.
18480         * MODULES.html.sh (func_all_modules): Add mempcpy.
18481
18482 2003-07-14  Simon Josefsson  <jas@extundo.com>
18483
18484         * m4/mempcpy.m4: New file.
18485
18486 2003-07-14  Simon Josefsson  <jas@extundo.com>
18487
18488         * lib/mempcpy.h: New file.
18489         * lib/mempcpy.c: New file.
18490
18491 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18492
18493         * modules/getdate, modules/posixtm: Depend on mktime.
18494
18495 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18496
18497         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
18498         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
18499         unicodeio.c, unicodeio.h, unlocked-io.h:
18500         Switch from LGPL to GPL.
18501
18502 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18503
18504         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
18505         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
18506         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
18507         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
18508         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
18509         updated automatically by ../config/srclist-update.  This changes
18510         their license from LPGL to GPL.
18511
18512 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18513
18514         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
18515         assumed to refer to the root of the most recent stable gettext version.
18516         * config/srclistvars.sh: Add defaults for eggert.
18517         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
18518         Match "This program" as well as "The program".  This is needed
18519         for gettext.
18520
18521 2003-07-14  Jim Meyering  <jim@meyering.net>
18522
18523         Don't emit diagnostics.  Let callers do that.
18524         * lib/save-cwd.c: Don't include "error.h".
18525         (save_cwd): Don't call error.  Ensure that errno is valid
18526         when returning nonzero.
18527
18528         * lib/save-cwd.h (restore_cwd): Update prototype.
18529         * lib/save-cwd.c (restore_cwd): Remove two parameters.
18530         Simplify.  Don't call error upon failure.  Let callers do that.
18531         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
18532         when auditing is enabled.  But don't bother updating the #if.
18533
18534 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
18535
18536         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
18537         it breaks C++ compilation.
18538         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
18539
18540 2003-07-10  Simon Josefsson  <jas@extundo.com>
18541
18542         * modules/strchrnul (Makefile.am): Add strchrnul.h.
18543
18544 2003-07-10  Jim Meyering  <jim@meyering.net>
18545
18546         * m4/clock_time.m4: Remove trailing blank.
18547         * m4/intmax_t.m4: Likewise.
18548
18549 2003-07-10  Jim Meyering  <jim@meyering.net>
18550
18551         * lib/vasnprintf.c: Remove trailing blanks.
18552         Make cpp indentation consistent.
18553
18554 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18555
18556         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
18557         posixver.c, strftime.c, strnlen.c, strverscmp.c:
18558         Switch from LGPL to GPL.
18559
18560 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18561
18562         * config/srclist.txt: Sort sublists.  Add
18563         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
18564         that differ from gnulib for one reason or another; we'd like this list
18565         to be smaller but for now let's document what we have.
18566
18567 2003-07-08  Paul Eggert  <eggert@twinsun.com>
18568
18569         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
18570         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
18571         and sweeter "eval x=$x".
18572         * config/srclist.txt: Get lib/argp* from glibc.
18573
18574 2003-07-07  Paul Eggert  <eggert@twinsun.com>
18575
18576         * lib/mktime.c: Fix some boundary cases and remove need for floating
18577         point.
18578
18579         Issue a compile-time diagnostic if time_t is floating point, or if
18580         two's complement arithmetic is not in effect, or if arithmetic
18581         right shift does not propagate the sign.  These assumptions were
18582         all in the original code but they weren't checked.
18583
18584         (TIME_T_MIDPOINT, verify): New macros.
18585         (__isleap): Remove; it has integer overflow problems.
18586         (leapyear): New function, without those problems.
18587         (ydhms_tm_diff): Remove; splitting into two parts.
18588         (ydhms_diff): New function, containing the arithmetic part of
18589         the old ydhms_tm_diff function.  Issue a compile-time
18590         diagnostic if we are not using C99 integer division.
18591         Avoid casts when possible.
18592         (guess_time_tm): New function, containing the checking part of
18593         the old ydhms_tm_diff function.  Return the new value, rather than
18594         the difference between it and the old.  Accept a new argument T
18595         so that *T specifies the old value.  Check for overflow in the result.
18596
18597         (__mktime_internal): Use a time_t offset, not a long int offset.
18598         This undoes the 2003-06-04 change, which is no longer needed now
18599         that we have better overflow checking.
18600         (localtime_offset): Likewise.
18601
18602         (__mktime_internal): Avoid harmful overflow on hosts where time_t
18603         and long are 64-bit but int is only 32-bit.
18604         (ydhms_diff): Use long int to store year1 and yday1.
18605         Issue a compile-time diagnostic if long int is not wide enough.
18606
18607         (__mktime_internal): Use long int to store adjusted year and yday.
18608         Use plain C rather than preprocessor commands, if that doesn't
18609         affect efficiency.
18610         Check for overflow (and try to repair) after each probe
18611         rather than checking only at the very end.  This avoids some bugs
18612         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
18613         does not equal GMT offset at maximum time).
18614         Use integer to check for overflow rather than floating point; this
18615         is more portable to non-IEEE hosts, and is a tad faster.
18616         When we detect that we are oscillating between two values,
18617         don't check whether tm_isdst has the requested value, since
18618         we already know the answer.  When tm_isdst has the wrong value,
18619         use a different heuristic to find the right one, based on the
18620         extreme values actually observed in practice in tz2003a,
18621         rather than the (overly optimistic) "previous 3 calendar quarters".
18622
18623         (not_equal_tm, print_tm, check_result): Use "const T" rather than
18624         "T const" to accommodate glibc style.
18625         (check_result): Use less-confusing report format.  "long" -> "long int.
18626         (main): Likewise.
18627         Don't loop if the iteration overflows time_t.
18628         Allow a negative step in the iteration.
18629
18630 2003-07-06  Karl Berry  <karl@gnu.org>
18631
18632         * config/depcomp: update from automake.
18633         * config/config.sub: update from prep.
18634
18635 2003-07-03  Karl Berry  <karl@gnu.org>
18636
18637         * config/config.guess: update from prep.
18638
18639 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18640
18641         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
18642         xreadlink.c now includes it unconditionally.
18643
18644 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18645
18646         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
18647         having it depend on HAVE_SYS_TYPES_H.
18648
18649 2003-07-01  Bruno Haible  <bruno@clisp.org>
18650
18651         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
18652         <sys/types.h> should be sufficient.
18653         Reported by Paul Eggert.
18654
18655 2003-06-26  Karl Berry  <karl@gnu.org>
18656
18657         * config/depcomp: update from automake.
18658
18659 2003-06-26  Bruno Haible  <bruno@clisp.org>
18660
18661         * modules/human: Depend on module stdbool.
18662
18663 2003-06-25  Bruno Haible  <bruno@clisp.org>
18664
18665         * modules/readlink: New file.
18666         * modules/xreadlink: Depend on it.
18667         * MODULES.html.sh (func_all_modules): Add readlink.
18668
18669 2003-06-25  Bruno Haible  <bruno@clisp.org>
18670
18671         * m4/readlink.m4: New file.
18672
18673 2003-06-25  Bruno Haible  <bruno@clisp.org>
18674
18675         * lib/readlink.c: New file.
18676
18677 2003-06-22  Karl Berry  <karl@gnu.org>
18678
18679         * config/srclist.txt: update mkinstalldirs from automake.
18680         * config/mkinstalldirs: update.
18681
18682 2003-06-22  Bruno Haible  <bruno@clisp.org>
18683
18684         Portability to mingw32.
18685         * m4/ssize_t.m4: New file, from GNU gettext.
18686         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
18687         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
18688
18689 2003-06-22  Bruno Haible  <bruno@clisp.org>
18690
18691         * modules/safe-read: Add m4/ssize_t.m4.
18692         * modules/xreadlink: Add m4/ssize_t.m4.
18693
18694 2003-06-20  Bruno Haible  <bruno@clisp.org>
18695
18696         Assume C89, so PARAMS isn't needed.
18697         * lib/unicodeio.h (PARAMS): Remove.
18698         * lib/unicodeio.c: Don't use PARAMS.
18699
18700 2003-06-18  Karl Berry  <karl@gnu.org>
18701
18702         * config/config.{guess,sub}: update from prep.
18703
18704 2003-06-18  Jim Meyering  <jim@meyering.net>
18705
18706         Merge changes from coreutils.
18707         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
18708         Remove explicit declarations of xmalloc and realloc.
18709         Include xalloc.h.
18710         (read_utmp): Remove anachronistic cast of xmalloc.
18711
18712 2003-06-17  Paul Eggert  <eggert@twinsun.com>
18713
18714         Assume C89, so PARAMS isn't needed.
18715         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
18716         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
18717         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
18718         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
18719         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
18720         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
18721         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
18722         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
18723         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
18724         lib/xstrtod.h, lib/xstrtol.h: Likewise.
18725         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
18726         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
18727         no longer needed. Anyway, config.h should always be included before any
18728         other file.
18729
18730 2003-06-11  Simon Josefsson  <jas@extundo.com>
18731
18732         * modules/sysexits: New file.
18733         * MODULES.html.sh (func_all_modules): Add sysexits.
18734
18735 2003-06-11  Simon Josefsson  <jas@extundo.com>
18736
18737         * lib/sysexit_.h: New file.
18738
18739 2003-06-11  Derek Price  <derek@ximbiot.com>
18740
18741         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
18742         necessary.
18743
18744 2003-06-11  Bruno Haible  <bruno@clisp.org>
18745
18746         * m4/sysexits.m4: New file.
18747
18748 2003-06-10  Simon Josefsson  <jas@extundo.com>
18749
18750         * lib/argp.h: New file, from glibc.
18751         * lib/argp-ba.c: New file, from glibc.
18752         * lib/argp-eexst.c: New file, from glibc.
18753         * lib/argp-fmtstream.c: New file, from glibc.
18754         * lib/argp-fmtstream.h: New file, from glibc.
18755         * lib/argp-fs-xinl.c: New file, from glibc.
18756         * lib/argp-help.c: New file, from glibc.
18757         * lib/argp-namefrob.h: New file, from glibc.
18758         * lib/argp-parse.c: New file, from glibc.
18759         * lib/argp-pv.c: New file, from glibc.
18760         * lib/argp-pvh.c: New file, from glibc.
18761         * lib/argp-xinl.c: New file, from glibc.
18762
18763 2003-06-10  Simon Josefsson  <jas@extundo.com>
18764
18765         * modules/strchrnul: New file.
18766
18767 2003-06-10  Simon Josefsson  <jas@extundo.com>
18768
18769         * modules/argp: New file.
18770
18771 2003-06-10  Simon Josefsson  <jas@extundo.com>
18772
18773         * m4/strchrnul.m4: New file.
18774
18775 2003-06-10  Simon Josefsson  <jas@extundo.com>
18776
18777         * lib/strchrnul.h: New file.
18778         * lib/strchrnul.c: New file.
18779
18780 2003-06-10  Bruno Haible  <bruno@clisp.org>
18781
18782         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
18783
18784 2003-06-07  Karl Berry  <karl@gnu.org>
18785
18786         * config/config.{guess,sub}: update from prep.
18787
18788 2003-06-07  Jim Meyering  <jim@meyering.net>
18789
18790         * modules/strtod: Use $(...) notation, not @...@ for
18791         AC_REPLACE'd variables.
18792         * modules/localcharset: Likewise.
18793
18794 2003-06-07  Jim Meyering  <jim@meyering.net>
18795
18796         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
18797         in place of my name in the copyright comment.
18798         Remove definition and uses of __P.
18799
18800         From coreutils.
18801         * lib/stat.c: Don't declare xmalloc explicitly.
18802         Instead, include "xalloc.h".
18803         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
18804         xrealloc, and xcalloc return values.
18805         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
18806         Improve comment.
18807         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
18808
18809 2003-06-07  Bruno Haible  <bruno@clisp.org>
18810
18811         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
18812         avoid AC_CONFIG_LINKS.
18813         * modules/fnmatch (Makefile.am): Use explicit creation rule for
18814         fnmatch.h, to avoid AC_CONFIG_LINKS.
18815         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
18816
18817 2003-06-07  Bruno Haible  <bruno@clisp.org>
18818
18819         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
18820         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
18821         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18822         directory.
18823         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
18824         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18825         directory.
18826
18827 2003-06-06  Jim Meyering  <jim@meyering.net>
18828
18829         Merge from coreutils.
18830         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
18831         Consolidate declarations and initializations of *_base* locals.
18832
18833         Merge from coreutils.
18834         This avoids a core dump on systems without GNU putenv,
18835         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
18836         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
18837         (unsetenv): New static function, from GNU libc.
18838         (rpl_putenv): Use it.
18839
18840         * lib/modechange.c: Remove trailing blanks.
18841
18842         Merge from coreutils.
18843         * lib/fsusage.c: Remove declaration of statfs.
18844         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
18845
18846         * lib/posixtm.c: Include <stdbool.h> unconditionally.
18847
18848 2003-06-06  Jim Meyering  <jim@meyering.net>
18849
18850         * lib/stdbool_.h: Renamed from stdbool.h.in.
18851
18852 2003-06-06  Jim Meyering  <jim@meyering.net>
18853             Bruno Haible  <bruno@clisp.org>
18854
18855         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
18856         Adjust Makefile.am snippet not to redirect directly to target.
18857         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
18858
18859 2003-06-05  Paul Eggert  <eggert@twinsun.com>
18860
18861         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
18862         mismatch, look in future quarters as well as past.  This fixes a
18863         bug when processing fall-backwards gaps immediately after a long
18864         period of daylight-saving time.
18865
18866         * lib/mktime.c: Assume freestanding C89 or better.
18867         (HAVE_LIMITS_H): Remove.  Assume it's 1.
18868         (__P): Remove; not used.
18869         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
18870         (mktime, not_equal_tm, print_tm, check_result,
18871         main): Use prototypes.  Use const * where appropriate.
18872         (main): Fix typo in testing code that uncovered by above changes.
18873         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
18874
18875 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18876
18877         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
18878         locale.h, localeconv.  This merges changes from coreutils.
18879
18880         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
18881         It can be removed after the next Autoconf is released.
18882         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
18883         needed.
18884
18885 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18886
18887         * lib/mktime.c: Fix Debian bug 177940
18888         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
18889         (localtime_offset): Now long int, not time_t, because we want it
18890         to be guaranteed to be signed.  All uses changed.
18891         (__mktime_internal): If overflow would occur when adding offset,
18892         don't add it.
18893
18894         Merge 'human' changes from coreutils.  Rewrite to support
18895         locale-specific notations like thousands separators.
18896         * lib/human.c: Simplify authorship notice.
18897         Include human.h immediately after config.h.
18898         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
18899         <limits.h>: Do not include, since human.h does.
18900         (SIZE_MAX, UINTMAX_MAX): New macros.
18901         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
18902         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
18903         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
18904         (power_letter): Renamed from suffixes.
18905         (generate_suffix_backwards): Remove.
18906         (adjust_value): Now takes int style (because of human.h changes)
18907         and long double value (for greater precision on some platforms).
18908         (group_number): New function.
18909         (human_readable): Use it.  Use integer options, not enum.
18910         Put the options before the sizes in the arg list.
18911         Support all the new options.
18912         The old human_readable function has been removed;
18913         use inttostr.h instead.
18914         (human_readable, default_block_size, humblock):
18915         Use uintmax_t, not int, for block sizes.
18916         (human_readable_inexact, block_size_types): Remove.
18917         (block_size_opts): New constant.
18918         (human_options): Renamed from human_block_size, with new signature
18919         that allows block sizes up to UINTMAX_MAX.  All callers changed.
18920         * lib/human.h: Add copyright and authorship notice.
18921         Include <limits.h> and <stdbool.h> unconditionally.
18922         (PARAMS): Remove.  All uses removed.
18923         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
18924         (enum human_inexact_style): Remove tag; now a nameless enum.
18925         (human_floor, human_ceiling, human_round_to_even): Now have
18926         values 2, 0, 1 rather than -1, 1, 0.
18927         (human_group_digits, human_suppress_point_zero, human_autoscale,
18928         human_base_1024, human_SI, human_B): New constants.
18929         (human_readable_inexact, human_block_size): Remove.
18930         (human_readable): Size args are now uintmax_t, not int.
18931         (human_options): New decl.
18932
18933         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
18934         unnecessary now that we assume C89 or better.  This change
18935         imported from coreutils.
18936
18937         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
18938         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
18939         in the 2003-05-30 sync from glibc.
18940
18941         .h files should stand alone, but we shouldn't include <sys/types.h>
18942         if we can get away with just <stddef.h>.
18943
18944         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
18945         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
18946         rather than <sys/types.h>, as we merely need size_t.
18947         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
18948         to get size_t.
18949         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
18950         Include <stdio.h>, to get FILE.
18951         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
18952         memcasecmp.h has included <stddef.h> and all we need is size_t.
18953         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
18954         our interface, instead of including <sys/types.h>
18955
18956 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18957
18958         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
18959         now, as glibc mktime is buggy on non-glibc systems.
18960
18961 2003-06-03  Karl Berry  <karl@gnu.org>
18962
18963         * config/config.sub: update from prep.
18964
18965 2003-06-02  Paul Eggert  <eggert@twinsun.com>
18966
18967         [from coreutils]
18968         Fix some minor time-related bugs with POSIX time arguments.
18969         Some valid time stamps were being rejected (notably -1, and
18970         time stamps before 1900 on 64-bit hosts).  And some invalid
18971         time stamps were being accepted, e.g. September 31.
18972
18973         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
18974         that we can return (time_t) -1 successfully.
18975         * lib/posixtm.c: Likewise.
18976         [HAVE_STDBOOL_H]: Include <stdbool.h>.
18977         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
18978         (t): Remove static var.
18979         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
18980         of static var.  All uses changed.
18981         (year): Do not reject years before 1900; they can occur with
18982         64-bit time_t.
18983         (posix_time_parse): Do not check for out-of-range components;
18984         that is now the caller's responsibility, since our checks were
18985         only approximations.
18986         (posixtime): Use mktime to check for out-of-range components,
18987         since it knows them exactly.
18988         If mktime returns (time_t) -1, check whether an error actually occurred
18989         by invoking localtime on -1.
18990         (main) [TEST_POSIXTIME]: Check for input data errors, and report
18991         posixtime failures better.
18992         Improve the test data (in comments only).
18993
18994 2003-06-02  Karl Berry  <karl@gnu.org>
18995
18996         * config/mkinstalldirs (version): new variable.
18997         (--version): new option.
18998         (usage): improve message.
18999
19000 2003-05-30  Karl Berry  <karl@gnu.org>
19001
19002         * lib/mktime.c: update from libc.
19003
19004 2003-05-30  Bruno Haible  <bruno@clisp.org>
19005
19006         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
19007         * config/config.rpath: Upgrade to gettext-0.12.1.
19008
19009 2003-05-30  Bruno Haible  <bruno@clisp.org>
19010
19011         * m4/gettext.m4: Upgrade to gettext-0.12.1.
19012         * m4/nls.m4: New file, from gettext-0.12.1.
19013         * m4/po.m4: New file, from gettext-0.12.1.
19014         * m4/progtest.m4: Upgrade to gettext-0.12.1.
19015
19016 2003-05-30  Bruno Haible  <bruno@clisp.org>
19017
19018         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
19019         * lib/localcharset.h: Likewise.
19020         * lib/localcharset.c: Likewise.
19021
19022 2003-05-29  Karl Berry  <karl@gnu.org>
19023
19024         * config/config.rpath: update from gettext.
19025
19026 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19027
19028         Assume the headers required for C89 freestanding compilers.
19029         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
19030         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
19031         * m4/human.m4 (gl_HUMAN): Likewise.
19032         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
19033         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
19034         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19035         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
19036         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19037         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
19038
19039 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19040
19041         Assume the headers required for C89 freestanding compilers.
19042         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
19043         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
19044         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
19045         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
19046         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
19047         define, since <limits.h> is guaranteed to do that.
19048         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
19049         * lib/exclude.c: Include <stdbool.h> unconditionally.
19050         * lib/tempname.c: Include <stddef.h> unconditionally.
19051         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
19052         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
19053         <stddef.h> does that.
19054         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
19055         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
19056         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
19057         needed.
19058         * lib/xstrtol.c: Likewise.
19059         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
19060         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
19061
19062         * lib/addext.c (addext): Use assignment rather than cast, to avoid
19063         warnings on some platforms.
19064
19065         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19066         arbitrarily.
19067
19068 2003-05-26  Jim Meyering  <jim@meyering.net>
19069
19070         Merge in a change from coreutils:
19071         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
19072         that is guaranteed to be `no'.  Use `no_such_member' to indicate
19073         that condition, rather than `-1' which is slightly misleading.
19074         Change the name of the cache variable to have the gl_ prefix.
19075         Prompted by a patch from Richard Dawe for DJGPP.
19076
19077 2003-05-24  Karl Berry  <karl@gnu.org>
19078
19079         * config/config.guess: update from prep.
19080
19081 2003-05-22  Karl Berry  <karl@gnu.org>
19082
19083         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
19084
19085 2003-05-20  Karl Berry  <karl@gnu.org>
19086
19087         * config/config.guess: update from prep.
19088
19089 2003-05-18  Karl Berry  <karl@gnu.org>
19090
19091         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
19092         might actually be set by the user.
19093
19094         * config/depcomp, install-sh, mdate-sh: update from automake.
19095
19096 2003-05-17  Bruno Haible  <bruno@clisp.org>
19097
19098         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
19099         invalid expansion for AC_EGREP_CPP.
19100         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
19101         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
19102         Suggested by Akim Demaille <akim@epita.fr> in
19103         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
19104
19105 2003-05-12  Jim Meyering  <jim@meyering.net>
19106
19107         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
19108         the space-padded-by-default conversion specifiers, %e, %k, %l.
19109
19110 2003-05-12  Bruno Haible  <bruno@clisp.org>
19111
19112         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
19113         the string is longer than 4 KB.
19114
19115 2003-05-11  Karl Berry  <karl@gnu.org>
19116
19117         * config/config.{guess,sub}: update from prep.
19118
19119 2003-05-09  Bruno Haible  <bruno@clisp.org>
19120
19121         * modules/error: Add m4/strerror_r.m4 to file list.
19122
19123 2003-05-03  Bruno Haible  <bruno@clisp.org>
19124
19125         Upgrade to Unicode-4.0.
19126         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
19127         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
19128         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
19129         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
19130         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
19131         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
19132         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
19133         Change width of U+E0100..U+E01EF from 1 to 0.
19134
19135 2003-04-25  Jim Meyering  <jim@meyering.net>
19136
19137         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
19138         of type size_t, not int.
19139
19140 2003-04-25  Bruno Haible  <bruno@clisp.org>
19141
19142         * lib/copy-file.c: Include <stddef.h>, for size_t.
19143
19144 2003-04-21  Paul Eggert  <eggert@twinsun.com>
19145
19146         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
19147         code which expansion is under static control.  Patch imported from
19148         Akim Demaille's patch to Bison; see
19149         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
19150
19151 2003-04-14  Bruno Haible  <bruno@clisp.org>
19152
19153         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
19154
19155 2003-04-11  Jim Meyering  <jim@meyering.net>
19156
19157         Merge changes from Coreutils.
19158
19159         2003-03-22  Jim Meyering  <jim@meyering.net>
19160
19161         * lib/strftime.c (widen): Cast alloca return value to proper type.
19162
19163         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
19164
19165         From GNU libc.
19166         * lib/strftime.c (my_strftime): Handle very large width
19167         specifications for numeric values correctly.  Improve checks for
19168         overflow.
19169
19170         2003-01-19  Jim Meyering  <jim@meyering.net>
19171
19172         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
19173         definitions.
19174         (nl_get_alt_digit) [! defined my_strftime]: Define.
19175         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
19176         _nl_get_alt_digit and _nl_get_walt_digit.
19177
19178         * lib/strftime.c (my_strftime): Merge in locale-related changes from
19179         libc. These changes have no effect outside of _LIBC.
19180
19181 2003-04-10  Bruno Haible  <bruno@clisp.org>
19182
19183         * modules/findprog: New file.
19184         * MODULES.html.sh (func_all_modules): Add it.
19185
19186 2003-04-10  Bruno Haible  <bruno@clisp.org>
19187
19188         * m4/findprog.m4: New file.
19189         * m4/eaccess.m4: New file.
19190
19191 2003-04-10  Bruno Haible  <bruno@clisp.org>
19192
19193         * lib/findprog.h: New file, from GNU gettext.
19194         * lib/findprog.c: New file, from GNU gettext.
19195
19196 2003-04-05  Jim Meyering  <jim@meyering.net>
19197
19198         Merge changes from Coreutils.
19199
19200         * lib/exclude.h (PARAMS): Remove definition and uses.
19201         * lib/exclude.c: Remove uses of `PARAMS'.
19202
19203         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
19204         Add test-cases for DOS filenames. Declare program_name.
19205         (main): Set up program_name.  Patch by Rich Dawe.
19206
19207         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19208         error from mntctl.
19209         Use mntctl's return value to drive the entry-processing loop, since
19210         we can't rely on the value of the vmt_length member in the last
19211         entry.  On some systems doing so could result in exhausting
19212         virtual memory.  Based in part on a patch from Mike Jetzer.
19213
19214 2003-04-04  Bruno Haible  <bruno@clisp.org>
19215
19216         * modules/linebreak: New file.
19217         * MODULES.html.sh (func_all_modules): Add it.
19218
19219 2003-04-04  Bruno Haible  <bruno@clisp.org>
19220
19221         * m4/linebreak.m4: New file.
19222
19223 2003-04-04  Bruno Haible  <bruno@clisp.org>
19224
19225         * lib/linebreak.h: New file, from GNU gettext.
19226         * lib/linebreak.c: New file, from GNU gettext with slight
19227         modifications.
19228         * lib/lbrkprop.h: New file, from GNU gettext.
19229
19230 2003-04-03  Bruno Haible  <bruno@clisp.org>
19231
19232         * modules/utf8-ucs4: New file.
19233         * modules/utf16-ucs4: New file.
19234         * modules/ucs4-utf8: New file.
19235         * modules/ucs4-utf16: New file.
19236         * MODULES.html.sh (func_all_modules): Add them.
19237
19238 2003-04-03  Bruno Haible  <bruno@clisp.org>
19239
19240         * m4/utf-ucs4.m4: New file.
19241         * m4/ucs4-utf.m4: New file.
19242
19243 2003-04-03  Bruno Haible  <bruno@clisp.org>
19244
19245         * lib/utf8-ucs4.h: New file, from GNU gettext.
19246         * lib/utf16-ucs4.h: New file, from GNU gettext.
19247         * lib/ucs4-utf8.h: New file, from GNU gettext.
19248         * lib/ucs4-utf16.h: New file, from GNU gettext.
19249
19250 2003-04-02  Bruno Haible  <bruno@clisp.org>
19251
19252         * modules/binary-io: New file.
19253         * MODULES.html.sh (func_all_modules): Add it.
19254
19255 2003-04-02  Bruno Haible  <bruno@clisp.org>
19256
19257         * lib/binary-io.h: New file, from GNU gettext.
19258
19259 2003-04-01  Bruno Haible  <bruno@clisp.org>
19260
19261         * modules/pathname: New file.
19262         * MODULES.html.sh (func_all_modules): Add it.
19263
19264 2003-04-01  Bruno Haible  <bruno@clisp.org>
19265
19266         * lib/pathname.h: New file, from GNU gettext.
19267         * lib/concatpath.c: New file, from GNU gettext.
19268
19269 2003-03-30  Bruno Haible  <bruno@clisp.org>
19270
19271         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
19272
19273 2003-03-30  Bruno Haible  <bruno@clisp.org>
19274
19275         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
19276         function chown() doesn't exist.
19277
19278 2003-03-28  Bruno Haible  <bruno@clisp.org>
19279
19280         * modules/copy-file: New file.
19281         * MODULES.html.sh (func_all_modules): Add it.
19282
19283 2003-03-28  Bruno Haible  <bruno@clisp.org>
19284
19285         * m4/copy-file.m4: New file.
19286
19287 2003-03-28  Bruno Haible  <bruno@clisp.org>
19288
19289         * lib/copy-file.h: New file, from GNU gettext.
19290         * lib/copy-file.c: New file, from GNU gettext.
19291
19292 2003-03-18  Jim Meyering  <jim@meyering.net>
19293
19294         * lib/quote.c (quote_n): Fix typo in comment.
19295
19296 2003-03-18  Bruno Haible  <bruno@clisp.org>
19297
19298         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
19299         checking.
19300         * m4/onceonly_2_57.m4: Likewise.
19301
19302 2003-03-17  Bruno Haible  <bruno@clisp.org>
19303
19304         * m4/onceonly.m4: Require autoconf 2.54 or newer.
19305         (m4_quote): Remove macro.
19306         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
19307
19308 2003-03-14  Jim Meyering  <jim@meyering.net>
19309
19310         Merge changes from Coreutils.
19311         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
19312         to be const, in order to avoid warnings.
19313         (obstack_room): Likewise.
19314         (obstack_empty_p): Likewise.
19315
19316 2003-03-14  Bruno Haible  <bruno@clisp.org>
19317
19318         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
19319         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
19320
19321 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19322
19323         Merge changes from Bison.
19324         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
19325         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
19326         when compiling Bison 1.875's `bitset bset = obstack_alloc
19327         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
19328         * lib/hash.c: Include <stdbool.h> unconditionally.
19329
19330 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19331
19332         * m4/onceonly.m4 (m4_quote): New macro.
19333         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
19334         Quote AC_FOREACH variable-expansions properly.
19335
19336 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19337
19338         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
19339
19340 2003-03-09  Paul Eggert  <eggert@twinsun.com>
19341
19342         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
19343         Reported by Bruce Becker; see:
19344         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
19345
19346 2003-03-03  Paul Eggert  <eggert@twinsun.com>
19347             Bruno Haible  <bruno@clisp.org>
19348
19349         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
19350         Reported by John Hughes, see
19351         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
19352
19353 2003-02-20  Bruno Haible  <bruno@clisp.org>
19354
19355         * MODULES.html.sh (func_all_modules): Add poll.
19356
19357 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19358
19359         * modules/poll: New file.
19360
19361 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19362
19363         * lib/poll_.h: New file.
19364         * lib/poll.c: New file.
19365
19366 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19367
19368         * m4/poll.m4: New file.
19369
19370 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19371
19372         * modules/mathl: New file.
19373
19374 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19375
19376         * lib/mathl.h: New file.
19377         * lib/acosl.c: New file.
19378         * lib/asinl.c: New file.
19379         * lib/atanl.c: New file.
19380         * lib/ceill.c: New file.
19381         * lib/cosl.c: New file.
19382         * lib/expl.c: New file.
19383         * lib/floorl.c: New file.
19384         * lib/frexpl.c: New file.
19385         * lib/ldexpl.c: New file.
19386         * lib/logl.c: New file.
19387         * lib/sincosl.c: New file.
19388         * lib/sinl.c: New file.
19389         * lib/sqrtl.c: New file.
19390         * lib/tanl.c: New file.
19391         * lib/trigl.c: New file.
19392         * lib/trigl.h: New file.
19393
19394 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19395
19396         * m4/mathl.m4: New file.
19397
19398 2003-02-18  Bruno Haible  <bruno@clisp.org>
19399
19400         * MODULES.html.sh (func_all_modules): Add mathl.
19401
19402 2003-02-17  Bruno Haible  <bruno@clisp.org>
19403
19404         * modules/mkdtemp: New module.
19405         * MODULES.html.sh (func_all_modules): Add it.
19406
19407 2003-02-17  Bruno Haible  <bruno@clisp.org>
19408
19409         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
19410
19411 2003-02-17  Bruno Haible  <bruno@clisp.org>
19412
19413         * lib/mkdtemp.h: New file, from GNU gettext.
19414         * lib/mkdtemp.c: New file, from GNU gettext.
19415
19416 2003-02-02  Jim Meyering  <jim@meyering.net>
19417
19418         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
19419         e.g. glibc-2.2.93.
19420
19421 2003-01-31  Bruno Haible  <bruno@clisp.org>
19422
19423         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
19424         'rpl_rename'.
19425         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
19426         'rpl_strnlen'.
19427         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
19428         'rpl_strtod'.
19429         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
19430         'rpl_utime'.
19431
19432 2003-01-31  Bruno Haible  <bruno@clisp.org>
19433
19434         * lib/rename.c: #undef rename before defining rpl_rename.
19435         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
19436
19437 2003-01-30  Bruno Haible  <bruno@clisp.org>
19438
19439         * modules/vasnprintf, modules/vasprintf: New modules.
19440         * MODULES.html.sh (func_all_modules): Add them.
19441
19442 2003-01-30  Bruno Haible  <bruno@clisp.org>
19443
19444         * m4/signed.m4: New file, from GNU gettext.
19445         * m4/longdouble.m4: New file, from GNU gettext.
19446         * m4/wchar_t.m4: New file, from GNU gettext.
19447         * m4/wint_t.m4: New file, from GNU gettext.
19448         * m4/vasnprintf.m4: New file.
19449         * m4/vasprintf.m4: New file.
19450
19451 2003-01-30  Bruno Haible  <bruno@clisp.org>
19452
19453         * lib/printf-args.h: New file, from GNU gettext.
19454         * lib/printf-args.c: New file, from GNU gettext.
19455         * lib/printf-parse.h: New file, from GNU gettext.
19456         * lib/printf-parse.c: New file, from GNU gettext.
19457         * lib/vasnprintf.h: New file, from GNU gettext.
19458         * lib/vasnprintf.c: New file, from GNU gettext.
19459         * lib/asnprintf.c: New file, from GNU gettext.
19460         * lib/vasprintf.h: New file, from GNU gettext with modifications.
19461         * lib/vasprintf.c: New file, from GNU gettext.
19462         * lib/asprintf.c: New file, from GNU gettext.
19463
19464 2003-01-29  Bruno Haible  <bruno@clisp.org>
19465
19466         * modules/stpncpy: New module.
19467         * MODULES.html.sh (func_all_modules): Add it.
19468
19469 2003-01-29  Bruno Haible  <bruno@clisp.org>
19470
19471         * m4/stpncpy.m4: New file.
19472
19473 2003-01-29  Bruno Haible  <bruno@clisp.org>
19474
19475         * lib/stpncpy.h: New file, from GNU gettext with modifications.
19476         * lib/stpncpy.c: New file, from GNU gettext with modifications.
19477
19478 2003-01-28  Bruno Haible  <bruno@clisp.org>
19479
19480         * modules/c-ctype: New module.
19481         * MODULES.html.sh (func_all_modules): Add it.
19482
19483 2003-01-28  Bruno Haible  <bruno@clisp.org>
19484
19485         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
19486         Paul Eggert.
19487         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
19488         Paul Eggert.
19489
19490 2003-01-27  Bruno Haible  <bruno@clisp.org>
19491
19492         * modules/xsetenv: New module.
19493         * MODULES.html.sh (func_all_modules): Add it.
19494
19495 2003-01-27  Bruno Haible  <bruno@clisp.org>
19496
19497         * lib/xsetenv.h: New file, from GNU gettext.
19498         * lib/xsetenv.c: New file, from GNU gettext.
19499
19500 2003-01-23  Jim Meyering  <jim@meyering.net>
19501
19502         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
19503         from working on systems without dirfd (at least Irix and OSF1/Tru64).
19504
19505 2003-01-23  Bruno Haible  <bruno@clisp.org>
19506
19507         * modules/minmax: New module.
19508         * MODULES.html.sh (func_all_modules): Add it.
19509
19510 2003-01-23  Bruno Haible  <bruno@clisp.org>
19511
19512         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
19513         Eggert.
19514
19515 2003-01-22  Bruno Haible  <bruno@clisp.org>
19516
19517         * modules/exit: New module.
19518         * MODULES.html.sh (func_all_modules): Add it.
19519
19520 2003-01-22  Bruno Haible  <bruno@clisp.org>
19521
19522         * lib/exit.h: New file, from GNU gettext.
19523
19524 2003-01-19  Bruno Haible  <bruno@clisp.org>
19525
19526         * gnulib-tool: Recognize option --extract-maintainer.
19527         (func_get_maintainer): New function.
19528         * modules/*: Add Maintainer entry.
19529
19530 2003-01-16  Jim Meyering  <jim@meyering.net>
19531
19532         * m4/regex.m4: The `regex' struct is both input and output.
19533         Initialize it before each use.  Patch by Tim Waugh.
19534
19535 2003-01-16  Bruno Haible  <bruno@clisp.org>
19536
19537         * MODULES.html.sh: Add a table of contents. Add the module name as
19538         leftmost column. Add hyperlinks.
19539
19540 2003-01-15  Bruno Haible  <bruno@clisp.org>
19541
19542         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
19543
19544 2003-01-15  Bruno Haible  <bruno@clisp.org>
19545
19546         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
19547         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
19548         suffix.
19549
19550 2003-01-15  Bruno Haible  <bruno@clisp.org>
19551
19552         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
19553
19554 2003-01-15  Bruno Haible  <bruno@clisp.org>
19555
19556         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
19557         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
19558
19559 2003-01-14  Jim Meyering  <jim@meyering.net>
19560
19561         * lib/same.c (same_name): Tweak a comment.
19562
19563 2003-01-14  Bruno Haible  <bruno@clisp.org>
19564
19565         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
19566         when a string comparison is sufficient.
19567
19568 2003-01-14  Bruno Haible  <bruno@clisp.org>
19569
19570         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
19571         'unsigned int'.
19572
19573 2003-01-14  Bruno Haible  <bruno@clisp.org>
19574
19575         * lib/hash-pjw.c: Add comment about low quality of this function.
19576
19577 2003-01-13  Bruno Haible  <bruno@clisp.org>
19578
19579         * modules/stpcpy: Distribute lib/stpcpy.h.
19580         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
19581
19582 2003-01-13  Bruno Haible  <bruno@clisp.org>
19583
19584         * modules/*: Add a description.
19585         * modules/strpbrk: Fix Makefile.am snippet.
19586         * modules/strtoimax: Fix dependencies.
19587         * modules/strtoumax: Likewise.
19588
19589 2003-01-13  Bruno Haible  <bruno@clisp.org>
19590
19591         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
19592         * modules/alloca (Makefile.am): All object files depend on alloca.h.
19593         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
19594
19595 2003-01-13  Bruno Haible  <bruno@clisp.org>
19596
19597         * gnulib-tool (func_create_testdir): Store config/* files in the main
19598         directory.
19599         * config.rpath: Move to ...
19600         * config/config.rpath: ... here.
19601         * modules/gettext: Contains config/config.rpath, not config.rpath.
19602         * modules/iconv: Likewise.
19603
19604 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19605
19606         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19607         to avoid collisions with libcurses and libreadline.
19608
19609         * m4/getstr.m4: Remove.
19610         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
19611
19612 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19613
19614         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19615         to avoid collisions with libcurses and libreadline.
19616
19617         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
19618         * lib/getstr.h, getstr.c: Remove.
19619         * lib/getline.c: Include "getline.h", to check interface.
19620         Move body of old getstr.c here: this defines MIN_CHUNK and
19621         declares getdelim2, which is renamed from getstr.
19622         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
19623
19624         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
19625         All uses changed.
19626         * lib/linebuffer.h: Likewise.
19627         (readline): Remove backward-compatibility macro.
19628
19629 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19630
19631         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19632         to avoid collisions with libcurses and libreadline.
19633         * getstr: Remove.
19634         * MODULES.html.sh: Remove getstr.
19635         * modules/getline: Depend on unlocked-io, not getstr.
19636
19637 2003-01-12  Jim Meyering  <jim@meyering.net>
19638
19639         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
19640
19641 2003-01-10  Bruno Haible  <bruno@clisp.org>
19642
19643         * modules/alloca: Change Makefile.am requirements. Simplify Include
19644         requirements. Add lib/alloca_.h to file list.
19645
19646 2003-01-10  Bruno Haible  <bruno@clisp.org>
19647
19648         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
19649
19650 2003-01-10  Bruno Haible  <bruno@clisp.org>
19651
19652         * lib/alloca_.h: New file.
19653         * lib/getdate.y: Unconditionally include alloca.h.
19654         * lib/makepath.c: Likewise.
19655         * lib/setenv.c: Likewise.
19656         * lib/userspec.c: Likewise.
19657
19658 2003-01-09  Karl Berry  <karl@gnu.org>
19659
19660         * MODULES.html.sh: include `dirname $0` in PATH, to find
19661         gnulib-tool.
19662
19663 2003-01-09  Bruno Haible  <bruno@clisp.org>
19664
19665         * modules/stdbool: Change configure.ac, Makefile.am requirements.
19666         Simplify Include requirements. Add lib/stdbool.h.in to file list.
19667
19668 2003-01-09  Bruno Haible  <bruno@clisp.org>
19669
19670         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
19671
19672 2003-01-09  Bruno Haible  <bruno@clisp.org>
19673
19674         * lib/stdbool.h.in: New file.
19675
19676 2003-01-09  Bruno Haible  <bruno@clisp.org>
19677
19678         * gnulib-tool (func_all_modules): Ignore files ending in ~.
19679         * MODULES.html.sh: Likewise.
19680
19681 2003-01-08  Jim Meyering  <jim@meyering.net>
19682
19683         * lib/full-write.c: Undefine and define-away `const' after inclusion
19684         of errno.h, not before.  Suggestion from Bruno Haible.
19685
19686 2003-01-08  Bruno Haible  <bruno@clisp.org>
19687
19688         * modules/full-read: Depend on full-write.
19689
19690 2003-01-08  Bruno Haible  <bruno@clisp.org>
19691
19692         * lib/safe-read.c: Include specification header first, to ensure its
19693         selfcontainedness.
19694         * lib/full-write.c: Likewise.
19695
19696 2003-01-07  Jim Meyering  <jim@meyering.net>
19697
19698         * lib/full-write.c: Rework so that it may serve to define full_read,
19699         too.
19700         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
19701
19702 2003-01-07  Bruno Haible  <bruno@clisp.org>
19703
19704         * lib/strtoimax.c: Include <stdint.h> as an alternative to
19705         <inttypes.h>.
19706         * lib/xstrtol.h: Likewise.
19707         * lib/xstrtoimax.c: Likewise.
19708         * lib/xstrtoumax.c: Likewise.
19709         * lib/human.h: Likewise.
19710
19711         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
19712         on systems that have <inttypes.h> but not <stdint.h>.
19713
19714 2003-01-07  Bruno Haible  <bruno@clisp.org>
19715
19716         * MODULES.html.sh: Add copyright notice.
19717         (missed_files): Omit CVS directory entries.
19718         (func_module): Make it work with sed-3.02.
19719         * MODULES.txt: Remove file.
19720
19721 2003-01-06  Jim Meyering  <jim@meyering.net>
19722
19723         * lib/version-etc.c: Update year in translatable copyright string.
19724
19725 2003-01-03  Karl Berry  <karl@gnu.org>
19726
19727         * config/config.{guess,sub}: update from prep.
19728
19729 2003-01-02  Karl Berry  <karl@gnu.org>
19730
19731         * doc/COPYING.DOC: belatedly updated to 1.2.
19732
19733 2003-01-01  Karl Berry  <karl@gnu.org>
19734
19735         * gnulib-tool (func_verify_module): report module name $module in
19736         error message, not $1.
19737         * gnulib-tool (create-testdir): don't complain if destdir couldn't
19738         be created, only if it doesn't exist.
19739         * gnulib-tool (last_checkin_date): don't expand the $Date here.
19740
19741 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19742
19743         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
19744
19745 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19746
19747         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
19748         memcmp if strcoll doesn't work.
19749
19750 2002-12-31  Bruno Haible  <bruno@clisp.org>
19751
19752         * lib/utime.c (utime_null): No need to call ftruncate if the file was
19753         nonempty.
19754
19755 2002-12-31  Bruno Haible  <bruno@clisp.org>
19756
19757         * lib/memcoll.c (STRCOLL): New macro.
19758         (memcoll): Use it.
19759
19760 2002-12-31  Bruno Haible  <bruno@clisp.org>
19761
19762         * lib/localcharset.h: New file.
19763         * lib/localcharset.c: Include it.
19764         * lib/unicodeio.c: Likewise.
19765
19766 2002-12-31  Bruno Haible  <bruno@clisp.org>
19767
19768         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
19769         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
19770
19771 2002-12-31  Bruno Haible  <bruno@clisp.org>
19772
19773         * lib/getline.h: Include <stddef.h>, for size_t.
19774
19775         * lib/unicodeio.h: Include <stddef.h>, for size_t.
19776         * lib/unicodeio.c: Don't include <stddef.h>.
19777
19778 2002-12-31  Bruno Haible  <bruno@clisp.org>
19779
19780         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
19781         HAVE_TM_ZONE.
19782
19783 2002-12-24  Karl Berry  <karl@gnu.org>
19784
19785         * config/config.guess: update from prep.
19786
19787 2002-12-24  Bruno Haible  <bruno@clisp.org>
19788
19789         General infrasructure.
19790         * m4/README: Rewritten.
19791         * m4/onceonly.m4: New file.
19792         * m4/onceonly_2_57.m4: New file.
19793
19794         Module atexit.
19795         * m4/atexit.m4: New file.
19796
19797         Module strtod.
19798         * m4/strtod.m4: New file.
19799
19800         Module strtol.
19801         * m4/strtol.m4: New file.
19802
19803         Module strtoul.
19804         * m4/strtoul.m4: New file.
19805
19806         Module memchr.
19807         * m4/memchr.m4: New file.
19808
19809         Module memcmp.
19810         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
19811         (jm_FUNC_MEMCMP): Invoke it.
19812
19813         Module memcpy.
19814         * m4/memcpy.m4: New file.
19815
19816         Module memmove.
19817         * m4/memmove.m4: New file.
19818
19819         Module memset.
19820         * m4/memset.m4: New file.
19821
19822         Module strcspn.
19823         * m4/strcspn.m4: New file.
19824
19825         Module strpbrk.
19826         * m4/strpbrk.m4: New file.
19827
19828         Module strstr.
19829         * m4/strstr.m4: New file.
19830
19831         Module strerror.
19832         * m4/strerror.m4: New file.
19833
19834         Module mktime.
19835         * m4/mktime.m4: Renamed from jm-mktime.m4.
19836         (gl_PREREQ_MKTIME): New macro.
19837         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
19838
19839         Module malloc.
19840         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
19841         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
19842         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
19843
19844         Module realloc.
19845         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
19846         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
19847         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
19848
19849         Module strftime.
19850         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
19851         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
19852         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
19853         gl_TM_GMTOFF.
19854         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
19855
19856         Module xalloc.
19857         * m4/xalloc.m4: New file.
19858
19859         Module alloca.
19860         * m4/alloca.m4: New file.
19861
19862         Module putenv.
19863         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
19864         (jm_FUNC_PUTENV): Invoke it.
19865
19866         Module setenv.
19867         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
19868         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
19869         when invoked twice.
19870         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
19871         gt_FUNC_SETENV.
19872
19873         Module memrchr.
19874         * m4/memrchr.m4: New file.
19875
19876         Module stpcpy.
19877         * m4/stpcpy.m4: New file.
19878
19879         Module strcase.
19880         * m4/strcase.m4: New file.
19881
19882         Module strdup.
19883         * m4/strdup.m4: New file.
19884
19885         Module strnlen.
19886         * m4/strnlen.m4: New file.
19887
19888         Module strndup.
19889         * m4/strndup.m4: New file.
19890
19891         Module xstrtod.
19892         * m4/xstrtod.m4: New file.
19893
19894         Module xstrtol.
19895         * m4/xstrtol.m4: New file.
19896
19897         Module getdate.
19898         * m4/getdate.m4: New file.
19899
19900         Module unlocked-io.
19901         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
19902         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
19903         * m4/jm-glibc-io.m4n: Remove file.
19904
19905         Module long-options.
19906         * m4/long-options.m4: New file.
19907
19908         Module md5.
19909         * m4/md5.m4: New file.
19910
19911         Module sha.
19912         * m4/sha.m4: New file.
19913
19914         Module getstr.
19915         * m4/getstr.m4: New file.
19916
19917         Module getline.
19918         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
19919         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
19920         <sys/types.h>, for size_t. Use the function name gnu_getline, not
19921         simply getline. Infoke gl_PREREQ_GETLINE.
19922
19923         Module obstack.
19924         * m4/obstack.m4: New file.
19925
19926         Module hash.
19927         * m4/hash.m4: New file.
19928
19929         Module readtokens.
19930         * m4/readtokens.m4: New file.
19931
19932         Module strverscmp.
19933         * m4/strverscmp.m4: New file.
19934
19935         Module stdbool.
19936         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
19937         OSF/1.
19938
19939         Module strtoll.
19940         * m4/strtoll.m4: New file.
19941
19942         Module strtoull.
19943         * m4/strtoull.m4: New file.
19944
19945         Module strtoimax.
19946         * m4/strtoimax.m4: New file.
19947
19948         Module strtoumax.
19949         * m4/strtoumax.m4: New file.
19950
19951         Module xstrtoimax.
19952         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
19953         jm_AC_PREREQ_XSTRTOIMAX.
19954         Moved the strtol prerequisites to strtol.m4.
19955         Moved the strtoll prerequisites to strtoll.m4.
19956         Moved the strtoimax prerequisites to strtoimax.m4.
19957
19958         Module xstrtoumax.
19959         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
19960         jm_AC_PREREQ_XSTRTOUMAX.
19961         Moved the strtoul prerequisites to strtoul.m4.
19962         Moved the strtoull prerequisites to strtoull.m4.
19963         Moved the strtoumax prerequisites to strtoumax.m4.
19964
19965         Module chown.
19966         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
19967         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
19968
19969         Module dup2.
19970         * m4/dup2.m4: New file.
19971
19972         Module ftruncate.
19973         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
19974         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
19975
19976         Module getgroups.
19977         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
19978         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
19979
19980         Module gettimeofday.
19981         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
19982         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
19983         gl_PREREQ_GETTIMEOFDAY.
19984
19985         Module mkdir.
19986         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
19987         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
19988
19989         Module mkstemp.
19990         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
19991         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
19992         jm_AC_TYPE_UINTMAX_T.
19993         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
19994
19995         Module stat.
19996         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
19997         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
19998
19999         Module lstat.
20000         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
20001         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
20002
20003         Module timespec.
20004         * m4/timespec.m4 (gl_TIMESPEC): New macro.
20005         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
20006         * m4/st_mtim.m4: Indentation.
20007
20008         Module nanosleep.
20009         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
20010         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
20011         gl_PREREQ_NANOSLEEP.
20012
20013         Module regex.
20014         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
20015         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
20016         (gl_REGEX): New macro.
20017
20018         Module rename.
20019         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
20020         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
20021
20022         Module rmdir.
20023         * m4/rmdir.m4: New file.
20024
20025         Module utime.
20026         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
20027         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
20028         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
20029
20030         Module dirname.
20031         * m4/dirname.m4: New file.
20032
20033         Module getopt.
20034         * m4/getopt.m4: New file.
20035
20036         Module unistd-safer.
20037         * m4/unistd-safer.m4: New file.
20038
20039         Module fnmatch.
20040         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
20041         declaration.
20042         (gl_PREREQ_FNMATCH_EXTRA): New macro.
20043         (gl_FUNC_FNMATCH_POSIX): New macro.
20044         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
20045         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
20046         simply fnmatch.
20047
20048         Module exclude.
20049         * m4/exclude.m4: New file.
20050
20051         Module human.
20052         * m4/human.m4: New file.
20053
20054         Module acl.
20055         * m4/acl.m4: Nop.
20056
20057         Module backupfile.
20058         * m4/backupfile.m4: New file.
20059         * m4/d-ino.m4: Indentation.
20060
20061         Module fsusage.
20062         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
20063         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
20064         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
20065
20066         Module dirfd.
20067         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
20068         requirements.
20069
20070         Module euidaccess.
20071         * m4/euidaccess.m4: New file.
20072
20073         Module file-type.
20074         * m4/file-type.m4: New file.
20075
20076         Module fileblocks.
20077         * m4/fileblocks.m4: New file.
20078
20079         Module filemode.
20080         * m4/filemode.m4: New file.
20081
20082         Module isdir.
20083         * m4/isdir.m4: New file.
20084
20085         Module lchown.
20086         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
20087         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
20088
20089         Module makepath.
20090         * m4/makepath.m4: New file.
20091
20092         Module modechange.
20093         * m4/modechange.m4: New file.
20094
20095         Module mountlist.
20096         * m4/mountlist.m4: New file.
20097         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
20098         Indentation.
20099
20100         Module path-concat.
20101         * m4/path-concat.m4: New file.
20102
20103         Module pathmax.
20104         * m4/pathmax.m4: New file.
20105
20106         Module same.
20107         * m4/same.m4: New file.
20108
20109         Module save-cwd.
20110         * m4/save-cwd.m4: New file.
20111
20112         Module savedir.
20113         * m4/savedir.m4: New file.
20114
20115         Module xgetcwd.
20116         * m4/xgetcwd.m4: New file.
20117         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
20118
20119         Module xreadlink.
20120         * m4/xreadlink.m4: New file.
20121
20122         Module safe-read.
20123         * m4/safe-read.m4: New file.
20124
20125         Module safe-write.
20126         * m4/safe-write.m4: New file.
20127
20128         Module closeout.
20129         * m4/closeout.m4: New file.
20130
20131         Module stdio-safer.
20132         * m4/stdio-safer.m4: New file.
20133
20134         Module getpass.
20135         * m4/getpass.m4: New file.
20136
20137         Module getugroups.
20138         * m4/getugroups.m4: New file.
20139
20140         Module group-member.
20141         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
20142         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
20143
20144         Module idcache.
20145         * m4/idcache.m4: New file.
20146
20147         Module userspec.
20148         * m4/userspec.m4: New file.
20149
20150         Module gettime.
20151         * m4/clock_time.m4: New file.
20152         * m4/gettime.m4: New file.
20153
20154         Module settime.
20155         * m4/settime.m4: New file.
20156
20157         Module posixtm.
20158         * m4/posixtm.m4: New file.
20159
20160         Module gethostname.
20161         * m4/gethostname.m4: New file.
20162
20163         Module canon-host.
20164         * m4/canon-host.m4: New file.
20165
20166         Module gettext.
20167         * m4/codeset.m4: New file, from gettext-0.11.5.
20168         * m4/gettext.m4: New file, from gettext-0.11.5.
20169         * m4/glibc21.m4: New file, from gettext-0.11.5.
20170         * m4/iconv.m4: New file, from gettext-0.11.5.
20171         * m4/intdiv0.m4: New file, from gettext-0.11.5.
20172         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
20173         * m4/inttypes.m4: New file, from gettext-0.11.5.
20174         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
20175         * m4/isc-posix.m4: New file, from gettext-0.11.5.
20176         * m4/lcmessage.m4: New file, from gettext-0.11.5.
20177         * m4/lib-ld.m4: New file, from gettext-0.11.5.
20178         * m4/lib-link.m4: New file, from gettext-0.11.5.
20179         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
20180         * m4/progtest.m4: New file, from gettext-0.11.5.
20181         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
20182         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
20183         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
20184
20185         Module localcharset.
20186         * m4/localcharset.m4: New file.
20187
20188         Module hard-locale.
20189         * m4/hard-locale.m4: New file.
20190
20191         Module mbswidth.
20192         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
20193         onceonly macros.
20194         * m4/mbrtowc.m4: Add comment.
20195
20196         Module memcasecmp.
20197         * m4/memcasecmp.m4: New file.
20198
20199         Module memcoll.
20200         * m4/memcoll.m4: New file.
20201
20202         Module unicodeio.
20203         * m4/unicodeio.m4: New file.
20204
20205         Module rpmatch.
20206         * m4/rpmatch.m4: New file.
20207
20208         Module yesno.
20209         * m4/yesno.m4: New file.
20210
20211         Module exitfail.
20212         * m4/exitfail.m4: New file.
20213
20214         Module c-stack.
20215         * m4/c-stack.m4 (gl_C_STACK): New macro.
20216         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
20217
20218         Module error.
20219         * m4/error.m4 (gl_ERROR): New macro.
20220         (jm_PREREQ_ERROR): Use onceonly macros.
20221
20222         Module fatal.
20223         * m4/fatal.m4: New file.
20224
20225         Module getloadavg.
20226         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
20227         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
20228
20229         Module getpagesize.
20230         * m4/getpagesize.m4: New file.
20231
20232         Module getusershell.
20233         * m4/getusershell.m4: New file.
20234
20235         Module physmem.
20236         * m4/physmem.m4: New file.
20237
20238         Module posixver.
20239         * m4/posixver.m4: New file.
20240
20241         Module quotearg.
20242         * m4/quotearg.m4: New file.
20243
20244         Module quote.
20245         * m4/quote.m4: New file.
20246
20247         Module readutmp.
20248         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
20249
20250         Module sig2str.
20251         * m4/sig2str.m4: New file.
20252
20253         Other.
20254         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
20255         ulonglong.m4.
20256         * m4/intmax_t.m4: New file.
20257         * m4/d-type.m4: Indentation.
20258         * m4/jm-macros.m4: Update.
20259         * m4/prereq.m4 (jm_PREREQ): Update.
20260         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
20261         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
20262         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
20263         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
20264         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
20265         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
20266         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
20267         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
20268         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
20269         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
20270         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
20271         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
20272         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
20273         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
20274         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
20275         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
20276         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
20277         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
20278         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
20279
20280 2002-12-24  Bruno Haible  <bruno@clisp.org>
20281
20282         * MODULES.txt: Update according to m4/ changes.
20283
20284         Module gettext.
20285         * config.rpath: New file, from gettext-0.11.5.
20286
20287         * modules/*: New module descriptions.
20288         * gnulib-tool: New file.
20289         * MODULES.html.sh: New file.
20290
20291 2002-12-21  Karl Berry  <karl@gnu.org>
20292
20293         * doc/fdl.texi: update to version 1.2.
20294
20295 2002-12-19  Karl Berry  <karl@gnu.org>
20296
20297         * config/config.guess: update from prep.
20298
20299 2002-12-18  Bruno Haible  <bruno@clisp.org>
20300
20301         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
20302         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
20303
20304 2002-12-17  Bruno Haible  <bruno@clisp.org>
20305
20306         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
20307         stdlib.h, string.h.
20308
20309 2002-12-17  Bruno Haible  <bruno@clisp.org>
20310
20311         * lib/canon-host.c (strdup): Remove unused declaration.
20312
20313         * lib/fsusage.c: Include full_read.h.
20314         (get_fs_usage): Use full_read instead of safe_read.
20315
20316         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
20317
20318 2002-12-12  Karl Berry  <karl@gnu.org>
20319
20320         * config/config.guess: update from prep.
20321
20322 2002-12-11  Bruno Haible  <bruno@clisp.org>
20323
20324         * m4/setenv.m4: New file, from gettext-0.11.5.
20325
20326 2002-12-11  Bruno Haible  <bruno@clisp.org>
20327
20328         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
20329         not unsetenv().
20330         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
20331         modifications:
20332
20333         2002-12-11  Bruno Haible  <bruno@clisp.org>
20334
20335                 * setenv.c (alloca): Fall back to malloc.
20336                 (freea): New macro.
20337                 (setenv): Use freea() to free memory allocated with alloca().
20338
20339         2002-11-13  Bruno Haible  <bruno@clisp.org>
20340
20341                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
20342                 function declarations.
20343                 * unsetenv.c (unsetenv): Likewise.
20344
20345         2002-03-04  Bruno Haible  <bruno@clisp.org>
20346
20347                 Portability to AIX 4.3.3.
20348                 * unsetenv.c: New file, extracted from setenv.c.
20349                 * setenv.c: Move the unsetenv() function to unsetenv.c.
20350
20351         2001-12-20  Bruno Haible  <bruno@clisp.org>
20352
20353                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
20354                 use malloc instead. For SunOS 4.
20355
20356         2001-12-11  Bruno Haible  <bruno@clisp.org>
20357
20358                 * setenv.c: Declare alloca.
20359                 (compar_fn_t): New typedef.
20360                 (KNOWN_VALUE, STORE_VALUE): Use it.
20361
20362         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
20363         setenv.h.
20364
20365 2002-12-10  Paul Eggert  <eggert@twinsun.com>
20366
20367         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
20368         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
20369         Choose values that are less likely to collide with system fnmatch
20370         options.
20371         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
20372         defined (e.g., a pure POSIX system).
20373         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
20374         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
20375
20376 2002-12-06  Paul Eggert  <eggert@twinsun.com>
20377
20378         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
20379         a pain in practice to deal with generated m4 files.  This change
20380         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
20381
20382         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
20383         and jm-glibc-io.m4, as they are no longer a special case.
20384         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
20385         kludge and the auto-generation stuff.  Check only whether the
20386         functions are declared, not whether they exist, since older hosts
20387         that don't declare the functions can't use the optimization anyway.
20388
20389 2002-12-06  Jim Meyering  <jim@meyering.net>
20390
20391         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
20392
20393         Merge in changes from libc's misc/error.c, in preparation
20394         for the merge of gnulib's changes back into libc.
20395
20396         * lib/error.c (_): Define only if not already defined.
20397         Move definition to follow all #include directives.
20398         Include unlocked-io.h only if !_LIBC.
20399         [_LIBC]: Include <libio/libioP.h>.
20400         [USE_IN_LIBIO]: Include <libio/iolibio.h>
20401         (fflush): Tweak definition to use INTUSE.
20402         (putc): Define.
20403
20404 2002-12-05  Paul Eggert  <eggert@twinsun.com>
20405
20406         * lib/alloca.c [defined emacs]: Include "lisp.h".
20407         (xalloc_die) [defined emacs]: New macro.
20408         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
20409         [! defined emacs]: Include <xalloc.h>.
20410         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
20411         (pointer): Typedef to POINTER_TYPE *.
20412         (malloc): Remove decl; we now always use xmalloc.
20413         (alloca): Use old-style definition, since Emacs needs this.
20414         Check for arithmetic overflow when computing combined size.
20415
20416 2002-12-04  Paul Eggert  <eggert@twinsun.com>
20417
20418         Do not generate unlocked-io.h automatically, since it's easier to
20419         maintain it by hand.
20420
20421         * lib/unlocked-io.h: New file, from GNU diffutils,
20422         but with proper copyright notice and attribution.
20423         * lib/gen-uio: Remove.
20424         * lib/Makefile.am: Add copyright notice.
20425         (libfetish_a_SOURCES): Add unlocked-io.h.
20426         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
20427         (DISTCLEANFILES, io_functions): Remove macros.
20428         (EXTRA_DIST): Remove gen_uio.
20429         (unlocked-io.h): Remove rule.
20430
20431 2002-12-04  Jim Meyering  <jim@meyering.net>
20432
20433         Reflect the fact that stat.c and lstat.c are no longer generated.
20434         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
20435         (DISTCLEANFILES): Likewise.
20436         (EXTRA_DIST): Likewise.
20437         (all_local): Don't depend on stat.c or lstat.c.
20438         (stat.c, lstat.c): Remove rules.
20439         (EXTRA_DIST): Remove xstat.in.
20440
20441         * lib/xstat.in: Remove file.  Contents moved into stat.c.
20442         * lib/stat.c: New file.  Contents mostly from xstat.in.
20443         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
20444         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
20445
20446         * lib/safe-read.c: Rework so that it may serve to define safe_write,
20447         too.
20448         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
20449
20450 2002-12-03  Jim Meyering  <jim@meyering.net>
20451
20452         * lib/safe-read.c, safe-write.c: Change variable names and comments,
20453         but not semantics, to minimize the differences between these two files.
20454         (safe_read): Change comment to mention SAFE_READ_ERROR.
20455
20456         * lib/safe-read.c (IS_EINTR): Define.
20457         (safe_read): Use IS_EINTR in place of in-function cpp directives.
20458
20459 2002-12-02  Jim Meyering  <jim@meyering.net>
20460
20461         * lib/safe-read.c (EINTR): Define.
20462         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
20463         (INT_MAX): Provide fallback.
20464         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
20465
20466         * lib/safe-read.h (SAFE_READ_ERROR): Define.
20467
20468 2002-12-02  Bruno Haible  <bruno@clisp.org>
20469
20470         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
20471         Define, taken from safe-read.c.
20472         (INT_MAX): Provide fallback.
20473         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
20474         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
20475
20476         * lib/safe-read.c (EINTR): Remove definition.
20477         (safe_read): Don't use EINTR if it is absent.
20478
20479 2002-12-01  Jim Meyering  <jim@meyering.net>
20480
20481         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
20482         zero.
20483         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
20484
20485 2002-11-27  Paul Eggert  <eggert@twinsun.com>
20486
20487         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
20488         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
20489         with `if (! (value < limit)) abort ();', for readability.
20490
20491 2002-11-26  Karl Berry  <karl@gnu.org>
20492
20493         * lib/strdup.c: copy from libc again, with jim's ok.
20494         * lib/.cppi-disable: re-add strdup.c
20495
20496 2002-11-25  Karl Berry  <karl@gnu.org>
20497
20498         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
20499         instead of "strtol.c".
20500
20501 2002-11-25  Karl Berry  <karl@gnu.org>
20502
20503         * config/install-sh: update from automake for variable quoting, $0 in
20504         error msgs, etc.
20505
20506         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
20507         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
20508         entry.
20509
20510 2002-11-25  Jim Meyering  <jim@meyering.net>
20511
20512         * lib/mktime.c: Sync from libc, now that it has the latest fix.
20513
20514 2002-11-24  Karl Berry  <karl@gnu.org>
20515
20516         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
20517         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
20518
20519 2002-11-24  Jim Meyering  <jim@meyering.net>
20520
20521         Update from coreutils:
20522
20523         * lib/mktime.c: Merge in changes from libc.
20524
20525         Avoid a link-time failure on some Linux systems.
20526         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
20527         (otherwise).
20528         (__mon_yday): Declare with the STATIC attribute.
20529         (__mktime_internal): Likewise.
20530         Based on a report from Greg Schafer.
20531
20532 2002-11-23  Jim Meyering  <jim@meyering.net>
20533
20534         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
20535         Use `unsigned', not `int', as type of index.
20536
20537         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
20538
20539         * lib/fsusage.c: Remove unneeded parentheses around operands of
20540         `defined'.
20541
20542 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20543
20544         * lib/quotearg.h: Allow multiple inclusion by surrounding with
20545         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
20546         so that we can be included first.
20547         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
20548         * lib/quotearg.c: Include quotearg.h immediately after config.h.
20549         No need to include stddef.h or sys/types.h any more.
20550         Surround local include files with "", not "<>".
20551         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
20552         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
20553         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
20554         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20555         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20556         (ISPRINT): Remove; no longer needed now that we assume C89.
20557
20558         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
20559         Preserve errno.
20560
20561         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
20562         quotearg_char): Use SIZE_MAX rather than
20563         (size_t) -1 when we are talking about "infinity".
20564
20565         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
20566
20567 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20568
20569         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
20570         hint that one should use `if (! x) abort ();' rather than `assert
20571         (x);', and anyway it's one less thing to worry about configuring.
20572         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
20573         hash_rehash, hash_insert): Use abort rather than assert.
20574
20575 2002-11-22  Bruno Haible  <bruno@clisp.org>
20576
20577         * lib/safe-read.h: Assume C89. Add comments.
20578         (safe_read): Change return type to size_t.
20579         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
20580         byte counts > SSIZE_MAX correctly.
20581         * lib/safe-write.h: New file.
20582         * lib/safe-write.c: New file.
20583         * lib/full-read.h: New file.
20584         * lib/full-read.c: New file.
20585         * lib/full-write.h: Assume C89. Add comments.
20586         * lib/full-write.c: Include safe-write.h.
20587         (full_write): Rewritten to use safe_write.
20588         Suggested by Jim Meyering and Paul Eggert.
20589
20590 2002-11-21  Jim Meyering  <jim@meyering.net>
20591
20592         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
20593
20594         Merge in changes from the coreutils.
20595
20596         2002-09-25  Paul Eggert  <eggert@twinsun.com>
20597         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
20598         <stdint.h>.
20599         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
20600         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
20601         int.  Work more efficiently if X is the same width as uintmax_t.
20602         Do not compare X to -1, to avoid bogus compiler warning.
20603         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
20604         Don't assume that f_frsize and f_bsize are the same type.
20605
20606         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
20607         warning on FreeBSD.
20608
20609         * lib/makepath.c (make_path): Restore umask *before* creating the final
20610         component.
20611         (make_path): Minor reformatting.
20612
20613         * lib/xmalloc.c: Adjust to work with new autoconf macros,
20614         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
20615         HAVE_MALLOC/HAVE_REALLOC.
20616
20617         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
20618         dummy ones.  At least on GNU/Linux systems, `auto' means something
20619         else.
20620         From Michael Stone.
20621
20622 2002-11-21  Bruno Haible  <bruno@clisp.org>
20623
20624         Remove case insensitive option matching.
20625         * lib/argmatch.h (argcasematch): Remove declaration.
20626         (ARGCASEMATCH): Remove macro.
20627         (__xargmatch_internal): Remove case_sensitive argument.
20628         (XARGMATCH): Update.
20629         (XARGCASEMATCH): Remove macro.
20630         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
20631         case_sensitive argument.
20632         (argcasematch): Remove function.
20633         (__xargmatch_internal): Remove case_sensitive argument.
20634         (main): Use XARGMATCH instead of XARGCASEMATCH.
20635
20636         * lib/xmalloc.c: Change compile-time error message. Add comment about
20637         required autoconf version.
20638
20639 2002-11-20  Paul Eggert  <eggert@twinsun.com>
20640
20641         Merge argmatch cleanups from Bison.  Assume C89.
20642
20643         * lib/argmatch.c: Include config.h here, not in argmatch.h.
20644         Include stdlib.h, for EXIT_FAILURE.
20645         Always include <string.h>, since we assume C89.
20646         (EXIT_FAILURE): Remove pre-C89 bug workaround.
20647         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
20648         Include <stddef.h> instead, since it's all we need for size_t.
20649         (PARAMS): Remove.  All uses removed.
20650         (ARRAY_CARDINALITY): Do not bother to #undef.
20651         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
20652         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20653         Remove unnecessary parentheses.
20654         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20655         Insert necessary parentheses.
20656         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
20657         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
20658
20659 2002-11-19  Bruno Haible  <bruno@clisp.org>
20660
20661         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
20662         * lib/mbswidth.h: Include <stddef.h>, for size_t.
20663
20664         * lib/mbswidth.h (PARAMS): Remove macro.
20665         (mbswidth, mbsnwidth): Use ANSI C function declarations.
20666         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
20667
20668         * lib/gcd.h (PARAMS): Remove macro.
20669         (gcd): Use ANSI C function declarations.
20670         * lib/gcd.c (gcd): Likewise.
20671
20672 2002-11-15  Bruno Haible  <bruno@clisp.org>
20673
20674         * lib/strcspn.c: Include <stddef.h>.
20675         (strcspn): Use ANSI C function declaration. Change return type to
20676         size_t. Use NULL.
20677         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
20678         (strpbrk): Use NULL.
20679         * lib/strpbrk.h (PARAMS): Remove macro.
20680         (strpbrk): Use ANSI C function declaration.
20681         * lib/strstr.c: Don't include <sys/types.h>.
20682         * lib/strstr.h (PARAMS): Remove macro.
20683         (strstr): Use ANSI C function declarations.
20684
20685 2002-11-14  Karl Berry  <karl@gnu.org>
20686
20687         * config/mkinstalldirs: `do' on separate line, instead of
20688         `for var; do'.
20689
20690 2002-11-06  Bruno Haible  <bruno@clisp.org>
20691
20692         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
20693         * lib/gcd.c (gcd): Likewise.
20694
20695 2002-11-05  Bruno Haible  <bruno@clisp.org>
20696
20697         * lib/gcd.h: New file, from gettext-0.11.5.
20698         * lib/gcd.c: New file, from gettext-0.11.5.
20699
20700 2002-11-05  Bruno Haible  <bruno@clisp.org>
20701
20702         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20703         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20704         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20705         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20706
20707         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
20708         <libintl.h>.
20709         * lib/makepath.c: Include gettext.h instead of <locale.h> and
20710         <libintl.h>.
20711
20712         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
20713         * lib/human.c: Include gettext.h instead of <libintl.h>.
20714         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
20715         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
20716         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
20717         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
20718         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
20719         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
20720         (textdomain): Remove definition.
20721         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
20722
20723         * lib/long-options.c: Remove include of <libintl.h> and definition of
20724         _.
20725         * lib/same.c: Remove include of <libintl.h> and definition of _.
20726
20727 2002-11-04  Owen Taylor  <otaylor@redhat.com>
20728
20729         * lib/config.charset: A few additions for Solaris.
20730
20731 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20732
20733         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
20734         * lib/localcharset.c (locale_charset): Declare as extern "C".
20735
20736 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20737
20738         * lib/config.charset: msdos in uk_UA uses CP1125.
20739
20740 2002-11-04  Bruno Haible  <bruno@clisp.org>
20741
20742         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
20743         * lib/strcase.h: New file, from GNU gettext-0.11.5.
20744         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
20745         * lib/strstr.h: New file, from GNU gettext-0.11.5.
20746         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
20747
20748 2002-11-04  Bruno Haible  <bruno@clisp.org>
20749
20750         * lib/localcharset.c (locale_charset): Don't return an empty string.
20751
20752 2002-11-04  Bruno Haible  <bruno@clisp.org>
20753
20754         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
20755         aliases.
20756
20757 2002-11-04  Bruno Haible  <bruno@clisp.org>
20758
20759         * lib/config.charset: Update for newest glibc. Add canonical names
20760         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
20761
20762 2002-11-04  Bruno Haible  <bruno@clisp.org>
20763
20764         * lib/config.charset: Add support for NetBSD.
20765
20766 2002-11-04  Bruno Haible  <bruno@clisp.org>
20767
20768         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
20769
20770 2002-11-01  Bruno Haible  <bruno@clisp.org>
20771
20772         * configure.in: Add AC_CONFIG_AUX_DIR call.
20773         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
20774         test/Makefile.
20775         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
20776
20777 2002-09-28  Karl Berry  <karl@gnu.org>
20778
20779         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
20780         installed automake until the next release, since changes have been
20781         made.
20782
20783 2002-09-25  Karl Berry  <karl@gnu.org>
20784
20785         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
20786         * lib/getopt*: copy from libc/posix.
20787         * lib/gettext.h: copy from gettext.
20788         * lib/.cppi-disable: add strdup.c, gettext.h.
20789
20790 2002-09-25  Karl Berry  <karl@gnu.org>
20791
20792         * config/srclist.txt: enable gettext.h check.
20793         * config/config.{guess,sub}: update from prep.
20794         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
20795                 from automake 1.6.3.
20796         See srclist*.
20797
20798 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
20799
20800         * regex.c (PATFETCH): Remove the translating fetch.
20801         (PATFETCH_RAW): Rename to PATFETCH.
20802         (set_image_of_range): New fun.
20803         (SET_RANGE_TABLE_WORK_AREA): Use it.
20804         (regex_compile): Don't translate the pattern chars so eagerly.
20805         Only do it when inserting an `exactn' bytecode or when handling
20806         a char-range.
20807         (mutually_exclusive_p): Avoid empty statement.
20808
20809 2002-07-06  Jim Meyering  <meyering@lucent.com>
20810
20811         * m4/README: Don't mention Makefile.am.in.
20812         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
20813
20814 2002-07-01  Jim Meyering  <meyering@lucent.com>
20815
20816         * lib/c-stack.c: Include sys/time.h.
20817         From Volker Borchert.
20818
20819 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20820
20821         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
20822
20823 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20824
20825         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
20826         New macro.  Use it uniformly instead of
20827         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
20828         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
20829         reported by Vin Shelton.
20830
20831 2002-06-22  Paul Eggert  <eggert@twinsun.com>
20832
20833         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
20834         Do not assume SA_SIGINFO behavior.
20835         Bug reported by Jim Meyering on NetBSD 1.5.2.
20836
20837 2002-06-22  Jim Meyering  <meyering@lucent.com>
20838
20839         * m4/c-stack.m4: New file, from diffutils-2.8.2.
20840         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
20841
20842         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
20843         now that configure.ac uses AC_GNU_SOURCE.
20844         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
20845         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
20846
20847         Update to latest tools.  Suggestions from Paul Eggert.
20848         * m4/stdbool.m4: New file, from diffutils-2.8.2.
20849         * m4/gnu-source.m4: Update from diffutils-2.8.2.
20850         * m4/fnmatch.m4: Likewise.
20851         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
20852         to AC_HEADER_STDBOOL
20853
20854 2002-06-22  Jim Meyering  <meyering@lucent.com>
20855
20856         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
20857         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
20858
20859 2002-06-22  Jim Meyering  <meyering@lucent.com>
20860
20861         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
20862
20863         * lib/exitfail.c, exitfail.h: Likewise.
20864         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
20865
20866         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
20867         of fnmatch.h.
20868         (EXTRA_DIST): Add fnmatch_loop.c.
20869         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
20870
20871         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
20872         * lib/fnmatch.c: Update from diffutils-2.8.2.
20873         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
20874         * lib/fnmatch.h: Remove file.
20875
20876 2002-06-21  Jim Meyering  <meyering@lucent.com>
20877
20878         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
20879         * m4/mbrtowc.m4: Likewise.
20880
20881         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
20882         * m4/mbswidth.m4: Reflect name change:
20883         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
20884         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
20885
20886         * m4/lib-link.m4: Update from gettext-0.11.2.
20887         * m4/gettext.m4: Likewise.
20888
20889         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
20890         From Alfred M. Szmidt.
20891
20892 2002-06-18  Paul Eggert  <eggert@twinsun.com>
20893
20894         * lib/file-type.h: Report an error if neither S_ISREG nor
20895         S_IFREG is defined, instead of using a test specific to glibc
20896         2.2.  This should be safe, since POSIX requires S_ISREG and
20897         Unix Version 7 had S_IFREG.  We don't need to check for
20898         <sys/types.h> since we don't use any symbols that it defines.
20899
20900 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
20901
20902         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
20903         $@-t, so that each temporary file name is unique and valid in the first
20904         8 characters, for operation under DOS.
20905
20906 2002-06-15  Paul Eggert  <eggert@twinsun.com>
20907
20908         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
20909
20910 2002-06-15  Jim Meyering  <meyering@lucent.com>
20911
20912         Work even with DJGPP 2.03, which lacks support for symlinks.
20913         From Richard Dawe.
20914         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
20915         is defined.
20916         * lib/lchown.c (S_ISLNK): Likewise.
20917
20918 2002-06-15  Jim Meyering  <meyering@lucent.com>
20919
20920         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
20921         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
20922         have been included before this file.
20923
20924 2002-06-14  Jim Meyering  <meyering@lucent.com>
20925
20926         * lib/file-type.h: Use the version from diffutils-2.8.2.
20927         * lib/file-type.c: Likewise.
20928
20929 2002-06-07  Jim Meyering  <meyering@lucent.com>
20930
20931         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
20932         They're needed at least for NetBSD 1.5.2.
20933         ($statxfs_includes): Include those same headers.
20934         ($statxfs_includes): Include sys/vfs.h if available.
20935         ($statxfs_includes): Likewise for sys/statvfs.h.
20936         Check for the following members in both structs statfs and statvfs:
20937         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
20938
20939 2002-06-01  Jim Meyering  <meyering@lucent.com>
20940
20941         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
20942         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
20943
20944 2002-05-28  Jim Meyering  <meyering@lucent.com>
20945
20946         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
20947         Reported by Volker Borchert.
20948
20949 2002-05-27  Jim Meyering  <meyering@lucent.com>
20950
20951         Fix a problem seen only on nonconforming systems whereby ls.c's
20952         use of localtime, and then of gettimeofday would cause trouble:
20953         the localtime call used to initialize rpl_gettimeofday's save
20954         mechanism would clobber ls's current local time information so
20955         that in any long listing the first file would always be listed
20956         with date 1970-01-01.  Analysis by Volker Borchert.
20957
20958         * lib/gettimeofday.c (localtime): Undefine.
20959         (rpl_localtime): New function.
20960
20961 2002-05-27  Jim Meyering  <meyering@lucent.com>
20962
20963         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
20964         localtime.
20965
20966         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
20967         use the replacement function; it wouldn't resolve at link time.
20968         Reported by Volker Borchert.
20969
20970 2002-05-22  Jim Meyering  <meyering@lucent.com>
20971
20972         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
20973         file-type.h.
20974         * lib/file-type.h: New file.
20975         * lib/file-type.c (file_type): New file/function.  Extracted from
20976         diffutils.
20977
20978 2002-04-30  Jim Meyering  <meyering@lucent.com>
20979
20980         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
20981
20982 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20983
20984         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
20985
20986 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20987
20988         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
20989         Do not check for alloca.h (no longer used) or stdbool.h (was never
20990         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
20991
20992 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20993
20994         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
20995
20996 2002-04-29  Jim Meyering  <meyering@lucent.com>
20997
20998         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
20999         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
21000         Use AC_FUNC_STRNLEN here instead.
21001
21002         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
21003         With autoconf-2.53a, it's part of AC_PROG_CC.
21004
21005 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21006
21007         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
21008         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
21009
21010 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21011
21012         * lib/sig2str.h, lib/sig2str.c: New files.
21013         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
21014
21015 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21016
21017         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
21018         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
21019         of 127, since 64 is the largest conceivable number for ancient
21020         nonstandard hosts.
21021         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
21022
21023 2002-04-28  Jim Meyering  <meyering@lucent.com>
21024
21025         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
21026
21027 2002-04-24  Jim Meyering  <meyering@lucent.com>
21028
21029         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
21030         (jm_PREREQ): Use it.
21031
21032         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
21033         mach/mach.h fcntl.h.
21034         Check for this function: setlocale.
21035
21036 2002-04-24  Jim Meyering  <meyering@lucent.com>
21037
21038         * lib/gettext.h: New file, from Gettext.
21039         * lib/Makefile.am (INCLUDES): Remove -I../intl.
21040         (libfetish_a_SOURCES): Add gettext.h.
21041
21042 2002-04-16  Jim Meyering  <meyering@lucent.com>
21043
21044         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
21045         ut_pid, ut_id, ut_exit.
21046
21047 2002-04-16  Jim Meyering  <meyering@lucent.com>
21048
21049         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
21050         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
21051         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
21052
21053 2002-04-12  Jim Meyering  <meyering@lucent.com>
21054
21055         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
21056         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
21057         existence of the getmntinfo function.  Needed for Darwin 5.3.
21058
21059         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
21060         This is necessary at least on Darwin 5.3.
21061
21062         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
21063         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
21064         strnlen.o in the library, and that makes some versions of ranlib
21065         object.
21066
21067 2002-04-12  Jim Meyering  <meyering@lucent.com>
21068
21069         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
21070
21071 2002-04-09  Jim Meyering  <meyering@lucent.com>
21072
21073         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
21074         to be more precise.  Rather than saying we're checking whether the
21075         function `works', say what we're testing.
21076         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
21077         Reported by Bruno Haible.
21078
21079 2002-03-10  Jim Meyering  <meyering@lucent.com>
21080
21081         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
21082         Suggestion from Santiago Vila.
21083
21084 2002-03-08  Jim Meyering  <meyering@lucent.com>
21085
21086         * lib/rename.c: Mention that this wrapper is needed also on
21087         mips-dec-ultrix4.4 systems.
21088
21089 2002-03-02  Jim Meyering  <meyering@lucent.com>
21090
21091         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
21092         not HAVE_CLOCK_SETTIME.
21093
21094 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21095
21096         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
21097         Check for clock_settime.
21098
21099 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21100
21101         * lib/nanosleep.h: Rename to....
21102         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
21103
21104         * lib/gettime.c: New file.
21105         * lib/settime.c: New file.
21106         * lib/stime.c: Remove.
21107
21108         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
21109         timespec.h.  Remove nanosleep.h.
21110
21111 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21112
21113         * m4/acl.m4: New file.
21114         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
21115         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
21116
21117 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21118
21119         * lib/acl.c, lib/acl.h: New files.
21120         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
21121
21122 2002-02-24  Jim Meyering  <meyering@lucent.com>
21123
21124         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
21125         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
21126         cause trouble.  Reported by Nelson Beebe.
21127
21128 2002-02-23  Paul Eggert  <eggert@twinsun.com>
21129
21130         * lib/path-concat.c (xpath_concat): Reorder code to pacify
21131         compilers that don't know that xalloc_die never returns.
21132
21133 2002-02-20  Jim Meyering  <meyering@lucent.com>
21134
21135         * lib/getdate.c: Regenerate using bison-1.33.
21136
21137 2002-02-17  Jim Meyering  <meyering@lucent.com>
21138
21139         * config/config.guess (main): Don't use `head -1'; it's no longer
21140         portable. Use `sed 1q' instead.
21141
21142 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
21143
21144         * m4/codeset.m4: Upgrade to gettext-0.11.
21145         * m4/gettext.m4: Upgrade to gettext-0.11.
21146         * m4/glibc21.m4: Upgrade to gettext-0.11.
21147         * m4/iconv.m4: Upgrade to gettext-0.11.
21148         * m4/isc-posix.m4: Upgrade to gettext-0.11.
21149         * m4/lcmessage.m4: Upgrade to gettext-0.11.
21150         * m4/lib-ld.m4: New file, from gettext-0.11.
21151         * m4/lib-link.m4: New file, from gettext-0.11.
21152         * m4/lib-prefix.m4: New file, from gettext-0.11.
21153         * m4/progtest.m4: Upgrade to gettext-0.11.
21154
21155 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21156
21157         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
21158         (jm_PREREQ): Use it.
21159
21160 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21161
21162         * lib/posixver.c, lib/posixver.h: New files.
21163         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21164
21165 2002-02-02  Paul Eggert  <eggert@twinsun.com>
21166             Bruno Haible  <bruno@clisp.org>
21167
21168         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
21169         (fwrite_success_callback): New declaration.
21170         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
21171         print_unicode_char. Call failure callback instead of error.
21172         (fwrite_success_callback): New function.
21173         (exit_failure_callback): New function.
21174         (fallback_failure_callback): New function.
21175         (print_unicode_char): Call unicode_to_mb.
21176
21177 2002-01-26  Jim Meyering  <meyering@lucent.com>
21178
21179         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
21180         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
21181
21182 2002-01-26  Jim Meyering  <meyering@lucent.com>
21183
21184         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
21185
21186 2002-01-22  Paul Eggert  <eggert@twinsun.com>
21187
21188         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
21189
21190 2002-01-22  Jim Meyering  <meyering@lucent.com>
21191
21192         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
21193         Otherwise, some versions of automake would omit the rule that makes
21194         Makefile from Makefile.in.
21195
21196 2002-01-21  Paul Eggert  <eggert@twinsun.com>
21197
21198         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
21199         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21200         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
21201         (memcoll): Set errno to zero if there is no error.
21202
21203         * lib/quotearg.c (quotearg_buffer_restyled):
21204         Fix bug with quoting buffers containing NUL when backslashing escapes.
21205         This bug was exposed by the other changes in this patch.
21206         (quotearg_n_options): New arg ARGSIZE.
21207         All callers changed.
21208         (quoting_options_from_style): New function.
21209         (quotearg_n_style): Use it.
21210         (quotearg_n_style_mem): New function.
21211
21212         * lib/quotearg.h (quotearg_n_style_mem): New function.
21213
21214 2002-01-19  Jim Meyering  <meyering@lucent.com>
21215
21216         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
21217         Remove useless quotes: DF_PROG="df".
21218         * m4/strnlen.m4: New file.
21219
21220 2002-01-16  Paul Eggert  <eggert@twinsun.com>
21221
21222         * lib/backupfile.c (ISDIGIT): Comment fix.
21223         * lib/getdate.y (ISDIGIT): Likewise.
21224         * lib/posixtm.c (ISDIGIT, year): Likewise.
21225         * lib/strverscmp.c (ISDIGIT): Likewise.
21226         * lib/userspec.c (ISDIGIT): Likewise.
21227
21228 2002-01-16  Jim Meyering  <meyering@lucent.com>
21229
21230         * lib/getdate.y: Add three semicolons, each just before a closing
21231         brace. Bison (as of version 1.31) no longer papers over that mistake.
21232
21233 2002-01-05  Jim Meyering  <meyering@lucent.com>
21234
21235         * lib/version-etc.c (version_etc_copyright): Update copyright year.
21236
21237 2001-12-19  Paul Eggert  <eggert@twinsun.com>
21238
21239         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
21240         not silently exit merely because the output buffer happens to
21241         have nothing pending.
21242
21243 2001-12-18  Paul Eggert  <eggert@twinsun.com>
21244
21245         See the big note in ../ChangeLog.
21246         * lib/human.c (suffixes): Prefer K to k for 1024.
21247         (generate_suffix_backwards): New function.
21248         (human_readable_inexact): Use it.
21249         * lib/xstrtol.c (__xstrtol): If there is no number but there
21250         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
21251         Accept 'K' as well as 'k'.
21252
21253 2001-12-15  Jim Meyering  <meyering@lucent.com>
21254
21255         * lib/regex.h (__restrict_arr): Update from libc.
21256
21257         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
21258         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
21259         (STREQ): Define.
21260
21261 2001-12-14  Jim Meyering  <meyering@lucent.com>
21262
21263         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
21264         Suggestion from Bruno Haible.
21265
21266 2001-12-10  Jim Meyering  <meyering@lucent.com>
21267
21268         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
21269         xrealloc, Instead, include "xalloc.h".
21270         (initbuffer): Don't cast xmalloc return value to char*.
21271         (readline): Reword comment.
21272         Don't cast xrealloc return value to char*
21273         Return NULL, not 0.
21274
21275 2001-12-09  Jim Meyering  <meyering@lucent.com>
21276
21277         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
21278         about `signed and unsigned type in conditional expression'.
21279         * lib/posixtm.c (posix_time_parse): Likewise.
21280
21281         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
21282
21283         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
21284         to avoid a pedantic warning.
21285
21286         * lib/getstr.c: Don't include assert.h.
21287         (getstr): Remove warning-evoking assertions.
21288         Return -1 if offset parameter is out of bounds.
21289         Change the type of a local from int to size_t.
21290
21291         * lib/strftime.c (my_strftime_localtime_r): Include this function
21292         definition in the `#if ! HAVE_TM_GMTOFF' block.
21293
21294         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
21295         Include xalloc.h instead.
21296
21297 2001-12-02  Jim Meyering  <meyering@lucent.com>
21298
21299         * lib/tempname.c: Don't declare getenv, thus reverting the change of
21300         2001-11-18.  It's no longer necessary, now that stdlib.h is always
21301         included.
21302
21303         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
21304         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
21305
21306 2001-11-30  Akim Demaille  <akim@epita.fr>
21307
21308         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
21309         before being defined.
21310
21311 2001-11-27  Paul Eggert  <eggert@twinsun.com>
21312
21313         * lib/quotearg.h (quotearg_n, quotearg_n_style):
21314         First arg is int, not unsigned.
21315         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21316         (SIZE_MAX, UINT_MAX): New macros.
21317         (quotearg_n_options): Abort if N is negative.
21318         Avoid overflow check on hosts where size_t is 64 bits and int
21319         is 32 bits, as overflow is impossible there.
21320         Fix off-by-one typo that caused unnecessary reallocation.
21321
21322 2001-11-27  Jim Meyering  <meyering@lucent.com>
21323
21324         * lib/tempname.c: Merge with version from libc.
21325         * lib/regex.c: Likewise.
21326
21327         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
21328         systems for which STDC_HEADERS is 0, it was not included, resulting in
21329         a warning about an integer-to-pointer conversion problem with getenv.
21330         Reported by Volker Borchert.
21331
21332 2001-11-26  Jim Meyering  <meyering@lucent.com>
21333
21334         * lib/gtod.h: Remove file.
21335         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
21336         * lib/gettimeofday.c: Don't include gtod.h.
21337         (GTOD_init): Remove function.
21338         (rpl_gettimeofday): Do its job here instead, rather than aborting.
21339         Suggestion from Volker Borchert.
21340
21341 2001-11-23  Jim Meyering  <meyering@lucent.com>
21342
21343         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
21344         it.
21345         * lib/hash.c (struct hash_table): Define it here instead.
21346
21347 2001-11-22  Jim Meyering  <meyering@lucent.com>
21348
21349         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
21350
21351 2001-11-20  Jim Meyering  <meyering@lucent.com>
21352
21353         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
21354         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
21355
21356 2001-11-19  Jim Meyering  <meyering@lucent.com>
21357
21358         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
21359         directory.  Use "conftestXXXXXX" as the template.
21360         Suggestion from Paul Eggert.
21361
21362         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
21363         immediately, so the test doesn't mistakenly hit the max-open-files
21364         limit.
21365
21366 2001-11-18  Paul Eggert  <eggert@twinsun.com>
21367
21368         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
21369         (TEMPORARIES): New macro.
21370         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
21371         removes an artificial limitation (e.g. HP-UX 10.20, where
21372         TMP_MAX is 17576).
21373
21374 2001-11-18  Jim Meyering  <meyering@lucent.com>
21375
21376         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
21377
21378 2001-11-18  Jim Meyering  <meyering@lucent.com>
21379
21380         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
21381         on SunOS 4.
21382
21383         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
21384         files will be created before anything else.
21385
21386 2001-11-17  Paul Eggert  <eggert@twinsun.com>
21387
21388         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
21389         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
21390
21391 2001-11-17  Jim Meyering  <meyering@lucent.com>
21392
21393         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
21394         Prompted by a report from Bob Proulx.
21395
21396         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
21397         Instead, require UTILS_FUNC_MKSTEMP.
21398
21399 2001-11-17  Jim Meyering  <meyering@lucent.com>
21400
21401         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
21402         Now, that's done as part of AC_FUNC_STRTOD.
21403
21404 2001-11-17  Jim Meyering  <meyering@lucent.com>
21405
21406         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
21407         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
21408         rather than group writable.  Patch by Juan F. Codagnone.
21409
21410         * lib/readtokens.c: Remove explicit declarations of xmalloc and
21411         xrealloc, Instead, include "xalloc.h".
21412
21413         * lib/mountlist.c: Include unlocked-io.h after all system headers.
21414         Remove explicit declarations of xmalloc, xrealloc,
21415         and xstrdup.  Instead, include "xalloc.h".
21416
21417         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
21418         unlocked-io.h.
21419         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
21420         Likewise.
21421         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
21422
21423         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
21424         Reported by Padraig Brady.
21425
21426         * lib/mkstemp.c: #undef mkstemp.
21427         Include config.h.
21428         (rpl_mkstemp): Rename from mkstemp.
21429         Protoize.
21430
21431 2001-11-16  Jim Meyering  <meyering@lucent.com>
21432
21433         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
21434         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
21435         determine the amount of total physical memory, use pstat_getstatic.
21436         HPUX-11 doesn't define _SC_PHYS_PAGES.
21437         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
21438         If sysconf couldn't be used to determine the amount of available
21439         physical memory, use both pstat_getstatic and pstat_getdynamic.
21440         Based on a patch from Bob Proulx.
21441
21442 2001-11-10  Jim Meyering  <meyering@lucent.com>
21443
21444         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
21445         (jm_PREREQ): Use it.
21446
21447 2001-11-09  Jim Meyering  <meyering@lucent.com>
21448
21449         * m4/jm-macros.m4: Require autoconf-2.52f.
21450         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
21451         Use these AC_-prefixed names, not the AM_-prefixed ones.
21452
21453         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
21454
21455 2001-11-05  Jim Meyering  <meyering@lucent.com>
21456
21457         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
21458
21459 2001-11-04  Jim Meyering  <meyering@lucent.com>
21460
21461         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
21462         $DEFS.
21463
21464 2001-11-03  Jim Meyering  <meyering@lucent.com>
21465
21466         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
21467         of AC_DEFUN.
21468
21469         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
21470         know the name of the variable in the macro definition.
21471
21472 2001-11-03  Jim Meyering  <meyering@lucent.com>
21473
21474         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
21475         in argmatch_to_argument call.
21476
21477         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
21478         argument.
21479
21480         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
21481         e.g., a fault due to an attempt to free a NULL pointer.
21482
21483 2001-11-01  Jim Meyering  <meyering@lucent.com>
21484
21485         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
21486         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
21487
21488 2001-11-01  Jim Meyering  <meyering@lucent.com>
21489
21490         * lib/dirfd.c, lib/dirfd.h: New files.
21491         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
21492
21493         * lib/hash.c (hash_print) [TESTING]: Clean up.
21494
21495 2001-10-22  Paul Eggert  <eggert@twinsun.com>
21496
21497         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
21498         to avoid a warning if -Wall.
21499
21500 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
21501
21502         * README: New file
21503         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
21504         (per RMS's instructions, this is now the canonical source)
21505         * lgpl/, gpl/: New directories.
21506
21507 2001-10-21  Paul Eggert  <eggert@twinsun.com>
21508
21509         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
21510
21511 2001-10-21  Jim Meyering  <meyering@lucent.com>
21512
21513         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
21514         this code would end up calling gettext even in packages built
21515         with --disable-nls.
21516         * lib/getopt.c (_): Likewise.
21517         * lib/regex.c (_): Likewise.
21518
21519 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21520
21521         * m4/error.m4 (jm_PREREQ_ERROR):
21522         Do not invoke AC_CHECK_FUNCS with strerror_r, as
21523         AC_FUNC_STRERROR_R does that.
21524         Check for strerror declaration.
21525
21526         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
21527         are supposed to have them these days.
21528         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
21529         Merge changes from latest Autoconf CVS.
21530         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
21531         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
21532         POSIX decided to standardize on the int flavor of strerror_r.
21533
21534 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21535
21536         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
21537         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
21538         Use strerror_r that is only a macro, even if it is not a function.
21539         (strerror): Check for HAVE_DECL_STRERROR before declaring.
21540         (private_strerror): Use prototypes, not old-style function definition.
21541         (print_errno_message): New function.
21542         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
21543         char*-flavored one.
21544         (error_tail, error, error_at_line): Use it.
21545
21546 2001-10-11  Jim Meyering  <meyering@lucent.com>
21547
21548         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
21549         and quote_n (1, ... to avoid clobbering a buffer.
21550
21551 2001-10-05  Jim Meyering  <meyering@lucent.com>
21552
21553         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
21554         hash-pjw.h.
21555         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
21556         * lib/hash-pjw.h: New file.
21557
21558 2001-09-30  Jim Meyering  <meyering@lucent.com>
21559
21560         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
21561         `struct fsstat' has the `f_fstypename' member.
21562         Use that to define FS_TYPE, which is now used to make
21563         the getfsstat link test tighter.
21564
21565 2001-09-30  Jim Meyering  <meyering@lucent.com>
21566
21567         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
21568         Include <sys/ucred.h>, for Apple Darwin.
21569         Include sys/mount.h and sys/fs_types.h only if available.
21570         (FS_TYPE): Define.
21571         (read_filesystem_list): Use FS_TYPE.
21572
21573 2001-09-29  Paul Eggert  <eggert@twinsun.com>
21574
21575         * lib/exclude.c (excluded_filename): 0 -> false, since it's
21576         a boolean context.
21577
21578 2001-09-29  Jim Meyering  <meyering@lucent.com>
21579
21580         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21581         [one-argument getmntent function]): Include stdio.h before mntent.h.
21582         SunOS 4.1.x needs it for the declaration of `FILE'.
21583         Patch by Volker Borchert.
21584
21585         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21586         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
21587         sys/fs_types.h, and make the link-test for getfsstat guard #include
21588         directives with appropriate #if HAVE_*_H tests so that we can
21589         detect getfsstat on Apple Darwin1.3.7 systems.
21590         Reported by Nelson Beebe.
21591         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
21592
21593 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21594
21595         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21596         #defines strtoimax.  Also treat the other strto* functions
21597         like strtoimax.
21598
21599         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21600         Check for strtoul and strtoumax,
21601         as those declarations are made even in the signed case.
21602         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
21603         Likewise, for strtol and strtoimax.
21604
21605 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21606
21607         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21608         #defines strtoimax.  Also treat the other strto* functions
21609         like strtoimax.
21610
21611         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
21612         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
21613         (strtoimax, strtoumax): Do not declare if already defined as a macro.
21614
21615 2001-09-26  Jim Meyering  <meyering@lucent.com>
21616
21617         Most macros in unlocked-io.h had the wrong number of arguments.
21618         * lib/gen-uio: New script.
21619         (USE_UNLOCKED_IO): Define to 1 if not already defined.
21620         * lib/unlocked-io.hin: Remove file.
21621         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
21622         rather than trying to embed it here.
21623         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
21624         Reported by Padraig Brady.
21625
21626 2001-09-25  Volker Borchert  <bt@teknon.de>
21627
21628         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
21629         `result'.
21630
21631 2001-09-24  Jim Meyering  <meyering@lucent.com>
21632
21633         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
21634
21635 2001-09-23  Jim Meyering  <meyering@lucent.com>
21636
21637         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
21638         instead of the mere test for existence of mntent.h.  The latter
21639         would get a false-positive on AIX 3.4 systems.
21640         In the outer getmntent if-block, don't die if neither of the getmntent
21641         tests succeeds.  Instead, just fall through and continue with the
21642         remaining tests.
21643
21644 2001-09-23  Jim Meyering  <meyering@lucent.com>
21645
21646         * lib/mountlist.c: Remove useless parentheses in #if directives.
21647         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
21648         the deprecated MOUNTED symbol is no longer defined in mntent.h.
21649
21650 2001-09-22  Jim Meyering  <meyering@lucent.com>
21651
21652         * m4/gettext.m4: New file.  From gettext.
21653         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
21654         * m4/progtest.m4: Likewise
21655         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
21656         * m4/glibc21.m4: Likewise.
21657
21658         * m4/libintl.m4: Remove.  No longer used.
21659
21660 2001-09-22  Jim Meyering  <meyering@lucent.com>
21661
21662         * lib/localcharset.c: Update from latest gettext.
21663         * lib/config.charset: Likewise.
21664
21665 2001-09-20  Jim Meyering  <meyering@lucent.com>
21666
21667         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
21668         strtoimax.
21669         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
21670         strtoumax.
21671
21672 2001-09-20  Jim Meyering  <meyering@lucent.com>
21673
21674         * lib/xstrtol.c (strtoimax): Guard declaration with
21675         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
21676         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
21677         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
21678         (strtoumax): Likewise, for completeness (it wasn't necessary).
21679
21680 2001-09-17  Paul Eggert  <eggert@twinsun.com>
21681
21682         * lib/strtoimax.c (HAVE_LONG_LONG):
21683         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
21684         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
21685         to work around bug in IBM C compiler.
21686
21687 2001-09-17  Jim Meyering  <meyering@lucent.com>
21688
21689         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
21690         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
21691         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
21692         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
21693         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
21694         whenever the right hand side need not be expanded by the shell.
21695
21696 2001-09-16  Paul Eggert  <eggert@twinsun.com>
21697
21698         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
21699         library.  It's not correct, as some older glibcs are buggy.
21700         fnmatch wasn't fixed until glibc 2.2.
21701
21702         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
21703         special shell magic here.
21704
21705 2001-09-16  Jim Meyering  <meyering@lucent.com>
21706
21707         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
21708         * m4/jm-macros.m4: Require it.
21709
21710 2001-09-16  Jim Meyering  <meyering@lucent.com>
21711
21712         * lib/mkdir.c: New file.
21713
21714 2001-09-15  Jim Meyering  <meyering@lucent.com>
21715
21716         * m4/jm-macros.m4: Check for help2man.
21717
21718 2001-09-11  Jim Meyering  <meyering@lucent.com>
21719
21720         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
21721         The body, by Paul Eggert, was moved here from configure.in.
21722         * m4/jm-macros.m4: Require UTILS_HOST_OS.
21723
21724 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21725
21726         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
21727         (jm_PREREQ): Use it.
21728
21729 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21730
21731         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
21732         Use ssize_t, not int, to store result of readlink.
21733         Check for ssize_t overflow as well as size_t overflow,
21734         as POSIX says the result of readlink is implementation-defined
21735         when ssize_t overflows.
21736         Remove unnecessary cast to char*.
21737         Use free+malloc instead of realloc, as the storage doesn't need
21738         to be preserved and it's clearer and can be more efficient that way.
21739         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
21740         * lib/xreadlink.h (xreadlink): Update prototype.
21741
21742 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21743
21744         * lib/xgetcwd.c: Revert some of the previous change; intead,
21745         fix the HAVE_GETCWD_NULL code to behave more like the
21746         !HAVE_GETCWD_NULL code used to.
21747
21748         Include "xalloc.h".
21749         (xgetcwd): Do not return NULL when memory is exhausted; instead,
21750         invoke xalloc_die.
21751
21752 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21753
21754         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
21755         sys/param.h, as pathmax.h includes them.
21756
21757 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21758
21759         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
21760         (jm_PREREQ_XGETCWD): New macro.
21761
21762         * m4/getcwd.m4: New file.
21763
21764 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21765
21766         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
21767         like the HAVE_GETCWD_NULL code.
21768         Include pathmax.h if not HAVE_GETCWD.
21769         Do not include xalloc.h.
21770         (INITIAL_BUFFER_SIZE): New symbol.
21771         Do not use xmalloc / xrealloc, since the caller is responsible for
21772         handling errors.  Preserve errno around `free' during failure.
21773         Do not overrun buffer when using getwd.
21774
21775 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21776
21777         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
21778         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
21779         getcwd (NULL, 0).
21780
21781 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21782
21783         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
21784         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
21785         spotted by Jim Meyering.
21786
21787 2001-09-03  Jim Meyering  <meyering@lucent.com>
21788
21789         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
21790         failure.
21791
21792 2001-09-02  Jim Meyering  <meyering@lucent.com>
21793
21794         * lib/error.c: Update from GNU libc.
21795
21796 2001-09-01  Jim Meyering  <meyering@lucent.com>
21797
21798         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
21799         Used by df.
21800
21801 2001-09-01  Jim Meyering  <meyering@lucent.com>
21802
21803         * lib/xreadlink.c: New file.
21804         * lib/xreadlink.h: New file.
21805         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
21806         xreadlink.h.
21807
21808         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
21809         doesn't conflict with sparc Solaris 7's definition in
21810         /usr/include/sys/int_types.h.
21811
21812         * lib/exclude.c: Use `""', not `<>' to #include non-system header
21813         files.
21814         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
21815         and strncasecmp as r-values.  Unixware didn't have declarations.
21816
21817 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21818
21819         * lib/xstrtol.h: Add copyright notice.
21820         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
21821         LONGINT_INVALID_SUFFIX_CHAR.
21822
21823 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21824
21825         * lib/xstrtol.c (strtoimax): New decl.
21826
21827 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21828
21829         * lib/xgetcwd.c: Don't include pathmax.h.
21830         Include stdlib.h and unistd.h if available.
21831         Include xalloc.h.
21832         (xmalloc, xstrdup, free): Remove decls.
21833         (xgetcwd): Don't assume sizes fit in unsigned.
21834         Check for overflow when computing sizes.
21835         Simplify reallocation code.
21836
21837 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21838
21839         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
21840         a directory's st_size can have an arbitrary value, so the old
21841         usage could waste an arbitrary amount of memory.  All uses
21842         changed.
21843         * lib/savedir.h: Update prototype.
21844
21845 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21846
21847         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
21848
21849         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
21850         old strtoimax.c.
21851
21852         Also, make the following further changes to make this file's
21853         configuration more similar to that of strtol.c:
21854         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
21855         (strtoumax, uintmax_t, strtoull, strtol): Remove.
21856         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
21857         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
21858         changed to signed values.
21859
21860         And make the following changes as well:
21861         Fix copyright notice, as 1999 was missing.
21862         (verify): New macro.
21863         (strtoimax): Check sizes at compile-time, not run-time.
21864         Prefer strtol to strtoll if both work.
21865         (main): Remove; it was not that useful and was a pain to maintain.
21866
21867         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
21868
21869 2001-08-31  Jim Meyering  <meyering@lucent.com>
21870
21871         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
21872         Use an initial, malloc'd, buffer of length 128 rather than
21873         a statically allocated one of length 1024.
21874
21875 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21876
21877         Simplify code, partly by assuming autoconf 2.52 semantics.
21878
21879         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
21880
21881         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
21882         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
21883         All uses removed.
21884         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
21885         Move AC_REQUIRE to next-to-top level, to avoid confusion.
21886         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
21887         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
21888         jm_AC_HEADER_INTTYPES_H.
21889         * m4/jm-macros.m4 (jm_MACROS): Likewise.
21890
21891         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
21892
21893         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21894         Quote first arg of AC_DEFUN.
21895         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
21896         since they are needed to parse the include file even if we need
21897         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
21898         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
21899         but with opposite signedness.
21900
21901 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21902
21903         Merge 'exclude' changes from tar 1.13.22.
21904         This fixes one or two unlikely storage allocation overflow bugs,
21905         but doesn't change user-visible behavior otherwise.
21906
21907 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21908
21909         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
21910         (jm_PREREQ_EXCLUDE): New macro.
21911
21912 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21913
21914         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21915         tm to be declared.
21916
21917 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21918
21919         * lib/hash.c: Remove '2001' from copyright notice.
21920
21921 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21922
21923         * lib/full-write.h: New file.
21924         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
21925         * lib/full-write.c: Correct credits, as cccp.c no longer
21926         exists and anyway it was so heavily changed from the old cccp
21927         code as to be unrecognizable.  Include full-write.h.
21928         (full_write) Return size_t, with short writes meaning failure.
21929         All callers changed.  This fixes a bug with large buffers
21930         on 64-bit hosts.
21931         * lib/utime.c: Include full-write.h.
21932
21933 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21934
21935         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
21936         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
21937         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
21938         Include if available.
21939         (<xalloc.h>): Include
21940         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
21941         (verify): New macro.  Use it to verify that EXCLUDE macros do not
21942         collide with FNM macros.
21943         (struct patopts): New struct.
21944         (struct exclude): Use it, as exclude patterns now come with options.
21945         (new_exclude): Support above changes.
21946         (new_exclude, add_exclude_file):
21947         Initial size must now be a power of two to simplify overflow checking.
21948         (free_exclude, fnmatch_no_wildcards): New function.
21949         (excluded_filename): No longer requires options arg, as the options
21950         are determined by add_exclude.  Now returns bool, not int.
21951         (excluded_filename, add_exclude):
21952         Add support for the fancy new exclusion options.
21953         (add_exclude, add_exclude_file): Now takes int options arg.
21954         Check for arithmetic overflow when computing sizes.
21955         (add_exclude_file): xrealloc might modify errno, so don't
21956         realloc until after errno might be used.
21957
21958         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
21959         New macros.
21960         (free_exclude): New decl.
21961         (add_exclude, add_exclude_file): Now takes int options arg.
21962         (excluded_filename): No longer requires options arg, as the options
21963         are determined by add_exclude.  Now returns bool, not int.
21964
21965 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21966
21967         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
21968
21969 2001-08-27  Jim Meyering  <meyering@lucent.com>
21970
21971         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
21972
21973         * lib/version-etc.c (N_): Remove definition.
21974         Revert most of last change.
21975         Instead, simply don't mark the `Copyright...' string for translation.
21976         Based on advice from Paul Eggert.
21977
21978         * lib/strtoxmax.c: Tweak comment.
21979
21980 2001-08-26  Jim Meyering  <meyering@lucent.com>
21981
21982         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
21983
21984         * m4/xstrtoimax.m4: New file.
21985         * m4/xstrtoumax.m4: Add comments explaining why we
21986         AC_REPLACE_FUNCS(strtol).
21987
21988 2001-08-26  Jim Meyering  <meyering@lucent.com>
21989
21990         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
21991         of copyright with `%s' so translators don't get an untranslated
21992         message in 2002.
21993         (COPYRIGHT_YEAR): Define.
21994         (version_etc): Use fprintf rather than fputs.
21995         Suggestion from Ulrich Drepper.
21996
21997         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
21998
21999         * lib/strtoll.c: New file, from GNU libc.
22000         * lib/xstrtoimax.c: New file.
22001
22002         * lib/xstrtol.h: Add xstrtoimax.
22003         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
22004         * lib/strtoimax.c: New file.  Likewise, but first define
22005         STRTOUXMAX_SIGNED.
22006
22007         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
22008         ...
22009         * lib/strtoxmax.c: ... then renamed to this.
22010
22011 2001-08-18  Paul Eggert  <eggert@twinsun.com>
22012
22013         * m4/inttypes.m4: Add AC_PREREQ(2.13).
22014         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
22015         (jm_AC_TYPE_INTMAX_T): New macro.
22016         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
22017
22018         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
22019
22020         * m4/longlong.m4: Renamed from ulonglong.m4.
22021         * m4/inttypes.m4: Renamed from inttypes_h.m4.
22022         * m4/uintmax_t.m4: Removed.
22023
22024 2001-08-13  Paul Eggert  <eggert@twinsun.com>
22025
22026         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
22027         Port to Solaris 8, where 'sed' requires a space after the 'r'
22028         command, and where sh dislikes "$/".  Clean up the spacing a bit.
22029         Redirect output to $tmp just once.
22030
22031 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
22032
22033         * lib/addext.c (<errno.h>): Include.
22034         (errno): Declare if not defined.
22035         (addext): Work correctly when pathconf returns -1 and leaves
22036         errno alone because there is no limit.  Also, work even if
22037         pathconf returns a value greater than SIZE_MAX.
22038
22039 2001-08-12  Jim Meyering  <meyering@lucent.com>
22040
22041         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
22042         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
22043         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
22044         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
22045         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
22046         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
22047         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
22048         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
22049         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
22050         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
22051         utime.m4, utimes.m4, xstrtoumax.m4:
22052         Quote the first argument in each use of AC_DEFUN.
22053
22054 2001-08-12  Jim Meyering  <meyering@lucent.com>
22055
22056         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
22057         Simply `return getcwd (NULL, 0);'.
22058         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
22059         Use 1300 as initial value for length, not PATH_MAX.
22060
22061         * lib/pathmax.h: Clean up cpp syntax.
22062
22063 2001-08-12  Jim Meyering  <meyering@lucent.com>
22064
22065         * lib/gettimeofday.c: New file.
22066         * lib/gtod.h: New file.
22067         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
22068
22069 2001-08-05  Jim Meyering  <meyering@lucent.com>
22070
22071         * m4/jm-macros.m4: Require autoconf-2.52.
22072
22073 2001-08-04  Jim Meyering  <meyering@lucent.com>
22074
22075         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
22076         stmt, to get in sync with glibc.
22077
22078 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22079
22080         The following changes are from gettext 0.10.39 as maintained by
22081         Bruno Haible.
22082
22083         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
22084         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
22085         with inverted sense.  All uses changed.
22086
22087         * lib/mbswidth.c: Don't include <limits.h>.
22088         Include <stdlib.h> and <string.h> unconditionally.
22089         (iswcntrl, mbsinit, ISCNTRL): New macros.
22090         (mbsnwidth): Use K&R style function declarations.
22091         Don't bother checking for MB_LEN_MAX == 1, since the compiler
22092         can optimize it when MB_CUR_MAX == 1.
22093         The width of control characters is zero, not 1.
22094
22095 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22096
22097         The following changes are from gettext 0.10.39 as maintained by
22098         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
22099
22100         * m4/codeset.m4: Upgrade to serial AM1.
22101         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
22102         all uses changed.  Quote first arg of AC_DEFUN.
22103         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
22104
22105         * m4/iconv.m4: Upgrade to serial AM2.
22106         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
22107         Add --with-libconv-prefix.
22108         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
22109         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
22110         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
22111         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
22112         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
22113
22114         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
22115         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
22116         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
22117         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
22118         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
22119         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
22120         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
22121         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
22122         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
22123
22124         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
22125         string.h any more.
22126
22127         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
22128         not the default value.
22129
22130         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
22131         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
22132         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
22133         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
22134         Also check for iswcntrl, used for wcwidth fallback.
22135         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
22136         to Autoconf 2.13.
22137
22138 2001-08-03  Jim Meyering  <meyering@lucent.com>
22139
22140         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
22141         as it was in the original.  Reported by Paul Eggert.
22142
22143 2001-07-16  Jim Meyering  <meyering@lucent.com>
22144
22145         * m4/gettimeofday.m4: New file.
22146         Prompted by a report from Bernhard Baehr.
22147
22148 2001-07-15  Jim Meyering  <meyering@lucent.com>
22149
22150         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
22151         stuff. Now it's in ../Makefile.cfg.
22152
22153 2001-07-15  Jim Meyering  <meyering@lucent.com>
22154
22155         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
22156         (BUILT_SOURCES): Add unlocked-io.h.
22157         (io_functions): Define.
22158         (unlocked-io.h): New rule.
22159         (DISTCLEANFILES): Add unlocked-io.h.
22160         (all-local): Depend on unlocked-io.h, to ensure it is created.
22161
22162         * lib/unlocked-io.hin: New file
22163
22164         * lib/regex.c: Update from glibc.
22165
22166 2001-07-05  Jim Meyering  <meyering@lucent.com>
22167
22168         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
22169         recommendation.
22170         (libfetish_a_SOURCES): Put all .h files here instead.
22171         Remove a thus-exposed (better checks in automake) duplicate and
22172         two unnecessary .h files.
22173
22174 2001-07-04  Jim Meyering  <meyering@lucent.com>
22175
22176         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
22177         that generates jm-glibc-io.m4 so that it doesn't trigger any make
22178         distcheck failure.
22179
22180 2001-07-02  Jim Meyering  <meyering@lucent.com>
22181
22182         The following changes were prompted by suggestions from Bruno Haible.
22183
22184         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
22185         is now generated.
22186         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
22187         definition of EXTRA_DIST.
22188         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
22189         ensure that the generated file is created/updated whenever the list
22190         of $(unlocked_functions) is changed.
22191         (jm-glibc-io.m4): New rule.
22192         (unlocked-io.h): New rule -- currently unused.
22193
22194 2001-06-24  Jim Meyering  <meyering@lucent.com>
22195
22196         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
22197         unmatched right bracket, rather than kludging it with an extra,
22198         falsely-matching quote in a comment.  Patch by Akim Demaille.
22199
22200 2001-06-11  Jim Meyering  <meyering@lucent.com>
22201
22202         * lib/regex.c: Update from GNU libc.
22203
22204 2001-05-27  Jim Meyering  <meyering@lucent.com>
22205
22206         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
22207         Check for ut_type in struct utmp.
22208
22209 2001-05-27  Jim Meyering  <meyering@lucent.com>
22210
22211         * lib/readutmp.h (UT_TYPE): Define.
22212
22213 2001-05-24  Jim Meyering  <meyering@lucent.com>
22214
22215         * lib/argmatch.c: Include "quote.h".
22216         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
22217         quote function.  Reported by Göran Uddeborg.
22218
22219 2001-05-22  Jim Meyering  <meyering@lucent.com>
22220
22221         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
22222         now that we use the package-supplied version unconditionally.
22223         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
22224
22225 2001-05-21  Jim Meyering  <meyering@lucent.com>
22226
22227         * m4/regex.m4: Change a couple backticks to single quotes to avoid
22228         shell syntax errors.
22229
22230 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22231
22232         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
22233
22234 2001-05-20  Paul Eggert  <eggert@twinsun.com>
22235
22236         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
22237         Don't bother to check library strftime, since
22238         we'll be using our own my_strftime function anyway.
22239         Define my_strftime instead of strftime.
22240
22241 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
22242
22243         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
22244         which is not yet declared.
22245
22246 2001-05-15  Jim Meyering  <meyering@lucent.com>
22247
22248         * m4/regex.m4: Use proper quoting so brackets appear in the test
22249         program.
22250         Reported by, and with help from, Bruno Haible.
22251
22252 2001-05-13  Jim Meyering  <meyering@lucent.com>
22253
22254         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
22255         undefined.
22256
22257 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22258
22259         dirname code cleanup.  base_name now behaves more compatibly
22260         with POSIX basename when given file names that have trailing
22261         slashes, and similarly for dir_name.  Add new primitives
22262         base_len and dir_len.  Put the directory-name-related decls
22263         into dirname.h.
22264
22265         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
22266         * lib/backupfile.c (base_name): Likewise.
22267         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
22268         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
22269         * lib/makepath.c (strip_trailing_slashes): Likewise.
22270         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
22271         ISSLASH): Likewise.
22272         * lib/rename.c (strip_trailing_slashes): Likewise.
22273         * lib/same.c (base_name): Likewise.
22274         * lib/stripslash.c (ISSLASH): Likewise.
22275
22276         * lib/addext.c: Include <dirname.h> after size_t is defined.
22277         * lib/backupfile.c: Likewise.
22278
22279         * lib/addext.c (addext): Use base_len to trim redundant
22280         trailing slashes instead of doing it ourselves.
22281         But do not trim the last slash if it is not redundant.
22282
22283         * lib/backupfile.c (find_backup_file_name,
22284         max_backup_version): Use base_len instead of rolling it ourselves.
22285         Handle the case of "" and (on DOS) "C:" correctly.
22286
22287         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
22288         needed. Include <string.h>, <dirname.h>.
22289         (base_name): Allow file names ending in slashes, other than names
22290         that are all slashes.  In this case, return the basename followed
22291         by the slashes.  This is more general, and can be used in places
22292         where the original base_name purposely had an assertion failure.
22293         (base_len): New function.
22294
22295         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
22296         Do not include <assert.h>; no longer needed.
22297         Include xalloc.h.
22298         (memrchr): Remove decl.
22299         (dir_name_r): Remove.
22300         (dir_len): Renamed from dirlen.  All callers changed.
22301         Rewrite in terms of base_name, for simplicity and consistency.
22302         (dir_name): Never return NULL.  All callers changed.
22303         Do not include <stdlib.h> in test program; no longer needed.
22304         return 0; is fine for test program.
22305
22306         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
22307         New macros.
22308         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
22309
22310         * lib/path-concat.c (path_concat): Use base_len to compute
22311         base length, not strlen; this means we cannot rely on memcpy
22312         to null-terminate.
22313
22314         * lib/same.c (STREQ): Remove.
22315         (same_name): Handle the case where the basename ends in trailing '/'.
22316
22317         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
22318         a slash was stripped.  Do not strip the last slash after a
22319         file system prefix.
22320
22321 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22322
22323         * lib/Makefile.am (libfetish_a_SOURCES):
22324         Add strftime.c, since we now compile it on all hosts.
22325
22326         * lib/strftime.c (my_strftime):
22327         Define to nstrftime if emacs, but only if my_strftime is not defined.
22328         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
22329         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
22330         Add one more extra argument: a nanoseconds value.
22331         All uses changed.
22332         (ns): New macro.
22333         (my_strftime function): Add %N format.
22334         (emacs_strftimeu): Renamed from emacs_strftime,
22335         with extra ut argument.
22336
22337 2001-05-09  Paul Eggert  <eggert@twinsun.com>
22338
22339         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
22340
22341 2001-04-21  Jim Meyering  <meyering@lucent.com>
22342
22343         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
22344         doesn't interfere.
22345
22346 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22347
22348         * m4/ftruncate.m4: Check for chsize.
22349         Link with ftruncate.o unconditionally if ftruncate is missing.
22350         This was required when cross-compiling to i586-mingw32msvc.
22351
22352 2001-04-08  Jim Meyering  <meyering@lucent.com>
22353
22354         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
22355         recomputed; that's necessary when the offset spans a DST transition.
22356         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
22357
22358 2001-04-02  Jim Meyering  <meyering@lucent.com>
22359
22360         * lib/regex.h, regex.c: Update from GNU libc.
22361
22362 2001-03-24  Jim Meyering  <meyering@lucent.com>
22363
22364         * m4/jm-macros.m4: Require autoconf-2.49d.
22365
22366 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
22367
22368         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
22369
22370 2001-03-19  Paul Eggert  <eggert@twinsun.com>
22371
22372         * lib/version-etc.c (version_etc_copyright): Update to 2001.
22373
22374 2001-03-17  Jim Meyering  <meyering@lucent.com>
22375
22376         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
22377         now that the version in autoconf is equivalent.
22378         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
22379
22380         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
22381         Suggestion from Akim Demaille.
22382
22383         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
22384         (jm_PREREQ_TEMPNAME): New function.
22385
22386 2001-03-16  Paul Eggert  <eggert@twinsun.com>
22387
22388         * lib/tempname.c (uint64_t): Define to uintmax_t if
22389         not defined, and if UINT64_MAX is not defined.
22390         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
22391         Reported by John David Anglin.
22392
22393 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
22394
22395         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
22396         resolve alias if codeset is empty.
22397         * lib/config.charset (BeOS): Use wildcard syntax.
22398
22399 2001-03-13  Jim Meyering  <meyering@lucent.com>
22400
22401         * lib/path-concat.c (path_concat)
22402         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
22403         concatenating e.g., `C:' and `foo'.
22404         From Bruno Haible.
22405
22406 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22407
22408         * lib/localcharset.c (locale_charset): Don't use
22409         setlocale(LC_CTYPE,NULL). Don't return NULL.
22410         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
22411
22412 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22413
22414         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
22415         support for DOS/DJGPP.
22416
22417 2001-03-01  Paul Eggert  <eggert@twinsun.com>
22418
22419         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
22420         lacks mkstemp.  Compile our own tempname.c if we compile our own
22421         mkstemp.c, as mkstemp relies on tempname.
22422
22423 2001-03-01  Jim Meyering  <meyering@lucent.com>
22424
22425         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
22426         AH_VERBATIM really does output its argument verbatim.
22427
22428 2001-02-28  Paul Eggert  <eggert@twinsun.com>
22429
22430         * lib/Makefile.am (libfetish_a_SOURCES):
22431         Add dup-safer.c, fopen-safer.c.
22432         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
22433
22434         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
22435         * lib/unistd-safer.h: New files.
22436
22437 2001-02-25  Paul Eggert  <eggert@twinsun.com>
22438
22439         The mkstemp replacement is taken from glibc 2.2.2, with some
22440         portability fixes for use outside glibc, as follows:
22441
22442         * lib/tempname.c (struct_stat64): New macro.
22443         (direxists, __gen_tempname): Use it.
22444         This avoids a portability problem with Solaris 8.
22445
22446         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
22447         (<stddef.h>, <stdint.h>, <string.h>):
22448         Include only if STDC_HEADERS || _LIBC.
22449         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
22450         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
22451         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
22452         (__set_errno): Define this macro if <errno.h> doesn't.
22453         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
22454         Define these macros if <stdio.h> doesn't.
22455         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
22456         Define these macros if <sys/stat.h>
22457         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
22458         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
22459         __xstat64): Define if not _LIBC.
22460         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
22461         (__gen_tempname): Invoke gettimeofday only if
22462         HAVE_GETTIMEOFDAY || _LIBC;
22463         otherwise, fall back on plain "time".
22464         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
22465
22466         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
22467
22468         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
22469
22470 2001-02-18  Paul Eggert  <eggert@twinsun.com>
22471
22472         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
22473
22474 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22475
22476         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
22477         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
22478         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
22479         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22480
22481 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22482
22483         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
22484         Remove workaround macros for hosts that have mbrtowc but not
22485         mbstate_t, as we now insist on proper declarations for both
22486         before using mbrtowc.
22487
22488 2001-02-17  Jim Meyering  <meyering@lucent.com>
22489
22490         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
22491         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
22492         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
22493         UnixWare 7.1.1.
22494
22495         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
22496         rather than AC_CACHE_VAL.
22497
22498 2001-02-17  Jim Meyering  <meyering@lucent.com>
22499
22500         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
22501         around included file name.
22502
22503         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
22504
22505         * lib/strftime.c: Update from GNU libc (the only changes were to
22506         comments).
22507
22508 2001-02-17  Jim Meyering  <meyering@lucent.com>
22509
22510         * lib/regex.c: Update from libc.
22511
22512 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
22513
22514         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
22515         clash.
22516
22517 2001-02-16  Paul Eggert  <eggert@twinsun.com>
22518
22519         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
22520         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
22521         Reported by Mark Hounschell via Paul Eggert.
22522
22523 2001-02-07  Jim Meyering  <meyering@lucent.com>
22524
22525         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
22526
22527 2001-02-05  Jim Meyering  <meyering@lucent.com>
22528
22529         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
22530         it includes the patch required for `large file' support with at least
22531         HP-UX's 10.20 /bin/cc.
22532
22533 2001-02-03  Jim Meyering  <meyering@lucent.com>
22534
22535         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
22536         AS_IF, now that it works once again (mysteriously).
22537         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22538
22539 2001-01-30  Jim Meyering  <meyering@lucent.com>
22540
22541         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
22542         * m4/chown.m4: Rename conftestchown to conftest.chown.
22543         * m4/rename.m4: s/conftestdir/conftest.d1/ and
22544         s/conftestdir2/conftest.d2/.
22545         * m4/utimes.m4: s/conftestdata/conftest.data/
22546         Inspired by Pavel Roskin's change in autoconf.
22547
22548 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
22549
22550         * lib/config.charset: Update for FreeBSD 4.2.
22551
22552 2001-01-27  Jim Meyering  <meyering@lucent.com>
22553
22554         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
22555         a use of AS_IF.
22556         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22557
22558 2001-01-26  Jim Meyering  <meyering@lucent.com>
22559
22560         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
22561         quotearg.c includes it.
22562
22563 2001-01-26  Jim Meyering  <meyering@lucent.com>
22564
22565         * lib/quotearg.c: Include stddef.h.
22566         * lib/quote.c: Include stddef.h.
22567         Reported by Axel Kittenberger.
22568
22569         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
22570         line in double quotes so that it evokes a better diagnostic.
22571         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
22572         Reported by Axel Kittenberger.
22573
22574 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
22575
22576         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
22577         as if it was a `charset'.
22578
22579 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22580
22581         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
22582         has const.
22583
22584 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22585
22586         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
22587         to avoid a warning.  Add back 'const' to inptr.
22588
22589 2001-01-20  Jim Meyering  <meyering@lucent.com>
22590
22591         Be sure that headers are checked before used in code compiled
22592         for the type checks.
22593         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
22594         In place of that, invoke jm_CHECK_ALL_TYPES.
22595         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
22596         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
22597         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
22598         The check for ssize_t was mistakenly run before the test for unistd.h.
22599
22600         The configure-time check for stdbool.h was missing.
22601         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
22602         (jm_PREREQ_HASH): New function.
22603
22604 2001-01-17  Jim Meyering  <meyering@lucent.com>
22605
22606         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
22607         for autoconf-2.49c.
22608         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
22609
22610 2001-01-16  Jim Meyering  <meyering@lucent.com>
22611
22612         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
22613         From Bruno Haible.
22614
22615 2001-01-14  Jim Meyering  <meyering@lucent.com>
22616
22617         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
22618         foo and bar.  Create conftestdir/ in the script, not in the C code.
22619         Remove directories in the script, not in the C code.
22620         Remove conftestdir{,2} before trying to create the directory.
22621         Make the entire configure script fail if the mkdir fails.
22622
22623 2001-01-14  Jim Meyering  <meyering@lucent.com>
22624
22625         * lib/rename.c: New file.  From Volker Borchert.
22626         Include stdlib.h, string.h or strings.h, and xalloc.h.
22627         Use strip_trailing_slashes rather than open-coding it.
22628
22629 2001-01-03  Paul Eggert  <eggert@twinsun.com>
22630
22631         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
22632
22633 2001-01-03  Jim Meyering  <meyering@lucent.com>
22634
22635         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
22636         of local `inptr' to avoid warning with some system declarations of
22637         iconv.
22638
22639 2001-01-02  Volker Borchert  <bt@teknon.de>
22640
22641         * m4/rename.m4: New file.
22642         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
22643
22644 2001-01-01  Jim Meyering  <meyering@lucent.com>
22645
22646         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
22647         even on systems with utmpx.h.  It's necessary for the declaration of
22648         utmp's ut_user member.  Reported by Andreas Jaeger.
22649
22650         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
22651         available. They are required for the declarations of getgrgid and
22652         getpwuid resp.
22653         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
22654         Reported by Andreas Jaeger.
22655
22656 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
22657
22658         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
22659         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
22660         so `make install' also works in VPATH builds.
22661
22662 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
22663
22664         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
22665         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
22666         can be used in subdirectories.
22667
22668 2000-12-29  Paul Eggert  <eggert@twinsun.com>
22669
22670         * lib/modechange.c: Do not assume that mode_t uses the
22671         traditional octal encoding.  E.g. "chmod 1 FOO" should set
22672         the other-execute bit of FOO even if S_IXOTH != 1.
22673
22674         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
22675         WOTH, XOTH, ALLM): New macros.
22676         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
22677          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
22678         Use them.
22679         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
22680         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
22681         (mode_compile):
22682         No need to use uintmax_t; unsigned long is long enough.
22683         Don't bother to get suffix since we don't use it.
22684
22685 2000-12-26  Jim Meyering  <meyering@lucent.com>
22686
22687         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
22688         better with autoheader.
22689
22690 2000-12-24  Jim Meyering  <meyering@lucent.com>
22691
22692         * lib/hash.c (is_prime): Return explicit boolean values.
22693         (hash_get_first): Return NULL to appease Irix5.6's 89.
22694         Reported by Nelson Beebe.
22695
22696 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
22697
22698         * lib/localcharset.c (locale_charset): Add support for Win32.
22699
22700 2000-12-18  Paul Eggert  <eggert@twinsun.com>
22701
22702         * lib/physmem.h, lib/physmem.c: New files.
22703
22704         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
22705         (noinst_HEADERS): Add physmem.h.
22706
22707         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
22708         't' for compatibility with Solaris 8 sort.
22709
22710 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
22711
22712         * lib/config.charset: Add support for BeOS.
22713
22714 2000-12-17  Jim Meyering  <meyering@lucent.com>
22715
22716         * m4/dos.m4 (jm_AC_DOS): New file and macro.
22717         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
22718
22719 2000-12-16  Jim Meyering  <meyering@lucent.com>
22720
22721         This bug had a serious impact on chown: `chown N:M FILE' (for integer
22722         N and M) would have treated it like `chown N:N FILE'.
22723
22724         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
22725
22726 2000-12-16  Jim Meyering  <meyering@lucent.com>
22727
22728         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
22729         SHELLS_FILE to a file name that's useful on djgpp systems.
22730         Include stdlib.h.
22731         (ADDITIONAL_DEFAULT_SHELLS): Define.
22732         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
22733         Based mostly on a patch from Prashant TR.
22734
22735 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
22736
22737         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
22738         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
22739         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
22740
22741 2000-12-08  Andreas Schwab  <schwab@suse.de>
22742
22743         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
22744         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
22745
22746 2000-12-07  Jim Meyering  <meyering@lucent.com>
22747
22748         * lib/stripslash.c (ISSLASH): Define.
22749         (strip_trailing_slashes): Use ISSLASH rather than comparing against
22750         `/'.
22751         From Prashant TR.
22752
22753         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
22754         (dir_name_r): Declare this function as static.
22755         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
22756         manifest itself on a name containing a mix of slashes and
22757         backslashes.
22758         Make this function work with names starting with a DOS-style
22759         drive letter and colon prefix.
22760         (dir_name): Append `.' if necessary.
22761         Based mostly on patches from Prashant TR and Eli Zaretskii.
22762
22763         * lib/dirname.h (dir_name_r): Remove prototype.
22764
22765 2000-12-06  Paul Eggert  <eggert@twinsun.com>
22766
22767         * m4/off_t-format.m4: Remove this file.
22768         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
22769
22770 2000-12-06  Jim Meyering  <meyering@lucent.com>
22771
22772         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
22773         replacement strtoull, we may well need the replacement strtoul, too.
22774         Check for declarations of strtoul and strtoull.
22775         Check for strtol.  Mainly as a cue to cause automake to include
22776         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
22777         Check for limits.h -- strtol.c needs it.
22778
22779 2000-12-05  Jim Meyering  <meyering@lucent.com>
22780
22781         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
22782
22783 2000-12-04  Jim Meyering  <meyering@lucent.com>
22784
22785         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
22786         Also include memory.h, stdlib.h, unistd.h if appropriate.
22787         Reported by Andreas Jaeger (conflicting declaration of malloc).
22788
22789 2000-12-02  Jim Meyering  <meyering@lucent.com>
22790
22791         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
22792         * m4/jm-macros.m4 (jm_MACROS): require it.
22793
22794 2000-12-02  Jim Meyering  <meyering@lucent.com>
22795
22796         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
22797
22798 2000-12-01  Paul Eggert  <eggert@twinsun.com>
22799
22800         * lib/memrchr.c: Include <config.h> before any system include file.
22801
22802 2000-11-30  Jim Meyering  <meyering@lucent.com>
22803
22804         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
22805
22806 2000-11-30  Jim Meyering  <meyering@lucent.com>
22807
22808         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
22809
22810 2000-11-29  Paul Eggert  <eggert@twinsun.com>
22811
22812         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
22813
22814 2000-11-26  Jim Meyering  <meyering@lucent.com>
22815
22816         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
22817
22818 2000-11-22  Paul Eggert  <eggert@twinsun.com>
22819
22820         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
22821         size of (size_t) -1; it's not portable.
22822
22823 2000-11-17  Jim Meyering  <meyering@lucent.com>
22824
22825         * lib/strstr.c: Update from GNU libc.
22826
22827 2000-11-17  Akim Demaille  <akim@epita.fr>
22828
22829         * lib/obstack.h: Formatting changes.
22830         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
22831         prevent type checking.
22832         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22833         cast the value to (void *): assigning a `foo *' to a `void *'
22834         variable is valid.
22835         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22836
22837 2000-11-16  Jim Meyering  <meyering@lucent.com>
22838
22839         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
22840
22841 2000-11-11  Jim Meyering  <meyering@lucent.com>
22842
22843         * lib/error.c: Add a couple #includes, merging from GNU libc version.
22844
22845 2000-11-10  Jim Meyering  <meyering@lucent.com>
22846
22847         * lib/obstack.h: Update from GNU libc.
22848         * lib/obstack.c: Likewise.
22849
22850 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
22851
22852         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
22853
22854 2000-11-06  Paul Eggert  <eggert@twinsun.com>
22855
22856         * lib/getusershell.c (setusershell): Use rewind rather than
22857         fseek/fseeko, to avoid configuration hassles with fseeko.
22858         Don't bother opening SHELLS_FILE if shellstream is NULL;
22859         it's not necessary.
22860
22861 2000-11-05  Jim Meyering  <meyering@lucent.com>
22862
22863         * lib/makepath.h (make_dir): Declare.
22864         * lib/makepath.c (make_dir): Remove `static' attribute.
22865         Tweak a comment.
22866
22867 2000-11-04  Jim Meyering  <meyering@lucent.com>
22868
22869         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
22870
22871 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
22872
22873         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
22874         last one in a bucket, advance to the next bucket.
22875
22876 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
22877
22878         * lib/fnmatch.c: Do not comment out all the code if we are using
22879         the GNU C library, because in some cases we are replacing buggy
22880         code in the GNU C library itself.
22881
22882 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
22883
22884         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
22885         (regex_compile): Catch bogus \(\1\).
22886
22887 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22888
22889         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
22890         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
22891         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
22892
22893 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22894
22895         * lib/error.h, getline.h, modechange.h:
22896         Remove "2000" from Copyright line, as the file hasn't been
22897         changed this year other than in the copyright notice.
22898
22899         * lib/xalloc.h: Add "2000" to Copyright line, as this file
22900         was changed this year.
22901
22902 2000-10-29  Jim Meyering  <meyering@lucent.com>
22903
22904         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
22905         renaming.
22906         * m4/ls-mntd-fs.m4: Likewise
22907
22908 2000-10-29  Jim Meyering  <meyering@lucent.com>
22909
22910         * lib/xstat.in: Fix grammar in comment.
22911
22912 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
22913
22914         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
22915         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
22916         doesn't define __restrict_arr.
22917
22918 2000-10-28  Jim Meyering  <meyering@lucent.com>
22919
22920         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
22921         (jm_PREREQ_MEMCHR): New function.
22922
22923 2000-10-28  Jim Meyering  <meyering@lucent.com>
22924
22925         * lib/memchr.c: Update from libc.
22926         Adjust for portability:
22927         [HAVE_STDLIB_H]: Include stdlib.h.
22928         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
22929         Undef __memchr, too.
22930         [!weak_alias]: Define __memchr to memchr.
22931
22932         * lib/regex.c: Update from libc.
22933         * lib/regex.h: Likewise.
22934         * lib/getopt1.c: Likewise.
22935         * lib/memcmp.c: Likewise.
22936
22937         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
22938         Avoid using fseek, when possible -- it's broken by design.
22939         Patch by Ulrich Drepper.
22940
22941 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
22942
22943         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
22944         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
22945         Giving in to popular pressure to shut up the compiler with casts.
22946
22947 2000-10-26  Jim Meyering  <meyering@lucent.com>
22948
22949         * lib/strftime.c: Update from libc.
22950
22951 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
22952
22953         * regex.c: More `unsigned char' -> `re_char' changes.
22954         Also change several `int' into `re_wchar_t'.
22955         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
22956         (PUSH_FAILURE_POINTER): Don't cast any more.
22957         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
22958         We want GCC to complain, since this piece of code makes
22959         re_match non-reentrant, which *should* be fixed.
22960         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
22961         (EXTEND_BUFFER): Use RETALLOC.
22962         (SET_LIST_BIT): Don't cast.
22963         (re_wchar_t): New type.
22964         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
22965         that those two functions will always properly return.
22966         (IMMEDIATE_QUIT_CHECK): Cast to void.
22967         (analyse_first): Use recursion rather than an explicit stack.
22968         (re_compile_fastmap): Can't fail anymore.
22969         (re_search_2): Don't check re_compile_fastmap for failure.
22970         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
22971         Now also sets the new value (passed in a new argument).
22972         (re_match_2_internal): Use it.
22973         Also, use a new var `reg' of type size_t when looping through regs
22974         rather than reuse the inappropriate `mcnt'.
22975
22976 2000-10-25  Jim Meyering  <meyering@lucent.com>
22977
22978         * lib/obstack.c: Update from libc.
22979
22980 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
22981
22982         * regex.c (regex_compile): Change the way of handling a range from
22983         a char less than 256 to a char not less than 256.
22984
22985 2000-10-24  Andrew Innes  <andrewi@gnu.org>
22986
22987         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
22988         NT-Emacs only.
22989         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
22990         so that re_search functions only quit when callers expect them to.
22991
22992 2000-10-23  Jim Meyering  <meyering@lucent.com>
22993
22994         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
22995         wrong.  That set_locale call must not have any side effects.
22996         From Paul Eggert.
22997
22998 2000-10-22  Jim Meyering  <meyering@lucent.com>
22999
23000         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
23001         [CYCLIC]: Remove now-unused definition.
23002
23003         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
23004         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
23005         Suggestion from Ulrich Drepper.
23006
23007 2000-10-21  Jim Meyering  <meyering@lucent.com>
23008
23009         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
23010         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
23011         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
23012
23013 2000-10-21  Jim Meyering  <meyering@lucent.com>
23014
23015         * lib/dirname.c (memrchr): Declare if necessary.
23016         (dir_name): Remove the restriction that there be no
23017         trailing slashes.  Now, this code skips past them, effectively
23018         ignoring them.
23019         [TEST_DIRNAME] (main): New unit tests.
23020
23021         * lib/memrchr.c: New file from GNU libc.
23022         Undef __memrchr, too.
23023         [!weak_alias]: Define __memrchr to memrchr.
23024         Guard weak_alias use with `#ifdef weak_alias'.
23025
23026 2000-10-21  Jim Meyering  <meyering@lucent.com>
23027
23028         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
23029         (dir_name): Use dir_name_r.
23030         * lib/dirname.h (dir_name_r): Declare it.
23031
23032 2000-10-17  Jim Meyering  <meyering@lucent.com>
23033
23034         * lib/quote.h (PARAMS): Define and use.
23035         Reported by Akim Demaille.
23036
23037         * lib/getopt.c: Update from libc.
23038
23039 2000-10-16  Jim Meyering  <meyering@lucent.com>
23040
23041         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
23042         setlocale.
23043         From Jan Fedak.
23044
23045 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
23046
23047         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
23048
23049 2000-09-25  Jim Meyering  <meyering@lucent.com>
23050
23051         * lib/md5.h (rol): Define (from GnuPG).
23052
23053         * lib/sha.c: Give credit (GnuPG) where due.
23054         (M): Use rol rather than open-coding it.
23055         Add a FIXME comment.
23056
23057 2000-09-21  Jim Meyering  <meyering@lucent.com>
23058
23059         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
23060         Reported by Michael Stone.
23061
23062 2000-09-20  Jim Meyering  <meyering@lucent.com>
23063
23064         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
23065         (noinst_HEADERS): Add sha.h.
23066         Based on code from Scott G. Miller and from GnuPG.
23067
23068 2000-09-18  Jim Meyering  <meyering@lucent.com>
23069
23070         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
23071         LIBS. Otherwise, everyone ends up linking with -lelf for some
23072         configurations.
23073         Reported by Mike Stone.
23074
23075 2000-09-15  Jim Meyering  <meyering@lucent.com>
23076
23077         * lib/regex.c: Update from libc.
23078
23079 2000-09-10  Jim Meyering  <meyering@lucent.com>
23080
23081         * lib/getopt.c (_getopt_internal): Update from glibc.
23082
23083 2000-09-09  Jim Meyering  <meyering@lucent.com>
23084
23085         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
23086         think it should be used as a general replacement for isascii.
23087         * lib/fnmatch.c: Likewise.
23088         * lib/mbswidth.c: Likewise
23089         * lib/regex.c: Likewise.
23090
23091         Don't use atoi.
23092         * lib/userspec.c: Include sys/param.h and limits.h.
23093         Include xstrtol.h.
23094         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23095         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
23096         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
23097         UID, GID.  Check range.
23098
23099 2000-09-06  Jim Meyering  <meyering@lucent.com>
23100
23101         * lib/getopt.c (_getopt_internal): Update from glibc.
23102
23103 2000-08-30  Jim Meyering  <meyering@lucent.com>
23104
23105         * lib/strftime.c: Merge in changes from GNU libc.
23106
23107 2000-08-26  Jim Meyering  <meyering@lucent.com>
23108
23109         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
23110         * m4/fpending.m4: New file.
23111
23112 2000-08-26  Jim Meyering  <meyering@lucent.com>
23113
23114         * lib/closeout.c: Include "__fpending.h".
23115         (close_stdout_status): Return right away if there's nothing to flush.
23116
23117         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
23118         * lib/__fpending.c: New file.
23119         * lib/__fpending.h: New file.
23120
23121 2000-08-20  Jim Meyering  <meyering@lucent.com>
23122
23123         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
23124         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
23125         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
23126
23127 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
23128
23129         Improve fileutils installation on systems where running
23130         programs (like install) can't be unlinked.
23131         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
23132         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
23133
23134 2000-08-07  Paul Eggert  <eggert@twinsun.com>
23135
23136         Standardize on "memory exhausted" instead of "Memory exhausted"
23137         or "virtual memory exhausted".
23138         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
23139         "virtual memory exhausted".
23140         * lib/same.c (same_name): Invoke xalloc_die instead of printing
23141         our own message.
23142         * lib/userspec.c (parse_user_spec): Likewise.
23143         * lib/bumpalloc.h: comment fix
23144         * lib/same.c, userspec.c: Include xalloc.h.
23145
23146         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
23147         not char *const and pointing to a constant array.
23148         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
23149         (xrealloc): Comment fix.
23150
23151         * lib/userspec.c (parse_user_spec):
23152         Don't translate a message until just before returning,
23153         to avoid unnecessary translation.
23154
23155 2000-08-07  Jim Meyering  <meyering@lucent.com>
23156
23157         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
23158         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
23159         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
23160         getgroups.c, gethostname.c, getopt.h, group-member.c,
23161         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
23162         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
23163         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
23164         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
23165         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
23166         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
23167         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
23168         yesno.c: Back out Copyright date changes for each file with no change
23169         this year.  This eases coordination with other programs using the same
23170         source code modules.  From Paul Eggert.
23171
23172 2000-08-06  Paul Eggert  <eggert@twinsun.com>
23173
23174         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
23175         not char, for compatibility with glibc 2.1.3 strftime.c.
23176
23177 2000-08-03  Greg McGary  <greg@mcgary.org>
23178
23179         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
23180         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
23181         (EXTEND_BUFFER): Use them.
23182
23183 2000-08-01  Jim Meyering  <meyering@lucent.com>
23184
23185         * lib/dirname.c (ISSLASH): Define.
23186         (BACKSLASH_IS_PATH_SEPARATOR): Define.
23187         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
23188         both `\' and `/' may be use as path separators.
23189         Based on a patch from Prashant TR.
23190
23191 2000-07-31  Paul Eggert  <eggert@twinsun.com>
23192
23193         * lib/quotearg.c (quotearg_n_options): Don't make the initial
23194         slot vector a constant, since it might get modified.
23195
23196 2000-07-31  Jim Meyering  <meyering@lucent.com>
23197
23198         * lib/xmalloc.c: Use `virtual memory exhausted', not
23199         `Memory exhausted'.
23200         * lib/obstack.c (print_and_abort): Likewise.
23201
23202 2000-07-30  Paul Eggert  <eggert@twinsun.com>
23203
23204         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
23205         buffer, so that the caller can always quote one small
23206         component of a "memory exhausted" message in slot 0.
23207         From a suggestion by Jim Meyering.
23208
23209 2000-07-30  Jim Meyering  <meyering@lucent.com>
23210
23211         * lib/makepath.c (make_path): Quote the other instance, too.
23212
23213         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
23214         (STATIC_BUF_SIZE): Define.
23215         (quotearg_n_options): Use only statically allocated storage when
23216         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
23217         than STATIC_BUF_SIZE.
23218
23219 2000-07-29  Jim Meyering  <meyering@lucent.com>
23220
23221         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
23222         * lib/dirname.c (dir_name): Likewise.
23223
23224         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
23225         `/'.
23226
23227         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
23228         (dir_name): Assert that there are no trailing slashes.
23229
23230 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
23231
23232         * lib/mbswidth.h (mbswidth): Add a flags argument.
23233         (mbswidth): New declaration.
23234         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
23235         * lib/mbswidth.c (mbswidth): Add a flags argument.
23236         (mbsnwidth): New function.
23237
23238 2000-07-24  Jim Meyering  <meyering@lucent.com>
23239
23240         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
23241
23242 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23243
23244         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
23245
23246 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23247
23248         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
23249         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
23250         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
23251         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
23252         invoke multibyte primitives.
23253
23254 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23255
23256         * lib/quotearg.c:
23257         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
23258         so that mbstate_t is always defined.
23259
23260         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
23261         be 1 in at least one GCC installation, and this configuration
23262         error is likely to be common.  Ignoring MB_LEN_MAX hurts
23263         performance on hosts that have mbrtowc but have only unibyte
23264         locales, but I assume these hosts are rare.
23265
23266 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23267
23268         * lib/mbswidth.c (_XOPEN_SOURCE):
23269         Don't define; this causes problems on Solaris 7.
23270         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
23271
23272 2000-07-23  Jim Meyering  <meyering@lucent.com>
23273
23274         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
23275         too: getgrgid, getpwuid, getuid.
23276
23277 2000-07-23  Jim Meyering  <meyering@lucent.com>
23278
23279         * lib/basename.c (base_name): Add an assertion.
23280
23281 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
23282
23283         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
23284         shadow its mbsinit function.
23285
23286 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23287
23288         * lib/mbswidth.h: New file.
23289         * lib/mbswidth.c: New file.
23290         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
23291         (noinst_HEADERS): Add mbswidth.h.
23292
23293 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23294
23295         * lib/config.charset: Add support for FreeBSD. Improve support for
23296         HP-UX and IRIX 6.
23297
23298 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
23299
23300         * m4/mbswidth.m4: New file.
23301         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
23302
23303 2000-07-15  Jim Meyering  <meyering@lucent.com>
23304
23305         * lib/makepath.c: Include quote.h.
23306         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
23307         corresponding argument in a `quote (...)' call.
23308         Give better diagnostics.
23309
23310         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
23311         (noinst_HEADERS): Add quote.h.
23312
23313         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
23314         from tar's src/misc.c.
23315         * lib/quote.h: New file.  Prototypes for same.
23316
23317 2000-07-14  Paul Eggert  <eggert@twinsun.com>
23318
23319         From a suggestion by Bruno Haible.
23320         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
23321         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
23322         to decide whether to define the BeOS workaround macro;
23323         this adjusts to the change to AC_MBSTATE_T.
23324
23325 2000-07-14  Jim Meyering  <meyering@lucent.com>
23326
23327         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
23328         jm_AC_TYPE_UINTMAX_T.
23329
23330 2000-07-13  Paul Eggert  <eggert@twinsun.com>
23331
23332         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
23333
23334         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
23335         quotearg_buffer_restyled): Add support for
23336         clocale_quoting_style.  Undo previous change to
23337         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
23338         and "{RIGHT QUOTATION MARK}" msgids.
23339
23340 2000-07-10  Paul Eggert  <eggert@twinsun.com>
23341
23342         From a suggestion by Bruno Haible.
23343         * m4/mbstate_t.m4 (AC_MBSTATE_T):
23344         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
23345         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
23346         and mbstate_t, to a single-part test that simply defines mbstate_t.
23347         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
23348         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
23349
23350 2000-07-10  Jim Meyering  <meyering@lucent.com>
23351
23352         * m4/strerror_r.m4: Mirror the correction made in autoconf.
23353
23354         * m4/gnu-source.m4: Output to confdefs.h directly.
23355         Suggestion from Akim Demaille.
23356
23357 2000-07-09  Paul Eggert  <eggert@twinsun.com>
23358
23359         The old behavior of quoting `like this' doesn't look good with
23360         newer, ISO-style fonts.  See:
23361         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
23362
23363         Instead, quote "like this" by default.  Let the translator
23364         tailor the locale-specific quoting behavior by providing
23365         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
23366
23367         * lib/quotearg.c (N_): New macro.
23368         (gettext_default): New function.
23369         (quotearg_buffer_restyled): Use
23370         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
23371         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
23372
23373 2000-07-09  Jim Meyering  <meyering@lucent.com>
23374
23375         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
23376         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
23377
23378         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
23379         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
23380
23381 2000-07-09  Jim Meyering  <meyering@lucent.com>
23382
23383         * lib/Most files: Update copyright dates to include 2000.
23384
23385 2000-07-08  Jim Meyering  <meyering@lucent.com>
23386
23387         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
23388         if not defined.
23389         (xgethostname): Remove now-unnecessary #ifdef.
23390         Move declaration of `err' into loop where it's used.
23391
23392 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23393         and Bruno Haible  <haible@clisp.cons.org>
23394
23395         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
23396         only if the test for an object-type mbstate_t fails.  This
23397         prevents us from mistakenly reporting that mbstate_t is a
23398         system object type after we "#define mbstate_t int" to work
23399         around its lack.
23400
23401 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23402         and Bruno Haible  <haible@clisp.cons.org>
23403
23404         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
23405
23406 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23407
23408         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
23409         to strerror_r.
23410         Include <ctype.h> for use of isalpha.
23411
23412 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23413
23414         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
23415         by allocating a larger buffer. Test the gethostname return value for
23416         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
23417         returns an error and ENAMETOOLONG isn't defined.
23418
23419 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23420
23421         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
23422         dimension.
23423
23424 2000-07-04  Jim Meyering  <meyering@lucent.com>
23425
23426         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
23427         of the deprecated AC_CHECKING.
23428
23429 2000-07-04  Jim Meyering  <meyering@lucent.com>
23430
23431         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
23432         Reported by Bruno Haible.
23433
23434 2000-07-04  Jim Meyering  <meyering@lucent.com>
23435
23436         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
23437         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
23438         lacks mbrtowc.
23439
23440 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23441
23442         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
23443         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
23444
23445 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23446         and Bruno Haible  <haible@clisp.cons.org>
23447
23448         * lib/quotearg.c (mbrtowc):
23449         Assign to *pwc, and return 1 only if result is nonzero.
23450         (iswprint): Use ISPRINT when substituting our own mbrtowc.
23451
23452 2000-07-03  Jim Meyering  <meyering@lucent.com>
23453
23454         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
23455
23456 2000-07-03  Jim Meyering  <meyering@lucent.com>
23457
23458         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
23459         This is necessary to get a definition of e.g., UTMP_FILE on
23460         HP-UX 10.20.
23461         From Bob Proulx.
23462
23463 2000-07-02  Jim Meyering  <meyering@lucent.com>
23464
23465         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
23466
23467         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
23468         AC_LIBOBJ(function_name).
23469         * m4/chown.m4: Likewise.
23470         * m4/fnmatch.m4: Likewise.
23471         * m4/ftruncate.m4: Likewise.
23472         * m4/getgroups.m4: Likewise.
23473         * m4/getline.m4: Likewise.
23474         * m4/group-member.m4: Likewise.
23475         * m4/jm-macros.m4: Likewise.
23476         * m4/lstat.m4: Likewise.
23477         * m4/malloc.m4: Likewise.
23478         * m4/memcmp.m4: Likewise.
23479         * m4/nanosleep.m4: Likewise.
23480         * m4/putenv.m4: Likewise.
23481         * m4/realloc.m4: Likewise.
23482         * m4/regex.m4: Likewise.
23483         * m4/stat.m4: Likewise.
23484         * m4/strftime.m4: Likewise.
23485
23486 2000-07-02  Jim Meyering  <meyering@lucent.com>
23487
23488         * lib/quotearg.c (mbstate_t): Don't define here.
23489
23490 2000-07-02  Jim Meyering  <meyering@lucent.com>
23491
23492         * lib/nanosleep.c (SIGCONT): Define if not already defined.
23493
23494 2000-07-01  Jim Meyering  <meyering@lucent.com>
23495
23496         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
23497
23498 2000-07-01  Jim Meyering  <meyering@lucent.com>
23499
23500         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
23501         problem.
23502
23503 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23504
23505         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
23506         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
23507
23508 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23509
23510         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
23511         per change in ../m4/ls-mntd-fs.m4.
23512         (read_filesystem_list): Ignore symbolic links.
23513
23514 2000-06-29  Jim Meyering  <meyering@lucent.com>
23515
23516         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
23517         for declaration of strcmp.
23518
23519         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
23520
23521         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
23522         Avoid warning by casting result to `char *' to remove `const'.
23523
23524 2000-06-28  Jim Meyering  <meyering@lucent.com>
23525
23526         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
23527         included by quotearg.c, for which we perform this test.  From
23528         Bruno Haible.
23529
23530 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23531
23532         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
23533         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
23534         <utmpx.h> exists, put readutmp.o into LIBOBJS.
23535
23536 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23537
23538         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
23539
23540 2000-06-26  Paul Eggert  <eggert@twinsun.com>
23541
23542         savedir now sets errno on failure and invokes xmalloc to get memory.
23543         Fix a couple of other minor bugs while we're at it.
23544
23545         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
23546         (NAMLEN): Remove macro.
23547         (malloc, realloc): Remove decls.
23548         (stpcpy): Likewise.
23549         ("xalloc.h"): Include.
23550         (NAME_SIZE_DEFAULT): New macro.
23551         (savedir): Use xmalloc / xrealloc to allocate memory.
23552         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
23553         Skip "" directory entries.
23554         Use strlen to calculate directory entry length, since the old method
23555         is rarely used these days and isn't worth supporting.
23556         Don't use a pointer after freeing it.
23557         Check for integer overflow when calculating allocation size.
23558         Use memcpy to copy entries, instead of stpcpy.
23559         Set errno properly when returning NULL.
23560         Check for readdir error.
23561
23562 2000-06-26  Jim Meyering  <meyering@lucent.com>
23563
23564         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
23565
23566 2000-06-25  Jim Meyering  <meyering@lucent.com>
23567
23568         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
23569         Linux header bug when _XOPEN_SOURCE is defined to 500.
23570
23571 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23572
23573         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
23574         deficiency.
23575
23576 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23577
23578         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
23579         Include xalloc.h.
23580         Don't include <stdlib.h>.  Don't declare malloc, realloc.
23581
23582 2000-06-24  Jim Meyering  <meyering@lucent.com>
23583
23584         * m4/strerror_r.m4: Revive this file -- to try out an experimental
23585         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
23586         for which strerror does return char*, but which lacks a conveniently
23587         accessible declaration of the function.  If the compile-test says
23588         strerror_r doesn't work, then resort to a `run'-test that works on
23589         BeOS and segfaults on DEC Unix.
23590
23591 2000-06-24  Jim Meyering  <meyering@lucent.com>
23592
23593         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
23594
23595 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23596
23597         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
23598         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
23599
23600 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23601
23602         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
23603         (mbrtowc, mbstate_t): Define substitutes if
23604         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
23605         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
23606         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
23607
23608 2000-06-23  Jim Meyering  <meyering@lucent.com>
23609
23610         * m4/afs.m4: Add missing AC_MSG_RESULT.
23611         Reported by Bruno Haible.
23612
23613         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
23614         Suggestion from Bruno Haible.
23615
23616 2000-06-23  Jim Meyering  <meyering@lucent.com>
23617
23618         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
23619
23620 2000-06-21  Jim Meyering  <meyering@lucent.com>
23621
23622         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
23623
23624 2000-06-21  Jim Meyering  <meyering@lucent.com>
23625
23626         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
23627         (noinst_HEADERS): Add getstr.h.
23628
23629         * lib/getline.c (getstr): Move into a separate file.
23630         * lib/getstr.c (getstr): New file, extracted from getline.c, with
23631         the following changes: new parameter, delim2; both delim[12]
23632         parameters have type `int', not `char'.  The latter would lose
23633         with 8-bit delimiters.
23634         * lib/getstr.h: New file.
23635
23636 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23637
23638         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
23639         than 1024, return a memory chunk of least possible size, instead
23640         of size PATH_MAX + 2. In the loop, increment the size proportionally.
23641         Use free/xmalloc instead of xrealloc to avoid copying for very long
23642         paths.
23643
23644 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23645
23646         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
23647         the empty string.
23648
23649 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23650
23651         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
23652         address, not strdup.  Include <stdlib.h> and don't declare free().
23653
23654 2000-06-19  Jim Meyering  <meyering@lucent.com>
23655
23656         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
23657
23658 2000-06-18  Jim Meyering  <meyering@lucent.com>
23659
23660         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
23661
23662         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
23663         `checking whether...' message to be consistent with that of the
23664         lstat test.
23665
23666 2000-06-18  Jim Meyering  <meyering@lucent.com>
23667
23668         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
23669         Besides, these days every porting target provides a mkdir function.
23670
23671         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
23672         needed. (this snippet comes from src/system.h).
23673
23674 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
23675
23676         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
23677
23678 2000-06-15  Paul Eggert  <eggert@twinsun.com>
23679
23680         * lib/human.c (adjust_value): New function.
23681         (human_readable_inexact): Apply rounding style even when
23682         printing approximate values.
23683
23684 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23685
23686         * lib/human.c (human_readable_inexact): Allow an input block
23687         size that is not a multiple of the output block size, and vice versa.
23688         Reported by Piergiorgio Sartor.
23689
23690 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23691
23692         * lib/getdate.y (get_date): Apply relative times after time
23693         zone indicator, not before.  Reported by Todd A. Jacobs.
23694
23695 2000-06-13  Jim Meyering  <meyering@lucent.com>
23696
23697         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
23698
23699         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
23700
23701 2000-06-12  Paul Eggert  <eggert@twinsun.com>
23702
23703         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
23704
23705 2000-06-12  Jim Meyering  <meyering@lucent.com>
23706
23707         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
23708         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
23709         optional argument.
23710         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
23711         the optional argument, `lib'.
23712
23713 2000-06-08  Jim Meyering  <meyering@lucent.com>
23714
23715         * m4/largefile.m4: Remove file (now that it's part of autoconf).
23716
23717 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23718
23719         Rewrite largefile configuration so that we don't need to run
23720         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
23721         AC_CANONICAL_HOST in configure.in -- jmm]
23722
23723         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
23724         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
23725         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
23726         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
23727         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
23728         All uses changed.
23729         Instead of inspecting the output of getconf, try to compile the
23730         test program without and with the macro definition.
23731         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
23732         for getconf.  Instead, check for the needed flags by compiling
23733         test programs.
23734
23735 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23736
23737         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
23738
23739 2000-06-04  Jim Meyering  <meyering@lucent.com>
23740
23741         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
23742         SunOS 4.1.4 for which gid_t is an unsigned type.
23743
23744 2000-06-03  Jim Meyering  <meyering@lucent.com>
23745
23746         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
23747         now that autoconf requires that.
23748
23749         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
23750         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
23751         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
23752
23753 2000-06-03  Jim Meyering  <meyering@lucent.com>
23754
23755         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
23756
23757 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23758
23759         * m4/glibc21.m4: New file.
23760         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
23761
23762 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23763
23764         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
23765         newer, don't install charset.alias.
23766         * lib/config.charset: Change the Linux/glibc rules so they become empty
23767         on glibc-2.1 or newer.
23768
23769 2000-06-02  Jim Meyering  <meyering@lucent.com>
23770
23771         * lib/mountlist.c: Back out last change.  Instead, do this...
23772         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
23773         me_dummy member using the same `ignore'-testing code.
23774         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
23775         fs_type strings.
23776         From Mark D. Roth.
23777
23778 2000-05-29  Jim Meyering  <meyering@lucent.com>
23779
23780         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
23781         mounts with the `ignore' attribute.  Based on a patch from
23782         Mark D. Roth.
23783
23784 2000-05-28  Jim Meyering  <meyering@lucent.com>
23785
23786         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
23787         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23788         * m4/stat.m4: Likewise.
23789         * m4/lstat.m4: Likewise.
23790         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
23791
23792         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
23793         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
23794
23795 2000-05-26  Jim Meyering  <meyering@lucent.com>
23796
23797         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
23798
23799 2000-05-24  Jim Meyering  <meyering@lucent.com>
23800
23801         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
23802         autoconf requires that.
23803         * m4/lib-check.m4: Likewise.
23804         * m4/jm-macros.m4: Likewise.
23805         * m4/strftime.m4: Likewise.
23806
23807         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
23808         AC_CHECK_DECLS, now that autoconf requires that.
23809
23810 2000-05-22  Jim Meyering  <meyering@lucent.com>
23811
23812         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23813         * m4/lstat.m4: Likewise.
23814
23815 2000-05-22  Jim Meyering  <meyering@lucent.com>
23816
23817         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
23818
23819 2000-05-20  Jim Meyering  <meyering@lucent.com>
23820
23821         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
23822         (jm_PREREQ): Use it.
23823
23824 2000-05-18  Jim Meyering  <meyering@lucent.com>
23825
23826         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
23827         back, too, since it may have been modified by allocate_entry.
23828         (hash_delete): Rewrite to use neither the assignment operator
23829         nor the comma operator in an if-expression.
23830
23831 2000-05-15  Paul Eggert  <eggert@twinsun.com>
23832
23833         * lib/closeout.c:
23834         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
23835         Remove; no longer needed.
23836         "quotearg.h": Add include.
23837         (file_name): Do not bother to explicitly initialize to NULL; it's less
23838         efficient on some hosts.
23839         (close_stdout_status): Remove test as to whether stdout was already
23840         closed; it breaks for the case "echo x | sort >&-".
23841         Quote file name colons.
23842         Do not assume that _("write error") lacks format strings.
23843
23844 2000-05-15  Jim Meyering  <meyering@lucent.com>
23845
23846         * lib/version-etc.c (version_etc_copyright): Update the copyright
23847         string used in all --version output.
23848
23849 2000-05-14  Jim Meyering  <meyering@lucent.com>
23850
23851         * lib/closeout.c (close_stdout_set_file_name): New function.
23852         (close_stdout_status): Use new file-scoped global.
23853         Return right away if fstat says the stdout file descriptor is invalid.
23854         * lib/closeout.h (close_stdout_set_file_name): Declare.
23855
23856 2000-05-10  Jim Meyering  <meyering@lucent.com>
23857
23858         * lib/closeout.c [default_exit_status]: New file-scoped variable.
23859         (close_stdout_set_status): New function.
23860         * lib/closeout.h (close_stdout_set_status): Declare.
23861
23862 2000-05-09  Jim Meyering  <meyering@lucent.com>
23863
23864         * m4/gettext.m4: Rename this...
23865         * m4/libintl.m4: ...to this.
23866
23867 2000-05-08  Jim Meyering  <meyering@lucent.com>
23868
23869         * lib/long-options.c: Don't include closeout.h.
23870         (parse_long_options): Don't call close_stdout for --version.
23871
23872 2000-05-06  Paul Eggert  <eggert@twinsun.com>
23873
23874         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
23875         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
23876         2.1.3 bug.  This avoids a clash when files like regex.c define
23877         _GNU_SOURCE.
23878
23879 2000-05-06  Jim Meyering  <meyering@lucent.com>
23880
23881         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
23882         (AC_REPLACE_FUNCS): Add strnlen.
23883
23884         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
23885         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
23886
23887         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
23888         AC_SEARCH_LIBS call for nanosleep.
23889         (LIB_NANOSLEEP): Set and AC_SUBST.
23890
23891 2000-05-06  Jim Meyering  <meyering@lucent.com>
23892
23893         * lib/strnlen.c: Undefine __strnlen and strnlen.
23894         [!weak_alias]: Define __strnlen to strnlen.
23895
23896         * lib/atexit.c: New file, from libiberty.
23897
23898 2000-05-06  Jim Meyering  <meyering@lucent.com>
23899
23900         * lib/closeout.c (close_stdout_status): Also check for errors on the
23901         stderr stream.
23902
23903 2000-05-05  Jim Meyering  <meyering@lucent.com>
23904
23905         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
23906         AC_SEARCH_LIBS call for clock_gettime.
23907         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
23908
23909         * m4/search-libs.m4: Update from autoconf.
23910
23911         su doesn't work on Solaris 2.6.
23912         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
23913         <shadow.h>.  Reported by Dragos Harabor.
23914
23915 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
23916
23917         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
23918         memcpy instead of xmalloc, xrealloc, path_concat.
23919         (locale_charset): Treat empty environment variables as absent.
23920         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
23921
23922 2000-05-04  Jim Meyering  <meyering@lucent.com>
23923
23924         * lib/getopt.c: Update from glibc.
23925         * lib/obstack.c: Likewise.
23926         * lib/obstack.h: Likewise.
23927         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
23928         file
23929
23930         * lib/regex.h: Likewise.
23931         * lib/strndup.c: Likewise.
23932         * lib/strnlen.c: New file, from glibc.
23933
23934 2000-05-03  Jim Meyering  <meyering@lucent.com>
23935
23936         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
23937
23938 2000-05-02  Paul Eggert  <eggert@twinsun.com>
23939
23940         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
23941         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
23942         compile-time test, rather than inspecting host and OS, to
23943         decide whether to define _LARGEFILE_SOURCE.
23944
23945 2000-05-01  Jim Meyering  <meyering@lucent.com>
23946
23947         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
23948
23949         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
23950         Based on a patch from Bruno Haible.
23951
23952 2000-05-01  Jim Meyering  <meyering@lucent.com>
23953
23954         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
23955
23956 2000-04-29  Jim Meyering  <meyering@lucent.com>
23957
23958         * lib/path-concat.c: Declare strdup only if it's not defined.
23959         * lib/canon-host.c: Likewise.
23960
23961 2000-04-28  Jim Meyering  <meyering@lucent.com>
23962
23963         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
23964         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
23965         is included first, then limits.h is included by locale.h by libintl.h.
23966         From John David Anglin.
23967
23968 2000-04-25  Jim Meyering  <meyering@lucent.com>
23969
23970         * lib/makepath.c (S_IRWXUGO): Define.
23971         (make_path): Always perform explicit chmod if MODE specifies any
23972         of the `special' permission bits.  Prompted by a bug report against
23973         install from Mate Wierdl and Joost van Baal.
23974
23975 2000-04-18  Jim Meyering  <meyering@lucent.com>
23976
23977         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
23978         (jm_PREREQ): Use it.
23979
23980 2000-04-18  Jim Meyering  <meyering@lucent.com>
23981
23982         * lib/README: New file.
23983
23984         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
23985         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
23986
23987 2000-04-17  Jim Meyering  <meyering@lucent.com>
23988
23989         Get it right :-)
23990         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
23991         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
23992         Suggestion from Akim Demaille.
23993
23994 2000-04-17  Jim Meyering  <meyering@lucent.com>
23995
23996         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
23997         the definition of it to rpl_strftime also defined-away the system's
23998         declaration.
23999
24000 2000-04-15  Jim Meyering  <meyering@lucent.com>
24001
24002         Use `C' to denote so-called `contiguous' files, the same way
24003         that tar does.
24004         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
24005         (ftypelet): Use S_ISCTG.
24006         From Michael Deutschmann.
24007
24008 2000-04-14  Jim Meyering  <meyering@lucent.com>
24009
24010         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
24011         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
24012         clobbered.
24013
24014 2000-04-14  Jim Meyering  <meyering@lucent.com>
24015
24016         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
24017
24018 2000-04-13  Jim Meyering  <meyering@lucent.com>
24019
24020         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
24021         AH_VERBATIM to insert required #ifndef into config.h.in.
24022         Suggestion from Akim Demaille.
24023
24024 2000-04-12  Jim Meyering  <meyering@lucent.com>
24025
24026         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
24027         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
24028         Christian Krackowizer.
24029
24030         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
24031         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
24032         (AC_SYS_LARGEFILE): Require.
24033         (AM_C_PROTOTYPES): Require.
24034
24035 2000-04-08  Jim Meyering  <meyering@lucent.com>
24036
24037         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
24038         names don't conflict.  Reported by Eli Zaretskii.
24039
24040 2000-04-07  Jim Meyering  <meyering@lucent.com>
24041
24042         * lib/putenv.c: Move inclusion of errno.h so it follows that of
24043         sys/types.h, to work around system header problems on AIX 3.2.5.
24044         From Bruno Haible.
24045
24046 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
24047
24048         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
24049         bug.  Deal with the different error behavior of Irix iconv.
24050
24051 2000-04-05  Paul Eggert  <eggert@twinsun.com>
24052
24053         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
24054         IRIX if the installer said otherwise.
24055
24056 2000-04-05  Jim Meyering  <meyering@lucent.com>
24057
24058         Portability tweaks required for ultrix4.3.
24059         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
24060         (jm_CHECK_DECLS): Add getutent to the list of functions.
24061         (_jm_DECL_HEADERS): Add utmpx.h.
24062         From John David Anglin.
24063
24064         * m4/strftime.m4: Back out the 2000-04-02 change.
24065         Instead of that change, simply undefine putenv in the test program.
24066
24067 2000-04-05  Jim Meyering  <meyering@lucent.com>
24068
24069         Portability tweaks required for ultrix4.3.
24070         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
24071         getutent.
24072         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
24073         * lib/canon-host.c: Declare strdup.
24074         * lib/path-concat.c: Likewise.
24075         From John David Anglin.
24076
24077 2000-04-04  Jim Meyering  <meyering@lucent.com>
24078
24079         Be more DOS 8.3-friendly.
24080         * lib/ref-add.sin: Renamed from ref-add.sed.in.
24081         * lib/ref-del.sin: Renamed from ref-del.sed.in.
24082         * lib/Makefile.am: Reflect renaming.
24083         Reported by Eli Zaretskii.
24084
24085         Use a temporary file name that won't clash with `charset.alias'
24086         in the DOS 8.3 name space.
24087         * lib/Makefile.am (charset_tmp): Define.
24088         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
24089         (uninstall-local): Likewise.
24090         Reported by Eli Zaretskii.
24091
24092 2000-04-03  Jim Meyering  <meyering@lucent.com>
24093
24094         * m4/gettext.m4: Fix typo in comment.
24095
24096         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
24097         textutils/configure.in).  Suggestion from Paul Eggert.
24098         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
24099
24100 2000-04-02  Paul Eggert  <eggert@twinsun.com>
24101
24102         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
24103         variable in the shell rather than using putenv, which isn't
24104         portable.  This avoids the configure-time inter-test dependency
24105         on the potentially-renamed putenv function.
24106
24107 2000-03-30  Paul Eggert  <eggert@twinsun.com>
24108
24109         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
24110         before checking struct stat.st_blksize, so that
24111         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
24112
24113 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24114
24115         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
24116         since strftime.c uses HAVE_STRFTIME to decide whether to use
24117         the underlying strftime.
24118
24119 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24120
24121         * lib/time/strftime.c (my_strftime): Make sure we call the system
24122         strftime, not ourselves, when invoking the underlying strftime.
24123
24124 2000-03-24  Jim Meyering  <meyering@lucent.com>
24125
24126         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
24127         (charset_alias): Define.
24128         (install-exec-local): Factor out common code.
24129         (uninstall-local): Split lines longer than 80.
24130         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
24131         (SUFFIXES): Define.
24132         (.sed.in.sed): New rule.  Don't redirect directly to $@.
24133         (CLEANFILES): Add ref-add.sed and ref-del.sed.
24134
24135 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
24136
24137         * lib/config.charset: Output a line containing "Packages using this
24138         file".
24139         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
24140         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
24141         ref-del.sed): New rules.
24142
24143 2000-03-17  Jim Meyering  <meyering@lucent.com>
24144
24145         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
24146         Otherwise, include <strings.h>
24147
24148 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
24149
24150         * lib/unicodeio.c (utf8_wctomb): New function.
24151         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
24152         format instead of in UCS-4 with platform dependent endianness.
24153
24154 2000-03-10  Jim Meyering  <meyering@lucent.com>
24155
24156         * m4/lib-check.m4: Look for getspnam in -lgen, too.
24157         From Marco Franzen.
24158
24159 2000-03-07  Paul Eggert  <eggert@twinsun.com>
24160
24161         * lib/savedir.c (savedir): Work even if directory size is
24162         negative; this can happen with some screwy NFS configurations.
24163
24164 2000-03-06  Jim Meyering  <meyering@lucent.com>
24165
24166         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
24167         if it's NULL (because we ran out of memory).  From Bruno Haible.
24168
24169 2000-03-05  Jim Meyering  <meyering@lucent.com>
24170
24171         * lib/localcharset.c ("path-concat.h"): Include.
24172         (get_charset_aliases): Use path_concat instead of ANSI string
24173         concatenation.
24174
24175         * lib/unicodeio.h (PARAMS): Define.
24176         Use it to guard prototype.
24177
24178 2000-03-04  Jim Meyering  <meyering@lucent.com>
24179
24180         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
24181         for lib/localcharset.c.
24182
24183 2000-03-04  Jim Meyering  <meyering@lucent.com>
24184
24185         * lib/Makefile.am (install-exec-local): Create $(libdir) before
24186         installing into it.
24187         (uninstall-local): Uncomment this rule so `make distcheck' works
24188         once again.
24189
24190         * lib/unicodeio.c (<errno.h>): Include it.
24191         (errno): Declare if not defined.
24192
24193         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
24194
24195         * lib/config.charset: New version, incorporating remarks from a linux
24196         i18n mailing list.  From Bruno Haible.
24197
24198 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
24199
24200         * m4/codeset.m4: New file.
24201         * m4/iconv.m4: New file.
24202         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
24203
24204 2000-03-03  Jim Meyering  <meyering@lucent.com>
24205
24206         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
24207
24208 2000-03-02  Jim Meyering  <meyering@lucent.com>
24209
24210         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
24211         the messages come out on separate lines.
24212
24213         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
24214         rather than jm_CHECK_DECLARATIONS.
24215         * m4/decl.m4: Remove now-unused file.
24216
24217         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
24218         geteuid.
24219
24220 2000-03-02  Jim Meyering  <meyering@lucent.com>
24221
24222         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
24223
24224 2000-03-01  Jim Meyering  <meyering@lucent.com>
24225
24226         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
24227         * lib/unicodeio.c: Likewise.
24228
24229 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
24230
24231         * lib/config.charset: New file.
24232         * lib/localcharset.c: New file.
24233         * lib/unicodeio.h, lib/unicodeio.c: New files.
24234         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
24235         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
24236         (noinst_HEADERS): Add unicodeio.h.
24237         (all-local, install-exec-local, charset.alias): New targets.
24238
24239 2000-02-28  Paul Eggert  <eggert@twinsun.com>
24240
24241         * lib/quotearg.c (ALERT_CHAR): New macro.
24242         (quotearg_buffer_restyled): Use it.
24243
24244 2000-02-27  Jim Meyering  <meyering@lucent.com>
24245
24246         * m4/check-decl.m4: Add getenv to the list.
24247
24248 2000-02-27  Jim Meyering  <meyering@lucent.com>
24249
24250         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
24251         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
24252
24253         * lib/backupfile.c: Guard inclusion of stdlib.h with
24254         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
24255         Declare malloc if needed.
24256
24257         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
24258         `#ifndef HAVE_DECL..'
24259         now that autoconf always defines the HAVE_DECL_ symbols.
24260         * lib/human.c: Likewise.
24261         * lib/same.c: Likewise.
24262         * lib/strtoumax.c: Likewise.
24263
24264         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
24265         declaration check was not run.
24266         * lib/hash.c: Likewise.
24267         * lib/human.c: Likewise.
24268         * lib/same.c: Likewise.
24269         * lib/strtoumax.c: Likewise.
24270
24271         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
24272         `.', then first look up the entire `.'-containing string as a login
24273         name.
24274
24275 2000-02-23  Jim Meyering  <meyering@lucent.com>
24276
24277         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
24278         in place of my hack.
24279
24280 2000-02-18  Paul Eggert  <eggert@twinsun.com>
24281
24282         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
24283         (textint): New typedef.
24284         (parser_control): Member year changed from int to textint.
24285         All uses changed.
24286         (YYSTYPE): Removed; replaced by %union with int and textint members.
24287         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
24288         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
24289         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
24290         (tSNUMBER, tUNUMBER): Now of type <textintval>.
24291         (date, number, to_year): Use width of number in digits, not its value,
24292         to determine whether it's a 2-digit year, or a 2-digit time.
24293         (yylex): Store number of digits of numeric tokens.
24294         Reported by John Kendall.
24295
24296         (parser_control): Changed from struct parser_control to typedef (for
24297         consistency).  All uses changed.
24298
24299         (tID): Removed; not used.
24300         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
24301
24302 2000-02-14  Paul Eggert  <eggert@twinsun.com>
24303
24304         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
24305         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
24306
24307 2000-02-12  Jim Meyering  <meyering@lucent.com>
24308
24309         * lib/userspec.c (ISDIGIT): Define it.
24310         (isdigit): Remove definition.
24311         (is_number): Use ISDIGIT, not isdigit.
24312         <libintl.h>: Include.
24313         (_ and N_): Define.
24314         (parse_user_spec): Mark translatable strings.
24315
24316 2000-02-10  Jim Meyering  <meyering@lucent.com>
24317
24318         With these changes, nanosleep.[ch] are finally enough like the other
24319         lib/* replacement files to compile on a few more losing systems.
24320
24321         * lib/nanosleep.h: Don't include config.h.
24322         Remove prototype from declaration of nanosleep.
24323         (PARAMS): Remove now-unneeded definition.
24324         * lib/nanosleep.c: #undef nanosleep.
24325         (rpl_nanosleep): Rename from nanosleep.
24326
24327 2000-02-10  Jim Meyering  <meyering@lucent.com>
24328
24329         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
24330         gnu_nanosleep to rpl_nanosleep.
24331
24332 2000-02-09  Jim Meyering  <meyering@lucent.com>
24333
24334         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
24335         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
24336
24337 2000-02-08  Akim Demaille  <akim@epita.fr>
24338
24339         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
24340         `[' and `]' and remove uses of `changequote'.
24341         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
24342         (AC_SYS_LARGEFILE): Likewise.
24343         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
24344         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
24345         of changequote.
24346         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
24347         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
24348         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
24349         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
24350
24351 2000-02-05  Jim Meyering  <meyering@lucent.com>
24352
24353         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
24354         Remove explicit use of AC_HEADER_TIME.  It is required by
24355         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
24356         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
24357         in autoconf whereby the expansion of the latter ended up preceding
24358         the expansion of its prerequisite, AC_HEADER_TIME.
24359         Reported by Volker Borchert.
24360
24361 2000-02-03  Jim Meyering  <meyering@lucent.com>
24362
24363         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
24364
24365 2000-02-03  Jim Meyering  <meyering@lucent.com>
24366
24367         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
24368         rather than with `#if HAVE_UTMPNAME'.
24369
24370 2000-02-02  Jim Meyering  <meyering@lucent.com>
24371
24372         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
24373         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
24374         Reported by Eli Zaretskii.
24375
24376 2000-02-01  Jim Meyering  <meyering@lucent.com>
24377
24378         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
24379
24380 2000-01-31  Jim Meyering  <meyering@lucent.com>
24381
24382         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
24383         functions.  Add the time.h and sys/time.h headers along with the
24384         AC_REQUIRE'ment of AC_HEADER_TIME.
24385
24386 2000-01-31  Jim Meyering  <meyering@lucent.com>
24387
24388         * lib/nanosleep.h (nanosleep): Guard declaration with
24389         `#if ! HAVE_DECL_NANOSLEEP'.
24390         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
24391         the declaration in that vendor's sys/timers.h.
24392         Reported by Christian Krackowizer.
24393
24394         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
24395         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
24396         (ISPRINT): Likewise.
24397         Reported by Tom Tromey.
24398
24399 2000-01-30  Jim Meyering  <meyering@lucent.com>
24400
24401         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
24402
24403         * m4/prereq.m4 (utmp_includes): Define.
24404         Check for ut_user and ut_name members in both struct utmpx
24405         and struct utmp.
24406
24407 2000-01-30  Jim Meyering  <meyering@lucent.com>
24408
24409         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
24410         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
24411         header files where only utmpx.ut_user is declared.
24412
24413         * lib/readutmp.h (UT_USER): Define.
24414
24415 2000-01-29  Jim Meyering  <meyering@lucent.com>
24416
24417         * m4/lib-check.m4: New file containing library-related checks from
24418         fileutils and sh-utils (textutils had none).
24419
24420 2000-01-28  Jim Meyering  <meyering@lucent.com>
24421
24422         * m4/perl.m4: Change format of warning message to look more like that
24423         from the missing script.  Suggestion from François Pinard.
24424
24425 2000-01-25  Jim Meyering  <meyering@lucent.com>
24426
24427         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
24428         well as time.h in the compile check.
24429         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
24430         Fix typo in cross-compiling case: s/yes/no/.
24431
24432 2000-01-23  Jim Meyering  <meyering@lucent.com>
24433
24434         * m4/jm-macros.m4: Move df-related tests here from
24435         fileutils/configure.in
24436
24437         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
24438         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
24439
24440         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
24441         s/space/ac_fsusage_space/.
24442         (jm_FILE_SYSTEM_USAGE): Take two parameters.
24443
24444         * m4/ftruncate.m4: New file (derived from part of
24445         fileutils/configure.in).
24446         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
24447         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
24448
24449         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
24450         AC_SUBST these here, rather than just in sh-util/configure.in, so
24451         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
24452         all the same.
24453         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
24454         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
24455         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
24456         (AC_SUBST(POW_LIBM)): Likewise.
24457         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
24458
24459 2000-01-23  Jim Meyering  <meyering@lucent.com>
24460
24461         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
24462         obstack.c.
24463
24464 2000-01-22  Jim Meyering  <meyering@lucent.com>
24465
24466         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
24467
24468         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
24469
24470         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
24471         configure.in
24472         (AC_CHECK_HEADERS): Likewise for sh-utils.
24473         (AC_CHECK_HEADERS): Likewise for textutils.
24474         Merge the three lists of headers.
24475
24476         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
24477         from fileutils' configure.in.
24478
24479         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
24480         code. Moved tests into their own function (_jm_DECL_HEADERS) in
24481         check-decl.m4.
24482
24483         * m4/check-decl.m4: Use #if rather than #ifdef.
24484         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
24485         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
24486         (_jm_DECL_HEADERS): Define new function.
24487         (jm_CHECK_DECLARATIONS): Require it.
24488
24489 2000-01-22  Jim Meyering  <meyering@lucent.com>
24490
24491         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
24492         [! HAVE_DECL_STRTOULL]: Declare strtoull.
24493         Required for some AIX systems.  Reported by Christian Krackowizer.
24494         [TESTING] (main): New function.
24495
24496         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
24497         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
24498         letters.
24499
24500         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
24501         iswprint.
24502
24503         * lib/strverscmp.c (ISDIGIT): Define.
24504         (strverscmp): Use ISDIGIT, not isdigit.
24505
24506 2000-01-19  Jim Meyering  <meyering@lucent.com>
24507
24508         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
24509         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
24510         defines `struct timespec' in <sys/time.h>
24511
24512         * m4/c-bs-a.m4: Remove uses of changequote altogether.
24513         Thanks to Akim for explaining.
24514
24515 2000-01-17  Paul Eggert  <eggert@twinsun.com>
24516
24517         * lib/nanosleep.c (nanosleep):
24518         Don't use SA_INTERRUPT to decide whether to call sigaction, as
24519         POSIX.1 doesn't require SA_INTERRUPT and some systems
24520         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
24521         it's been part of POSIX.1 since day 1 (in 1988).
24522
24523 2000-01-17  Jim Meyering  <meyering@lucent.com>
24524
24525         * lib/interlock: Remove unused file.  Reported by François Pinard.
24526
24527 2000-01-16  Paul Eggert  <eggert@twinsun.com>
24528
24529         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
24530         alert, backslash, formfeed, and vertical tab unnecessarily in
24531         shell quoting style.
24532
24533 2000-01-16  Jim Meyering  <meyering@lucent.com>
24534
24535         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
24536         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
24537         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
24538         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
24539
24540 2000-01-16  Jim Meyering  <meyering@lucent.com>
24541
24542         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
24543         because the latter didn't work.
24544
24545 2000-01-15  Jim Meyering  <meyering@lucent.com>
24546
24547         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
24548         (AC_REPLACE_FUNCS): Add memcpy and memset.
24549         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
24550         Add strpbrk.
24551         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
24552
24553 2000-01-12  Jim Meyering  <meyering@lucent.com>
24554
24555         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
24556         (jm_PREREQ): Use it.
24557         (jm_PREREQ_READUTMP): New macro.
24558         (jm_PREREQ): Use it.
24559
24560 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24561
24562         Quote multibyte characters correctly.
24563         * m4/c-bs-a.m4: New file.
24564         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
24565         (jm_PREREQ): Use it.
24566
24567 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24568
24569         * m4/uintmax_t.m4: Port to autoconf 2.13.
24570
24571 2000-01-08  Jim Meyering  <meyering@ascend.com>
24572
24573         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
24574         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
24575
24576 2000-01-04  Jim Meyering  <meyering@ascend.com>
24577
24578         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
24579         jm_STRUCT_DIRENT_D_TYPE.
24580         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
24581         jm_STRUCT_DIRENT_D_INO.
24582         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
24583         jm_STRUCT_UTIMBUF.
24584         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
24585         renamings.
24586         * m4/utime.m4: Likewise.
24587
24588         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
24589         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
24590
24591 2000-01-03  Paul Eggert  <eggert@twinsun.com>
24592
24593         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
24594         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
24595
24596 2000-01-02  Jim Meyering  <meyering@ascend.com>
24597
24598         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
24599         remember if this is necessary.
24600
24601 1999-12-26  Jim Meyering  <meyering@ascend.com>
24602
24603         * m4/jm-macros.m4: Use it here.
24604         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
24605
24606 1999-12-23  Jim Meyering  <meyering@ascend.com>
24607
24608         * m4/jm-macros.m4: Check for clock_gettime (moved from
24609         fileutils/configure.in)
24610         Check for gettimeofday.
24611
24612 1999-12-20  Jim Meyering  <meyering@ascend.com>
24613
24614         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
24615         autoconf-2.14a-1999-12-20.
24616
24617 1999-12-19  Jim Meyering  <meyering@ascend.com>
24618
24619         * m4/lstat-slash.m4: New file.
24620         * m4/jm-macros.m4: Use the new macro:
24621         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24622
24623 1999-12-07  Jim Meyering  <meyering@ascend.com>
24624
24625         * m4/perl.m4: Require that File::Compare be available, too.
24626         Too many systems seem to lack it.
24627
24628         * m4/strftime.m4: Add checks for most of the cpp macros tested in
24629         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
24630
24631 1999-11-18  Paul Eggert  <eggert@twinsun.com>
24632
24633         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
24634         problem with the QNX 4.25 shell, which doesn't propagate exit
24635         status of failed commands inside shell assignments.
24636
24637 1999-11-17  Jim Meyering  <meyering@ascend.com>
24638
24639         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
24640
24641 1999-11-07  Jim Meyering  <meyering@ascend.com>
24642
24643         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
24644
24645 1999-11-06  Jim Meyering  <meyering@ascend.com>
24646
24647         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
24648         * m4/jm-macros.m4 (jm_MACROS): Use it here.
24649
24650 1999-11-05  Jim Meyering  <meyering@ascend.com>
24651
24652         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
24653         configure.in of textutils, fileutils, and sh-utils into this one
24654         (shared between those packages) file.
24655         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
24656         AC_STRUCT_ST_BLKSIZE.
24657
24658 1999-11-03  Jim Meyering  <meyering@ascend.com>
24659
24660         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
24661         of AC_CHECK_TYPE checks includes unistd.h.
24662         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
24663         Suggestion from Akim Demaille.
24664
24665 1999-10-30  Jim Meyering  <meyering@ascend.com>
24666
24667         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
24668         m4-quoted string.
24669         * m4/ls-mntd-fs.m4: Likewise.
24670         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
24671         * m4/jm-winsz1.m4: Likewise.
24672
24673         * m4/const.m4: Remove file, since the fix made it into the experimental
24674         version of autoconf.
24675         * m4/mktime.m4: Likewise.
24676
24677         * m4/check-type.m4: Remove file, now that the latest version of
24678         AC_CHECK_TYPE takes a third arg to specify additional #includes.
24679
24680         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
24681         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
24682         AC_CHECK_TYPE.
24683
24684 1999-10-04  Jim Meyering  <meyering@ascend.com>
24685
24686         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
24687
24688 1999-09-22  Paul Eggert  <eggert@twinsun.com>
24689
24690         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
24691         2.95.1 bug with HP-UX 10.20.
24692
24693 1999-09-17  Jim Meyering  <meyering@ascend.com>
24694
24695         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
24696         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
24697         due to missing strdup (against sh-utils-2.0).
24698
24699 1999-08-29  Jim Meyering  <meyering@ascend.com>
24700
24701         * m4/jm-macros.m4: Require jm_BISON.
24702         * m4/bison.m4: New file.
24703
24704 1999-08-17  Paul Eggert  <eggert@twinsun.com>
24705
24706         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
24707         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
24708
24709 1999-08-05  Jim Meyering  <meyering@ascend.com>
24710
24711         * m4/getline.m4: Rename test file from conftestdata to conftest.data
24712         to avoid conflicts with `conftest' on 8+3 filesystems.
24713         Suggestion from Eli Zaretskii.
24714
24715 1999-08-04  Jim Meyering  <meyering@ascend.com>
24716
24717         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
24718         fileutils and sh-utils (textutils's getline test was inadequate).
24719         (AM_FUNC_GETLINE): Run this test.
24720         (AC_CHECK_FUNCS): Check for getdelim.
24721         Reported by Bob Proulx.
24722
24723 1999-08-02  Jim Meyering  <meyering@ascend.com>
24724
24725         * m4/jm-macros.m4: Add a comment.
24726
24727 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24728
24729         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
24730         <inttypes.h> defines strtoumax as a macro (and not as a
24731         function).
24732
24733 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24734
24735         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
24736         that we can shift, multiply and divide unsigned long long
24737         values; Ultrix cc can't do it.
24738
24739 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24740
24741         * m4/mktime.m4: New file, which is a preview of what should appear
24742         in the next public autoconf release.
24743
24744 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24745
24746         * m4/lfs.m4: Remove this file.
24747         * m4/largefile.m4: New file.  It contains the old contents of
24748         lfs.m4, except that all names with prefix AC_LFS have been
24749         changed to use the prefix AC_SYS_LARGEFILE instead, to be
24750         compatible with future autoconf versions.  Also, some minor m4
24751         quoting problems have been fixed.
24752
24753 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24754
24755         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
24756         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
24757         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
24758         and simplify the shell code.
24759
24760 1999-08-01  Jim Meyering  <meyering@ascend.com>
24761
24762         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
24763         m4.
24764
24765 1999-07-20  Jim Meyering  <meyering@ascend.com>
24766
24767         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
24768
24769 1999-07-15  Jim Meyering  <meyering@ascend.com>
24770
24771         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
24772
24773 1999-05-22  Jim Meyering  <meyering@ascend.com>
24774
24775         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
24776
24777 1999-05-20  Jim Meyering  <meyering@ascend.com>
24778
24779         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
24780         Add a colon after each `then' in case $4 is empty.
24781
24782 1999-05-16  Jim Meyering  <meyering@ascend.com>
24783
24784         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
24785
24786 1999-05-10  Jim Meyering  <meyering@ascend.com>
24787
24788         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
24789
24790         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
24791         AC_FUNC_MKTIME.
24792
24793 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
24794
24795         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
24796
24797 1999-05-04  Paul Eggert  <eggert@twinsun.com>
24798
24799         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
24800         not CPPFLAGS, so that linking works correctly in IRIX.
24801
24802 1999-04-30  Paul Eggert  <eggert@twinsun.com>
24803
24804         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
24805
24806 1999-04-20  Paul Eggert  <eggert@twinsun.com>
24807
24808         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
24809         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
24810         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
24811         jm_AC_TYPE_UNSIGNED_LONG_LONG.
24812         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
24813
24814         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
24815
24816 1999-04-20  Jim Meyering  <meyering@ascend.com>
24817
24818         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
24819         AC_REPLACE xstroull if necessary.  From Paul Eggert.
24820         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
24821
24822 1999-04-18  Jim Meyering  <meyering@ascend.com>
24823
24824         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
24825         * m4/jm-macros.m4: Use it.
24826
24827 1999-04-06  Jim Meyering  <meyering@ascend.com>
24828
24829         * m4/strftime.m4: Remove test for %f.
24830
24831 1999-03-29  Jim Meyering  <meyering@ascend.com>
24832
24833         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
24834         superset of the AC_TYPE_* checks in the textutils, fileutils,
24835         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
24836         AC_TYPE_PID_T.
24837
24838 1999-03-28  Jim Meyering  <meyering@ascend.com>
24839
24840         * m4/jm-macros.m4: Define GNU_PACKAGE here.
24841         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
24842         replaced e.g., in the *.sh files of the sh-utils.
24843
24844 1999-03-20  Jim Meyering  <meyering@ascend.com>
24845
24846         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
24847         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
24848         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
24849
24850 1999-03-19  Jim Meyering  <meyering@ascend.com>
24851
24852         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
24853
24854 1999-03-12  Jim Meyering  <meyering@ascend.com>
24855
24856         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
24857
24858 1999-03-07  Jim Meyering  <meyering@ascend.com>
24859
24860         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
24861         declared.
24862
24863 1999-02-17  Jim Meyering  <meyering@ascend.com>
24864
24865         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
24866         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
24867
24868 1999-02-07  Jim Meyering  <meyering@ascend.com>
24869
24870         * m4/group-member.m4: New file -- extracted from sh-utils'
24871         configure.in.
24872
24873         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
24874         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
24875
24876 1999-02-06  Jim Meyering  <meyering@ascend.com>
24877
24878         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
24879         * m4/fnmatch.m4: Likewise.
24880         * m4/getgroups.m4: Likewise.
24881         * m4/lstat.m4: Likewise.
24882         * m4/malloc.m4: Likewise.
24883         * m4/putenv.m4: Likewise.
24884         * m4/realloc.m4: Likewise.
24885         * m4/regex.m4: Likewise.
24886         * m4/stat.m4: Likewise.
24887         * m4/strftime.m4: Likewise.
24888         Suggestion from Alain Magloire.
24889
24890         * m4/chown.m4: Use `.$ac_objext', not `.o'.
24891         * m4/fnmatch.m4: Likewise.
24892         * m4/getgroups.m4: Likewise.
24893         * m4/getline.m4: Likewise.
24894         * m4/lstat.m4: Likewise.
24895         * m4/malloc.m4: Likewise.
24896         * m4/memcmp.m4: Likewise.
24897         * m4/putenv.m4: Likewise.
24898         * m4/realloc.m4: Likewise.
24899         * m4/regex.m4: Likewise.
24900         * m4/stat.m4: Likewise.
24901         * m4/strftime.m4: Likewise.
24902         Suggestion from Alain Magloire.
24903
24904         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
24905         an argument.
24906
24907         * m4/regex.m4: Add a run-time Test for proper operation of
24908         re_compile_pattern.
24909
24910 1999-01-31  Jim Meyering  <meyering@ascend.com>
24911
24912         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
24913
24914 1999-01-30  Jim Meyering  <meyering@ascend.com>
24915
24916         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
24917
24918         * m4/jm-mktime.m4: Make this a wrapper around the official
24919         AM_FUNC_MKTIME rather than my private copy, now that the official one
24920         is up to date.
24921         * m4/mktime.m4: Remove file.
24922
24923         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
24924         * m4/uptime.m4: Likewise.
24925         * m4/uintmax_t.m4: Likewise.
24926
24927 1999-01-28  Jim Meyering  <meyering@ascend.com>
24928
24929         * m4/jm-macros.m4: Use jm_AFS.
24930         * m4/afs.m4: New file (from fileutils' configure.in).
24931
24932         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
24933         * m4/chown.m4: Likewise.
24934         * m4/d-ino.m4: Likewise.
24935         * m4/d-type.m4: Likewise.
24936         * m4/fnmatch.m4: Likewise.
24937         * m4/getgroups.m4: Likewise.
24938         * m4/gettext.m4: Likewise.
24939         * m4/jm-mktime.m4: Likewise.
24940         * m4/jm-winsz2.m4: Likewise.
24941         * m4/lcmessage.m4: Likewise.
24942         * m4/ls-mntd-fs.m4: Likewise.
24943         * m4/malloc.m4: Likewise.
24944         * m4/memcmp.m4: Likewise.
24945         * m4/putenv.m4: Likewise.
24946         * m4/realloc.m4: Likewise.
24947         * m4/st_mtim.m4: Likewise.
24948         * m4/strftime.m4: Likewise.
24949
24950 1999-01-16  Jim Meyering  <meyering@ascend.com>
24951
24952         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
24953         (ARGMATCH_DIE_DECL): Define.
24954
24955 1999-01-12  Jim Meyering  <meyering@ascend.com>
24956
24957         * m4/Makefile.am.in: Rewrite to avoid using fmt.
24958         Reported by Lars Hecking.
24959
24960 1999-01-10  Jim Meyering  <meyering@ascend.com>
24961
24962         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
24963         gross kludge.
24964         * m4/inttypes_h.m4: Likewise.
24965         * m4/lstat.m4: Likewise.
24966         * m4/malloc.m4: Likewise.
24967         * m4/readdir.m4: Likewise.
24968         * m4/realloc.m4: Likewise.
24969         * m4/st_dm_mode.m4: Likewise.
24970         * m4/stat.m4: Likewise.
24971         * m4/utimbuf.m4: Likewise.
24972         * m4/utimes.m4: Likewise.
24973
24974         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
24975         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
24976         comments in config.h.in are meaningful.
24977
24978         * m4/jm-macros.m4: Require autoconf-2.13 here.
24979
24980         * m4/regex.m4: By default, don't use the included regex.c on systems
24981         with glibc 2.  Suggestion from Uli Drepper.
24982
24983 1999-01-02  Jim Meyering  <meyering@ascend.com>
24984
24985         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
24986
24987 1998-12-18  Jim Meyering  <meyering@ascend.com>
24988
24989         * m4/Makefile.am.in (Makefile.am): Simplify rule.
24990         Based on a suggestion from Lars Hecking.
24991
24992 1998-11-16  Paul Eggert  <eggert@twinsun.com>
24993
24994         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
24995
24996 1998-11-16  Jim Meyering  <meyering@ascend.com>
24997
24998         * m4/lfs.m4: Double-quote the `uname...` expression.
24999
25000 1998-11-14  Jim Meyering  <meyering@ascend.com>
25001
25002         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
25003         * m4/stat.m4: Likewise.
25004
25005 1998-11-03  Jim Meyering  <meyering@ascend.com>
25006
25007         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
25008         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
25009
25010 1998-10-18  Jim Meyering  <meyering@ascend.com>
25011
25012         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
25013
25014 1998-10-17  Jim Meyering  <meyering@ascend.com>
25015
25016         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
25017         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
25018         calls for those previously hard-coded headers.  Instead, take a new
25019         parameter.
25020         (jm_CHECK_DECLARATIONS): Reflect interface change.
25021         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
25022         (jm_CHECK_DECL_LOCALTIME_R): New macro.
25023
25024         * m4/mktime.m4: Test for spring-forward gap before long-running test.
25025
25026 1998-10-14  Jim Meyering  <meyering@ascend.com>
25027
25028         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
25029         instead of "TZ=America/Vancouver".  From Paul Eggert.
25030
25031 1998-10-11  Jim Meyering  <meyering@ascend.com>
25032
25033         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
25034         This adds a test for a recently added compatibility fix for mktime.c.
25035         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
25036
25037 1998-09-27  Jim Meyering  <meyering@ascend.com>
25038
25039         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
25040
25041         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
25042         ../configure.in, including a change from Gordon Matzigkeit to allow
25043         cross-compiling for the Hurd.
25044
25045         * m4/glibc.m4: New file/macro to test for the GNU C Library
25046         versions 1 and 2.  From Gordon Matzigkeit.
25047         Indent.
25048
25049 1998-09-21  Jim Meyering  <meyering@ascend.com>
25050
25051         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
25052
25053 1998-08-18  Paul Eggert  <eggert@twinsun.com>
25054
25055         Port nanosecond-resolution times to UnixWare 2.1.2 and
25056         pedantic Solaris 2.6.
25057
25058         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
25059         AC_STRUCT_ST_MTIM.
25060         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
25061         Generate name of ns member, instead of just 1 or undef.
25062         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
25063
25064 1998-08-15  Jim Meyering  <meyering@ascend.com>
25065
25066         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
25067         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
25068         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
25069         instead of jm_TYPE_SSIZE_T.
25070
25071 1998-08-12  Jim Meyering  <meyering@ascend.com>
25072
25073         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
25074
25075 1998-08-02  Jim Meyering  <meyering@ascend.com>
25076
25077         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
25078         in acconfig.h manually.
25079
25080 1998-07-31  Paul Eggert  <eggert@twinsun.com>
25081
25082         * m4/st_mtim.m4: New file.
25083
25084 1998-07-28  Jim Meyering  <meyering@ascend.com>
25085
25086         * m4/utimes.m4: Undef stat.
25087
25088 1998-07-25  Jim Meyering  <meyering@ascend.com>
25089
25090         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
25091         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
25092
25093 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
25094
25095         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
25096         uid and gid actually remain unchanged.
25097
25098 1998-07-07  Jim Meyering  <meyering@ascend.com>
25099
25100         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
25101
25102 1998-07-04  Jim Meyering  <meyering@ascend.com>
25103
25104         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
25105         to prove that this macro can be used in packages without regex.c.
25106
25107 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
25108
25109         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
25110         is to be used.
25111
25112 1998-07-03  Jim Meyering  <meyering@ascend.com>
25113
25114         * m4/gettext.m4: Add -lintl if it's found to be necessary.
25115
25116         * m4/gettext.m4: New file -- from gettext-0.10.35.
25117         * m4/lcmessage.m4: Likewise.
25118         * m4/progtest.m4: Likewise.
25119
25120         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
25121         * m4/jm-macros.m4: Require the new macro.
25122
25123 1998-06-29  Jim Meyering  <meyering@ascend.com>
25124
25125         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
25126         for the definition of NGROUPS (used in a system header included
25127         by sys/mount.h).
25128
25129 1998-06-28  Jim Meyering  <meyering@ascend.com>
25130
25131         * m4/ls-mntd-fs.m4: New file.
25132         * m4/fstypename.m4: New file.
25133
25134         * m4/jm-macros.m4: Require the new macro.
25135         * m4/jm-glibc-io.m4: New file.
25136
25137 1998-05-19  Jim Meyering  <meyering@ascend.com>
25138
25139         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
25140         * m4/lchown.m4: New file.
25141
25142         * m4/Makefile.am.in: New file.
25143         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
25144
25145 1998-05-14  Jim Meyering  <meyering@ascend.com>
25146
25147         * m4/Makefile.am (EXTRA_DIST): Add them.
25148         * m4/jm-macros.m4: New file.
25149         * m4/utimbuf.m4: New file.
25150
25151 1998-05-12  Jim Meyering  <meyering@ascend.com>
25152
25153         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
25154
25155 1998-05-11  Jim Meyering  <meyering@ascend.com>
25156
25157         * m4/isc-posix.m4: New file.
25158
25159 1998-05-10  Jim Meyering  <meyering@ascend.com>
25160
25161         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
25162
25163 1998-05-09  Jim Meyering  <meyering@ascend.com>
25164
25165         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
25166         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
25167         with automake.
25168
25169         * m4/ssize_t.m4: New file.
25170         * m4/mktime.m4: Remove file -- the new automake has this now.
25171
25172 1998-04-26  Jim Meyering  <meyering@ascend.com>
25173
25174         * m4/assert.m4: New file.
25175         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
25176
25177 1998-04-05  Jim Meyering  <meyering@ascend.com>
25178
25179         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
25180         (jm_PREREQ): Use it here.
25181
25182 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
25183
25184         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
25185         in acconfig.h.
25186
25187 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
25188
25189         * m4/prereq.m4: New file.
25190         * m4/error.m4: New file.
25191         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
25192
25193 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
25194
25195         * m4/getline.m4: Don't set am_cv_func_working_getline before the
25196         cache-check for the same variable -- that defeated the purpose of
25197         the test; the test program was never run.  This was a problem only
25198         on systems with losing getline functions -- HP-UX 10.20 is one.
25199         Reported by Bjorn Helgaas.
25200
25201 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
25202
25203         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
25204
25205 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
25206
25207         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
25208
25209         * m4/const.m4: New file.  Use an initializer in this declaration
25210         typedef int charset[2]; const charset x;
25211         Reported by Bob Glickstein.
25212
25213 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
25214
25215         * m4/chown.m4: Fix reversed types on -1 args to chown.
25216         From Kaveh Ghazi.
25217
25218 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
25219
25220         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
25221         Add lseek and memchr.
25222
25223         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
25224         T.E.Dickey <dickey@clark.net> said that some older preprocessors
25225         have a 20-character limit on names.
25226
25227 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
25228
25229         * m4/inttypes_h.m4: New file.
25230         * m4/uintmax_t.m4: New file.
25231         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
25232
25233 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
25234   Free Software Foundation, Inc.
25235 Copying and distribution of this file, with or without modification,
25236 are permitted provided the copyright notice and this notice are preserved.