Rename utf8-ucs4-safe -> utf8-ucs4, u8_mbtouc_safe -> u8_mbtouc.
[pspp] / ChangeLog
1 2007-01-27  Bruno Haible  <bruno@clisp.org>
2
3         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
4         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
5         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
6         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
7         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
8         * modules/unistr/u8-mbtouc-unsafe: Renamed from
9         modules/unistr/u8-mbtouc.
10         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
11         * lib/unistr.h: Update.
12         * lib/striconveh.c: Update.
13         * modules/striconveh: Update.
14         * lib/linebreak.c: Update.
15         * modules/linebreak: Update.
16         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
17         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
18         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
19         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
20         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
21         * lib/unistr.h: Update.
22         * lib/striconveh.c: Update.
23         * modules/striconveh: Update.
24         * lib/unistr/u8-to-u16.c: Update.
25         * modules/unistr/u8-to-u16: Update.
26         * lib/unistr/u8-to-u32.c: Update.
27         * modules/unistr/u8-to-u32: Update.
28
29 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
30
31         Sync from Libtool.
32         * lib/argz.c: Do not include strings.h nor memory.h, include
33         string.h unconditionally.  Patch by Simon Josefsson.
34
35 2007-01-27  Bruno Haible  <bruno@clisp.org>
36
37         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
38         from gl_HEADER_STRING_H_BODY.
39         (gl_HEADER_STRING_H_BODY): Require it.
40         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
41         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
42         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
43         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
44         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
45         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
46         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
47         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
48         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
49         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
50         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
51         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
52         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
53         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
54         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
55
56 2007-01-27  Bruno Haible  <bruno@clisp.org>
57
58         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
59         check_PROGRAMS into noinst_PROGRAMS.
60         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
61         check_PROGRAMS in this case.
62         (func_import): Set for_test to false.
63         (func_create_testdir): Set for_test to true.
64
65 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
66             Bruno Haible  <bruno@clisp.org>
67
68         * modules/strcasestr (Files): Remove lib/strcasestr.h.
69         (Depends-on): Add string.
70         (Includes): Use <string.h> instead of strcasestr.h.
71         * modules/string (Makefile.am): Also substitute the value of
72         REPLACE_STRCASESTR.
73         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
74         assume strcasestr is declared in <string.h> not <strings.h>. Also
75         set REPLACE_STRCASESTR.
76         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
77         REPLACE_STRCASESTR.
78         * lib/strcasestr.h: Remove file.
79         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
80         * lib/string_.h (strcasestr): New declaration.
81
82 2007-01-27  Bruno Haible  <bruno@clisp.org>
83
84         * lib/string_.h: Use 'extern'.
85
86 2007-01-27  Jim Meyering  <jim@meyering.net>
87
88         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
89         of set-but-not-used local, "q".
90
91         * lib/mempcpy.c: Include <config.h> before <string.h>.
92         This fixes a compilation error on HP-UX, due to the system's
93         "restrict"-using mempcpy prototype.
94
95 2007-01-26  Bruno Haible  <bruno@clisp.org>
96
97         Small optimization.
98         * lib/javacomp.c: Include c-strstr.h.
99          (is_envjavac_gcj): Use c_strstr instead of strstr.
100         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
101
102 2007-01-26  Bruno Haible  <bruno@clisp.org>
103
104         * MODULES.html.sh (Unicode string functions): Add the new modules.
105
106         * modules/uniconv/u32-strconv-to-locale: New file.
107         * lib/uniconv/u32-strconv-to-locale.c: New file.
108
109         * modules/uniconv/u16-strconv-to-locale: New file.
110         * lib/uniconv/u16-strconv-to-locale.c: New file.
111
112         * modules/uniconv/u8-strconv-to-locale: New file.
113         * lib/uniconv/u8-strconv-to-locale.c: New file.
114
115         * modules/uniconv/u32-strconv-from-locale: New file.
116         * lib/uniconv/u32-strconv-from-locale.c: New file.
117
118         * modules/uniconv/u16-strconv-from-locale: New file.
119         * lib/uniconv/u16-strconv-from-locale.c: New file.
120
121         * modules/uniconv/u8-strconv-from-locale: New file.
122         * lib/uniconv/u8-strconv-from-locale.c: New file.
123
124         * modules/uniconv/u32-strconv-to-enc: New file.
125         * lib/uniconv/u32-strconv-to-enc.c: New file.
126         * modules/uniconv/u32-strconv-to-enc-tests: New file.
127         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
128
129         * modules/uniconv/u16-strconv-to-enc: New file.
130         * lib/uniconv/u16-strconv-to-enc.c: New file.
131         * lib/uniconv/u-strconv-to-enc.h: New file.
132         * modules/uniconv/u16-strconv-to-enc-tests: New file.
133         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
134
135         * modules/uniconv/u8-strconv-to-enc: New file.
136         * lib/uniconv/u8-strconv-to-enc.c: New file.
137         * modules/uniconv/u8-strconv-to-enc-tests: New file.
138         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
139
140         * modules/uniconv/u32-strconv-from-enc: New file.
141         * lib/uniconv/u32-strconv-from-enc.c: New file.
142         * modules/uniconv/u32-strconv-from-enc-tests: New file.
143         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
144
145         * modules/uniconv/u16-strconv-from-enc: New file.
146         * lib/uniconv/u16-strconv-from-enc.c: New file.
147         * modules/uniconv/u16-strconv-from-enc-tests: New file.
148         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
149
150         * modules/uniconv/u8-strconv-from-enc: New file.
151         * lib/uniconv/u8-strconv-from-enc.c: New file.
152         * lib/uniconv/u-strconv-from-enc.h: New file.
153         * modules/uniconv/u8-strconv-from-enc-tests: New file.
154         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
155
156         * modules/uniconv/u32-conv-from-enc: New file.
157         * lib/uniconv/u32-conv-from-enc.c: New file.
158         * modules/uniconv/u32-conv-from-enc-tests: New file.
159         * tests/uniconv/test-u32-conv-from-enc.c: New file.
160
161         * modules/uniconv/u16-conv-from-enc: New file.
162         * lib/uniconv/u16-conv-from-enc.c: New file.
163         * lib/uniconv/u-conv-from-enc.h: New file.
164         * modules/uniconv/u16-conv-from-enc-tests: New file.
165         * tests/uniconv/test-u16-conv-from-enc.c: New file.
166
167         * modules/uniconv/u8-conv-from-enc: New file.
168         * lib/uniconv/u8-conv-from-enc.c: New file.
169         * modules/uniconv/u8-conv-from-enc-tests: New file.
170         * tests/uniconv/test-u8-conv-from-enc.c: New file.
171
172         * modules/uniconv/base: New file.
173         * lib/uniconv.h: New file.
174
175 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
176
177         * doc/gnulib-tool.texi (Initial import): Update to match current
178         behavior with strdup module.
179         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
180         * lib/memmem.h: Remove; all uses removed.  This is now done
181         by <string.h>.
182         * lib/mempcpy.h: Likewise.
183         * lib/memrchr.h: Likewise.
184         * lib/stpcpy.h: Likewise.
185         * lib/stpncpy.h: Likewise.
186         * lib/strcase.h: Likewise.
187         * lib/strchrnul.h: Likewise.
188         * lib/strdup.h: Likewise.
189         * lib/strndup.h: Likewise.
190         * lib/strnlen.h: Likewise.
191         * lib/strpbrk.h: Likewise.
192         * lib/strsep.h: Likewise.
193         * lib/strstr.h: Likewise.
194         * lib/strtok_r.h: Likewise.
195         * lib/string_.h: New file.
196         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
197         Rely on <string.h> instead.
198         * lib/canon-host.c: Likewise.
199         * lib/chdir-long.c: Likewise.
200         * lib/concatpath.c: Likewise.
201         * lib/exclude.c: Likewise.
202         * lib/fchdir.c: Likewise.
203         * lib/getaddrinfo.c: Likewise.
204         * lib/getcwd.c: Likewise.
205         * lib/getsubopt.c: Likewise.
206         * lib/glob.c: Likewise.
207         * lib/hard-locale.c: Likewise.
208         * lib/iconvme.c: Likewise.
209         * lib/javacomp.c: Likewise.
210         * lib/mempcpy.c: Likewise.
211         * lib/memrchr.c: Likewise.
212         * lib/regex_internal.h: Likewise.
213         * lib/stpncpy.c: Likewise.
214         * lib/strcasecmp.c: Likewise.
215         * lib/strchrnul.c: Likewise.
216         * lib/strdup.c: Likewise.
217         * lib/striconv.c: Likewise.
218         * lib/striconveh.c: Likewise.
219         * lib/striconveha.c: Likewise.
220         * lib/strncasecmp.c: Likewise.
221         * lib/strndup.c: Likewise.
222         * lib/strnlen.c: Likewise.
223         * lib/strsep.c: Likewise.
224         * lib/strstr.c: Likewise.
225         * lib/strtok_r.c: Likewise.
226         * lib/userspec.c: Likewise.
227         * lib/w32spawn.h: Likewise.
228         * lib/xstrndup.c: Likewise.
229         * lib/mountlist.c (strstr): Remove decl.
230         * m4/string_h.m4: New file.
231         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
232         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
233         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
234         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
235         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
236         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
237         Set REPLACE_STRCASECMP if necessary.
238         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
239         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
240         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
241         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
242         HAVE_DECL_STRDUP if necessary.
243         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
244         since gl_FUNC_STRNDUP does that now.
245         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
246         Check for decl here...
247         (gl_PREREQ_STRNLEN): ... not here.
248         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
249         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
250         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
251         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
252         necessary.
253         * modules/string: New file.
254         * modules/memmem (Files): Remove special-purpose include file.
255         (Depends-on): Add string.
256         (Include): Include <string.h>, not the removed file.
257         * modules/mempcpy: Likewise.
258         * modules/memrchr: Likewise.
259         * modules/stpcpy: Likewise.
260         * modules/stpncpy: Likewise.
261         * modules/strcase: Likewise.
262         * modules/strchrnul: Likewise.
263         * modules/strdup: Likewise.
264         * modules/strndup: Likewise.
265         * modules/strnlen: Likewise.
266         * modules/strpbrk: Likewise.
267         * modules/strsep: Likewise.
268         * modules/strstr: Likewise.
269         * modules/strtok_r: Likewise.
270         * tests/test-dirname.c: Don't include "strdup.h", since
271         <string.h> now suffices.
272         * tests/test-memmem.c: Don't include "memmem.h", since
273         <string.h> now suffices.
274
275 2007-01-25  Bruno Haible  <bruno@clisp.org>
276
277         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
278         *resultp is 0.
279
280         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
281         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
282         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
283         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
284
285         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
286         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
287         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
288         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
289         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
290         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
291
292 2007-01-24  Bruno Haible  <bruno@clisp.org>
293
294         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
295         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
296         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
297         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
298         gl_FUNC_FTS_CORE.
299         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
300         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
301         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
302         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
303         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
304         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
305         gl_FUNC_FCHOWNAT.
306         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
307         gl_FUNC_STRFTIME.
308         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
309         Reported by Ralf Wildenhues.
310
311 2007-01-24  Bruno Haible  <bruno@clisp.org>
312
313         Drop AC_REQUIRE calls that are redundant with the module dependencies.
314         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
315         gl_GETADDRINFO.
316         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
317         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
318         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
319
320 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
321
322         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
323         Don't use 'exit'; just return from 'main'.
324         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
325
326         * lib/fnmatch_.h: Readjust white space and comments to match
327         glibc, to avoid spurious diffs.
328
329 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
330
331         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
332         2004-12-01 change by Jakub Jelinek, since this code won't compile
333         if !LIBC.  Problem reported by Bob Proulx.
334
335 2007-01-23  Bruno Haible  <bruno@clisp.org>
336
337         * lib/striconveh.c: Include c-strcaseeq.h.
338         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
339         * modules/striconveh (Depends-on): Add c-strcaseeq.
340
341 2007-01-23  Bruno Haible  <bruno@clisp.org>
342
343         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
344
345         * modules/c-strcaseeq: New file.
346         * lib/c-strcaseeq.h: New file.
347
348         * modules/streq: New file.
349         * lib/streq.h: New file.
350
351 2007-01-23  Bruno Haible  <bruno@clisp.org>
352
353         * modules/striconveha-tests: New file.
354         * tests/test-striconveha.c: New file.
355
356         * lib/striconveha.h: Include <stdbool.h>.
357         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
358         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
359         (mem_iconveha_notranslit): Renamed from mem_iconveha.
360         (mem_iconveha): New function.
361         (str_iconveha_notranslit): Renamed from str_iconveha.
362         (str_iconveha): New function.
363         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
364         c-strcase.
365
366 2007-01-23  Bruno Haible  <bruno@clisp.org>
367
368         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
369         encodings without forgiving before trying any encoding with handler.
370         (str_iconveha): Try all encodings without forgiving before trying any
371         encoding with handler.
372
373 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
374
375         Import the following changes from libc.
376
377         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
378
379         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
380
381         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
382
383         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
384         normal_bracket label.
385
386         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
387
388         [BZ #361]
389         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
390         to normal_bracket after fetching the next character.
391
392 2007-01-22  Bruno Haible  <bruno@clisp.org>
393
394         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
395         argument.
396         * lib/striconveh.c (iconv_carefully_1): New function.
397         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
398         argument.
399         (str_cd_iconveh): Update.
400         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
401         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
402         * tests/test-striconveh.c (MAGIC): New macro.
403         (new_offsets): New function.
404         (main): Test call with and without offsets.
405
406 2007-01-22  Bruno Haible  <bruno@clisp.org>
407
408         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
409         * modules/sys_select (Makefile.am): Likewise.
410         * modules/sys_socket (Makefile.am): Likewise.
411         * modules/sys_time (Makefile.am): Likewise.
412
413 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
414
415         * modules/gettimeofday (License): Change from GPL to LGPL, since
416         gettimeofday is a library function.
417
418 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
419
420         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
421
422 2007-01-21  Bruno Haible  <bruno@clisp.org>
423
424         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
425
426 2007-01-21  Bruno Haible  <bruno@clisp.org>
427
428         * modules/striconveha: New file.
429         * lib/striconveha.h: New file.
430         * lib/striconveha.c: New file.
431         * MODULES.html.sh (Internationalization functions): Add striconveha.
432         * lib/striconv.c (str_iconv): Optimize the case of an empty input
433         string.
434         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
435
436 2007-01-21  Bruno Haible  <bruno@clisp.org>
437
438         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
439         * lib/striconveh.c (str_iconveh): Likewise.
440
441 2007-01-21  Bruno Haible  <bruno@clisp.org>
442
443         * lib/striconveh.h (mem_iconveh): New declaration.
444         * lib/striconveh.c (mem_iconveh): New function.
445         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
446
447 2007-01-21  Bruno Haible  <bruno@clisp.org>
448
449         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
450
451         * lib/striconveh.h (mem_cd_iconveh): Change specification.
452         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
453         original result buffer.
454         (str_cd_iconveh): Update.
455         * tests/test-striconveh.c (main): Update.
456
457         * lib/striconv.h (mem_cd_iconv): Change specification.
458         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
459         result buffer.
460         (str_cd_iconv): Update.
461         * tests/test-striconv.c (main): Update.
462
463 2007-01-21  Bruno Haible  <bruno@clisp.org>
464
465         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
466
467 2007-01-20  Jim Meyering  <jim@meyering.net>
468
469         * lib/userspec.c (parse_with_separator): If a user or group string
470         starts with "+", skip the corresponding name-to-ID look-up, since
471         such a look-up must fail: user and group names may not include "+".
472
473 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
474
475         * lib/poll.c: Include sys/time.h and time.h unconditionally,
476         since we now assume the sys_time module.
477         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
478         check for sys/time.h; no longer needed.
479         * modules/poll (Depends-on): Depend on sys_time.
480
481 2007-01-18  Bruno Haible  <bruno@clisp.org>
482
483         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
484         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
485
486         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
487         gettimeofday.
488
489         * tests/test-gettimeofday.c: Include <time.h>.
490         (dummy): Remove variable.
491
492         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
493         gl_HEADER_SYS_TIME_H.
494         (gl_HEADER_SYS_TIME_H): New macro.
495
496         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
497         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
498         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
499         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
500         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
501         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
502         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
503         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
504         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
505         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
506         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
507
508         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
509         last change; it caused a compilation error when cross-compiling to
510         Cygwin.
511
512 2007-01-18  Jim Meyering  <jim@meyering.net>
513
514         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
515         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
516         than the race-prone "test -d sys || mkdir sys".
517         (configure.ac): Use AC_PROG_MKDIR_P.
518         * modules/sys_select: Likewise.
519         * modules/sys_socket: Likewise.
520         * modules/sys_time: Likewise.
521
522 2007-01-18  Eric Blake  <ebb9@byu.net>
523
524         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
525         replace gettimeofday.
526         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
527         name, to avoid infinite recursion.
528
529 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
530
531         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
532         module sys_time.
533         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
534         assume timespec.h defines struct timeval.
535         * lib/settime.c: Likewise.
536         * lib/utimens.c: Likewise.
537         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
538         since we now assume the gettimeofday module.
539         * lib/tempname.c (__gen_tempname): Likewise.
540         * lib/gettimeofday.h: Remove.
541         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
542         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
543         Include <time.h>, for 'time()'.
544         (localtime_buffer_addr): Also use this workaround if
545         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
546         to simplify the uses.  All uses changed.
547         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
548         that #undef is inside {}, and 'const' follows type name consistently.
549         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
550         (gettimeofday): Do not use the maximum possible value for
551         tv->tv_usec, since that might break usages other than ls.c.
552         Instead, we'll leave ls.c alone.  This undoes today's patch
553         by Bruno.  Add a compile-time warning for 1s-clock resolution;
554         we've never observed the problem but might as well keep the
555         canary.
556         * lib/nanosleep.c: Include timespec.h first, for interface check.
557         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
558         now assume the sys_time module.
559         * lib/tempname.c: Likewise.
560         * lib/timespec.h: Likewise.
561         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
562         needed.
563         * lib/strftime.c: Likewise.
564         * lib/timespec.h: Likewise.
565         * lib/posixtm.c: Include posixtm.h first, for interface check.
566         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
567         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
568         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
569         * lib/sys_time_.h: New file.
570         * lib/timespec.h (struct timespec): Use long int, not long.
571         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
572         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
573         Remove obsolescent call to AC_HEADER_TIME.
574         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
575         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
576         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
577         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
578         Likewise.
579         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
580         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
581         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
582         into the sys_time module.  Check for gettimeofday just once.
583         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
584         for gettimeofday signature to just check the signature.  Merely
585         compile it, since linking doesn't test signature.  Improve test for
586         whether gettimeofday.o is actually needed.
587         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
588         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
589         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
590         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
591         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
592         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
593         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
594         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
595         than worrying about sys/time.h.
596         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
597         Don't bother worrying about TIME_WITH_SYS_TIME.
598         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
599         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
600         * m4/sys_time_h.m4: New file.
601         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
602         Don't include sys/time.h.  Return from main rather than exiting.
603         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
604         all uses changed.
605         * modules/gethrxtime (Depends-on): Add sys_time.
606         * modules/gettime (Depends-on): Likewise.
607         * modules/gettimeofday (Depends-on): Likewise.
608         * modules/nanosleep (Depends-on): Likewise.
609         * modules/settime (Depends-on): Likewise.
610         * modules/tempname (Depends-on): Likewise.
611         * modules/utimens (Depends-on): Likewise.
612         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
613         (Include:) Change back to <sys/time.h>.
614         (Maintainer:) Add self.
615         * modules/sys_time: New file.
616         * modules/tempname (Depends-on): Add gettimeofday.
617         * tests/test-gettimeofday.c: Include <sys/time.h>
618         rather than gettimeofday.h.
619
620 2007-01-17  Bruno Haible  <bruno@clisp.org>
621
622         * gnulib-tool (func_get_license): Revert last patch. Instead, let
623         the license default to GPL.
624         (func_create_testdir): Don't complain if a module is LGPL and its
625         tests module depends on GPLed modules.
626
627 2007-01-17  Bruno Haible  <bruno@clisp.org>
628
629         * lib/gettimeofday.c (gettimeofday): Add code for the case
630         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
631         maximum possible value for tv->tv_usec, rather than the minimum one.
632
633 2005-10-08  Martin Lambers  <marlam@marlam.de>
634 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
635 2007-01-16  Bruno Haible  <bruno@clisp.org>
636
637         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
638         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
639         gl_FUNC_GETTIMEOFDAY.
640         (Include): Add gettimeofday.h.
641         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
642         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
643         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
644         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
645         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
646         * lib/gettimeofday.h: New file.
647         * lib/gettimeofday.c: Include <sys/timeb.h>.
648         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
649         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
650         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
651         fall back on time().
652
653         * tests/test-gettimeofday.c: New file.
654         * modules/gettimeofday-tests: New file.
655
656 2007-01-16  Eric Blake  <ebb9@byu.net>
657
658         * modules/fnmatch (Depends-on): Depend on wchar.
659         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
660         * m4/fnmatch.m4: Likewise.
661         * modules/mbchar (Makefile.am): Assume <wchar.h>.
662         * m4/mbchar.m4: Likewise.
663         * modules/mbswidth (Depends-on): Depend on wchar.
664         * lib/mbswidth.c: Assume <wchar.h>.
665         * m4/mbswidth.m4: Likewise.
666         * modules/quotearg (Depends-on): Depend on wchar.
667         * lib/quotearg.c: Assume <wchar.h>.
668         * m4/quotearg.m4: Likewise.
669         * modules/regex (Depends-on): Depend on wchar.
670         * lib/regex_internal.h: Assume <wchar.h>.
671         * m4/regex.m4: Likewise.
672         * modules/stdint (Depends-on): Depend on wchar.
673         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
674         * m4/stdint.m4: Likewise.
675         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
676         * modules/strftime (Depends-on): Depend on wchar.
677         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
678         * modules/strtol (Depends-on): Depend on wchar.
679         * lib/strtol.c: Assume <wchar.h>.
680         * modules/wcwidth (Depends-on): Depend on wchar.
681         * lib/wcwidth.h: Assume <wchar.h>.
682         * m4/wcwidth.m4: Likewise.
683
684 2007-01-16  Bruno Haible  <bruno@clisp.org>
685
686         * modules/csharpexec-script: New, created from...
687         * modules/csharpexec: ... this.
688
689 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
690
691         * modules/javaexec-script: New, created from...
692         * modules/javaexec: ... this.
693
694 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
695
696         * modules/poll (Dependencies): Add sys_select.
697
698 2007-01-15  Jim Meyering  <jim@meyering.net>
699
700         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
701         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
702         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
703         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
704
705 2007-01-15  Bruno Haible  <bruno@clisp.org>
706
707         * modules/striconveh: New file.
708         * lib/striconveh.h: New file.
709         * lib/striconveh.c: New file.
710         * MODULES.html.sh (Internationalization functions): Add striconveh.
711
712         * modules/striconveh-tests: New file.
713         * tests/test-striconveh.c: New file.
714
715 2007-01-15  Bruno Haible  <bruno@clisp.org>
716
717         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
718         not from GNU libiconv or GNU libc.
719
720 2007-01-15  Bruno Haible  <bruno@clisp.org>
721
722         * doc/gnulib-intro.texi (Copyright): Explain the different license
723         terms for module descriptions, autoconf macros, tests, documentation.
724
725 2007-01-14  Bruno Haible  <bruno@clisp.org>
726
727         * modules/striconv-tests: New file.
728         * tests/test-striconv.c: New file.
729
730 2007-01-14  Bruno Haible  <bruno@clisp.org>
731
732         * modules/iconv-tests: New file.
733         * tests/test-iconv.c: New file.
734
735 2007-01-14  Bruno Haible  <bruno@clisp.org>
736
737         * gnulib-tool (func_get_license): For test modules, use the license of
738         the main module.
739
740 2007-01-14  Bruno Haible  <bruno@clisp.org>
741
742         * modules/iconv (Include): Clarify that <iconv.h> can only be included
743         if iconv is found to exist.
744
745 2007-01-14  Bruno Haible  <bruno@clisp.org>
746
747         * modules/c-ctype-tests: New file.
748         * tests/test-c-ctype.c: New file.
749
750 2007-01-14  Bruno Haible  <bruno@clisp.org>
751
752         * modules/binary-io-tests: New file.
753         * tests/test-binary-io.sh: New file.
754         * tests/test-binary-io.c: New file.
755
756 2007-01-14  Bruno Haible  <bruno@clisp.org>
757
758         * modules/array-oset-tests: New file.
759         * tests/test-array_oset.c: New file.
760
761 2007-01-14  Bruno Haible  <bruno@clisp.org>
762
763         * modules/array-list-tests: New file.
764         * tests/test-array_list.c: New file.
765
766 2007-01-14  Bruno Haible  <bruno@clisp.org>
767
768         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
769         and make.
770         Reported by Simon Josefsson in
771         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
772
773 2007-01-14  Bruno Haible  <bruno@clisp.org>
774
775         * modules/allocsa-tests: New file.
776         * tests/test-allocsa.c: New file.
777
778 2007-01-14  Bruno Haible  <bruno@clisp.org>
779
780         * modules/fchdir (Depends-on): Add absolute-header.
781         * modules/unistd (Depends-on): Likewise.
782
783 2006-12-30  Bruno Haible  <bruno@clisp.org>
784
785         * modules/fchdir: New file.
786         * modules/unistd (Files): Add lib/unistd_.h.
787         (Makefile.am): Generate unistd.h from unistd_.h.
788         * lib/fchdir.c: New file.
789         * lib/dirent_.h: New file.
790         * lib/unistd_.h: New file.
791         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
792         * m4/fchdir.m4: New file.
793         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
794         (gl_HEADER_UNISTD): Invoke it.
795         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
796         function.
797         * lib/backupfile.c (opendir, closedir): Undefine.
798         * lib/chown.c (open, close): Undefine.
799         * lib/clean-temp.c (open, close): Undefine.
800         * lib/copy-file.c (open, close): Undefine.
801         * lib/execute.c (open, close): Undefine.
802         * lib/fsusage.c (open, close): Undefine.
803         * lib/gc-gnulib.c (open, close): Undefine.
804         * lib/getcwd.c (opendir, closedir): Undefine.
805         * lib/glob.c (opendir, closedir): Undefine.
806         * lib/javacomp.c (open, close): Undefine.
807         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
808         * lib/openat-proc.c (open, close): Undefine.
809         * lib/pagealign_alloc.c (open, close): Undefine.
810         * lib/pipe.c (open, close): Undefine.
811         * lib/progreloc.c (open, close): Undefine.
812         * lib/savedir.c (opendir, closedir): Undefine.
813         * lib/utime.c (open, close): Undefine.
814         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
815
816 2007-01-10  Bruno Haible  <bruno@clisp.org>
817
818         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
819
820 2007-01-12  Eric Blake  <ebb9@byu.net>
821
822         Provide a robust <wchar.h>.  Further simplifications are now
823         possible in other modules, but not included here.
824         * modules/wchar: New module.
825         * m4/wchar.m4: New file.
826         * lib/wchar_.h: Likewise.
827         * modules/mbchar (Depends-on): Depend on wchar, as the first use
828         of the new module.
829         * MODULES.html.sh (Extended multibyte and wide character utilities):
830         New section.
831
832 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
833
834         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
835         to a reasonable default for memory allocation.
836         (xreadlink): Don't allocate a huge buffer, to work around a buggy
837         file system that reports garbage st_size values for symlinks.
838         Problem reported by Liyang Hu.
839
840 2007-01-11  Simon Josefsson  <simon@josefsson.org>
841
842         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
843         Emacs .#* auto-save files).
844
845 2007-01-11  Bruno Haible  <bruno@clisp.org>
846
847         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
848         directory.
849
850 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
851
852         Use @...@ consistently in lib/wctype_.h.
853         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
854         on it being set to 1 or 0.
855         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
856         go back to AC_SUBSTing it.
857         * modules/wctype (Makefile.am): Undo previous change.
858
859 2007-01-10  Eric Blake  <ebb9@byu.net>
860
861         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
862         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
863         * modules/wctype (Makefile.am): Likewise.
864         Reported by Chris McGuire.
865
866 2007-01-10  Jim Meyering  <jim@meyering.net>
867
868         fts.c: a small readability/maintainability improvement
869         * lib/fts.c (fts_read): Make this code slightly more readable and
870         maintainable by hoisting the "sp->fts_cur = p" assignments to
871         immediately follow the statements that set P.  Derived from
872         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
873
874 2007-01-10  Eric Blake  <ebb9@byu.net>
875
876         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
877         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
878         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
879         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
880         Reported by Chris McGuire.
881
882 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
883
884         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
885         in sed script.
886
887 2007-01-09  Bruno Haible  <bruno@clisp.org>
888
889         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
890         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
891         variables.
892         (func_module): Use them.
893
894 2007-01-09  Bruno Haible  <bruno@clisp.org>
895
896         * modules/unistr/base: New file.
897         * lib/unistr.h: New file.
898
899         * modules/unistr/u8-to-u16: New file.
900         * lib/unistr/u8-to-u16.c: New file.
901
902         * modules/unistr/u8-to-u32: New file.
903         * lib/unistr/u8-to-u32.c: New file.
904
905         * modules/unistr/u16-to-u8: New file.
906         * lib/unistr/u16-to-u8.c: New file.
907
908         * modules/unistr/u16-to-u32: New file.
909         * lib/unistr/u16-to-u32.c: New file.
910
911         * modules/unistr/u32-to-u8: New file.
912         * lib/unistr/u32-to-u8.c: New file.
913
914         * modules/unistr/u32-to-u16: New file.
915         * lib/unistr/u32-to-u16.c: New file.
916
917         * modules/unistr/u8-check: New file.
918         * modules/unistr/u16-check: New file.
919         * modules/unistr/u32-check: New file.
920         * lib/unistr/u8-check.c: New file.
921         * lib/unistr/u16-check.c: New file.
922         * lib/unistr/u32-check.c: New file.
923
924         * modules/unistr/u8-chr: New file.
925         * modules/unistr/u16-chr: New file.
926         * modules/unistr/u32-chr: New file.
927         * lib/unistr/u8-chr.c: New file.
928         * lib/unistr/u16-chr.c: New file.
929         * lib/unistr/u32-chr.c: New file.
930
931         * modules/unistr/u8-cmp: New file.
932         * modules/unistr/u16-cmp: New file.
933         * modules/unistr/u32-cmp: New file.
934         * lib/unistr/u8-cmp.c: New file.
935         * lib/unistr/u16-cmp.c: New file.
936         * lib/unistr/u32-cmp.c: New file.
937
938         * modules/unistr/u8-cpy: New file.
939         * modules/unistr/u16-cpy: New file.
940         * modules/unistr/u32-cpy: New file.
941         * lib/unistr/u8-cpy.c: New file.
942         * lib/unistr/u16-cpy.c: New file.
943         * lib/unistr/u32-cpy.c: New file.
944         * lib/unistr/u-cpy.h: New file.
945
946         * modules/unistr/u8-cpy-alloc: New file.
947         * modules/unistr/u16-cpy-alloc: New file.
948         * modules/unistr/u32-cpy-alloc: New file.
949         * lib/unistr/u8-cpy-alloc.c: New file.
950         * lib/unistr/u16-cpy-alloc.c: New file.
951         * lib/unistr/u32-cpy-alloc.c: New file.
952         * lib/unistr/u-cpy-alloc.h: New file.
953
954         * modules/unistr/u8-endswith: New file.
955         * modules/unistr/u16-endswith: New file.
956         * modules/unistr/u32-endswith: New file.
957         * lib/unistr/u8-endswith.c: New file.
958         * lib/unistr/u16-endswith.c: New file.
959         * lib/unistr/u32-endswith.c: New file.
960         * lib/unistr/u-endswith.h: New file.
961
962         * modules/unistr/u8-mblen: New file.
963         * modules/unistr/u16-mblen: New file.
964         * modules/unistr/u32-mblen: New file.
965         * lib/unistr/u8-mblen.c: New file.
966         * lib/unistr/u16-mblen.c: New file.
967         * lib/unistr/u32-mblen.c: New file.
968
969         * modules/unistr/u8-mbtouc: New file.
970         * modules/unistr/u16-mbtouc: New file.
971         * modules/unistr/u32-mbtouc: New file.
972         * lib/unistr/u8-mbtouc.c: New file.
973         * lib/unistr/u16-mbtouc.c: New file.
974         * lib/unistr/u32-mbtouc.c: New file.
975
976         * modules/unistr/u8-mbtouc-safe: New file.
977         * modules/unistr/u16-mbtouc-safe: New file.
978         * modules/unistr/u32-mbtouc-safe: New file.
979         * lib/unistr/u8-mbtouc-safe.c: New file.
980         * lib/unistr/u16-mbtouc-safe.c: New file.
981         * lib/unistr/u32-mbtouc-safe.c: New file.
982
983         * modules/unistr/u8-move: New file.
984         * modules/unistr/u16-move: New file.
985         * modules/unistr/u32-move: New file.
986         * lib/unistr/u8-move.c: New file.
987         * lib/unistr/u16-move.c: New file.
988         * lib/unistr/u32-move.c: New file.
989         * lib/unistr/u-move.h: New file.
990
991         * modules/unistr/u8-next: New file.
992         * modules/unistr/u16-next: New file.
993         * modules/unistr/u32-next: New file.
994         * lib/unistr/u8-next.c: New file.
995         * lib/unistr/u16-next.c: New file.
996         * lib/unistr/u32-next.c: New file.
997
998         * modules/unistr/u8-prev: New file.
999         * modules/unistr/u16-prev: New file.
1000         * modules/unistr/u32-prev: New file.
1001         * lib/unistr/u8-prev.c: New file.
1002         * lib/unistr/u16-prev.c: New file.
1003         * lib/unistr/u32-prev.c: New file.
1004
1005         * modules/unistr/u8-set: New file.
1006         * modules/unistr/u16-set: New file.
1007         * modules/unistr/u32-set: New file.
1008         * lib/unistr/u8-set.c: New file.
1009         * lib/unistr/u16-set.c: New file.
1010         * lib/unistr/u32-set.c: New file.
1011         * lib/unistr/u-set.h: New file.
1012
1013         * modules/unistr/u8-startswith: New file.
1014         * modules/unistr/u16-startswith: New file.
1015         * modules/unistr/u32-startswith: New file.
1016         * lib/unistr/u8-startswith.c: New file.
1017         * lib/unistr/u16-startswith.c: New file.
1018         * lib/unistr/u32-startswith.c: New file.
1019         * lib/unistr/u-startswith.h: New file.
1020
1021         * modules/unistr/u8-stpcpy: New file.
1022         * modules/unistr/u16-stpcpy: New file.
1023         * modules/unistr/u32-stpcpy: New file.
1024         * lib/unistr/u8-stpcpy.c: New file.
1025         * lib/unistr/u16-stpcpy.c: New file.
1026         * lib/unistr/u32-stpcpy.c: New file.
1027         * lib/unistr/u-stpcpy.h: New file.
1028
1029         * modules/unistr/u8-stpncpy: New file.
1030         * modules/unistr/u16-stpncpy: New file.
1031         * modules/unistr/u32-stpncpy: New file.
1032         * lib/unistr/u8-stpncpy.c: New file.
1033         * lib/unistr/u16-stpncpy.c: New file.
1034         * lib/unistr/u32-stpncpy.c: New file.
1035         * lib/unistr/u-stpncpy.h: New file.
1036
1037         * modules/unistr/u8-strcat: New file.
1038         * modules/unistr/u16-strcat: New file.
1039         * modules/unistr/u32-strcat: New file.
1040         * lib/unistr/u8-strcat.c: New file.
1041         * lib/unistr/u16-strcat.c: New file.
1042         * lib/unistr/u32-strcat.c: New file.
1043         * lib/unistr/u-strcat.h: New file.
1044
1045         * modules/unistr/u8-strchr: New file.
1046         * modules/unistr/u16-strchr: New file.
1047         * modules/unistr/u32-strchr: New file.
1048         * lib/unistr/u8-strchr.c: New file.
1049         * lib/unistr/u16-strchr.c: New file.
1050         * lib/unistr/u32-strchr.c: New file.
1051
1052         * modules/unistr/u8-strcmp: New file.
1053         * modules/unistr/u16-strcmp: New file.
1054         * modules/unistr/u32-strcmp: New file.
1055         * lib/unistr/u8-strcmp.c: New file.
1056         * lib/unistr/u16-strcmp.c: New file.
1057         * lib/unistr/u32-strcmp.c: New file.
1058
1059         * modules/unistr/u8-strcpy: New file.
1060         * modules/unistr/u16-strcpy: New file.
1061         * modules/unistr/u32-strcpy: New file.
1062         * lib/unistr/u8-strcpy.c: New file.
1063         * lib/unistr/u16-strcpy.c: New file.
1064         * lib/unistr/u32-strcpy.c: New file.
1065         * lib/unistr/u-strcpy.h: New file.
1066
1067         * modules/unistr/u8-strcspn: New file.
1068         * modules/unistr/u16-strcspn: New file.
1069         * modules/unistr/u32-strcspn: New file.
1070         * lib/unistr/u8-strcspn.c: New file.
1071         * lib/unistr/u16-strcspn.c: New file.
1072         * lib/unistr/u32-strcspn.c: New file.
1073         * lib/unistr/u-strcspn.h: New file.
1074
1075         * modules/unistr/u8-strdup: New file.
1076         * modules/unistr/u16-strdup: New file.
1077         * modules/unistr/u32-strdup: New file.
1078         * lib/unistr/u8-strdup.c: New file.
1079         * lib/unistr/u16-strdup.c: New file.
1080         * lib/unistr/u32-strdup.c: New file.
1081         * lib/unistr/u-strdup.h: New file.
1082
1083         * modules/unistr/u8-strlen: New file.
1084         * modules/unistr/u16-strlen: New file.
1085         * modules/unistr/u32-strlen: New file.
1086         * lib/unistr/u8-strlen.c: New file.
1087         * lib/unistr/u16-strlen.c: New file.
1088         * lib/unistr/u32-strlen.c: New file.
1089         * lib/unistr/u-strlen.h: New file.
1090
1091         * modules/unistr/u8-strmblen: New file.
1092         * modules/unistr/u16-strmblen: New file.
1093         * modules/unistr/u32-strmblen: New file.
1094         * lib/unistr/u8-strmblen.c: New file.
1095         * lib/unistr/u16-strmblen.c: New file.
1096         * lib/unistr/u32-strmblen.c: New file.
1097
1098         * modules/unistr/u8-strmbtouc: New file.
1099         * modules/unistr/u16-strmbtouc: New file.
1100         * modules/unistr/u32-strmbtouc: New file.
1101         * lib/unistr/u8-strmbtouc.c: New file.
1102         * lib/unistr/u16-strmbtouc.c: New file.
1103         * lib/unistr/u32-strmbtouc.c: New file.
1104
1105         * modules/unistr/u8-strncat: New file.
1106         * modules/unistr/u16-strncat: New file.
1107         * modules/unistr/u32-strncat: New file.
1108         * lib/unistr/u8-strncat.c: New file.
1109         * lib/unistr/u16-strncat.c: New file.
1110         * lib/unistr/u32-strncat.c: New file.
1111         * lib/unistr/u-strncat.h: New file.
1112
1113         * modules/unistr/u8-strncmp: New file.
1114         * modules/unistr/u16-strncmp: New file.
1115         * modules/unistr/u32-strncmp: New file.
1116         * lib/unistr/u8-strncmp.c: New file.
1117         * lib/unistr/u16-strncmp.c: New file.
1118         * lib/unistr/u32-strncmp.c: New file.
1119
1120         * modules/unistr/u8-strncpy: New file.
1121         * modules/unistr/u16-strncpy: New file.
1122         * modules/unistr/u32-strncpy: New file.
1123         * lib/unistr/u8-strncpy.c: New file.
1124         * lib/unistr/u16-strncpy.c: New file.
1125         * lib/unistr/u32-strncpy.c: New file.
1126         * lib/unistr/u-strncpy.h: New file.
1127
1128         * modules/unistr/u8-strnlen: New file.
1129         * modules/unistr/u16-strnlen: New file.
1130         * modules/unistr/u32-strnlen: New file.
1131         * lib/unistr/u8-strnlen.c: New file.
1132         * lib/unistr/u16-strnlen.c: New file.
1133         * lib/unistr/u32-strnlen.c: New file.
1134         * lib/unistr/u-strnlen.h: New file.
1135
1136         * modules/unistr/u8-strpbrk: New file.
1137         * modules/unistr/u16-strpbrk: New file.
1138         * modules/unistr/u32-strpbrk: New file.
1139         * lib/unistr/u8-strpbrk.c: New file.
1140         * lib/unistr/u16-strpbrk.c: New file.
1141         * lib/unistr/u32-strpbrk.c: New file.
1142         * lib/unistr/u-strpbrk.h: New file.
1143
1144         * modules/unistr/u8-strrchr: New file.
1145         * modules/unistr/u16-strrchr: New file.
1146         * modules/unistr/u32-strrchr: New file.
1147         * lib/unistr/u8-strrchr.c: New file.
1148         * lib/unistr/u16-strrchr.c: New file.
1149         * lib/unistr/u32-strrchr.c: New file.
1150
1151         * modules/unistr/u8-strspn: New file.
1152         * modules/unistr/u16-strspn: New file.
1153         * modules/unistr/u32-strspn: New file.
1154         * lib/unistr/u8-strspn.c: New file.
1155         * lib/unistr/u16-strspn.c: New file.
1156         * lib/unistr/u32-strspn.c: New file.
1157         * lib/unistr/u-strspn.h: New file.
1158
1159         * modules/unistr/u8-strstr: New file.
1160         * modules/unistr/u16-strstr: New file.
1161         * modules/unistr/u32-strstr: New file.
1162         * lib/unistr/u8-strstr.c: New file.
1163         * lib/unistr/u16-strstr.c: New file.
1164         * lib/unistr/u32-strstr.c: New file.
1165         * lib/unistr/u-strstr.h: New file.
1166
1167         * modules/unistr/u8-strtok: New file.
1168         * modules/unistr/u16-strtok: New file.
1169         * modules/unistr/u32-strtok: New file.
1170         * lib/unistr/u8-strtok.c: New file.
1171         * lib/unistr/u16-strtok.c: New file.
1172         * lib/unistr/u32-strtok.c: New file.
1173         * lib/unistr/u-strtok.h: New file.
1174
1175         * modules/unistr/u8-uctomb: New file.
1176         * modules/unistr/u16-uctomb: New file.
1177         * modules/unistr/u32-uctomb: New file.
1178         * lib/unistr/u8-uctomb.c: New file.
1179         * lib/unistr/u16-uctomb.c: New file.
1180         * lib/unistr/u32-uctomb.c: New file.
1181
1182         * MODULES.html.sh (Unicode string functions): Add the new modules.
1183
1184 2007-01-08  Bruno Haible  <bruno@clisp.org>
1185
1186         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
1187         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
1188         subdirectories.
1189
1190 2007-01-08  Karl Berry  <karl@gnu.org>
1191
1192         * doc/error.texi: mention that main() fns must set program_name
1193         when progname is used.
1194
1195 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
1196
1197         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
1198         WCTYPE_H is empty, for the benefit of builds from non-distclean
1199         directories.  Problem reported by Eric Blake in
1200         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
1201
1202 2007-01-08  Bruno Haible  <bruno@clisp.org>
1203
1204         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
1205         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
1206         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
1207         PROVIDE_CANONICALIZE_FILENAME_MODE.
1208         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
1209
1210 2007-01-08  Bruno Haible  <bruno@clisp.org>
1211
1212         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
1213         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
1214         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
1215         * lib/fts.c: Likewise.
1216         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
1217
1218 2006-12-25  Bruno Haible  <bruno@clisp.org>
1219
1220         * modules/utf8-ucs4-safe: New file.
1221         * lib/utf8-ucs4-safe.h: New file.
1222         * lib/unistr/utf8-ucs4-safe.c: New file.
1223
1224         * modules/utf16-ucs4-safe: New file.
1225         * lib/utf16-ucs4-safe.h: New file.
1226         * lib/unistr/utf16-ucs4-safe.c: New file.
1227
1228         * MODULES.html.sh (Unicode string functions): Add the new modules.
1229
1230 2007-01-08  Bruno Haible  <bruno@clisp.org>
1231
1232         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
1233         (Depends-on): Add unitypes.
1234         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1235         (u8_mbtouc_aux): Move out to separate file.
1236         (u8_mbtouc): Use ucs4_t, uint8_t types.
1237         * lib/unistr/utf8-ucs4.c: New file.
1238
1239         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
1240         (Depends-on): Add unitypes.
1241         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1242         (u16_mbtouc_aux): Move out to separate file.
1243         (u16_mbtouc): Use ucs4_t, uint16_t types.
1244         * lib/unistr/utf16-ucs4.c: New file.
1245
1246         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
1247         (Depends-on): Add unitypes.
1248         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
1249         (u8_uctomb_aux): Move out to separate file.
1250         (u8_uctomb): Use ucs4_t, uint8_t types.
1251         * lib/unistr/ucs4-utf8.c: New file.
1252
1253         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
1254         (Depends-on): Add unitypes.
1255         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
1256         (u16_uctomb_aux): Move out to separate file.
1257         (u16_uctomb): Use ucs4_t, uint16_t types.
1258         * lib/unistr/ucs4-utf16.c: New file.
1259
1260 2006-12-25  Bruno Haible  <bruno@clisp.org>
1261
1262         * modules/unitypes: New file.
1263         * lib/unitypes.h: New file.
1264         * MODULES.html.sh (func_all_modules): New section "Unicode string
1265         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
1266         this section. Add unitypes.
1267
1268 2007-01-08  Bruno Haible  <bruno@clisp.org>
1269
1270         Avoid variable names that conflict with those from libtool.
1271         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
1272         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
1273         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1274         library_names_spec to acl_library_names_spec, hardcode_* to
1275         acl_hardcode_*.
1276         Reported by Ralf Wildenhues.
1277
1278 2007-01-08  Bruno Haible  <bruno@clisp.org>
1279
1280         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1281         definition.
1282         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1283         definition.
1284         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1285         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1286         definition.
1287         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1288         definition.
1289         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1290         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1291         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1292         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1293         definition.
1294         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1295         definition.
1296         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1297         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1298         GC_USE_<algorithm>.
1299         * lib/gc-libgcrypt.c: Likewise.
1300         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1301         * modules/gc-arctwo (configure.ac): Likewise.
1302         * modules/gc-des (configure.ac): Likewise.
1303         * modules/gc-hmac-md5 (configure.ac): Likewise.
1304         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1305         * modules/gc-md2 (configure.ac): Likewise.
1306         * modules/gc-md4 (configure.ac): Likewise.
1307         * modules/gc-md5 (configure.ac): Likewise.
1308         * modules/gc-random (configure.ac): Likewise.
1309         * modules/gc-rijndael (configure.ac): Likewise.
1310         * modules/gc-sha1 (configure.ac): Likewise.
1311
1312 2007-01-08  Bruno Haible  <bruno@clisp.org>
1313
1314         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1315         macro definition.
1316         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1317         definition.
1318         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1319         definition.
1320         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1321         * modules/fcntl-safer (configure.ac): Likewise.
1322         * modules/fopen-safer (configure.ac): Likewise.
1323         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1324         GNULIB_FWRITEERROR macro definition.
1325
1326 2007-01-08  Bruno Haible  <bruno@clisp.org>
1327
1328         * m4/gnulib-common.m4: New file.
1329         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1330         (func_get_filelist): Add m4/gnulib-common.m4.
1331
1332 2007-01-08  Bruno Haible  <bruno@clisp.org>
1333
1334         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1335         command.
1336
1337 2007-01-08  Jim Meyering  <jim@meyering.net>
1338
1339         Use a more robust test for a "can't happen" condition.
1340         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1341         narrowed the st_size value.  Presuming the "can't happen" condition
1342         is true, that narrowing could conceivably convert an invalid st_size
1343         value into a valid one.  Instead, use a change based on Matthew
1344         Woehlke's original patch.
1345
1346         Slight readability improvement: use an assert-like macro
1347         in place of literal "abort ()" uses.
1348         * lib/fts.c (fts_assert): Define.
1349         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1350         Use this macro instead of a bare 'abort'.
1351
1352 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1353
1354         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1355         simply work around them.
1356         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1357         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1358         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1359         Don't bother to define as macros, since the standard doesn't require it.
1360         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1361         longer worry about IRIX 5.3.
1362         (HAVE_WCTYPE_CTMP_BUG): Remove.
1363
1364 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1365
1366         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1367         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1368         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1369         Problems reported by Georg Schwarz for IRIX 5.3.
1370
1371         * gnulib-tool (autoconf_minversion): Take the maximum version number
1372         found, not the minimum.  Problem reported by James Youngman.
1373
1374 2007-01-03  Karl Berry  <karl@gnu.org>
1375
1376         * doc/error.texi: new file, explaining interaction with progname.
1377         * doc/gnulib.texi: include it.  Update copyright.
1378
1379 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1380
1381         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1382         AC_CANONICAL_HOST, to improve autobuild outputs.
1383
1384 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1385             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1386
1387         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1388         sockets, server sockets, and other file descriptors.  Count errors
1389         to compute the return value.  Reorder the code a bit to be easier
1390         to follow.  Don't set event bits that were not requested (except
1391         POLLERR and POLLHUP).
1392
1393 2007-01-01  Bruno Haible  <bruno@clisp.org>
1394
1395         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1396
1397 2007-01-03  Jim Meyering  <jim@meyering.net>
1398
1399         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1400
1401 2007-01-02  Bruno Haible  <bruno@clisp.org>
1402
1403         * modules/settime (Include): Require timespec.h.
1404         * modules/nanosleep (Include): Likewise.
1405
1406 2007-01-01  Bruno Haible  <bruno@clisp.org>
1407
1408         * gnulib-tool (func_emit_copyright_notice): Bump year.
1409         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1410
1411 2007-01-01  Bruno Haible  <bruno@clisp.org>
1412
1413         Improve support for OpenBSD.
1414         * build-aux/config.rpath (libname_spec): Export.
1415         (library_names_spec): New variable. Export.
1416         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
1417         library_names_spec from the config.rpath output. Locate shared library
1418         through the name pattern in library_names_spec.
1419
1420 2007-01-01  Eric Blake  <ebb9@byu.net>
1421
1422         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1423
1424 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1425
1426         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1427         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1428         assume the C locale, and avoid an "eval" that could cause trouble.
1429         Problem with SORT reported by Bob Proulx.
1430
1431         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1432         Define.  Trivial patch from Henning Nielsen Lund, originally
1433         sent to bug-grep@gnu.org today.
1434
1435 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1436
1437         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
1438         struct stat.  Problem reported by Henning Nielsen Lund.
1439         * lib/acl.c: Include acl.h first, to check interface.  Don't
1440         bother to include sys/types.h and sys/stat.h again.
1441
1442 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1443
1444         Import the following change from libc; problem reported by
1445         Sven Verdoolaege.
1446
1447         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
1448
1449         [BZ #1373]
1450         * lib/argp.h: Remove __NTH for __argp_usage inline function.
1451
1452 2006-12-28  Jim Meyering  <jim@meyering.net>
1453
1454         * build-aux/announce-gen: Do not assume that the package
1455         builds any of tar.gz, tar.bz2, and .xdelta files.
1456         Suggestion from Simon Josefsson.
1457
1458 2006-12-28  Simon Josefsson  <simon@josefsson.org>
1459
1460         * modules/announce-gen: New file.
1461
1462 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
1463
1464         * lib/mbchar.h: Just include <wctype.h>; the wctype module
1465         handles its gotchas now.
1466         * lib/mbswidth.c: Likewise.
1467         * lib/wcwidth.h: Likewise.
1468         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
1469         and iswcntrl; the wctype module does this stuff now.
1470         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1471         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1472         * modules/mbchar (Depends-on): Add wctype.
1473         * modules/mbswidth (Depends-on): Likewise.
1474         * modules/wcwidth (Depends-on): Likewise.
1475
1476 2006-12-27  Eric Blake  <ebb9@byu.net>
1477
1478         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
1479         module uses more than what <wctype.h> is required to provide.
1480
1481 2006-12-26  Eric Blake  <ebb9@byu.net>
1482
1483         * gnulib-tool (sed_extract_prog): Avoid space-tab.
1484
1485 2006-12-26  Eric Blake  <ebb9@byu.net>
1486
1487         * modules/absolute-header: New module.
1488         * modules/fcntl (Depends-on): Depend on it.
1489         * modules/inttypes (Depends-on): Likewise.
1490         * modules/stdint (Depends-on): Likewise.
1491         * modules/sys_stat (Depends-on): Likewise.
1492         * modules/wctype (Depends-on): Likewise.
1493         * MODULES.html.sh (Support for building libraries and
1494         executables): Document it.
1495
1496 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1497
1498         * gnulib-tool (SED): Remove, undoing previous change.
1499         The problem was that it broke coreutils on Solaris, because
1500         "sed --posix" leaked into a makefile.
1501         (sed): New alias, if 'alias' and GNU sed.
1502
1503 2006-12-24  Jim Meyering  <jim@meyering.net>
1504
1505         Work around an fchownat bug in glibc-2.4:
1506         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1507         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1508         in spite of the -P option.
1509         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1510         New macros.
1511         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1512         * modules/openat (Files): Add lib/fchownat.c.
1513         * lib/openat.c (fchownat): Don't define here.  Move to...
1514         * lib/fchownat.c: ...this new file.
1515
1516 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1517
1518         Fix bug reported by Bruno Haible in
1519         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1520         where quotearg.c didn't compile on Mac OS X 10.2 because it
1521         lacks <wchar.h> and wint_t.
1522         * lib/wctype_.h (__wctype_wint_t): New type.
1523         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1524         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1525         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1526         Arg is now of type __wctype_wint_t, not wint_t.
1527         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1528         substitute HAVE_WINT_T.
1529         * modules/wctype (Files): Add m4/wint_t.m4.
1530         (wctype.h): Substitute HAVE_WINT_T.
1531
1532 2006-12-23  Bruno Haible  <bruno@clisp.org>
1533
1534         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1535
1536 2006-12-23  Bruno Haible  <bruno@clisp.org>
1537
1538         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1539         S_ISLNK.
1540         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1541         mingw.
1542
1543 2006-12-22  Bruno Haible  <bruno@clisp.org>
1544
1545         * lib/copy-file.c: Include acl.h.
1546         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1547         Close the file descriptors only after being done with copy_acl.
1548         * modules/copy-file (Depends-on): Add acl.
1549
1550 2006-12-22  Bruno Haible  <bruno@clisp.org>
1551
1552         * gnulib-tool (SED): New variable.
1553         Use $SED instead of sed everywhere.
1554
1555 2006-12-22  Bruno Haible  <bruno@clisp.org>
1556
1557         * modules/no-c++: New file.
1558         * m4/no-c++.m4: New file.
1559         * MODULES.html.sh (Support for building libraries and executables):
1560         Add no-c++.
1561
1562 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1563
1564         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1565         Include <limits.h>, and use its INT_MAX to rewrite the
1566         j loop so that it does not overflow 'int'.  Problem reported by
1567         Ralf Wildenhues in
1568         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1569         Play it safe by shifting left by 1 rather than multiplying by 2,
1570         as GCC is less likely to optimize this away when the value
1571         is signed (when it assumes overflow leads to undefined behavior).
1572         Also, don't assume time_t uses two's complement.
1573
1574 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1575
1576         * MODULES.html.sh: New module wctype.
1577         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1578         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1579         <wctype.h>, since the new wctype module should fix this.
1580         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1581         the wctype module should arrange for it.
1582         * lib/regex_internal.h: Likewise.
1583         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1584         since the wctype module should handle this now.
1585         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1586         * modules/fnmatch (Depends-on): Add wctype.
1587         * modules/quotearg (Depends-on): Likewise.
1588         * modules/regex (Depends-on): Likewise.
1589
1590 2006-12-19  Bruno Haible  <bruno@clisp.org>
1591
1592         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1593         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1594
1595 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1596
1597         * modules/savewd (Depends-on): Fix dependency on fcntl.
1598
1599 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1600
1601         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1602         conforms to C99, rather than relying on the user's environment
1603         setting of STDINT_H.
1604
1605 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1606         and Eric Blake  <ebb9@byu.net>
1607
1608         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1609         This is more consistent with the other defines here.
1610         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1611         Port to z/OS.  Problem reported by Paul Gilmartin.
1612         Change local vars to use gl_ prefix rather than ac_.
1613         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1614         with other defines.
1615         * modules/double-slash-root: New module.
1616         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1617         (Depends-on): Add double-slash-root.
1618         * MODULES.html.sh (File system functions): Mention new module.
1619
1620 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1621
1622         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1623         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1624         This is for the benefit of gzip, which doesn't do i18n.
1625
1626 2006-12-12  Jim Meyering  <jim@meyering.net>
1627
1628         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1629         Reported by Andreas Schwab <schwab@suse.de>.
1630
1631 2006-12-12  Bruno Haible  <bruno@clisp.org>
1632
1633         Merge these changes.
1634         2006-09-05  Bruno Haible  <bruno@clisp.org>
1635         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1636         iconv_alloc succeeded.
1637         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1638         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1639         test for " && dest " at the end - dest is always != NULL there. Call
1640         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1641         with 2xNULL arguments, also to flush the state storage. Handle the
1642         IRIX iconv behaviour. Realloc the final result, to throw away unused
1643         memory.
1644
1645 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1646
1647         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1648         and fchmodat unconditionally, since glibc 2.4 has them.
1649         Problem reported by Arkadiusz Miskiewicz.
1650
1651 2006-12-10  Bruno Haible  <bruno@clisp.org>
1652
1653         * gnulib-tool (func_import): Show the include files only for those
1654         modules that are copied and specified.
1655         Reported by Karl Berry.
1656
1657 2006-12-08  Jim Meyering  <jim@meyering.net>
1658
1659         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1660         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1661
1662         * build-aux/announce-gen: Add two new options, both optional:
1663         --bootstrap-tools=TOOL_LIST
1664               a comma-separated list of tools, e.g.,
1665               autoconf,automake,bison,gnulib
1666         --gnulib-snapshot-date=DATE
1667               if gnulib is in the bootstrap tool list,
1668               then report this as the snapshot date.
1669               If not specified, use the current date/time.
1670               If you specify a date here, be sure it's UTC.
1671
1672 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1673
1674         * tests/test-argp-2.sh: Fix test to match actual output.
1675         (func_compare): Fix sed script to be portable.
1676
1677 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1678
1679         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1680         workaround for this case.  It is not autoconfigured now; offhand
1681         it's hard to see how to autoconfigure it.
1682
1683 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1684
1685         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1686         a directory that is about to be chowned.  Such a directory's
1687         initial file permissions should permit the owner only and this
1688         should not be changed until after the chown, since the group and
1689         other bits would be incorrect if they granted permission before
1690         the chown.
1691
1692         Fix porting problem for iswctype reported by Georg Schwarz in:
1693         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1694         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1695         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1696         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1697         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1698
1699 2006-12-03  Jim Meyering  <jim@meyering.net>
1700
1701         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1702         p->fts_statp may not yet be defined.
1703         (fts_read): Instead, set it in the caller, once p->fts_statp is
1704         sure to be defined, and corresponds to a top-level directory.
1705         This bug made du -x fail.  Here's the coreutils test case:
1706         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1707         Reported by Mike Frysinger.
1708
1709 2006-12-01  Jim Meyering  <jim@meyering.net>
1710
1711         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1712         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1713         Reported by Simon Josefsson.
1714
1715 2006-11-30  Jim Meyering  <jim@meyering.net>
1716
1717         * m4/warning.m4: Use the all-permissive copyright notice
1718         recommended by RMS (rather than LGPL).
1719         * m4/vararrays.m4: Likewise.
1720         * m4/flexmember.m4: Likewise.
1721
1722 2006-11-29  Bruno Haible  <bruno@clisp.org>
1723
1724         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1725         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1726         using +=.
1727         Reported by Simon Josefsson <simon@josefsson.org>.
1728
1729 2006-11-28  James Youngman <jay@gnu.org>
1730
1731         * README: Advise users that they might find the bug-gnulib@gnu.org
1732         and autotools-announce@gnu.org mailing lists useful.
1733
1734 2006-11-28  Bruno Haible  <bruno@clisp.org>
1735
1736         * m4/ptrdiff_max.m4: Remove file.
1737
1738 2006-11-21  Bruno Haible  <bruno@clisp.org>
1739
1740         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1741         _AC_COMPUTE_INT.
1742         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1743         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1744         _AC_COMPUTE_INT.
1745         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1746         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1747         _AC_COMPUTE_INT.
1748         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1749
1750 2006-11-28  Jim Meyering  <jim@meyering.net>
1751
1752         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
1753         warning from "gcc -Wshadow" about shadowing the builtin.
1754
1755 2006-11-27  Bruno Haible  <bruno@clisp.org>
1756
1757         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
1758         _AC_COMPUTE_INT.
1759         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1760
1761 2006-11-27  Bruno Haible  <bruno@clisp.org>
1762             Paul Eggert  <eggert@cs.ucla.edu>
1763
1764         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
1765
1766 2006-11-26  Bruno Haible  <bruno@clisp.org>
1767
1768         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1769         noinst_LTLIBRARIES.
1770
1771 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
1772             Bruno Haible  <bruno@clisp.org>
1773
1774         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
1775         if compiling with "gcc -ansi".
1776
1777 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1778
1779         Fix some incompatibilities with gcc -ansi -pedantic.
1780         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
1781         if compiling pedantically with GCC, unless it's C99 or later.
1782         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
1783         it mishandles gcc -ansi -pedantic as well.
1784         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
1785         if gcc -pedantic.
1786         * lib/regexec.c (check_node_accept_bytes): Don't use auto
1787         initializers for struct if -pedantic, unless it's C99 or later.
1788
1789 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
1790
1791         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
1792         Don't close an fd more than once. Identical atimes indicate
1793         success, not failure.
1794
1795 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
1796
1797         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
1798
1799 2006-11-23  Jim Meyering  <jim@meyering.net>
1800
1801         * build-aux/announce-gen: New file.  From coreutils.
1802
1803 2006-11-22  Jim Meyering  <jim@meyering.net>
1804
1805         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
1806         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
1807         (fts_read): Use a temporary to narrow the overused st_size member
1808         before using it in a switch statement.  Reported by Matthew Woehlke.
1809
1810         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
1811         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
1812
1813 2006-11-20  Bruno Haible  <bruno@clisp.org>
1814
1815         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
1816         changequote instead of pairs of brackets.
1817         Reported by Andreas Schwab <schwab@suse.de>.
1818
1819 2006-11-21  Jim Meyering  <jim@meyering.net>
1820
1821         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
1822         so as to remain compatible with older compilers.
1823         Patch from Michael Deutschmann.
1824
1825 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1826
1827         * MODULES.html.sh (File system functions): Add openat.
1828
1829         * lib/openat.h (rpl_fstatat): New macro, if
1830         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
1831         (fstatat): Define to rpl_fstatat under the same conditions,
1832         unless COMPILING_FSTATAT.
1833         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
1834         seems to have the bug.
1835         * lib/fstatat.c: New file.
1836         * modules/openat (Files): Add it.
1837
1838 2006-11-20  Bruno Haible  <bruno@clisp.org>
1839
1840         * Makefile: New file.
1841
1842 2006-11-20  Jim Meyering  <jim@meyering.net>
1843
1844         The beginnings of syntax-related checks for gnulib.
1845         * lib/Makefile: New file.
1846         * lib/t-idcache: New script.  Ensure that the two halves of
1847         idcache.c stay in sync.
1848
1849         * lib/idcache.c: Adjust comments in user- and group- portions to
1850         be more accurate, and to be consistent with one another.
1851
1852 2006-11-20  Jim Meyering  <jim@meyering.net>
1853
1854         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
1855         continue using the flexible array member (thus, this module performs
1856         half as many malloc calls), with the addition that...
1857         (getgroup, getuser): Consistently record a non-match via an empty
1858         "name" string, and map an empty string match to a NULL return value.
1859         * modules/idcache (Depends-on): Re-add flexmember.
1860
1861         * lib/idcache.c (getuser): Remove all uses of the register keyword.
1862         (getuidbyname, getgroup, getgidbyname): Likewise.
1863
1864         Use cleaner syntax: NULL rather than 0.
1865         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
1866
1867 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1868
1869         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
1870         It mishandled the case where the group was missing.
1871         Problem reported by Greg Schafer.
1872         * modules/idcache: Likewise.
1873
1874 2006-11-18  Jim Meyering  <jim@meyering.net>
1875
1876         * check-module (%exempt_header): Add exception for some
1877         conditionally-included headers.
1878
1879         * modules/i-ring (Depends-on): Add verify.
1880         (License): Change to LGPL.
1881
1882 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1883
1884         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
1885         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
1886         and inttostr.h.  Use snprintf rather than uinttostr, so that
1887         LGPLed code doesn't depend on GPLed.
1888
1889 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
1890
1891         * modules/inline (License): Change from GPL to LGPL.
1892
1893 2006-11-17  Jim Meyering  <jim@meyering.net>
1894
1895         * modules/d-type (License): Switch to LGPL.
1896
1897 2006-11-15  Bruno Haible  <bruno@clisp.org>
1898
1899         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
1900
1901 2006-11-15  Eric Blake  <ebb9@byu.net>
1902
1903         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
1904         the module dependency.
1905
1906 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1907             Bruno Haible  <bruno@clisp.org>
1908
1909         * gnulib-tool (func_create_testdir): Add license consistency check.
1910
1911 2006-11-15  Eric Blake  <ebb9@byu.net>
1912
1913         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
1914         random "(cached)" in configure output.
1915
1916 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1917
1918         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
1919         test for conforming inttypes.h is both announced and cached.
1920
1921         * MODULES.html.sh (seen_modules, seen_files): New variables.
1922         (func_module): Rewrite to use a few less gnulib-tool and sed
1923         invocations.  Avoid a couple of quadratic algorithms for ...
1924         (missed_modules, missed_files): ... these, with ...
1925         (func_append, func_tmpdir): ... these new functions, from
1926         gnulib-tool.  Analogously, install traps for cleanup.
1927
1928         * tests/test-gc.c (main): Remove unused variables.
1929         * tests/test-read-file.c: Include stdlib.h, for 'free'.
1930
1931 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
1932
1933         * modules/inttostr (License): Change to LGPL.
1934
1935 2006-11-14  Eric Blake  <ebb9@byu.net>
1936
1937         * modules/tempname (License): Change to LGPL.
1938
1939 2006-11-14  Eric Blake  <ebb9@byu.net>
1940
1941         * doc/functions.texi (Function Portability): *printf functions on
1942         Cygwin now understand all POSIX size specifiers.
1943
1944 2006-11-14  Bruno Haible  <bruno@clisp.org>
1945
1946         * modules/c-ctype (License): Change to LGPL.
1947
1948 2006-11-12  Bruno Haible  <bruno@clisp.org>
1949
1950         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
1951         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
1952         for GNOME libraries, for which the include files are installed in
1953         subdirectories of $prefix/include.
1954
1955 2006-11-12  Bruno Haible  <bruno@clisp.org>
1956
1957         * m4/lib-link.m4: Require at least autoconf-2.54.
1958         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
1959         name to underscores for the --with option.
1960
1961 2006-11-13  Bruno Haible  <bruno@clisp.org>
1962
1963         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
1964         the tests directory.
1965         Reported by Ralf Wildenhues.
1966
1967 2006-11-13  Bruno Haible  <bruno@clisp.org>
1968
1969         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
1970         (func_emit_initmacro_end): Undo the override here.
1971         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
1972         Works around the famous automake error in coreutils.
1973
1974 2006-11-13  Eric Blake  <ebb9@byu.net>
1975
1976         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
1977         element, not its node.
1978
1979 2006-11-12  Bruno Haible  <bruno@clisp.org>
1980
1981         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
1982         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
1983
1984 2006-11-12  Bruno Haible  <bruno@clisp.org>
1985
1986         * gnulib-tool: New option --local-symlink.
1987         (func_usage): Document it.
1988         (lsymbolic): New variable.
1989         (func_import, func_create_testdir): If --symlink was not specified,
1990         test whether --local-symlink was specified and the file comes from
1991         the local_gnulib_dir.
1992
1993 2006-11-12  Bruno Haible  <bruno@clisp.org>
1994
1995         * gnulib-tool (func_ln): New function.
1996         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
1997
1998 2006-11-12  Bruno Haible  <bruno@clisp.org>
1999
2000         Finish support for source files in subdirectories.
2001         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2002         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2003         AUTOMAKE_OPTIONS.
2004         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2005
2006 2006-11-12  Bruno Haible  <bruno@clisp.org>
2007
2008         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2009         EXTRA_lib_SOURCES augmentation.
2010         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2011
2012 2006-11-12  Jim Meyering  <jim@meyering.net>
2013
2014         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2015         file descriptors.  This also averts a failure on systems with
2016         native openat support when a traversed directory lacks "x" access.
2017         * lib/fts_.h: Include "i-ring.h"
2018         (struct FTS) [fts_fd_ring]: New member.
2019         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2020         (FCHDIR): Add parentheses.
2021         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2022         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2023         When descending, rather than simply closing the previous
2024         fts_cwd_fd value, push that file descriptor onto the ring.
2025         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2026         (fts_open): Initialize the new fd_ring member.
2027         (fts_close): Clear the ring.
2028         (fts_safe_changedir): When possible, use our new fd_ring to skip
2029         the diropen and fstat and dev/ino comparison that would normally
2030         accompany a virtual `chdir ("..")'.
2031
2032         * modules/fts (Depends-on): Add i-ring.
2033         * modules/i-ring: New module.
2034         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2035         * m4/i-ring.m4: New file.
2036
2037 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2038
2039         * gnulib-tool (func_create_testdir): Fix replacement of
2040         `build-aux' in configure.ac.  Run autotools in gltests
2041         subdirectory.
2042         (func_create_testdir, func_create_megatestdir, test): There is
2043         no need for '--force' in most autotool invocations in a new
2044         tree.  Actually fail the whole test if any of the tools, or the
2045         configure or make stages fail.
2046
2047         Sync from Automake.
2048         * build-aux/gnupload: Revert last change.  Add pointer to upload
2049         instructions of the GNU Maintenance Instructions.
2050         Suggestion by Karl Berry.
2051
2052 2006-11-10  Jim Meyering  <jim@meyering.net>
2053
2054         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
2055
2056 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2057
2058         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
2059         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
2060         (bind_textdomain_codeset) [! ENABLE_NLS]:
2061         Evaluate all the arguments.  That way, callers get compatible behavior
2062         if the arguments have side effects.  Also, it avoids some GCC
2063         diagnostics in some cases; Joel E. Denny reported problems when Bison
2064         was configured with --enable-gcc-warnigs.
2065
2066 2006-11-10  Jim Meyering  <jim@meyering.net>
2067
2068         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
2069         relevant options in CFLAGS (like -O, -fno-inline) are taken into
2070         account.
2071
2072 2006-11-10  Jim Meyering  <jim@meyering.net>
2073
2074         * modules/inline: New file/module.
2075         * modules/xalloc (Files): Remove m4/inline.m4.
2076         (Depends-on): Add inline, instead.
2077         * modules/oset: Likewise.
2078         * modules/list: Likewise.
2079
2080 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2081
2082         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
2083         Problem reported by Matthew Woehlke.
2084
2085 2006-11-09  Bruno Haible  <bruno@clisp.org>
2086
2087         * lib/tempname.c (gen_tempname): Remove variant that invokes
2088         __gen_tempname.
2089         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
2090         __gen_tempname.
2091
2092 2006-11-08  Bruno Haible  <bruno@clisp.org>
2093
2094         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
2095         to 'yes' instead of 'cross-compiling'.
2096
2097 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
2098
2099         * lib/quotearg.h (quotearg_free): New decl.
2100         * lib/quotearg.c (quotearg_free): New function.
2101         (slot0, nslots, slotvec0, slotvec):
2102         Now file-scope so that quotearg_free can get at them.
2103
2104 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2105
2106         Sync from Automake.
2107         * build-aux/gnupload: Add missing 'gnu' to example URL.
2108         Report by Karl Berry.
2109
2110 2006-11-08  Bruno Haible  <bruno@clisp.org>
2111
2112         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
2113         Suggested by Paul Eggert.
2114
2115 2006-11-08  Jim Meyering  <jim@meyering.net>
2116
2117         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
2118         It's already included if !_LIBC.
2119         (fts_safe_changedir): Add a comment.
2120
2121 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2122
2123         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
2124         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
2125         Matthew Woehlke.
2126
2127         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
2128         definitions up, to avoid colliding with change below.
2129         (static_inline) [HAVE_INLINE]: New macro.
2130         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
2131         Provide extern decls when !HAVE_INLINE.  Do not define unless
2132         static_inline is defined, either by us or by xmalloc.c.  Use
2133         static_inline rather than static inline.
2134         (XCALLOC): Optimize sizeof(T) = 1 case.
2135         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2136
2137 2006-11-07  Bruno Haible  <bruno@clisp.org>
2138
2139         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
2140         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
2141         AC_C_INLINE.
2142         * modules/xalloc (Files): Add m4/inline.m4.
2143
2144 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2145
2146         * README: Fix typo.
2147         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
2148         (Miscellanous Notes): ...from this.
2149
2150 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2151
2152         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
2153         Mention that offsetof should be used instead of sizeof.
2154         From Bruno Haible.
2155
2156 2006-11-07  Bruno Haible  <bruno@clisp.org>
2157
2158         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
2159
2160 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2161
2162         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2163         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
2164         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2165         (gl_tree_add_before, gl_tree_add_after):
2166         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
2167         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
2168         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2169         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
2170         (gl_linked_add_after, gl_linked_add_at): Likewise.
2171         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
2172         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2173         (gl_tree_add_before, gl_tree_add_after): Likewise.
2174         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
2175         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
2176         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
2177
2178 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2179
2180         * lib/gl_oset.h: Use C comment style, not C++ comment style.
2181
2182 2006-11-06  Bruno Haible  <bruno@clisp.org>
2183
2184         * m4/inline.m4: New file.
2185         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
2186         * modules/list (Files): Add m4/inline.m4.
2187         * modules/oset (Files): Likewise.
2188
2189 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2190
2191         * lib/idcache.c: Include <stddef.h>, for offsetof.
2192         (struct userid.name): Change from char * to a flexible array member.
2193         All uses changed.
2194         * modules/idcache (Depends-on): Add flexmember.
2195
2196         * MODULES.html.sh (Core language properties): New module flexmember.
2197         * modules/flexmember, m4/flexmember.m4: New files.
2198
2199         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
2200         inline functions that are identical with the old xnmalloc_inline,
2201         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
2202         that we can avoid some unnecessary integer multiplications and
2203         divisions in the common case where the element size is known at
2204         compile time.
2205         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
2206         needed.
2207         (xnboundedmalloc): Remove.
2208         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
2209         arguments, for consistency with rest of this header.
2210         (xcharalloc): Rewrite using XNMALLOC.
2211         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
2212         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
2213         versions have been moved to lib/xalloc.h and renamed to be the
2214         non-*_inline versions.
2215         (xmalloc, xrealloc): Implement without reference to the xnmalloc
2216         and xnrealloc functions, since those functions are now inline and
2217         now call us.
2218         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
2219         renaming described above.
2220         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
2221         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
2222         captures the dependency in AC_C_INLINE.
2223
2224         New module canonicalize-lgpl, proposed by Charles Wilson in
2225         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
2226         with a few small changes afterwards.
2227         * MODULES.html.sh (File system functions): New module
2228         canonicalize-lgpl.
2229         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
2230         and canonicalize_file_name.
2231         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
2232         * modules/canonicalize-lgpl: New files.
2233
2234 2006-11-05  Bruno Haible  <bruno@clisp.org>
2235
2236         * gnulib-tool (func_import, func_create_testdir): Create directories
2237         also for files in subdirectories of lib/.
2238
2239 2006-11-05  Bruno Haible  <bruno@clisp.org>
2240
2241         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
2242         ANSI C compliant.
2243
2244 2006-11-03  Bruno Haible  <bruno@clisp.org>
2245
2246         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2247         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
2248         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
2249         (xnboundedmalloc): New inline function.
2250         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
2251         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
2252         xmalloc.
2253         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
2254         xmalloc.
2255         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
2256         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
2257         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
2258         xmalloc.
2259         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2260         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
2261         xmalloc.
2262         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
2263         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2264         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
2265         xmalloc.
2266         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2267         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
2268         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2269         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
2270         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
2271         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
2272         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
2273
2274 2006-11-03  Bruno Haible  <bruno@clisp.org>
2275
2276         * lib/c-ctype.h [C++]: Define functions without name mangling.
2277         * lib/fwriteerror.h [C++]: Likewise.
2278         * lib/gcd.h [C++]: Likewise.
2279         * lib/linebreak.h [C++]: Likewise.
2280
2281 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2282
2283         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2284         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2285         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2286         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2287         Check for functions and headers just once.
2288         Check for declaration of canonicalize_file_name.
2289         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2290
2291 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2292
2293         * gnulib-tool (func_import): Fix typo in actioncmd.
2294
2295 2006-11-02  Bruno Haible  <bruno@clisp.org>
2296
2297         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2298         newline sequence in the Makefile.am snippet as a space, like "make"
2299         does.
2300         Reported by Roger Persson <perrog@gmail.com>.
2301
2302 2006-11-01  Bruno Haible  <bruno@clisp.org>
2303
2304         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2305         already declared in <string.h>.
2306         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2307
2308 2006-11-01  Bruno Haible  <bruno@clisp.org>
2309
2310         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2311         * lib/strcase.h: Include <string.h>.
2312         (strcasecmp): Define to rpl_strcasecmp here.
2313
2314 2006-11-01  Bruno Haible  <bruno@clisp.org>
2315
2316         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2317
2318 2006-11-01  Eric Blake  <ebb9@byu.net>
2319
2320         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2321
2322         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2323
2324 2006-10-29  Bruno Haible  <bruno@clisp.org>
2325
2326         Make it compile in C++ mode.
2327         * lib/full-write.c (full_rw): Add a cast.
2328
2329 2006-11-01  Bruno Haible  <bruno@clisp.org>
2330
2331         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2332         be POSIX compliant.
2333         Reported by Roger Persson <perrog@gmail.com>.
2334
2335 2006-11-01  Eric Blake  <ebb9@byu.net>
2336
2337         * lib/getopt_.h: Fix comments.
2338
2339 2006-10-31  Eric Blake  <ebb9@byu.net>
2340
2341         * modules/tmpdir (Depends-on): Add sys_stat.
2342         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2343         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2344         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2345         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2346         tempname.
2347
2348 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2349
2350         Avoid some C++ diagnostics reported by Bruno Haible.
2351         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2352         xmalloc.
2353         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2354         (struct slotvec): Move to top level.
2355         (quotearg_n_options): Rewrite to avoid xmalloc.
2356         * lib/xalloc.h (xcharalloc): New function.
2357         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2358         [defined __cplusplus]: Add function template that provides result
2359         type propagation.  This part of the change is from Bruno Haible.
2360
2361 2006-10-29  Bruno Haible  <bruno@clisp.org>
2362
2363         Make it compile in C++ mode.
2364         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2365         * lib/strnlen1.c (strnlen1): Cast memchr result.
2366         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2367         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2368         (create_temp_dir): Rename local variable 'template'.
2369         (compile_csharp_using_sscli): Add cast.
2370         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2371         * lib/findprog.c (find_in_path): Likewise.
2372         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2373         * lib/wait-process.c (register_slave_subprocess): Likewise.
2374
2375 2006-10-22  Bruno Haible  <bruno@clisp.org>
2376
2377         * modules/tsearch: New file.
2378         * lib/tsearch.h: New file.
2379         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2380         * m4/tsearch.m4: New file.
2381         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2382
2383 2006-10-29  Eric Blake  <ebb9@byu.net>
2384
2385         * lib/arcfour.c: Assume config.h.
2386         * lib/arctwo.c: Likewise.
2387         * lib/base64.c: Likewise.
2388         * lib/check-version.c: Likewise.
2389         * lib/crc.c: Likewise.
2390         * lib/des.c: Likewise.
2391         * lib/gc-gnulib.c: Likewise.
2392         * lib/gc-libgcrypt.c: Likewise.
2393         * lib/gc-pbkdf2-sha1.c: Likewise.
2394         * lib/getaddrinfo.c: Likewise.
2395         * lib/getdelim.c: Likewise.
2396         * lib/getline.c: Likewise.
2397         * lib/hmac-md5.c: Likewise.
2398         * lib/hmac-sha1.c: Likewise.
2399         * lib/iconvme.c: Likewise.
2400         * lib/md2.c: Likewise.
2401         * lib/md4.c: Likewise.
2402         * lib/memxor.c: Likewise.
2403         * lib/read-file.c: Likewise.
2404         * lib/readline.c: Likewise.
2405         * lib/rijndael-alg-fst.c: Likewise.
2406         * lib/rijndael-api-fst.c: Likewise.
2407         * lib/xgetdomainname.c: Likewise.
2408
2409 2006-10-28  Eric Blake  <ebb9@byu.net>
2410
2411         * lib/xstrndup.c: Assume config.h.
2412
2413 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
2414
2415         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
2416         stat-macros.h is now for our own macros, whereas stat_h is for
2417         macros in the <sys/stat.h> name space.
2418         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
2419         (STAT_MACROS_H): Remove.
2420         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2421         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2422         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2423         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2424         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2425         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2426         Move these macros to ...
2427         * lib/stat_.h: here.  Don't include stat-macros.h.
2428         * lib/canonicalize.c: Don't include stat-macros.h.
2429         * lib/chown.c: Likewise.
2430         * lib/euidaccess.c: Likewise.
2431         * lib/file-type.c: Likewise.
2432         * lib/filemode.c: Likewise.
2433         * lib/glob.c: Likewise.
2434         * lib/isapipe.c: Likewise.
2435         * lib/lchown.c: Likewise.
2436         * lib/lstat.c: Likewise.
2437         * lib/mkdir-p.c: Likewise.
2438         * lib/rmdir.c: Likewise.
2439         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
2440         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
2441         unless mkdir isn't declared, to speed up 'configure'.
2442         Always create sys/stat.h, since it's unlikely any real sys/stat.h
2443         would define all the S_* symbols.
2444         * modules/canonicalize (Depends-on):
2445         Depend on sys_stat, not stat-macros.
2446         * modules/chown: Likewise.
2447         * modules/euidaccess: Likewise.
2448         * modules/filemode: Likewise.
2449         * modules/file-type: Likewise.
2450         * modules/glob: Likewise.
2451         * modules/isapipe: Likewise.
2452         * modules/lchown: Likewise.
2453         * modules/lstat: Likewise.
2454         * modules/mkancesdirs: Likewise.
2455         * modules/rmdir: Likewise.
2456         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
2457         * modules/modechange: Likewise.
2458         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
2459         (configure.ac): Remove gl_STAT_MACROS.
2460         * modules/sys_stat (Depends-on): Remove stat-macros.
2461
2462 2006-10-27  Bruno Haible  <bruno@clisp.org>
2463
2464         * m4/signed.m4: Remove file.
2465         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
2466         invocation.
2467         * modules/vasnprintf (Files): Remove m4/signed.m4.
2468
2469 2006-10-27  Bruno Haible  <bruno@clisp.org>
2470
2471         Update to GNU gettext 0.16.
2472         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
2473         m4/inttypes-h.m4, m4/signed.m4.
2474         * m4/gettext.m4: Update to GNU gettext 0.16.
2475         * m4/intl.m4: New file, from GNU gettext.
2476         * m4/intldir.m4: New file, from GNU gettext.
2477         * config/srclist.txt: Update
2478
2479 2006-10-27  Eric Blake  <ebb9@byu.net>
2480
2481         * MODULES.html.sh: Document tempname.
2482         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
2483         dependencies.
2484         (Files): Move lib/tempname.c...
2485         * modules/tempname: ...to this new module.
2486         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2487         (gl_PREREQ_TEMPNAME): Move...
2488         * m4/tempname.m4: ...to this new file.
2489         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2490         * modules/sys_stat (Depends-on): Add stat-macros.
2491         * lib/stat_.h (includes): Pick up stat macros.
2492         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2493         if stat macros are broken.
2494         * lib/tempname.c (includes): No need to include "stat-macros.h".
2495         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2496         (direxists, __path_search) [!_LIBC]: Don't compile these in
2497         gnulib; the tmpdir module covers that.
2498         * lib/tempname.h: New file.
2499
2500 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2501
2502         * COPYING: Explain how gnulib-tool converts licence headers.
2503         Almost all wording by Eric Blake.
2504
2505 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2506
2507         * lib/mbchar.h (is_basic_table): Make read-only.
2508         * lib/mbchar.c (is_basic_table): Likewise.
2509         Reported by John Darrington.
2510
2511 2006-10-25  Bruno Haible  <bruno@clisp.org>
2512
2513         * lib/progname.h (set_program_name): Undefine before defining.
2514
2515 2006-10-25  Bruno Haible  <bruno@clisp.org>
2516
2517         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2518         false for non-gcc C++ compilers.
2519         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2520
2521 2006-10-24  Bruno Haible  <bruno@clisp.org>
2522
2523         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2524         iconv implementations like Irix iconv.
2525
2526 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2527
2528         * modules/vararrays: New file.
2529         * m4/vararrays.m4: New file, taken from diffutils.
2530         * MODULES.html.sh: New module vararrays.
2531
2532 2006-10-24  Karl Berry  <karl@gnu.org>
2533
2534         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2535         Don't call GNU Unix.
2536
2537 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2538
2539         * users.txt: Add Libtool.
2540
2541         Sync from Libtool:
2542
2543         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2544
2545         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2546         to gnulib's policy of including config.h unconditionally.
2547
2548 2006-10-24  Bruno Haible  <bruno@clisp.org>
2549
2550         * modules/wcwidth (Files): Add m4/wint_t.m4.
2551         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2552         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2553
2554 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2555
2556         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2557         to pacify GCC with some -W flags enabled.  Problem reported by
2558         Bruno Haible.
2559
2560 2006-10-24  Jim Meyering  <jim@meyering.net>
2561
2562         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2563         Reported by Karl Berry.
2564
2565 2006-10-23  Bruno Haible  <bruno@clisp.org>
2566
2567         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2568
2569 2006-10-24  Bruno Haible  <bruno@clisp.org>
2570
2571         * lib/gl_list.h: Use C comment style, not C++ comment style.
2572
2573 2006-10-23  Eric Blake  <ebb9@byu.net>
2574
2575         * lib/getaddrinfo.c (includes): Add missing include.
2576
2577 2006-10-23  Bruno Haible  <bruno@clisp.org>
2578             Paul Eggert  <eggert@cs.ucla.edu>
2579
2580         Ability to rename obstack_free.
2581         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2582         obstack_free.
2583         (obstack_free): Invoke the __obstack_free macro.
2584         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2585
2586 2006-10-23  Bruno Haible  <bruno@clisp.org>
2587             Paul Eggert  <eggert@cs.ucla.edu>
2588
2589         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2590         __argc, __argv from the declaration. (They are defined as macros on
2591         mingw.)
2592
2593 2006-10-22  Bruno Haible  <bruno@clisp.org>
2594
2595         * doc/gnulib-intro.texi: New file.
2596         * doc/gnulib.texi: Include it.
2597
2598 2006-10-21  Bruno Haible  <bruno@clisp.org>
2599
2600         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2601         "Introduction", "Miscellanous Notes", "Particular Modules".
2602
2603 2006-10-21  Bruno Haible  <bruno@clisp.org>
2604
2605         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2606         Change mostlyclean-local rule to avoid sh syntax error from bash
2607         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2608
2609 2006-10-23  Jim Meyering  <jim@meyering.net>
2610
2611         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2612         in place of snprintf.
2613
2614         * modules/inttostr (Files): Add lib/uinttostr.c.
2615         * lib/uinttostr.c (inttostr): New file/function.
2616         * lib/inttostr.h (uinttostr): Declare.
2617         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2618         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2619         Add uinttostr.
2620         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2621
2622 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2623
2624         * lib/canonicalize.c (ELOOP): Define if not already defined.
2625         Problem reported by Bruno Haible in
2626         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2627
2628 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2629
2630         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2631         Problem reported by Perry Smith and Ville Laurikari.
2632
2633         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2634         uses.
2635
2636 2006-10-19  Bruno Haible  <bruno@clisp.org>
2637
2638         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2639         for mingw.
2640
2641 2006-10-19  Bruno Haible  <bruno@clisp.org>
2642
2643         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2644         Needed for mingw.
2645
2646 2006-10-19  Bruno Haible  <bruno@clisp.org>
2647
2648         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2649
2650 2006-10-19  Bruno Haible  <bruno@clisp.org>
2651
2652         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2653         it.
2654
2655 2006-10-19  Bruno Haible  <bruno@clisp.org>
2656
2657         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2658         invocation.
2659
2660 2006-10-19  Bruno Haible  <bruno@clisp.org>
2661
2662         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2663         mountlist by default.
2664
2665 2006-10-16  Bruno Haible  <bruno@clisp.org>
2666
2667         * lib/c-strstr.c: Include c-strstr.h.
2668
2669 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2670
2671         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2672         in a slash.
2673
2674 2006-10-18  Bruno Haible  <bruno@clisp.org>
2675
2676         * lib/lock.h [C++]: Wrap definitions in extern "C".
2677
2678 2006-10-18  Bruno Haible  <bruno@clisp.org>
2679
2680         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2681         gl_LIBOBJS list.
2682
2683 2006-10-18  Bruno Haible  <bruno@clisp.org>
2684
2685         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2686
2687 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2688
2689         * lib/xstrtol.h: Include gettext.h.
2690         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2691         Problem reported by Eric Blake.
2692         * modules/xstrtol (Depends-on): Add gettext-h.
2693
2694 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2695
2696         * lib/strftime.c (advance): New macro.
2697         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2698         incomplete type, so you can't add 0 to it.  Problem and patch
2699         reported by Eelco Dolstra for dietlibc.
2700
2701 2006-10-18  Jim Meyering  <jim@meyering.net>
2702
2703         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2704         type for a local, and rename it: s/up/user_proc/.
2705
2706 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2707
2708         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2709         READ_UTMP_USER_PROCESS.
2710         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2711
2712 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2713
2714         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2715         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2716
2717 2006-10-17  Eric Blake  <ebb9@byu.net>
2718
2719         * lib/sigprocmask.c (sigprocmask): Fix typo.
2720
2721         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2722
2723         * modules/clean-temp (Makefile.am): Don't add to make output...
2724         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2725         config.h.
2726
2727 2006-10-17  Bruno Haible  <bruno@clisp.org>
2728
2729         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2730         differently if DEFAULT_TEXT_DOMAIN is set.
2731
2732 2006-10-16  Bruno Haible  <bruno@clisp.org>
2733
2734         * lib/clean-temp.c: Include fwriteerror.h.
2735
2736 2006-10-16  Bruno Haible  <bruno@clisp.org>
2737
2738         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2739
2740 2006-10-16  Bruno Haible  <bruno@clisp.org>
2741
2742         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2743         * lib/sigprocmask.h: Include <sys/types.h>.
2744         (sigset_t): Use the system's definition if present.
2745
2746 2006-10-17  Eric Blake  <ebb9@byu.net>
2747
2748         * lib/xvasprintf.c (includes): Assume config.h.
2749         * lib/xasprintf.c (includes): Likewise.
2750
2751 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2752
2753         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
2754         at least as wide as intmax_t.
2755
2756 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
2757
2758         (Imported from Automake.)
2759         * build-aux/gnupload: Update to version 1.1 of directive file.
2760
2761 2006-10-16  Eric Blake  <ebb9@byu.net>
2762
2763         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
2764         match Automake 1.10a.
2765
2766 2006-10-14  Bruno Haible  <bruno@clisp.org>
2767
2768         * modules/sigprocmask: New file.
2769         * lib/sigprocmask.h: New file.
2770         * lib/sigprocmask.c: New file.
2771         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
2772         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
2773         request sigprocmask.o.
2774         (gl_PREREQ_SIGPROCMASK): New macro.
2775         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
2776         (Depends-on): Add sigprocmask.
2777         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
2778         gt_SIGNALBLOCKING. Test for 'raise' only once.
2779         * lib/fatal-signal.c: Include sigprocmask.h.
2780         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
2781         unblock_fatal_signals): Define always.
2782         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2783         sigprocmask.
2784
2785 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
2786
2787         Sync from Automake.
2788         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
2789         which incorrectly sets the mode of an existing destination
2790         directory.  In some cases the unpatched install-sh could do the
2791         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
2792         system.  We hope this is rare in practice, but it's clearly worth
2793         fixing.  Problem reported by Alex Unleashed in
2794         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
2795         Also, don't bother to check for -m bugs unless we're using -m;
2796         suggested by Stepan Kasal.
2797
2798 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2799
2800         Sync from Automake.
2801         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
2802         `-c' flag, so they appear at the same position as in %FASTDEP%
2803         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
2804         which ignores unknown options only after the first non-option.
2805         Bug report against M4 by Nelson H. F. Beebe.
2806
2807 2006-10-13  Jim Meyering  <jim@meyering.net>
2808
2809         Fix a bug in yesterday's change.
2810         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
2811         p->fts_statp->st_dev would be used uninitialized.
2812         Ensures that we always call fts_stat on the very first entry.
2813         Miklos Szeredi reported that find -xdev stopped working.
2814
2815 2006-10-12  Bruno Haible  <bruno@clisp.org>
2816
2817         * gnulib-tool (func_get_automake_snippet): Append an automatically
2818         computed EXTRA_DIST augmentation.
2819         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
2820         * modules/alloca-opt (Makefile.am): Likewise.
2821         * modules/allocsa (Makefile.am): Likewise.
2822         * modules/arcfour (Makefile.am): Likewise.
2823         * modules/arctwo (Makefile.am): Likewise.
2824         * modules/argmatch (Makefile.am): Likewise.
2825         * modules/argz (Makefile.am): Likewise.
2826         * modules/atexit (Makefile.am): Likewise.
2827         * modules/backupfile (Makefile.am): Likewise.
2828         * modules/byteswap (Makefile.am): Likewise.
2829         * modules/c-strtod (Makefile.am): Likewise.
2830         * modules/c-strtold (Makefile.am): Likewise.
2831         * modules/calloc (Makefile.am): Likewise.
2832         * modules/canon-host (Makefile.am): Likewise.
2833         * modules/canonicalize (Makefile.am): Likewise.
2834         * modules/chdir-long (Makefile.am): Likewise.
2835         * modules/chdir-safer (Makefile.am): Likewise.
2836         * modules/check-version (Makefile.am): Likewise.
2837         * modules/chown (Makefile.am): Likewise.
2838         * modules/cloexec (Makefile.am): Likewise.
2839         * modules/close-stream (Makefile.am): Likewise.
2840         * modules/closeout (Makefile.am): Likewise.
2841         * modules/crc (Makefile.am): Likewise.
2842         * modules/csharpexec (Makefile.am): Likewise.
2843         * modules/cycle-check (Makefile.am): Likewise.
2844         * modules/des (Makefile.am): Likewise.
2845         * modules/dev-ino (Makefile.am): Likewise.
2846         * modules/dirfd (Makefile.am): Likewise.
2847         * modules/dirname (Makefile.am): Likewise.
2848         * modules/dup2 (Makefile.am): Likewise.
2849         * modules/eealloc (Makefile.am): Likewise.
2850         * modules/error (Makefile.am): Likewise.
2851         * modules/euidaccess (Makefile.am): Likewise.
2852         * modules/exclude (Makefile.am): Likewise.
2853         * modules/exitfail (Makefile.am): Likewise.
2854         * modules/fcntl-safer (Makefile.am): Likewise.
2855         * modules/fcntl (Makefile.am): Likewise.
2856         * modules/file-type (Makefile.am): Likewise.
2857         * modules/fileblocks (Makefile.am): Likewise.
2858         * modules/filemode (Makefile.am): Likewise.
2859         * modules/filenamecat (Makefile.am): Likewise.
2860         * modules/fnmatch (Makefile.am): Likewise.
2861         * modules/fopen-safer (Makefile.am): Likewise.
2862         * modules/fpending (Makefile.am): Likewise.
2863         * modules/fprintftime (Makefile.am): Likewise.
2864         * modules/free (Makefile.am): Likewise.
2865         * modules/fsusage (Makefile.am): Likewise.
2866         * modules/ftruncate (Makefile.am): Likewise.
2867         * modules/fts (Makefile.am): Likewise.
2868         * modules/gc-arcfour (Makefile.am): Likewise.
2869         * modules/gc-des (Makefile.am): Likewise.
2870         * modules/gc-hmac-md5 (Makefile.am): Likewise.
2871         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
2872         * modules/gc-md4 (Makefile.am): Likewise.
2873         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2874         * modules/gc-sha1 (Makefile.am): Likewise.
2875         * modules/gc (Makefile.am): Likewise.
2876         * modules/getaddrinfo (Makefile.am): Likewise.
2877         * modules/getcwd (Makefile.am): Likewise.
2878         * modules/getdelim (Makefile.am): Likewise.
2879         * modules/getdomainname (Makefile.am): Likewise.
2880         * modules/getgroups (Makefile.am): Likewise.
2881         * modules/gethostname (Makefile.am): Likewise.
2882         * modules/gethrxtime (Makefile.am): Likewise.
2883         * modules/getline (Makefile.am): Likewise.
2884         * modules/getloadavg (Makefile.am): Likewise.
2885         * modules/getlogin_r (Makefile.am): Likewise.
2886         * modules/getndelim2 (Makefile.am): Likewise.
2887         * modules/getopt (Makefile.am): Likewise.
2888         * modules/getpagesize (Makefile.am): Likewise.
2889         * modules/getpass-gnu (Makefile.am): Likewise.
2890         * modules/getpass (Makefile.am): Likewise.
2891         * modules/getsubopt (Makefile.am): Likewise.
2892         * modules/gettime (Makefile.am): Likewise.
2893         * modules/gettimeofday (Makefile.am): Likewise.
2894         * modules/getugroups (Makefile.am): Likewise.
2895         * modules/getusershell (Makefile.am): Likewise.
2896         * modules/glob (Makefile.am): Likewise.
2897         * modules/group-member (Makefile.am): Likewise.
2898         * modules/hard-locale (Makefile.am): Likewise.
2899         * modules/hash (Makefile.am): Likewise.
2900         * modules/hmac-md5 (Makefile.am): Likewise.
2901         * modules/hmac-sha1 (Makefile.am): Likewise.
2902         * modules/human (Makefile.am): Likewise.
2903         * modules/idcache (Makefile.am): Likewise.
2904         * modules/imaxabs (Makefile.am): Likewise.
2905         * modules/imaxdiv (Makefile.am): Likewise.
2906         * modules/inet_ntop (Makefile.am): Likewise.
2907         * modules/inet_pton (Makefile.am): Likewise.
2908         * modules/intprops (Makefile.am): Likewise.
2909         * modules/inttostr (Makefile.am): Likewise.
2910         * modules/inttypes (Makefile.am): Likewise.
2911         * modules/isapipe (Makefile.am): Likewise.
2912         * modules/javaversion (Makefile.am): Likewise.
2913         * modules/lchmod (Makefile.am): Likewise.
2914         * modules/lchown (Makefile.am): Likewise.
2915         * modules/localcharset (Makefile.am): Likewise.
2916         * modules/long-options (Makefile.am): Likewise.
2917         * modules/lstat (Makefile.am): Likewise.
2918         * modules/malloc (Makefile.am): Likewise.
2919         * modules/mathl (Makefile.am): Likewise.
2920         * modules/mbchar (Makefile.am): Likewise.
2921         * modules/md2 (Makefile.am): Likewise.
2922         * modules/md4 (Makefile.am): Likewise.
2923         * modules/md5 (Makefile.am): Likewise.
2924         * modules/memcasecmp (Makefile.am): Likewise.
2925         * modules/memchr (Makefile.am): Likewise.
2926         * modules/memcmp (Makefile.am): Likewise.
2927         * modules/memcoll (Makefile.am): Likewise.
2928         * modules/memcpy (Makefile.am): Likewise.
2929         * modules/memmem (Makefile.am): Likewise.
2930         * modules/memmove (Makefile.am): Likewise.
2931         * modules/mempcpy (Makefile.am): Likewise.
2932         * modules/memrchr (Makefile.am): Likewise.
2933         * modules/memset (Makefile.am): Likewise.
2934         * modules/memxor (Makefile.am): Likewise.
2935         * modules/mkancesdirs (Makefile.am): Likewise.
2936         * modules/mkdir-p (Makefile.am): Likewise.
2937         * modules/mkdir (Makefile.am): Likewise.
2938         * modules/mkdtemp (Makefile.am): Likewise.
2939         * modules/mkstemp (Makefile.am): Likewise.
2940         * modules/mktime (Makefile.am): Likewise.
2941         * modules/modechange (Makefile.am): Likewise.
2942         * modules/mountlist (Makefile.am): Likewise.
2943         * modules/nanosleep (Makefile.am): Likewise.
2944         * modules/obstack (Makefile.am): Likewise.
2945         * modules/openat (Makefile.am): Likewise.
2946         * modules/pagealign_alloc (Makefile.am): Likewise.
2947         * modules/pathmax (Makefile.am): Likewise.
2948         * modules/physmem (Makefile.am): Likewise.
2949         * modules/poll (Makefile.am): Likewise.
2950         * modules/posixtm (Makefile.am): Likewise.
2951         * modules/posixver (Makefile.am): Likewise.
2952         * modules/putenv (Makefile.am): Likewise.
2953         * modules/quote (Makefile.am): Likewise.
2954         * modules/quotearg (Makefile.am): Likewise.
2955         * modules/raise (Makefile.am): Likewise.
2956         * modules/read-file (Makefile.am): Likewise.
2957         * modules/readline (Makefile.am): Likewise.
2958         * modules/readlink (Makefile.am): Likewise.
2959         * modules/readtokens (Makefile.am): Likewise.
2960         * modules/readutmp (Makefile.am): Likewise.
2961         * modules/realloc (Makefile.am): Likewise.
2962         * modules/regex (Makefile.am): Likewise.
2963         * modules/rename-dest-slash (Makefile.am): Likewise.
2964         * modules/rename (Makefile.am): Likewise.
2965         * modules/rijndael (Makefile.am): Likewise.
2966         * modules/rmdir (Makefile.am): Likewise.
2967         * modules/rpmatch (Makefile.am): Likewise.
2968         * modules/safe-read (Makefile.am): Likewise.
2969         * modules/safe-write (Makefile.am): Likewise.
2970         * modules/same-inode (Makefile.am): Likewise.
2971         * modules/same (Makefile.am): Likewise.
2972         * modules/save-cwd (Makefile.am): Likewise.
2973         * modules/savedir (Makefile.am): Likewise.
2974         * modules/setenv (Makefile.am): Likewise.
2975         * modules/settime (Makefile.am): Likewise.
2976         * modules/sha1 (Makefile.am): Likewise.
2977         * modules/sig2str (Makefile.am): Likewise.
2978         * modules/snprintf (Makefile.am): Likewise.
2979         * modules/stat-macros (Makefile.am): Likewise.
2980         * modules/stat-time (Makefile.am): Likewise.
2981         * modules/stdbool (Makefile.am): Likewise.
2982         * modules/stdint (Makefile.am): Likewise.
2983         * modules/stdlib-safer (Makefile.am): Likewise.
2984         * modules/stpcpy (Makefile.am): Likewise.
2985         * modules/stpncpy (Makefile.am): Likewise.
2986         * modules/strcase (Makefile.am): Likewise.
2987         * modules/strcasestr (Makefile.am): Likewise.
2988         * modules/strchrnul (Makefile.am): Likewise.
2989         * modules/strcspn (Makefile.am): Likewise.
2990         * modules/strdup (Makefile.am): Likewise.
2991         * modules/strerror (Makefile.am): Likewise.
2992         * modules/strftime (Makefile.am): Likewise.
2993         * modules/strndup (Makefile.am): Likewise.
2994         * modules/strnlen (Makefile.am): Likewise.
2995         * modules/strpbrk (Makefile.am): Likewise.
2996         * modules/strsep (Makefile.am): Likewise.
2997         * modules/strstr (Makefile.am): Likewise.
2998         * modules/strtod (Makefile.am): Likewise.
2999         * modules/strtoimax (Makefile.am): Likewise.
3000         * modules/strtok_r (Makefile.am): Likewise.
3001         * modules/strtol (Makefile.am): Likewise.
3002         * modules/strtoll (Makefile.am): Likewise.
3003         * modules/strtoul (Makefile.am): Likewise.
3004         * modules/strtoull (Makefile.am): Likewise.
3005         * modules/strtoumax (Makefile.am): Likewise.
3006         * modules/strverscmp (Makefile.am): Likewise.
3007         * modules/sys_socket (Makefile.am): Likewise.
3008         * modules/sys_stat (Makefile.am): Likewise.
3009         * modules/sysexits (Makefile.am): Likewise.
3010         * modules/time_r (Makefile.am): Likewise.
3011         * modules/timegm (Makefile.am): Likewise.
3012         * modules/timespec (Makefile.am): Likewise.
3013         * modules/tmpfile-safer (Makefile.am): Likewise.
3014         * modules/trim (Makefile.am): Likewise.
3015         * modules/unistd-safer (Makefile.am): Likewise.
3016         * modules/unlinkdir (Makefile.am): Likewise.
3017         * modules/unlocked-io (Makefile.am): Likewise.
3018         * modules/userspec (Makefile.am): Likewise.
3019         * modules/utime (Makefile.am): Likewise.
3020         * modules/utimecmp (Makefile.am): Likewise.
3021         * modules/utimens (Makefile.am): Likewise.
3022         * modules/vasnprintf (Makefile.am): Likewise.
3023         * modules/vasprintf (Makefile.am): Likewise.
3024         * modules/vsnprintf (Makefile.am): Likewise.
3025         * modules/xalloc (Makefile.am): Likewise.
3026         * modules/xgetcwd (Makefile.am): Likewise.
3027         * modules/xnanosleep (Makefile.am): Likewise.
3028         * modules/xreadlink (Makefile.am): Likewise.
3029         * modules/xstrtod (Makefile.am): Likewise.
3030         * modules/xstrtol (Makefile.am): Likewise.
3031         * modules/xstrtold (Makefile.am): Likewise.
3032         * modules/yesno (Makefile.am): Likewise.
3033         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3034
3035 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3036
3037         * modules/error (Makefile.am): Distribute files through
3038         EXTRA_DIST, not lib_SOURCES.
3039
3040 2006-10-12  Eric Blake  <ebb9@byu.net>
3041
3042         * modules/error (Makefile.am): Distribute files in /lib.
3043         * modules/obstack (Makefile.am): Likewise.
3044
3045 2006-10-12  Bruno Haible  <bruno@clisp.org>
3046
3047         * modules/acl (Makefile.am): Distribute all files in lib/ through
3048         EXTRA_DIST.
3049         * modules/arcfour (Makefile.am): Likewise.
3050         * modules/arctwo (Makefile.am): Likewise.
3051         * modules/argmatch (Makefile.am): Likewise.
3052         * modules/argz (Makefile.am): Likewise.
3053         * modules/atexit (Makefile.am): Likewise.
3054         * modules/backupfile (Makefile.am): Likewise.
3055         * modules/c-strtod (Makefile.am): Likewise.
3056         * modules/c-strtold (Makefile.am): Likewise.
3057         * modules/calloc (Makefile.am): Likewise.
3058         * modules/canon-host (Makefile.am): Likewise.
3059         * modules/canonicalize (Makefile.am): Likewise.
3060         * modules/chdir-long (Makefile.am): Likewise.
3061         * modules/chdir-safer (Makefile.am): Likewise.
3062         * modules/check-version (Makefile.am): Likewise.
3063         * modules/chown (Makefile.am): Likewise.
3064         * modules/cloexec (Makefile.am): Likewise.
3065         * modules/close-stream (Makefile.am): Likewise.
3066         * modules/closeout (Makefile.am): Likewise.
3067         * modules/crc (Makefile.am): Likewise.
3068         * modules/cycle-check (Makefile.am): Likewise.
3069         * modules/des (Makefile.am): Likewise.
3070         * modules/dirfd (Makefile.am): Likewise.
3071         * modules/dirname (Makefile.am): Likewise.
3072         * modules/dup2 (Makefile.am): Likewise.
3073         * modules/euidaccess (Makefile.am): Likewise.
3074         * modules/exclude (Makefile.am): Likewise.
3075         * modules/exitfail (Makefile.am): Likewise.
3076         * modules/fcntl-safer (Makefile.am): Likewise.
3077         * modules/file-type (Makefile.am): Likewise.
3078         * modules/fileblocks (Makefile.am): Likewise.
3079         * modules/filemode (Makefile.am): Likewise.
3080         * modules/filenamecat (Makefile.am): Likewise.
3081         * modules/fnmatch (Makefile.am): Likewise.
3082         * modules/fopen-safer (Makefile.am): Likewise.
3083         * modules/fpending (Makefile.am): Likewise.
3084         * modules/fprintftime (Makefile.am): Likewise.
3085         * modules/free (Makefile.am): Likewise.
3086         * modules/fsusage (Makefile.am): Likewise.
3087         * modules/ftruncate (Makefile.am): Likewise.
3088         * modules/fts (Makefile.am): Likewise.
3089         * modules/gc (Makefile.am): Likewise.
3090         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3091         * modules/getaddrinfo (Makefile.am): Likewise.
3092         * modules/getcwd (Makefile.am): Likewise.
3093         * modules/getdelim (Makefile.am): Likewise.
3094         * modules/getdomainname (Makefile.am): Likewise.
3095         * modules/getgroups (Makefile.am): Likewise.
3096         * modules/gethostname (Makefile.am): Likewise.
3097         * modules/gethrxtime (Makefile.am): Likewise.
3098         * modules/getline (Makefile.am): Likewise.
3099         * modules/getloadavg (Makefile.am): Likewise.
3100         * modules/getlogin_r (Makefile.am): Likewise.
3101         * modules/getopt (Makefile.am): Likewise.
3102         * modules/getpass (Makefile.am): Likewise.
3103         * modules/getpass-gnu (Makefile.am): Likewise.
3104         * modules/getsubopt (Makefile.am): Likewise.
3105         * modules/gettime (Makefile.am): Likewise.
3106         * modules/gettimeofday (Makefile.am): Likewise.
3107         * modules/getugroups (Makefile.am): Likewise.
3108         * modules/getusershell (Makefile.am): Likewise.
3109         * modules/glob (Makefile.am): Likewise.
3110         * modules/group-member (Makefile.am): Likewise.
3111         * modules/hard-locale (Makefile.am): Likewise.
3112         * modules/hash (Makefile.am): Likewise.
3113         * modules/hmac-md5 (Makefile.am): Likewise.
3114         * modules/hmac-sha1 (Makefile.am): Likewise.
3115         * modules/human (Makefile.am): Likewise.
3116         * modules/idcache (Makefile.am): Likewise.
3117         * modules/imaxabs (Makefile.am): Likewise.
3118         * modules/imaxdiv (Makefile.am): Likewise.
3119         * modules/inet_ntop (Makefile.am): Likewise.
3120         * modules/inet_pton (Makefile.am): Likewise.
3121         * modules/inttostr (Makefile.am): Likewise.
3122         * modules/isapipe (Makefile.am): Likewise.
3123         * modules/lchown (Makefile.am): Likewise.
3124         * modules/long-options (Makefile.am): Likewise.
3125         * modules/lstat (Makefile.am): Likewise.
3126         * modules/malloc (Makefile.am): Likewise.
3127         * modules/mathl (Makefile.am): Likewise.
3128         * modules/mbchar (Makefile.am): Likewise.
3129         * modules/md2 (Makefile.am): Likewise.
3130         * modules/md4 (Makefile.am): Likewise.
3131         * modules/md5 (Makefile.am): Likewise.
3132         * modules/memcasecmp (Makefile.am): Likewise.
3133         * modules/memchr (Makefile.am): Likewise.
3134         * modules/memcmp (Makefile.am): Likewise.
3135         * modules/memcoll (Makefile.am): Likewise.
3136         * modules/memcpy (Makefile.am): Likewise.
3137         * modules/memmem (Makefile.am): Likewise.
3138         * modules/memmove (Makefile.am): Likewise.
3139         * modules/mempcpy (Makefile.am): Likewise.
3140         * modules/memrchr (Makefile.am): Likewise.
3141         * modules/memset (Makefile.am): Likewise.
3142         * modules/memxor (Makefile.am): Likewise.
3143         * modules/mkancesdirs (Makefile.am): Likewise.
3144         * modules/mkdir (Makefile.am): Likewise.
3145         * modules/mkdir-p (Makefile.am): Likewise.
3146         * modules/mkdtemp (Makefile.am): Likewise.
3147         * modules/mkstemp (Makefile.am): Likewise.
3148         * modules/mktime (Makefile.am): Likewise.
3149         * modules/modechange (Makefile.am): Likewise.
3150         * modules/mountlist (Makefile.am): Likewise.
3151         * modules/nanosleep (Makefile.am): Likewise.
3152         * modules/openat (Makefile.am): Likewise.
3153         * modules/pagealign_alloc (Makefile.am): Likewise.
3154         * modules/physmem (Makefile.am): Likewise.
3155         * modules/poll (Makefile.am): Likewise.
3156         * modules/posixtm (Makefile.am): Likewise.
3157         * modules/posixver (Makefile.am): Likewise.
3158         * modules/putenv (Makefile.am): Likewise.
3159         * modules/quote (Makefile.am): Likewise.
3160         * modules/quotearg (Makefile.am): Likewise.
3161         * modules/raise (Makefile.am): Likewise.
3162         * modules/read-file (Makefile.am): Likewise.
3163         * modules/readline (Makefile.am): Likewise.
3164         * modules/readlink (Makefile.am): Likewise.
3165         * modules/readtokens (Makefile.am): Likewise.
3166         * modules/readutmp (Makefile.am): Likewise.
3167         * modules/realloc (Makefile.am): Likewise.
3168         * modules/regex (Makefile.am): Likewise.
3169         * modules/rename (Makefile.am): Likewise.
3170         * modules/rename-dest-slash (Makefile.am): Likewise.
3171         * modules/rijndael (Makefile.am): Likewise.
3172         * modules/rmdir (Makefile.am): Likewise.
3173         * modules/rpmatch (Makefile.am): Likewise.
3174         * modules/safe-read (Makefile.am): Likewise.
3175         * modules/safe-write (Makefile.am): Likewise.
3176         * modules/same (Makefile.am): Likewise.
3177         * modules/save-cwd (Makefile.am): Likewise.
3178         * modules/savedir (Makefile.am): Likewise.
3179         * modules/setenv (Makefile.am): Likewise.
3180         * modules/settime (Makefile.am): Likewise.
3181         * modules/sha1 (Makefile.am): Likewise.
3182         * modules/sig2str (Makefile.am): Likewise.
3183         * modules/snprintf (Makefile.am): Likewise.
3184         * modules/stdlib-safer (Makefile.am): Likewise.
3185         * modules/stpcpy (Makefile.am): Likewise.
3186         * modules/stpncpy (Makefile.am): Likewise.
3187         * modules/strcase (Makefile.am): Likewise.
3188         * modules/strcasestr (Makefile.am): Likewise.
3189         * modules/strchrnul (Makefile.am): Likewise.
3190         * modules/strcspn (Makefile.am): Likewise.
3191         * modules/strdup (Makefile.am): Likewise.
3192         * modules/strerror (Makefile.am): Likewise.
3193         * modules/strftime (Makefile.am): Likewise.
3194         * modules/strndup (Makefile.am): Likewise.
3195         * modules/strnlen (Makefile.am): Likewise.
3196         * modules/strpbrk (Makefile.am): Likewise.
3197         * modules/strsep (Makefile.am): Likewise.
3198         * modules/strstr (Makefile.am): Likewise.
3199         * modules/strtod (Makefile.am): Likewise.
3200         * modules/strtoimax (Makefile.am): Likewise.
3201         * modules/strtok_r (Makefile.am): Likewise.
3202         * modules/strtol (Makefile.am): Likewise.
3203         * modules/strtoll (Makefile.am): Likewise.
3204         * modules/strtoul (Makefile.am): Likewise.
3205         * modules/strtoull (Makefile.am): Likewise.
3206         * modules/strtoumax (Makefile.am): Likewise.
3207         * modules/strverscmp (Makefile.am): Likewise.
3208         * modules/time_r (Makefile.am): Likewise.
3209         * modules/timegm (Makefile.am): Likewise.
3210         * modules/tmpfile-safer (Makefile.am): Likewise.
3211         * modules/unistd-safer (Makefile.am): Likewise.
3212         * modules/unlinkdir (Makefile.am): Likewise.
3213         * modules/userspec (Makefile.am): Likewise.
3214         * modules/utime (Makefile.am): Likewise.
3215         * modules/utimecmp (Makefile.am): Likewise.
3216         * modules/utimens (Makefile.am): Likewise.
3217         * modules/vasnprintf (Makefile.am): Likewise.
3218         * modules/vasprintf (Makefile.am): Likewise.
3219         * modules/vsnprintf (Makefile.am): Likewise.
3220         * modules/xalloc (Makefile.am): Likewise.
3221         * modules/xgetcwd (Makefile.am): Likewise.
3222         * modules/xnanosleep (Makefile.am): Likewise.
3223         * modules/xreadlink (Makefile.am): Likewise.
3224         * modules/xstrtod (Makefile.am): Likewise.
3225         * modules/xstrtol (Makefile.am): Likewise.
3226         * modules/xstrtold (Makefile.am): Likewise.
3227         * modules/yesno (Makefile.am): Likewise.
3228
3229 2006-10-12  Jim Meyering  <jim@meyering.net>
3230
3231         * m4/getloadavg.m4: Revert the change below.
3232
3233         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
3234         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
3235         fail with a symlink, which is what coreutils' ./bootstrap now
3236         creates by default.
3237
3238 2006-10-12  Bruno Haible  <bruno@clisp.org>
3239
3240         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
3241         mingw.
3242         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
3243         MSVC and mingw explicitly.
3244
3245 2006-10-11  Simon Josefsson  <jas@extundo.com>
3246             Bruno Haible  <bruno@clisp.org>
3247
3248         Add support for multiple gnulib-tool invocations in the scope of a
3249         single configure.ac file.
3250         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
3251         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
3252         with the same contents as the _LIBADD variable.
3253         (func_emit_initmacro_start, func_emit_initmacro_end,
3254         func_emit_initmacro_done): New functions.
3255         (func_import, func_create_testdir): Invoke them. Allow the identifiers
3256         gl_LIBOBJS and gl_LTLIBOBJS.
3257
3258 2006-10-11  Bruno Haible  <bruno@clisp.org>
3259
3260         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
3261         (func_create_testdir): Don't create po/Makefile.am, don't invoke
3262         autoreconf. Instead, invoke autopoint explicitly but move back the
3263         *.m4 files from gnulib.
3264
3265 2006-10-11  Bruno Haible  <bruno@clisp.org>
3266
3267         * gnulib-tool (func_usage): Make module names after --create-testdir
3268         optional.
3269         (func_create_testdir): If no module was specified, use nearly all
3270         modules.
3271
3272 2006-10-12  Jim Meyering  <jim@meyering.net>
3273
3274         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3275         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3276         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3277         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3278         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3279         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3280         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3281         (fts_set_stat_required): New function.
3282         (fts_open): Defer the calls to fts_stat, if possible or requested.
3283         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3284         into fts_stat itself.
3285         (fts_read): Perform any required (deferred) fts_stat call.
3286         (fts_build): Likewise, for the directory we're about to open and read.
3287         In the readdir loop, carefully decide whether each entry will require
3288         an eventual call to fts_stat, using dirent.d_type info if available.
3289         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3290         a command line argument into this function.  Update all callers.
3291         Map a return value of FTS_DOT to FTS_D for a command line argument.
3292         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3293         Thanks to Miklos Szeredi for his tenacity and for the initial
3294         bug report about "find" failing on a FUSE-based file system.
3295
3296         * lib/fts.c (fts_open): Use consistent indentation.
3297
3298 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3299
3300         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3301         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3302         reported by Jim Meyering.  All uses of cache variables renamed
3303         to match Autoconf's.
3304         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3305         the other one.
3306
3307         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3308         Fix misspelling in diagnostic.
3309
3310 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3311
3312         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3313         defined.  Problem reported by Matthew Woehlke.
3314
3315         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3316         Add support for Tandem NonStop R series.
3317         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3318         Use new macro.
3319
3320         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3321         (has_trailing_slash): Omit size arg; all callers changed.
3322         Omit 'inline', since it doesn't help performance and we'd
3323         need to configure it.
3324         Don't count //, ///, etc. as having a trailing slash.
3325         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3326         (rpl_rename_dest_slash): On failure, use rename's errno rather
3327         than (in some cases) an incorrect or junk errno.
3328         Simplify code by removing need to compute length; this does
3329         cause it to make two passes instead of one over the file name,
3330         but it's worth it.
3331
3332         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3333         change, since Autoconf's version may no longer be appropriate now
3334         that we are using CVS Autoconf's version.  Add support for Tandem.
3335
3336 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3337             Bruno Haible  <bruno@clisp.org>
3338
3339         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3340         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3341         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3342         gl_AC_TYPE_LONG_LONG.
3343
3344         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3345         instead of HAVE_LONG_LONG.
3346         * lib/printf-args.c (printf_fetchargs): Likewise.
3347         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3348         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3349         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3350         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3351         gl_AC_TYPE_LONG_LONG.
3352
3353 2006-10-11  Bruno Haible  <bruno@clisp.org>
3354
3355         * m4/longlong.m4: Add comments.
3356         * m4/ulonglong.m4: Likewise.
3357
3358 2006-10-10  Bruno Haible  <bruno@clisp.org>
3359
3360         Make it possible to #define stpcpy, strdup to aliases.
3361         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3362         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3363
3364 2006-10-10  Bruno Haible  <bruno@clisp.org>
3365
3366         Make it possible to #define gcd to an alias.
3367         * lib/gcd.c: Include config.h.
3368
3369 2006-10-10  Bruno Haible  <bruno@clisp.org>
3370
3371         Make it possible to #define c_isascii to an alias.
3372         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3373         defined. Undefine the macros before defining them, to avoid gcc
3374         warnings.
3375         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3376         define NO_C_CTYPE_MACROS early.
3377
3378 2006-10-10  Bruno Haible  <bruno@clisp.org>
3379
3380         Make it possible to #define set_program_name to an alias.
3381         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3382         ENABLE_RELOCATABLE early.
3383
3384 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3385
3386         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3387         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3388         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3389         More generally, don't assume that 64-bit signed int is available
3390         if unsigned int is, and vice versa.
3391         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3392         unsigned symbols, not on their signed counterparts.
3393         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3394         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3395         (UINT64_C, UINTMAX_C):
3396         Likewise.
3397         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3398         unsigned counterparts.
3399         (Have_long_long, Unsigned): New macros.
3400         (Int): Renamed from INT.
3401         (strtoimax): Use the new macros.
3402         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3403         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3404         * modules/inttypes (inttypes.h): Substitute
3405         HAVE_UNSIGNED_LONG_LONG_INT.
3406         * modules/stdint (stdint.h): Likewise.
3407         (Files): Add m4/ulonglong.m4.
3408
3409 2006-10-10  Bruno Haible  <bruno@clisp.org>
3410
3411         Fix a gcc -Wshadow warning.
3412         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3413         to 'bucket'.
3414         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
3415         gl_linked_indexof_from_to): Likewise.
3416         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
3417         Likewise.
3418         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
3419         Likewise.
3420         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3421         Reported by Eric Blake.
3422
3423 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3424
3425         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3426         for NetBSD.  Problem reported by Bruno Haible.
3427
3428 2006-10-09  Jim Meyering  <jim@meyering.net>
3429
3430         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3431         Patch from Bruno Haible.
3432
3433 2006-10-09  Jim Meyering  <jim@meyering.net>
3434
3435         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3436         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3437         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
3438
3439 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3440
3441         Don't include <config.h> twice; this doesn't work in some cases,
3442         e.g., when config.h has "#define intmax_t long long int" and
3443         we include <config.h>, <inttypes.h>, <config.h> in that order.
3444         Problem reported by Matthew Woehlke in:
3445         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
3446         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
3447         * lib/fts-cycle.c: Don't include config.h.
3448         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
3449         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
3450         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
3451         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
3452         inttypes.h.
3453         * lib/xstrtoumax.c: Likewise.
3454         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
3455         __strtol and the like, so that this module is more like its siblings.
3456         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
3457         Remove; no longer needed now that we assume gnulib inttypes.h.
3458
3459 2006-10-08  Bruno Haible  <bruno@clisp.org>
3460
3461         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
3462         option.
3463
3464 2006-10-07  Jim Meyering  <jim@meyering.net>
3465
3466         * modules/inttypes (inttypes.h): Revert what seems to have been
3467         an inadvertent part of today's change: use "|", not "/" in the
3468         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
3469
3470 2006-10-07  Bruno Haible  <bruno@clisp.org>
3471
3472         * modules/sublist: New file.
3473
3474 2006-10-07  Bruno Haible  <bruno@clisp.org>
3475
3476         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
3477         * modules/argz (argz.h): Likewise.
3478         * modules/arpa_inet (arpa/inet.h): Likewise.
3479         * modules/byteswap (byteswap.h): Likewise.
3480         * modules/configmake (configmake.h): Likewise.
3481         * modules/fcntl (fcntl.h): Likewise.
3482         * modules/fnmatch (fnmatch.h): Likewise.
3483         * modules/getopt (getopt.h): Likewise.
3484         * modules/glob (glob.h): Likewise.
3485         * modules/inttypes (inttypes.h): Likewise.
3486         * modules/netinet_in (netinet/in.h): Likewise.
3487         * modules/poll (poll.h): Likewise.
3488         * modules/stdbool (stdbool.h): Likewise.
3489         * modules/stdint (stdint.h): Likewise.
3490         * modules/sys_select (sys/select.h): Likewise.
3491         * modules/sys_socket (sys/socket.h): Likewise.
3492         * modules/sys_stat (sys/stat.h): Likewise.
3493         * modules/sysexits (sysexits.h): Likewise.
3494         * modules/unistd (unistd.h): Likewise.
3495         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3496         Add a "DO NOT EDIT" comment to the generated file.
3497         (func_import): Likewise for gnulib-comp.m4.
3498
3499 2006-10-07  Bruno Haible  <bruno@clisp.org>
3500
3501         * lib/gl_sublist.h: New file.
3502         * lib/gl_sublist.c: New file.
3503
3504 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3505
3506         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3507         name (relative to the original working directory) and the file
3508         name component (relative to the temporary working directory).  All
3509         callers changed.
3510         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3511         * lib/mkdir-p.c (make_dir_parents): Likewise.
3512         * lib/mkdir-p.h (make_dir_parents): Likewise.
3513
3514 2006-10-06  Eric Blake  <ebb9@byu.net>
3515
3516         Define several macros for use by the clean-temp module.
3517         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3518         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3519         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3520
3521         * lib/clean-temp.h (close_stream_temp): New declaration.
3522         * lib/clean-temp.c (includes): Pull in headers according to what
3523         other modules are in use.
3524         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3525
3526 2006-10-06  Bruno Haible  <bruno@clisp.org>
3527
3528         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3529         instead of fopen, fwriteerror.
3530
3531 2006-10-06  Bruno Haible  <bruno@clisp.org>
3532
3533         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3534         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3535         int.
3536         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3537         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3538         Return an error indicator.
3539         Suggested by Eric Blake.
3540
3541 2006-10-06  Bruno Haible  <bruno@clisp.org>
3542
3543         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3544         Reported by Eric Blake.
3545
3546 2006-10-06  Bruno Haible  <bruno@clisp.org>
3547
3548         * modules/closeout (Description): Mention stderr too.
3549
3550 2006-10-06  Bruno Haible  <bruno@clisp.org>
3551         and Paul Eggert  <eggert@cs.ucla.edu>
3552
3553         * lib/closeout.c (close_stdout): Also close stderr.
3554         * lib/closeout.h: Update comment.
3555
3556 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3557
3558         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3559         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3560         * lib/dirchownmod.c: Include lchown.h.
3561         * lib/lchown.c: Don't include files that lchown.h now includes.
3562         Don't declare chown, since lchown.h now does that.
3563         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3564         (lchown): Define to rpl_chown if lchown is declared but
3565         does not exist.  Declare using a prototype if lchown is not
3566         declared.  Add a copyright notice.
3567         * lib/mkstemp.h: Include <unistd.h>.
3568         * lib/openat.c: Include lchown.h.
3569
3570         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3571         we now test for that separately.
3572         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3573         rather than O_NOFOLLOW, when testing whether it's possible to
3574         avoid a race condition reliably.
3575         * lib/savewd.c (savewd_chdir): Likewise.
3576
3577         Remove macros that are no longer needed now that stdint.h is
3578         reliable.
3579         * lib/fsusage.c (UINTMAX_MAX): Remove.
3580         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3581         * lib/utimecmp.c (SIZE_MAX): Remove.
3582
3583         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3584
3585         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3586         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3587         O_NOATIME works.
3588
3589 2006-10-05  Bruno Haible  <bruno@clisp.org>
3590
3591         * lib/gl_list.h (gl_sortedlist_search_from_to,
3592         gl_sortedlist_indexof_from_to): New declarations.
3593         (gl_list_implementation): New fields sortedlist_search_from_to,
3594         sortedlist_indexof_from_to.
3595         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3596         inline functions.
3597         * lib/gl_list.c (gl_sortedlist_search_from_to,
3598         gl_sortedlist_indexof_from_to): New functions.
3599         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3600         function.
3601         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3602         (gl_array_sortedlist_search_from_to): New function.
3603         (gl_array_list_implementation): Update.
3604         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3605         function.
3606         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3607         (gl_carray_sortedlist_search_from_to): New function.
3608         (gl_carray_list_implementation): Update.
3609         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3610         gl_linked_sortedlist_indexof_from_to): New functions.
3611         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3612         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3613         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3614         gl_tree_sortedlist_indexof_from_to): New functions.
3615         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3616         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3617         Update.
3618         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3619         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3620         Update.
3621
3622 2006-10-05  Bruno Haible  <bruno@clisp.org>
3623
3624         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3625         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3626         (struct gl_list_implementation): Add fields search_from_to,
3627         indexof_from_to. Remove fields search, indexof.
3628         (gl_list_search): Use the search_from_to method.
3629         (gl_list_search_from, gl_list_search_from_to): New functions.
3630         (gl_list_indexof): Use the indexof_from_to method.
3631         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3632         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3633         (gl_list_search_from, gl_list_search_from_to): New functions.
3634         (gl_list_indexof): Use the indexof_from_to method.
3635         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3636         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3637         gl_array_indexof. Add start_index, end_index arguments.
3638         (gl_array_search_from_to): Renamed from gl_array_search. Add
3639         start_index, end_index arguments.
3640         (gl_array_remove, gl_array_list_implementation): Update.
3641         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3642         gl_carray_indexof. Add start_index, end_index arguments.
3643         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3644         start_index, end_index arguments.
3645         (gl_carray_remove, gl_carray_list_implementation): Update.
3646         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3647         gl_linked_search. Add start_index, end_index arguments.
3648         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3649         start_index, end_index arguments.
3650         (gl_linked_remove): Update.
3651         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3652         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3653         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3654         field to 'size_t'.
3655         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3656         gl_tree_search. Add start_index, end_index arguments.
3657         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3658         start_index, end_index arguments.
3659         (gl_tree_remove): Update.
3660         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3661         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3662         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3663         function.
3664         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3665         gl_tree_search. Add start_index, end_index arguments.
3666         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3667         start_index, end_index arguments.
3668         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3669         Update.
3670         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3671
3672 2006-10-05  Bruno Haible  <bruno@clisp.org>
3673
3674         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3675
3676         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3677         fwriteerror_temp): New declarations.
3678         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3679         (descriptors): New variable.
3680         (cleanup): First, close the descriptors.
3681         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3682         fclose_temp, fwriteerror_temp): New functions.
3683
3684 2006-10-04  Jim Meyering  <jim@meyering.net>
3685
3686         * lib/fts.c (fts_open): Tiny comment change.
3687
3688 2006-10-04  Bruno Haible  <bruno@clisp.org>
3689
3690         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3691         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3692         gl_LOCK_BODY.
3693         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3694         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3695         gl_LOCK_EARLY_BODY.
3696         (gl_LOCK): Require gl_LOCK_BODY.
3697
3698 2006-10-04  Bruno Haible  <bruno@clisp.org>
3699
3700         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3701         (gl_oset_search_atleast): New declaration.
3702         (struct gl_oset_implementation): Add field 'search_atleast'.
3703         (gl_oset_search_atleast): New inline function.
3704         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3705         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3706         (gl_array_oset_implementation): Update.
3707         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3708         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3709         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3710
3711 2006-10-04  Bruno Haible  <bruno@clisp.org>
3712
3713         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3714
3715 2006-10-03  Bruno Haible  <bruno@clisp.org>
3716
3717         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3718         from gl_avltreehash_list_implementation.
3719
3720 2006-10-03  Bruno Haible  <bruno@clisp.org>
3721
3722         * lib/gl_oset.c (gl_oset_add): Fix return type.
3723
3724 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3725
3726         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3727
3728 2006-10-02  Eric Blake  <ebb9@byu.net>
3729
3730         * modules/strnlen (Depends-on): Add extensions.
3731
3732 2006-10-02  Eric Blake  <ebb9@byu.net>
3733
3734         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3735         definition in 2.60+.
3736
3737 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3738
3739         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3740         checks.
3741
3742 2006-10-02  Bruno Haible  <bruno@clisp.org>
3743
3744         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3745         to the AUTOMAKE_OPTIONS.
3746         Reported by Jim Meyering.
3747
3748 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3749
3750         Work around bug in Solaris 10 /proc file system:
3751         /proc/self/fd/NNN/.. isn't the parent directory of
3752         the directory whose file descriptor is NNN.  This needs to
3753         be worked around at run time, not compile time, since a
3754         program might be built on Solaris 8, where things work, and
3755         run on Solaris 10.
3756         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
3757         to use the following interface instead:
3758         (OPENAT_BUFFER_SIZE): New macro.
3759         (openat_proc_name): New function.
3760         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
3761         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
3762         Likewise.
3763         * lib/openat-proc.c: New file.
3764         * modules/openat (Files): Add lib/openat-proc.c.
3765         (Depends-on): Add same-inode, stdbool.
3766         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
3767
3768 2006-09-29  Bruno Haible  <bruno@clisp.org>
3769
3770         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
3771         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
3772         argument. Set stdout_closed before testing for ferror, not after.
3773         (fwriteerror, fwriteerror_no_ebadf): New functions.
3774
3775 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3776
3777         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
3778
3779 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
3780
3781         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
3782         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
3783
3784 2006-09-28  Jim Meyering  <jim@meyering.net>
3785
3786         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
3787         Include <unistd.h>.
3788
3789 2006-09-28  Bruno Haible  <bruno@clisp.org>
3790
3791         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
3792         * modules/linkedhash-list (Depends-on): Likewise.
3793         * modules/rbtreehash-list (Depends-on): Likewise.
3794
3795 2006-09-28  Bruno Haible  <bruno@clisp.org>
3796
3797         * lib/strndup.h: Simplify the redefinition of strndup.
3798         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
3799         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
3800
3801 2006-09-28  Bruno Haible  <bruno@clisp.org>
3802
3803         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
3804         * lib/gl_linkedhash_list.c: Likewise.
3805         * lib/gl_rbtreehash_list.c: Likewise.
3806
3807 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
3808
3809         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
3810         getaddrinfo.
3811
3812         * lib/__fpending.h: Don't include <stdio_ext.h> unless
3813         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
3814         it causes <stdio_ext.h> to cause a compile-time error.
3815         Problem reported by Nelson H. F. Beebe.
3816         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
3817         of HAVE_DECL___PENDING.
3818
3819         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
3820         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
3821         declaration.
3822
3823 2006-09-27  Jim Meyering  <jim@meyering.net>
3824
3825         This file could end up with a definition for a function
3826         named __strndup, rather than rpl_strndup on a system with
3827         incomplete weak_alias support.
3828         * lib/strndup.c (strndup): Rename from __strndup.
3829         Remove #defines that used to map __strndup to strndup.
3830         Don't use K&R prototypes.
3831         Remove LIBC-related code, since this file is not sync'd with glibc.
3832         * lib/strndup.h: Revamp, accordingly.
3833         * m4/strndup.m4: Modernize.
3834
3835 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3836
3837         * modules/savewd (Depends-on): Add 'raise'.
3838         * lib/savewd.c: Include <signal.h>, for 'raise'.
3839
3840 2006-09-26  Jim Meyering  <jim@meyering.net>
3841
3842         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
3843         when we detect Darwin 8.7.0's acl_get_file bug.
3844         Rearrange to perform the new (below) run-test while $LIBS
3845         contains any acl-related library.  Set USE_ACL at the end.
3846         (gl_ACL_GET_FILE): New function.
3847
3848 2006-09-26  Eric Blake  <ebb9@byu.net>
3849
3850         * lib/verror.c: Include <config.h> unconditionally.
3851
3852 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3853
3854         * modules/clock-time (Maintainer): Add self.
3855         * modules/getlogin_r (Depends-on): Add extensions.
3856
3857 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3858
3859         * modules/clock-time: New module.
3860         * modules/nanosleep (Depends-on): Add clock-time.
3861         * modules/gethrxtime (Depends-on): Likewise.
3862         * modules/gettime (Depends-on): Likewise.
3863         * modules/settime (Depends-on): Likewise.
3864
3865         * modules/fts-lgpl: Depend on openat.
3866         * modules/mkancesdirs: Depend on savewd.
3867         * modules/mkdir-p: Likewise.
3868
3869 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3870
3871         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
3872
3873         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
3874         `gl_have_arbitrary_file_name_length_limit' to
3875         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
3876         actually works between configure runs.
3877
3878 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3879             Bruno Haible  <bruno@clisp.org>
3880
3881         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
3882
3883 2006-09-25  Jim Meyering  <jim@meyering.net>
3884
3885         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
3886         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
3887
3888 2006-09-25  Eric Blake  <ebb9@byu.net>
3889
3890         * gnulib-tool (func_import, func_create_testdir): Fix typos in
3891         exec's in 2006-09-18 patch when shuffling fds.
3892
3893 2006-09-25  Bruno Haible  <bruno@clisp.org>
3894
3895         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
3896         Reported by Jim Meyering.
3897
3898 2006-09-24  Jim Meyering  <jim@meyering.net>
3899
3900         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
3901         compare a pointer against a literal "0".  That caused failures with
3902         at least HP-UX's hpcc.
3903
3904 2006-09-22  Simon Josefsson  <jas@extundo.com>
3905
3906         * modules/gc-sha1:
3907         * modules/gc-md4:
3908         * modules/gc-hmac-sha1:
3909         * modules/gc-hmac-md5:
3910         * modules/gc-des:
3911         * modules/gc-arcfour: Distribute more files.
3912
3913 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3914
3915         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
3916         (gl_linked_iterator_from_to): Initialize struct completely.
3917         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
3918         (gl_tree_iterator_from_to): Likewise
3919         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
3920         * lib/gl_array_list.c [lint] (gl_array_iterator)
3921         (gl_array_iterator_from_to): Likewise.
3922         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
3923         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
3924         (gl_carray_iterator_from_to): Likewise.
3925
3926         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
3927         * lib/md4.c (md4_process_block): Remove unused variable.
3928         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
3929         parentheses for clarity.
3930
3931 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3932
3933         * modules/bison-i18n (Depends-on): Add gettext.
3934
3935 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3936
3937         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
3938         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
3939         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
3940         also add missing comma that caused broken test.
3941         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
3942         stdlib.h, for `abort'.
3943         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
3944         variables.
3945         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
3946         include unistd.h if present, for `rmdir'.
3947         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
3948         variables.
3949         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
3950         in the process include standard headers for prototypes.
3951         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
3952         gets declared on GNU/Linux.
3953         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
3954         unistd.h, for `rmdir'.
3955         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
3956
3957         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
3958         always true.
3959         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
3960
3961         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
3962
3963 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3964
3965         * gnulib-tool (func_version): Create output all at once.  This
3966         may help avoid triggering unnecessary SIGPIPEs, and at any
3967         rate it doesn't hurt.
3968
3969 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3970             Bruno Haible  <bruno@clisp.org>
3971
3972         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
3973         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3974         * m4/signed.m4 (bh_C_SIGNED): Likewise.
3975
3976         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
3977         (gl_FUNC_VASPRINTF): Invoke it.
3978
3979 2006-09-22  Bruno Haible  <bruno@clisp.org>
3980
3981         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
3982         getloadavg.c as first argument.
3983
3984 2006-09-22  Bruno Haible  <bruno@clisp.org>
3985
3986         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
3987         at the beginning of the gl_INIT macro.
3988         * modules/getloadavg (configure.ac): Pass $gl_source_base to
3989         gl_GETLOADAVG.
3990
3991 2006-09-22  Bruno Haible  <bruno@clisp.org>
3992
3993         * gnulib-tool (func_create_megatestdir): Don't include the config-h
3994         module.
3995         Suggested by Ralf Wildenhues.
3996
3997 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
3998
3999         Import this patch from libc:
4000
4001         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4002
4003         * lib/regex_internal.c (re_string_reconstruct): Handle
4004         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4005         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4006         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4007         re_string_context_at.
4008
4009         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4010         now requires it.
4011         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4012         gl_REGEX now does it for us.
4013         (gl_REGEX): Add test taken from
4014         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4015
4016         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4017         Check that large offsets work.  Modernize Autoconf usages.
4018         Prefer "yes" to mean a good thing rather than a bad.
4019         Don't put "#define mkstemp" in config.h, as this might interfere
4020         with standard system headers that "#define mkstemp mkstemp64".
4021
4022         * modules/mkstemp (Depends-on): Add extensions, so that
4023         mkstemp is visible on some platforms.
4024         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4025         (Include): Change to "mkstemp.h" from <stdlib.h>.
4026         (Files): Add mkstemp.h.
4027
4028         * lib/mkstemp.h: New file, since some standard headers
4029         #define mkstemp.
4030         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4031         Include "mkstemp.h".
4032         Make the _LIBC code resemble glibc original more,
4033         e.g., use K&R style.
4034         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4035         (mkstemp): Remove, since mkstemp.h does this for us.
4036         * lib/stdlib--.h: Include mkstemp.h.
4037
4038         Import this patch from libc:
4039
4040         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4041
4042         * lib/tempname.c (__gen_tempname): Change attempts_min
4043         into a macro.  Use preprocessor to decide how to initialize
4044         attempts [Coverity CID 67].
4045
4046 2006-09-20  Bruno Haible  <bruno@clisp.org>
4047
4048         * lib/mkdtemp.c: Import from libc.
4049         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4050                 * sysdeps/posix/tempname.c (__gen_tempname): Change
4051                 attempts_min into a macro.  Use preprocessor to decide how to
4052                 initialize attempts [Coverity CID 67].
4053         2001-11-27  Paul Eggert  <eggert@twinsun.com>
4054                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
4055                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
4056
4057 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4058
4059         * gnulib-tool (func_exit): New function, to allow to pass the
4060         exit status portably through the trap.  Use everywhere.
4061         (--help, --version): Signal a write error.
4062         (trap): catch SIGPIPE, for write errors.
4063         Exit at the end of the trap, with the correct exit status.
4064
4065 2006-09-19  Karl Berry  <karl@gnu.org>
4066
4067         * doc/gnulib.texi: note about the license texinfo files.
4068
4069 2006-09-19  Eric Blake  <ebb9@byu.net>
4070
4071         * gnulib-tool: Avoid space-tab.
4072
4073 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4074
4075         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
4076         that prevented coreutils 6.1 from building.  Problem reported
4077         by Petter Reinholdtsen.
4078
4079 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4080
4081         * gnulib-tool (avoidlist): Fix typo that broke options like
4082         --avoid=lock that are used by coreutils bootstrap.
4083
4084 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
4085
4086         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
4087         more systematically.
4088
4089 2006-09-18  Jim Meyering  <jim@meyering.net>
4090
4091         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
4092
4093 2006-09-18  Bruno Haible  <bruno@clisp.org>
4094
4095         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
4096
4097 2006-09-18  Bruno Haible  <bruno@clisp.org>
4098
4099         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
4100         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
4101         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
4102         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
4103         * m4/gettext.m4: Require autoconf >= 2.52.
4104         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
4105         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
4106         of gl_cv_header_inttypes_h.
4107
4108 2006-09-18  Bruno Haible  <bruno@clisp.org>
4109
4110         * lib/javaversion.c: Include configmake.h.
4111
4112 2006-09-18  Bruno Haible  <bruno@clisp.org>
4113
4114         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
4115         avoid that the while loops be executed in a subshell.
4116
4117 2006-09-18  Bruno Haible  <bruno@clisp.org>
4118
4119         * MODULES.html.sh (func_module): Break long lines.
4120         Suggested by Bruce Korb <bkorb@gnu.org>.
4121
4122 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4123
4124         Speed up by a factor of 1.12.
4125         * gnulib-tool (nl): New variable.
4126         (func_import): Rewrite include directive extraction to only read each
4127         directive once.
4128
4129 2006-09-17  Bruno Haible  <bruno@clisp.org>
4130
4131         * modules/javaversion (Makefile.am): Remove DEFS setting.
4132         (Depends-on): Add configmake, for PKGDATADIR definition.
4133
4134 2006-09-17  Bruno Haible  <bruno@clisp.org>
4135
4136         * gnulib-tool (func_create_testdir): Rewrite all files at once.
4137
4138 2006-09-17  Bruno Haible  <bruno@clisp.org>
4139
4140         * gnulib-tool (func_append): New function, stolen from libtool.m4.
4141         (func_modules_transitive_closure, func_modules_add_dummy,
4142         func_modules_to_filelist, func_import, func_create_testdir,
4143         func_create_megatestdir, ...): Use it wherever possible.
4144         Suggested by Ralf Wildenhues.
4145
4146 2006-09-16  Karl Berry  <karl@gnu.org>
4147
4148         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
4149         to avoid sectioning errors.
4150         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
4151         [ifinfo]: blank line after @center-ed titles.
4152         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
4153         Spell FSF address consistently with others.
4154         (These changes approved by rms.)
4155
4156 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4157
4158         Speed up by a factor of 1.61.
4159         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
4160         already checked module names again.
4161
4162 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4163
4164         Speed up by a factor of 1.13.
4165         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
4166         for new_files, and the input to func_add_or_update.
4167
4168 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4169
4170         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
4171         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
4172
4173 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4174
4175         * modules/mkancesdirs (Depends-on): Add fcntl.
4176         * modules/savewd: New file.
4177         * MODULES.html.sh (File system functions): Add savewd.
4178
4179         * modules/configmake (Makefile.am): Add support for the
4180         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
4181
4182 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4183
4184         * m4/savewd.m4: New file.
4185
4186 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4187
4188         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
4189         (dirchownmod): New arg FD.  All callers changed.
4190         Use FD rather than opening the directory ourself, as opening is
4191         now the caller's responsibility.
4192         * lib/dirchownmod.h: Likewise.
4193         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
4194         hosts that require <sys/types.h> before <sys/stat.h>.  Include
4195         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
4196         (test_dir): Remove.
4197         (mkancesdirs): Return length of prefix of FILE that has already
4198         been made, or -2 if there is a child doing the work.  Redo
4199         algorithm so that it is O(N) rather than O(N**2).  Optimize away
4200         ".", and treat ".." specially since it might stray back into
4201         already-created areas.  Use a subprocess if necessary.  New arg
4202         WD; all users changed.  MAKE_DIR function should now return 1
4203         if it creates a directory that is not readable.  Return -2 if
4204         a child process is spun off.
4205         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
4206         Adjust signature to match code.
4207         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
4208         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
4209         all users changed.
4210         * lib/savewd.c, lib/savewd.h: New files.
4211
4212 2006-09-15  Jim Meyering  <jim@meyering.net>
4213
4214         * modules/rename-dest-slash: New module.
4215         * MODULES.html.sh (posix_compat): Add it here.
4216
4217         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
4218
4219 2006-09-15  Jim Meyering  <jim@meyering.net>
4220
4221         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
4222         file.
4223
4224         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
4225
4226 2006-09-15  Jim Meyering  <jim@meyering.net>
4227
4228         * lib/rename-dest-slash.c (has_trailing_slash): Use
4229         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
4230         (rpl_rename_dest_slash): Perform the cheaper trailing slash
4231         test before testing whether SRC is a directory.
4232         Suggestions from Bruno Haible.
4233
4234         Avoid a warning about an unused variable.
4235         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
4236         into the #ifdef block where it's used.
4237
4238         * lib/rename-dest-slash.c: New file.
4239
4240 2006-09-14  Bruno Haible  <bruno@clisp.org>
4241
4242         * lib/allocsa.c: Include <config.h> unconditionally.
4243         * lib/asnprintf.c: Likewise.
4244         * lib/asprintf.c: Likewise.
4245         * lib/c-strcasecmp.c: Likewise.
4246         * lib/c-strcasestr.c: Likewise.
4247         * lib/c-strncasecmp.c: Likewise.
4248         * lib/c-strstr.c: Likewise.
4249         * lib/classpath.c: Likewise.
4250         * lib/clean-temp.c: Likewise.
4251         * lib/concatpath.c: Likewise.
4252         * lib/copy-file.c: Likewise.
4253         * lib/csharpcomp.c: Likewise.
4254         * lib/csharpexec.c: Likewise.
4255         * lib/execute.c: Likewise.
4256         * lib/fatal-signal.c: Likewise.
4257         * lib/findprog.c: Likewise.
4258         * lib/fwriteerror.c: Likewise.
4259         * lib/gl_array_list.c: Likewise.
4260         * lib/gl_array_oset.c: Likewise.
4261         * lib/gl_avltree_list.c: Likewise.
4262         * lib/gl_avltree_oset.c: Likewise.
4263         * lib/gl_avltreehash_list.c: Likewise.
4264         * lib/gl_carray_list.c: Likewise.
4265         * lib/gl_linked_list.c: Likewise.
4266         * lib/gl_linkedhash_list.c: Likewise.
4267         * lib/gl_list.c: Likewise.
4268         * lib/gl_oset.c: Likewise.
4269         * lib/gl_rbtree_list.c: Likewise.
4270         * lib/gl_rbtree_oset.c: Likewise.
4271         * lib/gl_rbtreehash_list.c: Likewise.
4272         * lib/imaxabs.c: Likewise.
4273         * lib/imaxdiv.c: Likewise.
4274         * lib/javacomp.c: Likewise.
4275         * lib/javaexec.c: Likewise.
4276         * lib/javaversion.c: Likewise.
4277         * lib/linebreak.c: Likewise.
4278         * lib/localcharset.c: Likewise.
4279         * lib/lock.c: Likewise.
4280         * lib/mbchar.c: Likewise.
4281         * lib/mbswidth.c: Likewise.
4282         * lib/mkdtemp.c: Likewise.
4283         * lib/pipe.c: Likewise.
4284         * lib/printf-args.c: Likewise.
4285         * lib/printf-parse.c: Likewise.
4286         * lib/progname.c: Likewise.
4287         * lib/progreloc.c: Likewise.
4288         * lib/readlink.c: Likewise.
4289         * lib/sh-quote.c: Likewise.
4290         * lib/stpcpy.c: Likewise.
4291         * lib/stpncpy.c: Likewise.
4292         * lib/strcasecmp.c: Likewise.
4293         * lib/strcasestr.c: Likewise.
4294         * lib/strcspn.c: Likewise.
4295         * lib/striconv.c: Likewise.
4296         * lib/strncasecmp.c: Likewise.
4297         * lib/strnlen1.c: Likewise.
4298         * lib/strstr.c: Likewise.
4299         * lib/strtok_r.c: Likewise.
4300         * lib/tls.c: Likewise.
4301         * lib/tmpdir.c: Likewise.
4302         * lib/unicodeio.c: Likewise.
4303         * lib/unsetenv.c: Likewise.
4304         * lib/vasnprintf.c: Likewise.
4305         * lib/vasprintf.c: Likewise.
4306         * lib/wait-process.c: Likewise.
4307         * lib/xallocsa.c: Likewise.
4308         * lib/xsetenv.c: Likewise.
4309         * lib/xstriconv.c: Likewise.
4310
4311 2006-09-13  Simon Josefsson  <jas@extundo.com>
4312
4313         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4314         that internally, suggested by Ralf Wildenhues
4315         <Ralf.Wildenhues@gmx.de>.
4316
4317 2006-09-13  Simon Josefsson  <jas@extundo.com>
4318
4319         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4320         @LIBOBJS@.
4321         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4322
4323 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4324
4325         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4326         longer worry about uses that don't define HAVE_CONFIG_H.
4327         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4328         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4329         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4330         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4331         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4332         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4333         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4334         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4335         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4336         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4337         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4338         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4339         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4340         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4341         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4342         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4343         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4344         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4345         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4346         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4347         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4348         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4349         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4350         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4351         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4352         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4353         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4354         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4355         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4356         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4357         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4358         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4359         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4360         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4361         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4362         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4363         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4364         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4365         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4366         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4367         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4368         Likewise.
4369
4370 2006-09-13  Eric Blake  <ebb9@byu.net>
4371
4372         * lib/getopt.c: Fix typo in last commit.
4373
4374 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4375
4376         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4377         dgettext.
4378
4379 2006-09-12  Jim Meyering  <jim@meyering.net>
4380
4381         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4382         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4383         Reported by Nelson H. F. Beebe.
4384
4385 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4386
4387         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4388         program_invocation_name and program_invocation_short_name are
4389         initialized.
4390         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4391         and program_invocation_short_name to argp.h, so they are visible
4392         to user programs.
4393         * lib/argp.h: Likewise
4394
4395 2006-09-10  Bruno Haible  <bruno@clisp.org>
4396
4397         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4398         m4/inttypes_h.m4, m4/uintmax_t.m4.
4399
4400 2006-09-10  Bruno Haible  <bruno@clisp.org>
4401
4402         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4403         gl_AC_TYPE_UINTMAX_T.
4404
4405 2006-09-10  Bruno Haible  <bruno@clisp.org>
4406
4407         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4408
4409 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4410
4411         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4412         convention.  Text proposed by Bruno Haible.
4413         (struct argp_option): Document the use of N_() wrappers.
4414
4415         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
4416         '\v', and translate the two parts separately, instead of feeding
4417         the whole string to gettext.  This allows to exclude
4418         '\v' from the strings visible to the translator by writing doc
4419         strings as N_("..") "\v" N_("..").
4420
4421 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4422
4423         * config/srclist.txt: Undo latest change; the bug was fixed.
4424
4425 2006-09-09  Bruno Haible  <bruno@clisp.org>
4426
4427         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4428         assignments if building a library without libtool.
4429         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4430         in func_emit_lib_Makefile_am.
4431         (func_import): When building a static library libfoo.a, arrange to
4432         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4433         (func_create_testdir): Likewise.
4434         * modules/gc (configure.ac, Makefile.am): If building statically,
4435         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4436         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4437         * modules/striconv (configure.ac, Makefile.am): Likewise.
4438         Based on a suggestion by Ralf Wildenhues.
4439
4440 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4441
4442         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4443         Check for unistd.h too, since Autoconf doesn't assume POSIX.
4444         Also:
4445
4446         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4447         Add year_2050_test to catch glibc bug 2821
4448         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4449
4450         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4451         Prefer #ifdef to #if.
4452
4453         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
4454         Return from 'main' instead of calling 'exit'.
4455
4456 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4457
4458         * lib/mktime.c (guess_time_tm): Fix bug where mktime
4459         returned the maximum time_t value rather than (time_t) -1.
4460         Problem originally reported by William Bardwell
4461         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4462
4463         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4464         Moved to here ...
4465         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4466         ... from here.
4467
4468 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4469
4470         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
4471         2821 is fixed.
4472
4473 2006-09-08  Jim Meyering  <jim@meyering.net>
4474
4475         Don't make generated files read-only.  That would bother too many
4476         people.  However, do retain the ability to work when targets are
4477         read-only: remove the destination and temporary files before writing
4478         them (when generated via sed or echo), or by using the -f option for
4479         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
4480         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4481         * modules/byteswap, modules/configmake, modules/fcntl:
4482         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4483         * modules/localcharset, modules/netinet_in, modules/poll:
4484         * modules/stdbool, modules/stdint, modules/sys_select:
4485         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4486
4487 2006-09-08  Jim Meyering  <jim@meyering.net>
4488
4489         Avoid new build failure on FreeBSD 6.0.
4490         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4491         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4492         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4493
4494 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4495
4496         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4497
4498 2006-09-07  Jim Meyering  <jim@meyering.net>
4499
4500         Fix global typo in last change: use chmod u-w, not chmod u-x.
4501         Spotted by Paul Eggert and Bruce Korb.
4502         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4503         * modules/byteswap, modules/configmake, modules/fcntl:
4504         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4505         * modules/localcharset, modules/netinet_in, modules/poll:
4506         * modules/stdbool, modules/stdint, modules/sys_select:
4507         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4508
4509 2006-09-06  Jim Meyering  <jim@meyering.net>
4510
4511         Make generated files be read-only.
4512         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4513         Ensure that each generated file is now read-only.
4514         * modules/argz: Likewise.
4515         * modules/arpa_inet: Likewise.
4516         * modules/byteswap: Likewise.
4517         * modules/configmake: Likewise.
4518         * modules/fcntl: Likewise.
4519         * modules/fnmatch: Likewise.
4520         * modules/getopt: Likewise.
4521         * modules/glob: Likewise.
4522         * modules/inttypes: Likewise.
4523         * modules/netinet_in: Likewise.
4524         * modules/poll: Likewise.
4525         * modules/stdbool: Likewise.
4526         * modules/stdint: Likewise.
4527         * modules/sys_select: Likewise.
4528         * modules/sys_socket: Likewise.
4529         * modules/sys_stat: Likewise.
4530         * modules/sysexits: Likewise.
4531         * modules/localcharset: Same as above, but continue using temporary
4532         file named "t-$@" (why different?) rather than the "$@-t" used
4533         everywhere else.
4534
4535         * modules/sysexits (Makefile.am): Replace literal occurrences
4536         of "sysexit.h" more readable, and more consistent, "$@".
4537
4538 2006-09-06  Bruno Haible  <bruno@clisp.org>
4539
4540         * modules/striconv: New file.
4541         * modules/xstriconv: New file.
4542         * MODULES.html.sh (Internationalization functions): Add striconv,
4543         xstriconv.
4544
4545 2006-09-06  Bruno Haible  <bruno@clisp.org>
4546
4547         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4548         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4549         not using libtool correctly.
4550
4551 2006-09-06  Bruno Haible  <bruno@clisp.org>
4552
4553         * lib/striconv.h: New file.
4554         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4555         iconvstring.c.
4556         * lib/xstriconv.h: New file.
4557         * lib/xstriconv.c: New file.
4558
4559 2006-09-06  Bruno Haible  <bruno@clisp.org>
4560
4561         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4562         lib_..._LDFLAGS.
4563
4564 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4565
4566         * lib/argz_.h: Sync from Libtool.
4567
4568         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4569                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4570
4571         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4572
4573 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4574
4575         * modules/trim: New file.
4576
4577 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4578
4579         * lib/trim.h: New file.
4580         * lib/trim.c: New file.
4581
4582 2006-09-05  Bruno Haible  <bruno@clisp.org>
4583
4584         * MODULES.html.sh (String handling): Add trim.
4585
4586 2006-09-04  Karl Berry  <karl@gnu.org>
4587
4588         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4589         until next release.
4590
4591 2006-09-03  Bruno Haible  <bruno@clisp.org>
4592
4593         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4594         correctly.
4595
4596 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4597
4598         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4599         not gl_GETLOADAVG.  Omit unneeded semicolons.
4600         Problems reported by Ralf Wildenhues in
4601         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4602         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4603         at the end, which is the usual gnulib style.
4604
4605         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4606         of doing all the work ourselves.
4607         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4608         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4609
4610 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4611
4612         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4613         Problem reported by Ralf Wildenhues in
4614         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4615
4616         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4617         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4618
4619 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4620
4621         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4622         yesterday's patch by changing test -n to test -z.
4623
4624 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4625
4626         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4627         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4628         the former is now obsolescent.
4629
4630         * modules/chdir-long (Depends-on): Add fcntl.
4631
4632 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4633
4634         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4635         obsolescent, and programs should use gnulib instead.
4636         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4637         but with prefixes changed.
4638
4639 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4640
4641         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4642         or stdbool.h, because they might not exist while configuring.
4643
4644         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4645         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4646         does that for us.
4647         (O_DIRECTORY): Remove.
4648
4649 2006-08-31  Eric Blake  <ebb9@byu.net>
4650
4651         * gnulib-tool: Don't let emacs change spaces to TAB.
4652
4653 2006-08-31  Bruno Haible  <bruno@clisp.org>
4654
4655         * gnulib-tool: When calling func_import more than once, do it in a
4656         subshell.
4657         Reported by Eric Blake <ebb9@byu.net>.
4658
4659 2006-08-31  Bruno Haible  <bruno@clisp.org>
4660
4661         * gnulib-tool (nl): Remove variable.
4662         (sed_transform_lib_file): Use more robust test for config-h module.
4663         (func_import): Fix typo in 2006-08-25 patch.
4664
4665 2006-08-31  Bruno Haible  <bruno@clisp.org>
4666
4667         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4668         specified, augment Makefile.am variables instead of assigning them.
4669
4670 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4671
4672         Work around a bug in both the Linux and SunOS 64-bit kernels:
4673         nanosleep mishandles sleeps for longer than 2**31 seconds.
4674         Problem reported by Frank v Waveren in
4675         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4676         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4677         Check for nanosleep bug.
4678         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4679
4680 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4681
4682         Work around a bug in both the Linux and SunOS 64-bit kernels:
4683         nanosleep mishandles sleeps for longer than 2**31 seconds.
4684         Problem reported by Frank v Waveren in
4685         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4686         * lib/nanosleep.c (BILLION): New constant.
4687         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4688         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4689         implementation.
4690
4691 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4692
4693         * modules/nanosleep (Depends-on): Add gettime.
4694
4695 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4696         and Simon Josefsson  <jas@extundo.com>
4697         and Oskar Liljeblad  <oskar@osk.mine.nu>
4698
4699         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4700         * gnulib-tool (func_import): New license type 'unmodifiable license
4701         text'.
4702         * modules/fdl: Use it.  Longer description.
4703         * module/gpl, module/lgpl: New files.
4704
4705 2006-08-30  Jim Meyering  <jim@meyering.net>
4706
4707         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4708         shadowing the parameter.
4709
4710 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4711
4712         Sync from Libtool:
4713
4714         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4715
4716         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4717         sharing with gnulib.  Report by Eric Blake.
4718
4719 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4720
4721         * modules/isapipe: New file.
4722         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4723
4724 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4725
4726         * modules/configmake (Makefile.am): Add a comment, and omit
4727         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4728         by Bruno Haible.
4729
4730 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4731
4732         * m4/isapipe.m4: New file.
4733
4734 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4735
4736         * lib/isapipe.c, lib/isapipe.h: New files.
4737
4738 2006-08-29  Jim Meyering  <jim@meyering.net>
4739
4740         * modules/configmake (Makefile.am): Make configmake.h depend on
4741         Makefile.  Otherwise, a stale configmake.h could hang around.
4742
4743 2006-08-29  Eric Blake  <ebb9@byu.net>
4744
4745         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4746         resolution of upstream bug 3044.
4747
4748 2006-08-29  Bruno Haible  <bruno@clisp.org>
4749
4750         * modules/localcharset (Depends-on): Add configmake.
4751         (Makefile.am): Remove setting of LIBDIR through DEFS.
4752
4753 2006-08-29  Bruno Haible  <bruno@clisp.org>
4754
4755         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
4756         defined.
4757
4758 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4759
4760         * modules/fcntl: New file.
4761         * modules/chdir-safer (Depends-on): Add fcntl.
4762         * modules/fts: Likewise.
4763         * modules/mkdir-p: Likewise.
4764
4765         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
4766         This undoes the most recent change, since we're now addressing the
4767         problem in a different way.
4768
4769         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
4770         into output, since the output might be called Makefile.am even
4771         if $makefile_name is something different.
4772         (func_import): Use $makefile_am rather than
4773         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
4774         empty.
4775
4776         * modules/inttypes (Files): Add m4/inttypes-h.m4.
4777
4778 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4779
4780         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
4781         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
4782         recent change to stdint.m4, since we're now addressing the problem in a
4783         different way.
4784
4785 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4786
4787         * m4/fcntl_h.m4: New file.
4788
4789 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4790
4791         * lib/fcntl_.h: New file.
4792         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
4793         the fcntl module.
4794         * lib/dirchownmod.c: Likewise.
4795         * lib/fts.c: Likewise.
4796
4797         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
4798         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
4799         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
4800         just before including <inttypes.h>, to avoid circular inclusion.
4801
4802 2006-08-28  Jim Meyering  <jim@meyering.net>
4803
4804         * doc/visibility.texi: Actually read and correct the grammar of the
4805         sentence affected by yesterday's change.
4806
4807 2006-08-28  Eric Blake  <ebb9@byu.net>
4808
4809         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
4810         needs wrapper.
4811
4812 2006-08-28  Eric Blake  <ebb9@byu.net>
4813
4814         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
4815
4816 2006-08-28  Eric Blake  <ebb9@byu.net>
4817
4818         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
4819
4820 2006-08-28  Bruno Haible  <bruno@clisp.org>
4821
4822         * modules/c-strstr: New file, from GNU gettext.
4823         * MODULES.html.sh (String handling): Add c-strstr.
4824
4825 2006-08-28  Bruno Haible  <bruno@clisp.org>
4826
4827         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
4828         macros.
4829         Reported by Eric Blake.
4830
4831 2006-08-28  Bruno Haible  <bruno@clisp.org>
4832
4833         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
4834         (VASNPRINTF): Return a string of length > INT_MAX without failing.
4835         * lib/vasprintf.c: Include errno.h, limits.h.
4836         (EOVERFLOW): New fallback definition.
4837         (vasprintf): Test here whether the string length is > INT_MAX.
4838         * lib/vsnprintf.c: Include errno.h, limits.h.
4839         (EOVERFLOW): New fallback definition.
4840         (vsnprintf): Fix bug when generated string was too long for the buffer.
4841         Test here whether the string length is > INT_MAX.
4842
4843 2006-08-28  Bruno Haible  <bruno@clisp.org>
4844
4845         * lib/inttypes_.h (SCNX*): Remove definitions.
4846         Reported by Eric Blake.
4847
4848 2006-08-28  Bruno Haible  <bruno@clisp.org>
4849
4850         * lib/c-strstr.h: New file, from GNU gettext.
4851         * lib/c-strstr.c: New file, from GNU gettext.
4852
4853 2006-08-28  Bruno Haible  <bruno@clisp.org>
4854
4855         * gnulib-tool: Reorder some statements.
4856
4857 2006-08-28  Bruno Haible  <bruno@clisp.org>
4858
4859         * gnulib-tool: New option --makefile-name.
4860         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
4861         $makefile_name.
4862         (func_import): Write $makefile_name to the cache file, and read it from
4863         there unless explicitly specified. Use $makefile_name as file name
4864         instead of Makefile.am. Adjust the recommendations accordingly.
4865
4866 2006-08-28  Bruno Haible  <bruno@clisp.org>
4867
4868         * gnulib-tool (func_verify_module): Check against misapplying patch.
4869
4870 2006-08-28  Bruno Haible  <bruno@clisp.org>
4871
4872         * gnulib-tool (func_relativize, func_relconcat): New functions.
4873         Give an error if --local-dir is given with --update.
4874         Remove trailing slashes from $local_gnulib_dir.
4875         (func_import): Store the relativized $local_gnulib_dir in
4876         gnulib-cache.m4, and read it from there if not specified explicitly.
4877
4878 2006-08-28  Bruno Haible  <bruno@clisp.org>
4879
4880         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
4881         is the current directory. Respect also $local_gnulib_dir.
4882
4883 2006-08-28  Bruno Haible  <bruno@clisp.org>
4884             Simon Josefsson  <jas@extundo.com>
4885
4886         BeOS portability.
4887         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
4888
4889 2006-08-27  Jim Meyering  <jim@meyering.net>
4890
4891         * doc/visibility.texi: Remove duplicate word: "pointer".
4892
4893 2006-08-26  Bruno Haible  <bruno@clisp.org>
4894
4895         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
4896         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
4897         (Makefile.am): Create inttypes.h from inttypes_.h.
4898         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
4899
4900         * modules/imaxabs: New file.
4901
4902         * modules/imaxdiv: New file.
4903
4904 2006-08-26  Bruno Haible  <bruno@clisp.org>
4905
4906         * m4/inttypes.m4: New file.
4907         * m4/_inttypes_h.m4: Remove file.
4908         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
4909         PRI_MACROS_BROKEN.
4910         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
4911
4912         * m4/imaxabs.m4: New file.
4913
4914         * m4/imaxdiv.m4: New file.
4915
4916 2006-08-26  Bruno Haible  <bruno@clisp.org>
4917
4918         * lib/inttypes_.h: New file.
4919         * lib/inttypes.h: Remove file.
4920         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
4921
4922         * lib/imaxabs.c: New file.
4923
4924         * lib/imaxdiv.c: New file.
4925
4926 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4927
4928         New config-h module, so that "make" output needn't be cluttered
4929         by -DHAVE_CONFIG_H.
4930         * MODULES.html.sh (Support for building libraries and executables):
4931         Add config-h.
4932         * modules/config-h: New file.
4933         * gnulib-tool (nl, sed_transform_lib_file): New vars.
4934         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
4935         the config-h module is used.
4936
4937         New configmake module, so that "make" output needn't be cluttered
4938         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
4939         * MODULES.html.sh (Support for building libraries and executables):
4940         Add configmake.
4941         * modules/configmake: New file.
4942
4943 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4944
4945         * m4/config-h.m4: New file.
4946
4947 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4948
4949         * config/srclist.txt: Add elisp-comp.
4950
4951 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4952
4953         * MODULES.html.sh (Support for building libraries and executables):
4954         Add elisp-comp.
4955         * build-aux/elisp-comp: New file.
4956         * modules/elisp-comp: New file.
4957
4958 2006-08-24  Bruno Haible  <bruno@clisp.org>
4959
4960         * gnulib-tool (func_create_testdir): Use non-default values of
4961         sourcebase and m4base.
4962
4963 2006-08-24  Bruno Haible  <bruno@clisp.org>
4964
4965         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
4966         HTML structure.
4967
4968 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
4969
4970         * modules/openat (Depends-on): Add lchown.
4971
4972 2006-08-23  Bruno Haible  <bruno@clisp.org>
4973
4974         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
4975         of gl_LOCK_EARLY instead of gl_LOCK.
4976
4977 2006-08-23  Bruno Haible  <bruno@clisp.org>
4978
4979         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
4980         on OSF/1 to no.
4981         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
4982
4983 2006-08-23  Bruno Haible  <bruno@clisp.org>
4984
4985         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
4986         as unusable.
4987
4988         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
4989         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
4990         (gl_LOCK): New macro.
4991
4992 2006-08-22  Simon Josefsson  <jas@extundo.com>
4993
4994         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
4995         to md5 module.
4996
4997 2006-08-22  Simon Josefsson  <jas@extundo.com>
4998
4999         * MODULES.html.sh: Add "Support for maintaining and release
5000         projects".
5001
5002         * build-aux/gnupload: New file, from coreutils.
5003
5004 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5005
5006         Avoid the need for AC_LIBSOURCES in m4 macros.
5007         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5008         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5009         * modules/check-version (EXTRA_DIST): Add check-version.h.
5010         * modules/crc (EXTRA_DIST): Add crc.h.
5011         * modules/des (EXTRA_DIST): Add des.h.
5012         * modules/gc (EXTRA_DIST): Add gc.h.
5013         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5014         * modules/getline (EXTRA_DIST): Add getline.h.
5015         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5016         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5017         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5018         * modules/md2 (EXTRA_DIST): Add md2.h.
5019         * modules/md4 (EXTRA_DIST): Add md4.h.
5020         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5021         * modules/read-file (EXTRA_DIST): Add read-file.h.
5022         * modules/readline (EXTRA_DIST): Add readline.h.
5023         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5024         rijndael-api-fst.h.
5025
5026 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5027
5028         * m4/rijndael.m4 (gl_ARCFOUR):
5029         * m4/arctwo.m4 (gl_ARCTWO):
5030         * m4/check-version.m4 (gl_CHECK_VERSION):
5031         * m4/crc.m4 (gl_CRC):
5032         * m4/des.m4 (gl_DES):
5033         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5034         * m4/gc.m4 (gl_GC):
5035         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5036         * m4/getline.m4 (gl_FUNC_GETLINE):
5037         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5038         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5039         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
5040         * m4/md2.m4 (gl_MD2):
5041         * m4/md4.m4 (gl_MD4):
5042         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
5043         * m4/read-file.m4 (gl_FUNC_READ_FILE):
5044         * m4/readline.m4 (gl_FUNC_READLINE):
5045         * m4/rijndael.m4 (gl_RIJNDAEL):
5046         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5047         to get the necessary .h files and whatnot.
5048
5049 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5050
5051         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
5052         gnulib rather than the other way around.
5053         * config/srclistvars.sh (COREUTILS): Remove.
5054
5055 2006-08-22  Jim Meyering  <jim@meyering.net>
5056
5057         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
5058
5059         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
5060
5061 2006-08-22  Eric Blake  <ebb9@byu.net>
5062
5063         * modules/regexprops-generic: New file.
5064         * MODULES.html.sh (Support for building documentation): List it.
5065
5066 2006-08-22  Eric Blake  <ebb9@byu.net>
5067
5068         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
5069         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
5070         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
5071         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
5072
5073 2006-08-22  Bruno Haible  <bruno@clisp.org>
5074
5075         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
5076         and lib_LTLIBRARIES like the other lib_* variables.
5077
5078 2006-08-22  Bruno Haible  <bruno@clisp.org>
5079
5080         * build-aux/x-to-1.in: New file, from GNU gettext.
5081
5082 2006-08-22  Bruno Haible  <bruno@clisp.org>
5083
5084         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
5085         <utmpx.h> exists.
5086
5087 2006-08-22  Bruno Haible  <bruno@clisp.org>
5088
5089         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
5090         <utmpx.h> exists.
5091
5092 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5093
5094         BeOS portability.
5095         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
5096         exist.
5097         Problem reported by Bruno Haible.
5098
5099 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5100
5101         Avoid the need for AC_LIBSOURCES in m4 macros.
5102         * modules/acl (EXTRA_DIST): Add acl.h.
5103         * modules/argmatch (Files): Add m4/argmatch.m4.
5104         (configure.ac): Add gl_ARGMATCH.
5105         (EXTRA_DIST): Renamed from lib_SOURCES, for
5106         consistency with the other modules.  Remove argmatch.c.
5107         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
5108         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
5109         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
5110         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
5111         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
5112         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
5113         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
5114         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
5115         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
5116         * modules/closeout (EXTRA_DIST): Add closeout.h.
5117         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
5118         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
5119         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
5120         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
5121         dirname.h; remove basename.c and stripslash.c.
5122         * modules/exclude (EXTRA_DIST): Add exclude.h.
5123         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
5124         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
5125         * modules/file-type (EXTRA_DIST): Add file-type.h.
5126         * modules/filemode (EXTRA_DIST): Add filemode.h.
5127         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
5128         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5129         * modules/fpending (EXTRA_DIST): Add __fpending.h.
5130         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
5131         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
5132         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
5133         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
5134         * modules/getdate (EXTRA_DIST): Add getdate.c.
5135         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
5136         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
5137         * modules/getpass (EXTRA_DIST): Add getpass.h.
5138         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
5139         * modules/group-member (EXTRA_DIST): Add group-member.h.
5140         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
5141         * modules/hash (EXTRA_DIST): Add hash.h.
5142         * modules/human (EXTRA_DIST): Add human.h.
5143         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
5144         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
5145         * modules/lchown (EXTRA_DIST): Add lchown.h.
5146         * modules/long-options (EXTRA_DIST): Add long-options.h.
5147         * modules/lstat (EXTRA_DIST): Add lstat.h.
5148         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
5149         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
5150         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
5151         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
5152         * modules/memxor (EXTRA_DIST): Add memxor.h.
5153         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
5154         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
5155         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
5156         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
5157         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
5158         * modules/physmem (EXTRA_DIST): Add physmem.h.
5159         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
5160         * modules/posixver (EXTRA_DIST): Add posixver.h.
5161         * modules/quote (EXTRA_DIST): Add quote.h.
5162         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
5163         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
5164         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
5165         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
5166         regex_internal.h regexec.c.
5167         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
5168         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
5169         * modules/same (EXTRA_DIST): Add same.h.
5170         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
5171         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
5172         * modules/savedir (EXTRA_DIST): Add savedir.h.
5173         * modules/sha1 (EXTRA_DIST): Add sha1.h.
5174         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
5175         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
5176         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
5177         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
5178         * modules/strdup (EXTRA_DIST): Add strdup.h.
5179         * modules/strftime (EXTRA_DIST): Add strftime.h.
5180         * modules/strndup (EXTRA_DIST): Add strndup.h.
5181         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
5182         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
5183         * modules/time_r (EXTRA_DIST): Add time_r.h.
5184         * modules/timespec (EXTRA_DIST): Add timespec.h.
5185         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5186         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
5187         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
5188         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
5189         * modules/userspec (EXTRA_DIST): Add userspec.h.
5190         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
5191         * modules/utimens (EXTRA_DIST): Add utimens.h.
5192         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
5193         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
5194         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
5195         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
5196         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
5197         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
5198         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
5199         * modules/yesno (EXTRA_DIST): Add yesno.h.
5200
5201 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5202
5203         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
5204
5205         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
5206         * m4/dev-ino.m4, same-inode.m4: Remove.
5207
5208         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
5209         * m4/acl.m4 (AC_FUNC_ACL):
5210         * m4/backupfile.m4 (gl_BACKUPFILE):
5211         * m4/c-strtod.m4 (gl_C99_STRTOLD):
5212         * m4/canon-host.m4 (gl_CANON_HOST):
5213         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5214         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
5215         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
5216         * m4/cloexec.m4 (gl_CLOEXEC):
5217         * m4/close-stream.m4 (gl_CLOSE_STREAM):
5218         * m4/closeout.m4 (gl_CLOSEOUT):
5219         * m4/dirfd.m4 (gl_FUNC_DIRFD):
5220         * m4/dirname.m4 (gl_DIRNAME):
5221         * m4/exclude.m4 (gl_EXCLUDE):
5222         * m4/exitfail.m4 (gl_EXITFAIL):
5223         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
5224         * m4/file-type.m4 (gl_FILE_TYPE):
5225         * m4/filemode.m4 (gl_FILEMODE):
5226         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
5227         * m4/fpending.m4 (gl_FUNC_FPENDING):
5228         * m4/fprintftime.m4 (gl_FPRINTFTIME):
5229         * m4/fts.m4 (gl_FUNC_FTS):
5230         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
5231         * m4/getdate.m4 (gl_GETDATE):
5232         * m4/gethrxtime.m4 (gl_GETHRXTIME):
5233         * m4/getpagesize.m4 (gl_GETPAGESIZE):
5234         * m4/getpass.m4 (gl_FUNC_GETPASS):
5235         * m4/gettime.m4 (gl_GETTIME):
5236         * m4/getugroups.m4 (gl_GETUGROUPS):
5237         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
5238         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
5239         * m4/hard-locale.m4 (gl_HARD_LOCALE):
5240         * m4/hash.m4 (gl_HASH):
5241         * m4/idcache.m4 (gl_IDCACHE):
5242         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
5243         * m4/lchown.m4 (gl_FUNC_LCHOWN):
5244         * m4/long-options.m4 (gl_LONG_OPTIONS):
5245         * m4/lstat.m4 (gl_FUNC_LSTAT):
5246         * m4/md5.m4 (gl_MD5):
5247         * m4/memcasecmp.m4 (gl_MEMCASECMP):
5248         * m4/memcoll.m4 (gl_MEMCOLL):
5249         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
5250         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
5251         * m4/memxor.m4 (gl_MEMXOR):
5252         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
5253         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
5254         * m4/modechange.m4 (gl_MODECHANGE):
5255         * m4/mountlist.m4 (gl_MOUNTLIST):
5256         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5257         * m4/openat.m4 (gl_FUNC_OPENAT):
5258         * m4/pathmax.m4 (gl_PATHMAX):
5259         * m4/physmem.m4 (gl_PHYSMEM):
5260         * m4/posixtm.m4 (gl_POSIXTM):
5261         * m4/posixver.m4 (gl_POSIXVER):
5262         * m4/quote.m4 (gl_QUOTE):
5263         * m4/quotearg.m4 (gl_QUOTEARG):
5264         * m4/readtokens.m4 (gl_READTOKENS):
5265         * m4/readutmp.m4 (gl_READUTMP):
5266         * m4/regex.m4 (gl_REGEX):
5267         * m4/safe-read.m4 (gl_SAFE_READ):
5268         * m4/safe-write.m4 (gl_SAFE_WRITE):
5269         * m4/same.m4 (gl_SAME):
5270         * m4/save-cwd.m4 (gl_SAVE_CWD):
5271         * m4/savedir.m4 (gl_SAVEDIR):
5272         * m4/settime.m4 (gl_SETTIME):
5273         * m4/sha1.m4 (gl_SHA1):
5274         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5275         * m4/stat-macros.m4 (gl_STAT_MACROS):
5276         * m4/stat-time.m4 (gl_STAT_TIME):
5277         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5278         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5279         * m4/strdup.m4 (gl_FUNC_STRDUP):
5280         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5281         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5282         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5283         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5284         * m4/time_r.m4 (gl_TIME_R):
5285         * m4/timespec.m4 (gl_TIMESPEC):
5286         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5287         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5288         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5289         * m4/userspec.m4 (gl_USERSPEC):
5290         * m4/utimecmp.m4 (gl_UTIMECMP):
5291         * m4/utimens.m4 (gl_UTIMENS):
5292         * m4/xalloc.m4 (gl_XALLOC):
5293         * m4/xgetcwd.m4 (gl_XGETCWD):
5294         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5295         * m4/xreadlink.m4 (gl_XREADLINK):
5296         * m4/xstrtod.m4 (gl_XSTRTOD):
5297         * m4/yesno.m4 (gl_YESNO):
5298         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5299         to get the necessary .h files and whatnot.
5300
5301 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5302             Bruno Haible  <bruno@clisp.org>
5303
5304         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5305         /bin/sh understanding of '!' conditional negation.
5306
5307 2006-08-21  Jim Meyering  <jim@meyering.net>
5308
5309         * modules/openat (Depends-on): Really alphabetize.
5310
5311         * modules/acl (Depends-on): Add error and quote.
5312
5313         * check-module (find_included_lib_files): Add at-func.c to the
5314         ok-to-include-more-than-once white list.
5315
5316         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5317
5318 2006-08-21  Bruno Haible  <bruno@clisp.org>
5319
5320         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5321         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5322         Reported by Martin Lambers <marlam@marlam.de>.
5323
5324 2006-08-21  Bruno Haible  <bruno@clisp.org>
5325
5326         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5327         specify an installation location, don't emit a noinst_LIBRARIES or
5328         noinst_LTLIBRARIES assignment.
5329
5330 2006-08-21  Bruno Haible  <bruno@clisp.org>
5331
5332         BeOS portability.
5333         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5334         BeOS has mbrtowc() but no <wctype.h>.
5335
5336 2006-08-21  Bruno Haible  <bruno@clisp.org>
5337
5338         BeOS portability.
5339         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5340         exist.
5341
5342 2006-08-21  Bruno Haible  <bruno@clisp.org>
5343
5344         BeOS portability.
5345         * lib/mbchar.h: Include <wctype.h> only if it exists.
5346
5347 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5348
5349         Remove files that are no longer needed by their respective modules.
5350         * m4/obstack.m4: Remove.
5351         * m4/strerror_r.m4: Remove.
5352         * m4/uint32_t.m4: Remove.
5353         * m4/uintptr_t.m4: Remove.
5354         * m4/ullong_max.m4: Remove.
5355         * m4/xstrtoimax.m4: Remove.
5356         * m4/xstrtoumax.m4: Remove.
5357
5358         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5359         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5360         dependencies now capture this.
5361
5362         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5363         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5364         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5365         * m4/human.m4 (gl_HUMAN): Likewise.
5366         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5367         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5368
5369         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5370
5371         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5372         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5373         stdint.
5374         * m4/human.m4 (gl_HUMAN): Likewise.
5375         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5376         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5377         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5378         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5379         * m4/xstrtol (gl_XSTRTOL): Likewise.
5380
5381         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5382         AC_TYPE_LONG_LONG_INT.
5383         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5384         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5385         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5386         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5387
5388         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5389         on stdbool.
5390
5391         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5392         (gl_PREREQ_XSTRTOUL): Remove.
5393
5394         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5395
5396         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5397         mode.
5398
5399 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5400
5401         Add and change modules to make it easier for coreutils to use
5402         gnulib-tool.
5403         * modules/backupfile (Files): Remove m4/d-ino.m4.
5404         (Depends-on): Add d-ino.
5405         * modules/cycle-check (Depends-on): Add stdint.
5406         (lib_SOURCES): Add cycle-check.h.
5407         * modules/d-ino: New module.
5408         * modules/d-type: New module.
5409         * modules/error (Files): Remove m4/strerror_r.m4.
5410         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5411         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5412         m4/inttypes_h.m4, m4/uintmax_t.m4.
5413         (Depends-on): Add stdint.
5414         (lib_SOURCES): Add fsusage.h.
5415         * modules/getcwd (Files): Remove d-ino.m4.
5416         (Depends-on): Add d-ino.
5417         * modules/getndelim2 (Depends-on): Add stdint.
5418         * modules/glob (Files): Remove m4/d-type.m4.
5419         (Depends-on): Add d-type.
5420         * modules/host-os: New module.
5421         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5422         m4/inttypes_h.m4, m4/uintmax_t.m4.
5423         * Depends-on: Add stdint.
5424         (lib_SOURCES): Add human.h.
5425         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5426         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5427         m4/uintmax_t.m4, m4/ulonglong.m4.
5428         (Depends-on): Add stdint.
5429         (EXTRA_DIST): Add inttostr.h.
5430         * modules/lchmod: New module.
5431         * modules/link-follow: New module.
5432         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5433         (Depends-on): Add lchmod.
5434         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5435         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5436         (Depends-on): Add stdint.
5437         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
5438         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5439         (Depends-on): Add stdint.
5440         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
5441         * modules/perl: New module.
5442         * modules/regex (Depends-on): Add stdint.
5443         * modules/rmdir-errno: New module.
5444         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5445         m4/intmax_t.m4.
5446         (Depends-on): Add stdint.
5447         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5448         m4/uintmax_t.m4.
5449         (Depends-on): Add stdint.
5450         * modules/unlink-busy: New module.
5451         * modules/utimecmp (Depends-on): Add stdint.
5452         * modules/uptime: New module.
5453         * modules/winsz-ioctl: New module.
5454         * modules/winsz-termios: New module.
5455         * modules/xnanosleep (Depends-on): Add nanosleep.
5456         * modules/ullong_max: Remove.
5457         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
5458         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
5459         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
5460         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
5461         (Depends-on): Add inttypes.
5462         (lib_SOURCES): Add xstrtol.h.
5463         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
5464         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
5465         * MODULES.html.sh: Move 'assert' into the assert section.
5466         Move 'dummy' into the linking section.
5467         Remove ullong_max.
5468         Add section for compatibility checks for POSIX:2001 functions,
5469         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
5470         winsz-ioctl, and winsz-termios into it.
5471         Add lchmod.
5472         Add top-level Misc section and put host-os, perl, and uptime
5473         into it.
5474
5475 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5476
5477         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
5478         now assume the stdint module.  Do not include inttypes.h.
5479         * lib/fsusage.h: Likewise.
5480         * lib/getndelim2.c: Likewise.
5481         * lib/human.h: Likewise.
5482         * lib/inttostr.h: Likewise.
5483         * lib/obstack.c: Likewise.
5484         * lib/regex_internal.h: Likewise.
5485         * lib/tempname.c: Likewise.
5486         * lib/utimecmp.c: Likewise.
5487         * lib/xstrtol.h: Likewise.
5488
5489         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5490
5491         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5492         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5493         * lib/xtime.h: Likewise.
5494
5495 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5496
5497         * modules/openat (Files): Add lib/fchmodat.c.
5498         Fixes problem reported by Jay Youngman.
5499
5500 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5501
5502         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5503         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5504
5505 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5506             Bruno Haible  <bruno@clisp.org>
5507
5508         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5509         and is a script that invokes bison. Tighten the code. Add comments.
5510
5511 2006-08-18  Jim Meyering  <jim@meyering.net>
5512
5513         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5514         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5515         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5516         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5517
5518 2006-08-18  Bruno Haible  <bruno@clisp.org>
5519
5520         * modules/bison-i18n: New file.
5521         * MODULES.html.sh (Internationalization functions): Add it.
5522
5523 2006-08-18  Bruno Haible  <bruno@clisp.org>
5524
5525         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5526         sys/statvfs.h. When getmntinfo was found, check its declaration and
5527         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5528
5529 2006-08-18  Bruno Haible  <bruno@clisp.org>
5530
5531         * m4/bison-i18n.m4: New file, from bison.
5532
5533 2006-08-18  Bruno Haible  <bruno@clisp.org>
5534
5535         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5536         (ME_DUMMY): Treat "kernfs" as a dummy.
5537         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5538
5539 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5540
5541         Update from coreutils.
5542
5543         2006-08-15  Jim Meyering  <jim@meyering.net>
5544
5545         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5546
5547         2006-01-17  Jim Meyering  <jim@meyering.net>
5548
5549         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5550
5551         2006-01-11  Jim Meyering  <jim@meyering.net>
5552
5553         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5554         Check for the lchmod function.
5555
5556 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5557
5558         Update from coreutils.
5559
5560         * lib/__fpending.h: Add copyright notice.
5561         * lib/fprintftime.h: Likewise.
5562         * lib/savedir.c: Use (C) in copyright notice.
5563         * lib/savedir.h: Likewise.
5564
5565         2006-08-15  Jim Meyering  <jim@meyering.net>
5566
5567         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5568         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5569         in support of the EXPECTED_ERRNO macro.
5570         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5571         definitions.  Instead, define the appropriate symbols and include
5572         "at-func.c".
5573         * lib/mkdirat.c (mkdirat): Likewise.
5574         * lib/fchmodat.c (fchmodat): Likewise.
5575         (ENOSYS): Remove definition.
5576         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5577         it.  Don't include "unistd--.h" -- it wasn't ever used.
5578
5579         2006-01-17  Jim Meyering  <jim@meyering.net>
5580
5581         Rewrite fts.c not to change the current working directory,
5582         by using openat, fstatat, fdopendir, etc..
5583
5584         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5585         (HAVE_OPENAT_SUPPORT): Define.
5586         [_LIBC] (fchdir): Don't undef or define; no longer used.
5587         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5588         Now, this `function' always succeeds, and consumes its file descriptor
5589         parameter -- so callers must not close such FDs.  Update callers.
5590         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5591         (diropen): Add parameter, SP.  Adjust all callers.
5592         Implement using diropen_fd, rather than open.
5593         (fts_open): Initialize new member, fts_cwd_fd.
5594         Remove fts_rft-setting code.
5595         (fts_close): Close fts_cwd_fd, if necessary.
5596         (__opendir2): Define in terms of opendir or opendirat,
5597         depending on whether the FST_NOCHDIR flag is set.
5598         (fts_build): Since fts_safe_changedir consumes its FD, and since
5599         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5600         and close the dup'd file descriptor upon failure.
5601         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5602         (fts_safe_changedir): Tweak semantics to reflect that this function
5603         now calls cwd_advance_fd and hence consumes its FD argument.
5604         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5605         [struct FTS] (fts_rft): Remove now-unused member.
5606         [struct FTS] (fts_cycle.state): Improve comment.
5607
5608         * lib/openat.c (openat_needs_fchdir): New function.
5609         * lib/openat.h (openat_needs_fchdir): Declare it.
5610
5611 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5612
5613         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5614         Problem and fix reported by Pádraig Brady in
5615         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5616
5617 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5618
5619         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5620
5621 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5622
5623         * lib/memcoll.c (memcoll): Optimize for the common case where the
5624         arguments are bytewise equal.
5625
5626 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5627
5628         * doc/regexprops-generic.texi: Add a copyright notice.
5629
5630 2006-08-15  Bruno Haible  <bruno@clisp.org>
5631
5632         * modules/tmpdir (License): Change to LGPL.
5633
5634 2006-08-15  Bruno Haible  <bruno@clisp.org>
5635
5636         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5637         module.
5638
5639 2006-08-14  Simon Josefsson  <jas@extundo.com>
5640
5641         * config/srclist.txt: Add gnupload.
5642
5643 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5644
5645         Change copyright notice from LGPL 2 to GPL 2, since that's the
5646         standard form used in the gnulib repository.
5647         * tests/test-lock.c: Likewise.
5648         * tests/test-stdint.c: Likewise.
5649         * tests/test-tls.c: Likewise.
5650
5651         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5652         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5653         Add copyright notice.
5654
5655         * check-module: Add copyright notice.  Output a copyright
5656         notice if "--version" is specified.
5657         * modules/COPYING: New file.
5658         * tests/test-getaddrinfo.c: Add copyright notice.
5659         * tests/test-verify.c: Likewise.
5660
5661 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5662
5663         Change copyright notice from LGPL 2 to GPL 2, since that's the
5664         standard form used in the gnulib repository.
5665         * lib/lock.c: LGPL -> GPL.
5666         * lib/lock.h: Likewise.
5667         * lib/strnlen1.c: Likewise.
5668         * lib/strnlen1.h: Likewise.
5669         * lib/tls.c: Likewise.
5670         * lib/tls.h: Likewise.
5671         * lib/tmpdir.c: Likewise.
5672
5673         * lib/TODO: Remove; this belongs only in coreutils.
5674
5675 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5676
5677         Add copyright notices to long-enough files that lack them, since
5678         otherwise the files aren't clearly free.  Use the same notice that
5679         getdate.texi already uses.
5680         * doc/alloca-opt.texi: Add copyright notice.
5681         * doc/alloca.texi: Likewise.
5682         * doc/ctime.texi: Likewise.
5683         * doc/functions.texi: Likewise.
5684         * doc/gcd.texi: Likewise.
5685         * doc/gnulib-tool.texi: Likewise.
5686         * doc/inet_ntoa.texi: Likewise.
5687         * doc/visibility.texi: Likewise.
5688
5689         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5690         * doc/quote.texi: Add copyright notice.
5691
5692         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5693         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5694         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5695         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5696         is now obsolete, and give a pointer to the Sun list.
5697         Add copyright notice.
5698
5699 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5700
5701         * config/srclistvars.sh: Add copyright notice.
5702
5703 2006-08-14  Eric Blake  <ebb9@byu.net>
5704
5705         Import the following change from libc:
5706
5707         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5708
5709         Upstream bug 2997.
5710         * lib/misc/error.c: Add space between program name and message if file
5711         name is missing.
5712
5713 2006-08-12  Karl Berry  <karl@gnu.org>
5714
5715         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5716         remove, these originate in gnulib now.
5717
5718 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5719
5720         * doc/Makefile (standards.info standards.html standards.dvi):
5721         Also depend on make-stds.texi.
5722
5723 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5724
5725         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5726         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5727
5728         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5729         in wchar_t.  Problem reported by Eric Blake.
5730
5731         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5732         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5733         Also, help the compiler to keep LEN in a register.
5734
5735 2006-08-11  Eric Blake  <ebb9@byu.net>
5736
5737         * users.txt: Sort.  Add tar.
5738
5739 2006-08-11  Bruno Haible  <bruno@clisp.org>
5740
5741         * users.txt: New file.
5742
5743 2006-08-11  Bruno Haible  <bruno@clisp.org>
5744
5745         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5746         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5747
5748 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5749
5750         * modules/snprintf (Depends-on): Remove minmax.
5751         (Maintainer): Add self and Bruno.
5752
5753 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5754
5755         * lib/.cppi-disable: Add snprintf.h, socket_.h.
5756         * lib/snprintf.c: Include <errno.h> and <limits.h>.
5757         (EOVERFLOW): Define if the system does not.
5758         Do not include "minmax.h"; it wasn't used.
5759         (snprintf): Don't assume size_t promotes to an unsigned type.
5760         Fix bug when generated string was too long for the buffer: the
5761         buffer's contents are supposed to be the initial prefix of the
5762         output.  Don't assume vasnprintf returns EOVERFLOW if the size
5763         exceeds INT_MAX; do the check ourselves.
5764
5765         Import the following changes from libc:
5766
5767         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
5768
5769         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
5770         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
5771         set wc to the byte which couldn't be converted.
5772         (re_string_reconstruct): Don't clear valid_raw_len before calling
5773         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
5774         tip_context using re_string_context_at.
5775
5776         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
5777
5778         * lib/posix/regex.h: g++ still cannot handled [restrict].
5779
5780         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
5781
5782         * lib/posix/regex.h: Remove special handling for VMS.
5783
5784 2006-08-10  Jim Meyering  <jim@meyering.net>
5785
5786         * modules/same-inode: New module.
5787         * modules/dev-ino: New module.
5788         * modules/cycle-check: Depend on these modules, rather than simply
5789         including their .h files.
5790         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
5791         required via m4/cycle-check.m4.
5792         * modules/same: Depend on new same-inode module, rather than
5793         including same-inode.h.
5794         * modules/chdir-safer: New file.
5795
5796         * modules/chown (Depends-on): Add stat-macros.
5797
5798 2006-08-10  Jim Meyering  <jim@meyering.net>
5799
5800         * m4/cycle-check.m4: New file.
5801         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
5802         * m4/dev-ino.m4, m4/same-inode.m4: New files.
5803
5804 2006-08-10  Eric Blake  <ebb9@byu.net>
5805
5806         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
5807         in from original proposal.
5808
5809 2006-08-10  Eric Blake  <ebb9@byu.net>
5810         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5811
5812         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
5813         namespace.
5814
5815 2006-08-10  Bruno Haible  <bruno@clisp.org>
5816
5817         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
5818         as well.
5819
5820 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5821
5822         Sync from coreutils.
5823
5824         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
5825
5826         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
5827         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
5828
5829 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5830
5831         * modules/restrict: Remove; no longer needed now that we assume
5832         Autoconf 2.59 or later.
5833         * MODULES.html.sh: Remove 'restrict'.
5834         * modules/argp (Depends-on): Remove 'restrict'.
5835         * modules/base64 (Depends-on): Likewise.
5836         * modules/gc (Depends-on): Likewise.
5837         * modules/getaddrinfo (Depends-on): Likewise.
5838         * modules/glob (Depends-on): Likewise.
5839         * modules/inet_ntop (Depends-on): Likewise.
5840         * modules/inet_pton (Depends-on): Likewise.
5841         * modules/memxor (Depends-on): Likewise.
5842         * modules/regex (Depends-on): Likewise.
5843         * modules/strtok_r (Depends-on): Likewise.
5844         * modules/time_r (Depends-on): Likewise.
5845
5846 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5847
5848         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
5849         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
5850         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5851         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
5852         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
5853         * m4/memxor.m4 (gl_MEMXOR): Likewise.
5854         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
5855         gl_C_RESTRICT replaced by AC_C_RESTRICT.
5856
5857         Merge from coreutils.
5858         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
5859         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
5860         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5861         * m4/time_r.m4 (gl_TIME_R): Likewise.
5862
5863 2006-08-09  Karl Berry  <karl@gnu.org>
5864
5865         * config/srclist.txt: no more gettext-tools, per Bruno.
5866
5867 2006-08-08  Eric Blake  <ebb9@byu.net>
5868
5869         * modules/verror: New module.
5870         * MODULES.html.sh: Document it.
5871
5872 2006-08-08  Eric Blake  <ebb9@byu.net>
5873
5874         * lib/verror.h, lib/verror.c: New files.
5875
5876 2006-08-08  Eric Blake  <ebb9@byu.net>
5877
5878         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
5879         verror_at_line output complies with GNU Coding Standards even when
5880         file is NULL.
5881
5882 2006-08-07  Bruno Haible  <bruno@clisp.org>
5883
5884         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
5885         versions of AIX.
5886         Reported by Ralf Wildenhues.
5887
5888 2006-08-07  Bruno Haible  <bruno@clisp.org>
5889
5890         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
5891         in an AC_DEFUN. Needed so that the autoconf snippets can use
5892         AC_REQUIRE.
5893
5894 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5895
5896         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5897         Initialize pkgdata_DATA.
5898         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
5899         overriding it.
5900
5901 2006-08-06  Eric Blake  <ebb9@byu.net>
5902
5903         * lib/error.h: Fold in some upstream changes from glibc.
5904         * lib/error.c: Likewise.
5905
5906 2006-08-04  Bruno Haible  <bruno@clisp.org>
5907
5908         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5909         Make the mostlyclean-local rule depend on mostlyclean-generic.
5910         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
5911
5912 2006-07-31  Bruno Haible  <bruno@clisp.org>
5913
5914         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
5915         <stdlib.h>, <string.h>.
5916
5917 2006-07-30  Bruno Haible  <bruno@clisp.org>
5918
5919         * modules/readlink (License): Change to LGPL.
5920
5921 2006-07-30  Bruno Haible  <bruno@clisp.org>
5922
5923         * modules/javaversion (Makefile.am): Distribute javaversion.java and
5924         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
5925         set PKGDATADIR to point to it.
5926
5927 2006-07-30  Bruno Haible  <bruno@clisp.org>
5928
5929         * modules/csharpexec (configure.ac): Comment out macro invocation.
5930         * modules/javaexec (configure.ac): Likewise.
5931         * modules/javacomp-script (configure.ac): Likewise.
5932
5933         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
5934
5935 2006-07-30  Bruno Haible  <bruno@clisp.org>
5936
5937         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
5938         linked-list.
5939
5940 2006-07-30  Bruno Haible  <bruno@clisp.org>
5941
5942         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
5943
5944 2006-07-30  Bruno Haible  <bruno@clisp.org>
5945
5946         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5947         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
5948         get removed.
5949
5950 2006-07-29  Bruno Haible  <bruno@clisp.org>
5951
5952         Make it possible for gnulib-tool to work with locally modified or
5953         augmented gnulib repositories.
5954         * gnulib-tool (func_usage): Document --local-dir option.
5955         (local_gnulib_dir): New variable.
5956         Handle --local-dir option.
5957         (func_lookup_file): New function.
5958         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
5959         (func_get_description, func_get_filelist, func_get_description,
5960         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
5961         func_get_automake_snippet, func_get_include_directive,
5962         func_get_license, func_get_maintainer): Use func_lookup_file.
5963         (func_import, func_create_testdir): Use func_lookup_file.
5964
5965 2006-07-29  Bruno Haible  <bruno@clisp.org>
5966
5967         * modules/setenv (Depends-on): Add unistd.
5968
5969 2006-07-29  Bruno Haible  <bruno@clisp.org>
5970
5971         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
5972
5973 2006-07-29  Bruno Haible  <bruno@clisp.org>
5974
5975         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
5976
5977 2006-07-29  Bruno Haible  <bruno@clisp.org>
5978
5979         * gnulib-tool (import, update): If there is no Makefile.am, look at
5980         aclocal.m4, instead of bailing out.
5981
5982 2006-07-29  Bruno Haible  <bruno@clisp.org>
5983
5984         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
5985         Categorize the options by when they are useful.
5986
5987 2006-07-29  Bruno Haible  <bruno@clisp.org>
5988
5989         * gnulib-tool (func_usage): Document option --no-libtool.
5990         Handle option --no-libtool.
5991         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
5992         for changed semantics of $libtool variable.
5993         (func_import): Likewise. If libtool is not used, show this through
5994         an option --no-libtool.
5995         (func_create_testdir): Update.
5996
5997 2006-07-29  Bruno Haible  <bruno@clisp.org>
5998
5999         * gnulib-tool (func_import): Extend error message about missing
6000         --doc-base.
6001
6002 2006-07-29  Bruno Haible  <bruno@clisp.org>
6003
6004         * gnulib-tool (func_import): Don't create the $docbase directory if
6005         there is no file to store there.
6006
6007 2006-07-29  Bruno Haible  <bruno@clisp.org>
6008
6009         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6010         relevant, look for configure.ac there, not in the current directory.
6011         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6012
6013 2006-07-29  Bruno Haible  <bruno@clisp.org>
6014
6015         * gnulib-tool (SORT): New variable.
6016         (func_usage): Undocument --assume-autoconf option.
6017         Remove --assume-autoconf option handling.
6018         (autoconf_minversion): Determine from the contents of configure.ac.
6019         (func_import): Remove autoconf_minversion handling.
6020         Suggested by Eric Blake.
6021
6022 2006-07-29  Bruno Haible  <bruno@clisp.org>
6023
6024         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6025
6026 2006-07-29  Bruno Haible  <bruno@clisp.org>
6027
6028         * config/srclist.txt (*setenv.[ch]): Remove rules.
6029
6030 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6031
6032         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6033
6034 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6035
6036         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6037         arpa/inet.h.
6038
6039 2006-07-28  Simon Josefsson  <jas@extundo.com>
6040
6041         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
6042         * modules/inet_pton (Depends-on): Likewise.
6043
6044 2006-07-28  Simon Josefsson  <jas@extundo.com>
6045
6046         * m4/netinet_in_h.m4: New file.
6047
6048 2006-07-28  Simon Josefsson  <jas@extundo.com>
6049
6050         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
6051         #include's.
6052
6053 2006-07-28  Simon Josefsson  <jas@extundo.com>
6054
6055         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
6056         #include's.
6057
6058 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
6059
6060         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
6061         setgid on directories only if they set these bits.
6062         * lib/modechange.h: Remove obsolete comment about masks.
6063
6064 2006-07-28  Eric Blake  <ebb9@byu.net>
6065
6066         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6067         macro expansion.
6068
6069 2006-07-28  Bruno Haible  <bruno@clisp.org>
6070
6071         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
6072
6073 2006-07-28  Bruno Haible  <bruno@clisp.org>
6074
6075         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
6076
6077 2006-07-28  Bruno Haible  <bruno@clisp.org>
6078
6079         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
6080         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
6081         Define fallbacks.
6082         Avoids link error on FreeBSD 4.x.
6083         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
6084
6085         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
6086         encoding.
6087         * lib/mbswidth.c (iswcntrl): Likewise.
6088
6089 2006-07-27  Bruno Haible  <bruno@clisp.org>
6090
6091         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
6092         test.
6093
6094 2006-07-27  Bruno Haible  <bruno@clisp.org>
6095
6096         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
6097         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
6098         defined.
6099
6100 2006-07-26  Eric Blake  <ebb9@byu.net>
6101
6102         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
6103
6104 2006-07-26  Eric Blake  <ebb9@byu.net>
6105
6106         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
6107         like mingw that lack mkstemp.
6108         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
6109         avoid compilation warning on mingw.
6110
6111 2006-07-26  Bruno Haible  <bruno@clisp.org>
6112
6113         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
6114         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
6115         INT_FAST*_MIN, INTPTR_MIN.
6116
6117 2006-07-25  Bruno Haible  <bruno@clisp.org>
6118
6119         * modules/version-etc (Depends-on): Add stdarg.
6120
6121 2006-07-25  Bruno Haible  <bruno@clisp.org>
6122
6123         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
6124         complex commands.
6125
6126 2006-07-25  Bruno Haible  <bruno@clisp.org>
6127
6128         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
6129         defined in <stdarg.h> or config.h.
6130
6131 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6132
6133         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
6134         (gl_STDIO_SAFER): Remove.
6135
6136 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6137
6138         * MODULES.html.sh (File stream based Input/Output):
6139         Add fopen-safer, tmpfile-safer; remove stdio-safer.
6140         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
6141         * modules/fopen-safer, modules/tmpfile-safer: New files.
6142         * modules/stdio-safer: Remove.
6143
6144 2006-07-24  Bruno Haible  <bruno@clisp.org>
6145
6146         * modules/tmpdir: New file.
6147         * MODULES.html.sh (File system functions): Add it.
6148
6149 2006-07-24  Bruno Haible  <bruno@clisp.org>
6150
6151         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
6152         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
6153
6154 2006-07-24  Bruno Haible  <bruno@clisp.org>
6155
6156         * modules/clean-temp: New file.
6157
6158 2006-07-24  Bruno Haible  <bruno@clisp.org>
6159
6160         * m4/tmpdir.m4: New file, from GNU gettext.
6161
6162 2006-07-24  Bruno Haible  <bruno@clisp.org>
6163
6164         * lib/tmpdir.h: New file, from GNU gettext.
6165         * lib/tmpdir.c: New file, from GNU gettext.
6166
6167 2006-07-24  Bruno Haible  <bruno@clisp.org>
6168
6169         * lib/clean-temp.h: New file, from GNU gettext.
6170         * lib/clean-temp.c: New file, from GNU gettext.
6171
6172 2006-07-23  Eric Blake  <ebb9@byu.net>
6173
6174         * modules/stdio-safer (Files): Add tmpfile-safer.c.
6175         (Depends-on): Add binary-io.
6176
6177 2006-07-23  Eric Blake  <ebb9@byu.net>
6178
6179         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
6180
6181 2006-07-23  Eric Blake  <ebb9@byu.net>
6182
6183         * lib/tmpfile-safer.c: New file.
6184         * lib/stdio-safer.h (fopen_safer): Add prototype.
6185         * lib/stdio--.h (tmpfile): Make safer.
6186
6187 2006-07-23  Bruno Haible  <bruno@clisp.org>
6188
6189         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
6190         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
6191         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
6192         gl_linked_remove_at): Use it.
6193
6194 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6195         and Simon Josefsson <jas@extundo.com>
6196
6197         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
6198
6199         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
6200
6201 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6202
6203         * modules/close-stream: New file.
6204         * modules/closeout (Description): Make it clear that it exits
6205         with a diagnostic on error.
6206         (Depends-on): Add close-stream.  Remove fpending, stdbool.
6207         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
6208
6209 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6210
6211         * m4/close-stream.m4: New file.
6212
6213 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6214
6215         * lib/close-stream.c, lib/close-stream.h: New files.
6216
6217 2006-07-22  Bruno Haible  <bruno@clisp.org>
6218
6219         Merge from GNU gettext 0.15.
6220
6221         2006-05-01  Bruno Haible  <bruno@clisp.org>
6222
6223                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
6224
6225         2006-07-22  Bruno Haible  <bruno@clisp.org>
6226
6227                 * modules/javaversion: New file.
6228                 * MODULES.html.sh (Java): Add javaversion.
6229
6230         2006-03-12  Bruno Haible  <bruno@clisp.org>
6231
6232                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
6233
6234         2005-12-04  Bruno Haible  <bruno@clisp.org>
6235
6236                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
6237                 (untested).
6238
6239         2006-06-21  Bruno Haible  <bruno@clisp.org>
6240
6241                 Avoid warnings from recent versions of mcs.
6242                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
6243                 -o, -L, -r any more. Use options documented since mcs-1.0
6244                 instead. Similarly for -g.
6245
6246         2005-12-04  Bruno Haible  <bruno@clisp.org>
6247
6248                 * build-aux/csharpcomp.sh.in: Suffix for resources is
6249                 .resources, not .resource.
6250
6251         2005-07-09  Bruno Haible  <bruno@clisp.org>
6252
6253                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
6254                 add a .dll suffix.
6255                 Reported by Mark Junker <mjscod@gmx.de>.
6256
6257         2006-07-22  Bruno Haible  <bruno@clisp.org>
6258
6259                 * modules/gettext: Upgrade to gettext-0.15.
6260                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
6261                 m4/visibility.m4.
6262                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
6263
6264 2006-07-22  Bruno Haible  <bruno@clisp.org>
6265
6266         Merge from GNU gettext 0.15.
6267
6268         2006-03-25  Bruno Haible  <bruno@clisp.org>
6269
6270                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
6271
6272         2006-07-21  Bruno Haible  <bruno@clisp.org>
6273
6274                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6275                 "1.1".
6276
6277         2006-05-09  Bruno Haible  <bruno@clisp.org>
6278
6279                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6280                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6281                 for the conftestver execution.
6282
6283         2006-05-01  Bruno Haible  <bruno@clisp.org>
6284
6285                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6286                 optional target-version argument. Verify that the compiler
6287                 groks source of the specified source-version, or add -source
6288                 option as necessary. Verify that the compiler produces
6289                 bytecode in the specified target-version, or add -target and
6290                 -source options as necessary. Make the result of the test
6291                 available as variable CONF_JAVAC. Also log error output in
6292                 config.log.
6293
6294         2006-03-11  Bruno Haible  <bruno@clisp.org>
6295
6296                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6297
6298         2006-05-09  Bruno Haible  <bruno@clisp.org>
6299
6300                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6301                 CLASSPATH_SEPARATOR to a semicolon.
6302
6303         2006-03-12  Bruno Haible  <bruno@clisp.org>
6304
6305                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6306                 available as variable CONF_JAVA, for subsequent autoconf
6307                 tests. Also log error output in config.log.
6308
6309         2006-07-19  Bruno Haible  <bruno@clisp.org>
6310
6311                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6312                 that getline works on glibc2 systems. Needed to avoid trouble
6313                 in relocatable.c.
6314                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6315
6316         2005-12-04  Bruno Haible  <bruno@clisp.org>
6317
6318                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6319                 launcher (untested).
6320
6321         2005-12-04  Bruno Haible  <bruno@clisp.org>
6322
6323                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6324
6325         2006-07-22  Bruno Haible  <bruno@clisp.org>
6326
6327                 * gettext.m4: Update from GNU gettext-0.15.
6328                 * nls.m4: Likewise.
6329                 * po.m4: Likewise.
6330                 * inttypes-pri.m4: Likewise.
6331                 * inttypes-h.m4: Renamed from inttypes.m4.
6332                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6333
6334 2006-07-22  Bruno Haible  <bruno@clisp.org>
6335
6336         Merge from GNU gettext 0.15.
6337
6338         2005-07-05  Bruno Haible  <bruno@clisp.org>
6339
6340                 * printf-args.c (printf_fetchargs): Work around broken
6341                 definition of wint_t on mingw.
6342
6343         2005-02-12  Bruno Haible  <bruno@clisp.org>
6344
6345                 * xallocsa.h: Add extern "C" for C++.
6346
6347         2006-05-17  Bruno Haible  <bruno@clisp.org>
6348
6349                 Cygwin portability.
6350                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6351
6352         2006-04-30  Bruno Haible  <bruno@clisp.org>
6353
6354                 * progreloc.c: Include <mach-o/dyld.h> if available.
6355                 (find_executable): Use _NSGetExecutablePath when possible.
6356
6357         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6358
6359                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6360                 function.
6361
6362         2005-12-29  Bruno Haible  <bruno@clisp.org>
6363
6364                 * progreloc.c (set_program_name_and_installdir): Fix
6365                 compilation error.
6366
6367         2005-12-04  Bruno Haible  <bruno@clisp.org>
6368
6369                 Cygwin portability.
6370                 * progreloc.c: Include <windows.h> also on Cygwin.
6371                 (find_executable): Add support for Cygwin.
6372                 (set_program_name_and_installdir): Handle also platforms with
6373                 nonempty EXEEXT.
6374
6375         2006-07-11  Bruno Haible  <bruno@clisp.org>
6376
6377                 * javacomp.c: Fix a comment.
6378                 Reported by Jim Meyering.
6379
6380         2006-04-30  Bruno Haible  <bruno@clisp.org>
6381
6382                 * javacomp.h (compile_java_class): Add source_version,
6383                 target_version arguments.
6384                 * javacomp.c: Rewritten to choose only a compiler that
6385                 respects the specified source_version and target_version.
6386
6387         2006-06-27  Bruno Haible  <bruno@clisp.org>
6388
6389                 Assume correct S_ISDIR macro.
6390                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6391
6392         2006-07-22  Bruno Haible  <bruno@clisp.org>
6393
6394                 * javaversion.h: New file, from GNU gettext.
6395                 * javaversion.c: New file, from GNU gettext.
6396                 * javaversion.java: New file, from GNU gettext.
6397                 * javaversion.class: New file, from GNU gettext.
6398
6399         2006-05-17  Bruno Haible  <bruno@clisp.org>
6400
6401                 Cygwin portability.
6402                 * javaexec.c (execute_java_class): Test for jview program
6403                 also on Cygwin.
6404
6405         2006-04-09  Bruno Haible  <bruno@clisp.org>
6406
6407                 * fatal-signal.c: Don't include string.h.
6408                 (at_fatal_signal): Use a copying loop instead of memcpy.
6409
6410         2005-12-04  Bruno Haible  <bruno@clisp.org>
6411
6412                 * csharpexec.c: Add support for 'clix' launcher (untested).
6413                 (execute_csharp_using_sscli): New function.
6414                 (execute_csharp_program): Call it.
6415
6416         2006-06-21  Bruno Haible  <bruno@clisp.org>
6417
6418                 Avoid warnings from recent versions of mcs.
6419                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
6420                 -o, -L, -r any more. Use options documented since mcs-1.0
6421                 instead. Similarly for -g.
6422
6423         2005-07-09  Bruno Haible  <bruno@clisp.org>
6424
6425                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6426                 add a .dll suffix.
6427                 Reported by Mark Junker <mjscod@gmx.de>.
6428
6429         2006-06-17  Bruno Haible  <bruno@clisp.org>
6430
6431                 * config.charset: Update for NetBSD 3.0.
6432
6433         2006-05-17  Bruno Haible  <bruno@clisp.org>
6434
6435                 Cygwin portability.
6436                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6437
6438         2006-05-16  Bruno Haible  <bruno@clisp.org>
6439
6440                 * localcharset.c [CYGWIN]: Include <windows.h>.
6441                 (get_charset_aliases): For Cygwin, return the same CPxxx
6442                 aliases list as under WIN32.
6443                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
6444                 the environment variables. Fall back to GetACP().
6445
6446         2006-04-05  Bruno Haible  <bruno@clisp.org>
6447
6448                 * config.charset: Update Juan Manuel Guerrero's address.
6449
6450         2005-02-12  Bruno Haible  <bruno@clisp.org>
6451
6452                 * allocsa.h: Add extern "C" for C++.
6453
6454         2005-02-10  Bruno Haible  <bruno@clisp.org>
6455
6456                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
6457                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
6458
6459         2006-07-22  Bruno Haible  <bruno@clisp.org>
6460
6461                 * gettext.h: Update to GNU gettext-0.15.
6462
6463 2006-07-22  Bruno Haible  <bruno@clisp.org>
6464
6465         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
6466         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
6467         lib-prefix.m4, longdouble.m4, ssize_t.m4.
6468
6469 2006-07-21  Eric Blake  <ebb9@byu.net>
6470
6471         * modules/stdlib-safer: New file.
6472         * MODULES.html.sh (File stream based Input/Output): Add
6473         stdlib-safer.
6474
6475 2006-07-21  Eric Blake  <ebb9@byu.net>
6476
6477         * lib/stdlib-safer.h: New file from coreutils, required by
6478         stdlib--.h.
6479
6480 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6481
6482         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
6483
6484 2006-07-20  Bruno Haible  <bruno@clisp.org>
6485
6486         * gnulib-tool: Recognize new option --assume-autoconf.
6487         (autoconf_minversion): New variable.
6488         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6489
6490 2006-07-20  Bruno Haible  <bruno@clisp.org>
6491
6492         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6493
6494 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6495
6496         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6497         Reindent and repaginate.
6498
6499 2006-07-19  Derek Price  <derek@ximbiot.com>
6500
6501         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6502         Correct grammar.
6503
6504 2006-07-17  Bruno Haible  <bruno@clisp.org>
6505
6506         * modules/list: New file.
6507         * modules/array-list: New file.
6508         * modules/carray-list, modules/carray-list-tests: New files.
6509         * modules/linked-list, modules/linked-list-tests: New files.
6510         * modules/avltree-list, modules/avltree-list-tests: New files.
6511         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6512         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6513         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6514         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6515         * modules/oset: New file.
6516         * modules/array-oset: New file.
6517         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6518         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6519         * tests/test-carray_list.c: New file.
6520         * tests/test-linked_list.c: New file.
6521         * tests/test-avltree_list.c: New file.
6522         * tests/test-rbtree_list.c: New file.
6523         * tests/test-linkedhash_list.c: New file.
6524         * tests/test-avltreehash_list.c: New file.
6525         * tests/test-rbtreehash_list.c: New file.
6526         * tests/test-avltree_oset.c: New file.
6527         * tests/test-rbtree_oset.c: New file.
6528         * MODULES.html.sh (Container data structures): New section.
6529
6530 2006-07-17  Bruno Haible  <bruno@clisp.org>
6531
6532         * m4/gl_list.m4: New file.
6533
6534 2006-07-17  Bruno Haible  <bruno@clisp.org>
6535
6536         * lib/gl_list.h: New file.
6537         * lib/gl_list.c: New file.
6538         * lib/gl_array_list.h: New file.
6539         * lib/gl_array_list.c: New file.
6540         * lib/gl_carray_list.h: New file.
6541         * lib/gl_carray_list.c: New file.
6542         * lib/gl_linked_list.h: New file.
6543         * lib/gl_linked_list.c: New file.
6544         * lib/gl_anylinked_list1.h: New file.
6545         * lib/gl_anylinked_list2.h: New file.
6546         * lib/gl_avltree_list.h: New file.
6547         * lib/gl_avltree_list.c: New file.
6548         * lib/gl_anyavltree_list1.h: New file.
6549         * lib/gl_anyavltree_list2.h: New file.
6550         * lib/gl_rbtree_list.h: New file.
6551         * lib/gl_rbtree_list.c: New file.
6552         * lib/gl_anyrbtree_list1.h: New file.
6553         * lib/gl_anyrbtree_list2.h: New file.
6554         * lib/gl_anytree_list1.h: New file.
6555         * lib/gl_anytree_list2.h: New file.
6556         * lib/gl_linkedhash_list.h: New file.
6557         * lib/gl_linkedhash_list.c: New file.
6558         * lib/gl_anyhash_list1.h: New file.
6559         * lib/gl_anyhash_list2.h: New file.
6560         * lib/gl_avltreehash_list.h: New file.
6561         * lib/gl_avltreehash_list.c: New file.
6562         * lib/gl_rbtreehash_list.h: New file.
6563         * lib/gl_rbtreehash_list.c: New file.
6564         * lib/gl_anytreehash_list1.h: New file.
6565         * lib/gl_anytreehash_list2.h: New file.
6566
6567         * lib/gl_oset.h: New file.
6568         * lib/gl_oset.c: New file.
6569         * lib/gl_array_oset.h: New file.
6570         * lib/gl_array_oset.c: New file.
6571         * lib/gl_avltree_oset.h: New file.
6572         * lib/gl_avltree_oset.c: New file.
6573         * lib/gl_rbtree_oset.h: New file.
6574         * lib/gl_rbtree_oset.c: New file.
6575         * lib/gl_anytree_oset.h: New file.
6576
6577 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6578
6579         * m4/mkancesdirs.m4: New file.
6580         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6581         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6582         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6583         it.
6584
6585 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6586
6587         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6588         * lib/mkancesdirs.h: New files.
6589         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6590         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6591         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6592         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6593         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6594         callers changed.  Revamp internals significantly, by not
6595         attempting to create directories that are temporarily more
6596         permissive than the final results.  Do not attempt to use
6597         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6598         This removes some race conditions, fixes some bugs, and simplifies
6599         things.  Use new dirchownmod function to do owner and mode changes.
6600         * lib/mkdir-p.h: Likewise.
6601         * lib/modechange.c (octal_to_mode): New function.
6602         (struct mode_change): New member mentioned.
6603         (make_node_op_equals): New arg mentioned.  All callers changed.
6604         (mode_compile): Keep track of which mode bits the user has explicitly
6605         mentioned.
6606         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6607         New arg PMODE_BITS, to keep track of which mode bits the user
6608         mentioned; it treats S_ISUID and S_ISGID speciall.
6609         All callers changed.
6610         * lib/modechange.h: Likewise.
6611
6612 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6613
6614         * MODULES.html.sh: Add mkancestors.
6615         * modules/mkancesdirs: New module.
6616         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6617         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6618         The chdir-safer and afs files are now orphans; I'll remove them
6619         unless someone speaks up.
6620         Add lib/dirchownmod.c, lib/dirchownmod.h.
6621         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6622         Add lchown, mkancesdirs.
6623         (Maintainer): Add self.
6624
6625 2006-07-15  Karl Berry  <karl@gnu.org>
6626
6627         * gnulib-tool: help message wording/arrangement.
6628
6629 2006-07-14  Simon Josefsson  <jas@extundo.com>
6630
6631         * doc/gnulib.texi (Libtool and Windows): New section.
6632
6633 2006-07-12  Simon Josefsson  <jas@extundo.com>
6634
6635         * modules/gendocs (License): Fix license, approved by Karl.
6636
6637 2006-07-12  Eric Blake  <ebb9@byu.net>
6638
6639         * MODULES.html.sh: Add gendocs.
6640
6641 2006-07-11  Eric Blake  <ebb9@byu.net>
6642
6643         * modules/fdl: New module, to install doc/fdl.texi.
6644         * MODULES.html.sh: Add new section for documentation modules.
6645         * gnulib-tool: Avoid space-tab.
6646         (--doc-base): New option, to manage files from doc.
6647
6648 2006-07-11  Eric Blake  <ebb9@byu.net>
6649
6650         * m4/absolute-header.m4: Fix comments to match recent change.
6651
6652 2006-07-11  Eric Blake  <ebb9@byu.net>
6653
6654         * gnulib-tool: List --doc-base before --tests-base.
6655
6656 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6657
6658         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6659
6660 2006-07-11  Bruno Haible  <bruno@clisp.org>
6661
6662         * README: Mention where to put documentation.
6663
6664 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6665
6666         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6667
6668 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6669
6670         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6671         to stdint.m4.
6672
6673 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6674
6675         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6676         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6677         "no/such/file/stdint.h" when there is no such file, so that
6678         the resulting C code can be parsed by dodgy compilers.
6679         Problems reported by Bob Proulx.
6680
6681 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6682
6683         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6684         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6685         macros into the GNU _D_EXACT_NAMLEN.
6686         * lib/savedir.c:  Likewise.
6687         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6688
6689 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6690         and Paul Eggert  <eggert@cs.ucla.edu>
6691
6692         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6693         * m4/savedir.m4:
6694         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6695         macros into the GNU _D_EXACT_NAMLEN.
6696
6697 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6698
6699         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6700         around the absolute name, to work around a problem with the HP-UX
6701         11.23 native C compiler, reported by Bob Proulx.
6702
6703 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6704
6705         * doc/maintain.texi, make-stds.texi: Sync from
6706         <http://savannah.gnu.org/projects/gnustandards>.
6707
6708 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6709
6710         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6711
6712 2006-07-09  Jim Meyering  <jim@meyering.net>
6713
6714         * m4/glob.m4: Remove a doubled word in a comment.
6715
6716 2006-07-09  Jim Meyering  <jim@meyering.net>
6717
6718         * lib/argp-pv.c: Remove a doubled word in a comment.
6719         * lib/check-version.c (check_version): Likewise.
6720         * lib/javacomp.c (compile_java_class): Likewise.
6721
6722 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6723
6724         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6725         for the benefit of people using Autoconf 2.60.  If you want to
6726         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6727         (or m4/onceonly.m4, if pre-2.57) manually.
6728
6729 2006-07-08  Jim Meyering  <jim@meyering.net>
6730
6731         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6732         comment.
6733         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6734         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6735         comment.
6736
6737 2006-07-08  Jim Meyering  <jim@meyering.net>
6738
6739         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6740
6741 2006-07-07  Simon Josefsson  <jas@extundo.com>
6742
6743         * tests/test-crc.c: Change expected crc value, the test vector
6744         were probably computed using the old broken crc.c?
6745
6746 2006-07-06  Simon Josefsson  <jas@extundo.com>
6747
6748         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6749         now the canonical place for the M4 file).
6750
6751         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
6752         from the sys_socket dependency now.
6753
6754         * modules/inet_pton (Files): Ditto.
6755
6756         * modules/inet_ntop (Files): Ditto.
6757
6758 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6759
6760         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
6761         not gl_PREREQ_GETUSERSHELL.
6762
6763 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6764
6765         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
6766         with only one argument, for Autoconf 2.60.
6767         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
6768         expand to nothing, so add a shell command to avoid syntax error.
6769         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6770
6771 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6772
6773         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
6774
6775 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6776
6777         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
6778         no longer needed.  Check for isblank decl.
6779         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
6780         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
6781         of existence.
6782
6783 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6784
6785         * lib/getloadavg.c: Use __VMS, not VMS.
6786         * lib/getopt.c: Likewise.
6787         * lib/getpagesize.h: Likewise.
6788         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
6789         and probably does not work.
6790
6791 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6792
6793         * lib/.cppi-disable: Add wcwidth.
6794         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
6795         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
6796         (ISGRAPH): Remove.  All uses changed to isgraph.
6797         (FOLD) [!defined _LIBC]: Remove special case.
6798         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
6799         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
6800         HAVE_ISBLANK.
6801         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
6802         case.
6803
6804 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6805
6806         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
6807         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
6808         brackets.  Other minor changes to suppress some compiler
6809         warnings.
6810
6811 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6812         and Paul Eggert  <eggert@cs.ucla.edu>
6813
6814         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
6815         of invoking obsolescent AC_HEADER_DIRENT macro.
6816         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
6817         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
6818         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
6819         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
6820         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
6821         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6822         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
6823         * m4/readdir.m4: Remove; no longer needed.
6824
6825 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6826         and Paul Eggert  <eggert@cs.ucla.edu>
6827
6828         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
6829         Don't worry about this obsolete case any more.
6830         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
6831         directories.
6832         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
6833         worry about this obsolete case any more.
6834         * lib/fts.c: Likewise.
6835         * lib/getcwd.c: Likewise.
6836         * lib/glob.h: Likewise.
6837         * lib/savedir.c: Likewise.
6838
6839 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6840
6841         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
6842         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
6843         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
6844         needed.
6845         All uses removed.
6846         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6847         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6848         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
6849         needed.
6850         * m4/getdate.m4 (gl_GETDATE): Likewise.
6851         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6852         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6853         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6854         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6855         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6856         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6857         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
6858         needed.
6859
6860 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6861
6862         * lib/memcasecmp.c: Include <limits.h>.
6863         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
6864         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
6865         Don't assume isdigit succeeds only on '0' through '9'.
6866
6867 2006-07-05  Eric Blake  <ebb9@byu.net>
6868
6869         * modules/getaddrinfo (Depends-on): Add snprintf.
6870
6871 2006-07-05  Eric Blake  <ebb9@byu.net>
6872
6873         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
6874         to avoid 'header present but could not be compiled' on cygwin.
6875
6876 2006-07-05  Eric Blake  <ebb9@byu.net>
6877
6878         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
6879         missing from netdb.h.
6880         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
6881
6882 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6883
6884         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
6885         no longer needed.
6886         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
6887         * m4/getdate.m4 (gl_GETDATE): Likewise.
6888         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6889         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6890         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6891         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6892         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6893
6894 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6895
6896         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
6897         All uses of is_space replaced by isspace.
6898         * lib/exit.h: Don't talk about STDC_HEADERS.
6899         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
6900         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
6901         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
6902         replaced by isprint etc.
6903         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
6904         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6905         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
6906         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
6907         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
6908         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6909
6910 2006-07-05  Bruno Haible  <bruno@clisp.org>
6911
6912         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
6913         the function exists, before testing against AIX.
6914         Reported by Martin Lambers <marlam@marlam.de>.
6915
6916 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6917
6918         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
6919         From Mark D. Baushke.
6920
6921 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6922
6923         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
6924         to the absolute name, not just one, to bypass Sun C 5.8's
6925         "warning: #include of /usr/include/... may be non-portable".
6926
6927 2006-07-04  Eric Blake  <ebb9@byu.net>
6928
6929         * modules/dirname-tests: New test module.
6930         * tests/test-dirname.c: New file, replacing dirname.c
6931         TEST_DIRNAME section that was recently deleted.
6932
6933 2006-07-04  Bruno Haible  <bruno@clisp.org>
6934
6935         Assume ANSI C header files and <ctype.h> functions.
6936         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
6937         (mbsnwidth): Use isprint, iscntrl instead.
6938
6939 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6940
6941         Merge from coreutils.
6942         * MODULES.html.sh: Add xstrtold.
6943         * modules/xstrtold: New file.
6944         * modules/cycle-check (Files): Add lib/same-inode.h.
6945         * modules/dirname (Files): Add m4/double-slash-root.m4.
6946         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
6947         * modules/mkdir-p (Files): Add lib/same-inode.h.
6948         * modules/same (Files): Add lib/same-inode.h.
6949
6950 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6951
6952         * m4/absolute-header.m4: Renamed from full-header-path.m4.
6953         This is to keep the terminology clean; POSIX talks about
6954         "absolute pathnames", not "full pathnames", but the GNU
6955         Coding Standards say to use "path" for something else;
6956         so use "absolute" to keep both sides happy.
6957         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
6958         Set gl_absolute_header, not gl_full_header_path.
6959         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
6960         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
6961         All uses changed.
6962
6963         Merge from coreutils.
6964
6965         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6966
6967         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
6968         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
6969         want to require the building of c-strtod.o.
6970         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
6971         needs -lm directly.
6972         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
6973
6974         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6975
6976         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
6977         --as-needed option if available.  Problem reported by Albert Chin in
6978         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
6979         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
6980         cc merely issues a bunch of annoying warnings for --as-needed
6981         (this problem was reported by Bob Proulx).  Also, try linking with
6982         -lm to detect a bug in binutils 2.16 (this problem was reported
6983         by Ralf Wildenhues).
6984
6985         2006-06-18  Jim Meyering  <jim@meyering.net>
6986
6987         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
6988         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
6989         macro.
6990         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
6991         also check for glibc-2.4's abort-inducing bug.
6992
6993         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
6994         Low-probability clean-up should be to use rmdir to get rid of
6995         the just-created directory, not unlink.
6996
6997         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
6998         configure fail, and request a bug report to inform us about it.
6999         Add a comment that, barring reports to the contrary, in 2007 we'll
7000         assume ftruncate is universally available.
7001
7002         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7003
7004         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7005
7006         2006-03-12  Jim Meyering  <jim@meyering.net>
7007
7008         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7009         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7010         * m4/same.m4 (gl_SAME): Likewise.
7011         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7012
7013         2006-03-11  Eric Blake  <ebb9@byu.net>
7014
7015         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7016         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7017         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7018         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7019
7020 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7021
7022         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7023         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7024         reported by Mark D. Baushke, one in
7025         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7026
7027         Merge from coreutils.
7028
7029         * lib/.cppi-disable: Add stdint_.h.
7030         * lib/.cvsignore: Add stdint.h.
7031
7032         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7033
7034         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7035         both double and long double versions.
7036         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7037         * lib/xstrtold.c: New file.
7038         * lib/xstrtod.h (xstrtold): New decl.
7039
7040         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7041
7042         * lib/filemode.c (setst): Remove.
7043         (strmode): Rewrite to avoid setst.  This makes the code shorter,
7044         (arguably) clearer, and the generated code is a bit smaller on my
7045         Debian GNU/Linux stable x86 host.
7046
7047         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7048
7049         * lib/filemode.c: Include "filemode.h" first, to test the interface.
7050         Assume that filemode.h includes sys/types.h and sys/stat.h.
7051         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
7052         (ftypelet): Reorder to put common cases first, for efficiency.
7053         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
7054         to do 'M'.
7055         (strmode): Renamed from mode_string, and now stores 12 bytes instead
7056         of 10, for compatibility with FreeBSD.  All callers changed.
7057         (filemodestring): Now stores 12 bytes instead of 10, and sets file
7058         types that can't be deduced solely from st_mode.  First arg is now a
7059         const pointer.
7060         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
7061         (strmode): Renamed from mode_string.
7062         (filemodestring): New decl.
7063         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
7064         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
7065         needed.
7066         (S_ISPORT, S_ISWHT): New macros, if not already defined.
7067
7068         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7069
7070         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
7071         fsusage.h now does that.  Include fsusage.h first, to test interface.
7072         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
7073         at most one method (the old code could have generated decls that
7074         didn't conform to C89, not that this was ever exercised).
7075         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
7076
7077         2006-03-19  Jim Meyering  <jim@meyering.net>
7078
7079         Work even in a chroot where d_ino values for entries in "/"
7080         don't match the stat.st_ino values for the same names.
7081         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
7082         number, iterate through all entries again, using lstat instead.
7083         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
7084         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
7085
7086         * lib/getcwd.c (__getcwd): Clarify a comment.
7087         Use memcpy in place of a call to strcpy.
7088
7089         2006-03-12  Jim Meyering  <jim@meyering.net>
7090
7091         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
7092         matches that of the current directory (which we're about to chdir ".."
7093         out of), then save the dev-ino of the parent, instead.
7094
7095         * lib/same-inode.h (SAME_INODE): New file/macro.
7096         * lib/chdir-safer.c (SAME_INODE): Remove definition.
7097         Include "same-inode.h", instead.
7098         * lib/same.c: Likewise.
7099         * lib/cycle-check.h: Include "same-inode.h".
7100         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
7101         * lib/cycle-check.c (SAME_INODE): Remove definition.
7102         * lib/root-dev-ino.h: Include "same-inode.h".
7103
7104         2006-03-11  Eric Blake  <ebb9@byu.net>
7105
7106         * lib/same.c (same_name): s/base_name/last_component/
7107         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
7108         * lib/filenamecat.c (file_name_concat): Likewise.
7109
7110         2006-03-11  Eric Blake  <ebb9@byu.net>,
7111                     Paul Eggert  <eggert@cs.ucla.edu>
7112
7113         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
7114         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
7115         drive prefix.
7116         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
7117         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
7118         (last_component): New method.
7119         * lib/dirname.c (dir_len): Determine when drive letters need a
7120         subsequent slash.  Preserve // when it is special.
7121         (dir_name): Don't append dot when drive letter is absolute.
7122         [TEST_DIRNAME]: Move into a full-blown gnulib test.
7123         * lib/basename.c (base_name): New semantics - malloc the result.
7124         Preserve // when it is special.  Preserve relative files that look
7125         like drive letters.
7126         (base_len): Preserve // when it is special.
7127         (last_component): New method, similar to old base_name semantics.
7128         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
7129         base_name.  Strip redundant slashes from ///.
7130
7131 2006-07-03  Jim Meyering  <jim@meyering.net>
7132
7133         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
7134         macro is used before the first cycle_check call.
7135
7136 2006-07-03  Eric Blake  <ebb9@byu.net>
7137
7138         * modules/dirname (Depends-on): Add xstrndup.
7139
7140 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7141
7142         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
7143         test cases, so that config.log is a bit easier to follow.
7144
7145 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7146
7147         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
7148         both are 64 bits, since this seems to be the tradition, and this
7149         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
7150         we ever run into a host that prefers long long to long in this
7151         case, we'll need another configure-time test.  Problem reported by
7152         Jim Meyering.
7153
7154 2006-07-02  Eric Blake  <ebb9@byu.net>
7155
7156         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
7157
7158 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7159
7160         * modules/inttypes (Depends-on): No longer depends on stdint.
7161         * modules/stdint (Description): Say more about assumptions.
7162         Say that the fast types might differ.  Say macros are used.
7163         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
7164         (Makefile.am): Revise list of substituted symbols to match
7165         new stdint.m4.
7166         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
7167         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
7168         * tests/test-stdint.c (verify_same_types)
7169         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
7170         the code conforms to C99/C89.
7171         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
7172         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
7173
7174 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7175
7176         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
7177         but fix a bug, by requiring at least 64 bits.
7178         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
7179         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
7180         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
7181         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
7182
7183         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
7184         changes.  Make 2.59 a prerequisite.  Check and substitute for
7185         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
7186         inttypes.h.  Do not use special include files; just use the
7187         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
7188         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
7189         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
7190         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
7191         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
7192         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
7193         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
7194         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
7195         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
7196         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
7197         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
7198         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
7199         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
7200         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
7201         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
7202         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
7203         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
7204         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
7205         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
7206         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
7207         WINT_MAX.  Check for C99 conformance more strictly, by detecting
7208         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
7209         not check for things that C99 does not require, e.g., int8_t.  If
7210         a test isn't needed unless <stdint.h> isn't working, and is
7211         unlikely to be needed for any other reason, then don't do it
7212         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
7213         size_t, since we assume C89 freestanding at least.  Do not check
7214         for sig_atomic_t, wchar_t, or wint_t, since the code now does
7215         the right thing even if the types are not defined.  Instead use:
7216         (gl_STDINT_TYPE_PROPERTIES): New macro.
7217         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
7218         testing whether <sys/types.h> clashes, as Autoconf does this for
7219         us now.  All uses removed.
7220         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
7221         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
7222         (gl_CHECK_TYPE_SAME):
7223         Remove; no longer needed.
7224         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
7225         exists, since we'll return 0 anyway in that case.
7226         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
7227
7228 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7229
7230         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
7231         possible collision with system files.
7232         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
7233         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
7234         WCHAR_MIN and WCHAR_MAX in this case.
7235         (<stddef.h>): Do not include; no longer needed.
7236         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
7237         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
7238         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
7239         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
7240         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
7241         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
7242         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
7243         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
7244         !defined(__c99))]: Include in this case too, since it's harmless
7245         now.
7246         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
7247         dangerous to do so.
7248         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
7249         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
7250         (_STDINT_MIN, _STDINT_MAX): New macros.
7251         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
7252         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
7253         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
7254         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
7255         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
7256         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
7257         macros, not typedefs; this simplifies things quite a bit.
7258         Use long int for all types narrower than int64_t.
7259         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
7260         Define in terms of long long int or int64_t or long int,
7261         not int64_t or int32_t.  This saves some compile-time testing.
7262         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
7263         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
7264         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
7265         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
7266         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
7267         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
7268         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
7269         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
7270         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
7271         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
7272         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7273         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7274         undef any previous version and define our own version, for
7275         simplicity and consistency with the new macros for types.
7276         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7277         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7278         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7279         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7280         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7281         @WINT_T_SUFFIX@ to keep things simple here.
7282         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7283         Simplify by assuming typical 8/16/32/64 host, since we're
7284         already doing that elsewhere anyway.
7285         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7286         and assume long long int is 64 bits if available.  This
7287         speeds up 'configure'.
7288
7289 2006-07-01  Eric Blake  <ebb9@byu.net>
7290
7291         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7292         Reported by Andreas Buening.
7293
7294 2006-07-01  Eric Blake  <ebb9@byu.net>
7295
7296         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7297
7298 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7299
7300         * lib/getaddrinfo.c: fixed typo
7301
7302 2006-06-29  Jim Meyering  <jim@meyering.net>
7303
7304         * modules/strftime (Maintainer): Add my name, since with the
7305         FPRINTFTIME changes strftime.c has forked from glibc.
7306
7307 2006-06-29  Eric Blake  <ebb9@byu.net>
7308
7309         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7310
7311 2006-06-29  Eric Blake  <ebb9@byu.net>
7312
7313         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7314
7315 2006-06-29  Eric Blake  <ebb9@byu.net>
7316
7317         * lib/stat_.h: New file.
7318
7319 2006-06-29  Eric Blake  <ebb9@byu.net>
7320
7321         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7322         unused static function.
7323
7324 2006-06-29  Eric Blake  <ebb9@byu.net>
7325
7326         * doc/functions.texi (Function Portability): Document missing lstat
7327         on mingw.
7328
7329 2006-06-29  Eric Blake  <ebb9@byu.net>
7330
7331         * MODULES.html.sh: Add sys_stat.
7332         * modules/sys_stat: New module.
7333         * modules/mkstemp (Depends-on): Add sys_stat.
7334
7335 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7336
7337         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7338
7339 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7340
7341         * m4/c-bs-a.m4: Removed.
7342
7343 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7344
7345         * lib/strftime.c: Assume strftime() exists.
7346
7347 2006-06-29  Derek Price  <derek@ximbiot.com>
7348
7349         * modules/c-bs-a: Removed - \a is C89.
7350         * MODULES.html.sh: Remove c-bs-a.
7351
7352 2006-06-29  Bruno Haible  <bruno@clisp.org>
7353
7354         * modules/wcwidth (License): Change to LGPL.
7355
7356 2006-06-28  Simon Josefsson  <jas@extundo.com>
7357
7358         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7359         on _WIN32.
7360
7361         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7362         getnameinfo.
7363
7364 2006-06-28  Simon Josefsson  <jas@extundo.com>
7365
7366         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7367
7368 2006-06-28  Simon Josefsson  <jas@extundo.com>
7369
7370         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7371         functions there.  It will succeed on Windows XP, but on Windows
7372         2000 and (presumably) earlier, it will fail, and use the internal
7373         re-implementation.
7374         (use_win32_p): New function.
7375         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7376         Support AI_NUMERICSERV to disable getservbyname.
7377         (getnameinfo): New function, only supports
7378         NI_NUMERICHOST|NI_NUMERICSERV for now.
7379
7380         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7381         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7382         getnameinfo.
7383
7384 2006-06-28  Eric Blake  <ebb9@byu.net>
7385
7386         * modules/wcwidth: New file.
7387         * modules/mbchar (Depends-on): Add wcwidth.
7388         * modules/mbswidth (Depends-on): Add wcwidth.
7389         * MODULES.html.sh: Add wcwidth.
7390
7391 2006-06-28  Eric Blake  <ebb9@byu.net>
7392
7393         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7394         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7395
7396 2006-06-28  Eric Blake  <ebb9@byu.net>
7397
7398         * lib/xvasprintf.h: Fix comments.
7399
7400 2006-06-28  Eric Blake  <ebb9@byu.net>
7401
7402         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7403         * lib/mbswidth.c (wcwidth): Move from here...
7404         * lib/wcwidth.h: ...to this new file.
7405
7406 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7407
7408         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7409
7410         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7411         it's obsolete.
7412         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7413
7414 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7415
7416         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
7417         Autoconf 2.60 says this stuff was obsolete.
7418
7419 2006-06-28  Bruno Haible  <bruno@clisp.org>
7420
7421         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7422
7423 2006-06-28  Bruno Haible  <bruno@clisp.org>
7424
7425         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7426         gt_TYPE_WCHAR_T.
7427
7428 2006-06-28  Bruno Haible  <bruno@clisp.org>
7429
7430         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7431         declaration for wcwidth.
7432         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7433
7434 2006-06-28  Bruno Haible  <bruno@clisp.org>
7435
7436         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7437         (mkdir): Define using _mkdir.
7438
7439 2006-06-28  Bruno Haible  <bruno@clisp.org>
7440
7441         * lib/getaddrinfo.h: Fix POSIX URL.
7442         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
7443         _WIN32.
7444         (use_win32_p): Make static.
7445         (getaddrinfo): Reject service name if it is empty or does not consist
7446         solely of decimal digits, or if its value is > 65535.
7447         (getnameinfo): Remove useless casts.
7448
7449 2006-06-27  Simon Josefsson  <jas@extundo.com>
7450
7451         * modules/sys_select: New file, suggested by Bruno Haible, Paul
7452         Eggert and Martin Lambers.
7453
7454 2006-06-27  Simon Josefsson  <jas@extundo.com>
7455
7456         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
7457         Eggert and Martin Lambers.
7458
7459 2006-06-27  Bruno Haible  <bruno@clisp.org>
7460
7461         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
7462         result to 0, not to empty.
7463         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
7464
7465 2006-06-27  Bruno Haible  <bruno@clisp.org>
7466
7467         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
7468
7469 2006-06-26  Simon Josefsson  <jas@extundo.com>
7470
7471         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
7472         present.
7473
7474 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
7475
7476         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
7477         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
7478         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
7479
7480 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
7481
7482         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
7483
7484 2006-06-26  Bruno Haible  <bruno@clisp.org>
7485
7486         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7487
7488 2006-06-26  Bruno Haible  <bruno@clisp.org>
7489
7490         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7491
7492 2006-06-26  Bruno Haible  <bruno@clisp.org>
7493
7494         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7495         SGI C compiler in pre-C99 mode.
7496         Suggested by Mark D. Baushke and Larry Jones.
7497
7498 2006-06-26  Bruno Haible  <bruno@clisp.org>
7499
7500         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7501         WCHAR_MAX.
7502         Reported by Mark D. Baushke and Larry Jones.
7503
7504 2006-06-26  Bruno Haible  <bruno@clisp.org>
7505
7506         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7507         in pre-C99 mode.
7508         Suggested by Mark D. Baushke and Larry Jones.
7509
7510 2006-06-23  Simon Josefsson  <jas@extundo.com>
7511             Bruno Haible  <bruno@clisp.org>
7512
7513         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7514         Emit mostlyclean-local rule.
7515         (func_emit_tests_Makefile_am): Likewise.
7516         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7517
7518 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7519
7520         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7521
7522 2006-06-23  Bruno Haible  <bruno@clisp.org>
7523
7524         * tests/test-stdint.c: Update to match ISO C 99 Technical
7525         Corrigendum 1.
7526
7527 2006-06-23  Bruno Haible  <bruno@clisp.org>
7528
7529         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7530
7531 2006-06-23  Bruno Haible  <bruno@clisp.org>
7532
7533         * lib/stdint_.h: Treat IRIX like OpenBSD.
7534
7535 2006-06-23  Bruno Haible  <bruno@clisp.org>
7536
7537         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7538         ISO C 99 Technical Corrigendum 1.
7539
7540 2006-06-22  Simon Josefsson  <jas@extundo.com>
7541
7542         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7543         MinGW.
7544
7545 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7546
7547         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7548         needed.  Some compiler complained about some of them.  Problem reported
7549         by Larry Jones in
7550         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7551
7552 2006-06-21  Simon Josefsson  <jas@extundo.com>
7553
7554         * tests/test-getaddrinfo.c: New file.
7555
7556         * modules/getaddrinfo-tests: New file.
7557
7558         * MODULES.html.sh: Add inet_pton.
7559
7560         * modules/inet_pton: New file.
7561
7562 2006-06-21  Simon Josefsson  <jas@extundo.com>
7563
7564         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7565         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7566         of using the (limited) gnulib implementation on Windows XP.
7567
7568         * m4/inet_pton.m4: New file.
7569
7570 2006-06-21  Simon Josefsson  <jas@extundo.com>
7571
7572         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7573         variable.
7574
7575         * lib/socket_.h: Don't define WINVER.
7576
7577         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7578         slightly modified to work in gnulib.
7579
7580 2006-06-21  Simon Josefsson  <jas@extundo.com>
7581
7582         * doc/gnulib.texi (Windows sockets): Add.
7583
7584 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7585
7586         * lib/read-file.c (fread_file): Start with buffer allocation of
7587         0 bytes rather than 1 byte; this simplifies the code.
7588         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7589         code to free buffer and save/restore errno.
7590         (internal_read_file): Remove unused local.
7591
7592 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7593
7594         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7595         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7596         Problem reported by Denis Excoffier in
7597         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7598
7599 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7600
7601         * modules/sys_socket, modules/socklen: Include sys/types since
7602         FreeBSD 4.x's sys/socket.h needs it.
7603
7604 2006-06-19  Simon Josefsson  <jas@extundo.com>
7605
7606         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7607
7608 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7609
7610         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7611
7612 2006-06-19  Bruno Haible  <bruno@clisp.org>
7613
7614         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7615         and FULL_PATH_INTTYPES_H in angle brackets.
7616         Reported by Mark D. Baushke <mdb@gnu.org>.
7617
7618 2006-06-17  Eric Blake  <ebb9@byu.net>
7619
7620         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7621         errno.
7622
7623 2006-06-17  Bruno Haible  <bruno@clisp.org>
7624
7625         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7626         <sys/inttypes.h>.
7627
7628 2006-06-17  Bruno Haible  <bruno@clisp.org>
7629
7630         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7631         whether errno is declared. Assume <errno.h> declares errno.
7632
7633 2006-06-17  Bruno Haible  <bruno@clisp.org>
7634
7635         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7636
7637 2006-06-17  Bruno Haible  <bruno@clisp.org>
7638
7639         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7640         problem on Solaris 2.5.1.
7641
7642 2006-06-16  Eric Blake  <ebb9@byu.net>
7643
7644         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7645         * lib/unicodeio.c [!defined errno]: Likewise.
7646         * lib/strtol.c [!defined errno]: Likewise.
7647         * lib/strtod.c [!defined errno]: Likewise.
7648
7649 2006-06-15  Eric Blake  <ebb9@byu.net>
7650
7651         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7652
7653 2006-06-15  Eric Blake  <ebb9@byu.net>
7654
7655         * config/srclist.txt (ssize_t.m4): Lose sync.
7656
7657 2006-06-15  Bruno Haible  <bruno@clisp.org>
7658
7659         * modules/stdint (Files): Include m4/full-header-path.m4,
7660         m4/size_max.m4, m4/wchar_t.m4.
7661         (Makefile.am): Many more substitutions.
7662         * modules/stdint-tests: New file.
7663         * tests/test-stdint.c: New file.
7664
7665 2006-06-15  Bruno Haible  <bruno@clisp.org>
7666
7667         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7668         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7669         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7670         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7671         gl_CHECK_TYPE_SAME): New macros.
7672
7673 2006-06-15  Bruno Haible  <bruno@clisp.org>
7674
7675         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7676
7677 2006-06-15  Bruno Haible  <bruno@clisp.org>
7678
7679         * lib/stdint_.h: Rewritten to be fully auto-configured.
7680         Fixes bug on HP-UX/IA64.
7681
7682 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7683
7684         * lib/getdate.y (__attribute__): Don't define if already defined.
7685         Problem reported by Larry Jones.
7686         * lib/utimens.c (__attribute__): Likewise.
7687
7688 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7689
7690         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7691         reported by Andreas Schwab.
7692
7693 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7694             Bruno Haible  <bruno@clisp.org>
7695
7696         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7697         check for the declaration of strnlen and a run test that exposes the
7698         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7699         rpl_strndup.
7700
7701 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7702             Bruno Haible  <bruno@clisp.org>
7703
7704         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7705
7706 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7707
7708         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7709         compile test, for Tru64 4.0D.
7710
7711 2006-05-28  Karl Berry  <karl@gnu.org>
7712
7713         * config/srclist.txt (printf-args.c): lose sync.
7714
7715 2006-05-26  Martin Lambers  <marlam@marlam.de>
7716
7717         * lib/getpass.c: Updates the test for the native W32 API, and adds
7718         missing includes, thus fixing compilation warnings.
7719
7720 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7721
7722         * lib/exclude.c (exclude_fnmatch): New function.
7723         (excluded_file_name): Call exclude_fnmatch.
7724         * lib/exclude.h (excluded_file_name): New prototype
7725
7726 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7727
7728         * lib/tempname.c (small_open, large_open): New macros.
7729         (__open, __open64) [!_LIBC]: Remove.
7730         (__gen_tempname): Use small_open and large_open instead of __open
7731         and __open64.  This fixes a portability bug on HP-UX 11.11i
7732         reported by Simon Wing-Tang in
7733         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7734
7735 2006-05-24  Bruno Haible  <bruno@clisp.org>
7736
7737         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7738         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7739         Reported by Thorsten Maerz <torte@netztorte.de> via
7740         Aaron Stone <aaron@serendipity.cx>.
7741
7742 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7743
7744         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7745         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7746         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7747         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7748         not really conditional on the cache.
7749         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7750
7751 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7752
7753         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
7754         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
7755         (my_usleep): Don't mishandle maximum value.
7756
7757 2006-05-19  Jim Meyering  <jim@meyering.net>
7758
7759         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
7760
7761 2006-05-17  Bruno Haible  <bruno@clisp.org>
7762
7763         Cygwin portability.
7764         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
7765
7766 2006-05-17  Bruno Haible  <bruno@clisp.org>
7767
7768         * lib/stdint_.h: Fix recognition of Cygwin.
7769
7770 2006-05-15  Bruno Haible  <bruno@clisp.org>
7771
7772         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
7773         on libtool patch by Ralf Wildenhues.
7774
7775 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7776
7777         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
7778         test for C99 conformance; (bool) 0.5 is an integer constant
7779         expression, but (bool) -0.5 is not.  Problem reported by Fedor
7780         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
7781
7782 2006-05-11  Simon Josefsson  <jas@extundo.com>
7783
7784         * m4/xvasprintf.m4: Fix obvious typo.
7785
7786 2006-05-11  Jim Meyering  <jim@meyering.net>
7787
7788         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
7789         James Lemley.
7790
7791 2006-05-10  Simon Josefsson  <jas@extundo.com>
7792
7793         * lib/md4.c: Typo fix, update copyright years.
7794         (K1, K2): Don't use L because it turn computations into 64-bit on
7795         64-bit platforms.
7796
7797 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
7798
7799         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
7800         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
7801         unwanted sign propagation, e.g., on hosts with 64-bit int.
7802         There still are some problems with reeelly weird theoretical hosts
7803         (e.g., 33-bit int) but it's not worth worrying about now.
7804         * lib/sha1.c (rol): Likewise.
7805         (K1, K2, K3, K4): Remove unnecessary L suffix.
7806
7807 2006-05-10  Bruno Haible  <bruno@clisp.org>
7808
7809         * lib/des.c: Cast to avoid warnings.
7810
7811 2006-05-09  Bruno Haible  <bruno@clisp.org>
7812
7813         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
7814         (Depends-on): Depend also on xsize, stdarg.
7815         (configure.ac): Add gl_XVASPRINTF.
7816
7817 2006-05-09  Bruno Haible  <bruno@clisp.org>
7818
7819         * m4/xvasprintf.m4: New file.
7820
7821 2006-05-09  Bruno Haible  <bruno@clisp.org>
7822
7823         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
7824         (EOVERFLOW): Define fallback value.
7825         (xstrcat): New function.
7826         (xvasprintf): Recognize the special case of a string concatenation.
7827
7828 2006-05-08  Eric Blake  <ebb9@byu.net>
7829
7830         * gnulib-tool (func_version): Base copyright year on CVS date.
7831         (func_emit_copyright_notice): New function.
7832         (func_emit_lib_Makefile_am): Use it.
7833         (func_emit_tests_Makefile_am): Likewise.
7834         (func_import): Likewise.
7835
7836 2006-05-08  Bruno Haible  <bruno@clisp.org>
7837
7838         * modules/stdarg: New file.
7839         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
7840
7841 2006-05-08  Bruno Haible  <bruno@clisp.org>
7842
7843         * m4/stdarg.m4: New file, from GNU gettext.
7844
7845 2006-05-08  Bruno Haible  <bruno@clisp.org>
7846
7847         * config/srclist.txt (build-aux/config.rpath): different from latest
7848         release.
7849
7850 2006-05-08  Bruno Haible  <bruno@clisp.org>
7851
7852         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
7853
7854 2006-05-05  Jim Meyering  <jim@meyering.net>
7855
7856         * m4/warning.m4: New file, derived from bison's file by the same name.
7857
7858 2006-05-03  Bruno Haible  <bruno@clisp.org>
7859
7860         * lib/stdint_.h: Shorter URL.
7861         * lib/inttypes.h: Likewise.
7862
7863 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7864
7865         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
7866
7867 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7868
7869         * lib/verify.h: Document the internals better.  Most of this change
7870         was written by Bruno Haible.
7871
7872 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7873
7874         * doc/verify.texi: New file, partly based on a proposal by
7875         Bruno Haible.
7876
7877 2006-05-02  Bruno Haible  <bruno@clisp.org>
7878
7879         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
7880         test from here...
7881         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
7882
7883 2006-04-29  Bruno Haible  <bruno@clisp.org>
7884
7885         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
7886         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
7887
7888 2006-04-29  Bruno Haible  <bruno@clisp.org>
7889
7890         * gnulib-tool: Make --update option actually work.
7891
7892 2006-04-29  Bruno Haible  <bruno@clisp.org>
7893
7894         * doc/gcd.texi: New file.
7895         * doc/gnulib.texi: Include it.
7896
7897 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7898
7899         * lib/getdate.y (get_date): When adding relative date, start with the
7900         initial time, not with the result of the first mktime call.
7901
7902 2006-04-25  Bruno Haible  <bruno@clisp.org>
7903
7904         * gnulib-tool (func_import): Output the include directives in three
7905         blocks, sorted separately.
7906         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7907
7908 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7909
7910         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
7911         to define main with arguments, for C++.  Reported by Eric Blake.
7912         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
7913         Prefer 'int main ()' to 'int main (void)', for C++.
7914         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
7915         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
7916         for 'main', for C99 and C++.
7917
7918 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7919
7920         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
7921         Don't assume that exit status -1 is valid.
7922         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7923         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
7924         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
7925         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
7926         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
7927         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
7928         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
7929         functions can be used without declaring them, or that you can
7930         exit with status -1.
7931         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
7932
7933 2006-04-24  Karl Berry  <karl@gnu.org>
7934
7935         * config/srclist.txt (longdouble.m4): sync lost.
7936
7937 2006-04-24  Eric Blake  <ebb9@byu.net>
7938
7939         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
7940
7941 2006-04-24  Bruno Haible  <bruno@clisp.org>
7942
7943         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
7944         poll() implementation in AIX.
7945         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7946
7947 2006-04-24  Bruno Haible  <bruno@clisp.org>
7948
7949         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
7950         assigned exactly once.
7951
7952 2006-04-23  Claudio Fontana  <claudio@gnu.org>
7953             Bruno Haible  <bruno@clisp.org>
7954
7955         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
7956         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
7957         for AM_CPPFLAGS.
7958
7959 2006-04-23  Bruno Haible  <bruno@clisp.org>
7960
7961         * modules/copy-file: Depend on unistd.
7962         * modules/execute: Likewise.
7963         * modules/fatal-signal: Likewise.
7964         * modules/findprog: Likewise.
7965         * modules/mkdtemp : Likewise.
7966         * modules/pipe: Likewise.
7967         * modules/wait-process: Likewise.
7968
7969 2006-04-23  Bruno Haible  <bruno@clisp.org>
7970
7971         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
7972         condition was already detected.
7973         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7974
7975 2006-04-23  Bruno Haible  <bruno@clisp.org>
7976
7977         * lib/copy-file.c: Include <unistd.h> unconditionally.
7978         * lib/execute.c: Likewise.
7979         * lib/fatal-signal.c: Likewise.
7980         * lib/findprog.c: Likewise.
7981         * lib/mkdtemp.c: Likewise.
7982         * lib/pipe.h: Likewise.
7983         * lib/pipe.c: Likewise.
7984         * lib/wait-process.h: Likewise.
7985
7986 2006-04-23  Bruno Haible  <bruno@clisp.org>
7987
7988         * gnulib-tool (func_usage): Fix --import description. Document
7989         --update.
7990         (func_import): Create temporary file in a temporary directory, if
7991         --dry-run is specified. Silence errors from 'grep' when there are no
7992         m4 files in $m4dir.
7993         (func_create_testdir): Silence errors from 'grep' when there are no
7994         m4 files in $m4dir.
7995         Reported by Karl Berry <karl@freefriends.org>.
7996
7997 2006-04-20  Bruno Haible  <bruno@clisp.org>
7998
7999         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8000         one argument, so that the code will be portable to Autoconf 2.60.
8001         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8002         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8003         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8004
8005 2006-04-19  Derek Price  <derek@ximbiot.com>
8006             Eric Blake  <ebb9@byu.net>
8007
8008         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8009         rather than "/full/path.h".  Update comment to match.  Shorten &
8010         generalize m4_translit call via AS_TR_CPP.
8011
8012 2006-04-19  Derek Price  <derek@ximbiot.com>
8013             Eric Blake  <ebb9@byu.net>
8014
8015         * lib/inttypes.h: Correct grammar in comment.
8016
8017 2006-04-18  Derek Price  <derek@ximbiot.com>
8018             Paul Eggert  <eggert@cs.ucla.edu>
8019
8020         * modules/inttypes: New file.
8021         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8022
8023 2006-04-18  Derek Price  <derek@ximbiot.com>
8024             Paul Eggert  <eggert@cs.ucla.edu>
8025
8026         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8027         New files.
8028
8029 2006-04-18  Derek Price  <derek@ximbiot.com>
8030             Paul Eggert  <eggert@cs.ucla.edu>
8031
8032         * lib/inttypes.h: New file.
8033         * lib/strtoimax.c: Assume <inttypes.h>.
8034
8035 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8036
8037         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8038         isn't mounted.  Problem reported by Kir Kolyshkin.
8039
8040 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
8041
8042         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
8043         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
8044         Derek R. Price.
8045         * lib/regex.h (RE_DUP_MAX): Update comment to match current
8046         implementation.
8047
8048 2006-04-12  Eric Blake  <ebb9@byu.net>
8049
8050         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
8051         is now done automatically by the corresponding Autoconf macro.
8052
8053 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
8054
8055         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
8056         time_r.h.
8057
8058 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8059
8060         Merge regex changes from libc, removing some of our
8061         POSIX-conformance changes that were rejected and redoing them in a
8062         less-intrusive way.
8063
8064         * lib/regcomp.c (re_compile_internal, init_dfa):
8065         Length arg is now size_t, not Idx.  All uses changed.
8066         (peek_token): Forward decl now says internal_function.
8067         (__re_error_msgid, __re_error_msgid_idx):
8068         Now static rather than extern with attribute_hidden.
8069         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
8070         For some reason libc prefers K&R style defns for external functions.
8071         (regerror) [!defined _LIBC]: Likewise.
8072         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
8073         (seek_collating_symbol_entry, lookup_collation_sequence_value):
8074         (build_range_exp, build_collating_symbol):
8075         Use K&R-style defn.
8076         (re_compile_fastmap): Use '\0' to memset, not 0.
8077         (utf8_sb_map): Make the calculations more obvious.
8078         (init_dfa, parse_bracket_exp, build_charclass_op):
8079         Call calloc and cast result, as glibc does.
8080         (init_word_char, fetch_token, peek_token, peek_token_bracket):
8081         (build_range_exp, build_collating_symbol):
8082         Now internal functions.
8083
8084         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
8085
8086         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
8087         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
8088         Don't depend on VMS; depend on __VMS instead, for POSIX
8089         namespace cleanness.
8090         (regoff_t): Define to ssize_t, not long int.
8091
8092         Remove the REG_ macros named below.  Instead, make the old names
8093         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
8094         __USE_GNU_REGEX.
8095         (REG_BACKSLASH_ESCAPE_IN_LISTS):
8096         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
8097         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
8098         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
8099         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
8100         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
8101         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
8102         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
8103         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
8104         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
8105         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
8106         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
8107         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
8108         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
8109         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
8110         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
8111         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
8112         (REG_NREGS):
8113         Remove.  All uses replaced by the old RE_* names.
8114         (RE_BACKSLASH_ESCAPE_IN_LISTS):
8115         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
8116         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
8117         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
8118         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
8119         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
8120         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
8121         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
8122         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
8123         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
8124         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
8125         Don't bother having these macros be independent of each others'
8126         values, since they no longer exist in the POSIX name space.
8127
8128         Rename the following member names back to their old names,
8129         unless !__USE_GNU_REGEX.  All uses changed back.
8130         (buffer): Renamed from re_buffer.
8131         (allocated): Renamed from re_allocated.
8132         (used): Renamed from re_used.
8133         (syntax): Renamed from re_syntax.
8134         (fastmap): Renamed from re_fastmap.
8135         (translate): Renamed from re_translate.
8136         (can_be_null): Renamed from re_can_be_null.
8137         (regs_allocated): Renamed from re_regs_allocated.
8138         (fastmap_accurate): Renamed from re_fastmap_accurate.
8139         (no_sub): Renamed from re_no_sub.
8140         (not_bol): Renamed from re_not_bol.
8141         (not_eol): Renamed from re_not_eol.
8142         (newline_anchor): Renamed from re_newline_anchor.
8143         (num_regs): Renamed from rm_num_regs.
8144         (start): Renamed from rm_start.
8145         (end): Renamed from rm_end.
8146
8147         (free_state): Move up a bit.
8148
8149         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
8150         #define to be empty.
8151         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
8152         when that is what is intended.
8153         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
8154         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
8155         (MAX): New macro.
8156         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
8157         All uses changed back to re_malloc, etc.  It's now the caller's
8158         responsibility to check for overflow; all callers changed.
8159         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
8160         (re_x2nrealloc): Remove.
8161         (free_state): Remove decl.
8162
8163         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
8164         (re_set_registers, re_exec):
8165         Use K&R-style defn.
8166
8167         2006-01-31  Roland McGrath  <roland@redhat.com>
8168
8169         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
8170         Reported by Mike Frysinger <vapier@gentoo.org>.
8171
8172         2006-01-15  Andreas Jaeger  <aj@suse.de>
8173
8174         [BZ #1950]
8175         * lib/regex_internal.c (re_string_reconstruct): Adjust for
8176         build_wcs_upper_buffer change.
8177         (build_wcs_upper_buffer): Change return type.
8178
8179         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
8180
8181         * lib/regex_internal.h: Include <stdint.h> if available.
8182
8183         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
8184
8185         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
8186
8187         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
8188
8189         * lib/regcomp.c: Adjust for changed secondary hash function.
8190
8191         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
8192
8193         * lib/regex.h: Pretty printing.
8194         Clean up namespace a bit.
8195
8196         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
8197
8198         * lib/regexec.c (update_cur_sifted_state, check_arrival,
8199         check_arrival_add_next_nodes): Avoid using uninitialized variable.
8200
8201         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8202                     Ulrich Drepper  <drepper@redhat.com>
8203
8204         [BZ #1302]
8205         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
8206         changed.
8207         (bitset_word_t): Renamed from bitset_word.  All uses changed.
8208
8209         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
8210
8211         [BZ #281]
8212         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
8213         * lib/regcomp.c: Remove unnecessary uses of
8214         unsigned RE_TRANSLATE_TYPE.
8215         * lib/regex_internal.h: Likewise.
8216         * lib/regex_internal.c: Likewise.
8217         * lib/regexec.c: Likewise.
8218         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
8219
8220         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
8221
8222         * lib/regexec.c (find_recover_state): Remove unnecessary
8223         initialization.
8224         (transit_state_bkref): Make DFA a const pointer.
8225         (get_subexp): Likewise.
8226         (check_arrival): Likewise.
8227         (update_cur_sifted_state): Likewise.
8228         (re_search_internal): Likewise.
8229         (prune_impossible_nodes): Likewise.
8230         (acquire_init_state_context): Likewise.
8231         (proceed_next_node): Likewise.
8232         (set_regs): Likewise.
8233         (free_fail_stack_return): Likewise.
8234         (check_arrival_expand_ecl): Mark DFA parameter as const.
8235         (check_arrival_expand_ecl_sub): Likewise.
8236         (check_subexp_limits): Likewise.
8237         (sub_epsilon_src_nodes):  Likewise.
8238         (add_epsilon_src_nodes):  Likewise.
8239         (merge_state_array): Likewise.
8240         (update_regs): Likewise.
8241         (build_trtable): Likewise.
8242         (sift_states_backward): Mark MCTX parameter as const.
8243         (build_sifted_states): Likewise.
8244         (update_cur_sifted_state): Likewise.
8245         (sift_states_mkref): Likewise.
8246         (check_arrival_expand_ecl): Mark eclosure as const.
8247         (check_dst_limits_calc_pos_1): Likewise.
8248         * lib/regex_internal.h (re_match_context_t): Make dfa a const
8249         pointer.
8250
8251         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
8252
8253         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
8254         (transit_state_sb): Likewise.
8255         (transit_state_mb): Likewise.
8256         (sift_states_iter_mb): Likewise.
8257         (check_arrival_add_next_nodes): Likewise.
8258         (check_node_accept_bytes): Change first parameter to pointer-to-const.
8259         [_LIBC] (re_search_2_stub): Use mempcpy.
8260
8261         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
8262         mbrtowc for very simple UTF-8 case.
8263
8264         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
8265         a pointer-to-const.
8266         (re_acquire_state_context): Likewise.
8267         * lib/regex_internal.h: Adjust prototypes.
8268
8269         * lib/regex.c: Prevent using C++ compilers.
8270
8271         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
8272         (re_acquire_state_context): Likewise.
8273
8274 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8275
8276         * modules/regex (Depends-on): Add ssize_t.
8277
8278 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8279
8280         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8281         translation table.
8282
8283 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8284
8285         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8286
8287 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8288             Bruno Haible  <bruno@clisp.org>
8289
8290         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8291         <sys/types.h> and <inttypes.h>.
8292
8293 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8294
8295         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8296         `__error_t_defined', so argp.h will not typedef the former.
8297
8298 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8299
8300         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8301         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8302         glibc names.  Even if glibc is changed to conform to POSIX, the
8303         traditional names will be available anyway, since regex depends on
8304         the extensions module.  Also, fix a longstanding typo in the
8305         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8306         reported by Emanuele Giaquinta.  Also, change sense of cached
8307         variable, so that the message makes sense.
8308
8309 2006-03-24  Simon Josefsson  <jas@extundo.com>
8310
8311         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8312         including some doc fixes.
8313         (base64_encode_alloc): Fix +1 bug on allocation failures.
8314
8315 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8316
8317         * lib/base64.c (base64_encode): Do not read past end of array with
8318         unsanitized input on systems with CHAR_BIT > 8.
8319
8320 2006-03-24  Eric Blake  <ebb9@byu.net>
8321
8322         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8323
8324 2006-03-22  Karl Berry  <karl@gnu.org>
8325
8326         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8327         * config/srclistvars.sh (COREUTILS): new var.
8328
8329 2006-03-17  Jim Meyering  <jim@meyering.net>
8330
8331         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8332         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8333
8334 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8335
8336         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8337         no longer needs it.  Instead, check that regoff_t is as least
8338         as wide as ptrdiff_t.
8339
8340         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8341         so that our regex.h stays compatible with the installed regex.
8342         This is helpful for installers who configure --without-included-regex.
8343         Problem reported by Emanuele Giaquinta.
8344
8345 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8346
8347         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8348         Typedef to long int, not to off_, as POSIX will likely change
8349         in that direction.
8350
8351 2006-03-15  Eric Blake  <ebb9@byu.net>
8352
8353         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8354
8355 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8356
8357         * lib/argp-help.c (validate_uparams): Fix typo
8358         * lib/argp-parse.c (argp_default_options): Consistently begin help
8359         messages with a lowercase letter.
8360
8361 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8362
8363         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8364         overrun buffers and shouldn't be used (much as gets shouldn't be
8365         used).
8366         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8367
8368 2006-03-08  Simon Josefsson  <jas@extundo.com>
8369
8370         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8371         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8372
8373 2006-03-08  Simon Josefsson  <jas@extundo.com>
8374
8375         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8376         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8377
8378 2006-03-08  Simon Josefsson  <jas@extundo.com>
8379
8380         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8381         signal that configure disabled the device.
8382
8383 2006-03-08  Simon Josefsson  <jas@extundo.com>
8384
8385         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8386         languages.
8387
8388 2006-03-07  Simon Josefsson  <jas@extundo.com>
8389
8390         * modules/getopt (Depends-on): Add unistd.
8391
8392         * modules/unistd: New file.
8393
8394 2006-03-07  Simon Josefsson  <jas@extundo.com>
8395
8396         * modules/gc-random: New file.
8397
8398 2006-03-07  Simon Josefsson  <jas@extundo.com>
8399
8400         * m4/unistd_h.m4: New file.
8401
8402 2006-03-07  Simon Josefsson  <jas@extundo.com>
8403
8404         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8405         test to be side-effect free by storing the result in the cache
8406         variable gl_cv_lib_readline, and moving the assignment of
8407         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8408         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8409
8410 2006-03-07  Simon Josefsson  <jas@extundo.com>
8411
8412         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8413         error on missing devices (the functions will return an error).
8414
8415         * m4/gc.m4: Move random stuff to gc-random.m4
8416
8417 2006-03-07  Simon Josefsson  <jas@extundo.com>
8418
8419         * lib/unistd_.h: New file.
8420
8421 2006-03-07  Simon Josefsson  <jas@extundo.com>
8422
8423         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8424
8425 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8426
8427         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8428         Problem reported by Juan Manuel Guerrero.
8429
8430 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8431
8432         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8433         the unistd module.
8434         * lib/getlogin_r.c: Likewise.
8435         * lib/getlogin_r.h: Likewise.
8436         * lib/glob.c: Likewise.
8437         * lib/pagealign_alloc.c: Likewise.
8438         * lib/unistd_.h: Remove; no longer needed.
8439
8440 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8441
8442         * MODULES.html.sh (Support for systems lacking POSIX:2001):
8443         Add unistd.
8444         * modules/c-stack (Depends-on): Add unistd.
8445         * modules/getlogin_r: Likewise.
8446         * modules/glob: Likewise.
8447         * modules/pagealign_alloc: Likewise.
8448         * modules/unistd (Files): Remove lib/unistd_.h.
8449         (EXTRA_DIST): Remove.
8450         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
8451         need unistd_.h.
8452         (MOSTLYCLEANFILES): Remove unistd.h-t.
8453
8454 2006-03-03  Simon Josefsson  <jas@extundo.com>
8455
8456         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
8457
8458 2006-03-03  Simon Josefsson  <jas@extundo.com>
8459
8460         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
8461         libidn and bison.
8462
8463 2006-03-03  Simon Josefsson  <jas@extundo.com>
8464
8465         * build-aux/maint.mk: Add indent target.
8466
8467 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
8468
8469         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
8470         our replacement poll.h in any case, to avoid a differing
8471         declaration from a system header.  Seen on AIX.
8472
8473 2006-03-01  Simon Josefsson  <jas@extundo.com>
8474
8475         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
8476         <kasal@ucw.cz>.
8477
8478 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8479
8480         * modules/gettime (Depends-on): Add extensions module.
8481         * modules/nanosleep (Depends-on): Likewise.
8482         * modules/settime (Depends-on): Likewise.
8483
8484 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8485
8486         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8487         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8488         pedantically.
8489         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8490         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8491
8492         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8493         not "==".  Reported by Ralf Wildenhues.
8494
8495 2006-03-01  Karl Berry  <karl@gnu.org>
8496
8497         * doc/Copyright/request-*: new files, synced from gnuorg.
8498
8499 2006-03-01  Karl Berry  <karl@gnu.org>
8500
8501         * config/srclist.txt (Copyright/*): new entries.
8502
8503 2006-02-28  Simon Josefsson  <jas@extundo.com>
8504
8505         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8506
8507 2006-02-27  Simon Josefsson  <jas@extundo.com>
8508
8509         * lib/base64.h: Indent #define's.  From Jim Meyering
8510         <jim@meyering.net>.
8511
8512 2006-02-27  Jim Meyering  <jim@meyering.net>
8513
8514         Revert the change of 2006-02-24, so these files can continue
8515         to be sync'd from gettext.
8516         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8517         of `config.h'.
8518
8519 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8520
8521         * modules/intprops: New file.
8522         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8523         Add intprops.
8524         * modules/getloadavg (Files): Remove lib/intprops.h.
8525         (Depends-on): Add intprops.
8526         * modules/human: Likewise.
8527         * modules/inttostr: Likewise.
8528         * modules/openat: Likewise.
8529         * modules/sig2str: Likewise.
8530         * modules/userspec: Likewise.
8531         * modules/utimecmp: Likewise.
8532         * modules/xnanosleep: Likewise.
8533         * modules/xstrtol: Likewise.
8534
8535 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8536
8537         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8538         * modules/lock-tests (TESTS): Use $(EXEEXT).
8539         * modules/tls-tests: Likewise.
8540         * modules/argp-tests: Likewise.
8541         (check_PROGRAMS): New var, replacing...
8542         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8543
8544 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8545
8546         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8547         `config.h'.
8548
8549 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8550
8551         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8552
8553 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8554
8555         Sync from coreutils.
8556         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8557         gl_CHDIR_SAFER.
8558
8559 2006-02-22  Jim Meyering  <jim@meyering.net>
8560
8561         Sync from coreutils.
8562         * m4/chdir-safer.m4: New file.
8563
8564 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8565
8566         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8567         AT_FDCWD exceeds INT_MAX.
8568         * lib/openat.h (AT_FDCWD): Likewise.
8569
8570 2006-02-17  Eric Blake  <address@hidden>
8571
8572         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8573
8574 2006-02-16  Simon Josefsson  <jas@extundo.com>
8575
8576         * modules/getaddrinfo (Depends-on): Add sys_socket.
8577
8578 2006-02-15  Simon Josefsson  <jas@extundo.com>
8579
8580         * build-aux/maint.mk: Add dsyntax-check rule.
8581
8582 2006-02-15  Eric Blake  <ebb9@byu.net>
8583
8584         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8585         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8586         'present but cannot compile' warnings on cygwin.
8587         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8588         use ws2tcpip.h if sys/socket.h works.
8589         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8590         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8591
8592 2006-02-14  Simon Josefsson  <jas@extundo.com>
8593
8594         * modules/maintainer-makefile (Files): Rename.
8595
8596         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8597         and (the local) Makefile.cfg to maint-cfg.mk.
8598
8599         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8600         to the latter.
8601
8602         * modules/maintainer-makefile: New module.
8603
8604         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8605         severaly stripped to make it possible to build it up from scratch
8606         with reliable tests.
8607
8608         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8609         fixes to permit overriding the default actions when configure and
8610         makefile are not available.
8611
8612 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8613
8614         Sync from coreutils.
8615         * modules/lstat (Depends-on): Don't depend on xalloc.
8616         (License): Change from GPL to LGPL, since this is now simply a
8617         replacement for a libc function.
8618
8619 2006-02-14  Jim Meyering  <jim@meyering.net>
8620
8621         Sync from coreutils.
8622
8623         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8624         failure on deficient systems, and simplify gnulib lgpl dependencies.
8625         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8626         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8627
8628         * lib/xalloc-die.c: Remove unused definition of N_.
8629
8630 2006-02-14  Jim Meyering  <jim@meyering.net>
8631
8632         Sync from coreutils.
8633         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8634         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8635         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8636         double-quote uses of that variable, to accommodate the rare case in
8637         which getmntent is available in none of the libraries checked.  This
8638         happens at least on FreeBSD 5.0.
8639
8640 2006-02-13  Simon Josefsson  <jas@extundo.com>
8641
8642         * gnulib-tool (Usage): Fix --import, from
8643         karl@freefriends.org (Karl Berry).
8644
8645 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8646
8647         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8648
8649 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8650
8651         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8652         "autoupdate" on 2005-12-12.
8653
8654 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8655
8656         * modules/closeout (Depends-on): Remove atexit.
8657
8658 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8659
8660         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8661         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8662
8663 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8664
8665         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8666         __EXTENSIONS__ if this causes compilation to fail.  Problem
8667         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8668         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8669
8670 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8671
8672         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8673         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8674         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8675         All uses changed.
8676
8677 2006-01-26  Simon Josefsson  <jas@extundo.com>
8678
8679         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8680         prototype is visible on mingw32.
8681
8682         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8683         for mingw32.
8684
8685         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8686         mingw32).
8687
8688 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8689
8690         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8691         attempt to open for write; this always fails, at least on POSIX
8692         hosts.  This reinstates the 2006-01-09 change, which was
8693         inadvertently removed.
8694
8695 2006-01-26  Bruno Haible  <bruno@clisp.org>
8696
8697         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8698         Reported by Paul Eggert.
8699
8700 2006-01-26  Bruno Haible  <bruno@clisp.org>
8701             Paul Eggert  <eggert@cs.ucla.edu>
8702
8703         * lib/stdbool_.h (_Bool)
8704         [(! (defined __cplusplus || defined __BEOS__)
8705           && !defined __GNUC__
8706           && !(defined __HP_cc || defined __xlc__
8707                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8708                || defined __sgi))]:
8709         #define to signed char in these cases too; this simplifies
8710         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8711         etc., separately) and makes it more conservative.
8712
8713 2006-01-25  Simon Josefsson  <jas@extundo.com>
8714
8715         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8716         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8717         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8718
8719 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8720
8721         * lib/argp-namefrob.h: Bugfix. Remove stray #
8722
8723 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8724
8725         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8726         so that we test the test.
8727         Check for yet another HP-UX cc bug involving *bool |= bool.
8728
8729 2006-01-25  Karl Berry  <karl@gnu.org>
8730
8731         * config/srclist.txt (vasnprintf.c): sync lost.
8732
8733 2006-01-25  Jim Meyering  <jim@meyering.net>
8734
8735         Sync from the stable (b5) branch of coreutils:
8736
8737         * lib/fts.c (fts_children): Don't let close() clobber errno from
8738         failed fchdir().
8739
8740         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8741         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8742         a dangling symlink.  That can also happen at least for ELOOP.
8743         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8744         FYI, this bug predates the inclusion of fts.c in coreutils.
8745
8746         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8747         in their own block, so pre-c99 compilers don't object.
8748
8749         Avoid the double-free (first in fts_read, second in fts_close) that
8750         would occur when an `active' directory is made inaccessible (e.g.,
8751         via chmod a-x) during a traversal.
8752         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8753         before returning.  Reproduce this failure by
8754         mkdir -p a/b; cd a; chmod a-x . b
8755         Reported by Stavros Passas.
8756
8757 2006-01-25  Jim Meyering  <jim@meyering.net>
8758
8759         * lib/fileblocks.c: Remove more useless parentheses.
8760         * lib/readutmp.h: Likewise.
8761
8762 2006-01-25  Bruno Haible  <bruno@clisp.org>
8763
8764         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
8765         warnings.
8766         Reported by Paul Eggert.
8767
8768 2006-01-25  Bruno Haible  <bruno@clisp.org>
8769
8770         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
8771         rid of a trap command. For Solaris sh.
8772         Reported by Mark D. Baushke <mdb@gnu.org>.
8773
8774 2006-01-24  Simon Josefsson  <jas@extundo.com>
8775
8776         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
8777         Bruno.
8778
8779 2006-01-24  Karl Berry  <karl@gnu.org>
8780
8781         * config/srclist.txt (argp-namefrob.h): sync lost.
8782
8783 2006-01-24  Jim Meyering  <jim@meyering.net>
8784
8785         * modules/openat (Files): Add lib/intprops.h.
8786         From Mark D. Baushke.
8787
8788 2006-01-24  Jim Meyering  <jim@meyering.net>
8789
8790         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
8791         Reported by Mark D. Baushke.
8792
8793 2006-01-24  Jim Meyering  <jim@meyering.net>
8794
8795         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
8796
8797 2006-01-24  Bruno Haible  <bruno@clisp.org>
8798
8799         * modules/strnlen (Maintainer): Change from glibc to all.
8800
8801 2006-01-24  Bruno Haible  <bruno@clisp.org>
8802
8803         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
8804         Patch by Paul Eggert.
8805
8806 2006-01-24  Bruno Haible  <bruno@clisp.org>
8807
8808         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
8809         already has it.
8810         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
8811         2005-11-26.
8812
8813         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
8814         'signed char' to avoid problems with the built-in _Bool type.
8815         Reported by Paul Eggert on 2005-11-26.
8816
8817 2006-01-24  Bruno Haible  <bruno@clisp.org>
8818
8819         * gnulib-tool (func_import): Avoid constructing complicated sed
8820         expressions inside backquote.
8821         Report and solution by Mark D. Baushke <mdb@gnu.org>.
8822
8823 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
8824
8825         These changes imported from libc.
8826         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
8827         test and two separate function calls.
8828         * lib/strndup.c (__strndup): Add libc_hidden_def.
8829
8830 2006-01-23  Simon Josefsson  <jas@extundo.com>
8831
8832         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
8833         Remove the test_*_SOURCES variable: automake infers it by default.
8834         * modules/tls-tests: Likewise.
8835
8836 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8837
8838         Work around porting bugs reported by Dieter in
8839         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
8840         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
8841         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
8842         Include "getopt.h" first, to check interface.
8843         (getenv): Declare only if defined HAVE_DECL_GETENV &&
8844         !HAVE_DECL_GETENV.
8845         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
8846         (__strndup): Revert to K&R-style function dfns, the glibc style.
8847         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
8848         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
8849         Include strnlen.h first, to get prototype properly.
8850         (strnlen): Renamed from __strnlen.
8851         Remove weak alias.
8852
8853 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8854
8855         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
8856
8857 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8858
8859         * config/srclist.txt: Adjust to reflect glibc reorganization.
8860         This affects only comments.
8861
8862 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8863
8864          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
8865          Reported by Bruce Korb <bkorb@gnu.org>.
8866
8867 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
8868
8869         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
8870         to pacify gcc -Wswitch-default.
8871
8872 2006-01-22  Bruno Haible  <bruno@clisp.org>
8873
8874         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
8875         temporary buffer for sprintf, take into account the precision also
8876         for 'd', 'i', 'u', 'o', 'x', 'X'.
8877
8878 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8879
8880         * modules/argp-tests: New module
8881         * tests/test-argp.c: New file
8882         * tests/test-argp-2.sh: New file
8883
8884 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8885
8886         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
8887         (__argp_base_name): Removed
8888         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
8889         typo.
8890         (__argp_base_name): Provide macro definition or extern declaration
8891         depending on the configuration
8892
8893 2006-01-20  Simon Josefsson  <jas@extundo.com>
8894
8895         * modules/inet_ntop (Depends-on): Depend on sys_socket.
8896
8897 2006-01-20  Simon Josefsson  <jas@extundo.com>
8898
8899         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
8900
8901 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
8902
8903         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
8904         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
8905         Suggested by Bruno Haible.
8906
8907 2006-01-20  Karl Berry  <karl@gnu.org>
8908
8909         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
8910         until changes propagate, I guess.
8911
8912 2006-01-19  Simon Josefsson  <jas@extundo.com>
8913
8914         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
8915
8916 2006-01-19  Simon Josefsson  <jas@extundo.com>
8917
8918         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
8919
8920 2006-01-19  Simon Josefsson  <jas@extundo.com>
8921
8922         * gnulib-tool: Set check_PROGRAMS.
8923
8924         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8925         modules/des-tests, modules/gc-arcfour-tests,
8926         modules/gc-arctwo-tests, modules/gc-des-tests,
8927         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8928         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8929         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8930         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8931         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8932         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
8933         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
8934         test_*_SOURCES.
8935
8936 2006-01-18  Simon Josefsson  <jas@extundo.com>
8937
8938         * modules/socklen (Depends-on): Depend on sys_socket.
8939
8940 2006-01-18  Simon Josefsson  <jas@extundo.com>
8941
8942         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8943         modules/des-tests, modules/gc-arcfour-tests,
8944         modules/gc-arctwo-tests, modules/gc-des-tests,
8945         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8946         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8947         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8948         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8949         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8950         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
8951         $(EXEEXT) to automake TESTS variable, for mingw32.
8952
8953 2006-01-17  Simon Josefsson  <jas@extundo.com>
8954
8955         * modules/socklen (Include): Need sys/socket.h.
8956
8957 2006-01-17  Bruno Haible  <bruno@clisp.org>
8958
8959         * modules/ssize_t (Include): Add <sys/types.h>.
8960
8961 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
8962
8963         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
8964         it's not portable and it doesn't work with cross-compiles.
8965         Problem reported by Bruno Haible.  Fix missing-$ typo in
8966         'test "gl_cv_ignore_unused_libraries" ...' that prevented
8967         -zignore from being used with Sun's C compiler.
8968
8969 2006-01-12  Simon Josefsson  <jas@extundo.com>
8970
8971         * lib/base64.c: Fix warning, reported by Bruno Haible
8972         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
8973
8974 2006-01-12  Bruno Haible  <bruno@clisp.org>
8975
8976         * modules/ldd: New file.
8977         * build-aux/ldd.sh.in: New file.
8978         * MODULES.html.sh (Support for building libraries and executables): Add
8979         ldd.
8980
8981 2006-01-12  Bruno Haible  <bruno@clisp.org>
8982
8983         * m4/ldd.m4: New file.
8984
8985 2006-01-12  Bruno Haible  <bruno@clisp.org>
8986
8987         * gnulib-tool (func_import, func_create_testdir): Don't go into an
8988         endless loop while replacing $auxdir with build-aux.
8989
8990 2006-01-11  Simon Josefsson  <jas@extundo.com>
8991
8992         * lib/stdint_.h (SIZE_MAX): Add missing (.
8993
8994 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
8995
8996         Sync from coreutils.
8997         * lib/md5.c: Fix commentary typos.
8998         (alignof, UNALIGNED_P): No need for a GCC-specific version.
8999         * lib/md5.h (__attribute__): Remove; unused.
9000         * lib/sha1.c: Fix commentary to match md5 better.
9001         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9002         so that we don't need to worry about alignment.  All uses changed.
9003         This merges the 2005-10-28 md5 change into sha1.
9004
9005 2006-01-11  Jim Meyering  <jim@meyering.net>
9006
9007         Sync from coreutils.
9008         * lib/md5.c (OP): Fix spacing.
9009
9010 2006-01-11  Bruno Haible  <bruno@clisp.org>
9011
9012         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9013         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9014         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9015
9016 2006-01-11  Bruno Haible  <bruno@clisp.org>
9017
9018         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9019         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9020         the "early" section as well.
9021
9022 2006-01-11  Bruno Haible  <bruno@clisp.org>
9023
9024         Avoid "ar: no archive members specified" error on MacOS X.
9025         * gnulib-tool (func_modules_add_dummy): New function.
9026         (func_import, func_create_testdir): Invoke it.
9027
9028 2006-01-11  Bruno Haible  <bruno@clisp.org>
9029
9030         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9031         with $auxdir in AC_CONFIG_FILES statements.
9032
9033 2006-01-11  Bruno Haible  <bruno@clisp.org>
9034
9035         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9036         Initialize also noinst_HEADERS to empty.
9037
9038 2006-01-11  Bruno Haible  <bruno@clisp.org>
9039
9040         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
9041         variables.
9042         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
9043         autoreconf.
9044
9045 2006-01-11  Bruno Haible  <bruno@clisp.org>
9046
9047         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
9048         overridable by the user.
9049         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9050
9051 2006-01-10  Simon Josefsson  <jas@extundo.com>
9052
9053         * modules/sys_socket: New file.
9054
9055 2006-01-10  Simon Josefsson  <jas@extundo.com>
9056
9057         * m4/sys_socket_h.m4: New file.
9058
9059 2006-01-10  Simon Josefsson  <jas@extundo.com>
9060
9061         * lib/socket_.h: New file.
9062
9063 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9064
9065         * modules/readutmp (Maintainer): Add myself.
9066
9067 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9068
9069         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
9070         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
9071         People who are still concerned with buggy memcmp implementations
9072         can invoke gl_FUNC_MEMCMP themselves.
9073
9074 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9075
9076         * lib/regex_internal.h (BITSET_WORD_BITS):
9077         Work around a bug in 64-bit PGC (before version 6.1-2), where the
9078         preprocessor mishandles large unsigned values as if they were signed.
9079         Problem reported by Claudio Fontana in
9080         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
9081
9082 2006-01-10  Jim Meyering  <jim@meyering.net>
9083
9084         Avoid the double-free (first in fts_read, second in fts_close) that
9085         would occur when an `active' directory is made inaccessible (e.g.,
9086         via chmod a-x) during a traversal.
9087         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9088         before returning.  Reproduce this failure by
9089         mkdir -p a/b; cd a; chmod a-x . b
9090         Reported by Stavros Passas.
9091
9092         Sync from coreutils.
9093         * lib/sha1.c: Tweak grammar in a comment.
9094
9095 2006-01-10  Jim Meyering  <jim@meyering.net>
9096
9097         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
9098         Patch by Joerg Sonnenberger.
9099
9100 2006-01-10  Bruno Haible  <bruno@clisp.org>
9101
9102         * modules/readutmp: Depend on module free.
9103         * modules/strtok_r: Depend on module restrict.
9104
9105 2006-01-10  Bruno Haible  <bruno@clisp.org>
9106
9107         * modules/gettext (configure.ac): Add an invocation of
9108         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
9109
9110 2006-01-10  Bruno Haible  <bruno@clisp.org>
9111
9112         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
9113         Reported by Werner Lemberg <wl@gnu.org>.
9114
9115 2006-01-10  Bruno Haible  <bruno@clisp.org>
9116
9117         * lib/localcharset.c: Update from GNU gettext.
9118
9119 2006-01-10  Bruno Haible  <bruno@clisp.org>
9120
9121         * lib/argp.h (__const): Remove macro. Use const instead.
9122         * lib/argp-fmtstream.h (__const): Likewise.
9123         * lib/glob_.h (__const): Remove macro.
9124         * lib/glob-libc.h: Use const instead of __const.
9125
9126 2006-01-10  Bruno Haible  <bruno@clisp.org>
9127
9128         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
9129         variable.
9130         Needed to avoid an automake error regarding the 'gettext' module.
9131
9132 2006-01-09  Simon Josefsson  <jas@extundo.com>
9133
9134         * modules/inet_ntop (Depends-on): Add restrict.
9135
9136 2006-01-09  Simon Josefsson  <jas@extundo.com>
9137
9138         * modules/gc-rijndael-tests (License): Put under LGPL.
9139
9140         * modules/gc-des-tests (License): Likewise.
9141
9142         * modules/gc-arcfour-tests (License): Likewise.
9143
9144         * modules/gc-arctwo-tests (License): Likewise.
9145
9146         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
9147
9148         * modules/gc-hmac-sha1-tests (Files): Likewise.
9149
9150         * modules/gc-hmac-md5-tests (License): Likewise.
9151
9152         * modules/gc-sha1-tests (License): Likewise.
9153
9154         * modules/gc-md5-tests (License): Likewise.
9155
9156         * modules/gc-md4-tests (License): Likewise.
9157
9158         * modules/gc-md2-tests (License): Likewise.
9159
9160         * modules/gc-tests (License): Likewise.
9161
9162         * modules/des-tests (License): Likewise.
9163
9164         * modules/md4-tests (License): Likewise.
9165
9166         * modules/md2-tests (License): Likewise.
9167
9168 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9169
9170         Sync from coreutils:
9171
9172         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
9173         * modules/lib-ignore: New file.
9174         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
9175         chdir-safer.m4, lchmod.m4.
9176         * modules/openat: Add mkdirat.c, openat-priv.h.
9177
9178 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9179
9180         Sync from coreutils.
9181         * m4/lib-ignore.m4: New file.
9182         * m4/lchmod.m4: New file.
9183
9184 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9185
9186         Sync from coreutils.
9187         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
9188         for write access: POSIX says that must fail.
9189         * lib/fts.c (diropen): Likewise.
9190         * lib/save-cwd.c (save_cwd): Likewise.
9191         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
9192         well, for minor improvements on hosts that lack O_DIRECTORY.
9193         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
9194         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
9195         Fall back on chown if open failed with EACCES.
9196
9197         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
9198         Report an error at compile-time if only a 1-second nominal clock
9199         resolution is found.
9200
9201         * lib/lchmod.h: New file.
9202         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
9203         (make_dir_parents): Use lchown rather than chown, and
9204         lchmod rather than chmod.
9205
9206         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
9207         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
9208         "proc" reported by n0dalus.
9209
9210         * lib/mountlist.c: Include <limits.h>.
9211         (dev_from_mount_options)
9212         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
9213         New function.  It no longer assumes "dev=" has the System V meaning
9214         on Linux (since it doesn't).  It also parses "dev=" more carefully.
9215         (read_file_system_list)
9216         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
9217         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
9218         dev= in that case.
9219
9220         * lib/posixtm.h (PDS_PRE_2000): New macro.
9221         * lib/posixtm.c (year): Arg is now syntax_bits rather than
9222         allow_century.  All usages changed.  Reject dates outside the range
9223         1969-1999 if PDS_PRE_2000 is used.
9224
9225 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9226
9227         Sync from coreutils.
9228         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
9229         (Time of day items): Mention the possibility of leap seconds.
9230         Problem reported by Dr. David Alan Gilbert.
9231
9232 2006-01-09  Jim Meyering  <jim@meyering.net>
9233
9234         Sync from coreutils.
9235
9236         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
9237
9238         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
9239
9240         * lib/modechange.c (mode_compile): Reject an invalid mode string
9241         that starts with an octal digit.  From Andreas Gruenbacher.
9242
9243         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
9244         and dup to open_safer and dup_safer, respectively.
9245         (openat_permissive): Fix typo in comment.
9246
9247         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
9248         "gettext.h"; either no longer needed or are guaranteed by openat.h.
9249         (_): Remove; no longer needed.
9250         (openat): Renamed from rpl_openat; no need for rpl_openat
9251         since openat.h renames openat for us.
9252         Replace most of the body with a call to openat_permissive,
9253         to avoid duplicate code.
9254         Port to (probably hypothetical) environments were mode_t is
9255         wider than int.
9256         (openat_permissive): Require mode arg, so that we can check
9257         types better.  Put it just after flags.  Change cwd failure
9258         indicator from pointer-to-bool to pointer-to-errno-value.
9259         All callers changed.
9260         Invoke openat_save_fail and/or openat_restore_fail if
9261         cwd_errno is null, so that openat can call us.
9262         (openat_permissive, fdopendir, fstatat, unlinkat):
9263         Simplify errno handling to avoid some duplicate code,
9264         as it's OK to set errno on success.
9265         * lib/openat.h: Revamp code so that function macros depend on
9266         __OPENAT_PREFIX only, not also on AT_FDCWD.
9267         (openat_ro): Remove.  Caller changed to use openat_permissive.
9268         (openat_permissive): Now a macro, if not a function.
9269         (openat_restore_fail, openat_save_fail): Now always functions,
9270         since mkdirat needs them even if __OPENAT_PREFIX is defined.
9271
9272         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
9273         and openat.c.
9274         * lib/mkdirat.c: Include openat-priv.h.
9275         Remove definitions of macros defined therein.
9276         * lib/openat.c: Likewise.
9277
9278         * lib/mkdirat.c (mkdirat): New file and function.
9279         * lib/openat.h (mkdirat): Declare.
9280
9281         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9282
9283         * lib/openat.h (openat_permissive): Declare.
9284         (openat_ro): Define.
9285
9286         * lib/openat.c (EXPECTED_ERRNO): New macro.
9287         (openat_permissive): New function -- used in remove.c rewrite.
9288         (all functions): Set errno just before returning, only if there
9289         was an actual failure.
9290         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9291
9292         Emulate openat-family functions using Linux's procfs, if possible.
9293         Idea and some code based on Ulrich Drepper's glibc changes.
9294
9295         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9296         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9297         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9298         before falling back on save_cwd and restore_cwd.
9299         (fdopendir, fstatat, unlinkat): Likewise.
9300
9301         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9302         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9303
9304         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9305         as second argument to va_arg.  Otherwise, some versions of gcc
9306         warn that `if this code is reached, the program will abort'.
9307
9308 2006-01-09  Jim Meyering  <jim@meyering.net>
9309
9310         Sync from coreutils.
9311         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9312         Require openat-priv.h.
9313
9314 2006-01-09  Bruno Haible  <bruno@clisp.org>
9315
9316         * modules/strnlen (Include): Use strnlen.h.
9317
9318 2006-01-09  Bruno Haible  <bruno@clisp.org>
9319
9320         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9321
9322 2006-01-09  Bruno Haible  <bruno@clisp.org>
9323
9324         * lib/sysexit_.h (EX_OK): New macro.
9325         Suggested by Martin Lambers <marlam@marlam.de>.
9326
9327 2006-01-09  Bruno Haible  <bruno@clisp.org>
9328
9329         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9330         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9331
9332 2006-01-09  Bruno Haible  <bruno@clisp.org>
9333
9334         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9335         numbers.
9336
9337 2006-01-09  Bruno Haible  <bruno@clisp.org>
9338
9339         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9340         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9341         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9342         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9343
9344 2006-01-09  Bruno Haible  <bruno@clisp.org>
9345
9346         * build-aux/javacomp.sh.in: New file, moved from lib/.
9347         * modules/javacomp-script (Files): Update.
9348         (configure.ac): Add AC_CONFIG_FILES invocation.
9349         (EXTRA_DIST): Remove variable.
9350
9351         * build-aux/javaexec.sh.in: New file, moved from lib/.
9352         * modules/javaexec (Files): Update.
9353         (configure.ac): Add AC_CONFIG_FILES invocation.
9354         (EXTRA_DIST): Remove javaexec.sh.in.
9355
9356         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9357         * modules/csharpcomp-script (Files): Update.
9358         (configure.ac): Add AC_CONFIG_FILES invocation.
9359         (EXTRA_DIST): Remove variable.
9360
9361         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9362         * modules/csharpexec (Files): Update.
9363         (configure.ac): Add AC_CONFIG_FILES invocation.
9364         (EXTRA_DIST): Remove csharpexec.sh.in.
9365
9366 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9367
9368         Sync from coreutils.
9369
9370         Add POSIX ACL support
9371         * lib/acl.h (copy_acl, set_acl): Add declarations.
9372         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9373         systems other than Linux.
9374         (chmod_or_fchmod): New function: use fchmod when possible,
9375         and chmod otherwise.
9376         (file_has_acl): Add a POSIX ACL implementation, with a
9377         Linux-specific subcase.
9378         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9379         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9380         acls are unsupported.
9381         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9382         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9383         are unsupported.
9384
9385 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9386
9387         Sync from coreutils.
9388         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9389
9390 2006-01-07  Bruno Haible  <bruno@clisp.org>
9391
9392         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9393         gl_EARLY.
9394
9395 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9396
9397         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9398         Problem reported for Mingw by Mark Junker.
9399
9400 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9401
9402         * README: Gnulib normally doesn't generate a tarball.
9403
9404 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9405
9406         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9407         long int, not int, for nanosecond counts, so that people who are
9408         used to POSIX struct timespec won't be surprised.  Reported by Jim
9409         Meyering.
9410
9411 2005-12-28  Bruno Haible  <bruno@clisp.org>
9412
9413         * build-aux/config.rpath: Update from GNU gettext.
9414
9415 2005-12-16  Jim Meyering  <jim@meyering.net>
9416
9417         * modules/fprintftime: New module.
9418         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
9419
9420 2005-12-16  Jim Meyering  <jim@meyering.net>
9421
9422         * m4/fprintftime.m4: New file.
9423
9424 2005-12-16  Jim Meyering  <jim@meyering.net>
9425
9426         * lib/fprintftime.c, lib/fprintftime.h: New files.
9427
9428 2005-12-15  Simon Josefsson  <jas@extundo.com>
9429
9430         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9431         new m4/socklen.m4.
9432
9433 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9434
9435         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9436         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9437
9438 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9439
9440         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
9441         * lib/argp-help.c (fill_in_uparams): Check if the constructed
9442         struct uparams is valid. Fall back to the default values if it is
9443         not.
9444
9445 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9446
9447         * modules/argp (Files): Add argp-pin.c
9448         (Depends-on): dirname
9449         (lib_SOURCES): Add argp-pin.c
9450
9451 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9452
9453         * m4/argp.m4:  Check if program_invocation_name and
9454         program_invocation_short_name are declared and define appropriate
9455         macros if they are not.
9456
9457 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9458
9459         * lib/argp-help.c (__argp_base_name): New function
9460         (__argp_short_program_name): Rewrite using __argp_base_name
9461         * lib/argp-namefrob.h: Define program_invocation_name and
9462         program_invocation_short_name if requested
9463         (__argp_base_name): Add prototype
9464         * lib/argp-parse.c (argp_def): Use gettext wrappers
9465         (argp_default_parser): Use __argp_base_name
9466         * lib/argp-pin.c: New file. Defines program_invocation_name and
9467         program_invocation_short_name on systems that lack them.
9468
9469 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9470
9471         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
9472         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9473         porting problem reported by Georg Schwarz in
9474         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9475
9476 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9477
9478         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
9479         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9480         porting problem reported by Georg Schwarz in
9481         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9482
9483 2005-12-05  Bruno Haible  <bruno@clisp.org>
9484
9485         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9486         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9487         Reported by Mark Junker <mjscod@gmx.de>.
9488
9489 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9490
9491         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9492         Use implementation from Albert Chin, with some
9493         comments/corrections by Stepan Kasal and myself.
9494
9495 2005-12-02  Bruno Haible  <bruno@clisp.org>
9496
9497         * gnulib-tool (func_import): Accept GPLed build tool modules when
9498         --lgpl is given.
9499         * modules/csharpcomp-script: New file.
9500         * modules/csharpcomp: Depend on it.
9501         * modules/javacomp-script: New file.
9502         * modules/javacomp: Depend on it.
9503         Suggested by Simon Josefsson.
9504
9505 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9506
9507         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9508         statement, to work around an HP-UX 10.20 compiler bug reported by
9509         Peter O'Gorman.
9510
9511 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9512
9513         * modules/savedir (Depends-on): Add openat.
9514
9515 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9516
9517         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9518         (uintmax_t) [defined uintmax_t]: Do not declare.
9519         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9520         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9521         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9522         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9523         sake of portability to weird hosts that C allows (though we don't
9524         know of any practical examples).
9525
9526         * lib/savedir.h (fdsavedir): New decl.
9527         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9528         contains most of the former guts of savedir.
9529         (savedir): Use savedirstream.
9530         Include "openat.h".
9531
9532 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9533
9534         * modules/obstack (Files): Add m4/ulonglong.m4.
9535         Problem reported by Davide Angelocola.
9536
9537 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9538
9539         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9540         coreutils no longer futzes with rounding modes.
9541
9542 2005-11-14  Jim Meyering  <jim@meyering.net>
9543
9544         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9545         replacement of mkstemp.
9546
9547 2005-11-10  Simon Josefsson  <jas@extundo.com>
9548
9549         * lib/readline.c: Remove EOL.
9550
9551 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9552
9553         * modules/gethrxtime (Depends-on): Add gettime.
9554
9555 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9556
9557         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9558         or gettimeofday; no longer needed.
9559
9560 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9561
9562         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9563         time business.
9564         (gethrxtime) [! (HAVE_NANOUPTIME
9565         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9566         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9567         our own approximation.
9568
9569 2005-11-08  Eric Blake  <ebb9@byu.net>
9570
9571         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9572
9573 2005-11-08  Eric Blake  <ebb9@byu.net>
9574
9575         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9576
9577 2005-11-04  Bruno Haible  <bruno@clisp.org>
9578
9579         * gnulib-tool: Implement --update mode.
9580
9581 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9582
9583         Fix porting problem reported by Theodoros V. Kalamatianos.
9584         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9585         Don't assume that futimes failing means we must fail.
9586
9587 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9588
9589         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9590         variables to suggest the intended function of the PATH_MAX check.
9591
9592 2005-10-30  Kean Johnston  <jkj@sco.com>
9593
9594         Trivial changes to support SCO systems.
9595         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9596         as PATH_MAX.
9597         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9598         where __ptr is null when no I/O is pending.
9599
9600 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9601
9602         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9603         leave errno alone.  Problem reported by Dmitry V. Levin.
9604
9605 2005-10-28  Simon Josefsson  <jas@extundo.com>
9606
9607         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9608         Test more.
9609
9610         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9611
9612         * modules/md2, modules/md2-tests: New files.
9613
9614 2005-10-28  Simon Josefsson  <jas@extundo.com>
9615
9616         * m4/inet_ntop.m4: More tests.
9617
9618         * m4/gc-md2.m4, md2.m4: New file.
9619
9620 2005-10-28  Simon Josefsson  <jas@extundo.com>
9621
9622         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9623         "restrict" keywords, as per POSIX.  Protect the function
9624         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9625         Don't use K&R prototypes.  Check the sprintf return values.
9626         Re-define EAFNOSUPPORT if not present.  Indent.
9627
9628         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9629         suggested by Bruno Haible <bruno@clisp.org>.
9630
9631         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9632
9633         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9634
9635         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9636         libgcrypt).
9637
9638         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9639
9640         * lib/md2.h, lib/md2.c: New files.
9641
9642 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9643
9644         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9645         errno alone.  Problem reported by Frederic Jolliton.
9646
9647 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9648
9649         * modules/verify (License): Change from GPL to LGPL.  This is a
9650         tiny module and there are apparently near-equivalents that are
9651         under the BSD license.
9652
9653 2005-10-24  Simon Josefsson  <jas@extundo.com>
9654
9655         * modules/sha1: Relicense to LGPL.
9656
9657 2005-10-24  Simon Josefsson  <jas@extundo.com>
9658
9659         * lib/md4.h: Shrink buffer size, now that we changed the type.
9660
9661 2005-10-23  Simon Josefsson  <jas@extundo.com>
9662
9663         * gnulib-tool (func_import): Fix --tests-base.
9664
9665 2005-10-22  Simon Josefsson  <jas@extundo.com>
9666
9667         * modules/arcfour (Depends-on): Need stdint.
9668
9669 2005-10-22  Simon Josefsson  <jas@extundo.com>
9670
9671         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9672         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9673
9674 2005-10-22  Simon Josefsson  <jas@extundo.com>
9675
9676         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9677         suggested by Bruno Haible <bruno@clisp.org>.
9678
9679 2005-10-22  Simon Josefsson  <jas@extundo.com>
9680
9681         * lib/crc.h: Include stddef.h, for size_t.
9682
9683 2005-10-22  Simon Josefsson  <jas@extundo.com>
9684
9685         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9686         arcfour_context struct (simplify test vector testing in GNU
9687         Shishi).
9688
9689 2005-10-21  Simon Josefsson  <jas@extundo.com>
9690
9691         * modules/des, modules/des-tests: New files.
9692
9693         * modules/gc-des, modules/gc-des-tests: New files.
9694
9695         * tests/test-des.c, tests/test-gc-des.c: New file.
9696
9697 2005-10-21  Simon Josefsson  <jas@extundo.com>
9698
9699         * modules/arctwo, modules/arctwo-tests: New files.
9700
9701         * tests/test-arctwo.c: New file.
9702
9703         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9704
9705         * tests/test-gc-arctwo.c: New file.
9706
9707 2005-10-21  Simon Josefsson  <jas@extundo.com>
9708
9709         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9710         Bruno Haible <bruno@clisp.org>.
9711
9712         * m4/gc-des.m4: New file.
9713
9714 2005-10-21  Simon Josefsson  <jas@extundo.com>
9715
9716         * m4/arctwo.m4: New file.
9717
9718         * m4/gc-arctwo.m4: New file.
9719
9720 2005-10-21  Simon Josefsson  <jas@extundo.com>
9721
9722         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9723         block.
9724
9725 2005-10-21  Simon Josefsson  <jas@extundo.com>
9726
9727         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9728         <bruno@clisp.org>.
9729
9730         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9731
9732         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9733         Bruno Haible <bruno@clisp.org>.
9734
9735         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9736         <bruno@clisp.org>.
9737
9738 2005-10-21  Simon Josefsson  <jas@extundo.com>
9739
9740         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9741
9742 2005-10-21  Simon Josefsson  <jas@extundo.com>
9743
9744         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9745
9746 2005-10-21  Simon Josefsson  <jas@extundo.com>
9747
9748         * lib/des.h, lib/des.c: New files.
9749
9750         * lib/gc-gnulib.c: Support DES.c
9751
9752 2005-10-21  Simon Josefsson  <jas@extundo.com>
9753
9754         * lib/arctwo.h, lib/arctwo.c: New files.
9755
9756         * lib/gc-gnulib.c: Support ARCTWO.
9757
9758 2005-10-21  Simon Josefsson  <jas@extundo.com>
9759
9760         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
9761         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9762
9763 2005-10-21  Simon Josefsson  <jas@extundo.com>
9764
9765         * gnulib-tool (func_import, func_create_testdir): Define automake
9766         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
9767         Makefile.am snippet),
9768         suggested by Bruno Haible <bruno@clisp.org>.
9769
9770         * modules/gc (Makefile.am): Use it.
9771
9772 2005-10-21  Bruno Haible  <bruno@clisp.org>
9773
9774         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
9775         patch.
9776
9777 2005-10-19  Simon Josefsson  <jas@extundo.com>
9778
9779         * tests/test-gc-rijndael.c: New file.
9780
9781         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
9782
9783 2005-10-19  Simon Josefsson  <jas@extundo.com>
9784
9785         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
9786         interface too.
9787
9788 2005-10-19  Simon Josefsson  <jas@extundo.com>
9789
9790         * tests/test-gc-arcfour.c: New file.
9791
9792         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
9793
9794 2005-10-19  Simon Josefsson  <jas@extundo.com>
9795
9796         * modules/gc-md4, modules/gc-md4-tests: New file.
9797
9798         * tests/test-gc-md4.c: New file.
9799
9800 2005-10-19  Simon Josefsson  <jas@extundo.com>
9801
9802         * m4/gc-md4.m4: New file.
9803
9804 2005-10-19  Simon Josefsson  <jas@extundo.com>
9805
9806         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
9807         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
9808         <kasal@ucw.cz>.
9809
9810 2005-10-19  Simon Josefsson  <jas@extundo.com>
9811
9812         * m4/gc-arcfour.m4: New file.
9813
9814         * m4/gc-rijndael.m4: New file.
9815
9816 2005-10-19  Simon Josefsson  <jas@extundo.com>
9817
9818         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
9819
9820 2005-10-19  Simon Josefsson  <jas@extundo.com>
9821
9822         * lib/gc-gnulib.c: Support ARCFOUR.
9823
9824 2005-10-19  Simon Josefsson  <jas@extundo.com>
9825
9826         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
9827         support.
9828
9829         * lib/gc.h: Add ECB enum type.
9830
9831         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
9832
9833 2005-10-18  Simon Josefsson  <jas@extundo.com>
9834
9835         * tests/test-md5.c: New file.
9836
9837         * modules/md5-tests: New file.
9838
9839 2005-10-18  Simon Josefsson  <jas@extundo.com>
9840
9841         * tests/test-md4.c: New file.
9842
9843         * modules/md4, modules/md4-tests: New files.
9844
9845 2005-10-18  Simon Josefsson  <jas@extundo.com>
9846
9847         * m4/md4.m4: New file.
9848
9849 2005-10-18  Simon Josefsson  <jas@extundo.com>
9850
9851         * lib/md4.h, lib/md4.c: New files, based on md5.?.
9852
9853 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
9854
9855         * gnulib-tool (func_create_testdir): Omit the second check whether
9856         BUILT_SOURCES in nonempty.
9857
9858 2005-10-17  Simon Josefsson  <jas@extundo.com>
9859
9860         * tests/test-rijndael.c: New file.
9861
9862 2005-10-17  Simon Josefsson  <jas@extundo.com>
9863
9864         * modules/sha1: Depend on stdint instead of md5.
9865
9866         * modules/md5: Depend on stdint, remove uint32_t.
9867
9868 2005-10-17  Simon Josefsson  <jas@extundo.com>
9869
9870         * modules/gc-sha1-tests: New file.
9871
9872         * tests/test-gc-sha1.c: New file.
9873
9874 2005-10-17  Simon Josefsson  <jas@extundo.com>
9875
9876         * m4/md5.m4: Remove call to uint32_t.m4.
9877
9878 2005-10-17  Simon Josefsson  <jas@extundo.com>
9879
9880         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
9881
9882         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
9883         md5.h.
9884
9885         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
9886
9887         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
9888
9889 2005-10-17  Simon Josefsson  <jas@extundo.com>
9890
9891         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
9892
9893 2005-10-17  Simon Josefsson  <jas@extundo.com>
9894
9895         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
9896
9897 2005-10-17  Simon Josefsson  <jas@extundo.com>
9898
9899         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
9900
9901         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
9902
9903 2005-10-17  Bruno Haible  <bruno@clisp.org>
9904
9905         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
9906         that it can also be used in a test.
9907
9908 2005-10-16  Bruno Haible  <bruno@clisp.org>
9909
9910         * gnulib-tool (func_emit_tests_Makefile_am): Also define
9911         TESTS_ENVIRONMENT, so that individual tests can augment it.
9912
9913         * gnulib-tool (func_create_testdir): Use an intermediate target for
9914         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
9915         macros, like $(ALLOCA_H), which cannot be passed through the command
9916         line.
9917
9918 2005-10-15  Simon Josefsson  <jas@extundo.com>
9919
9920         * modules/rijndael-tests: New file.
9921
9922         * modules/rijndael: New file.
9923
9924 2005-10-15  Simon Josefsson  <jas@extundo.com>
9925
9926         * m4/rijndael.m4: New file.
9927
9928 2005-10-15  Simon Josefsson  <jas@extundo.com>
9929
9930         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
9931
9932         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
9933
9934 2005-10-14  Simon Josefsson  <jas@extundo.com>
9935
9936         * tests/test-arcfour.c: New file.
9937
9938         * modules/arcfour, modules/arcfour-tests: New files.
9939
9940 2005-10-14  Simon Josefsson  <jas@extundo.com>
9941
9942         * m4/arcfour.m4: New file.
9943
9944 2005-10-14  Simon Josefsson  <jas@extundo.com>
9945
9946         * lib/arcfour.h, lib/arcfour.c: New files.
9947
9948 2005-10-14  Roland McGrath  <roland@redhat.com>
9949
9950         Import from libc.  [BZ #1331]
9951         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
9952         macro argument.
9953         Reported by Matej Vela <vela@debian.org>.
9954
9955 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9956
9957         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
9958         include <wchar.h>; no longer needed.
9959
9960 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9961
9962         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
9963
9964 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
9965         and  Ulrich Drepper  <drepper@redhat.com>
9966
9967         Import from libc.
9968         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
9969         instead of inline stream orientation test and two separate
9970         function calls.  Pay no attention to USE_IN_LIBIO.
9971
9972 2005-10-13  Simon Josefsson  <jas@extundo.com>
9973
9974         * modules/gc-hmac-md5-tests: New file.
9975
9976         * tests/test-gc-hmac-sha1.c: New file.
9977
9978         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
9979
9980         * modules/gc-hmac-md5-tests: New file.
9981
9982         * tests/test-gc-md5.c: New file.
9983
9984         * modules/gc-md5-tests: New file.
9985
9986 2005-10-13  Simon Josefsson  <jas@extundo.com>
9987
9988         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
9989         Move memory allocation outside of loop.
9990
9991 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
9992
9993         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
9994         intermediate directory is in a read-only file system.  Problem
9995         reported by Eric Blake.
9996
9997 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
9998
9999         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10000
10001 2005-10-12  Simon Josefsson  <jas@extundo.com>
10002
10003         * tests/test-hmac-sha1.c: New file.
10004
10005         * modules/hmac-sha1-tests: New file.
10006
10007         * modules/hmac-sha1: New file.
10008
10009 2005-10-12  Simon Josefsson  <jas@extundo.com>
10010
10011         * modules/gc-sha1: New file.
10012
10013 2005-10-12  Simon Josefsson  <jas@extundo.com>
10014
10015         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10016
10017         * tests/test-gc-pbkdf2-sha1.c: New file.
10018
10019 2005-10-12  Simon Josefsson  <jas@extundo.com>
10020
10021         * modules/gc-md5, modules/gc-hmac-md5: New files.
10022
10023         * modules/gc (Files): Remove md5, memxor and hmac files.
10024
10025 2005-10-12  Simon Josefsson  <jas@extundo.com>
10026
10027         * m4/gc-pbkdf2-sha1.m4: New file.
10028
10029         * m4/gc-hmac-sha1.m4: New file.
10030
10031         * m4/gc-sha1: New file.
10032
10033         * m4/hmac-sha1.m4: New file.
10034
10035 2005-10-12  Simon Josefsson  <jas@extundo.com>
10036
10037         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10038
10039         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
10040
10041 2005-10-12  Simon Josefsson  <jas@extundo.com>
10042
10043         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
10044         suggested by Bruno Haible <bruno@clisp.org>.
10045
10046 2005-10-12  Simon Josefsson  <jas@extundo.com>
10047
10048         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
10049
10050 2005-10-12  Simon Josefsson  <jas@extundo.com>
10051
10052         * lib/gc-pbkdf2-sha1.c: New file.
10053
10054         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
10055
10056 2005-10-12  Simon Josefsson  <jas@extundo.com>
10057
10058         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
10059
10060         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
10061
10062 2005-10-12  Simon Josefsson  <jas@extundo.com>
10063
10064         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
10065         GC_USE_HMAC_MD5, respectively.
10066
10067         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
10068         (gc_md5): Fix typo.
10069
10070         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
10071
10072         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
10073
10074         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
10075
10076 2005-10-12  Bruno Haible  <bruno@clisp.org>
10077
10078         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
10079         Reported by Stepan Kasal <kasal@ucw.cz>.
10080
10081 2005-10-11  Simon Josefsson  <jas@extundo.com>
10082
10083         * tests/test-crc.c: New file.
10084
10085         * modules/crc, modules/crc-tests: New files.
10086
10087 2005-10-11  Simon Josefsson  <jas@extundo.com>
10088
10089         * m4/crc.m4: New file.
10090
10091 2005-10-11  Simon Josefsson  <jas@extundo.com>
10092
10093         * lib/gc.h: Add gc_hash and gc_hash_buffer.
10094
10095         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
10096
10097         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
10098
10099 2005-10-11  Simon Josefsson  <jas@extundo.com>
10100
10101         * lib/crc.h, lib/crc.c: New files.
10102
10103         * lib/gc.h (gc_hash_buffer): Add doc.
10104
10105 2005-10-11  Bruno Haible  <bruno@clisp.org>
10106
10107         * modules/c-strcasestr: New file.
10108         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
10109
10110 2005-10-11  Bruno Haible  <bruno@clisp.org>
10111
10112         * modules/c-strcase: New file.
10113         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
10114
10115 2005-10-11  Bruno Haible  <bruno@clisp.org>
10116
10117         * lib/strcasecmp.c: Include limits.h.
10118         (strcasecmp): Avoid integer overflow on exotic platforms.
10119         * lib/strncasecmp.c: Include limits.h.
10120         (strncasecmp): Avoid integer overflow on exotic platforms.
10121         Reported by Paul Eggert.
10122
10123 2005-10-11  Bruno Haible  <bruno@clisp.org>
10124
10125         * lib/c-strcasestr.h: New file, from GNU gettext.
10126         * lib/c-strcasestr.c: New file, from GNU gettext.
10127
10128 2005-10-11  Bruno Haible  <bruno@clisp.org>
10129
10130         * lib/c-strcase.h: New file, from GNU gettext.
10131         * lib/c-strcasecmp.c: New file, from GNU gettext.
10132         * lib/c-strncasecmp.c: New file, from GNU gettext.
10133
10134 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10135
10136         * modules/mempcpy (License): GPL -> LGPL.
10137         * modules/strchrnul (License): Likewise.
10138         * modules/sysexits (License): Likewise.
10139
10140 2005-10-08  Simon Josefsson  <jas@extundo.com>
10141
10142         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
10143
10144 2005-10-07  Simon Josefsson  <jas@extundo.com>
10145
10146         * m4/memxor.m4: Remove gl_C_RESTRICT call.
10147
10148 2005-10-06  Simon Josefsson  <jas@extundo.com>
10149
10150         * tests/test-hmac-md5.c: New file.
10151
10152         * modules/hmac-md5-tests: New file.
10153
10154         * modules/hmac-md5: New file.
10155
10156 2005-10-06  Simon Josefsson  <jas@extundo.com>
10157
10158         * m4/hmac-md5.m4: New file.
10159
10160         * m4/memxor.m4: Require gl_C_RESTRICT.
10161
10162 2005-10-06  Simon Josefsson  <jas@extundo.com>
10163
10164         * lib/memxor.c (memxor): Avoid casts and warnings.
10165
10166 2005-10-06  Simon Josefsson  <jas@extundo.com>
10167
10168         * lib/hmac-md5.c: New file.
10169
10170         * lib/hmac.h: New file.
10171
10172 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10173
10174         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
10175         promotes to int, not unsigned int, to catch the AIX 5.3
10176         compiler bug.
10177
10178 2005-10-05  Simon Josefsson  <jas@extundo.com>
10179
10180         * modules/memxor: New file.
10181
10182         * modules/iconv (Files): Move config.rpath to havelib, it is used
10183         there.
10184
10185         * modules/havelib (Files): Add config.rpath.
10186
10187 2005-10-05  Simon Josefsson  <jas@extundo.com>
10188
10189         * m4/memxor.m4: New file.
10190
10191 2005-10-05  Simon Josefsson  <jas@extundo.com>
10192
10193         * lib/memxor.c (memxor): Fix compiler error.
10194
10195         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
10196         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
10197
10198         * lib/memxor.h, lib/memxor.c: New files.
10199
10200         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
10201         we assume all systems have it, suggested by Jim Meyering
10202         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
10203         any systems lack sys/socket.h; mingw32 is known to lack it, but we
10204         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
10205         same reasons.
10206
10207 2005-10-05  Simon Josefsson  <jas@extundo.com>
10208
10209         * config/srclist.txt: Add glibc bug 1423 for md5.h.
10210
10211 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10212
10213         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
10214         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
10215         needed, since the source code now assumes these .h files.
10216
10217 2005-10-05  Derek Price  <derek@ximbiot.com>
10218
10219         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
10220
10221 2005-10-05  Bruno Haible  <bruno@clisp.org>
10222
10223         * modules/stdint (License): Change to LGPL.
10224
10225 2005-10-04  Simon Josefsson  <jas@extundo.com>
10226
10227         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
10228         D. Baushke" <mdb@gnu.org>.
10229
10230 2005-10-04  Bruno Haible  <bruno@clisp.org>
10231
10232         * lib/verify.h (verify_true): Provide alternative definition for C++.
10233
10234 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
10235
10236         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
10237         (SSIZE_MAX): New macro, if not already defined.
10238         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
10239         than 2 GiB.
10240
10241 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10242
10243         Sync from coreutils.
10244         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
10245         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
10246         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
10247         ULLONG_MAX doesn't work with 2.7.2.1.
10248
10249 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10250
10251         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
10252         From Ben Pfaff.
10253
10254         * modules/exclude (Depends-on): Depend on verify.
10255         * modules/strtoimax (Depends-on): Likewise.
10256         * modules/utimecmp (Depends-on): Likewise.
10257
10258 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10259
10260         * lib/exclude.c: Include verify.h.
10261         (verify): Remove.  All callers changed to use verify.h's version.
10262         * lib/strtoimax.c: Likewise.
10263         * lib/utimecmp.c: Likewis.e
10264
10265         Sync from coreutils.
10266         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
10267         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
10268         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
10269         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
10270         bother returning ENOSYS if settimeofday or stime fails; just let
10271         them return whatever errno they want to return.
10272         * lib/utimens.c: Include unistd.h, for dup2.
10273         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10274         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10275
10276 2005-10-02  Jim Meyering  <jim@meyering.net>
10277
10278         Sync from coreutils.
10279         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10280         from glibc-2.2.5 that fails for read-only files.
10281
10282 2005-10-02  Jim Meyering  <jim@meyering.net>
10283
10284         Sync from coreutils.
10285         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10286         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10287         `#if HAVE_CONFIG_H'.
10288         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10289         Remove AT_FDCWD test.
10290         Do not consume the fd unless successful.
10291         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10292         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10293         block, so that we don't even try to compile it if settimeofday is
10294         available.  This works around a compilation failure on OSF1 V5.1,
10295         due to stime requiring a `long int*' while tv_sec is `int'.
10296
10297 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10298
10299         Sync from coreutils.
10300         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10301         against `yes', rather than just testing for nonempty.
10302
10303 2005-10-01  Simon Josefsson  <jas@extundo.com>
10304
10305         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10306         and Darwin.
10307
10308         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10309         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10310         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10311         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10312         Check if struct addrinfo is declared.
10313
10314 2005-10-01  Simon Josefsson  <jas@extundo.com>
10315
10316         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10317         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10318         AI_* and EAI_* definitions.  Protect function declarations.
10319
10320 2005-10-01  Jim Meyering  <jim@meyering.net>
10321
10322         Sync from coreutils.
10323
10324         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10325         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10326         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10327         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10328         in the inet and nsl libraries.  Required on Solaris 5.7.
10329
10330 2005-10-01  Jim Meyering  <jim@meyering.net>
10331
10332         Sync from coreutils.
10333         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10334         in the inet and nsl libraries.  Required on Solaris 5.7.
10335
10336 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10337
10338         * lib/getdelim.c (getdelim): Remove unused variables.
10339
10340 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10341
10342         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10343         so that the code works even with ancient cpp.  Portability problem
10344         with GCC 2.7.2.1 reported by Thomas M.Ott.
10345
10346 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10347
10348         * modules/regex (Depends-on): Add strcase.
10349
10350         * modules/gethostname (Licence): Change from GPL to LGPL, since
10351         gethostname.c is a trivial implementation of a standard library
10352         function.
10353         * modules/poll (License): Change from GPL to LGPL, since it's
10354         derived from LGPL code.
10355
10356 2005-09-27  Jim Meyering  <jim@meyering.net>
10357
10358         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10359         HAVE_CONFIG_H.
10360
10361         * lib/intprops.h (signed_type_or_expr__): Define.
10362         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10363         for unsigned types.
10364
10365 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10366
10367         * lib/verify.h (verify_expr): Remove, replacing with:
10368         (verify_true): New macro that returns true instead of void.
10369         (verify_type__): Remove.
10370         (verify): Use verify_true rather than verify_type__.
10371
10372 2005-09-26  Bruno Haible  <bruno@clisp.org>
10373
10374         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10375         is necessary.
10376         (lib_SOURCES): Remove mbchar.c.
10377         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10378         (Files): Add m4/mbrtowc.m4.
10379         * modules/mbiter: Likewise.
10380         * modules/mbuiter: Likewise.
10381
10382 2005-09-26  Bruno Haible  <bruno@clisp.org>
10383
10384         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10385         compile mbchar.c if they are not both present.
10386         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10387         * m4/mbiter.m4 (gl_MBITER): Likewise.
10388         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10389         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10390         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10391
10392 2005-09-25  Jim Meyering  <jim@meyering.net>
10393
10394         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10395         also uses socklen_t.
10396
10397 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10398
10399         * lib/utimens.c (ENOSYS): Define if not already defined.
10400         (futimens): Support having a null PATH if the file descriptor
10401         is nonnegative.
10402
10403         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10404         Remove.
10405         (__attribute): Define to empty unless GCC 3.1 or later.
10406         This works around a core dump on OpenBSD 3.4, which has GCC
10407         2.95.3, which dumps core when given __attribute__(()).  It also
10408         simplifies other tests, since we really don't want to bother with
10409         worrying about which ancient version of GCC supported what.
10410         Original problem reported by Yoann Vandoorselaere, with part of
10411         the fix suggested by Derek Price.
10412
10413 2005-09-24  Jim Meyering  <jim@meyering.net>
10414
10415         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
10416         so we can once again use a positive bitfield width of 1 -- now we
10417         don't have to explain why we were using a bitfield width of 2.
10418
10419 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10420
10421         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10422         and similarly for the other external symbols.  Problem reported
10423         by James Gallager.
10424
10425         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10426         bug reported by Jim Meyering.
10427
10428         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10429         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10430         not needed, since socklen is a prerequisite module.
10431
10432 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10433
10434         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10435         Problem reported by Eric Blake.
10436         (getaddrinfo): Initialize se so that it's not garbage.
10437         Redo internal storage allocation so that it doesn't make unportable
10438         assumptions about alignment.
10439         Fix a memory leak.
10440
10441         * lib/utimens.c (futimens): Use futimesat if available.
10442         Prefer it to futimes since it doesn't have the futimes bug.
10443
10444         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
10445         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
10446         Instead, declare a function that returns a pointer to an array,
10447         and use verify_type__ to declare the size of the array.
10448         Problem and germ of a solution reported by Bruno Haible.
10449         (verify_type__): Use 2, not 1, for bitfield size, to avoid
10450         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
10451
10452 2005-09-23  Jim Meyering  <jim@meyering.net>
10453
10454         Sync from coreutils.
10455         Correct build failure (socklen_t not defined) on at least
10456         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
10457         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
10458
10459 2005-09-23  Jim Meyering  <jim@meyering.net>
10460
10461         * modules/getaddrinfo (Depends-on): Add socklen.
10462
10463 2005-09-23  Bruno Haible  <bruno@clisp.org>
10464
10465         * tests/test-verify.c: New file.
10466
10467 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10468
10469         Sync from coreutils.
10470
10471         * modules/argmatch (Depends-on): Add verify.
10472         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
10473         unistd-safer.
10474         * modules/save-cwd (Depends-on): Likewise.
10475
10476         * modules/openat (Files): Add lib/openat-die.c.
10477         (Depends-on): Remove error, exitfail.
10478         Add dirname.
10479
10480         * modules/verify: New file.
10481         * MODULES.html.sh (Diagnostics <assert.h>): New section,
10482         with "verify" module.
10483
10484 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10485
10486         Sync from coreutils.
10487
10488         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10489         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10490         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10491         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10492         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10493         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10494         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10495         Don't bother checking for string.h, stdlib.h, unistd.h.
10496         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10497         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10498         module's job.
10499         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10500         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10501
10502         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10503         (gl_GETDATE): Use it.
10504
10505         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10506
10507 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10508
10509         Sync from coreutils.
10510
10511         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10512         stat-time.h.
10513         * lib/argmatch.h: Include verify.h
10514         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10515         (ARGMATCH_ASSERT): Remove; unused.
10516         * lib/canonicalize.c: Assume STDC_HEADERS.
10517         * lib/exclude.c: Include "strcase.h".
10518         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10519         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10520         and stdio-safer.h.
10521         (getusershell): Call fopen, not fopen_safer.
10522         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10523         Do not include unistd-safer.h.
10524         (save_cwd): Don't call fd_safer; no longer needed
10525         now that we include fcntl--.h.
10526
10527         * lib/getdate.y (relative_time): New type.
10528         (RELATIVE_TIME_0): New constant.
10529         (parser_control): Use relative_time instead of doing it ourselves.
10530         (%union): Add new relative_time rel member.
10531         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10532         Now typeless.
10533         (relunit, relunit_snumber): Now of type rel.
10534         (zone, rel, relunit, get_date): Adjust to above changes.
10535
10536         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10537         Do not include unistd-safer.h.
10538         (getloadavg): Don't call fd_safer; no longer needed
10539         now that we include fcntl--.h.
10540
10541         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10542         (make_dir_parents): Treat ENOSYS like EEXIST.
10543
10544         Improve quality of diagnostics on restore_cwd failure.
10545         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10546         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10547         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10548         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10549         each time through the loop.  Do not diagnose restore_cwd failure;
10550         that is the caller's job (and perhaps the caller does not care).
10551
10552         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10553         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10554         If the file already exists but is not a directory, don't bother
10555         to try to make its parents.
10556         Close potential file descriptor leak if we can't chdir("/") (!).
10557         Don't always return true if chdir($PWD) fails; return true only
10558         if the requested action was done successfully (except for the
10559         chdir($PWD)).
10560         Don't log final directory unless we actually made it.
10561         Refactor to avoid duplicate code to fix up permissions.
10562         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10563
10564         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10565         to make it a bit faster and (I hope) clearer.
10566         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10567         Fix bug in formats like %2N.
10568
10569         * lib/verify.h: New file.
10570
10571 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10572
10573         Sync from coreutils.
10574         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10575
10576 2005-09-22  Jim Meyering  <jim@meyering.net>
10577
10578         Sync from coreutils.
10579
10580         * m4/lstat.m4 (gl_FUNC_LSTAT):
10581         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10582         Remove obsolete comment.
10583         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10584         * m4/xstrtod.m4: Likewise.
10585
10586         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10587
10588 2005-09-22  Jim Meyering  <jim@meyering.net>
10589
10590         Sync from coreutils.
10591
10592         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10593
10594         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10595         the .tm_year member, since otherwise gcc-4.0 would now warn about
10596         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10597
10598         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10599         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10600
10601         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10602         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10603         when run in a time zone for which daylight savings time is in effect
10604         for the starting date.
10605
10606         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10607         stop us from restricting permissions of just-created absolute-named
10608         directories.
10609         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10610         to restore initial working directory.
10611         * lib/mkdir-p.c (make_dir_parents): New parameter:
10612         different_working_dir, to tell caller if/when we change the working
10613         directory and are unable to return to the initial one.
10614         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10615         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10616         `return false'.  This fixes a bug introduced on 2004-07-30.
10617
10618         * lib/openat.c (fdopendir): Be sure to close the supplied
10619         file descriptor before returning.  This makes our replacement
10620         implementation a little closer to Solaris's, where fdopendir
10621         ties the file descriptor to the returned DIR* pointer.
10622         * lib/openat.c (unlinkat): New function.
10623         * lib/openat.h (unlinkat): Add prototype.
10624         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10625         (openat_restore_fail): Rename from openat_restore_die.
10626         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10627
10628         Provide an alternative to exiting immediately upon save_cwd or
10629         restore_cwd failure.  Now, an application can arrange e.g.,
10630         to perform a longjump in that case.
10631         * lib/openat.c: Include dirname.h.
10632         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10633         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10634         and openat_restore_die rather than calling error directly.
10635         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10636
10637         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10638         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10639         define.
10640
10641         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10642         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10643                             int utc, int nanoseconds);
10644         Background:
10645         date should not have to allocate a megabyte of virtual memory to
10646         handle a format argument like +%1048575T.  When implemented with
10647         strftime, it must allocate such a buffer, use strftime to fill it
10648         in, print it, then free it.
10649         With fprintftime, it simply prints everything and exits.
10650         With no need for memory allocation, that's one fewer way to fail.
10651         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10652         optional field width, not before, so we accept %9:z, not %:9z.
10653         (my_strftime): Be sure to use L_('x') for literals.
10654
10655         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10656         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10657         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10658         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10659         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10660         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10661         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10662         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10663         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10664         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10665         * lib/xgethostname.c, lib/xreadlink.c:
10666         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10667
10668         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10669         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10670         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10671         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10672         and don't include <sys/file.h>).
10673
10674 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10675
10676         Sync from coreutils.
10677
10678         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10679         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10680         [!LDAV_DONE]: Avoid unused variable warning.
10681
10682 2005-09-21  Bruno Haible  <bruno@clisp.org>
10683
10684         * lib/unicodeio.h (unicode_to_mb): New declaration.
10685
10686 2005-09-20  Derek Price  <derek@ximbiot.com>
10687
10688         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10689         getaddrinfo.h.
10690
10691 2005-09-20  Bruno Haible  <bruno@clisp.org>
10692
10693         * gnulib-tool: Remove trailing slashes from the values specified for
10694         --source-base, --m4-base, --tests-base, --aux-dir.
10695         Suggested by Simon Josefsson <jas@extundo.com>.
10696
10697 2005-09-20  Bruno Haible  <bruno@clisp.org>
10698
10699         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10700         func_modules_to_filelist, func_import, func_create_testdir): Make all
10701         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10702         change when gnulib-tool is invoked in a different locale.
10703
10704 2005-09-19  Simon Josefsson  <jas@extundo.com>
10705
10706         * m4/socklen.m4: Fix typo.
10707
10708 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10709
10710         Use a consistent style for including <config.h>.
10711         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10712         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10713         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10714         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10715         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10716         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10717         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10718         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10719         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10720         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10721         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10722         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10723         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10724         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10725         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10726         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10727         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10728         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10729         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10730         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10731         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10732         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10733         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10734         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10735         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10736         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10737         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10738         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10739         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10740         lib/xstrtoumax.c, lib/yesno.c:
10741         Standardize inclusion of config.h.
10742         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10743         lib/inttostr.h:  Removed inclusion of config.h from header files.
10744         * lib/inttostr.c:  Adjusted in-tree users.
10745         * lib/timespec.h: Remove superfluous warning to include config.h.
10746         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10747         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10748         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10749         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10750         config.h with HAVE_CONFIG_H.
10751
10752 2005-09-19  Jim Meyering  <jim@meyering.net>
10753
10754         * modules/pathmax (License): Change to LGPL.
10755
10756 2005-09-19  Derek Price  <derek@ximbiot.com>
10757
10758         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
10759
10760 2005-09-19  Bruno Haible  <bruno@clisp.org>
10761
10762         * gnulib-tool (import): Provide default for --tests-base.
10763
10764 2005-09-19  Bruno Haible  <bruno@clisp.org>
10765
10766         * doc/quote.texi: New file, extracted from gnulib.texi.
10767         * doc/ctime.texi: New file, extracted from gnulib.texi.
10768         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
10769         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
10770         * doc/gnulib.texi: Include them.
10771
10772 2005-09-18  Bruno Haible  <bruno@clisp.org>
10773
10774         Portability fix.
10775         * gnulib-tool (func_readlink): New function.
10776         (func_ln_if_changed): Use it.
10777
10778 2005-09-18  Bruno Haible  <bruno@clisp.org>
10779
10780         * gnulib-tool: Support --with-tests also with --import.
10781         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
10782         (func_import): Use variables $testsbase and $inctests. Emit a
10783         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
10784         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
10785         SUBDIRS += $testsdir.
10786         (func_create_testdir): Update.
10787
10788 2005-09-18  Bruno Haible  <bruno@clisp.org>
10789
10790         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
10791         instead of $dry_run.
10792         (func_cp_if_changed, func_mv_if_changed): Remove functions.
10793         (func_ln_if_changed): Don't handle dry-run here.
10794         (func_import): In dry-run mode, detect more precisely which actions
10795         would be performed, and don't use "...ing" verbs.
10796
10797 2005-09-18  Bruno Haible  <bruno@clisp.org>
10798
10799         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
10800         (func_import): Use join on two temporary files instead of three nested
10801         loops, in order to determine which files are new or old.
10802
10803 2005-09-18  Bruno Haible  <bruno@clisp.org>
10804
10805         * gnulib-tool (func_import): Comment out code that spits out the
10806         new files with --dry-run.
10807
10808 2005-09-18  Bruno Haible  <bruno@clisp.org>
10809
10810         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
10811
10812 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10813
10814         * lib/stat-time.h: New file.
10815         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
10816         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
10817         in a different way.
10818         (timespec_cmp): New function.
10819         * lib/utimecmp.c: Include stat-time.h.
10820         (SYSCALL_RESOLUTION): Depend on whether various struct stat
10821         members exist, not on the obsolescent ST_MTIM_NSEC.
10822         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
10823
10824 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10825
10826         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
10827
10828 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10829
10830         * MODULES.html.sh (File system functions): Add stat-time.
10831         * modules/stat-time: New file.
10832         * modules/timespec (Files): Remove m4/st_mtim.m4; this
10833         is now done in a different way, by the stat-time module.
10834         * modules/utimecmp (Depends-on): Add stat-time.
10835
10836 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10837
10838         * m4/st_mtim.m4: Remove.  Superseded by...
10839         * m4/stat-time.m4: New file.
10840         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
10841         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
10842
10843 2005-09-15  Derek Price  <derek@ximbiot.com>
10844
10845         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
10846
10847 2005-09-15  Derek Price  <derek@ximbiot.com>
10848
10849         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
10850         * lib/regex_internal.c: Ditto, using this...
10851         (__GNUC_PREREQ): ...new macro.
10852         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
10853         using...
10854         (__GNUC_PREREQ): ...this new macro.
10855
10856         * lib/strstr.h: Include string.h. Define strstr as a macro here.
10857
10858 2005-09-15  Derek Price  <derek@ximbiot.com>
10859             Paul Eggert  <eggert@cs.ucla.edu>
10860
10861         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
10862         changes, consolidating in...
10863         * lib/regex_internal.h: ...this file.
10864
10865 2005-09-13  Jim Meyering  <jim@meyering.net>
10866
10867         * lib/canon-host.c: Filter through gnu indent and reword comments
10868         slightly.
10869         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
10870
10871 2005-09-13  Derek Price  <derek@ximbiot.com>
10872
10873         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
10874         failure.
10875         Reported by Jim Meyering  <jim@meyering.net>.
10876
10877 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10878
10879         * lib/base64.c: Typo.
10880         (base64_encode): Put b64str in initialized data section.
10881
10882 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
10883
10884         Merge glibc and coreutils changes into gnulib, plus a few
10885         extra fixes.
10886         * lib/md5.c: Use #error rather than a string.
10887         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
10888         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
10889         (__attribute__): Define to empty for non recent-GCC.
10890         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
10891         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
10892         Renamed from their non-__ counterparts, with new macros replacing
10893         them if not _LIBC.  Add __THROW attribute.
10894         (rol): Remove.
10895         (struct md5_ctx): Align buffer if using GCC.
10896         * lib/sha1.h (struct sha1_ctx): Likewise.
10897         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
10898         The old name was backwards.
10899         (NOTSWAP): Remove; not used.
10900         (rol): New macro, moved here from md5.h.
10901         (sha1_process_block): Remove a FIXME that doesn't make sense.
10902
10903 2005-09-12  Derek Price  <derek@ximbiot.com>
10904
10905         Return usable errors from canon-host.
10906         * lib/canon-host.h: New file.
10907         * lib/canon-host.c (canon_host): Wrap...
10908         (canon_host_r): ...this new function, which now relies exclusively on
10909         getaddrinfo.
10910         (ch_strerror): New function.
10911         (last_cherror): New global.
10912         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
10913         interface.
10914         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
10915         void *.
10916         (freeaddrinfo): Free ai->ai_canonname when set.
10917
10918 2005-09-12  Derek Price  <derek@ximbiot.com>
10919
10920         Make canon-host require getaddrinfo.
10921         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
10922         AC_LIBSOURCE canon-host.h.  Call...
10923         (gl_PREREQ_CANON_HOST): ...this new function, which requires
10924         gl_GETADDRINFO.
10925         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
10926
10927 2005-09-12  Derek Price  <derek@ximbiot.com>
10928
10929         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
10930         LGPL.
10931         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
10932
10933 2005-09-12  Derek Price  <derek@ximbiot.com>
10934
10935         * lib/gai_strerror.c: Include config.h when available.  Include
10936         getaddrinfo.h before other headers to test interface.
10937         Reported by Larry Jones <lawrence.jones@ugs.com>.
10938
10939 2005-09-12  Derek Price  <derek@ximbiot.com>
10940             Paul Eggert  <eggert@cs.ucla.edu>
10941
10942         * modules/glob (Files): Add glob-libc.h.
10943
10944 2005-09-12  Derek Price  <derek@ximbiot.com>
10945             Paul Eggert  <eggert@cs.ucla.edu>
10946
10947         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
10948         glob_.h, glob-libc.h.
10949         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
10950
10951 2005-09-12  Derek Price  <derek@ximbiot.com>
10952             Paul Eggert  <eggert@cs.ucla.edu>
10953
10954         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
10955         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
10956         protecting things that should be done only in gnulib contexts.
10957         * lib/glob_.h: New file, containing only the glob things needed for
10958         gnulib.
10959         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
10960         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
10961         (glob, globfree, glob_pattern_p): Now defined simply in terms of
10962         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
10963         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
10964         and to respect the namespace rules better.
10965
10966 2005-09-08  Simon Josefsson  <jas@extundo.com>
10967
10968         * modules/socklen: New file.
10969
10970 2005-09-08  Simon Josefsson  <jas@extundo.com>
10971
10972         * m4/socklen.m4: New file.
10973
10974 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10975
10976         * modules/utimens (Files): Add m4/utimbuf.m4, since
10977         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
10978         Reported by Sergey Poznyakoff.
10979
10980 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10981
10982         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
10983         definitions, since that's the preferred style in glibc.
10984         Fix a minor spacing issue, and update copyright notice to match
10985         glibc's.
10986
10987 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10988
10989         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
10990
10991 2005-09-06  Simon Josefsson  <jas@extundo.com>
10992
10993         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
10994         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
10995
10996 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10997
10998         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
10999         warning.
11000
11001 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11002
11003         * config/srclist.txt: Add glibc bug 1302.
11004
11005 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11006
11007         Change bitset word type from unsigned int to unsigned long int,
11008         as this has better performance on typical 64-bit hosts.
11009         Port bitset code to hosts with unusual word sizes.
11010         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11011         (build_collating_symbol):
11012         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11013         argument is a bitset.  This is merely a style issue, but it makes
11014         it clearer that an entire array is expected.
11015         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11016         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11017         Port to the case where bitset_word is not the same as unsigned int.
11018         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11019         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11020         Likewise.
11021         * lib/regexec.c (check_dst_limits_calc_pos_1,
11022         check_subexp_matching_top):
11023         (build_trtable, group_nodes_into_DFAstates):
11024         Likewise.
11025         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11026         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11027         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11028         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11029         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11030         * lib/regcomp.c (optimize_subexps, lower_subexp):
11031         Work even if bitset_word has holes in its bitwise representation.
11032         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11033         * lib/regexec.c (check_dst_limits_calc_pos_1,
11034         check_subexp_matching_top):
11035         Likewise.
11036         * lib/regex_internal.c (re_string_reconstruct):
11037         Don't assume UCHAR_MAX == 255.
11038         * lib/regex_internal.h (bitset_set_all): Likewise.
11039         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
11040         All uses changed.
11041         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
11042         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
11043         All uses changed.
11044         (BITSET_WORD_MAX): New macro.
11045         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
11046         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
11047         (bitset_empty, bitset_copy):
11048         Prefer sizeof (bitset) to multiplying it out ourselves.
11049         (bitset_not_merge): Remove; unused.
11050         (bitset_contain): Return bool, not unsigned int with one bit on.
11051         All callers changed.
11052         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
11053         alignment than re_node_set; do this by defining a new internal
11054         type struct dests_alloc and using it to allocate memory.
11055
11056 2005-09-05  Bruno Haible  <bruno@clisp.org>
11057
11058         * gnulib-tool (func_import): Fix comparison in handling of symbolic
11059         links.
11060
11061 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
11062
11063         * modules/size_max (Makefile.am): Add size_max.h
11064
11065 2005-09-04  Derek Price  <derek@ximbiot.com>
11066
11067         * gnulib-tool (func_import): Fix reversed $symbolic logic.
11068
11069 2005-09-03  Simon Josefsson  <jas@extundo.com>
11070
11071         * gnulib-tool: Fix typo.
11072
11073 2005-09-03  Simon Josefsson  <jas@extundo.com>
11074
11075         * config/srclist.txt: Add glibc bug 1293.
11076
11077 2005-09-03  Derek Price  <derek@ximbiot.com>
11078
11079         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
11080         From Larry Jones <lawrence.jones@ugs.com>.
11081
11082 2005-09-02  Simon Josefsson  <jas@extundo.com>
11083
11084         * modules/socklen: New file.
11085
11086 2005-09-02  Simon Josefsson  <jas@extundo.com>
11087
11088         * modules/havelib: New module.
11089
11090         * modules/gettext, modules/iconv, modules/lock, modules/readline:
11091         Use havelib.
11092
11093 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11094
11095         Check for arithmetic overflow when calculating sizes, to prevent
11096         some buffer-overflow issues.  These patches are conservative, in the
11097         sense that when I couldn't determine whether an overflow was possible,
11098         I inserted a run-time check.
11099         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
11100         macros.
11101         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
11102         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
11103         (re_xnrealloc, re_x2nrealloc): New inline functions.
11104         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
11105         parse_bracket_exp):
11106         (build_equiv_class, build_charclass): Check for arithmetic overflow
11107         in size expression calculations.
11108         * lib/regex_internal.c (re_string_realloc_buffers):
11109         (build_wcs_upper_buffer, re_node_set_add_intersect):
11110         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
11111         (re_dfa_add_node, register_state): Likewise.
11112         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
11113         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
11114         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
11115         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
11116
11117 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11118
11119         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
11120         m4/ulonglong.m4.  Problem reported by Martin Lambers.
11121
11122 2005-09-02  Bruno Haible  <bruno@clisp.org>
11123
11124         Support for lib vs. lib64 distinction on biarch platforms.
11125         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
11126         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
11127         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
11128
11129 2005-09-02  Bruno Haible  <bruno@clisp.org>
11130
11131         * gnulib-tool (import): In the other first-use case, provide defaults
11132         as well.
11133
11134 2005-09-02  Bruno Haible  <bruno@clisp.org>
11135
11136         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
11137         patches not yet found in the latest gettext release.
11138
11139 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11140
11141         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
11142         to avoid a collision with bits/local_lim.h in glibc.
11143         All uses changed.  Problem reported by Dmitry V. Levin in
11144         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
11145
11146         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
11147         bugs in int versus size_t comparisons.
11148         (re_string_context_at): Fix bug where the code assumed that
11149         Idx is signed.
11150
11151         Use bool where appropriate.
11152         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
11153         All callers changed.
11154         (calc_eclosure_iter): Likewise, for ROOT arg.
11155         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
11156         (build_charclass_op): Likewise, for NON_MATCH arg.
11157         * lib/regex_internal.c (re_string_allocate, re_string_construct):
11158         (re_string_construct_common): Likewise, for ICASE arg.
11159         * lib/regexec.c (re_search_2_stub, re_search_stub):
11160         Likewise, for RET_LEN arg.
11161         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
11162         (set_regs): Likewise, for FL_BACKTRACK arg.
11163         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
11164         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
11165         (calc_eclosure_iter, parse_bracket_exp):
11166         Use bool for internal variables that are booleans.
11167         * lib/regexec.c (re_search_internal, check_matching,
11168         proceed_next_node):
11169         (set_regs, build_sifted_states, sift_states_bkref):
11170         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
11171         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11172         (find_collation_sequence_value):
11173         Likewise.
11174         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
11175         (re_node_set_compare):
11176         Return bool, not int. All callers changed.
11177         * lib/regexec.c (check_halt_node_context, check_dst_limits):
11178         (build_trtable, check_node_accept): Likewise.
11179         * lib/regex_internal.h: Include stdbool.h.
11180
11181         Fix bugs uncovered when converting to bool.
11182         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
11183         failure instead of charging ahead blindly.
11184         * lib/regex_internal.c (register_state): Likewise.
11185         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
11186         for freeing internal storage.
11187         (group_nodes_into_DFA_states): Use unsigned int, not int, for
11188         bitset pieces used as boolean, to avoid undefined behavior
11189         on hosts that do int overflow checking.
11190
11191 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11192
11193         * config/srclist.txt: Add glibc bugs 1285-1287.
11194
11195 2005-09-01  Jim Meyering  <jim@meyering.net>
11196
11197         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
11198         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
11199         Require gl_STAT_MACROS, too.
11200
11201 2005-09-01  Bruno Haible  <bruno@clisp.org>
11202
11203         * gnulib-tool (import): In the first-use case, provide defaults.
11204
11205 2005-09-01  Bruno Haible  <bruno@clisp.org>
11206
11207         * gnulib-tool (func_import): Remove the .tmp files.
11208
11209 2005-09-01  Bruno Haible  <bruno@clisp.org>
11210
11211         * gnulib-tool (func_import): Fix handling of symbolic links.
11212
11213 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11214
11215         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
11216         old glibc regex code mishandles strings longer than 2**31 bytes.
11217         This patch fixes this when the regex code is used in gnulib
11218         (i.e., outside glibc).
11219
11220         This patch should not affect the use of the regex code inside
11221         glibc.  No doubt this problem also needs to be handled for glibc
11222         as well, but the result will be an incompatible change to the
11223         glibc ABI, and the old ABI will have to be supported too.  That
11224         can be the the subject for another patch.
11225
11226         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
11227         governing whether the rest of this patch is active.  By default,
11228         the macro is disabled and the patch has no effect.
11229         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
11230         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
11231         (struct re_pattern_buffer, re_search, re_search_2, re_match):
11232         (re_match_2, re_set_registers): Use the new types.
11233         * lib/regex_internal.h (Idx, re_hashval_t): New types.
11234         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
11235         New macros.
11236         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
11237         (re_string_context_at, bin_tree_t, re_dfastate_t):
11238         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
11239         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
11240         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
11241         (re_string_char_size_at, re_string_wchar_at):
11242         (re_string_elem_size_at):
11243         Use the new types and macros to port to 64-bit hosts.
11244         Use unsigned types for internal values, so that the code
11245         mostly works even for arrays larger than SSIZE_MAX.
11246         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
11247         (search_duplicated_node, calc_eclosure_iter, fetch_number):
11248         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
11249         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
11250         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
11251         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
11252         (calc_inveclosure, parse_dup_op, build_range_exp):
11253         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
11254         (fetch_number, create_token_tree, mark_opt_subexp):
11255         Likewise.
11256         * lib/regex_internal.c (re_string_construct_common,
11257         create_ci_newstate):
11258         (create_cd_newstate, re_string_allocate, re_string_construct):
11259         (re_string_realloc_buffers, build_wcs_upper_buffer):
11260         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11261         (re_string_reconstruct, re_string_peek_byte_case):
11262         (re_string_fetch_byte_case, re_string_context_at):
11263         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11264         (re_node_set_init_copy, re_node_set_add_intersect):
11265         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11266         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11267         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11268         (re_acquire_state, re_acquire_state_context, register_state):
11269         Likewise.
11270         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
11271         search_cur_bkref_entry):
11272         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
11273         (re_search_internal, re_search_2_stub, re_search_stub)
11274         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11275         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11276         (update_cur_sifted_state, check_dst_limits):
11277         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11278         (check_subexp_limits, sift_states_bkref, merge_state_array):
11279         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11280         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11281         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11282         (expand_bkref_cache, check_node_accept_bytes):
11283         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11284         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11285         (acquire_init_state_context, check_halt_node_context):
11286         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11287         (sift_states_backward, clean_state_log_if_needed):
11288         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11289         (find_recover_state, transit_state_sb, transit_state_mb):
11290         (transit_state_bkref, build_trtable, match_ctx_clean):
11291         Likewise.
11292         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11293         to work around an assumption that REG_MISSING is negative.
11294
11295         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11296         (seek_collating_symbol_entry) [defined _LIBC]:
11297         (lookup_collation_sequence_value) [defined _LIBC]:
11298         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11299         Use prototypes rather than old-style function definitions.
11300         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11301         (transit_state_sb) [0]:
11302         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11303
11304         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11305         rm_eo.
11306
11307         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11308         (optimize_subexps, lower_subexp):
11309         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11310         since the signed shift might overflow.  Use 1u<<31 instead.
11311         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11312         Likewise.
11313         * lib/regexec.c (check_dst_limits_calc_pos_1,
11314         check_subexp_matching_top): Likewise.
11315
11316         * lib/regcomp.c (optimize_subexps, lower_subexp):
11317         Use CHAR_BIT rather than 8, for clarity.
11318         * lib/regexec.c (check_dst_limits_calc_pos_1):
11319         (check_subexp_matching_top): Likewise.
11320         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11321         have to worry about portability issues when shifting it left.
11322         Remove no-longer-needed test for table_size > 0.
11323         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11324         in a word, as the resulting behavior is undefined.
11325         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11326         in one case, a <= should have been an <, and in another case the
11327         whole test was missing.
11328         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11329         the standard name CHAR_BIT.
11330         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11331         this is not true on one's complement and signed-magnitude hosts.
11332
11333         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11334         next_last_offset.
11335         (struct re_dfa_t): Remove unused member states_alloc.
11336         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11337
11338 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11339
11340         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11341         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11342         and large-file glibc and in 32-bit large-file Solaris.
11343
11344 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11345
11346         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11347         lengths fit in regoff_t; this isn't true if regoff_t is the same
11348         width as size_t.
11349         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11350         (= START + RANGE) instead of RANGE.  This avoids overflow
11351         problems when regoff_t is the same width as size_t.
11352         All callers changed.
11353         (re_search_2_stub): Check for overflow when adding the
11354         sizes of the two strings.
11355         (re_search_stub): Check for overflow when adding START
11356         to RANGE; if it occurs, substitute the extreme value.
11357
11358 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11359
11360         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11361
11362 2005-08-31  Jim Meyering  <jim@meyering.net>
11363
11364         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11365         a pointer-to-const.
11366         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11367         (register_state): Likewise.
11368         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11369         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11370         (group_nodes_into_DFAstates): Likewise.
11371
11372 2005-08-31  Jim Meyering  <jim@meyering.net>
11373
11374         * check-module: Add a FIXME comment.
11375
11376 2005-08-31  Eric Blake  <ebb9@byu.net>
11377
11378         * modules/unistd-safer (Files): Add unistd--.h.
11379         * modules/stdio-safer (Files): Add stdio--.h.
11380
11381 2005-08-31  Derek Price  <derek@ximbiot.com>
11382
11383         * lib/getdelim.c (getdelim): Return EOF on EOF.
11384         Reported by Larry Jones <lawrence.jones@ugs.com>.
11385
11386 2005-08-31  Bruno Haible  <bruno@clisp.org>
11387
11388         Avoid unnecessary diffs in the generated lib/Makefile.am.
11389         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11390         the generated files.
11391         (func_import): Don't set cmd.
11392
11393 2005-08-31  Bruno Haible  <bruno@clisp.org>
11394
11395         * lib/strstr.c: Include <stddef.h>, for NULL.
11396         * lib/strcasestr.c: Likewise.
11397         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11398
11399 2005-08-31  Bruno Haible  <bruno@clisp.org>
11400
11401         * gnulib-tool: New option --macro-prefix.
11402         (func_import): Use macro_prefix.
11403         (import): Handle option --macro-prefix.
11404
11405 2005-08-31  Bruno Haible  <bruno@clisp.org>
11406
11407         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11408         Also use new variables cached_lgpl, cached_libtool.
11409
11410 2005-08-31  Bruno Haible  <bruno@clisp.org>
11411
11412         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11413         always instantiating them.
11414
11415 2005-08-31  Bruno Haible  <bruno@clisp.org>
11416
11417         * gnulib-tool (func_import): Read the previous cached settings
11418         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
11419         earlier added by gnulib but are now dropped. Warn when a gnulib file
11420         overwrites a non-gnulib file.
11421
11422 2005-08-31  Bruno Haible  <bruno@clisp.org>
11423
11424         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11425         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11426         projects that don't keep autogenerated files in CVS. Put into
11427         actioncmd only the specified modules, not the transitive closure.
11428
11429 2005-08-31  Bruno Haible  <bruno@clisp.org>
11430
11431         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11432         Create directories that shall be filled.
11433         (import): Don't look for gl_* macros in configure.ac. Recurse across
11434         all directories containing a gnulib-cache.m4 files, if meaningful.
11435
11436 2005-08-31  Bruno Haible  <bruno@clisp.org>
11437
11438         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
11439         (import): Set seen_libtool when we see gl_LIBTOOL.
11440
11441 2005-08-31  Bruno Haible  <bruno@clisp.org>
11442
11443         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
11444         declaration macro definitions from generated gnulib.m4.
11445
11446 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
11447
11448         * lib/iconvme.h: Add prototype for iconv_alloc.
11449
11450 2005-08-29  Simon Josefsson  <jas@extundo.com>
11451
11452         * lib/iconvme.c: Fix errno.
11453
11454 2005-08-29  Bruno Haible  <bruno@clisp.org>
11455
11456         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
11457         that it works when the directory contains spaces.
11458
11459 2005-08-29  Bruno Haible  <bruno@clisp.org>
11460
11461         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
11462
11463 2005-08-29  Bruno Haible  <bruno@clisp.org>
11464
11465         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
11466         Emit more advice.
11467
11468 2005-08-29  Bruno Haible  <bruno@clisp.org>
11469         and Stepan Kasal  <kasal@ucw.cz>
11470
11471         * check-module: If more parameters are given, check each of them
11472         separately; add more exceptions, as noted by Jim Meyering.
11473         (check_module): New procedure.
11474         (%exempt_header): Now contains all exceptions.
11475
11476 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
11477
11478         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
11479
11480 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
11481
11482         * lib/iconvme.c: Split iconv_string into iconv_alloc.
11483
11484 2005-08-28  Bruno Haible  <bruno@clisp.org>
11485
11486         * m4/gnulib-tool.m4: New file.
11487
11488 2005-08-27  Jim Meyering  <jim@meyering.net>
11489
11490         * modules/unistd-safer (Files): Add pipe-safer.c.
11491         * modules/fcntl-safer (Files): Add creat-safer.c.
11492
11493 2005-08-27  Jim Meyering  <jim@meyering.net>
11494
11495         * m4/stdlib-safer.m4: New file.  From coreutils.
11496         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11497         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11498         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11499         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11500         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11501
11502 2005-08-27  Jim Meyering  <jim@meyering.net>
11503
11504         * lib/fopen-safer.c: Merge minor changes from coreutils.
11505         * lib/dup-safer.c: Likewise.
11506         * lib/fd-safer.c: Likewise.
11507
11508         Merge from coreutils.
11509         * lib/stdio--.h: New file.
11510         * lib/stdlib--.h: New file.
11511         * lib/mkstemp-safer.c: New file.
11512
11513         GNU tar needs these.
11514         * lib/pipe-safer.c: New file.
11515         * lib/creat-safer.c: New file.
11516         * lib/fcntl--.h (creat): Define to creat_safer.
11517         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11518         * lib/unistd--.h (pipe): Define to pipe_safer.
11519         * lib/unistd-safer.h: Declare pipe_safer.
11520
11521 2005-08-26  Simon Josefsson  <jas@extundo.com>
11522
11523         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11524         Haible <bruno@clisp.org>.
11525
11526 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11527
11528         * lib/regex_internal.h: Remove all references to
11529         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11530         or better.
11531         (bitset_not, bitset_merge, bitset_not_merge):
11532         (bitset_mask, re_string_allocate, re_string_construct):
11533         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11534         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11535         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11536         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11537         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11538         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11539         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11540         (re_acquire_state_context):
11541         Remove unnecessary forward decls.
11542         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11543         Put __attribute at function definition,
11544         now that the function decl has been removed.
11545         * lib/regex_internal.c (re_string_peek_byte_case):
11546         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11547         Likewise.
11548
11549 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11550
11551         * m4/regex.m4: Add AC_PREREQ(2.50).
11552         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11553
11554 2005-08-25  Simon Josefsson  <jas@extundo.com>
11555
11556         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11557         __fsetlocking.
11558
11559 2005-08-25  Simon Josefsson  <jas@extundo.com>
11560
11561         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11562         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11563         GLIBC specific code.
11564
11565 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11566
11567         Make regex safe for g++.  This fixes one real bug (an "err"
11568         that should have been "*err").  g++ problem reported by
11569         Sam Steingold.
11570         * lib/regex_internal.h (re_calloc): New macro, consistent with
11571         re_malloc etc.  All callers of calloc changed to use re_calloc.
11572         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11573         not int.  All callers changed.
11574         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11575         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11576         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11577         (find_recover_state): Change "err" to "*err"; this fixes what
11578         appears to be a real bug.
11579         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11580         versus int.
11581
11582 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11583
11584         * modules/regex (Depends-on): Add malloc, since the code
11585         assumes that !malloc(0) means failure.
11586
11587 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11588
11589         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11590
11591         alloca modernization/simplification for regex.
11592         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11593         needs to be at the start of the file, and can be moved into
11594         regex_internal.h and simplified.
11595         * lib/regex_internal.h: Include <alloca.h>.
11596         (__libc_use_alloca) [!defined _LIBC]: New macro.
11597         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11598         now works outside glibc.
11599
11600 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11601
11602         * config/srclist.txt: Add glibc bugs 1241, 1245.
11603
11604 2005-08-25  Jim Meyering  <jim@meyering.net>
11605
11606         * lib/open-safer.c: Include <config.h>.
11607         Otherwise, we'd lose LARGEFILE support in any file using
11608         e.g. "fcntl--.h"
11609
11610 2005-08-25  Bruno Haible  <bruno@clisp.org>
11611
11612         * m4/minmax.m4: Require autoconf 2.52.
11613         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11614         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11615         alternatives of translit over the alphabet.
11616         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11617
11618 2005-08-24  Simon Josefsson  <jas@extundo.com>
11619
11620         * tests/test-getpass.c: New file.
11621
11622 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11623
11624         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11625         for GNU regex features.
11626
11627 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11628
11629         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11630         * lib/regex.h (regerror): Likewise.
11631
11632         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11633         requires this.  (The code never needed it.)
11634
11635         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11636         All uses of recently-renamed identifiers changed to use the new,
11637         POSIX-compliant names.  The code will build and run just fine
11638         without these changes, but it's better to eat our own dog food
11639         and use the standard-conforming names.
11640
11641         * lib/regex.h: Fix a multitude of POSIX name space violations.
11642         These changes have an effect only for programs that define
11643         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11644         do not change anything for programs compiled in the normal way.
11645         Also, there is no effect on the ABI.
11646
11647         (_REGEX_SOURCE): New macro.
11648         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11649         defined and _GNU_SOURCE is not; this fixes a name space violation.
11650
11651         Rename the following macros to obey POSIX requirements.
11652         The old names are still visible as macros if _REGEX_SOURCE is defined.
11653         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11654         RE_BACKSLASH_ESCAPE_IN_LISTS.
11655         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11656         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11657         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11658         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11659         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11660         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11661         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11662         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11663         (REG_INTERVALS): renamed from RE_INTERVALS.
11664         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11665         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11666         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11667         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11668         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11669         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11670         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11671         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11672         RE_UNMATCHED_RIGHT_PAREN_ORD.
11673         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11674         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11675         (REG_DEBUG): renamed from RE_DEBUG.
11676         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11677         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11678         unusual, since we can't clash with the POSIX REG_ICASE.
11679         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11680         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11681         (REG_NO_SUB): renamed from RE_NO_SUB.
11682         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11683         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11684         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11685         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11686         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11687         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11688         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11689         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11690         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11691         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11692         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11693         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11694         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11695         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11696         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11697         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11698         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11699         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11700         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11701         (REG_FIXED): Renamed from REGS_FIXED.
11702         (REG_NREGS): Renamed from RE_NREGS.
11703
11704         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11705         of other REG_* macros, since POSIX says the user is allowed to
11706         #undef these macros selectively.
11707
11708         (reg_errcode_t): Update comment stating what other tables need
11709         to be consistent.
11710
11711         Rename the following enum values to obey POSIX requirements.
11712         The old names are still visible as macros.
11713         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11714         is not defined, since GNU is supposed to be a superset of POSIX as
11715         much as possible, and since we want reg_errcode_t to be a signed
11716         type for implementation consistency.
11717         (_REG_NOERROR): Renamed from REG_NOERROR.
11718         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11719         (_REG_BADPAT): Renamed from REG_BADPAT.
11720         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11721         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11722         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11723         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11724         (_REG_EBRACK): Renamed from REG_EBRACK.
11725         (_REG_EPAREN): Renamed from REG_EPAREN.
11726         (_REG_EBRACE): Renamed from REG_EBRACE.
11727         (_REG_BADBR): Renamed from REG_BADBR.
11728         (_REG_ERANGE): Renamed from REG_ERANGE.
11729         (_REG_ESPACE): Renamed from REG_ESPACE.
11730         (_REG_BADRPT): Renamed from REG_BADRPT.
11731         (_REG_EEND): Renamed from REG_EEND.
11732         (_REG_ESIZE): Renamed from REG_ESIZE.
11733         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11734         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11735         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11736         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11737         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11738
11739         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11740         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11741         changed.  But support the old name if the new one is not defined
11742         and if _REGEX_SOURCE.
11743
11744         Change the following member names in struct re_pattern_buffer.
11745         The old names are still supported if !_REGEX_SOURCE.
11746         The new names are always supported, regardless of _REGEX_SOURCE.
11747         (re_buffer): Renamed from buffer.
11748         (re_allocated): Renamed from allocated.
11749         (re_used): Renamed from used.
11750         (re_syntax): Renamed from syntax.
11751         (re_fastmap): Renamed from fastmap.
11752         (re_translate): Renamed from translate.
11753         (re_can_be_null): Renamed from can_be_null.
11754         (re_regs_allocated): Renamed from regs_allocated.
11755         (re_fastmap_accurate): Renamed from fastmap_accurate.
11756         (re_no_sub): Renamed from no_sub.
11757         (re_not_bol): Renamed from not_bol.
11758         (re_not_eol): Renamed from not_eol.
11759         (re_newline_anchor): Renamed from newline_anchor.
11760
11761         Change the following member names in struct re_registers.
11762         The old names are still supported if !_REGEX_SOURCE.
11763         The new names are always supported, regardless of _REGEX_SOURCE.
11764         (rm_num_regs): Renamed from num_regs.
11765         (rm_start): Renamed from start.
11766         (rm_end): Renamed from end.
11767
11768         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
11769         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
11770         Prepend __ to parameter names.
11771
11772         Undo yesterday's changes.
11773
11774 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11775
11776         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
11777         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
11778         lib/regex.c.
11779
11780 2005-08-24  Jim Meyering  <jim@meyering.net>
11781
11782         Sync from coreutils.
11783         * m4/fcntl-safer.m4: New file.
11784
11785         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
11786         and object files for this module.
11787
11788 2005-08-24  Jim Meyering  <jim@meyering.net>
11789
11790         Sync from coreutils.
11791         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
11792
11793 2005-08-24  Jim Meyering  <jim@meyering.net>
11794
11795         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
11796         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
11797
11798 2005-08-24  Jim Meyering  <jim@meyering.net>
11799
11800         * modules/fcntl-safer: New module.
11801         * modules/fts (Depends-on): Add fcntl-safer.
11802         * MODULES.html.sh (File descriptor based Input/Output):
11803         Add fcntl-safer.
11804
11805 2005-08-24  Bruno Haible  <bruno@clisp.org>
11806
11807         Support for unit test modules.
11808         * modules/README: Mention tests modules.
11809         * modules/TEMPLATE-TESTS: New file.
11810         * gnulib-tool: New options --extract-tests-module, --with-tests and
11811         --tests-base (unused for the moment).
11812         (testsbase, inctests): New variables.
11813         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
11814         (func_verify_module): Exclude TEMPLATE-TESTS.
11815         (func_verify_nontests_module, func_verify_tests_module): New functions.
11816         (func_get_dependencies): Add implicit dependency for tests modules.
11817         (func_get_tests_module): New function.
11818         (func_modules_transitive_closure): When --with-tests was specified,
11819         include the unit tests as well, unless explicitly avoided.
11820         (func_emit_lib_Makefile_am): Ignore the tests modules here.
11821         (func_emit_tests_Makefile_am): New function.
11822         (func_create_testdir): When --with-tests was specified, emit a
11823         tests/ directory.
11824         * MODULES.html.sh (Future developments): Update.
11825
11826 2005-08-24  Bruno Haible  <bruno@clisp.org>
11827
11828         * modules/tls-tests: New file.
11829         * tests/test-tls.c: New file, from GNU gettext.
11830
11831 2005-08-24  Bruno Haible  <bruno@clisp.org>
11832
11833         * modules/lock-tests: New file.
11834         * tests/test-lock.c: New file, from GNU gettext.
11835
11836 2005-08-24  Bruno Haible  <bruno@clisp.org>
11837
11838         * lib/lock.h: Add multiple inclusion guard.
11839         * lib/tls.h: Add multiple inclusion guard.
11840
11841 2005-08-24  Bruno Haible  <bruno@clisp.org>
11842
11843         * gnulib-tool: Add support for the --aux-dir option to
11844         --create-testdir, --create-megatestdir, --test, --megatest.
11845         (func_create_testdir, func_create_megatestdir): Optionally emit a
11846         AC_CONFIG_AUX_DIR directive.
11847         (create-testdir, create-megatestdir, test, megatest): Provide a
11848         default value for $auxdir.
11849
11850 2005-08-24  Bruno Haible  <bruno@clisp.org>
11851
11852         * gnulib-tool (import): Use compound statement instead of subshell
11853         where possible.
11854
11855 2005-08-24  Bruno Haible  <bruno@clisp.org>
11856
11857         * gnulib-tool (import): Change --aux-dir default to "build-aux".
11858
11859 2005-08-24  Bruno Haible  <bruno@clisp.org>
11860
11861         * gnulib-tool (func_version): Update.
11862
11863 2005-08-24  Bruno Haible  <bruno@clisp.org>
11864
11865         * gnulib-tool (func_import, func_create_testdir,
11866         func_create_megatestdir): Quote all autoconf macro arguments.
11867
11868 2005-08-24  Bruno Haible  <bruno@clisp.org>
11869
11870         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
11871         option --force, because --force causes the aclocal.m4 of each
11872         subdirectory to be newer than the corresponding config.h.in.
11873
11874 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11875
11876         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
11877         All contents moved to gl_REGEX.
11878         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
11879         assume that it does.
11880
11881 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11882
11883         * lib/regex.h (REG_NOSYS)
11884         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
11885         Define, since POSIX requires it as of 2001.
11886         (_REG_ENOSYS)
11887         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
11888         New private symbol, used to keep the enum signed in all cases.
11889         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
11890         Youngman in
11891         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
11892
11893         * lib/regex_internal.c (re_string_skip_chars, register_state):
11894         (calc_state_hash):
11895         Remove forward decls; no longer needed now that we use prototypes.
11896         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
11897         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
11898         (clean_state_log_if_needed): Likewise.
11899
11900 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11901
11902         * config/srclist.txt: Add glibc bugs 1231-1233.
11903
11904 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11905
11906         Fix problems reported by Sam Steingold in
11907         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
11908         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
11909         assumed that reg_errcode_t is a signed type, which is not
11910         necessarily true if _XOPEN_SOURCE is not defined.
11911         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
11912         since some compilers warn about it otherwise.
11913
11914 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11915
11916         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
11917         (init_word_char, create_initial_state, duplicate_node_closure):
11918         (fetch_token, peek_token_bracket, build_range_exp):
11919         (build_collating_symbol): Remove forward decls; no longer needed
11920         now that we use prototypes.
11921
11922         * lib/regcomp.c:
11923         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
11924         (re_compile_fastmap_iter, regcomp, regerror, regfree):
11925         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
11926         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
11927         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
11928         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
11929         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
11930         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
11931         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
11932         (build_range_exp, build_collating_symbol, parse_bracket_exp):
11933         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
11934         (build_charclass, build_charclass_op, fetch_number, create_tree):
11935         (create_token_tree, mark_opt_subexp, duplicate_tree):
11936         Use prototypes rather than old-style definitions.
11937
11938         * lib/regex_internal.c:
11939         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
11940         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
11941         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11942         (re_string_reconstruct, re_string_peek_byte_case):
11943         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
11944         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11945         (re_node_set_init_copy, re_node_set_add_intersect):
11946         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11947         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11948         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11949         (re_acquire_state, re_acquire_state_context, register_state):
11950         (create_ci_newstate, create_cd_newstate, free_state):
11951         Likewise.
11952         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
11953         re_search_2):
11954         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
11955         (re_search_internal, prune_impossible_nodes):
11956         (acquire_init_state_context, check_matching, static):
11957         (check_halt_node_context, check_halt_state_context, proceed_next_node):
11958         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
11959         (update_regs, sift_states_backward, build_sifted_states):
11960         (clean_state_log_if_needed, merge_state_array):
11961         (update_cur_sifted_state, add_epsilon_src_nodes):
11962         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
11963         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
11964         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
11965         (find_recover_state, check_subexp_matching_top, transit_state_mb):
11966         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
11967         (check_arrival, check_arrival_add_next_nodes):
11968         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11969         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11970         (check_node_accept_bytes, check_node_accept, extend_buffers):
11971         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
11972         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
11973         (sift_ctx_init):
11974         Likewise.
11975
11976         * lib/regex_internal.h:
11977         (re_string_allocate, re_string_construct, re_string_reconstruct):
11978         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
11979         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
11980         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
11981         (re_string_context_at, re_string_peek_byte_case):
11982         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
11983         is defined, since we now use prototypes always.
11984
11985         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
11986         C89 or better.  All uses removed.
11987
11988 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11989
11990         * config/srclist.txt: Add glibc bugs 1220-1227.
11991
11992 2005-08-20  Jim Meyering  <jim@meyering.net>
11993
11994         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
11995         of unused local, dfa.
11996
11997 2005-08-20  Bruno Haible  <bruno@clisp.org>
11998
11999         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12000
12001 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12002
12003         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12004         (re_node_set_insert_last, re_dfa_add_node):
12005         Rename local variables to avoid GCC shadowing warnings.
12006
12007 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12008
12009         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12010         [defined lint]: Suppress bogus uninitialized-variable warnings.
12011
12012         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12013         and let the caller return REG_ESPACE if out of space.  This
12014         removes an uninitialied-variable warning with GCC 4.0.1, and also
12015         avoids taking the address of a local variable.  All callers
12016         changed.
12017
12018 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12019
12020         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12021         $LIBCSRC/posix/regexec.c.
12022         Add glibc bug 1217 for regcomp.c.
12023
12024 2005-08-19  Jim Meyering  <jim@meyering.net>
12025
12026         * lib/regexec.c (proceed_next_node): Redo local variables to
12027         avoid GCC shadowing warnings.
12028
12029 2005-08-18  Bruno Haible  <bruno@clisp.org>
12030
12031         * lib/strstr.c (strstr): Fix return value in multibyte case.
12032         * lib/strcasestr.c (strcasestr): Likewise.
12033
12034 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12035
12036         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12037
12038 2005-08-17  Jim Meyering  <jim@meyering.net>
12039
12040         Make the %s format (seconds since the epoch) work for a negative
12041         number and when used with a zero-padded field width, e.g. %015s.
12042
12043         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
12044         label so that it precedes the code to set `digits'.  Otherwise,
12045         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
12046         print `00-22'.  Now, it prints `-0022', as it should.
12047
12048 2005-08-17  Bruno Haible  <bruno@clisp.org>
12049
12050         * modules/strstr (Files): Add m4/mbrtowc.m4.
12051         (Depends-on): Add mbuiter.
12052
12053 2005-08-17  Bruno Haible  <bruno@clisp.org>
12054
12055         * modules/strcasestr: New file.
12056         * MODULES.html.sh (String handling, based on ANSI C 89): Add
12057         strcasestr.
12058
12059 2005-08-17  Bruno Haible  <bruno@clisp.org>
12060
12061         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
12062
12063 2005-08-17  Bruno Haible  <bruno@clisp.org>
12064
12065         * modules/mbuiter: New file.
12066         * MODULES.html.sh (Extended multibyte and wide character utilities):
12067         Add mbuiter.
12068
12069 2005-08-17  Bruno Haible  <bruno@clisp.org>
12070
12071         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
12072         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
12073
12074 2005-08-17  Bruno Haible  <bruno@clisp.org>
12075
12076         * m4/strcasestr.m4: New file.
12077
12078 2005-08-17  Bruno Haible  <bruno@clisp.org>
12079
12080         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
12081         * lib/strstr.c: Completely rewritten, with multibyte locale support.
12082
12083 2005-08-17  Bruno Haible  <bruno@clisp.org>
12084
12085         * lib/strcasestr.h: New file.
12086         * lib/strcasestr.c: New file.
12087
12088 2005-08-17  Bruno Haible  <bruno@clisp.org>
12089
12090         * lib/strcasecmp.c: Use mbuiter.h.
12091
12092 2005-08-17  Bruno Haible  <bruno@clisp.org>
12093
12094         * lib/mbuiter.h: New file.
12095
12096 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12097
12098         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
12099         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
12100         and gl_GETOPT are both invoked via different paths (as happens
12101         with GNU tar CVS because it uses both argp and getopt), the former
12102         wins.
12103
12104 2005-08-16  Bruno Haible  <bruno@clisp.org>
12105
12106         * modules/tls: New file.
12107         * MODULES.html.sh (Multithreading): Add tls.
12108
12109 2005-08-16  Bruno Haible  <bruno@clisp.org>
12110
12111         * modules/strnlen1: New file.
12112         * MODULES.html.sh (String handling): Add strnlen1.
12113
12114 2005-08-16  Bruno Haible  <bruno@clisp.org>
12115
12116         * modules/strcase (Files): Add m4/mbrtowc.m4.
12117         (Depends-on): Add strnlen1, mbchar.
12118
12119 2005-08-16  Bruno Haible  <bruno@clisp.org>
12120
12121         * modules/mbiter: New file.
12122         * MODULES.html.sh (Extended multibyte and wide character utilities):
12123         Add mbiter.
12124
12125 2005-08-16  Bruno Haible  <bruno@clisp.org>
12126
12127         * modules/mbfile: New file.
12128         * MODULES.html.sh (Extended multibyte and wide character utilities):
12129         Add mbfile.
12130
12131 2005-08-16  Bruno Haible  <bruno@clisp.org>
12132
12133         * modules/mbchar: New file.
12134         * MODULES.html.sh (Extended multibyte and wide character utilities):
12135         New section.
12136
12137 2005-08-16  Bruno Haible  <bruno@clisp.org>
12138
12139         * m4/tls.m4: New file, from GNU gettext.
12140
12141 2005-08-16  Bruno Haible  <bruno@clisp.org>
12142
12143         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
12144         always.
12145         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
12146
12147 2005-08-16  Bruno Haible  <bruno@clisp.org>
12148
12149         * m4/mbiter.m4: New file.
12150
12151 2005-08-16  Bruno Haible  <bruno@clisp.org>
12152
12153         * m4/mbfile.m4: New file.
12154
12155 2005-08-16  Bruno Haible  <bruno@clisp.org>
12156
12157         * m4/mbchar.m4: New file.
12158
12159 2005-08-16  Bruno Haible  <bruno@clisp.org>
12160
12161         * lib/tls.h: New file, from GNU gettext.
12162         * lib/tls.c: New file, from GNU gettext.
12163
12164 2005-08-16  Bruno Haible  <bruno@clisp.org>
12165
12166         * lib/strnlen1.h: New file.
12167         * lib/strnlen1.c: New file.
12168
12169 2005-08-16  Bruno Haible  <bruno@clisp.org>
12170
12171         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
12172         (mbi_init): Update.
12173         (mbi_avail, mbi_advance): Let the iteration end before the terminating
12174         NUL byte, not after it.
12175
12176 2005-08-16  Bruno Haible  <bruno@clisp.org>
12177
12178         * lib/strcase.h (strcasecmp): Add note in comments.
12179         * lib/strncasecmp.c: Use code from strcasecmp.c.
12180         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
12181         (strcasecmp): Work correctly in multibyte locales.
12182
12183 2005-08-16  Bruno Haible  <bruno@clisp.org>
12184
12185         * lib/mbiter.h: New file.
12186
12187 2005-08-16  Bruno Haible  <bruno@clisp.org>
12188
12189         * lib/mbfile.h: New file.
12190
12191 2005-08-16  Bruno Haible  <bruno@clisp.org>
12192
12193         * lib/mbchar.h: New file.
12194         * lib/mbchar.c: New file.
12195
12196 2005-08-16  Bruno Haible  <bruno@clisp.org>
12197
12198         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
12199         the valid ones. Makes the comparison operations transitive:
12200         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
12201         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
12202
12203 2005-08-15  Simon Josefsson  <jas@extundo.com>
12204
12205         * modules/ssize_t (License): Change to 'unlimited'.
12206
12207         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
12208
12209 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12210
12211         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
12212         Add comments for each pending glibc patch.
12213
12214 2005-08-15  Bruno Haible  <bruno@clisp.org>
12215
12216         * lib/regex.h (__restrict_arr): Don't define to __restrict if
12217         __cplusplus is defined.
12218
12219 2005-08-14  Jim Meyering  <jim@meyering.net>
12220
12221         Sync from coreutils.
12222
12223         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
12224         Use the hash-table-based cycle-detection code not just when
12225         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
12226         Reported by James Youngman in
12227         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
12228         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
12229         FTS_TIGHT_CYCLE_CHECK.
12230         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
12231         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
12232         once again.
12233         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
12234         * lib/fts.c (fd_safer): Remove decl.
12235         Include fcntl--.h rather than unistd-safer.h
12236         (fts_safe_changedir): Don't call fd_safer; no longer needed
12237         now that we include fcntl--.h.
12238
12239 2005-08-12  Simon Josefsson  <jas@extundo.com>
12240
12241         * modules/getndelim2: Use ssize_t module.
12242         * modules/getnline: Likewise.
12243         * modules/safe-read: Likewise.
12244         * modules/xreadlink: Likewise.
12245
12246         * modules/ssize_t: New file.
12247
12248 2005-08-12  Simon Josefsson  <jas@extundo.com>
12249
12250         * m4/readline.m4: Look for termcap, curses or ncurses if required.
12251
12252 2005-08-12  Simon Josefsson  <jas@extundo.com>
12253
12254         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12255         ssize_t.
12256
12257 2005-08-12  Simon Josefsson  <jas@extundo.com>
12258
12259         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
12260         readline, getdelim and check_version.
12261         (Support for systems lacking ISO C 99: Sizes of integer types):
12262         Add size_max.
12263
12264 2005-08-12  Bruno Haible  <bruno@clisp.org>
12265
12266         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
12267
12268 2005-08-11  Simon Josefsson  <jas@extundo.com>
12269
12270         * modules/readline: New file.
12271
12272         * modules/strnlen (Files): Add strnlen.h.
12273
12274 2005-08-11  Simon Josefsson  <jas@extundo.com>
12275
12276         * m4/readline.m4: New file.
12277
12278 2005-08-11  Simon Josefsson  <jas@extundo.com>
12279
12280         * lib/readline.h, readline.c: New file.
12281
12282 2005-08-11  Simon Josefsson  <jas@extundo.com>
12283
12284         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12285         gl_AVOID.
12286
12287 2005-08-11  Bruno Haible  <bruno@clisp.org>
12288
12289         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12290
12291 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12292
12293         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12294
12295 2005-08-10  Simon Josefsson  <jas@extundo.com>
12296
12297         * tests/test-iconvme.c: New file.
12298
12299 2005-08-10  Simon Josefsson  <jas@extundo.com>
12300
12301         * m4/strnlen.m4: New file.
12302
12303         * m4/strndup.m4: Don't check for strnlen declaration, done in
12304         strnlen.m4.
12305
12306 2005-08-10  Simon Josefsson  <jas@extundo.com>
12307
12308         * lib/strndup.c: Use strnlen.h.
12309
12310         * lib/strnlen.h: New file.
12311
12312 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12313
12314         * README: Typos.
12315
12316 2005-08-02  Simon Josefsson  <jas@extundo.com>
12317
12318         * modules/readline: New file.
12319
12320 2005-08-02  Simon Josefsson  <jas@extundo.com>
12321
12322         * modules/getdelim: New file.
12323
12324         * modules/getline: Rewrite, don't use getndelim2.
12325
12326 2005-08-02  Simon Josefsson  <jas@extundo.com>
12327
12328         * m4/getline.m4: Separate out getdelim stuff into separate module.
12329
12330         * m4/getdelim.m4: New file.
12331
12332 2005-08-02  Simon Josefsson  <jas@extundo.com>
12333
12334         * lib/getline.h, getline.c: Rewrite.
12335
12336         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12337
12338 2005-07-31  Bruno Haible  <bruno@clisp.org>
12339
12340         * lib/lock.h (gl_lock_initializer): New macro.
12341         (gl_lock_define_initialized): Use it.
12342         (gl_rwlock_initializer): New macro.
12343         (gl_rwlock_define_initialized): Use it.
12344         (gl_recursive_lock_initializer): New macro.
12345         (gl_recursive_lock_define_initialized): Use it.
12346
12347 2005-07-30  Karl Berry  <karl@gnu.org>
12348
12349         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12350         Report from Ben Pfaff, regarding getopt.
12351
12352 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12353
12354         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12355         normal way.
12356         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12357         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12358         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12359         (gl_GETOPT): Use the new macros.  Most of the implementation
12360         is moved to the new macros.  This is for programs like Emacs
12361         that don't want all the functionality of gl_GETOPT.
12362
12363 2005-07-26  Bruno Haible  <bruno@clisp.org>
12364
12365         * m4/lock.m4: Update from GNU gettext.
12366
12367 2005-07-26  Bruno Haible  <bruno@clisp.org>
12368
12369         * lib/lock.h: Update from GNU gettext.
12370         * lib/lock.c: Update from GNU gettext.
12371
12372 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12373
12374         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12375         obsolescent AC_TRY_RUN.  Include the default includes files, for
12376         'exit'.
12377
12378 2005-07-24  Bruno Haible  <bruno@clisp.org>
12379
12380         * modules/visibility: New file.
12381         * MODULES.html.sh (Misc): Add visibility.
12382
12383 2005-07-24  Bruno Haible  <bruno@clisp.org>
12384
12385         * m4/visibility.m4: New file.
12386
12387 2005-07-24  Bruno Haible  <bruno@clisp.org>
12388
12389         * doc/visibility.texi: New file.
12390
12391 2005-07-22  Bruno Haible  <bruno@clisp.org>
12392
12393         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12394         $(ALLOCA_H), redundant through BUILT_SOURCES.
12395         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12396         redundant through BUILT_SOURCES.
12397         * modules/byteswap (Makefile.am): Remove explicit dependency on
12398         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12399         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12400         $(FNMATCH_H), redundant through BUILT_SOURCES.
12401         * modules/getopt (Makefile.am): Remove explicit dependency on
12402         $(GETOPT_H), redundant through BUILT_SOURCES.
12403         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12404         redundant through BUILT_SOURCES.
12405         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12406         redundant through BUILT_SOURCES.
12407         * modules/stdbool (Makefile.am): Remove explicit dependency on
12408         $(STDBOOL_H), redundant through BUILT_SOURCES.
12409         * modules/stdint (Makefile.am): Remove explicit dependency on
12410         $(STDINT_H), redundant through BUILT_SOURCES.
12411         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12412         Remove explicit dependency on $(SYSEXITS_H).
12413         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
12414
12415 2005-07-18  Simon Josefsson  <jas@extundo.com>
12416
12417         * lib/check-version.c (check_version): Accept identical versions too.
12418
12419 2005-07-18  Bruno Haible  <bruno@clisp.org>
12420
12421         * modules/lock: New file.
12422         * MODULES.html.sh (Multithreading): New section.
12423
12424 2005-07-18  Bruno Haible  <bruno@clisp.org>
12425
12426         * m4/lock.m4: New file, from GNU gettext.
12427
12428 2005-07-18  Bruno Haible  <bruno@clisp.org>
12429
12430         * lib/lock.h: New file, from GNU gettext.
12431         * lib/lock.c: New file, from GNU gettext.
12432
12433 2005-07-18  Bruno Haible  <bruno@clisp.org>
12434
12435         * lib/lock.h (gl_once_t): New type.
12436         (gl_once_define, gl_once): New macros.
12437         * lib/lock.c (fresh_once): New variable.
12438         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
12439         functions.
12440
12441 2005-07-16  Simon Josefsson  <jas@extundo.com>
12442
12443         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
12444         workaround, suggested by Bruno.
12445
12446 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12447
12448         * modules/xalloc (Depends-on): Add xalloc-die.
12449         * modules/xvasprintf (Depends-on): Add xalloc-die.
12450
12451 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12452
12453         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
12454         with a minor change.
12455
12456 2005-07-15  Bruno Haible  <bruno@clisp.org>
12457
12458         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
12459         When using lib/poll.c, define poll as rpl_poll.
12460
12461 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
12462
12463         * modules/argp (Depends-on): Remove unlocked-io.
12464
12465 2005-07-14  Derek Price  <derek@ximbiot.com>
12466
12467         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
12468         for glob symlink bug.
12469
12470 2005-07-14  Bruno Haible  <bruno@clisp.org>
12471
12472         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
12473         Instead, test for *_unlocked function declarations directly.
12474
12475 2005-07-11  Simon Josefsson  <jas@extundo.com>
12476
12477         * modules/size_max: New file.
12478
12479         * modules/xsize: Depend on size_max module for size_max.m4.
12480
12481 2005-07-11  Simon Josefsson  <jas@extundo.com>
12482
12483         * lib/size_max.h: New file.
12484
12485 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12486
12487         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12488         copyright symbol and the year.
12489         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12490         (version_etc_va): Use parameterized copyright notice.
12491         Reword to conform to the current GNU coding standards.
12492
12493 2005-07-11  Karl Berry  <karl@gnu.org>
12494
12495         * doc/gnulib.texi (Quoting): new node.
12496         (Initial import): more info, from Patrice.
12497
12498 2005-07-11  Bruno Haible  <bruno@clisp.org>
12499
12500         * gnulib-tool (func_usage): Document option --avoid.
12501         (Command line options): Handle --avoid.
12502         (func_acceptable): New function.
12503         (func_modules_transitive_closure): Use it.
12504
12505 2005-07-11  Bruno Haible  <bruno@clisp.org>
12506
12507         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12508         Reported by Jim Meyering.
12509
12510 2005-07-10  Bruno Haible  <bruno@clisp.org>
12511
12512         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12513         Needed when size_t is smaller than 'unsigned int'.
12514         Reported by Paul Eggert.
12515
12516 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12517
12518         * modules/argp (Depends-on): Add unlocked-io
12519
12520 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12521
12522         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12523         block of defines.
12524
12525 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12526
12527         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12528         fix now.
12529
12530 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12531         and Paul Eggert  <eggert@cs.ucla.edu>
12532
12533         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12534         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12535
12536 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12537
12538         * modules/regex (Files): Add lib/regex_internal.c,
12539         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12540         (Depends-on): Add extensions.
12541         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12542
12543 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12544
12545         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12546         pathconf.
12547         * m4/same.m4 (gl_SAME): Likewise.
12548         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12549
12550         * m4/regex.m4: Adjust to new libc regex implementation.
12551         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12552         all the .c and .h parts of (the new) regex.
12553         Quote the m4 stuff better.
12554         Check for RE_ICASE bug of old gnulib.
12555         Check for REG_STARTEND of recent libc.
12556         Rename local variables from jm_* to gl_*.
12557         Quote operand of "test -f".
12558         Say "recent enough" version of libc, not "version 2".
12559         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12560         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12561         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12562         Remove check for btowc, isascii.
12563         Require AM_LANGINFO_CODESET.
12564
12565 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12566
12567         * lib/regex.c, regex.h: Sync from libc.
12568         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12569         * lib/regexec.c:
12570         New files, synced from libc, except that regex_internal.h
12571         currently has a small porting fix.
12572
12573 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12574
12575         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12576         regex_internal.c, regexec.c.
12577         Add regex_internal.h too, but as a comment, since the libc version
12578         is currently broken in gnulib mode.
12579
12580 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12581
12582         Support programs like Emacs that use gnulib but not gettext.
12583         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12584         * modules/gettext-h: New file.
12585         * modules/gettext (Files): Remove lib/gettext.h.
12586         (Depends-on): Add gettext-h.
12587         (Makefile.am): Remove lib_SOURCES.
12588         * modules/argmatch, modules/c-stack, modules/closeout:
12589         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12590         * modules/execute, modules/file-type, modules/getaddrinfo:
12591         * modules/getopt, modules/human, modules/javacomp:
12592         * modules/javaexec, modules/mkdir-p, modules/obstack:
12593         * modules/openat, modules/pagealign_alloc, modules/pipe:
12594         * modules/quotearg, modules/regex, modules/rpmatch:
12595         * modules/unicodeio, modules/userspec, modules/version-etc:
12596         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12597         * modules/xsetenv:
12598         Depend on gettext-h, not gettext.
12599
12600 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12601
12602         * gnulib-tool (func_import): Add support for 'public domain' license.
12603         * modules/alloca, modules/atexit, modules/memmove:
12604         Now public domain, not GPL.
12605         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12606         * modules/realloc, modules/strerror, modules/strtod:
12607         Now LGPL, not GPL.
12608
12609 2005-07-05  Bruno Haible  <bruno@clisp.org>
12610
12611         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12612         autoconf CVS. Needed for mingw.
12613
12614 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12615
12616         Remove the dependency of the strftime module on the tzset module.
12617         * modules/strftime (Depends-on): Remove dependency on tzset.
12618
12619 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12620
12621         Remove the dependency of the strftime module on the tzset module.
12622         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12623         gl_FUNC_TZSET_CLOBBER.
12624
12625 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12626
12627         Remove the dependency of the strftime module on the tzset module.
12628         * lib/strftime.c (my_strftime)
12629         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12630         Copy the input structure, to work around some of the bug with
12631         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12632         Solaris releases, you should also use the tzset module, but we won't
12633         require it as a dependency any more since we don't want LGPLed code
12634         to depend on GPLed code.
12635
12636 2005-07-02  Jim Meyering  <jim@meyering.net>
12637
12638         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12639         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12640         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12641         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12642
12643 2005-07-02  Jim Meyering  <jim@meyering.net>
12644
12645         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12646
12647 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12648
12649         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12650         declares only 'struct timespec;' (!).
12651
12652 2005-07-01  Jim Meyering  <jim@meyering.net>
12653
12654         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12655         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12656         * lib/save-cwd.c, tempname.c:
12657         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12658         and don't include <sys/file.h>).
12659
12660 2005-06-29  Jim Meyering  <jim@meyering.net>
12661
12662         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12663         type name.  Use the variable name instead.
12664         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12665         Likewise.
12666
12667 2005-06-28  Simon Josefsson  <jas@extundo.com>
12668
12669         * modules/check-version (Files): Add check-version.m4.
12670
12671 2005-06-28  Simon Josefsson  <jas@extundo.com>
12672
12673         * m4/check-version.m4: New file, suggested by Jim Meyering
12674         <jim@meyering.net>.
12675
12676 2005-06-28  Simon Josefsson  <jas@extundo.com>
12677
12678         * lib/check-version.h, lib/check-version.c: New files.
12679
12680 2005-06-28  Simon Josefsson  <jas@extundo.com>
12681
12682         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12683         collision with global variable.  Better indentation.  Don't
12684         increment buffer pointer beyond buffer end.  Based on comments
12685         from Paul Eggert <eggert@cs.ucla.edu>.
12686
12687         * lib/base64.h: Indent.
12688
12689 2005-06-28  Simon Josefsson  <jas@extundo.com>
12690
12691         * doc/gnulib.texi (Library version handling): New section.
12692
12693 2005-06-28  Jim Meyering  <jim@meyering.net>
12694
12695         * check-module (find_included_lib_files): Hard-code another
12696         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12697         but modules/fts-lgpl (correctly) does not list those files.
12698
12699         * modules/canonicalize (Files): Add lib/pathmax.h.
12700
12701 2005-06-25  Simon Josefsson  <jas@extundo.com>
12702
12703         * modules/check-version: New file.
12704
12705 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12706
12707         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12708         initializer of struct addrinfo, as an indication that we don't
12709         care how many members the structure has.
12710
12711 2005-06-24  Derek Price  <derek@ximbiot.com>
12712         and Bruno Haible  <bruno@clisp.org>
12713
12714         Remove stat module & update lstat.
12715         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12716         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12717         * m4/stat.m4: Remove this file.
12718
12719 2005-06-24  Derek Price  <derek@ximbiot.com>
12720         and Bruno Haible  <bruno@clisp.org>
12721
12722         Remove stat module & update lstat.
12723         * lib/stat.c: Remove this file...
12724         (slash_aware_lstat): ...moving this content and its support...
12725         * lib/lstat.c (rpl_lstat): ...into here.
12726         * lib/lstat.h: New file.
12727
12728 2005-06-24  Derek Price  <derek@ximbiot.com>
12729         and Bruno Haible  <bruno@clisp.org>
12730
12731         Remove stat module & update lstat.
12732         * config/srclist.txt (libc sources): Remove stat.
12733
12734 2005-06-24  Derek Price  <derek@ximbiot.com>
12735         and Bruno Haible  <bruno@clisp.org>
12736
12737         Remove stat module & update lstat.
12738         * MODULES.html.sh (stat): Remove.
12739         * MODULES.html: Regenerated.
12740         * modules/lstat (Description): Correct function name.
12741         (Files): Add "lstat.h".
12742         (Depends-on): Remove stat, add xalloc, stat-macros.
12743         * modules/stat: Remove this file.
12744         (Include): Add "lstat.h", remove <sys/stat.h>.
12745
12746 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12747
12748         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12749         (ranged_convert): Don't save conversion in a temporary struct.
12750         This causes a warning with GCC 4.0.0, and anyway in the typical
12751         case it's not worth the extra 100 bytes or so of code.
12752         (ranged_convert, __mktime_internal): When calling a function via a
12753         pointer P, use P () rather than (*P) (), as we now assume C89 or
12754         better.
12755
12756 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12757
12758         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
12759         "who -r" failed to give output.  Problem reported by Tim Waugh.
12760
12761         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
12762         (xcalloc): Use it to avoid needless tests.
12763         Problem reported by Jim Meyering.
12764
12765 2005-06-20  Derek Price  <derek@ximbiot.com>
12766
12767         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
12768         unnecessary for Autoconfs > 2.59c.
12769
12770 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12771
12772         * lib/argp.h (__option_is_short): Check upper limit of
12773         __key. Isprint() requires its argument to have the value
12774         of an unsigned char or EOF.
12775
12776 2005-06-16  Jim Meyering  <jim@meyering.net>
12777
12778         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
12779         when either N or S is zero.
12780
12781 2005-06-16  Derek Price  <derek@ximbiot.com>
12782
12783         * m4/bison.m4: Declare YACC & YFLAGS precious.
12784
12785 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
12786
12787         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
12788         multibyte string or pattern, fall back on unibyte matching.
12789         Problem reported by James Youngman.
12790
12791 2005-06-08  Bruno Haible  <bruno@clisp.org>
12792
12793         * modules/csharpcomp: New file.
12794         * MODULES.html.sh (C#): Add csharpcomp.
12795
12796 2005-06-08  Bruno Haible  <bruno@clisp.org>
12797
12798         * m4/csharpcomp.m4: New file, from GNU gettext.
12799
12800 2005-06-08  Bruno Haible  <bruno@clisp.org>
12801
12802         * lib/csharpcomp.h: New file, from GNU gettext.
12803         * lib/csharpcomp.c: New file, from GNU gettext.
12804         * lib/csharpcomp.sh.in: New file, from GNU gettext.
12805
12806 2005-06-08  Bruno Haible  <bruno@clisp.org>
12807
12808         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
12809         warning on mingw.
12810
12811 2005-06-07  Derek Price  <derek@ximbiot.com>
12812
12813         Sync from CVS.
12814         * lib/glob_.h: Indent nested #ifdef.
12815
12816 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12817
12818         Sync from coreutils.
12819         Use "file name" when talking about file names, instead of "filename"
12820         or "path", as per the GNU coding standards.
12821         * lib/mkdir-p.c: Renamed from makepath.c.
12822         (make_dir_parents): Renamed from make_path.  All callers changed.
12823         * lib/mkdir-p.h: Likewise.  All includers changed.
12824         * lib/filenamecat.c: Renamed from path-concat.c.
12825         (file_name_concat): Renamed from path_concat.  All callers changed.
12826         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
12827         * lib/filenamecat.h: Likewise.  All includers changed.
12828         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
12829         in comments or local variable names.
12830         * lib/basename.c: Likewise.
12831         * lib/canonicalize.c, canonicalize.h: Likewise.
12832         * lib/dirname.c, dirname.h: Likewise.
12833         * lib/euidaccess.c: Likewise.
12834         * lib/exclude.c: Likewise
12835         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
12836         * lib/fsusage.c, fsuage.h: Likewise.
12837         * lib/fts.c, fts_.h: Likewise.
12838         * lib/getcwd.c: Likewise.
12839         * lib/getloadavg.c: Likewise.
12840         * lib/mkstemp.c: Likewise.
12841         * lib/mountlist.c, mountlist.h: Likewise.
12842         * lib/openat.c, openat.h: Likewise.
12843         * lib/readlink-stub.c: Likewise.
12844         * lib/readutmp.c, readutmp.h: Likewise.
12845         * lib/rename.c: Likewise.
12846         * lib/rmdir.c: Likewise.
12847         * lib/same.c: Likewise.
12848         * lib/savedir.c: Likewise.
12849         * lib/stripslash.c: Likewise.
12850         * lib/tempname.c: Likewise.
12851         * lib/xreadlink.c: Likewise.
12852         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
12853         All uses changed.
12854         * lib/exclude.h: Likewise.
12855
12856         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
12857         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12858         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
12859         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12860         * lib/pathmax.h: Include <limits.h> unconditionally, since other
12861         files have been getting away with it for years (MORE/BSD 4.3
12862         is extinct now).
12863         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
12864         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12865
12866         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
12867         Define to 256, not 255, as per modern POSIX.
12868
12869 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12870
12871         Sync from coreutils.
12872         Use "file name" when talking about file names, instead of "filename"
12873         or "path", as per the GNU coding standards.
12874         * MODULES.html.sh: mkdir-p renamed from makepath.
12875         filenamecat renamed from path-concat.
12876         * modules/filenamecat: Renamed from modules/path-concat.
12877         (Files): filenamecat.h and filenamecat.c renamed from
12878         path-concat.h and path-concat.c.
12879         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
12880         (Include): filenamecat.h, not path-concat.h.
12881         * modules/mkdir-p: Renamed from modules/makepath.
12882         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
12883         makepath.c.
12884         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
12885         (Include): mkdir-p.h, not makepath.h.
12886
12887 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12888
12889         Sync from coreutils.
12890         * m4/mkdir-p.m4: Renamed from makepath.m4.
12891         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
12892         Rename files from makepath.c to mkdir-p.c, and from
12893         makepath.h to mkdir-p.h.
12894         * m4/filenamecat.m4: Renamed from path-concat.m4.
12895         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
12896         Rename files from path-concat.c to filenamecat.c,
12897         and from path-concat.h to filenamecat.h.
12898         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
12899         "file name" in local variables or comments.
12900         * m4/rename.m4: Likewise.
12901
12902 2005-06-01  Bruno Haible  <bruno@clisp.org>
12903
12904         * modules/csharpexec: New file.
12905         * MODULES.html.sh (C#): New section.
12906
12907 2005-06-01  Bruno Haible  <bruno@clisp.org>
12908
12909         * m4/csharp.m4: New file, from GNU gettext.
12910         * m4/csharpexec.m4: New file, from GNU gettext.
12911
12912 2005-06-01  Bruno Haible  <bruno@clisp.org>
12913
12914         * lib/csharpexec.h: New file, from GNU gettext.
12915         * lib/csharpexec.c: New file, from GNU gettext.
12916         * lib/csharpexec.sh.in: New file, from GNU gettext.
12917
12918 2005-05-31  Derek Price  <derek@ximbiot.com>
12919             Paul Eggert  <eggert@cs.ucla.edu>
12920
12921         Sync from cvs.
12922         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12923
12924 2005-05-31  Derek Price  <derek@ximbiot.com>
12925             Paul Eggert  <eggert@cs.ucla.edu>
12926
12927         Sync from cvs.
12928         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12929
12930 2005-05-29  Derek Price  <derek@ximbiot.com>
12931
12932         * config/srclist.txt (glob_.h, glob.c): Add these files.
12933
12934 2005-05-29  Derek Price  <derek@ximbiot.com>
12935
12936         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
12937         * modules/glob: New file.
12938         * modules/getlogin_r: Add link to POSIX spec in description.
12939
12940 2005-05-29  Derek Price  <derek@ximbiot.com>
12941             Paul Eggert  <eggert@cs.ucla.edu>
12942
12943         * m4/glob.m4: New file.
12944
12945 2005-05-29  Derek Price  <derek@ximbiot.com>
12946             Paul Eggert  <eggert@cs.ucla.edu>
12947
12948         * lib/glob_.h, lib/glob.c: New files.
12949
12950 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12951
12952         * modules/fts (Files): Remove m4/inttypes-pri.m4.
12953         * modules/fts-lgpl (Depends-on): Remove gettext.
12954
12955 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12956
12957         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
12958         and don't require gt_INTTYPES_PRI.
12959
12960 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12961
12962         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
12963
12964         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
12965         the configuration hassle isn't worth it.
12966         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
12967         (LONGEST_MODIFIER, PRIuMAX): Remove.
12968
12969 2005-05-27  Bruno Haible  <bruno@clisp.org>
12970
12971         * lib/getlogin_r.h: Remove second include of <stddef.h>.
12972
12973 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
12974
12975         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
12976         _POSIX_PTHREAD_SEMANTICS for Solaris.
12977
12978 2005-05-25  Derek Price  <derek@ximbiot.com>
12979
12980         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
12981
12982 2005-05-25  Derek Price  <derek@ximbiot.com>
12983             Paul Eggert  <eggert@cs.ucla.edu>
12984
12985         * modules/getlogin_r, m4/getlogin_r.m4: New files.
12986         * lib/getlogin_r.c, getlogin_r.h: New files.
12987
12988 2005-05-25  Bruno Haible  <bruno@clisp.org>
12989             Derek Price  <derek@ximbiot.com>
12990
12991         * lib/getlogin_r.h: Simplify API documentation.
12992
12993 2005-05-23  Derek Price  <derek@ximbiot.com>
12994
12995         * modules/minmax (Files): Add m4/minmax.m4.
12996         (configure.ac): Add gl_MINMAX.
12997
12998 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
12999
13000         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13001         so that unistd-safer.h (GPL'ed code) need not be included.
13002
13003 2005-05-22  Bruno Haible  <bruno@clisp.org>
13004
13005         * m4/minmax.m4: New file.
13006         Based on a patch by Derek Price <derek@ximbiot.com>.
13007
13008 2005-05-22  Bruno Haible  <bruno@clisp.org>
13009
13010         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13011         (INT64_MIN): Fix definition.
13012         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13013
13014         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13015         NEED_SIGNED_INT_TYPES.
13016
13017         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13018         HAVE_SYSTEM_INTTYPES.
13019
13020 2005-05-22  Bruno Haible  <bruno@clisp.org>
13021
13022         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13023         Also include <sys/param.h> if it defines MIN, MAX.
13024         Based on a patch by Derek Price <derek@ximbiot.com>.
13025
13026 2005-05-21  Jim Meyering  <jim@meyering.net>
13027
13028         * modules/fts (Files): Add m4/inttypes-pri.m4.
13029         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13030
13031 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13032
13033         New fts module.
13034         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13035         (setup_dir, free_dir): New functions.
13036         (enter_dir, leave_dir): Define trivial
13037         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13038         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13039         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
13040         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
13041         Move to fts-cycle.c.
13042         (fts_open): Use setup_dir.
13043         (fts_close): Use free_dir.
13044         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
13045         This adds a label and some gotos, but the alternatives were messier.
13046         Check for memory allocation failure when entering a dir.
13047         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
13048         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
13049         (FTS): New member fts_cycle, that is a union that contains the
13050         old active_dir_ht and cycle_state.  All uses changed to mention
13051         fts_cycle.ht and fts_cycle.state.
13052         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
13053         fts.c, with the following changes:
13054         (setup_dir, free_dir): New functions.
13055         (enter_dir): Now returns bool.  Return true if successful, false
13056         if memory exhausted.  All callers changed.
13057         Do not bother partly cleaning up on
13058         memory allocation failure; that is free_dir's job.
13059         However, free ad if hash_insert fails, to avoid memory leak.
13060         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
13061         fts->fts_options to see which union member to use.
13062
13063 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13064
13065         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
13066         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
13067
13068 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13069
13070         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
13071
13072 2005-05-20  Jim Meyering  <jim@meyering.net>
13073
13074         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
13075         Now a macro, to pacify GCC.
13076
13077 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13078
13079         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
13080         of -1.
13081
13082 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13083
13084         * lib/chown.c (rpl_chown): Return -1 on failure.
13085
13086 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13087
13088         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
13089         Don't check for stddef.h.
13090         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
13091         don't use its results.
13092         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
13093         since we include them unconditionally.  Don't require
13094         AM_STDBOOL_H, since stdbool is a prerequisite.
13095         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
13096         since we assume C89 or better.
13097         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
13098         as we don't use their results.
13099         Don't check for fchdir, memmove, memset, strrchr, as we use
13100         them unconditionally.
13101         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
13102         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
13103
13104 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13105
13106         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
13107         Include <stddef.h> unconditionally, since we assume C89 now.
13108         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
13109         * lib/fts.c: Include fts_.h first, to check interface.
13110         Do not include intprops.h; no longer needed.
13111         Include cycle-check.h and hash.h, since fts_.h no longer does.
13112         Remove unnecessary casts of closedir to void.
13113         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
13114         decide whether to decrement nlinks.
13115         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
13116         (FTS): Use struct hash_table * instead of Hash_table, so that
13117         we no longer need to include hash.h here.
13118
13119 2005-05-18  Jim Meyering  <jim@meyering.net>
13120
13121         * modules/dirfd (License): Change to LGPL.  Most of the code
13122         is already in the public domain.
13123
13124 2005-05-18  Jim Meyering  <jim@meyering.net>
13125
13126         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
13127         Reported by Yoann Vandoorselaere.
13128
13129 2005-05-17  Jim Meyering  <jim@meyering.net>
13130
13131         * m4/fts.m4: New file, from coreutils.
13132
13133 2005-05-17  Jim Meyering  <jim@meyering.net>
13134
13135         * lib/fts.c, lib/fts_.h: New files, from coreutils.
13136
13137 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13138
13139         Sync from coreutils.
13140         * m4/unlinkdir.m4: New file.
13141
13142 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13143
13144         Sync from coreutils.
13145         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
13146         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
13147         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
13148         White space changes only.
13149         * lib/makepath.c (make_path): Port to hosts where leading "//" is
13150         special.
13151         * lib/yesno.c: Include getline.h, not ctype.h.
13152         (yesno): Don't remove leading white space; POSIX doesn't allow it.
13153         Use getline to remove arbitrary restriction on response length.
13154
13155 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13156
13157         * config/srclist-update: Spell out "Street" in FSF postal
13158         mail address; this is the style the FSF seems to prefer.
13159
13160         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
13161         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
13162         this updates FSF postal mail address.
13163
13164         Sync from coreutils.
13165         * modules/unlinkdir: New file.
13166         * modules/yesno (Depends-on): Add getline.
13167         * MODULES.html.sh (File system functions): Add unlinkdir.
13168
13169 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13170
13171         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
13172         lib/strsep.h:
13173         Change the initial comment to refer to GPL, not LGPL.
13174         gnulib-tool will change it to LGPL as needed.
13175
13176         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
13177         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
13178         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
13179         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
13180         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
13181         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
13182         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
13183         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
13184         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
13185         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
13186         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
13187         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
13188         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
13189         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
13190         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
13191         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
13192         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
13193         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
13194         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
13195         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
13196         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
13197         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
13198         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
13199         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
13200         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
13201         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
13202         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
13203         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
13204         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
13205         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
13206         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
13207         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
13208         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
13209         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
13210         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
13211         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
13212         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
13213         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
13214         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
13215         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
13216         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
13217         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
13218         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
13219         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
13220         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
13221         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
13222         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
13223         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
13224         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
13225         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
13226         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13227         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
13228         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
13229         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
13230         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
13231         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
13232         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
13233         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
13234         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
13235         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
13236         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
13237         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
13238         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
13239         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
13240         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
13241         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
13242         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
13243         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
13244         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
13245         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
13246         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
13247         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
13248         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
13249         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
13250         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
13251         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
13252         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
13253         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
13254         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
13255         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
13256         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
13257         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
13258         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
13259         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
13260         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
13261         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
13262         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
13263         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
13264         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
13265         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
13266         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
13267         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
13268         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
13269         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
13270         lib/yesno.c, lib/yesno.h:
13271         Update FSF postal mail address.
13272
13273 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13274
13275         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13276         tests/test-memmem.c, tests/test-stpncpy.c:
13277         Update FSF postal mail address.
13278
13279 2005-05-13  Bruno Haible  <bruno@clisp.org>
13280
13281         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13282         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13283         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13284         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13285         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13286         Add support for 64-bit integers in the MSVC compiler.
13287
13288 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13289
13290         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13291
13292 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13293
13294         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13295
13296 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13297
13298         * doc/getdate.texi (General date syntax): Don't say that date
13299         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13300         Problem reported by Nic Ferrier.
13301
13302 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13303
13304         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13305         specified in ai_socktype. Fix invalid ai_protocol
13306         check. ai_protocol is usually set to 0 or depending on
13307         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13308         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13309         ai_socktype / ai_protocol in the returned addrinfo structure.
13310
13311 2005-05-10  Simon Josefsson  <jas@extundo.com>
13312
13313         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13314         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13315
13316 2005-05-10  Karl Berry  <karl@gnu.org>
13317
13318         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13319         (from http://www.gnu.org/licenses).
13320         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13321         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13322         fdl.texi suffices.
13323
13324 2005-05-10  Karl Berry  <karl@gnu.org>
13325
13326         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13327         (COPYING.DOC): remove.
13328
13329         * config/srclist-update: new FSF address.
13330
13331 2005-05-10  Derek Price  <derek@ximbiot.com>
13332
13333         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13334         possible.
13335
13336 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13337             Bruno Haible  <bruno@clisp.org>
13338
13339         * modules/inet_ntop: New file.
13340         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13341         inet_ntop.
13342
13343 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13344             Bruno Haible  <bruno@clisp.org>
13345
13346         * m4/inet_ntop.m4: New file.
13347
13348 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13349             Bruno Haible  <bruno@clisp.org>
13350
13351         * lib/inet_ntop.h: New file.
13352         * lib/inet_ntop.c: New file, from glibc with modifications.
13353
13354 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13355
13356         * modules/time_r (License): Change to LGPL.
13357         * modules/extensions (License): Change to LGPL.  Actually,
13358         the license is more permissive than that, but currently gnulib-tool
13359         doesn't know how to handle more-permissive licenses.
13360
13361         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13362         Problem reported by Dave Love.
13363
13364 2005-05-08  Jim Meyering  <jim@meyering.net>
13365
13366         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13367         blank.
13368
13369 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13370
13371         * modules/argmatch (Depends-on): Add stdbool.
13372         * modules/backupfile (Depends-on): Likewise.
13373         * modules/chdir-long (Depends-on): Likewise.
13374         * modules/closeout (Depends-on): Likewise.
13375         * modules/cycle-check (Depends-on): Likewise.
13376         * modules/dirname (Depends-on): Likewise.
13377         * modules/fnmatch (Depends-on): Likewise.
13378         * modules/fsusage (Depends-on): Likewise.
13379         * modules/fwriteerror (Depends-on): Likewise.
13380         * modules/getcwd (Depends-on): Likewise.
13381         * modules/getloadavg (Depends-on): Likewise.
13382         * modules/hard-locale (Depends-on): Likewise.
13383         * modules/makepath (Depends-on): Likewise.
13384         * modules/mountlist (Depends-on): Likewise.
13385         * modules/nanosleep (Depends-on): Likewise.
13386         * modules/posixtm (Depends-on): Likewise.
13387         * modules/quotearg (Depends-on): Likewise.
13388         * modules/readtokens (Depends-on): Likewise.
13389         * modules/readtokens0 (Depends-on): Likewise.
13390         * modules/readutmp (Depends-on): Likewise.
13391         * modules/save-cwd (Depends-on): Likewise.
13392         * modules/strftime (Depends-on): Likewise.
13393         * modules/userspec (Depends-on): Likewise.
13394         * modules/utimecmp (Depends-on): Likewise.
13395         * modules/xgetcwd (Depends-on): Likewise.
13396         * modules/xnanosleep (Depends-on): Likewise.
13397         * modules/xstrtod (Depends-on): Likewise.
13398         * modules/yesno (Depends-on): Likewise.
13399
13400 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13401
13402         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13403         needless checks.
13404
13405 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13406
13407         Merge from coreutils.  Among other things,
13408         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13409         * lib/fd-safer.c: New file.
13410         * lib/fcntl-safer.h, open-safer.c: Remove.
13411         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13412         * lib/dup-safer.c: Include unistd-safer.h first.
13413         Don't include errno.h.
13414         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
13415         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
13416         * lib/file-type.c: Rely on file-type.h change.
13417         * lib/getloadavg.c: Include unistd-safer.h.
13418         (getloadavg): Use safer open.
13419         * lib/getusershell.c: Include "stdio-safer.h".
13420         (getusershell): Use safer fopen.
13421         * lib/long-options.c (long_options): Use NULL rather than 0.
13422         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13423         'free'.
13424         * lib/modechange.c: Likewise.
13425         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13426         (MODE_DONE): New constant.
13427         (struct mode_change): Remove 'next' member.
13428         (make_node_op_equals): New function; like the old one of the
13429         same name, except it allocates an array.
13430         (mode_compile, mode_create_from_ref): Use it.
13431         (mode_compile): Allocate result as an array, not a linked list.
13432         Parse octal string ourself, so that we catch mistakes like "+0".
13433         (mode_adjust): Arg is an array, not a linked list.
13434         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13435         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13436         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13437         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
13438         Remove.  This is now stat-macros.h's job.
13439         (talloc): Remove.  All callers replaced by xalloc, so that
13440         our invokers don't have to worry about reporting memory failures.
13441         (make_node_op_equals): Remove.
13442         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13443         New constants.
13444         (struct mode_change): Moved here from modechange.h.
13445         (mode_append_entry): Remove.
13446         (mode_compile): Remove MASKED_OPS arg, since it encouraged
13447         apps to have incorrect behavior.  Use simpler algorithm for head
13448         and tail.  Don't futz with umask; that's now the job of mode_adjust.
13449         Detect more invalid usages rather than having somewhat-random behavior.
13450         Don't insert an "a=" action, as that leads to incorrect behavior.
13451         (mode_compile, mode_create_from_ref): Return NULL on error instead
13452         of an enum, since now there's only one way to have an error.  All
13453         callers changed.
13454         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
13455         at the correct time.  Simplify calculation of "+u" and its ilk.
13456         Don't mishandle "+X".
13457         (mode_free): Remove "register" and localize decls.
13458         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13459         (struct mode_change): Move to modechange.c; callers don't
13460         need to see this stuff.
13461         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
13462         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
13463         (mode_change, mode_adjust): Reflect the new signatures noted above.
13464         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
13465         that might redefine system include files.
13466         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
13467         (my_usleep): Use NULL rather than (void *) 0.
13468         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
13469         Use siginterrupt to specify that system calls should be interrupted.
13470         (rpl_nanosleep): Move initialization of suspended closer to call of
13471         my_usleep.
13472         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
13473         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
13474         (desirable_utmp_entry): New function.
13475         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
13476         using x2nrealloc, to simplify logic.
13477         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
13478         size calculation.  Do not assume utmp file is a regular file.
13479         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
13480         (READ_UTMP_CHECK_PIDS): New constant.
13481         * lib/save-cwd.c: Include unistd-safer.h.
13482         (save_cwd): Use fd_safer.
13483         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
13484         [!_LIBC] Include "stat-macros.h" instead.
13485         * lib/unistd-safer.h (fd_safer): New decl.
13486
13487 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13488
13489         * modules/getloadavg (Depends-on): Add unistd-safer.
13490         * modules/getusershell (Depends-on): Add stdio-safer.
13491         * modules/lstat (Depends-on): Remove xalloc.
13492         * modules/mkstemp (Depends-on): Add stat-macros.
13493         * modules/modechange (Depends-on): Remove xstrtol.
13494         Add stat-macros, xalloc.
13495         * modules/save-cwd (Depends-on): Add unistd-safer.
13496         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13497         * modules/unistd-safer (Files): Add lib/fd-safer.c
13498         (Makefile.am): Remove lib_SOURCES.
13499
13500         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13501         Remove fcntl-safer; unistd-safer supersedes it.
13502
13503 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13504
13505         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13506         AC_HEADER_STAT.
13507         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13508         (gl_PREREQ_CHOWN): Remove.
13509         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13510         it.  Don't require AC_HEADER_STAT.
13511         (gl_PREREQ_LSTAT): Remove.
13512         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13513         Don't require AC_HEADER_STAT.
13514         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13515         (gl_PREREQ_RMDIR): Remove.
13516         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13517         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13518         the stat-macros module a prerequisite.
13519         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13520         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13521         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13522         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13523         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13524         variable names.
13525         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13526         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13527         variable prefixes.
13528         * m4/fcntl-safer.m4: Remove.
13529         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13530         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13531         Invoke gl_PREREQ_FD_SAFER.
13532         (gl_PREREQ_FD_SAFER): New macro.
13533         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13534         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13535         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13536         Remove duplicate call to AC_LIBOBJ(readutmp).
13537         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13538
13539         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13540         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13541
13542 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13543
13544         * MODULES.html.sh (Misc): Add byteswap.
13545
13546 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13547
13548         * modules/getcwd (Depends-on): Add extensions.
13549         * modules/openat (Depends-on): Likewise.
13550
13551 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13552
13553         * modules/byteswap: New file.
13554
13555 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13556
13557         * m4/byteswap.m4: New file.
13558
13559 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13560
13561         * lib/byteswap_.h: New file.
13562
13563 2005-04-25  Karl Berry  <karl@gnu.org>
13564
13565         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13566
13567 2005-04-25  Albert Chin  <china@thewrittenword.com>
13568
13569         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13570         Toolkit C bug.
13571
13572 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13573
13574         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13575         (func_ln_if_changed) Remove forcibly for no error message
13576         in case file does not exist.
13577
13578 2005-04-19  Simon Josefsson  <jas@extundo.com>
13579
13580         * gnulib-tool (Options): Make --symlink mean --symbolic.
13581
13582 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13583
13584         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13585
13586 2005-04-16  Simon Josefsson  <jas@extundo.com>
13587
13588         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13589
13590 2005-04-15  Simon Josefsson  <jas@extundo.com>
13591
13592         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13593
13594 2005-04-15  Simon Josefsson  <jas@extundo.com>
13595
13596         * gnulib-tool: Rename --symlink to --symbolic.
13597
13598 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13599
13600         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13601         symbolic links to files instead of copying/moving.  Add --aux-dir,
13602         specifying directory relative --dir where auxiliary build tools
13603         are placed.
13604
13605 2005-04-14  Bruno Haible  <bruno@clisp.org>
13606
13607         * modules/allocsa (License): Change to LGPL.
13608         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13609
13610 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13611
13612         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13613         that "UTC +1 second" continues to work.  Problem reported
13614         by Dmitry V. Levin.
13615         (relunit_snumber): New rule.
13616         (relunit): Use it.
13617
13618 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13619
13620         * lib/getdate.y (universal_time_zone_table): New constant.
13621         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13622         universal_time_zone_table.
13623         (lookup_zone): Prefer universal_time_zone_table to
13624         local_time_zone_table, so that "GMT" time stamps are allowed in
13625         London during the summer.  Problem reported by Ian Abbott.
13626
13627 2005-04-12  Jim Meyering  <jim@meyering.net>
13628
13629         * lib/human.c (humblock): Set *options even when returning due to
13630         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13631         warning from gcc-4.
13632
13633 2005-04-09  Jim Meyering  <jim@meyering.net>
13634
13635         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13636         -Wuninitialized: initialize tm0.tm_year.
13637
13638 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13639
13640         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13641         count, since there's no maximum.  All uses changed.
13642         Add member dsts_seen.
13643         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13644         not being INT_MAX.
13645         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13646         Use pc_rels_seen to decide whther a date is absolute.
13647
13648         * lib/getdate.y (number): Don't overwrite year.
13649         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13650         check.
13651
13652 2005-04-02  Simon Josefsson  <jas@extundo.com>
13653
13654         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13655         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13656
13657 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13658
13659         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13660         where no absolute path name can be longer than PATH_MAX.
13661
13662 2005-03-27  Jim Meyering  <jim@meyering.net>
13663
13664         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13665
13666 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13667
13668         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13669         "one's complement" -> "ones' complement" in comment, as per Knuth.
13670         "value of type" -> "type or expression" in comment.
13671         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13672
13673 2005-03-26  Jim Meyering  <jim@meyering.net>
13674
13675         Comment nits.
13676         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13677         Correct typos: s/or/of/.
13678
13679 2005-03-26  Jim Meyering  <jim@meyering.net>
13680
13681         * modules/check-include-files: Move to ../ and rename to...
13682         * check-module: ...this.
13683
13684 2005-03-25  Jim Meyering  <jim@meyering.net>
13685
13686         * modules/xvasprintf (Files): Add xalloc.h.
13687
13688 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13689
13690         * modules/gettext (Files): config/config.rpath ->
13691         build-aux/config.rpath
13692         * modules/iconv (Files): Likewise.
13693         Problem reported by Oskar Liljeblad.
13694
13695 2005-03-23  Jim Meyering  <jim@meyering.net>
13696
13697         * modules/check-include-files: New script to check for
13698         missing dependencies, multiple includes, etc.
13699
13700         * modules/c-strtold (Depends-on): Add xalloc.
13701         * modules/c-strtod (Depends-on): Add xalloc.
13702         * modules/hash (Depends-on): Add xalloc.
13703         (Files): Remove lib/xalloc.h.
13704
13705         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13706         * modules/userspec (Files): Add lib/inttostr.h.
13707
13708 2005-03-23  Jim Meyering  <jim@meyering.net>
13709
13710         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13711
13712 2005-03-22  Jim Meyering  <jim@meyering.net>
13713
13714         * modules/stat-macros: New module.
13715         * modules/canonicalize, modules/euidaccess, modules/file-type,
13716         * modules/filemode, modules/lchown, modules/makepath,
13717         * modules/rmdir, modules/stat: Depend on new stat-macros module
13718         rather than listing lib/stat-macros.h manually.
13719         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13720
13721 2005-03-22  Jim Meyering  <jim@meyering.net>
13722
13723         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13724
13725 2005-03-22  Bruno Haible  <bruno@clisp.org>
13726
13727         * config/srclist.txt: Replace target directory 'config' with
13728         'build-aux'.
13729         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13730         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13731         ../build-aux/.
13732
13733 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13734
13735         * modules/chdir-long (Depends-on): Add mempcpy.
13736
13737         * modules/acl, modules/backupfile, modules/c-strtod,
13738         modules/c-strtold, modules/canon-host, modules/canonicalize,
13739         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13740         modules/exclude, modules/exitfail, modules/file-type,
13741         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13742         modules/getdate, modules/getline, modules/getpagesize,
13743         modules/getpass, modules/getugroups, modules/group-member,
13744         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13745         modules/inttostr, modules/long-options, modules/makepath,
13746         modules/md5, modules/memcasecmp, modules/memcoll,
13747         modules/modechange, modules/mountlist, modules/path-concat,
13748         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13749         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13750         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
13751         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
13752         modules/strftime, modules/strndup, modules/strverscmp,
13753         modules/timespec, modules/unlocked-io, modules/userspec,
13754         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
13755         modules/yesno:
13756         Remove lib_SOURCES line from Makefile.am section, as this is now
13757         done automatically by the corresponding Autoconf macro.
13758
13759 2005-03-21  Jim Meyering  <jim@meyering.net>
13760
13761         Changes imported from coreutils.
13762
13763         * lib/cycle-check.c: Don't include xalloc.h.
13764
13765         * lib/path-concat.c: Don't include assert.h.
13766         (path_concat): Remove assertion that would have triggered
13767         for ABASE starting with more than one slash.
13768         Reported by Andreas Schwab.
13769
13770         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
13771         properly when ABASE is an absolute file name.
13772         Correct the description of this function.
13773         Include <assert.h>.
13774         Add an assertion and a test driver.
13775         This fixes a bug introduced on 2004-07-02.
13776         Andreas Schwab reported the resulting failure of cp --parents:
13777         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
13778
13779 2005-03-21  Jim Meyering  <jim@meyering.net>
13780
13781         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
13782         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
13783
13784 2005-03-21  Jim Meyering  <jim@meyering.net>
13785         and  Paul Eggert  <eggert@cs.ucla.edu>
13786
13787         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
13788         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
13789         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
13790         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
13791         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
13792         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
13793         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
13794         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
13795         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
13796         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
13797         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
13798         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
13799         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
13800         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
13801         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
13802         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
13803         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
13804         for these modules.
13805
13806 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
13807
13808         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
13809         (which shouldn't happen), generate nothing instead of returning 0
13810         immediately, so that nstrftime (NULL, ...) doesn't return 0.
13811
13812 2005-03-16  Bruno Haible  <bruno@clisp.org>
13813
13814         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
13815         HAVE_LONGLONG_64BIT.
13816
13817 2005-03-16  Bruno Haible  <bruno@clisp.org>
13818
13819         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
13820         HAVE_LONGLONG_64BIT.
13821
13822 2005-03-16  Bruno Haible  <bruno@clisp.org>
13823
13824         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
13825         HAVE_LONGLONG_64BIT.
13826
13827 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13828
13829         * lib/strftime.c (my_strftime): Prepend space to format so that we can
13830         reliably distinguish strftime failure from empty output on POSIX
13831         hosts.
13832
13833 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13834
13835         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
13836         (iconv_string): Don't guess a size-zero buffer, as that might cause
13837         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
13838         result would be 'too large', where 'too large' is (heuristically)
13839         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
13840         overflow concerns.  This will prevent some unwanted malloc failures
13841         when the inputs are very large.
13842
13843 2005-03-15  Karl Berry  <karl@gnu.org>
13844
13845         * config/srclist.txt (config.rpath): from gettext.
13846         * config/config.rpath: update.
13847
13848 2005-03-15  Bruno Haible  <bruno@clisp.org>
13849
13850         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
13851         to 'negate'.
13852
13853         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
13854         variable.
13855
13856         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
13857         results.
13858
13859 2005-03-14  Simon Josefsson  <jas@extundo.com>
13860
13861         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
13862         <fx@gnu.org>.
13863
13864 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
13865
13866         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
13867         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
13868         intprops.h.
13869         * lib/strtol.c: Likewise.
13870
13871 2005-03-14  Jim Meyering  <jim@meyering.net>
13872
13873         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
13874         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
13875         to be nonzero so that we (and caller) can detect the difference
13876         between a valid zero-length expansion and an error return, even
13877         when the underlying strftime fails before writing anything into
13878         that location.
13879
13880 2005-03-14  Bruno Haible  <bruno@clisp.org>
13881
13882         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
13883         Update from GNU gettext 0.14.3.
13884
13885 2005-03-10  Jim Meyering  <jim@meyering.net>
13886
13887         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
13888
13889 2005-03-10  Jim Meyering  <jim@meyering.net>
13890
13891         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
13892         so that this module works on systems without fchdir.
13893
13894 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
13895
13896         Factor int-properties macros into a single file, except for
13897         glibc-related files.
13898         * lib/intprops.h: New file.
13899         * lib/getloadavg.c: Include it instead of limits.h.
13900         (INT_STRLEN_BOUND): Remove.
13901         * lib/human.c: Include intprops.h.
13902         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
13903         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
13904         302/1000.
13905         * lib/inttostr.h: Include intprops.h instead of limits.h.
13906         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
13907         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
13908         for consistency with intprops.h.
13909         (time_t_is_integer, twos_complement_arithmetic): Use them.
13910         * lib/sig2str.h: Include <signal.h>, intprops.h.
13911         (INT_STRLEN_BOUND): Remove.
13912         * lib/strftime.c (TYPE_SIGNED): Remove.
13913         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
13914         * lib/strtol.c: Adjust comments to match intprops.h.
13915         * lib/userspec.c: Include intprops.h.
13916         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
13917         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
13918         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
13919         instead of rolling our own expressions.
13920         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
13921
13922         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
13923         instead of int.
13924         (my_strftime): Do not mishandle years close to INT_MAX, by doing
13925         the right thing even if adding 1900 would overflow.  Similarly
13926         for tm_mon + 1 and tm_yday + 1.
13927         Make %Y always equivalent to %C%y, and similarly for %G and %g.
13928         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
13929         (DO_SIGNED_NUMBER): New macro.
13930         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
13931
13932 2005-03-07  Bruno Haible  <bruno@clisp.org>
13933
13934         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
13935
13936 2005-03-07  Bruno Haible  <bruno@clisp.org>
13937
13938         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
13939
13940 2005-03-04  Derek R. Price  <derek@ximbiot.com>
13941
13942         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
13943         (func_import): Only replace files via --import when they have actually
13944         changed.
13945
13946 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13947
13948         * m4/mmap-anon.m4: New file.
13949         * m4/pagealign_alloc.m4: New file.
13950
13951 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13952             Bruno Haible  <bruno@clisp.org>
13953
13954         * modules/pagealign_alloc: New file.
13955         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
13956
13957 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13958             Bruno Haible  <bruno@clisp.org>
13959
13960         * lib/pagealign_alloc.h: New file.
13961         * lib/pagealign_alloc.c: New file.
13962
13963 2005-03-03  Bruno Haible  <bruno@clisp.org>
13964
13965         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
13966         Use an all-permissive copyright notice, recommended by RMS.
13967
13968 2005-03-02  Bruno Haible  <bruno@clisp.org>
13969
13970         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
13971         of AIX, the replacement has to be done only after <string.h> is
13972         included, therefore not in config.h. stpncpy.h does the replacement,
13973         and stpncpy.c uses it.
13974
13975 2005-03-02  Bruno Haible  <bruno@clisp.org>
13976
13977         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
13978         stpncpy.c uses it.
13979
13980 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13981
13982         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
13983         The workaround isn't strictly needed for POSIX conformance, and
13984         it's too much of a pain to configure and maintain.  We'll ask
13985         people to fix their kernels instead.
13986         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
13987         (NANOSLEEP_BUG_WORKAROUND): Remove.
13988         (xnanosleep): Remove the workaround.
13989
13990 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13991
13992         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
13993         Reported by Derek Price.
13994         (Include): Add "timespec.h".
13995
13996         * modules/xnanosleep (Depends-on): Remove gethrxtime.
13997
13998 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13999
14000         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14001         to detect nanosleep bug.
14002
14003 2005-03-01  Bruno Haible  <bruno@clisp.org>
14004
14005         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14006
14007 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14008
14009         * modules/gethrxtime: New file.
14010         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14011         (Depends-on): Add gethrxtime.
14012         (configure.ac): Add gl_XNANOSLEEP.
14013         (Makefile.am): Remove lib_SOURCES line.
14014
14015 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14016
14017         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14018         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14019
14020 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14021
14022         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14023         * lib/timespec.h (gettime): Return void, since it always
14024         succeeds now.  All uses changed.
14025         * lib/gettime.c (gettime) Likewise.
14026         [HAVE_NANOTIME]: Prefer nanotime.
14027         Assume gettimeofday succeeds, as POSIX requires.
14028         Assime time () succeeds, since other code already does.
14029         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14030         (timespec_subtract): Remove.
14031         (NANOSLEEP_BUG_WORKAROUND): New constant.
14032         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14033         things considerably.  Use it only on GNU/Linux hosts, since the
14034         workaround shouldn't be needed elsewhere.
14035
14036 2005-02-24  Bruno Haible  <bruno@clisp.org>
14037
14038         * modules/gettext (Files): Add m4/glibc2.m4.
14039
14040 2005-02-24  Bruno Haible  <bruno@clisp.org>
14041
14042         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
14043         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
14044         * m4/progtest.m4:
14045         Update from GNU gettext 0.14.2.
14046         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
14047
14048 2005-02-24  Bruno Haible  <bruno@clisp.org>
14049
14050         * lib/localcharset.c: Update from GNU gettext 0.14.2.
14051         * lib/config.charset: Update from GNU gettext 0.14.2.
14052
14053 2005-02-24  Bruno Haible  <bruno@clisp.org>
14054
14055         * lib/gettext.h: Update from GNU gettext 0.14.2.
14056
14057 2005-02-23  Simon Josefsson  <jas@extundo.com>
14058
14059         * m4/iconvme.m4: New file.
14060
14061 2005-02-23  Jim Meyering  <jim@meyering.net>
14062
14063         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
14064         change.
14065         Thanks to Bruno Haible for catching it.
14066
14067 2005-02-22  Simon Josefsson  <jas@extundo.com>
14068
14069         * modules/iconvme: New file.
14070
14071         * MODULES.html.sh: Add iconvme.
14072
14073 2005-02-22  Simon Josefsson  <jas@extundo.com>
14074
14075         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
14076
14077 2005-02-22  Simon Josefsson  <jas@extundo.com>
14078
14079         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
14080
14081 2005-02-22  Jim Meyering  <jim@meyering.net>
14082
14083         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
14084         s/ifndef/ifdef/.
14085
14086 2005-02-20  Neil Conway  <neilc@samurai.com>
14087
14088         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
14089         returned by OSX/Darwin if the specified buffer is not large
14090         enough for the hostname.
14091
14092 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14093
14094         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
14095         pass it to _help, otherwise the latter coredumps trying to
14096         dereference state.root_argp.
14097
14098 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14099
14100         * modules/chdir-long (Depends-on): Add memrchr.
14101         * modules/memrchr (Files): Add lib/memrchr.h.
14102         (Include): "memrchr.h".
14103
14104 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14105
14106         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
14107
14108 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14109
14110         * lib/memrchr.h: New file.
14111         * lib/chdir-long.c: Include it.
14112         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
14113         Don't bother including stddef.h.
14114
14115 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
14116
14117         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
14118         inclusion.
14119         Include <sys/types.h>, for dev_t.
14120         (ME_DUMMY, ME_REMOTE): Move from here....
14121         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
14122         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
14123         Dmitry V. Levin.
14124         Include mountlist.h first, to test the interface.
14125
14126 2005-01-29  Bruno Haible  <bruno@clisp.org>
14127
14128         * lib/progname.c (program_name): Initialize.
14129         Needed when linking statically on MacOS X.
14130
14131 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14132
14133         Sync from coreutils.
14134         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
14135         (Depends-on): Add c-strtod.
14136         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
14137
14138 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14139
14140         Sync from coreutils.
14141         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
14142
14143         Remove files that are specific to coreutils.
14144         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
14145
14146 2005-01-28  Bruno Haible  <bruno@clisp.org>
14147
14148         * modules/javacomp: New file.
14149         * MODULES.html.sh (Java): Add javacomp.
14150
14151 2005-01-28  Bruno Haible  <bruno@clisp.org>
14152
14153         * m4/javacomp.m4: New file, from GNU gettext.
14154
14155 2005-01-28  Bruno Haible  <bruno@clisp.org>
14156
14157         * lib/javacomp.sh.in: New file, from GNU gettext.
14158         * lib/javacomp.h: New file, from GNU gettext.
14159         * lib/javacomp.c: New file, from GNU gettext.
14160
14161 2005-01-26  Simon Josefsson  <jas@extundo.com>
14162
14163         * lib/gai_strerror.c: Use GPL in header.
14164
14165 2005-01-26  Bruno Haible  <bruno@clisp.org>
14166
14167         * modules/javaexec: New file.
14168         * MODULES.html.sh (Java): Add javaexec.
14169
14170 2005-01-26  Bruno Haible  <bruno@clisp.org>
14171
14172         * m4/javaexec.m4: New file, from GNU gettext.
14173
14174 2005-01-26  Bruno Haible  <bruno@clisp.org>
14175
14176         * lib/javaexec.sh.in: New file, from GNU gettext.
14177         * lib/javaexec.h: New file, from GNU gettext.
14178         * lib/javaexec.c: New file, from GNU gettext.
14179
14180 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14181
14182         * modules/lchown (Depends-on): Remove lchown.h
14183
14184 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14185
14186         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
14187         must be defined if the header file was not found, in order
14188         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
14189
14190 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14191
14192         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
14193         initializers for struct pentry_state.
14194         (__argp_error): Check return value of __asprintf
14195         (__argp_failure): Translate error message
14196
14197         * lib/argp-parse.c: Removed braces around the expansion of N_()
14198
14199 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14200
14201         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
14202         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
14203         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
14204         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
14205         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
14206         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
14207         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
14208         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
14209         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
14210         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
14211         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
14212         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
14213         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
14214         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
14215         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
14216         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
14217         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
14218         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
14219         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
14220         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
14221         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
14222         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
14223         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
14224         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
14225         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
14226         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
14227         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
14228         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
14229         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
14230         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
14231         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
14232         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
14233         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
14234         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
14235         xstrtol.m4, xstrtoumax.m4, yesno.m4:
14236         Use an all-permissive copyright notice, recommended by RMS.
14237
14238 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
14239
14240         * modules/chdir-long (Depends-on): Remove mempcpy.
14241
14242 2005-01-21  Jim Meyering  <jim@meyering.net>
14243
14244         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
14245         same value as for Solaris 9.
14246
14247         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
14248         component length.  This included changing the parameter to be
14249         of type `char *' rather than `char const *'.
14250         * lib/chdir-long.h (chdir_long): Update prototype.
14251
14252         * lib/openat.c (fdopendir, fstatat): New functions.
14253         * lib/openat.h: Include headers required for use of DIR and struct
14254         stat.
14255         [AT_SYMLINK_NOFOLLOW]: Define.
14256         (fdopendir, fstatat): Add prototypes.
14257
14258 2005-01-21  Bruno Haible  <bruno@clisp.org>
14259
14260         * modules/classpath: New file.
14261         * MODULES.html.sh (Java): Add classpath.
14262
14263 2005-01-21  Bruno Haible  <bruno@clisp.org>
14264
14265         * lib/classpath.h: New file, from GNU gettext.
14266         * lib/classpath.c: New file, from GNU gettext.
14267
14268 2005-01-20  Simon Josefsson  <jas@extundo.com>
14269
14270         * modules/version-etc-fsf: New file.
14271
14272 2005-01-20  Simon Josefsson  <jas@extundo.com>
14273
14274         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14275         * lib/version-etc.c: Remove version_etc_copyright.
14276         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14277         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14278
14279 2005-01-20  Simon Josefsson  <jas@extundo.com>
14280
14281         * lib/base64.h (isbase64): Add.
14282
14283         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14284         using a unsigned prototype, don't inline.
14285         (base64_decode): Use it.
14286
14287 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14288
14289         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14290         it.
14291
14292 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14293
14294         * lib/save-cwd.c (save_cwd): Remove code to support the case
14295         where fchdir is missing or flaky.
14296
14297 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14298
14299         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14300
14301 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14302
14303         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14304         AC_LIBSOURCES now does this.
14305         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14306         with new ullong_max module.
14307
14308 2005-01-19  Bruno Haible  <bruno@clisp.org>
14309
14310         * modules/sh-quote: New file.
14311         * MODULES.html.sh (Executing programs): Add sh-quote.
14312
14313 2005-01-19  Bruno Haible  <bruno@clisp.org>
14314
14315         * lib/sh-quote.h: New file, from GNU gettext.
14316         * lib/sh-quote.c: New file, from GNU gettext.
14317
14318 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14319
14320         Merge from coreutils.
14321         * m4/ullong_max.m4: New file.
14322         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14323         (gl_MACROS): Assume localeconv exists.
14324
14325 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14326
14327         Merge changes from coreutils, as described below in several
14328         changelogs dated today.
14329
14330         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14331         (O_DIRECTORY): Remove; not needed here, since "." must be
14332         a directory.  All uses removed.
14333         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14334         universal on Suns, and we also need to test for IRIX.
14335         Revamp code to use 'if' rather than '#if'.
14336         Avoid unnecessary comparison of cwd->desc to 0.
14337
14338         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14339         for known valid error numbers rather than observed invalid ones.
14340
14341 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14342
14343         * modules/ullong_max: New file.
14344
14345         * modules/chdir-long, modules/openat: New files.
14346         * modules/save-cwd (Depends-on): Depend on chdir-long.
14347         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14348
14349 2005-01-18  Jim Meyering  <jim@meyering.net>
14350
14351         Merge from coreutils.
14352         * m4/chdir-long.m4, m4/openat.m4: New files.
14353         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14354         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14355         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14356         is sane and DOES follow symlinks.  Besides, testing 20 different
14357         systems found no broken chown implementations.
14358         Prompted by a change in rsync's copy of this macro.
14359         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14360
14361         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14362
14363         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14364         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14365         NULL-means-set-to-current-time semantics.
14366         Remove temporary file immediately, rather than waiting
14367         for configure's at-exit trap code to do it.
14368
14369 2005-01-18  Jim Meyering  <jim@meyering.net>
14370
14371         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14372
14373         * lib/utimens.c (futimens): Account for the fact that futimes
14374         can also fail with errno == ENOSYS or errno == ENOENT.
14375         Patch from Dmitry V. Levin.
14376
14377         Change the name of the robust chdir function from chdir to chdir_long.
14378         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14379         (restore_cwd): Use chdir_long, not chdir.
14380         * lib/chdir-long.c: Renamed from chdir.c.
14381         * lib/chdir-long.h: Renamed from chdir.h.
14382         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14383         Hurd.
14384
14385 2005-01-18  Bruno Haible  <bruno@clisp.org>
14386
14387         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14388         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14389         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14390         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14391         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14392         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14393         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14394         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14395         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14396         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14397         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14398         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14399         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14400         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14401         Use an all-permissive copyright notice, recommended by RMS.
14402
14403 2005-01-18  Bob Proulx  <bob@proulx.com>
14404
14405         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14406         simplify offsetof() macro construct to avoid compile failure with
14407         native HP-UX 11.0 ANSI C compiler.
14408
14409 2005-01-17  Bruno Haible  <bruno@clisp.org>
14410
14411         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14412         redundant because stpncpy.m4 takes care of it.
14413
14414 2005-01-17  Bruno Haible  <bruno@clisp.org>
14415
14416         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
14417
14418 2005-01-17  Bruno Haible  <bruno@clisp.org>
14419
14420         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14421         used.
14422
14423 2005-01-17  Bruno Haible  <bruno@clisp.org>
14424
14425         * lib/fwriteerror.h (fwriteerror): Change specification to include
14426         fclose.
14427         * lib/fwriteerror.c: Include <stdbool.h>.
14428         (fwriteerror): At the end, close the file stream. Record whether
14429         stdout was already closed.
14430
14431 2005-01-17  Bruno Haible  <bruno@clisp.org>
14432
14433         * lib/execute.c (environ): Declare if needed.
14434         * lib/pipe.c (environ): Likewise.
14435         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14436
14437 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14438
14439         * modules/argp: Depend on vsnprintf
14440
14441 2005-01-10  Jim Meyering  <jim@meyering.net>
14442
14443         * modules/closeout (Depends-on): Add atexit.
14444
14445 2005-01-06  Bruno Haible  <bruno@clisp.org>
14446
14447         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
14448
14449 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14450
14451         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
14452         definitions to be after all include files, to avoid collisions.
14453         Problem reported by Bob Proulx.
14454
14455 2005-01-04  Jim Meyering  <jim@meyering.net>
14456
14457         Changes imported from coreutils.
14458         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
14459         as the mkstemp template, use a temporary directory and an
14460         8.3-friendly template to avoid trouble on systems like DJGPP.
14461         Reported by Juan M. Guerrero via Stepan Kasal.
14462         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
14463         close. Remove the temporary directory right away, rather than waiting
14464         for configure's at-exit trap code to do it.
14465         Suggestion from Stepan Kasal.
14466
14467 2005-01-01  Simon Josefsson  <jas@extundo.com>
14468
14469         * gnulib-tool: Print #include directives when --import'ing.
14470
14471 2004-12-28  Simon Josefsson  <jas@extundo.com>
14472
14473         * tests/test-base64.c: Include required header files.  Remove
14474         unused variables.
14475
14476 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14477
14478         * modules/error (Depends-on): Remove gettext.
14479
14480 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14481
14482         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
14483         not needed.  This removes a dependency on the gettext module.
14484         [defined _LIBC]: Do not include <libintl.h>; not needed.
14485
14486 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14487
14488         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14489         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14490
14491 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14492
14493         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14494         HAVE_DECL_STRTOLD.
14495
14496 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14497
14498         * modules/getdate (Depends-on): Remove alloca-opt.
14499
14500 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14501
14502         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14503
14504 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14505
14506         * lib/argp-parse.c: Include <stddef.h>.
14507         (alignof, alignto): New macros.
14508         (parser_init): Don't assume that void * is aligned sufficiently
14509         for struct option.
14510
14511         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14512         need to extend the stack.
14513         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14514         large.
14515
14516 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14517
14518         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14519
14520 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14521
14522         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14523         (2004-10-24) change.  Apparently this was a false alarm.
14524
14525         * modules/getdate: Depend on alloca-opt, not alloca.
14526
14527 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14528
14529         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14530         Remove now-obsolete comment about AIX.
14531         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14532         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14533         (YYMAXDEPTH): New macro.
14534
14535 2004-12-18  Simon Josefsson  <jas@extundo.com>
14536
14537         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14538
14539 2004-12-18  Bruno Haible  <bruno@clisp.org>
14540
14541         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14542
14543 2004-12-18  Bruno Haible  <bruno@clisp.org>
14544
14545         * lib/fatal-signal.c (fatal_signals): Make non-const.
14546         (init_fatal_signals): New function.
14547         (uninstall_handlers, install_handlers): Ignore signals that were set to
14548         SIG_IGN.
14549         (at_fatal_signal): Call init_fatal_signals.
14550         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14551         SIG_IGN.
14552         Reported by Paul Eggert.
14553
14554 2004-12-18  Bruno Haible  <bruno@clisp.org>
14555
14556         * doc/alloca.texi: New file.
14557         * doc/alloca-opt.texi: New file.
14558
14559 2004-12-17  Jim Meyering  <jim@meyering.net>
14560
14561         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14562         Otherwise, install-sh could exit with improper exit status when
14563         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14564
14565 2004-12-16  Simon Josefsson  <jas@extundo.com>
14566
14567         * tests/test-base64.c: Add license.
14568
14569 2004-12-15  Stepan Kasal  <address@hidden>
14570
14571         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14572
14573 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14574
14575         * modules/getcwd (Files): Add m4/d-ino.m4.
14576         Suggested by Mark D. Baushke.
14577
14578 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14579
14580         * lib/getdate.y (textint): New member "negative".
14581         (time_zone_hhmm): New function.
14582         Expect 14 shift-reduce conflicts, not 13.
14583         (o_colon_minutes): New rule.
14584         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14585         (yylex): Set the "negative" member of signed numbers.
14586
14587 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14588
14589         * doc/getdate.texi (Time of day items, Time zone items):
14590         Describe new formats +00:00, UTC+00:00.
14591
14592 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14593
14594         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14595         spurious "-l"s.  Problem reported by Stepan Kasal.
14596
14597 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14598
14599         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14600         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14601
14602 2004-12-04  Simon Josefsson  <jas@extundo.com>
14603
14604         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14605         Vandoorselaere <yoann@prelude-ids.org>.
14606
14607 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14608
14609         Changes imported from coreutils.
14610         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14611         exist.
14612         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14613
14614 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14615
14616         Changes imported from coreutils.
14617         * lib/hard-locale.c: Assume <locale.h> exists.
14618         Include "strdup.h".
14619         (GLIBC_VERSION): New macro.
14620         (hard_locale): Assume setlocale exists.
14621         Rewrite to avoid #ifdef.
14622         Use strdup rather than malloc + strcpy.
14623         * lib/human.c: Assume <locale.h> exists.
14624         (human_readable): Assume localeconv exists.
14625
14626 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14627
14628         * modules/hard-locale (Depends-on): Add strdup.
14629
14630 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14631
14632         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14633         convert T2, not T.  (Imported from libc.)
14634
14635 2004-11-30  Simon Josefsson  <jas@extundo.com>
14636
14637         * modules/restrict (License): Change to LGPL.
14638
14639 2004-11-30  Simon Josefsson  <jas@extundo.com>
14640
14641         * m4/restrict.m4: Add copyright and copying conditions.
14642
14643 2004-11-30  Simon Josefsson  <jas@extundo.com>
14644
14645         * m4/base64.m4: New file.
14646
14647 2004-11-30  Simon Josefsson  <jas@extundo.com>
14648
14649         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14650         base64.
14651
14652         * tests/test-base64.c: New file.
14653
14654         * modules/base64: New file.
14655
14656 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14657
14658         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14659         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14660
14661         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14662
14663 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14664
14665         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14666         (__getcwd.c): Don't restore errno; glibc doesn't.
14667         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14668         first, falling back to our code only if its results look suspicious.
14669         Ensure that the resulting buffer is only as large as necessary.
14670
14671         * lib/readutmp.c: Include readutmp.h first.
14672         Include <errno.h>, since readutmp.h no longer does that.
14673         * lib/readutmp.h: Don't include <errno.h>,
14674         <sys/param.h>, <time.h>; not needed to establish interface.
14675         (errno): Remove decl.
14676         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14677         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14678         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14679
14680 2004-11-28  Simon Josefsson  <jas@extundo.com>
14681
14682         * lib/base64.h, base64.c: New file.
14683
14684 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14685
14686         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14687
14688 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14689
14690         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14691         (Depends-on): Remove pathmax, same.  Add mempcpy.
14692         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14693         (Makefile.am): Append getcwd.h to lib_SOURCES.
14694         (Include): Add getcwd.h.
14695         (Maintainer): Change from Jim Meyering to "all, glibc",
14696         since getdate now uses intended-for-glibc code.
14697         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14698         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14699
14700 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14701
14702         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14703         HP's ANSI C compiler.
14704         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14705         Declaring int functions causes warnings on some modern systems and
14706         shouldn't be needed to compile on ancient ones.
14707         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14708         defined.
14709
14710         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14711         with the following changes.
14712         (__set_errno): Parenthesize properly.
14713         Include <stdbool.h>.
14714         (MIN, MAX, MATCHING_INO): New macros.
14715         (__getcwd): Define with prototype, not K&R form.
14716         Use heuristics to allocate default buffer on stack if possible.
14717         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14718         behavior, and to avoid the PATH_MAX limit when computing
14719         ../../../../...
14720         Use MATCHING_INO to compare inode number to file.
14721         Check for arithmetic overflow in size calculations.
14722         Fix bug in reallocation of dot array that caused getcwd to fail
14723         on directories nested deeper than 75.
14724         Be more careful about saving errno on error.
14725         Do not use realloc; use only free+malloc, as this is a bit
14726         more flexible and avoids a needless copy operation.
14727         Do not inspect st_dev and st_ino for symbolic links; POSIX
14728         doesn't specify the latter.
14729         Check for closedir errors.
14730         Avoid needless casts.
14731         Use "#ifdef weak_alias" around weak_alias, to be like other
14732         glibc code.
14733         The following changes to getcwd.c have effect only when used in
14734         gnulib; they have no effect inside glibc proper.
14735         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14736         as alloca isn't used.
14737         (alloca, __alloca): Likewise.
14738         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14739         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14740         unconditionally, as gnulib assumes C89 or better.
14741         Do not include <sys/param.h>.
14742         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14743         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14744         better.
14745         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14746         Include <dirent.h> in a way that is compatible with modern Autoconf.
14747         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14748         New macros, if not already defined.
14749         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14750         Use "_LIBC", not "defined _LIBC", for consistency.
14751         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
14752         a mempcpy module.
14753         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
14754         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
14755         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
14756         credit only to Jim Meyering and adjust the copyright dates.
14757         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
14758         <stdlib.h>, <unistd.h>, "pathmax.h".
14759         Instead, include "xgetcwd.h" (first) and "getcwd.h".
14760         (INITIAL_BUFFER_SIZE): Remove.
14761         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
14762
14763 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14764
14765         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
14766         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
14767         Use the _ONCE methods, for efficiency.
14768         Check for fcntl.h.  In test program, include <errno.h>
14769         and <fcntl.h> if available.  Remove old K&R cruft from
14770         test program.  Check for common errors in GNU/Linux,
14771         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
14772         don't do AC_LIBOBJ, as that's getcwd.m4's job.
14773         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
14774         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
14775         name accordingly.
14776         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
14777         accommodate new getcwd.c.
14778         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
14779         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
14780         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
14781         that's all we need now.
14782
14783 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14784
14785         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
14786         argp-parse.c depends on getopt internals, that means we should
14787         always use our getopt, to be on the safe side.
14788         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
14789         order not to spoil the result of an eventual previous invocation
14790         of gl_GETOPT_SUBSTITUTE.
14791
14792 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14793
14794         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
14795         redefinition warnings. To avoid them, include the defines
14796         in `#if !defined __need_getopt ... #endif'. The only place
14797         where __getopt_argv_const is used is in definitions
14798         of getopt_long and getopt_long_only below, which are as well
14799         protected by `#ifndef __need_getopt'.
14800         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
14801         __need_getopt after including <stdio.h> and <unistd.h> These
14802         headers might have defined it.
14803
14804 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14805
14806         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
14807
14808 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14809
14810         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
14811         (futimens): New function, which uses futimes if available.
14812         (futimens, utimens): Support timespec==NULL, with same semantics
14813         as utime and utimens.
14814         * lib/utimens.h (futimens): New decl.
14815
14816 2004-11-23  Jim Meyering  <jim@meyering.net>
14817
14818         * lib/getopt_.h: Remove trailing blanks.
14819
14820 2004-11-23  Jim Meyering  <jim@meyering.net>
14821
14822         * lib/__fpending.c: Add comment.
14823
14824 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
14825
14826         * modules/canonicalize (Depends-on): Add xreadlink.
14827         Problem reported by James Youngman.
14828
14829 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
14830
14831         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
14832         New macros.
14833         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
14834         optopt): Use them instead of invoking ## directly; otherwise, the
14835         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
14836
14837 2004-11-19  Bruno Haible  <bruno@clisp.org>
14838
14839         * lib/strtok_r.c: Move comments from here...
14840         * lib/strtok_r.h: ... to here.
14841
14842 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14843
14844         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
14845         implementations that mishandle size_t overflow.
14846
14847 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14848
14849         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
14850         might fail.  Problem reported by Yoann Vandoorselaere.
14851         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
14852         implementations that mishandle size_t overflow.
14853
14854 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14855
14856         * modules/canon-host (Depends-on): Add strdup.
14857
14858 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14859
14860         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
14861
14862 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14863
14864         * lib/canon-host.c: Include "strdup.h".
14865         (canon_host): Use getaddrinfo if available, so that IPv6 works.
14866         Use strdup instead of malloc/strcpy to duplicate strings.
14867
14868         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
14869         (human_space_before_unit): New constant.
14870         * lib/human.c (human_readable): Support it.
14871
14872         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
14873         (xgetcwd): Set errno correctly when failing.
14874         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
14875         the failure is actually due to a PATH_MAX problem.
14876
14877         Further getopt changes to make it more likely that glibc will
14878         buy the changes back.
14879         * lib/getopt.c (POSIXLY_CORRECT): New constant.
14880         (getopt): Use it, so to preserve glibc semantic
14881         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
14882         when compiling for libc.
14883         * lib/getopt_.h (__getopt_argv_const): Bring it back.
14884         (getopt_long, getopt_long_only): Use it.
14885
14886         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14887         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
14888         (getopt): Argv is now char * const *, as per standard.
14889         (_getopt_internal_r, _getopt_internal): Argv is now char **,
14890         not char *__getopt_argv_const *.
14891         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14892         _getopt_long_only_r): Likewise.
14893         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
14894         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14895         _getopt_long_r, _getopt_long_only_r): Likewise.
14896         * lib/getopt_.h (__getopt_argv_const): Remove.
14897         (getopt): Argv is now char * const *, as per standard.
14898
14899         * lib/getdate.y (tORDINAL): New token.
14900         (day, relunit): Allow it for relative times.
14901         (relative_time_table): Use tORDINAL for ordinals.
14902
14903 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14904
14905         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
14906         Document that "second" isn't allowed as an ordinal number.
14907
14908 2004-11-16  Jim Meyering  <jim@meyering.net>
14909
14910         * modules/closeout (Depends-on): Add fpending.
14911
14912 2004-11-15  Jim Meyering  <jim@meyering.net>
14913
14914         * lib/closeout.c: Include "__fpending.h" once again.
14915         Include <stdbool.h>.
14916         (close_stdout): Don't fail just because stdout was closed initially,
14917         since some programs don't write to stdout in the normal course of
14918         operation (other than --version and --help), and we don't want this
14919         function to make e.g. `touch file >&-' fail.
14920         But do fail if it was closed and someone has tried to write to it.
14921         E.g., `printf foo >&-' must fail.
14922
14923 2004-11-13  Jim Meyering  <jim@meyering.net>
14924
14925         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
14926
14927 2004-11-12  Simon Josefsson  <jas@extundo.com>
14928
14929         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
14930         small doc fix is still pending.
14931
14932 2004-11-11  Simon Josefsson  <jas@extundo.com>
14933
14934         * modules/strtok_r: New file.
14935
14936         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14937         strtok_r.
14938
14939 2004-11-11  Simon Josefsson  <jas@extundo.com>
14940
14941         * m4/strtok_r.m4: New file.
14942
14943         * m4/getopt.m4: Replace opterr.
14944
14945 2004-11-11  Simon Josefsson  <jas@extundo.com>
14946
14947         * lib/strtok_r.h, strtok_r.c: New file.
14948
14949 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14950
14951         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
14952         of replacing opterr, getopt, etc.  This should handle the
14953         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
14954
14955 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14956
14957         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
14958         we can stop lying to compilers about the constness of argv when we
14959         are compiled outside glibc.
14960         (getopt, getopt_long, getopt_long_only): Use it.
14961         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14962         _getopt_internal, getopt): Likewise.
14963         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14964         _getopt_long_only_r): Likewise.
14965         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14966         _getopt_long_r, _getopt_long_only_r): Likewise.
14967
14968         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
14969         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
14970         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
14971         the other external symbols.
14972         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
14973         declaration, since the above renaming now works around collisions.
14974
14975 2004-11-11  Jim Meyering  <jim@meyering.net>
14976
14977         * lib/linebreak.c: Remove trailing blanks.
14978         * lib/alloca_.h: Likewise.
14979         * lib/acosl.c: Likewise.
14980         * lib/euidaccess.c: Likewise.
14981         * lib/allocsa.h: Likewise.
14982
14983 2004-11-10  Simon Josefsson  <jas@extundo.com>
14984
14985         * m4/getaddrinfo.m4: New file.
14986
14987 2004-11-10  Simon Josefsson  <jas@extundo.com>
14988
14989         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
14990
14991 2004-11-10  Simon Josefsson  <jas@extundo.com>
14992
14993         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14994         getaddrinfo.
14995
14996         * modules/getaddrinfo: New file.
14997
14998 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14999
15000         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15001
15002 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15003
15004         * lib/mktime.c (SHR): New macro, which is a portable
15005         substitute for >> that should work even on Crays.
15006         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15007         Problem reported by Mark D. Baushke in
15008         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15009         * lib/getdate.y (SHR): Likewise.
15010         (tm_diff): Use it.
15011         * lib/strftime.c (SHR): Likewise.
15012         (tm_diff): Use it.
15013         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15014         quote_these_too, so that right shifts are well defined.  All uses
15015         changed.
15016
15017 2004-11-10  Jim Meyering  <jim@meyering.net>
15018
15019         Ensure that no close failure goes unreported.
15020         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15021         return early when it seems there's nothing to flush.
15022         Don't include __fpending.h.
15023
15024 2004-11-10  Jim Meyering  <jim@meyering.net>
15025
15026         * modules/closeout (Depends-on): Remove fpending.
15027
15028 2004-11-10  Jim Meyering  <jim@meyering.net>
15029
15030         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15031
15032 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15033
15034         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15035         gl_FUNC_STRFTIME.
15036         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15037         and AC_REQUIRE when possible, to avoid duplicate checks.
15038         Check for <wchar.h>.
15039
15040 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15041
15042         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
15043
15044 2004-11-09  Bruno Haible  <bruno@clisp.org>
15045
15046         * m4/sockpfaf.m4: New file.
15047
15048 2004-11-05  Bruno Haible  <bruno@clisp.org>
15049
15050         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
15051         Reported by Mark D. Baushke <mdb@cvshome.org>.
15052
15053 2004-11-04  Bruno Haible  <bruno@clisp.org>
15054
15055         2004-09-11  Bruno Haible  <bruno@clisp.org>
15056                 * allocsa.valgrind: New file.
15057         2004-02-06  Bruno Haible  <bruno@clisp.org>
15058                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
15059                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
15060                 Reported by Christopher Seip <chris.seip@hp.com>.
15061
15062 2004-11-04  Bruno Haible  <bruno@clisp.org>
15063
15064         * modules/allocsa (Files): Add lib/allocsa.valgrind.
15065         (Makefile.am): Distribute it.
15066
15067 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
15068
15069         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
15070         with errno == ERANGE if the buffer is too small.
15071         Problem reported by Mark D. Baushke.
15072
15073 2004-11-03  Albert Chin  <china@thewrittenword.com>
15074             Paul Eggert  <eggert@cs.ucla.edu>
15075
15076         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
15077         equivalent, substitute $ac_type for equivalent type rather than
15078         blindly using uint32_t *always* which won't work if uint32_t is not
15079         available.  Define _UINT32_T to work around typedef of uint32_t if
15080         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
15081         2.5.1.
15082
15083 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15084
15085         * m4/jm-macros.m4: Sync from coreutils.
15086         (gl_MACROS): Check for mbrlen, for pathchk.
15087         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
15088
15089 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15090
15091         * lib/xreadlink.c (MAXSIZE): New macro.
15092         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
15093         size does not exceed MAXSIZE.  Avoid cast.
15094         As suggested by Mark D. Baushke in
15095         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
15096         if readlink fails with buffer size just under MAXSIZE, try again
15097         with MAXSIZE.
15098
15099 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15100
15101         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
15102
15103 2004-11-02  Derek R. Price  <derek@ximbiot.com>
15104         and  Paul Eggert  <eggert@cs.ucla.edu>
15105
15106         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
15107         (get_date): Overparenthesize to avoid GCC warning.
15108
15109 2004-11-02  Bruno Haible  <bruno@clisp.org>
15110
15111         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
15112         returns void.
15113
15114 2004-11-02  Bruno Haible  <bruno@clisp.org>
15115
15116         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
15117         function returns void.
15118
15119 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15120
15121         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
15122         fflush_unlocked, flockfile, funlockfile, funlockfile,
15123         fputs_unlocked, putc_unlocked.
15124
15125 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15126
15127         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15128         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
15129         already declared.
15130
15131 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15132
15133         * modules/getdate (Files): Add doc/getdate.texi.
15134         (Depends-on): Add setenv, xalloc.
15135
15136 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15137
15138         * lib/getdate.y: Add support for TZ="foo" within a date string.
15139         Fix some bugs near time_t boundaries.  Reject dates with
15140         out-of-range components, e.g., "Sept 31".
15141         Include <stdlib.h>, "setenv.h", "xalloc.h".
15142         (ISDIGIT_LOCALE): Remove; unused.
15143         Note that the TZ and time functions used here are not reentrant.
15144         (mktime_ok, get_tz): New functions.
15145         (TZBUFSIZE): New constant.
15146         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
15147         This requires that we sometimes generate our own TZ="XXX..." setting.
15148
15149 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15150
15151         * doc/getdate.texi: New file, from coreutils with modifications for
15152         the new TZ parsing.
15153
15154 2004-10-27  Derek R. Price  <derek@ximbiot.com>
15155
15156         * lib/mktime.c (not_equal_tm): Remove redundant check.
15157
15158 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15159
15160         * modules/regex (lib_SOURCES): Add regex.c.
15161         Reported by James Youngman in
15162         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
15163
15164 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15165
15166         * lib/getdate.y: Use Bison 1.875 features, and some minor
15167         code cleanups.  This change does not affect semantics.
15168         Don't include <stdlib.h>; no longer needed.
15169         Don't include unlocked-io.h; only the "#if TEST" code uses
15170         stdio, and performance isn't crucial there.
15171         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
15172         Bison 1.875 features as described below.
15173         All uses of "PC." replaced by "pc->".
15174         (YYSTYPE): Add a forward declaration.
15175         (yylex, yyerror): Use full prototypes in forward decls.
15176         Use "%pure-parser" rather than obsolescent "%pure_parser".
15177         Use %parse-param and %lex-param instead of obsolescent
15178         YYPARSE_PARAM and YYLEX_PARAM.
15179         (meridian_table, month_and_day_table, time_units_table,
15180         relative_time_table, time_zone_table, military_table,
15181         lookup_zone, lookup_word, get_date):
15182         Use NULL instead of 0 where appropriate.
15183         (to_hour): Avoid abort (), to avoid a dependency on
15184         stdlib.h.
15185         (yyerror, yylex): Now accepts parser_control * arg.
15186         (main) [TEST]: Use '\0' rather than 0 for char.
15187
15188 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15189
15190         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
15191
15192 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15193
15194         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
15195         It's now the caller's responsibility to handle the case where
15196         !HAVE_GETPAGESIZE && !defined getpagesize.
15197
15198         * lib/mktime.c (leapyear): Arg is long int, not int.
15199
15200 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
15201
15202         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
15203
15204 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
15205
15206         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
15207         missing.  Problem reported by James Youngman.
15208
15209 2004-10-16  Simon Josefsson  <jas@extundo.com>
15210
15211         * gnulib-tool: Fix comments.  Fix parse problem.
15212         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
15213
15214 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
15215
15216         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
15217         implementation of getopt_long.  Problem reported by Alexander Taler in:
15218         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
15219
15220 2004-10-15  Bruno Haible  <bruno@clisp.org>
15221
15222         * gnulib-tool: Untabify. Initialize supplied_libname.
15223         (func_usage): More homogenous output.
15224         (func_modules_transitive_closure, func_modules_to_filelist,
15225         func_emit_lib_Makefile_am): New functions.
15226         (func_import): New function, extracted from big case statement. Use
15227         func_get_license, func_modules_transitive_closure,
15228         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
15229         opt_lgpl. Don't use test -a, as it's not portable.
15230         (func_create_testdir): Use func_modules_transitive_closure,
15231         func_modules_to_filelist, func_emit_lib_Makefile_am.
15232
15233 2004-10-15  Bruno Haible  <bruno@clisp.org>
15234
15235         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
15236
15237 2004-10-15  Bruno Haible  <bruno@clisp.org>
15238
15239         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
15240         the portions belonging to each module.
15241         Suggested by Derek Robert Price <derek@ximbiot.com>.
15242
15243 2004-10-12  Simon Josefsson  <jas@extundo.com>
15244
15245         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15246         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
15247         to real functions.
15248
15249 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15250
15251         * modules/vsnprintf: New file.
15252
15253 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15254
15255         * m4/vsnprintf.m4: New file.
15256
15257 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15258
15259         * lib/vsnprintf.h: New file.
15260         * lib/vsnprintf.c: New file.
15261
15262 2004-10-11  Bruno Haible  <bruno@clisp.org>
15263
15264         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
15265         vsnprintf.
15266
15267 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15268
15269         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
15270
15271 2004-10-07  Bruno Haible  <bruno@clisp.org>
15272
15273         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15274         fits into the provided buffer.
15275
15276 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15277
15278         * lib/diacrit.c, diacrit.h: Add GPL notice.
15279
15280         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15281         notice.
15282         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15283         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15284         This avoids a potential constant-folding bug.
15285
15286 2004-10-05  Bruno Haible  <bruno@clisp.org>
15287
15288         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15289         for the declaration of strsep.
15290
15291 2004-10-05  Bruno Haible  <bruno@clisp.org>
15292
15293         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15294
15295 2004-10-04  Simon Josefsson  <jas@extundo.com>
15296
15297         * modules/memmem: New file.
15298         * tests/test-memmem.c: New file.
15299         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15300
15301 2004-10-04  Simon Josefsson  <jas@extundo.com>
15302
15303         * m4/memmem.m4: New file.
15304
15305 2004-10-04  Simon Josefsson  <jas@extundo.com>
15306
15307         * lib/memmem.h: New file.
15308         * lib/memmem.c: New file, taken from glibc.
15309
15310 2004-10-04  Simon Josefsson  <jas@extundo.com>
15311
15312         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15313         '#ifdef USE_UNLOCKED_IO'.
15314
15315 2004-10-04  Simon Josefsson  <jas@extundo.com>
15316
15317         * config/srclist.txt: Add memmem from glibc.
15318
15319 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15320
15321         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15322
15323         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15324         modules/exclude, modules/getdate, modules/getline,
15325         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15326         modules/getusershell, modules/linebuffer, modules/md5,
15327         modules/mountlist, modules/posixtm, modules/readtokens,
15328         modules/readutmp, modules/regex, modules/sha1,
15329         modules/version-etc, modules/yesno:
15330         Remove dependency on unlocked-io.
15331
15332 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15333
15334         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15335
15336         * m4/unlocked-io.m4: Add copyright notice.
15337         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15338
15339 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15340
15341         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15342         * lib/xmalloc.c (xmemdup): Likewise.
15343         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15344         XFREE): Remove these long-obsolescent macros.
15345         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15346         * lib/xstrdup.c: Remove.
15347
15348         * lib/regex.c (re_comp): Cast gettext return value to char *,
15349         Problem reported by Martin Neitzel via Mark D. Baushke.
15350
15351 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15352
15353         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15354         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15355         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15356         regex.c, sha1.c, version-etc.c, yesno.c:
15357         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15358         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15359         the includer's responsibility.
15360
15361         Sync from coreutils.
15362
15363         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15364         points to the start of a string, as the C Standard says the
15365         resulting behavior is undefined.
15366
15367         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15368         simple -> simple_backups, numbered_existing ->
15369         numbered_existing_backups, numbered -> numbered_backups
15370         to avoid shadowing problems.  All uses changed.
15371         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15372         * lib/backupfile.c (check_extension, numbered_backup):
15373         Rename locals to avoid shadowing 'basename'.
15374         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15375         once.
15376
15377         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15378         * lib/.cvsignore: Add getopt.h.
15379
15380 2004-10-04  Bruno Haible  <bruno@clisp.org>
15381
15382         * modules/README: New file.
15383         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15384         not a module.
15385
15386 2004-10-02  Jim Meyering  <jim@meyering.net>
15387
15388         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15389
15390 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15391
15392         * modules/strsep: New file.
15393
15394 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15395
15396         * m4/strsep.m4: New file.
15397
15398 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15399
15400         * lib/strsep.h: New file.
15401         * lib/strsep.c: New file.
15402
15403 2004-10-01  Simon Josefsson  <jas@extundo.com>
15404
15405         * lib/snprintf.c (snprintf): Handle size==0.
15406
15407 2004-10-01  Simon Josefsson  <jas@extundo.com>
15408             Bruno Haible  <bruno@clisp.org>
15409
15410         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15411         (snprintf): Declare 'args'.
15412
15413 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
15414
15415         * lib/snprintf.c: Remove comments as to why each header is needed.
15416
15417 2004-10-01  Bruno Haible  <bruno@clisp.org>
15418
15419         * MODULES.html.sh: Add strsep.
15420
15421 2004-09-30  Simon Josefsson  <jas@extundo.com>
15422
15423         * modules/snprintf: New file.
15424
15425 2004-09-30  Simon Josefsson  <jas@extundo.com>
15426
15427         * m4/snprintf.m4: New file.
15428
15429 2004-09-30  Simon Josefsson  <jas@extundo.com>
15430
15431         * lib/snprintf.h, lib/snprintf.c: New files.
15432
15433 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15434
15435         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15436         (hol_entry_help): Never translate an empty string.
15437         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
15438         * lib/argp.h (OPTION_NO_TRANS): New option.
15439
15440 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15441
15442         * modules/argp (Maintainer): Replace Simon Josefsson
15443         by Sergey Poznyakoff.
15444
15445 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15446
15447         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
15448         changes merged back into glibc.
15449
15450 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15451
15452         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
15453
15454 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15455
15456         * lib/xvasprintf.c: Include xalloc.h.
15457         (xvasprintf): Use xalloc_die, not xmalloc_die.
15458
15459 2004-09-29  Bruno Haible  <bruno@clisp.org>
15460
15461         * modules/alloca-opt: New file, derived from modules/alloca.
15462         * modules/allocsa: Depend on alloca-opt instead of alloca.
15463         * modules/setenv: Likewise.
15464         * modules/vasnprintf: Likewise.
15465         * MODULES.html.sh: Add alloca-opt.
15466
15467 2004-09-28  Simon Josefsson  <jas@extundo.com>
15468
15469         * gnulib-tool: New parameter --lgpl, to asseert that modules are
15470         LGPL, and to replace license template from GPL to LGPL.
15471
15472 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15473
15474         * modules/dummy: Change license to LGPL.
15475
15476 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15477
15478         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
15479
15480 2004-09-24  Simon Josefsson  <jas@extundo.com>
15481
15482         * modules/minmax (License): Change from GPL to LGPL.
15483
15484 2004-09-23  Simon Josefsson  <jas@extundo.com>
15485
15486         * gnulib-tool (--import): Typo.
15487
15488 2004-09-23  Simon Josefsson  <jas@extundo.com>
15489
15490         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15491
15492 2004-09-22  Bruno Haible  <bruno@clisp.org>
15493
15494         * modules/*: Add 'License' field.
15495         * gnulib-tool: Accept --extract-license option.
15496         (func_get_license): New function.
15497
15498 2004-09-21  Bruno Haible  <bruno@clisp.org>
15499
15500         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15501         Reported by Simon Josefsson.
15502
15503 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15504
15505         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15506         gl_AC_TYPE_LONG_LONG.
15507
15508 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15509
15510         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15511
15512 2004-09-18  Simon Josefsson  <jas@extundo.com>
15513         and  Paul Eggert  <eggert@cs.ucla.edu>
15514
15515         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15516         calls with autoreconf.  Define GL_LIB.
15517
15518 2004-09-14  Karl Berry  <karl@gnu.org>
15519
15520         * config/srclist.txt: unsync setenv.c, sigh.
15521
15522 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15523
15524         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15525         Problem reported by Bruno Haible in:
15526         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15527
15528 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15529
15530         * config/srclist.txt: Comment out argp-pvh.c.
15531
15532 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15533
15534         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15535         in case some system header has #define'd it.  Problem reported by
15536         Soeren D. Schulze in
15537         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15538
15539 2004-09-09  Karl Berry  <karl@gnu.org>
15540
15541         * regex.[ch]: delete from the root.  These were supposed to be
15542                 synced with emacs cvs, but this has not happened for about
15543                 a year, and anyway nothing else uses emacs regex.[ch].
15544                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15545                 lib/regex[.ch] is untouched.
15546
15547 2004-09-09  Bruno Haible  <bruno@clisp.org>
15548
15549         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15550
15551 2004-09-09  Bruno Haible  <bruno@clisp.org>
15552
15553         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15554         modifications.
15555         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15556
15557 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15558
15559         * modules/xvasprintf: New file.
15560         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15561
15562 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15563
15564         * lib/xvasprintf.h: New file.
15565         * lib/xvasprintf.c: New file.
15566         * lib/xasprintf.c: New file.
15567
15568 2004-09-08  Bruno Haible  <bruno@clisp.org>
15569
15570         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15571
15572 2004-09-08  Bruno Haible  <bruno@clisp.org>
15573
15574         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15575         length is > INT_MAX.
15576         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15577         more.
15578
15579 2004-09-08  Bruno Haible  <bruno@clisp.org>
15580
15581         * lib/stdint_.h: New file, taken from GNU clisp.
15582
15583 2004-09-08  Bruno Haible  <bruno@clisp.org>
15584             Oskar Liljeblad  <oskar@osk.mine.nu>
15585
15586         * modules/stdint: New file.
15587         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15588
15589 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15590
15591         Import from coreutils.
15592         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15593         strings on unbounded length.  alloca's performance benefits aren't
15594         that important here.
15595         (V_STRDUP): Remove.
15596         (parse_with_separator): New function, with most of the internals
15597         of the old parse_user_spec.  Allow user to omit both user and group,
15598         for compatibility with FreeBSD.
15599         Clone only the user name, not the entire spec.
15600         Do not set *uid, *gid unless entirely successful.
15601         Avoid memory leak in some failing cases.
15602         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15603         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15604         (parse_user_spec): Rewrite to use parse_with_separator.
15605
15606 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15607
15608         * modules/userspec: Don't depend on alloca.
15609
15610 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15611
15612         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15613
15614 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15615
15616         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15617         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15618         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15619
15620 2004-08-16  Simon Josefsson  <jas@extundo.com>
15621
15622         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15623         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15624         Add --dry-run for --import.
15625         Let user provided command line parameters override configure.ac
15626         settings.
15627
15628 2004-08-12  Simon Josefsson  <jas@extundo.com>
15629
15630         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15631         as discussed with Paul Eggert in threads rooted at
15632         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15633         and
15634         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15635         Before, the test was empty, and relied on ELIDE_CODE in source
15636         code.)
15637         (gl_PREREQ_GETOPT): New macro.
15638         (gl_GETOPT): Use them.
15639
15640 2004-08-12  Simon Josefsson  <jas@extundo.com>
15641
15642         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15643         * lib/getopt_.h: Renamed from getopt.h.
15644
15645 2004-08-12  Simon Josefsson  <jas@extundo.com>
15646
15647         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15648         Change default library name from libfoo to libgnu.
15649         Now, if you have a configure.ac that says:
15650                 gl_SOURCE_BASE(gl)
15651                 gl_M4_BASE(gl/m4)
15652                 gl_MODULES(error getopt etcetera)
15653                 gl_INIT
15654         you can import all you need by running:
15655                 ../gnulib/gnulib-tool --import
15656
15657         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15658         (Makefile.am): Rewrite, use logic from argz.
15659         (Include): Use <getopt.h> instead of "getopt.h".
15660
15661 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15662
15663         * modules/argp (Files): Add m4/unlocked-io.m4.
15664         (Depends-on): Add extensions.
15665
15666 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15667
15668         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15669         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15670         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15671         Check for program_invocation_name, program_invocation_short_name,
15672         flockfile, funlockfile, features.h, _getopt_long_only_r.
15673
15674 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15675
15676         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15677         its complicated substitute.
15678         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15679         and program_invocation_name.
15680         (__argp_basename) [!_LIBC]: Remove; the only use was
15681         replaced by its body.
15682         (__argp_short_program_name): Change condition from
15683         !defined __argp_short_program_name to
15684         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15685         to match argp-namefrob.h.
15686         (__argp_failure): Don't assume strerror_r returns char *.
15687         * lib/argp-parse.c (N_): Define unconditionally.
15688         (argp_default_options): Fill out initializers with 0 to avoid
15689         gcc warnings.
15690
15691 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15692
15693         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15694         getopt1.c.
15695
15696 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15697
15698         Merge from coreutils.
15699
15700         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15701
15702         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15703         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15704
15705 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15706
15707         Merge from coreutils.
15708
15709         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15710         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15711         for Reliant Unix 5.43.
15712
15713         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15714         (union fooround): Use uintmax_t, not long int.
15715         The rest is a merge from libc:
15716         [defined _LIBC]: Include <shlib-compat.h>.
15717         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15718
15719         * lib/settime.c (settime): Recode to avoid warning with
15720         Sun Forte C 6U2.
15721
15722         * lib/strverscmp.c: Convert to UTF-8.
15723
15724 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15725
15726         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15727         m4/uintmax_t.m4.
15728
15729 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15730
15731         * modules/xalloc-die: New file.
15732         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15733
15734         * modules/md5 (Files): Add m4/uint32_t.m4.
15735         * modules/sha1: Renamed from modules/sha.
15736         (Files):
15737         Rename lib/sha.h to lib/sha1.h.
15738         Rename lib/sha.c to lib/sha1.c.
15739         Rename m4/sha.m4 to m4/sha1.m4.
15740         (lib_SOURCES): Likewise.
15741         (configure.ac): Rename gl_SHA to gl_SHA1.
15742         (Include): sha.h -> sha1.h.
15743
15744 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15745
15746         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15747         * m4/sha1.m4: Renamed from sha.m4.
15748         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15749
15750 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15751
15752         * lib/obstack.h (obstack_empty_p):
15753         Don't assume that chunk->contents is suitably aligned.
15754         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
15755         Likewise. Problem reported by Benno in
15756         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
15757
15758         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
15759         readable.  This could be improved further but it'd take some work.
15760
15761 2004-08-08  Simon Josefsson  <jas@extundo.com>
15762
15763         * modules/xgethostname (Depends-on): Remove exit and error (not
15764         used).
15765
15766         * modules/getpass-gnu: Add getpass.h.
15767         (Depends-on): Add stdbool.
15768         * modules/getpass: Add getpass.h.
15769
15770 2004-08-08  Simon Josefsson  <jas@extundo.com>
15771
15772         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
15773         Check getpass declaration.
15774
15775 2004-08-08  Simon Josefsson  <jas@extundo.com>
15776
15777         * lib/xgethostname.c: Don't include error.h (not used).
15778
15779         * lib/getpass.h: Add.
15780         * lib/getpass.c: Include getpass.h first.
15781
15782 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
15783
15784         * lib/xalloc-die.c: New file.
15785         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
15786         All uses removed.
15787         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
15788         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
15789         xalloc-die.c.
15790         (_, N_, xalloc_die): Move to xalloc-die.c.
15791         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
15792         so that we needn't mess with xalloc_msg_memory_exhausted.
15793
15794         * lib/sha1.h: Renamed from sha.h.
15795         (SHA1_H): Renamed from _SHA_H.
15796         (sha1_ctx): Renamed from sha_ctx.
15797         (sha1_init_ctx): Renamed from sha_init_ctx.
15798         (sha1_process_block): Renamed from sha_process_block.
15799         (sha1_process_bytes): Renamed from sha_process_bytes.
15800         (sha1_finish_ctx): Renamed from sha_finish_ctx.
15801         (sha1_read_ctx): Renamed from sha_read_ctx.
15802         (sha1_stream): Renamed from sha_stream.
15803         (sha1_buffer): Renamed from sha_buffer.
15804         * lib/sha1.c: Likewise; renamed from sha.c.
15805         Do not include <sys/types.h>.
15806         Include <stddef.h> rather than <stdlib.h>.
15807
15808 2004-08-08  Bruno Haible  <bruno@clisp.org>
15809
15810         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
15811         FILESYSTEM_PREFIX_LEN.
15812         * lib/progreloc.c: Likewise.
15813         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
15814
15815 2004-08-06  Simon Josefsson  <jas@extundo.com>
15816
15817         * modules/progname (Depends-on): Don't depend on stdbool.
15818
15819 2004-08-06  Simon Josefsson  <jas@extundo.com>
15820
15821         * modules/getsubopt: New file.
15822         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15823         getsubopt.
15824
15825 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15826
15827         More merge from coreutils.
15828
15829         * m4/utimens.m4, m4/utimecmp.m4: New files.
15830         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
15831         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
15832         prereq.m4, sha.m4: Import changes from coreutils.
15833
15834 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15835
15836         More merge from coreutils.
15837         * modules/raise, modules/readtokens0, modules/utimens:
15838         * modules/utimecmp, module/xnanosleep: New files.
15839         * modules/strftime: Add lib/strftime.h.
15840         Change include from <time.h> to "strftime.h".
15841         * modules/yesno: Add lib/yesno.h.
15842         * modules/backupfile: Remove lib/addext.c.
15843         * modules/euidaccess: Add stat-macros.h.
15844         * modules/canonicalize, modules/euidaccess,
15845         modules/filemode, modules/lchown, modules/makepath,
15846         modules/rmdir, modules/stat: Likewise.
15847
15848 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15849
15850         Merge from tar.
15851         * lib/argp-help.c (make_hol, hol_append): Don't assume that
15852         SIZE_MAX is a valid preprocessor constant.
15853         (__argp_basename): Change from "#ifndef _LIBC"
15854         to "#ifndef __argp_short_program_name", so that
15855         we don't compile these functions for tar.
15856
15857         More merges from coreutils.
15858         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
15859         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
15860         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
15861         * lib/addext.c: Remove; no longer needed.
15862         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
15863         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
15864         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
15865         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
15866         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
15867         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
15868         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
15869         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
15870         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
15871         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15872         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
15873         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
15874         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
15875         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
15876         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
15877         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
15878         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
15879         Import changes from coreutils.
15880
15881 2004-08-05  Simon Josefsson  <jas@extundo.com>
15882
15883         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
15884
15885 2004-08-05  Simon Josefsson  <jas@extundo.com>
15886
15887         * m4/getsubopt.m4: New file.
15888
15889 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15890
15891         Merge from coreutils.
15892
15893         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
15894         * m4/getcwd-path-max.m4: New files.
15895
15896         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
15897         FILESYSTEM_PREFIX_LEN ->
15898         FILE_SYSTEM_PREFIX_LEN.
15899         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
15900         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
15901         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
15902         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
15903
15904         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
15905         prerequisite modules now handle the DOS stuff.
15906         Don't check for unistd.h.
15907
15908 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15909
15910         Merge from coreutils.
15911
15912         * lib/.gdb-history: Remove; this doesn't belong here.
15913
15914         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
15915         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
15916         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
15917         * lib/getcwd.c: New files.
15918
15919         * lib/dirname.h: Include <stdbool.h>.
15920         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
15921         for consistency with POSIX terminology.  All uses changed.
15922         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
15923         (strip_trailing_slashes): Use bool for booleans.
15924         * lib/stripslash.c (strip_trailing_slashes): Likewise.
15925
15926         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
15927         sometimes returns a positive errno value even when it succeeds.
15928         (print_errno_message) [!LIBC]: Fall back on strerror if
15929         __strerror_r fails.
15930
15931         * lib/path-concat.c (mempcpy): Don't define if a system header defines
15932         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
15933         (longest_relative_suffix): New function.
15934         (path_concat): Use it.  Assume first argument is not NULL.
15935         Port to DOS.  Omit redundant separators.
15936         Report an error instead of returning NULL.
15937         Use mempcpy instead of memcpy.
15938         (xpath_concat): Remove: not declared or used.
15939
15940         * lib/same.h: Include <stdbool.h>
15941         (same_name): Return bool, not int.
15942         * lib/same.c (same_name): Likewise.
15943         (errno): Don't declare; we assume C89 or better now.
15944
15945         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
15946         if not already defined.
15947
15948         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
15949         * lib/dup-safer.c (errno): Likewise.
15950
15951 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15952
15953         Merge from coreutils.
15954         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
15955         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
15956         * modules/path-concat: Don't depend on strdup.
15957
15958 2004-08-03  Simon Josefsson  <jas@extundo.com>
15959
15960         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
15961         * lib/progname.h: Don't include stdbool.h.
15962
15963 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15964
15965         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
15966         * MODULES.html.sh (func_all_modules): Remove fatal.
15967
15968 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15969
15970         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
15971
15972 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15973
15974         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
15975         working.
15976
15977 2004-08-02  Simon Josefsson  <jas@extundo.com>
15978
15979         * lib/getsubopt.h: New file, with comments from Bruno Haible.
15980         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
15981         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
15982
15983 2004-08-01  Simon Josefsson  <jas@extundo.com>
15984
15985         * lib/xgetdomainname.c: Include stdlib.h, for free().
15986
15987 2004-07-19  Bruno Haible  <bruno@clisp.org>
15988
15989         * MODULES.html.sh (func_all_modules): Add dummy.
15990
15991 2004-07-16  Simon Josefsson  <jas@extundo.com>
15992
15993         * modules/dummy: New file.
15994
15995 2004-07-16  Simon Josefsson  <jas@extundo.com>
15996
15997         * lib/dummy.c: New file.
15998
15999 2004-07-16  Bruno Haible  <bruno@clisp.org>
16000
16001         * lib/backupfile.h: Add extern "C" for C++.
16002         * lib/closeout.h: Likewise.
16003         * lib/copy-file.h: Likewise.
16004         * lib/findprog.h: Likewise.
16005         * lib/full-write.h: Likewise.
16006         * lib/pathname.h: Likewise.
16007         * lib/progname.h: Likewise.
16008         * lib/stpcpy.h: Likewise.
16009         * lib/stpncpy.h: Likewise.
16010         * lib/strcase.h: Likewise.
16011         * lib/strstr.h: Likewise.
16012         * lib/xalloc.h: Likewise.
16013
16014         * lib/mbswidth.h: Add extern "C" for C++.
16015         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16016
16017 2004-07-13  Robert Millan  <robertmh@gnu.org>
16018
16019         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16020
16021 2004-07-09  Simon Josefsson  <jas@extundo.com>
16022
16023         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16024         failed without this.)
16025
16026 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16027
16028         * modules/chown (Files): Add lib/fchown-stub.c, since
16029         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16030
16031 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16032
16033         * lib/fchown-stub.c: New file.
16034
16035 2004-06-24  Jim Meyering  <jim@meyering.net>
16036
16037         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16038
16039 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16040
16041         * modules/argz: Omit "#include".
16042
16043         * MODULES.html.sh (func_all_modules): Add calloc, to match
16044         2004-06-01 addition of calloc module.
16045
16046 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16047
16048         * m4/argz.m4: New file, which is autoupdated from libtool.
16049
16050 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16051
16052         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
16053         libtool.
16054
16055 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16056
16057         * config/srclist-update: Don't insist on "USA." before the
16058         close-comment, as libtool omits the period and puts the */ on a
16059         separate line.
16060         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
16061         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
16062
16063 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
16064
16065         * modules/argz: New file.
16066         * MODULES.html.sh (func_all_modules): Add argz.
16067
16068 2004-06-12  Jim Meyering  <jim@meyering.net>
16069         and  Paul Eggert  <eggert@cs.ucla.edu>
16070
16071         * modules/hash (Files): Add lib/xalloc.h.
16072         * modules/pipe (Depends-on): Add wait-process.
16073         * modules/stat (Depends-on): Add xalloc.
16074         * modules/userspec (Files): Add lib/userspec.h.
16075         * modules/xstrto
16076
16077         Upgrade from gettext-0.13.
16078         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
16079         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
16080         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
16081
16082 2004-06-10  Jim Meyering  <jim@meyering.net>
16083
16084         * lib/calloc.c: New file.
16085
16086 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
16087
16088         * lib/getdate.y (yylex): Allow space between sign and number.
16089         Problem reported by Dan Jacobson.
16090
16091 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16092
16093         Merge from coreutils CVS.
16094
16095         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
16096         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
16097         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
16098         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
16099         xstrtol.m4: Fix copyright date and/or serial number.
16100
16101         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
16102         See if we need an fchown replacement.
16103         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
16104         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
16105         and use the replacement function if we detect either defect.
16106
16107         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
16108         gl_UTIMECMP.
16109
16110 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16111         and  Jim Meyering  <jim@meyering.net>
16112
16113         Merge from coreutils CVS.
16114
16115         * lib/stat-macros.h: New file, with contents from file-type.h
16116         and coreutils' system.h.
16117         * lib/file-type.c: Include "stat-macros.h".
16118         * lib/file-type.h (file_type): Move all macro definitions to new file,
16119         stat-macros.h.
16120
16121         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
16122         Wrap old code with this conditional.
16123         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
16124         function that does not dereference symlinks.
16125         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
16126
16127         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
16128         dependency problems.
16129         (xreadlink): Accept new arg SIZE, for efficiency.
16130         All decls and uses changed.
16131         * lib/xreadlink.h: Include <stddef.h>, for size_t.
16132
16133         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
16134         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
16135
16136         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
16137         sysexits.h.
16138
16139 2004-06-01  Jim Meyering  <jim@meyering.net>
16140
16141         * m4/calloc.m4: New file.
16142
16143 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
16144
16145         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
16146         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
16147         Also, fix a typo in a diagnostic.
16148
16149 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16150
16151         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
16152         or AC_FUNC_REALLOC.
16153
16154 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16155
16156         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
16157         macros to be defined.
16158         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
16159         the allocator returns NULL because the requested size is zero.
16160
16161 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16162
16163         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
16164         var.  Add comment explaining why libc still defines it.  This
16165         merges the following patch from glibc:
16166         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
16167
16168 2004-05-20  Andreas Schwab  <schwab@suse.de>
16169
16170         * m4/free.m4: Replace free if it not known to work, not the other
16171         way round.
16172
16173 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
16174
16175         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
16176         present in glibc since revision 1.1 of this file.
16177         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
16178         obstack_alignment_mask, obstack_alloc, obstack_base,
16179         obstack_blank, obstack_blank_fast, obstack_chunk_size,
16180         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
16181         obstack_grow0, obstack_init, obstack_int_grow,
16182         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
16183         obstack_next_free, obstack_object_size, obstack_ptr_grow,
16184         obstack_ptr_grow_fast, obstack_room): Remove declarations of
16185         nonexistent functions.
16186
16187 2004-05-18  Karl Berry  <karl@gnu.org>
16188
16189         * config/srclist.txt: break link for vasnprintf.c.
16190
16191 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16192
16193         Port obstack to the AS/400, where pointers are 16 bytes wide and
16194         you cannot cast an integer to a valid pointer.  This patch is
16195         currently waiting to be integrated into glibc; see
16196         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
16197
16198         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
16199         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
16200         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
16201         (struct obstack): temp member is now a union of a pointer and
16202         an integer, instead of an integer.  All integer uses changed.
16203         This does not affect the physical layout of struct obstack,
16204         except on hosts (like the AS/400) where the size or alignment of
16205         void * is greater than that of ptrdiff_t.
16206         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
16207         __STDC__)]: Store temporary in pointer member of union, not
16208         integer member.
16209         * lib/obstack.c: Include <stddef.h>, for offsetof.
16210         (struct fooalign): Remove; it doesn't need a name.
16211         (union fooround): Change double to long double, and add void *.
16212         (DEFAULT_ALIGNMENT): Use offsetof to compute.
16213         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
16214         not a macro.  Hence the values are always int; so remove all
16215         casts-to-int in uses.
16216
16217 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16218
16219         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
16220         we can get this patch merged into glibc.
16221
16222 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16223             Paul Eggert  <eggert@cs.ucla.edu>
16224
16225         * m4/argp: Depend on alloca.
16226
16227 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16228             Paul Eggert  <eggert@cs.ucla.edu>
16229
16230         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
16231         freecoding.
16232
16233 2004-05-17  Bruno Haible  <bruno@clisp.org>
16234
16235         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
16236         precision that consists of a '.' followed by an empty digit string.
16237         Patch by Tor Lillqvist <tml@iki.fi>.
16238
16239 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16240
16241         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
16242         for backward compatibility with older code.  We need our own
16243         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
16244         it under some other name, and our alloca.h will define it.
16245
16246 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16247             Derek Price  <derek@ximbiot.com>
16248
16249         * lib/alloca.c: Include <alloca.h>, to get our interface.
16250         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
16251         include <alloca.h> first.  Use C89 prototype for alloca; this
16252         requires including <stddef.h> for size_t.  Use extern "C" if C++.
16253         Use #elif for simplicity, since we can assume C89 now.
16254         Don't try to source the system alloca.h since it will not be found
16255         and to prevent recursively including its replacement.
16256         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
16257         * lib/regex.c: Likewise.
16258
16259 2004-05-16  Derek Price  <derek@ximbiot.com>
16260             Paul Eggert  <eggert@cs.ucla.edu>
16261
16262         getline cleanup.  This changes the getndelim2 API: both order of
16263         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
16264         no delimiter).
16265
16266         * lib/getline.c: Don't include stddef.h or stdio.h, since our
16267         interface does that.
16268         (getline): Always use getdelim, so that we don't have two
16269         copies of this code.
16270         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
16271         if available.
16272         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
16273         (GETNDELIM2_MAXIMUM): New macro.
16274         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16275         instead of the old practice of delim2==0.  All callers changed.
16276         Return -1 on overflow, instead of returning junk.
16277         Do not set *linesize unless allocation succeeds.
16278         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16279         that we include sys/types.h.
16280         * lib/getnline.h: Likewise.
16281         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16282         (getndelim2): Reorder arguments.
16283         * lib/getnline.c (getnline, getndelim):
16284         Don't discard the NMAX argument.
16285         (getnline): Invoke getndelim, to avoid code duplication.
16286         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16287         of (size_t) -1 by callers of the getnline family.
16288
16289 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16290
16291         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16292         Check for gettimeofday.
16293         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16294         Check for settimeofday, stime.
16295
16296 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16297
16298         * lib/nanosleep.c (suspended): Change its type from int to
16299         sig_atomic_t volatile.
16300         (first_call): Make it private to rpl_nanosleep, and have it
16301         be zero initially as that's a bit faster.
16302         (my_usleep): Round up fractional times instead of truncating them,
16303         as this is the usual meaning for 'sleep'.
16304
16305         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16306         doesn't work.
16307         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16308         (ENOSYS): Define if not defined.
16309         (settime): Fall back on stime if it exists and settimeofday fails.
16310         But don't bother with fallbacks if a method fails with errno == EPERM.
16311
16312 2004-05-11  Jim Meyering  <jim@meyering.net>
16313
16314         Prior to this change, the save_cwd caller required read access to the
16315         current directory on most systems (ones with the fchdir function).
16316
16317         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16318         fails, try write-only, and finally, resort to using xgetcwd.
16319
16320 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16321
16322         * lib/obstack.c, obstack.h: Import changes from libc.
16323
16324 2004-04-28  Bruno Haible  <bruno@clisp.org>
16325
16326         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16327         also implicitly appends .exe to executables.
16328         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16329         accepts Windows pathnames.
16330         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16331         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16332         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16333         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16334         Reported by Derek Robert Price <derek@ximbiot.com>.
16335
16336 2004-04-21  Karl Berry  <karl@gnu.org>
16337
16338         * config/srclist.txt (localcharset.c): break sync.
16339
16340 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16341
16342         * m4/host-os.m4: Add a copyright notice.
16343
16344 2004-04-20  Jim Meyering  <jim@meyering.net>
16345
16346         Change UTILS_ to gl_ in AC_DEFINE'd names.
16347         Change utils_- and jm_-prefixed variables, too.
16348         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16349         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16350         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16351
16352         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16353         Don't emit trailing blanks.
16354         Also rename jm_-prefixed variables to have gl_ prefix.
16355
16356         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16357         Also rename jm_-prefixed variables to have gl_ prefix.
16358
16359         * m4/jm-macros.m4: Reflect the renamings.
16360         * m4/prereq.m4: Likewise.
16361
16362 2004-04-20  Jim Meyering  <jim@meyering.net>
16363
16364         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16365         memory.
16366
16367 2004-04-20  Jim Meyering  <jim@meyering.net>
16368             Bruno Haible  <bruno@clisp.org>
16369
16370         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16371         memory when realloc fails.
16372
16373 2004-04-19  Jim Meyering  <jim@meyering.net>
16374
16375         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16376         now that readutmp.c may call `free (0)'.
16377
16378 2004-04-19  Bruno Haible  <bruno@clisp.org>
16379
16380         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16381         * m4/inttypes_h.m4: Likewise.
16382         * m4/stdint_h.m4: Likewise.
16383         * m4/intmax_t.m4: Likewise.
16384         * m4/uintmax_t.m4: Likewise.
16385
16386 2004-04-18  Jim Meyering  <jim@meyering.net>
16387
16388         * m4/prereq.m4: Don't forbid jm_ prefix.
16389
16390         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16391         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16392         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16393         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16394         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16395         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16396         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16397         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16398         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16399         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16400         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16401         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16402         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16403         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16404         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16405         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16406         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16407         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16408         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16409
16410 2004-04-18  Jim Meyering  <jim@meyering.net>
16411
16412         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16413         failure, don't leak memory and do call END_UTMP_ENT.
16414
16415 2004-04-16  Jim Meyering  <jim@meyering.net>
16416
16417         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
16418         coreutils' stat program.
16419         (gl_PREREQ): Don't require jm_PREREQ_STAT.
16420
16421 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16422
16423         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16424         C89.
16425         (CHAR_BIT): Remove, since we assume C89.
16426         Include <stdint.h> if available, as per current Autoconf CVS advice.
16427
16428 2004-03-31  Jim Meyering  <jim@meyering.net>
16429
16430         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16431         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16432         * m4/xalloc.m4: Likewise.
16433
16434 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16435
16436         Merge from coreutils.
16437
16438         * m4/inttostr.m4: New file.
16439         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
16440         Require AM_STDBOOL_H and gl_TIMESPEC instead.
16441         Require gl_CLOCK_TIME.
16442         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
16443
16444 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16445
16446         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
16447         not bool, to be more consistent with Unix conventions.
16448         Suggested by Bruno Haible.
16449
16450         Merge from coreutils.
16451
16452         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
16453         * lib/umaxtostr.c: New files.
16454
16455         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
16456         the usual <time.h> dance.
16457         (get_date): Change signature to support fractional time stamps.
16458         All callers changed.
16459         * lib/getdate.y: Include "getdate.h" first, as we can now
16460         assume C89 and don't need to worry about 'const'.
16461         Similarly, include "unlocked-io.h" near start, not in middle.
16462         Include <limits.h>.
16463         (textint.value): Use long int rather than int.
16464         (textint.digits): Use size_t rather than int.
16465         (BILLION, LOG10_BILLION): New constants.
16466         (parser_control): New member rel_ns.  Members day_ordinal,
16467         time_zone, month, day, hour, minutes, rel_year, rel_month,
16468         rel_day, rel_hour, rel_minutes, rel_seconds
16469         are now long int, not int.  Member seconds is now struct timespec,
16470         not int.  New member timespec_seen.  Members dates_seen, days_seen,
16471         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
16472         not int.
16473         (%union.intval): Now long int, not int.
16474         New member timespec.
16475         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
16476         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
16477         (spec): Now is a timespec or an item list.
16478         (timespec, items): New nonterminals.
16479         (time, rel, relunit, number, get_date):
16480         Add support for fractional seconds.
16481         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
16482         (gmtime, localtime, mktime): Remove decls; not needed with C89.
16483         (to_hour): First arg is now long int, not int.
16484         (to_year): Returns long int, not int.
16485         Don't treat year -70 like 70.
16486         (tm_diff): Returns long int, not int.
16487         (lookup_word): Use bool instead of int when appropriate.
16488         (yylex): Use size_t for count, not int.
16489         Detect overflow when parsing large integer constants.
16490         Add support for fractions.
16491         (get_date): Make pointers 'const' if possible.
16492         Use more-portable code to detect integer overflow.
16493         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16494         Don't use ctime; it's not reliable if the year has >4 digits.
16495
16496         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16497         This is for compatibility with BSD.
16498
16499         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16500         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16501         From coreutils' system.h.
16502
16503         * lib/userspec.c: Don't include "posixver.h".
16504         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16505         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16506         compatible extension.  Simplify code by removing a boolean int
16507         that was always nonzero if a string was nonnull.
16508
16509 2004-03-30  Jim Meyering  <jim@meyering.net>
16510
16511         Merge from coreutils.
16512
16513         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16514         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16515         on some systems one must include <grp.h> before it.
16516         Reported by Christian Krackowizer.
16517
16518 2004-03-30  Jim Meyering  <jim@meyering.net>
16519
16520         Merge from coreutils.
16521
16522         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16523
16524         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16525         an empty input stream.
16526
16527         * lib/readtokens.c: Include <stdbool.h>.
16528         (readtoken): Use `size_t' rather than int/long.
16529         All callers adjusted.
16530         Use `bool' rather than `int' where appropriate.
16531         Use memset rather than an explicit loop.
16532         Use x2nrealloc rather than xrealloc.
16533         Allow the use of `\0' as a delimiter.
16534         (readtokens): Likewise.
16535         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16536
16537 2004-03-30  Jim Meyering  <jim@meyering.net>
16538
16539         * m4/realloc.m4: Remove file, since now it does no more than
16540         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16541         the `configure.ac' section of module/realloc.
16542         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16543
16544 2004-03-30  Bruno Haible  <bruno@clisp.org>
16545
16546         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16547         nonnull.
16548
16549 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16550
16551         Merge changes to getloadavg.c from coreutils and Emacs.
16552
16553         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16554         Define to an expression, not to the empty string.
16555         Include cloexec.h and xalloc.h.
16556         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16557         Use set_cloexec_flag rather than rolling our own.
16558         * lib/cloexec.c, lib/cloexec.h: New files.
16559
16560 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16561
16562         * m4/cloexec.m4: New file.
16563
16564 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16565
16566         * lib/getopt.h: Sync with libc CVS.
16567
16568 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16569             Bruno Haible  <bruno@clisp.org>
16570
16571         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16572         mbswidth.
16573
16574 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16575             Bruno Haible  <bruno@clisp.org>
16576
16577         * lib/mbswidth.h: Include <wchar.h> only if
16578         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16579         <wchar.h>.
16580         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16581
16582 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16583
16584         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16585         Sync with libc CVS.
16586         * lib/getopt_int.h: New file, also synced from libc.
16587
16588 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16589
16590         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16591         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16592         Bring back getopt.c, getopt.h, getopt1.c.
16593
16594 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16595
16596         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16597         All uses changed.  Check for sa_sigaction member; this fixes
16598         a bug first reported by Jason Andrade in
16599         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16600
16601 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16602
16603         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16604         '#if' expressions.  Unlike the code it replaces, it does not
16605         depend on (defined _SC_PAGESIZE).  However, it does depend on
16606         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16607         first reported by Jason Andrade in
16608         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16609
16610 2004-02-25  Simon Josefsson  <jas@extundo.com>
16611
16612         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16613
16614 2004-02-25  Simon Josefsson  <jas@extundo.com>
16615
16616         * lib/strdup.h: New file.
16617         * lib/strdup.c: Include it.
16618         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16619         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16620
16621 2004-02-23  Karl Berry  <karl@gnu.org>
16622
16623         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16624         (from fencepost.gnu.org:/gd/gnuorg).
16625
16626 2004-02-23  Karl Berry  <karl@gnu.org>
16627
16628         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16629         * config/srclist.txt: add maintain/standards documents.
16630
16631 2004-02-18  Bruno Haible  <bruno@clisp.org>
16632
16633         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16634         Reported by Derek Robert Price <derek@ximbiot.com>.
16635
16636 2004-02-16  Karl Berry  <karl@gnu.org>
16637
16638         * config/mkinstalldirs, install-sh: update from automake.
16639
16640 2004-02-06  Karl Berry  <karl@gnu.org>
16641
16642         * m4/po.m4: update from gettext 0.14.1.
16643
16644 2004-02-06  Karl Berry  <karl@gnu.org>
16645
16646         * lib/config.charset: update from gettext 0.14.1.
16647
16648 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16649
16650         Add comments and code, prompted by suggestions from Bruno Haible
16651         for sh-quote.
16652         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16653         describing the enum quoting_style values.
16654         * lib/quotearg.c (quotearg_alloc): New function.
16655         (quotearg_buffer_restyled): Treat lone { and } as special.
16656         Treat = as special.  Work around bug with older shells
16657         that "see" a '\' that is really the 2nd byte of a multibyte char.
16658         Quote empty string with shell_quoting_style.
16659
16660 2004-02-03  Bruno Haible  <bruno@clisp.org>
16661
16662         * m4/pipe.m4: New file, from GNU gettext.
16663
16664 2004-02-03  Bruno Haible  <bruno@clisp.org>
16665
16666         * lib/pipe.h: New file, from GNU gettext.
16667         * lib/pipe.c: New file, from GNU gettext.
16668
16669 2004-01-27  Bruno Haible  <bruno@clisp.org>
16670
16671         * m4/execute.m4: New file, from GNU gettext.
16672
16673 2004-01-27  Bruno Haible  <bruno@clisp.org>
16674
16675         * lib/execute.h: New file, from GNU gettext.
16676         * lib/execute.c: New file, from GNU gettext.
16677         * lib/w32spawn.h: New file, from GNU gettext.
16678
16679 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16680
16681         Merge from diffutils.
16682
16683         * lib/file-type.c (file_type): Add typed memory objects.
16684         * lib/file-type.h (S_TYPEISTMO): New macro.
16685
16686         * lib/c-stack.h (c_stack_action): Remove argv argument.
16687         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16688         (die): Don't calculate message unless segv_action returns.
16689         (get_stack_location, min_address_from_argv, max_address_from_argv,
16690         volatile stack_base, volatile_stack_size): Remove.
16691         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16692         that every segmentation violation is a stack overflow.  (Ouch!)
16693         See Debian bug 136249 (still outstanding) for more info about why
16694         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16695
16696 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16697
16698         Exit-status fix from coreutils.
16699
16700         Use exit_failure consistently in place of EXIT_FAILURE,
16701         so that program exit statuses are consistent on failure.
16702
16703         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16704         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16705         * lib/argmatch.h: Comment fix to match the above.
16706         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16707         Now a macro referring to exit_failure, instead of a separate
16708         variable.  Include "exitfail.h" to get it.
16709         * lib/xstrtol.h: Include "exitfail.h".
16710         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16711
16712         * lib/long-options.c (parse_long_options): Use prototype
16713         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16714         for clarity.
16715
16716 2004-01-21  Jim Meyering  <jim@meyering.net>
16717
16718         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16719         so as not to conflict with a different-sized __mktime_internal
16720         function in GNU libc.
16721         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16722         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16723
16724 2004-01-20  Karl Berry  <karl@gnu.org>
16725
16726         * config/config.guess: update from config.
16727
16728         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16729
16730 2004-01-20  Bruno Haible  <bruno@clisp.org>
16731
16732         Safer stack allocation.
16733         * lib/setenv.c: Include allocsa.h.
16734         (alloca): Remove fallback definition.
16735         (freea): Remove macro.
16736         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16737         instead of freea.
16738
16739 2004-01-20  Bruno Haible  <bruno@clisp.org>
16740
16741         * m4/eealloc.m4: New file, from GNU gettext.
16742
16743 2004-01-20  Bruno Haible  <bruno@clisp.org>
16744
16745         * m4/allocsa.m4: New file, from GNU gettext.
16746
16747 2004-01-20  Bruno Haible  <bruno@clisp.org>
16748
16749         * lib/xallocsa.h: New file, from GNU gettext.
16750         * lib/xallocsa.c: New file, from GNU gettext.
16751
16752 2004-01-20  Bruno Haible  <bruno@clisp.org>
16753
16754         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
16755
16756 2004-01-20  Bruno Haible  <bruno@clisp.org>
16757
16758         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
16759         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
16760         specially.
16761
16762 2004-01-20  Bruno Haible  <bruno@clisp.org>
16763
16764         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
16765         patch.
16766
16767 2004-01-20  Bruno Haible  <bruno@clisp.org>
16768
16769         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
16770
16771 2004-01-20  Bruno Haible  <bruno@clisp.org>
16772
16773         * lib/eealloc.h: New file.
16774
16775 2004-01-20  Bruno Haible  <bruno@clisp.org>
16776
16777         * lib/binary-io.h: Avoid warnings on Cygwin.
16778
16779 2004-01-20  Bruno Haible  <bruno@clisp.org>
16780
16781         * lib/allocsa.h: New file, from GNU gettext.
16782         * lib/allocsa.c: New file, from GNU gettext.
16783
16784 2004-01-18  Karl Berry  <karl@gnu.org>
16785
16786         * doc/gpl.texi, doc/lgpl.texi: new files.
16787
16788 2004-01-18  Karl Berry  <karl@gnu.org>
16789
16790         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
16791         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
16792
16793 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16794
16795         Merge from coreutils.
16796
16797         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
16798         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
16799         (gl_DEFAULT_POSIX2_VERSION): Move
16800         the documentation from 'configure' into 'config.hin',
16801         so that 'configure --help' isn't burdened by it and
16802         we don't have to worry about its formatting there.
16803         Reword the documentation so that it's more succinct
16804         and can be run together into a single paragraph.
16805         * m4/same.m4 (gl_SAME): Check for pathconf.
16806
16807 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16808
16809         Merge from coreutils.
16810
16811         * lib/posixver.c: Include posixver.h.
16812
16813         * lib/same.c: Include <stdbool.h>, <limits.h>.
16814         (_POSIX_NAME_MAX): Define if not defined.
16815         (MIN): New macro.
16816         (same_name): If file names are silently truncated, report
16817         that the file names are the same if they are the same after
16818         the silent truncation.
16819
16820         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
16821         conversion function.
16822         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
16823         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
16824         longer needed.
16825
16826 2004-01-15  Jim Meyering  <jim@meyering.net>
16827
16828         Merge from coreutils.
16829
16830         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
16831         if no library is required.
16832         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
16833         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
16834         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
16835         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
16836         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
16837         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
16838         value, $ac_cv_search_crypt, if it's "none required".
16839         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
16840         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
16841         not gl_FUNC_GETLOADAVG.
16842         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
16843         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
16844
16845 2004-01-15  Jim Meyering  <jim@meyering.net>
16846
16847         Merge from coreutils.
16848
16849         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
16850         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
16851         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
16852
16853         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
16854         optional configure-time default.
16855
16856         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16857
16858         * lib/xreadlink.c (xreadlink): Correct outdated comment.
16859
16860 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
16861
16862         Merge from coreutils.
16863
16864         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
16865         value, $ac_cv_search_nanosleep, if it's "none required".
16866
16867 2004-01-14  Paul Eggert  <eggert@twinsun.com>
16868
16869         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
16870         with like-named macro in fnmatch.c.
16871         (EXT): Use an internal constant instead.
16872
16873         Merge fnmatch patches from glibc.
16874         * lib/fnmatch.c (mbsinit): Remove define.
16875         Add libc_hidden_ver (__fnmatch, fnmatch).
16876         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
16877         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
16878
16879 2004-01-14  Karl Berry  <karl@gnu.org>
16880
16881         * config/install-sh: update from automake.
16882
16883 2004-01-13  Karl Berry  <karl@gnu.org>
16884
16885         * config/install-sh: update from automake.
16886
16887 2004-01-09  Karl Berry  <karl@gnu.org>
16888
16889         * config/install-sh: update from automake.
16890
16891 2004-01-05  Karl Berry  <karl@gnu.org>
16892
16893         * config/config.{sub,guess}: update from config.
16894
16895 2003-12-31  Karl Berry  <karl@gnu.org>
16896
16897         * config/depcomp: update from automake.
16898
16899 2003-12-14  Karl Berry  <karl@gnu.org>
16900
16901         * lib/config.charset: update from gettext-runtime.
16902
16903 2003-12-03  Paul Eggert  <eggert@twinsun.com>
16904
16905         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
16906         Bug reported by Alfred M. Szmidt.
16907
16908 2003-12-03  Bruno Haible  <bruno@clisp.org>
16909
16910         * m4/gettext.m4: Upgrade from gettext-0.13.
16911         * m4/po.m4: Upgrade from gettext-0.13.
16912         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
16913         * m4/intmax.m4: New file, from gettext-0.13.
16914         * m4/printf-posix.m4: New file, from gettext-0.13.
16915
16916 2003-11-29  Karl Berry  <karl@gnu.org>
16917
16918         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
16919
16920 2003-11-25  Paul Eggert  <eggert@twinsun.com>
16921             Bruno Haible  <bruno@clisp.org>
16922
16923         * lib/printf-parse.h: Don't include sys/types.h.
16924         (ARG_NONE): New macro.
16925         (char_directive): Change type of *arg_index fields to size_t.
16926         * lib/printf-parse.c: Don't include sys/types.h.
16927         (SSIZE_MAX): Remove macro.
16928         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
16929         Remove unnecessary overflow check.
16930         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
16931         fields.
16932
16933 2003-11-25  Bruno Haible  <bruno@clisp.org>
16934
16935         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
16936
16937 2003-11-25  Bruno Haible  <bruno@clisp.org>
16938
16939         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
16940         gt_TYPE_SSIZE_T.
16941
16942 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16943
16944         * modules/alloca: Remove dependency on xalloc.
16945
16946 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16947
16948         * lib/alloca.c: Remove dependency on xalloc module.
16949         (xalloc_die): Remove.
16950         (memory_full) [!defined emacs]: New macro.
16951         [!defined emacs]: Don't include xalloc.h.
16952         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
16953         address arithmetic overflows.  Change datatypes a bit to avoid
16954         unnecessary casts.
16955
16956 2003-11-22  Jim Meyering  <jim@meyering.net>
16957
16958         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
16959         s/size/size_t/.
16960
16961 2003-11-21  Karl Berry  <karl@gnu.org>
16962
16963         * config/config.{sub,guess}: update from config.
16964
16965 2003-11-18  Karl Berry  <karl@gnu.org>
16966
16967         * config/config.{sub,guess}: update from config.
16968
16969         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
16970
16971 2003-11-17  Paul Eggert  <eggert@twinsun.com>
16972
16973         * README: Mention that S+T cannot overflow if S is the size of
16974         an existing object and T is sufficiently small.
16975
16976 2003-11-17  Jim Meyering  <jim@meyering.net>
16977
16978         On systems without utime and without a utimes function capable of
16979         dealing with a NULL struct utimbuf* argument, this utime replacement
16980         could -- in unusual circumstances -- leak a file descriptor.
16981         * lib/utime.c: Include <unistd.h> and <errno.h>.
16982         (utime_null): Be sure to close `fd' and to preserve errno.
16983         Reported by Geoff Collyer via Arnold Robbins.
16984
16985 2003-11-17  Bruno Haible  <bruno@clisp.org>
16986
16987         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
16988         (Depends-on): Add xsize.
16989
16990 2003-11-17  Bruno Haible  <bruno@clisp.org>
16991
16992         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
16993
16994 2003-11-17  Bruno Haible  <bruno@clisp.org>
16995
16996         * lib/vasnprintf.c (alloca): Remove fallback definition.
16997         (freea): Remove definition.
16998         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
16999         Reported by Paul Eggert.
17000
17001 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17002             Bruno Haible  <bruno@clisp.org>
17003
17004         Protect against address arithmetic overflow.
17005         * lib/printf-args.h: Include stddef.h.
17006         (arguments): Change type of field 'count' to size_t.
17007         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17008         'unsigned int' where appropriate.
17009         * lib/printf-parse.h: Include sys/types.h.
17010         (char_directive): Change type of *arg_index fields to ssize_t.
17011         (char_directives): Change type of fields 'count', max_*_length to
17012         size_t.
17013         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17014         (SSIZE_MAX): Define fallback value.
17015         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17016         instead of 'int' where appropriate. Check a_allocated, d_allocated
17017         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17018         * lib/vasnprintf.c: Include xsize.h.
17019         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17020         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17021         overflow. Avoid wraparound when converting a width or precision from
17022         decimal to binary.
17023
17024 2003-11-16  Bruno Haible  <bruno@clisp.org>
17025
17026         Update from GNU gettext.
17027         * lib/printf-parse.c: Generalize to it can be compiled for wide
17028         strings.
17029         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17030         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17031         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17032         SNPRINTF): New macros.
17033         Don't include <alloca.h> if the file is used inside libintl.
17034         (local_wcslen): New function, for Solaris 2.5.1.
17035         (VASNPRINTF): Use it instead of wcslen.
17036
17037 2003-11-16  Bruno Haible  <bruno@clisp.org>
17038
17039         * lib/xsize.h (xmax): New function.
17040         (xsum, xsum3, xsum4): Declare as "pure" functions.
17041
17042 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17043
17044         * modules/xalloc (Files): Undo latest change, since xalloc.h
17045         no longer needs SIZE_MAX or PTRDIFF_MAX.
17046
17047 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17048
17049         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
17050         gl_PTRDIFF_MAX.
17051
17052 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17053
17054         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
17055         "return", to pacify some unknown compiler.  Problem reported
17056         by Joerg Schilling.
17057
17058 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17059
17060         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
17061         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
17062         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
17063         heuristic is just as accurate as far as we know, and it removes a
17064         dependency on size_max.m4 and ptrdiff_max.m4.
17065
17066 2003-11-11  Bruno Haible  <bruno@clisp.org>
17067
17068         * modules/xsize (Files): Add m4/size_max.m4.
17069         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
17070
17071 2003-11-11  Bruno Haible  <bruno@clisp.org>
17072
17073         * m4/size_max.m4: New file.
17074         * m4/ptrdiff_max.m4: New file.
17075         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
17076         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
17077         (gl_XALLOC): Invoke it.
17078
17079 2003-11-11  Bruno Haible  <bruno@clisp.org>
17080
17081         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
17082         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
17083         defined.
17084
17085 2003-11-10  Paul Eggert  <eggert@twinsun.com>
17086
17087         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
17088         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
17089         rejected some allocations of exactly SIZE_MAX - 2 bytes.
17090         From Bruno Haible.
17091         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
17092         not (size_t) -1, since it's defined here.
17093
17094 2003-11-09  Karl Berry  <karl@gnu.org>
17095
17096         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
17097
17098 2003-11-06  Paul Eggert  <eggert@twinsun.com>
17099
17100         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
17101         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
17102         Reject sizes of exactly SIZE_MAX bytes.
17103         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
17104         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
17105
17106 2003-11-05  Bruno Haible  <bruno@clisp.org>
17107
17108         * lib/xsize.h: Include limits.h, to avoid a possible collision with
17109         SIZE_MAX defined in <limits.h> on Solaris.
17110
17111 2003-11-04  Jim Meyering  <jim@meyering.net>
17112
17113         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
17114         variable names, rather than @VAR@.
17115         * modules/poll: Likewise.
17116
17117 2003-11-04  Bruno Haible  <bruno@clisp.org>
17118
17119         * modules/xsize: New file.
17120         * modules/linebreak: Depend on xsize.
17121         * MODULES.html.sh (func_all_modules): Add xsize.
17122
17123 2003-11-04  Bruno Haible  <bruno@clisp.org>
17124
17125         * m4/xsize.m4: New file.
17126
17127 2003-11-04  Bruno Haible  <bruno@clisp.org>
17128
17129         * lib/xsize.h: New file.
17130         * lib/linebreak.c: Include xsize.h.
17131         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
17132         argument for overflow.
17133         Suggested by Paul Eggert.
17134
17135 2003-11-03  Karl Berry  <karl@gnu.org>
17136
17137         * config/config.{guess,sub}: update from config.
17138
17139 2003-11-03  Jim Meyering  <jim@meyering.net>
17140
17141         * modules/userspec (lib_SOURCES): Add userspec.h.
17142         (Include): Add "userspec.h".
17143         Improve description.
17144
17145 2003-11-03  Jim Meyering  <jim@meyering.net>
17146
17147         * lib/userspec.c: Include "userspec.h".
17148         * lib/userspec.h: New file.
17149
17150 2003-11-03  Bruno Haible  <bruno@clisp.org>
17151
17152         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
17153
17154 2003-11-03  Bruno Haible  <bruno@clisp.org>
17155
17156         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
17157         available, to avoid (extremely rare) race condition.
17158         Suggested by Paul Eggert.
17159
17160 2003-11-02  Karl Berry  <karl@gnu.org>
17161
17162         * config/srclist.txt (vasprintf.c): sync broken, sigh.
17163
17164 2003-10-31  Paul Eggert  <eggert@twinsun.com>
17165
17166         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
17167         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
17168         (read_filesystem_list): Set and use me_type_malloced.
17169         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
17170         whatever the type happens to be), for brevity and consistency.
17171         Check for size calculation overflow on Alphas running OSF/1.
17172
17173 2003-10-31  Jim Meyering  <jim@meyering.net>
17174
17175         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
17176
17177         * lib/linebuffer.c: Include <string.h> for declaration of memset.
17178
17179 2003-10-30  Paul Eggert  <eggert@twinsun.com>
17180             Bruno Haible  <bruno@clisp.org>
17181
17182         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
17183         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
17184
17185 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17186
17187         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
17188         netbsd*-gnu*.  Suggested by Robert Millan.
17189
17190 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17191
17192         * modules/group-member: Depend on stdbool.
17193
17194 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17195
17196         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
17197
17198 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17199
17200         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
17201         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
17202         after the 'gnu' in these cases.  This fixes some bugs in the
17203         previous change, and is based on suggestions by Robert Millan.
17204
17205 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17206
17207         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
17208         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
17209         no longer needed.
17210         * lib/quotearg.c (quotearg_n_options): Use it.
17211         * lib/group-member.c: Include <stdbool.h>.
17212         (free_group_info): Arg is now const *; don't free arg.
17213         (get_group_info): Now returns bool and accepts struct group_info *,
17214         rather than returning a malloc'ed struct group_info *.
17215         All uses changed.  Check for overflow in internal size calculation.
17216
17217         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
17218         rather than xmalloc/xrealloc.
17219         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
17220         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
17221         conformance bug: the old code used a pointer after freeing the
17222         storage that it addressed.
17223         * lib/hash.c (hash_initialize): Simplify the code by using
17224         xalloc_oversized rather than doing it by hand.
17225         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
17226         the buffer preserved.  Use free and xmalloc instead.
17227         * lib/quotearg.c (quotearg_n_options): Likewise.
17228         Use a simpler test for size overflow.  Don't use xalloc_oversized
17229         because unsigned int might be wider than size_t (!); this suggests
17230         that we should switch from unsigned int to size_t for slot numbers.
17231
17232 2003-10-28  Paul Eggert  <eggert@twinsun.com>
17233
17234         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
17235         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
17236         NetBSD kernels.  Requested by Richard Stallman.
17237
17238 2003-10-27  Paul Eggert  <eggert@twinsun.com>
17239
17240         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
17241         to allocate the returned structure.  Do not allocate a subarray,
17242         as x2nrealloc will do that.
17243         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
17244         instead of xnrealloc.
17245         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
17246
17247 2003-10-27  Bruno Haible  <bruno@clisp.org>
17248
17249         * lib/stdbool_.h: Better support for BeOS.
17250
17251 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17252
17253         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
17254         now uses inline.
17255
17256 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17257
17258         * lib/xalloc.h (xalloc_oversized): New static inline function, for
17259         callers that want to do their own size-overflow checking.  Include
17260         <stdbool.h>, since xalloc_oversized returns bool.
17261         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
17262         to use xalloc_oversized.
17263
17264         Add two functions x2realloc, x2nrealloc, for programs that grow
17265         arrays dynamically by doubling their sizes.
17266         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
17267         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
17268         New functions.
17269
17270         Port to C99 semantics for 'inline' of external functions.
17271         Bug reported by Bruno Haible.
17272         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
17273         with the old contents of xnmalloc.
17274         (xnmalloc, xmalloc): Use it.
17275         (xnrealloc_inline): New static inline function,
17276         with the old contents of xnrealloc.
17277         (xnrealloc, xrealloc): Use it.
17278
17279         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17280         that.
17281
17282 2003-10-26  Karl Berry  <karl@gnu.org>
17283
17284         * config/srclist.txt (COPYING.DOC): no longer available from
17285         /gd/gnuorg; don't know where the ultimate source is.
17286
17287 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17288
17289         Fix several address-calculation bugs in the hash modules,
17290         plus some minor code cleanup.
17291
17292         * lib/hash.h: Include <stdbool.h>, for bool.
17293         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17294         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17295         hash_get_n_entries, hash_get_max_bucket_length,
17296         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17297         hash_rehash): Use size_t rather than unsigned.
17298         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17299         hash_get_n_buckets_used, hash_get_n_entries,
17300         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17301         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17302         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17303         Likewise.
17304         (SIZE_MAX): Define if not defined.
17305         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17306         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17307         hash_print):
17308         Use const * when possible.
17309         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17310         (check_tuning): Fix bug: if tuning parameters were very close to
17311         0 or 1, rounding errors could have caused subscript violations.
17312         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17313         (hash_initialize): Add 'fail:' label
17314         to free table and return NULL, and use it to simplify code.
17315         Use calloc rather than clearing the storage ourself.
17316         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17317         buffer size calculations.
17318         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17319         Include <stddef.h>, for size_t.
17320         * lib/hash-pjw.c (hash_pjw): Likewise.
17321         Switch to method described by Bruno Haible.
17322         Include <limits.h>, for CHAR_BIT.
17323         (SIZE_BITS): New macro.
17324
17325 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17326
17327         * m4/getline.m4 (AM_FUNC_GETLINE):
17328         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17329         hosts.  Problem reported by Derek Robert Price in
17330         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17331         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17332         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17333
17334 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17335
17336         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17337         ceiling the allocation at NMAX bytes rather than silently
17338         discarding input bytes before NMAX is reached.  This makes
17339         a difference only if NMAX exceeds SIZE_MAX / 2.
17340
17341         * lib/obstack.c: Merge from glibc.
17342         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17343         Add libc_hidden_def (_obstack_newchunk).
17344         (_obstack_free) [! defined _LIBC]: Remove.
17345         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17346         a clone of the function body.
17347         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17348         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17349
17350         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17351         glibc.
17352         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17353         arg to memcpy.
17354
17355         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17356         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17357         Don't use lvalue casts, as GCC plans to remove support for them
17358         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17359         was also present in the non-GCC version, indicating that this
17360         code had always been buggy and had never been widely used.
17361         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17362         Use the fast variant of each macro, rather than copying the
17363         definiens of the fast variant; that way, we'll be more likely to
17364         catch future bugs in the fast variants.
17365
17366 2003-10-20  Bruno Haible  <bruno@clisp.org>
17367
17368         * modules/wait-process: New file.
17369         * MODULES.html.sh (func_all_modules): Add wait-process.
17370
17371 2003-10-20  Bruno Haible  <bruno@clisp.org>
17372
17373         * m4/wait-process.m4: New file.
17374
17375 2003-10-20  Bruno Haible  <bruno@clisp.org>
17376
17377         * lib/wait-process.h: New file, from GNU gettext.
17378         * lib/wait-process.c: New file, from GNU gettext.
17379
17380 2003-10-19  Jim Meyering  <jim@meyering.net>
17381
17382         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17383         HPUX 10.20.
17384
17385 2003-10-18  Karl Berry  <karl@gnu.org>
17386
17387         * config/config.guess: update from config.
17388
17389 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17390
17391         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17392         (getgroups): First arg is int, not size_t.
17393         Don't let 'free' mangle errno.
17394
17395 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17396
17397         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17398
17399 2003-10-16  Karl Berry  <karl@gnu.org>
17400
17401         * config/config.{guess,sub}: update from config.
17402
17403 2003-10-16  Jim Meyering  <jim@meyering.net>
17404
17405         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17406         memcpy.
17407
17408 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17409
17410         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17411         (SIZE_MAX): Remove.
17412         (new_exclude, add_exclude_file): Initial size no longer needs to
17413         be a power of 2.
17414         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
17415         our own address arithmetic overflow checking.
17416
17417         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
17418         (fnmatch): Do not alloca more than 2000 wide characters;
17419         instead, use malloc for large buffers.
17420         Check for address arithmetic overflow, and return -1
17421         with errno set to ENOMEM in that case.
17422         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17423         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17424         instead, return -1.  Check for address arithmetic overflow.
17425
17426 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17427
17428         Handle invalid suffixes and overflow independently, so that
17429         callers can treat them independently as needed.  Fix some bugs in
17430         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17431         suffix for a human-readable blocksize.  The major caller-visible
17432         change is the addition of a new
17433         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17434         that both overflow and suffix chars were found.
17435
17436         * lib/human.c (humblock): Don't check separately for invalid suffix
17437         char; that is xstrtoumax's job (now that its bug is fixed).
17438         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
17439         INTMAX_MAX]: New macros.
17440         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
17441         TYPE_MAXIMUM): New macros.
17442         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
17443         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
17444         if overflow occurs, as it's what __strtol does and it's more useful
17445         in practice.
17446         (__xstrtol): If __strtol reports some error other than ERANGE,
17447         reflect it to the caller as LONGINT_INVALID.  If it reports
17448         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
17449         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
17450         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
17451         value.
17452         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
17453         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
17454         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
17455         [defined UINTMAX_MAX]: New macros.
17456
17457 2003-10-14  Bruno Haible  <bruno@clisp.org>
17458
17459         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
17460
17461 2003-10-14  Bruno Haible  <bruno@clisp.org>
17462
17463         * m4/sig_atomic_t: New file, from GNU gettext.
17464         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
17465
17466 2003-10-14  Bruno Haible  <bruno@clisp.org>
17467
17468         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
17469         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
17470         Also use volatile where needed.
17471
17472 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17473
17474         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
17475         Change maintainer from Bruno Haible to 'all'.
17476
17477 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17478
17479         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
17480
17481 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17482
17483         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
17484         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
17485         and define in terms of the other primitives.
17486         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17487         (SIZE_MAX): Define if not already defined.
17488         (array_size_overflow): New function.
17489         (xalloc_die): Abort instead of exiting if 'error' returns.
17490         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17491         (xmalloc, xrealloc): Use them.
17492         (xcalloc): Check for address arithmetic overflow.
17493         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17494         a bit faster than strcpy.
17495
17496 2003-10-10  Simon Josefsson  <jas@extundo.com>
17497
17498         * modules/argp (Depends-on): Add restrict and strcase.
17499
17500 2003-10-10  Simon Josefsson  <jas@extundo.com>
17501
17502         * m4/argp.m4: Add AC_C_INLINE.
17503
17504 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17505
17506         Merge getpass from libc, plus a few fixes.
17507
17508         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17509         Include <stdbool.h>.
17510         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17511         __fsetlocking to empty.
17512         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17513         do include <bits/libc-lock.h>.
17514         Do not include <fcntl.h>; not needed.
17515         [_LIBC]: Include <wchar.h>.
17516         (NOTCANCEL_MODE): New macro.
17517         (flockfile, funlockfile) [_LIBC]: New macros.
17518         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17519         [!_LIBC]: New macros.
17520         (call_fclose): New function.
17521         (getpass): Use it.  Save tty stream separately; this simplifies the
17522         code and makes it more reliable if stdin happens to equal stdout.
17523         Invoke __fsetlocking on tty.
17524         Handle thread cancellation if needed.
17525         Namespace cleanup (use __tcgetattr, __getline).
17526         Use bool for Booleans.
17527         [USE_IN_LIBIO]: Handle wide streams.
17528         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17529         stream might go where.
17530
17531         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17532         doesn't have to include <stdio.h> before us.
17533         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17534         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17535         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17536         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17537         if not declared, so that we can use getpass.c code from libc without
17538         rewriting it.
17539         (flockfile, ftrylockfile, funlockfile): New macros.
17540
17541 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17542
17543         * modules/getpass: Depend on stdbool.
17544
17545 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17546
17547         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17548
17549 2003-10-07  Karl Berry  <karl@gnu.org>
17550
17551         * config/config.{guess,sub}: update from config.
17552
17553 2003-10-06  Jim Meyering  <jim@meyering.net>
17554             Bruno Haible  <bruno@clisp.org>
17555
17556         This lets translators provide better translations for the
17557         "Written by ..." part of --version output.
17558         * lib/version-etc.h: Include stdarg.h.
17559         (version_etc_copyright): Declare as readonly.
17560         (version_etc): Make this function variadic with a NULL-terminated list
17561         of author name strings.
17562         (version_etc_va): New declaration.
17563         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17564         (version_etc_copyright): Declare as readonly.
17565         (version_etc_va): New function. Provide a different translatable string
17566         for each possible number of authors < 10. Abbreviate when there are 10
17567         authors or more.
17568         (version_etc): Make this function variadic. Call version_etc_va.
17569         Suggestion from Gary V. Vaughan.
17570
17571         * lib/long-options.h (parse_long_options): Change prototype: the
17572         authors string is moved to the end and becomes variadic.
17573         * lib/long-options.c: Include stdarg.h.
17574         (parse_long_options): Make this function variadic, too.
17575         Call version_etc_va, not version_etc.
17576
17577 2003-10-06  Bruno Haible  <bruno@clisp.org>
17578
17579         * modules/version-etc-2: Remove file.
17580         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17581
17582 2003-10-06  Bruno Haible  <bruno@clisp.org>
17583
17584         * modules/fatal-signal: New file.
17585         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17586
17587 2003-10-06  Bruno Haible  <bruno@clisp.org>
17588
17589         * m4/fatal-signal.m4: New file.
17590         * m4/signalblocking.m4: New file, from GNU gettext.
17591
17592 2003-10-06  Bruno Haible  <bruno@clisp.org>
17593
17594         * lib/version-etc-2.h: Remove file.
17595         * lib/version-etc-2.c: Remove file.
17596
17597 2003-10-06  Bruno Haible  <bruno@clisp.org>
17598
17599         * lib/fatal-signal.h: New file, from GNU gettext.
17600         * lib/fatal-signal.c: New file, from GNU gettext.
17601
17602 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17603
17604         * README: Rework advice for preventing empty .o files.
17605         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17606         not <sys/types.h>.
17607
17608 2003-10-04  Karl Berry  <karl@gnu.org>
17609
17610         * lib/argp*: update from libc.
17611
17612 2003-10-04  Karl Berry  <karl@gnu.org>
17613
17614         * config/config.{guess,sub}: update from config.
17615
17616 2003-10-02  Bruno Haible  <bruno@clisp.org>
17617
17618         * modules/lchown (Include): Add lchown.h.
17619         * modules/time_r (Include): Use "..." syntax.
17620         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17621
17622 2003-10-01  Simon Josefsson  <jas@extundo.com>
17623
17624         * MODULES.html.sh (func_all_modules): Move gethostname from section
17625         'based on' to section 'lacking' POSIX:2001.
17626
17627 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17628
17629         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17630         to output mode on the same stream.
17631
17632 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17633
17634         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17635         Fix arg typo in previous patch.
17636
17637 2003-09-28  Jim Meyering  <jim@meyering.net>
17638
17639         * lib/error.c: Correct cpp indentation.
17640
17641 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17642
17643         * modules/free: New file.
17644
17645 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17646
17647         * m4/free.m4: New file.
17648
17649 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17650
17651         * lib/minmax.h (MIN, MAX)
17652         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17653         Omit the special code that used __typeof__, since we worry that
17654         it could be more trouble than it's worth.  See:
17655         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17656         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17657
17658         * lib/free.c: New file.
17659
17660 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17661
17662         Trivial fixes to Makefile.am parts of module listings.
17663         * modules/strstr: Append strstr.h to lib_SOURCES.
17664         * modules/strcase: Likewise, for strcase.h.
17665
17666 2003-09-27  Karl Berry  <karl@gnu.org>
17667
17668         * config/mkinstalldirs: update from automake.
17669
17670 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17671
17672         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17673         (error_tail): Do not loop, reallocating temporary buffer, since
17674         the output cannot contain more wide characters than the input
17675         contains bytes, the size must be big enough already.  This avoids
17676         one potential size overflow calculation.  Check for size overflow
17677         when calculating temporary buffer size.  Free temporary buffer
17678         when done, if it was allocated with malloc; this plugs a memory
17679         leak.  Remove casts from void * to pointers, that are no longer
17680         needed now that we're assuming C89 or better.
17681
17682         Merge error changes from glibc.
17683
17684         * lib/error.c, error.h: Update copyright notice header to match glibc.
17685         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17686         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17687         Disable cancellation while printing error.
17688         * lib/error.h: Prepend __ to parameter names.
17689
17690 2003-09-26  Jim Meyering  <jim@meyering.net>
17691
17692         * lib/error.c (error_tail): Move some declarations
17693         into inner scope where the local variables are used.
17694
17695 2003-09-26  Bruno Haible  <bruno@clisp.org>
17696
17697         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17698         stpncpy().
17699         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17700
17701 2003-09-26  Bruno Haible  <bruno@clisp.org>
17702
17703         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17704         (stpncpy): Define as alias for gnu_stpncpy.
17705         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17706
17707 2003-09-25  Simon Josefsson  <jas@extundo.com>
17708
17709         * lib/xgetdomainname.h: New file.
17710         * lib/xgetdomainname.c: New file.
17711
17712 2003-09-25  Simon Josefsson  <jas@extundo.com>
17713             Bruno Haible  <bruno@clisp.org>
17714
17715         * modules/getdomainname: New file.
17716         * modules/xgetdomainname: New file.
17717         * MODULES.html.sh (func_all_modules): Add getdomainname,
17718         xgetdomainname.
17719
17720 2003-09-25  Simon Josefsson  <jas@extundo.com>
17721             Bruno Haible  <bruno@clisp.org>
17722
17723         * m4/getdomainname.m4: New file.
17724
17725 2003-09-25  Simon Josefsson  <jas@extundo.com>
17726             Bruno Haible  <bruno@clisp.org>
17727
17728         * lib/getdomainname.h: New file.
17729         * lib/getdomainname.c: New file.
17730
17731 2003-09-25  Karl Berry  <karl@gnu.org>
17732
17733         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17734
17735 2003-09-25  Karl Berry  <karl@gnu.org>
17736
17737         * config/install-sh: update from automake.
17738
17739 2003-09-25  Bruno Haible  <bruno@clisp.org>
17740
17741         * modules/version-etc-2: New file, from modules/version-etc with
17742         modifications.
17743         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17744
17745 2003-09-25  Bruno Haible  <bruno@clisp.org>
17746
17747         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17748         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17749
17750 2003-09-24  Simon Josefsson  <jas@extundo.com>
17751
17752         * modules/xgethostname: Add xgethostname.h.
17753
17754 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17755
17756         * lib/linebuffer.c (freebuffer): Don't free the argument, just
17757         the buffer associated with the argument.  Bug reported by
17758         Simon Josefsson.
17759
17760 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17761
17762         * README: Document assumptions that 'int' is at least 32 bits
17763         wide, that integer arithmetic is 2's complement without overflow,
17764         that there are no holes in integer values, that adding sizes of
17765         two nonoverlapping objects can't overflow, and that all-bits-zero
17766         yields scalar zero.  Fix spelling and capitalization typos.
17767
17768 2003-09-19  Karl Berry  <karl@gnu.org>
17769
17770         * lib/argp.h: update from libc.
17771
17772 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17773
17774         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
17775         to avoid spurious warnings like "AC_RUN_IFELSE was called before
17776         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
17777
17778 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17779
17780         * gnulib-tool: Use "test -h", not "test -L", for portability
17781         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
17782         (tags_regexp): Remove, since \| doesn't conform to POSIX.
17783         (sed_extract_prog): Issue s commands one-by-one, rather than
17784         using \| in one s command.
17785
17786 2003-09-16  Paul Eggert  <eggert@twinsun.com>
17787
17788         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
17789         input error, instead of returning NULL the next time we are called
17790         (and therefore losing track of errno).
17791
17792 2003-09-16  Bruno Haible  <bruno@clisp.org>
17793
17794         * gnulib-tool (func_create_testdir): Warn about duplicated
17795         dependencies.
17796
17797 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17798
17799         * modules/argmatch, modules/fatal, modules/obstack,
17800         modules/xalloc, modules/xgethostname: Sort dependencies by
17801         importance, not alphabetically.
17802
17803 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17804
17805         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
17806         fails, so that the caller gets the proper errno.
17807
17808         * lib/readutmp.c (read_utmp): Likewise.
17809         Check for fstat error.  Close stream and free storage
17810         when failing.
17811
17812 2003-09-14  Karl Berry  <karl@gnu.org>
17813
17814         * config/srclist.txt (strdup.c): disable for c89 changes.
17815
17816 2003-09-14  Jim Meyering  <jim@meyering.net>
17817
17818         * lib/getloadavg.c: Correct cpp indentation.
17819         * lib/strdup.c: Likewise.
17820         * lib/vasnprintf.c: Likewise.
17821
17822 2003-09-14  Bruno Haible  <bruno@clisp.org>
17823
17824         * modules/fwriteerror: New file.
17825         * MODULES.html.sh (func_all_modules): Add fwriteerror.
17826
17827 2003-09-14  Bruno Haible  <bruno@clisp.org>
17828
17829         * lib/fwriteerror.h: New file.
17830         * lib/fwriteerror.c: New file.
17831
17832 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17833
17834         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
17835         modules/xgethostname, modules/xalloc: Depend on exit.
17836
17837 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17838
17839         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
17840
17841         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
17842         and AC_MINIX, too, so that their extensions are available.
17843
17844         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
17845         This macro has been superseded by gl_BACKUPFILE.
17846
17847         More patches to assume C89 or better.
17848
17849         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
17850
17851         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
17852         unconditionally.
17853         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
17854         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
17855         Include <string.h>, <stdlib.h> unconditionally.
17856         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
17857         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
17858         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
17859         headers or for string.h.
17860         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
17861         or strtoul.
17862
17863         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
17864         headers.
17865         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
17866         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17867         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
17868         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
17869         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17870         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
17871         memcpy, memset.
17872         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
17873         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
17874         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
17875         strtol.
17876         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
17877         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
17878         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
17879         strtoul.
17880
17881 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17882
17883         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
17884         * lib/obstack.c [!defined _LIBC]: Likewise.
17885         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
17886         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
17887         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
17888
17889         More changes to assume C89 or better.
17890
17891         * lib/error.c (error_tail): Assume vprintf.
17892
17893         * lib/argmatch.c (getenv): Remove decl.
17894         * lib/progreloc.c (get_full_program_name): Define via prototype.
17895         * lib/setenv.c (clearenv): Likewise.
17896         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
17897         needed.
17898         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
17899         (malloc, memcpy): Remove decls.
17900         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
17901         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
17902         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17903         (memcpy): Remove macro.
17904         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
17905         (__P): Remove.  All uses removed.
17906         (PTR): Remove.  All uses changed to void *.
17907         (CHAR_BIT, NULL): Remove.
17908         (spaces, zeros, memset_space, memset_zero)
17909         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
17910         Remove.
17911         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
17912         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
17913         Define with prototype.
17914         Remove now-unnecessary prototype decl.
17915         (extra_args_spec): Assume ANSI C.  All uses changed.
17916         (extra_args_spec_iso): Remove.
17917         (my_strftime, emacs_strftimeu): Define via prototype.
17918         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
17919         unconditionally.
17920         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
17921         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
17922         (strtoul, strtol): Remove decls.
17923         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
17924         LONG_MAX): Remove.
17925         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17926         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
17927         (LOCALE_PARAM_PROTO): New macro.
17928         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
17929         (INTERNAL (strtol), strtol): Define with a prototype.
17930         (PARAMS): Remove.  All uses removed.
17931         * lib/tempname.c: Include <string.h> unconditionally.
17932         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
17933         * lib/xgethostname.c (main): Define with a prototype.
17934         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
17935         Include <stdlib.h> unconditionally.
17936         (calloc, malloc, realloc, free): Remove decls.
17937         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
17938         Include <stdlib.h> unconditionally.  Sort include file names.
17939         (strtod): Remove.
17940         (xstrtod): Define with a prototype.
17941         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
17942         (strtol, strtoul): Remove decls.
17943
17944 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17945
17946         More patches to assume C89 or better.
17947         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
17948         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
17949         string.h, memchr, STDC_HEADERS.
17950
17951 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17952
17953         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
17954         Include <stdlib.h>, <string.h> unconditionally.
17955         Remove now-unnecessary cast to char *.
17956         * lib/strnlen.c: Include <string.h> unconditionally.
17957         * lib/yesno.c (yesno): Define with a prototype.
17958
17959 2003-09-11  Bruno Haible  <bruno@clisp.org>
17960
17961         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
17962
17963 2003-09-10  Jim Meyering  <jim@meyering.net>
17964
17965         * lib/error.c: Correct indentation of cpp directives.
17966
17967 2003-09-10  Bruno Haible  <bruno@clisp.org>
17968
17969         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
17970         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
17971         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
17972         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
17973         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
17974         <stdlib.h> and <string.h> checks.
17975         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
17976         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
17977
17978 2003-09-10  Bruno Haible  <bruno@clisp.org>
17979
17980         * lib/strcspn.c: Include <string.h> unconditionally.
17981         * lib/strpbrk.c: Include <string.h> unconditionally.
17982         * lib/strstr.c: Include <string.h> unconditionally.
17983         * lib/unicodeio.c: Include <string.h> unconditionally.
17984         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
17985         * lib/unsetenv.c: Likewise.
17986         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
17987         * lib/yesno.c: Include <stdlib.h> unconditionally.
17988         (rpmatch): Add prototype.
17989
17990 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17991
17992         More patches to assume C89 or better.
17993         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
17994         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
17995         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
17996         or for string.h.
17997         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
17998         stdlib.h.
17999         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18000         C headers.
18001         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18002         string.h.
18003         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18004         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18005         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18006         or for string.h.
18007         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18008         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18009         C headers.
18010         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18011         memcpy.
18012         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18013         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18014         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18015         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18016         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18017         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18018         string.h, free.
18019         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18020         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18021         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18022         C headers, or for string.h.
18023         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18024         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18025         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18026         headers, memory.h, stdlib.h, string.h, strings.h.
18027         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18028         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18029         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18030         strchr.
18031         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18032         headers, memory.h, string.h.
18033         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18034         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18035         free.
18036         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18037         headers.
18038         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18039         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
18040         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
18041         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
18042         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
18043
18044 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18045
18046         More K&R removal.
18047
18048         * lib/acosl.c (main): Use a prototype.
18049         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
18050         tanl.c: Likewise.
18051
18052         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
18053
18054         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
18055         (getopt, etopt_long, getopt_long_only, _getopt_internal)
18056         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
18057         with a prototype.
18058         * lib/getopt.c (const): Remove macro.
18059         Include <string.h> unconditionally.
18060         (my_index): Remove; all uses changed to strchr.
18061         (strlen): Remove decl.
18062         (exchange): Remove forward decl; no longer needed.
18063         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
18064         Define with prototype.
18065         * lib/getopt1.c (const): Remove macro.
18066         (getopt_long, getopt_long_only, main): Define with prototype.
18067
18068         * lib/getugroups.c: Include <string.h> unconditionally.
18069
18070         * lib/getusershell.c: Include <stdlib.h> unconditionally.
18071         (getusershell, setusershell, endusershell, readname, main):
18072         Define with prototypes.
18073
18074         * lib/group-member.c: Include group-member.h first.
18075         Include <stdlib.h> unconditionally.
18076
18077         * lib/hard-locale.c: Include hard-locale.h first.
18078         Include <stdlib.h>, <string.h> unconditionally.
18079
18080         * lib/hash.c (free, malloc): Remove decls.
18081         Include <stdlib.h> unconditionally.
18082
18083         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
18084         (getenv): Do not declare.
18085
18086         * lib/idcache.c: Include <string.h> unconditionally.
18087
18088         * lib/long-options.c: Include long-options.h first, to test interface.
18089         Include <stdlib.h> unconditionally.
18090
18091         * lib/makepath.c: Include makepath.h first, to test interface.
18092         Include <stdlib.h> and <string.h> unconditionally.
18093
18094         * lib/linebuffer.c: Include <stdlib.h>.
18095         (free): Remove decl.
18096
18097         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
18098         stddef.h. rpl_malloc returns void *, not char *.
18099         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
18100         prototype.
18101
18102         * lib/md5.h: Include <limits.h> unconditionally.
18103         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
18104         (__P): Remove; all uses removed.
18105         * lib/md5.c: Include "md5.h" first.
18106         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
18107         md5_buffer, md5_process_bytes, md5_process_block):
18108         Define with prototypes.
18109         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
18110         * lib/sha.c: Include "sha.h" first.
18111         Include <stdlib.h>, <string.h> unconditionally.
18112
18113         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
18114         * lib/memcmp.c (__ptr_t): Likewise.
18115         * lib/memrchr.c (__ptr_t): Likewise.
18116         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
18117         Include <string.h> unconditionally.
18118         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
18119         * lib/memchr.c: Include <stdlib.h> unconditionally.
18120         * lib/memchr.c (LONG_MAX): Remove.
18121         * lib/memrchr.c (LONG_MAX): Likewise.
18122         * lib/memchr.c (__memchr): Define via a prototype.
18123         * lib/memrchr.c (__memrchr): Likewise.
18124         * lib/memcmp.c (__P): Remove, and remove all uses.
18125         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
18126         Remove forward decls; no longer needed.
18127         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
18128         Use types required by C89 in prototype.
18129
18130         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
18131         * lib/savedir.c: Likewise.
18132         * lib/mkdir.c (free): Remove decl.
18133         * lib/rmdir.c (rmdir): Define with a prototype.
18134         * lib/savedir.c: Include savedir.h first, to test interface.
18135
18136         * lib/mktime.c (STDC_HEADERS): Remove.
18137         Include <stdlib.h>, <string.h> unconditionally.
18138
18139         * lib/modechange.c: Include <stdlib.h> unconditionally.
18140         (malloc): Remove decl.
18141
18142         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
18143         (free): Remove decl.
18144
18145         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
18146         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
18147         (This type really should be intptr_t, but that's a C99ism.)
18148         (_obstack_memcpy): Remove: all uses changed to memcpy.
18149         Include <string.h> unconditionally.
18150         (struct obstack): Assume __STDC__ for types of members
18151         chunkfun, freefun, extra_arg.
18152         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
18153         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
18154         obstack_begin, obstack_specify_allocation,
18155         obstack_specify_allocation_with_arg, obstack_chunkfun,
18156         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
18157         Remove unprototyped decls and the macros that use them.
18158         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
18159         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
18160         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
18161         (defined __STDC__ && __STDC__)]:
18162         Remove nonprototyped code.
18163         Include <stdlib.h> unconditionally.
18164         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
18165         _obstack_allocated_p, _obstack_free, obstack_free,
18166         _obstack_memory_used, print_and_abort):
18167         Define using prototypes.
18168         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
18169         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
18170         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
18171         obstack_next_free, obstack_object_size, obstack_room) [0]:
18172         Remove unused, unprototyped code.
18173
18174         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
18175
18176         * lib/physmem.c (physmem_total, physmem_available, main): Define
18177         with prototypes.
18178
18179         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
18180         (main): Define with a prototype.
18181
18182         * lib/posixver.c (getenv): Remove decl.
18183
18184         * lib/putenv.c (malloc): Returns void *, not char *.
18185         Include <string.h> unconditionally.
18186         (strchr, memcpy, NULL): Do not define.
18187
18188         * lib/readtokens.c: Include readtokens.h first, to test interface.
18189         Include <stdlib.h>, <string.h> unconditionally.
18190         (init_tokenbuffer): Define with a prototype.
18191
18192         * lib/regex.c (PARAMS): Remove.  All uses removed.
18193         All uses of _RE_ARGS removed, too.
18194         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18195         unconditionally.
18196         (bzero): Assume memset exists.
18197         (memcmp, memcpy, NULL): Remove.
18198         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
18199         char, or assignments to local vars of type signed char.
18200         (init_syntax_once, PREFIX(extract_number_and_incr),
18201         PREFIX(print_partial_compiled_pattern),
18202         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
18203         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
18204         PREFIX(regex_grow_registers), PREFIX(regex_compile),
18205         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
18206         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
18207         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
18208         wcs_compile_range, byte_compile_range, truncate_wchar,
18209         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
18210         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
18211         count_mbs_length, wcs_re_match_2_internal,
18212         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
18213         PREFIX(alt_match_null_string_p),
18214         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
18215         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
18216         regfree, PREFIX(extract_number)): Define with prototype.  Remove
18217         now-unnecessary declaration, if any.
18218         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
18219         regcomp, regexec):
18220         Remove now-unnecessary casts among pointer types.
18221         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
18222
18223         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
18224         (free): Remove decl.
18225
18226         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
18227
18228         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
18229         (free): Remove decl.
18230
18231         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
18232         * lib/xgetcwd.c: Likewise.
18233
18234         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
18235         (free): Remove decl.
18236
18237         * lib/strchrnul.c (strchrnul): Define with a prototype.
18238         Fix bug: c_in was not converted to char before searching.
18239
18240         The following changes are not K&R related:
18241
18242         * lib/group-member.h: Include <sys/types.h>, so that this file is
18243         self-contained.
18244         * lib/makepath.h: Likewise.
18245
18246         * lib/getusershell.c (readname, default_index, line_size, readname):
18247         Use size_t, not int, for sizes.
18248         (readname): If the size overflows, report an error instead of
18249         looping forever.
18250
18251 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18252
18253         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
18254         libc.
18255
18256 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18257
18258         * README: New section: portability guidelines.
18259
18260 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18261
18262         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
18263         C89 spec.
18264
18265 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18266
18267         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
18268
18269 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18270
18271         Assume C89 or better; remove K&R cruft.
18272         A few of these changes were first proposed by Derek Robert Price
18273         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18274
18275         * lib/addext.c: Include <string.h> unconditionally.
18276         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18277         Don't declare getenv or malloc.
18278
18279         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18280         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18281         (NULL): Remove.
18282         (find_stack_direction, alloca): Use prototypes.
18283
18284         * lib/atexit.c (atexit): Define using a prototype.
18285
18286         * lib/basename.c, dirname.c, stripslash.c:
18287         Include <string.h> unconditionally.
18288
18289         * lib/bcopy.c: Include <stddef.h>.
18290         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18291
18292         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18293
18294         * lib/error.h (error, error_at_line, error_print_progname)
18295         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18296         * lib/error.c: Include error.h first, to check interface.
18297         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18298         (VA_START): Remove; all uses changeed to va_start.
18299         (exit, strerror): Remove decls.
18300         (error_print_progname): Prototype uncondionally.
18301         Don't include <errno.h>; no longer needed.
18302         (private_strerror): Remove.
18303         (error_tail): Always define.
18304         (error, error_at_line): Assume C89 or better; always use prototypes.
18305         * lib/fatal.c: Include "fatal.h" first, to test interface.
18306         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18307         (VA_START): Remove; all uses changed to va_start.
18308         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18309         this case.
18310         (exit): Remove decl.
18311         (fatal): Prototype unconditionally.  Assume va_start works.
18312         Abort at end, to pacify gcc.
18313
18314         * lib/euidaccess.c (main): Define with a prototype.
18315
18316         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18317
18318         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18319
18320         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18321         prototypes.
18322         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18323         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18324         (getenv): Remove decl.
18325         (fnmatch): Define using a prototype.
18326         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18327         (FCT): Define using a prototype.
18328
18329         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18330
18331         * lib/gethostname.c: Include <stddef.h>.
18332         (gethostname): Define with prototype.  Length is size_t, not int.
18333
18334 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18335
18336         Assume C89 or better; remove K&R cruft.
18337         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18338         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18339         string.h, getenv, malloc.
18340         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18341         headers.
18342         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18343         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18344         do not check for strerror.
18345         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18346         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18347         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18348         do not check for doprnt or vprintf.
18349         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18350         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18351
18352 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18353
18354         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18355         getversion.c should have been removed then, but was accidentally
18356         preserved.
18357
18358         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18359         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18360
18361 2003-09-08  Karl Berry  <karl@gnu.org>
18362
18363         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18364                 config, forget about prep.
18365
18366         * config/depcomp, missing: update from automake.
18367
18368 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18369
18370         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18371         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18372
18373 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18374
18375         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18376         copy_tm_result.  Bug reported by Simon Josefsson in
18377         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18378
18379 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18380
18381         * m4/time_r.m4: New file.
18382         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18383         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18384         is. Check for timegm declaration.
18385         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18386         Do not check for gmtime_r.
18387         Replace mktime if __mktime_internal does not exist and if mktime
18388         hasn't been replaced already.
18389
18390 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18391
18392         * lib/time_r.c, lib/time_r.h: New files.
18393
18394         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18395         __localtime_r.
18396         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18397         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18398
18399         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18400         __gmtime_r.
18401         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18402         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18403         Include <time_r.h>.
18404
18405         * lib/timegm.c: Switch to glibc implementation, with the following
18406         changes:
18407         [defined HAVE_CONFIG_H]: Include <config.h>.
18408         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18409         (__mktime_internal) [!defined _LIBC]: New decl.
18410         (__gmtime_r) [!defined _LIBC]: New macro and function.
18411         (timegm): Use a prototype, since gnulib assumes C89.
18412         Do not bother declaring tmp to be const, as it's not really usefu.
18413         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
18414         (timegm): Declare only if HAVE_DECL_TIMEGM.
18415
18416 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18417
18418         * MODULES.html.sh (func_all_modules): Add time_r.
18419         * modules/time_r: New file.
18420         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18421         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18422
18423 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18424
18425         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18426         Bug reported by Lute Kamstra in
18427         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18428
18429         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18430         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18431         course with correspondingly smaller numbers for tomorrow and
18432         yesterday.  From Tadayoshi Funaba.  Originally installed into
18433         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18434         coreutils merge?).
18435
18436 2003-08-31  Simon Josefsson  <jas@extundo.com>
18437
18438         * modules/timegm: New file.
18439         * MODULES.html.sh (func_all_modules): Add timegm.
18440
18441 2003-08-31  Simon Josefsson  <jas@extundo.com>
18442
18443         * m4/timegm.m4: New file.
18444
18445 2003-08-31  Simon Josefsson  <jas@extundo.com>
18446
18447         * lib/timegm.h: New file.
18448         * lib/timegm.c: New file.  Based on
18449         wget-1.8.2/src/http.c:mktime_from_utc.
18450
18451 2003-08-31  Karl Berry  <karl@gnu.org>
18452
18453         * lib/argp.h: update from libc.
18454
18455 2003-08-28  Bruno Haible  <bruno@clisp.org>
18456
18457         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
18458         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
18459         followed by '#define fnmatch fnmatch_posix' gives an error.
18460
18461 2003-08-28  Bruno Haible  <bruno@clisp.org>
18462
18463         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
18464         warning on QNX, which defines O_BINARY to 000000.
18465
18466 2003-08-27  Jim Meyering  <jim@meyering.net>
18467
18468         * m4/mkstemp.m4: Require that the system mkstemp be able to create
18469         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
18470         would fail after 32.  Reported by Danny Levinson.  Details here:
18471         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
18472
18473 2003-08-24  Bruno Haible  <bruno@clisp.org>
18474
18475         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
18476         MSVC7 <stdio.h> is included later.
18477
18478 2003-08-22  Simon Josefsson  <jas@extundo.com>
18479
18480         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
18481
18482 2003-08-20  Karl Berry  <karl@gnu.org>
18483
18484         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
18485
18486 2003-08-20  Bruno Haible  <bruno@clisp.org>
18487
18488         * modules/progname: New file.
18489         * MODULES.html.sh (func_all_modules): Add progname.
18490
18491 2003-08-20  Bruno Haible  <bruno@clisp.org>
18492
18493         * lib/progname.h: New file, from GNU gettext.
18494         * lib/progname.c: New file, from GNU gettext.
18495         * lib/progreloc.c: New file, from GNU gettext.
18496
18497 2003-08-19  Jim Meyering  <jim@meyering.net>
18498
18499         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18500         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18501
18502 2003-08-19  Bruno Haible  <bruno@clisp.org>
18503
18504         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18505         more.
18506
18507 2003-08-19  Bruno Haible  <bruno@clisp.org>
18508
18509         * lib/xstrdup.c: Assume <string.h> exists.
18510
18511 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18512
18513         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18514         in makefile rules.
18515
18516 2003-08-18  Jim Meyering  <jim@meyering.net>
18517
18518         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18519         * m4/lib-ld.m4: Likewise.
18520
18521 2003-08-18  Jim Meyering  <jim@meyering.net>
18522
18523         * lib/setenv.h: Indent nested cpp directive.
18524         * lib/vasnprintf.c: Remove trailing blanks.
18525
18526 2003-08-17  Simon Josefsson  <jas@extundo.com>
18527
18528         * modules/xstrndup: New file.
18529         * MODULES.html.sh (func_all_modules): Add xstrndup.
18530
18531 2003-08-17  Simon Josefsson  <jas@extundo.com>
18532
18533         * modules/argp: Fix autoconf macro name. Add more dependencies.
18534
18535 2003-08-17  Simon Josefsson  <jas@extundo.com>
18536
18537         * m4/xstrndup.m4: New file.
18538
18539 2003-08-17  Simon Josefsson  <jas@extundo.com>
18540
18541         * m4/argp.m4: New file.
18542
18543 2003-08-17  Simon Josefsson  <jas@extundo.com>
18544             Bruno Haible  <bruno@clisp.org>
18545
18546         * lib/xstrndup.h: New file.
18547         * lib/xstrndup.c: New file.
18548
18549 2003-08-17  Bruno Haible  <bruno@clisp.org>
18550
18551         * modules/strndup (Files, Include): Add lib/strndup.h.
18552
18553 2003-08-17  Bruno Haible  <bruno@clisp.org>
18554
18555         * modules/euidaccess (Files): Add lib/euidaccess.h.
18556
18557 2003-08-17  Bruno Haible  <bruno@clisp.org>
18558
18559         * lib/strndup.h: New file.
18560
18561 2003-08-17  Bruno Haible  <bruno@clisp.org>
18562
18563         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18564         like AC_GNU_SOURCE.
18565         * modules/extensions (configure.ac): Comment out the invocation of
18566         gl_USE_SYSTEM_EXTENSIONS.
18567
18568 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18569
18570         Merges from coreutils, etc.
18571         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18572         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18573         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18574         fixing a typo.
18575         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18576         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18577
18578 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18579
18580         Document merge from coreutils.
18581         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18582         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18583         * modules/utime: Add m4/utimes-null.m4.
18584
18585 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18586
18587         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18588         space, undoing this 2003-08-12 change:
18589         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18590
18591 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18592
18593         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18594         strtoul.c from libc, undoing this 2003-08-12 change:
18595         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18596
18597 2003-08-16  Jim Meyering  <jim@meyering.net>
18598
18599         Merges from coreutils.
18600         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18601         prefix.  Adjust cache variables similarly.  Create 500 rather than
18602         just 300 files, to exercise bug on Darwin6.5, too.
18603         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18604         $missing_dir.
18605         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18606         AM_SYS_POSIX_TERMIOS.
18607         Reported by mkc@mathdogs.com.
18608         Also change use of $am_cv_sys_posix_termios
18609         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18610         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18611         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18612         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18613         in /proc/mounts until it finds one with matching device number.  This
18614         is unnecessary when the FILE argument *is* a mount point.  No stat call
18615         is necessary in that case.  So, disable the statvfs-testing code on
18616         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18617         as RedHat bug# 84846.
18618         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18619         to 1MB, so as not to render systems with no stack size limit (e.g.,
18620         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18621         Include <unistd.h>.  On some systems,
18622         it is required for the definition of _SC_PAGESIZE.
18623
18624 2003-08-16  Jim Meyering  <jim@meyering.net>
18625
18626         Merge from coreutils.
18627         * lib/xstrtoimax.c: #else #if -> #elif.
18628         * lib/xstrtoumax.c: Likewise.
18629
18630 2003-08-16  Jim Meyering  <jim@meyering.net>
18631
18632         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18633         * m4/utimes.m4: Removed.
18634         * m4/utimes-null.m4: Renamed from utimes.m4.
18635
18636         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18637         to 1MB, so as not to render systems with no stack size limit (e.g.,
18638         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18639         Include <unistd.h>.  On some systems,
18640         it is required for the definition of _SC_PAGESIZE.
18641
18642 2003-08-16  Jim Meyering  <jim@meyering.net>
18643         and Paul Eggert  <eggert@cs.ucla.edu>
18644
18645         Merges from coreutils, etc.
18646
18647         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18648         using the latest version from cvs.  This avoids problems with #line
18649         directives using a vendor (Sun) compiler.
18650         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18651         Don't set GETGROUPS_LIB here; now it's
18652         done via getgroups.m4's wrapper function.
18653         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18654         rather than just in sh-util/configure.in, so that the
18655         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18656         same.
18657         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18658         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18659         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18660         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18661         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18662         Remove code that is now done by the newly-required macros.
18663         Append $(EXEEXT) to DF_PROG.
18664         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18665         Do not invoke or require the following here,
18666         since prereq.m4 or some gnulib .m4 now does this for us:
18667         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18668         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18669         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18670         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18671         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18672         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18673         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18674         AC_FUNC_OBSTACK.
18675         Do not replace the following functions, as this is now the job
18676         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18677         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18678         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18679         atexit getpass, strdup, getpagesize.
18680         Replace 'raise'.
18681         Do not check for the following functions, as this is now the job
18682         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18683         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18684         setregid.
18685         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18686         Check for sys/sysctl.h.
18687         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18688         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18689         of checking for ssize_t ourselves.
18690
18691         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18692         Require every macro that gnulib/modules/* suggests for us.
18693         (jm_PREREQ_ADDEXT): New macro.
18694         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18695         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18696
18697         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18698         (gl_PHYSMEM): Use it.
18699         Also check for `table' function.
18700         Check for new headers and functions.
18701         Add check for sys/sysmp.h.
18702         With suggestions from Kaveh Ghazi.
18703         Ignore headers that are present but cannot be compiled.  This
18704         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18705         C 5.4.
18706
18707 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18708
18709         Document merge from coreutils.
18710         * modules/userspec: Depend on posixver.
18711         * modules/strftime: Depend on tzset.
18712
18713 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18714
18715         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18716         rather than tab, after '#' in shell-script copyright notices.
18717         Suggested by Bruno Haible.
18718
18719 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18720
18721         * config/srclist-update: Use three spaces, rather than tab, after '#'
18722         in shell-script copyright notices.  Suggested by Bruno Haible.
18723         Remove unnecessary parenthesization in regular expression.
18724
18725 2003-08-15  Jim Meyering  <jim@meyering.net>
18726
18727         Merge from coreutils.
18728         * lib/xgethostname.c: Include <stdlib.h>.
18729         (xghostname): Don't exit for anything other than memory-related
18730         failure; just return NULL.
18731         * lib/userspec.c: Include "posixver.h".
18732         (parse_user_spec): Accept `.' as a separator only
18733         in pre-POSIX-200112 mode.
18734         * lib/strtoimax.c: Use #elif rather than #else #if.
18735         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18736         Remove function, now that we can rely on a working tzset function.
18737         [!_LIBC]: Ensure that the required autoconf test has been run.
18738         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18739         Use underlying_strftime for %r.
18740         * lib/sha.c: Merge in some clean-up and optimization changes from
18741         glibc.
18742         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18743         Ensure that it is a multiple of 64.
18744         Rearrange loop exit tests so as to avoid performing an
18745         additional fread after encountering an error or EOF.
18746         * lib/realloc.c: Update copyright date.
18747
18748 2003-08-15  Jim Meyering  <jim@meyering.net>
18749         and Paul Eggert  <eggert@twinsun.com>
18750
18751         Merge from coreutils.
18752         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
18753         member but strut utmpx does not.  Needed for AIX 4.3.3.
18754         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
18755
18756 2003-08-15  Jim Meyering  <jim@meyering.net>
18757         and Paul Eggert  <eggert@cs.ucla.edu>
18758
18759         Merges from coreutils, etc.
18760         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
18761         Require gl_FUNC_TZSET_CLOBBER.
18762         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
18763         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
18764         members.
18765
18766 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18767
18768         Help the merge from coreutils.
18769         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
18770         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
18771         * m4/tzset.m4: Use it too.
18772
18773 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18774
18775         * modules/tzset: New file.
18776
18777 2003-08-14  Jim Meyering  <jim@meyering.net>
18778
18779         Merges from coreutils.
18780         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
18781         variable names, rather than @FNMATCH_H@.
18782         * modules/alloca: Likewise for $(ALLOCA_H).
18783
18784         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
18785         the three copies of the literal target, `fnmatch.h'.
18786         * modules/alloca (alloca.h): Likewise.
18787
18788 2003-08-14  Jim Meyering  <jim@meyering.net>
18789
18790         Merge from coreutils.
18791         * m4/tzset.m4: New file.
18792         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
18793         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
18794         otherwise, AIX 5.1 systems would end up using the latter.
18795         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
18796         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
18797         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
18798         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
18799
18800 2003-08-14  Jim Meyering  <jim@meyering.net>
18801
18802         Merge from coreutils.
18803         * lib/obstack.h: Whitespace changes.
18804         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
18805         and xcalloc return values.
18806         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
18807         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
18808         hang on OSF/1 5.1 for DIR on both local and remote file systems.
18809         Reported by (and fix confirmed by) Nelson H. F. Beebe.
18810         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18811         error from mntctl.
18812         Use mntctl's return value to drive the entry-processing loop, since
18813         we can't rely on the value of the vmt_length member in the last
18814         entry.  On some systems doing so could result in exhausting
18815         virtual memory.  Based in part on a patch from Mike Jetzer.
18816
18817 2003-08-14  Jim Meyering  <jim@meyering.net>
18818         and Paul Eggert  <eggert@twinsun.com>
18819
18820         Merges from coreutils, plus other fixes.
18821         * lib/physmem.c: Merge in portability changes from gcc/libiberty
18822         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
18823         for credits and details.  Thanks to Kaveh Ghazi for helping
18824         to keep these files in sync.
18825         (ARRAY_SIZE): Define it.
18826         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
18827         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
18828         (memcasecmp): Don't assume size_t fits in unsigned int.
18829         Remove casts and duplicate code.
18830         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
18831         (memcpy): Remove definition.
18832         Merge in some clean-up and optimization changes from glibc.
18833         [BLOCKSIZE]: Move definition to top of file.
18834         Ensure that it is a multiple of 64.
18835         Rearrange loop exit tests so as to avoid performing an
18836         additional fread after encountering an error or EOF.
18837         * lib/md5.h (md5_uintptr): Define.
18838         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
18839         return to the initial working directory.  Preserve errno
18840         for caller.
18841         * lib/idcache.c: Include "xalloc.h".
18842         (xmalloc, xrealloc): Remove decls.
18843         (getuser): Remove casts no longer required in C89.
18844         * lib/human.c: Include stdio.h, for sprintf.
18845         * lib/group-member.c: Include "xalloc.h".
18846         (xmalloc, xrealloc): Remove decls.
18847         (get_group_info): Remove casts no longer required in C89.
18848         * lib/getusershell.c (readname): Remove casts no longer required in
18849         C89.
18850         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
18851         * lib/getline.c: Whitespace fix, from coreutils.
18852
18853 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18854
18855         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
18856         Check for isascii.
18857
18858         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18859         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18860         Undo previous (whitespace-only) change.
18861
18862 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18863
18864         * lib/exclude.c: Include <ctype.h>
18865         (IN_CTYPE_DOMAIN): New macro.
18866         (is_space): New fn.
18867         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
18868         and empty lines.
18869
18870         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18871         Undo previous (whitespace-only) change.
18872
18873 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18874
18875         * config/srclist-update: Change update back to the old behavior,
18876         leaving whitespace alone.  Use one 'sed' command rather than a
18877         pipeline.
18878         (fixlicense): Now a variable, not a function.
18879         (remove_trailing_blanks): Remove.
18880         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
18881         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18882         Undo previous (whitespace-only) change.
18883
18884 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18885
18886         Merge from coreutils.
18887         * modules/euidaccess: Add lib_SOURCES, include for new
18888         file euidaccess.h
18889
18890 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18891
18892         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18893         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18894         Normalize leading white space and remove trailing white space.
18895
18896         Merge from coreutils
18897         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
18898
18899         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
18900         0.12.1.  These files are now being upgraded automatically by
18901         ../config/srclist-update.
18902
18903 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18904
18905         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18906         Normalize leading white space and remove trailing white space.
18907         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
18908         notice, as per ../config/srclist-update.
18909
18910         Merge from coreutils.
18911         * lib/euidaccess.h: New file.
18912         * lib/euidaccess.c: Include it.
18913         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
18914         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
18915         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
18916
18917 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18918
18919         * config/srclist-update: Add copyright notice.
18920         (remove_id_lines, remove_trailing_blanks): New constants.
18921         (fixfile): Use them to normalize spacing a bit in copied files.
18922         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18923         Normalize leading white space and remove trailing white space.
18924
18925         * config/texinfo.tex: Sync with texinfo.
18926
18927         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
18928         strtoul.c from libc, to merge coreutils whitespace changes.
18929
18930         * config/srclist.txt: Get the following m4 files from gettext:
18931         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
18932         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
18933         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
18934         wint_t.m4.
18935
18936 2003-08-12  Karl Berry  <karl@gnu.org>
18937
18938         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
18939         been made.
18940
18941 2003-08-11  Paul Eggert  <eggert@twinsun.com>
18942
18943         * modules/gnu-source, m4/gnu-source.m4:
18944         Remove; we're assuming Autoconf 2.54 or later now.
18945         Suggested by Bruno Haible.
18946         * MODULES.html.sh (func_all_modules): Remove gnu-source.
18947
18948 2003-08-11  Bruno Haible  <bruno@clisp.org>
18949
18950         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
18951
18952 2003-08-11  Bruno Haible  <bruno@clisp.org>
18953
18954         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
18955         (vasnprintf): Use it instead of wcslen.
18956
18957 2003-08-11  Bruno Haible  <bruno@clisp.org>
18958
18959         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
18960         value to ensure that _Bool promotes to int. Use #define for _Bool when
18961         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
18962
18963 2003-08-10  Karl Berry  <karl@gnu.org>
18964
18965         * lib/regex.h: update from libc (whitespace fix).
18966
18967 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18968
18969         Merge some files from coreutils.  These changes were
18970         originally made by Jim Meyering.
18971         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
18972         many older Unixes require this.
18973         * lib/alloca.c (alloca): Remove cast to argument of free;
18974         no longer needed in C89.
18975         * lib/alloca_.h, regex.h: Fix white space to match
18976         what GNU indent does.
18977
18978 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18979
18980         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
18981         apparently Emacs's Unicode mode got confused before my 2003-08-05
18982         checkin.
18983
18984 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18985
18986         * m4/extensions.m4: New file.
18987         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
18988         Require gl_USE_SYSTEM_EXTENSIONS.
18989         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
18990         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
18991
18992 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18993
18994         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
18995         * modules/extensions, modules/gnu-source: New files.
18996         * modules/timespec, modules/unlocked-io: Depend on extensions.
18997
18998 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18999
19000         * modules/restrict: New file.
19001         * MODULES.html.sh (func_all_modules): Add restrict.
19002         * modules/regex: Depend on restrict.
19003
19004 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19005
19006         * m4/restrict.m4: New file.
19007         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19008
19009 2003-08-07  Bruno Haible  <bruno@clisp.org>
19010
19011         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19012         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19013
19014 2003-08-07  Bruno Haible  <bruno@clisp.org>
19015
19016         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19017         makes the module 'getndelim2' compatible with the module 'getline'.
19018
19019 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19020
19021         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19022         byte with "\201" to avoid glitches when editing that source file
19023         with multi-gnome-terminal.
19024
19025 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19026
19027         * lib/bumpalloc.h: Remove.
19028
19029 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19030
19031         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19032         * modules/bumpalloc: Remove.
19033
19034 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19035
19036         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19037         GNU coding style.
19038
19039         Merge from coreutils.
19040         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
19041         1. From glibc.
19042         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
19043         from Karl Berry, implemented by Jim Meyering.
19044         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
19045         from Dmitry V. Levin.
19046         Remove anachronistic cast of xrealloc.
19047         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
19048         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
19049         type. Otherwise, it wouldn't compile with at least /bin/cc on
19050         ymp-cray-unicos9.0.2.X.
19051         Combine two mostly-identical uses of alloca into one.
19052         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
19053
19054 2003-08-04  Dave Love  <d.love@dl.ac.uk>
19055
19056         [From Emacs.]
19057
19058         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
19059         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
19060         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
19061         obsolete NLIST_NAME_UNION.
19062         [__GNU__]: Undef BSD and FSCALE.
19063         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
19064
19065 2003-08-03  Paul Eggert  <eggert@twinsun.com>
19066
19067         * lib/stdbool_.h (_Bool): Make it signed char, instead of
19068         an enum type, so that it's guaranteed to promote to int.  See:
19069         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
19070
19071 2003-08-03  Karl Berry  <karl@gnu.org>
19072
19073         * config/depcomp: update from automake.
19074
19075 2003-07-31  Paul Eggert  <eggert@twinsun.com>
19076
19077         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
19078         (strerror): Don't assume that a printable int fits in 14 bytes.
19079
19080 2003-07-31  Bruno Haible  <bruno@clisp.org>
19081
19082         * modules/getpass-gnu: New file.
19083         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
19084
19085 2003-07-31  Bruno Haible  <bruno@clisp.org>
19086
19087         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
19088
19089 2003-07-24  Karl Berry  <karl@gnu.org>
19090
19091         * config/missing: update from automake.
19092
19093 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
19094             Bruno Haible  <bruno@clisp.org>
19095
19096         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
19097         * lib/getline.c (getline, getdelim): Likewise.
19098         Remove _GNU_SOURCE define; now it's defined in config.h through
19099         m4/getline.m4.
19100
19101 2003-07-23  Karl Berry  <karl@gnu.org>
19102
19103         * config/config.sub: update from prep.
19104
19105 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19106
19107         * modules/xalloc (Depends-on): Add exitfail.
19108         * modules/xmemcoll: Likewise.
19109
19110 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19111
19112         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
19113         over-parenthesization in macros.
19114
19115         Sync with coreutils.
19116
19117         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
19118         required by C99.
19119
19120         Use `exit_failure' for xalloc and xmemcoll instead of their own
19121         private exit-failure variables.
19122         * lib/xalloc.h (xalloc_exit_failure): Remove.
19123         * lib/xmalloc.c: Likewise.  Include exitfail.h.
19124         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
19125         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
19126         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
19127         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
19128
19129 2003-07-20  Jim Meyering  <jim@meyering.net>
19130
19131         * modules/closeout (Depends-on): Add exitfail.
19132         Suggestion from Bruno Haible.
19133
19134 2003-07-19  Karl Berry  <karl@gnu.org>
19135
19136         * config/config.sub: update from prep.
19137
19138 2003-07-18  Paul Eggert  <eggert@twinsun.com>
19139
19140         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
19141         Remove.
19142         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
19143         to test that it can stand by itself.  Include "exitfail.h".
19144         Clients should set exit_failure instead.
19145         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
19146
19147 2003-07-18  Bruno Haible  <bruno@clisp.org>
19148
19149         * modules/getndelim2: New file.
19150         * modules/getline: Share files with module getndelim2.
19151         * modules/getnline: Depend on getndelim2 instead of sharing files with
19152         it. Add getnline.c to lib_SOURCES.
19153         * MODULES.html.sh (func_all_modules): Add getndelim2.
19154
19155 2003-07-18  Bruno Haible  <bruno@clisp.org>
19156
19157         * m4/getndelim2.m4: New file.
19158         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
19159         invoke gl_PREREQ_GETNDELIM2.
19160         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
19161         gl_PREREQ_GETNDELIM2.
19162         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
19163         gl_GETNDELIM2.
19164
19165 2003-07-18  Bruno Haible  <bruno@clisp.org>
19166
19167         * lib/getndelim2.h: New file.
19168         * lib/getndelim2.c: Make into a module of its own. Include config.h,
19169         getndelim2.h.
19170         (getndelim2): Make non-static. Change return type to ssize_t.
19171         * lib/getline.h: Change argument names.
19172         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
19173         * lib/getnline.c: Include getndelim2.h.
19174
19175 2003-07-18  Andreas Schwab  <schwab@suse.de>
19176
19177         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
19178
19179 2003-07-17  Karl Berry  <karl@gnu.org>
19180
19181         * config/config.sub: update from prep.
19182
19183 2003-07-17  Bruno Haible  <bruno@clisp.org>
19184
19185         * modules/getnline: New file.
19186         * modules/getline: Add lib/getndelim2.c to source file list.
19187         * MODULES.html.sh (func_all_modules): Add getnline.
19188
19189 2003-07-17  Bruno Haible  <bruno@clisp.org>
19190
19191         * m4/getnline.m4: New file.
19192
19193 2003-07-17  Bruno Haible  <bruno@clisp.org>
19194
19195         * m4/Makefile.am.in: Remove file.
19196         * m4/Makefile.am: Remove file.
19197         * m4/Makefile.in: Remove file.
19198
19199 2003-07-17  Bruno Haible  <bruno@clisp.org>
19200
19201         * lib/getnline.h: New file.
19202         * lib/getnline.c: New file.
19203         * lib/getndelim2.c: New file, extracted from getline.c.
19204         (getndelim2): Renamed from getdelim2, with added nmax argument.
19205         * lib/getline.c: Include getndelim2.c.
19206         (getdelim2): Moved out to getndelim2.c.
19207         (getline, getdelim): Update.
19208
19209 2003-07-17  Bruno Haible  <bruno@clisp.org>
19210
19211         * lib/Makefile.am: Remove file.
19212         * lib/Makefile.in: Remove file.
19213
19214 2003-07-17  Bruno Haible  <bruno@clisp.org>
19215
19216         * configure.in: Remove file.
19217         * Makefile.in: Remove file.
19218
19219 2003-07-17  Bruno Haible  <bruno@clisp.org>
19220
19221         * MODULES.html.sh: Put the </BODY> right before </HTML>.
19222
19223 2003-07-16  Karl Berry  <karl@gnu.org>
19224
19225         * config/srclist-update: was running fixlicense twice, which caused
19226                 texinfo.tex to be nullified for some reason.  Simplify,
19227                 $gplsrc is no longer needed as far as I can see?
19228
19229 2003-07-16  Jim Meyering  <jim@meyering.net>
19230
19231         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
19232
19233 2003-07-15  Paul Eggert  <eggert@twinsun.com>
19234
19235         * config/srclist.txt: Get the following files from gettext-runtime/intl
19236         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
19237         ref-del.sin.  From Bruno Haible.
19238         * config/srclist-update (fixfile): Change grep pattern again, since the
19239         previous fix didn't work (there was another trailing $).  Use
19240         '[$]' to escape the $s.
19241
19242 2003-07-15  Karl Berry  <karl@gnu.org>
19243
19244         * lib/vasnprintf.c: update from gettext.
19245
19246 2003-07-15  Karl Berry  <karl@gnu.org>
19247
19248         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
19249         gets expanded when surrounded by '$'.
19250
19251 2003-07-15  Jim Meyering  <jim@meyering.net>
19252
19253         * modules/save-cwd: Don't depend on error.  From Derek Price.
19254
19255 2003-07-15  Jim Meyering  <jim@meyering.net>
19256
19257         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
19258
19259 2003-07-14  Simon Josefsson  <jas@extundo.com>
19260
19261         * modules/mempcpy: New file.
19262         * MODULES.html.sh (func_all_modules): Add mempcpy.
19263
19264 2003-07-14  Simon Josefsson  <jas@extundo.com>
19265
19266         * m4/mempcpy.m4: New file.
19267
19268 2003-07-14  Simon Josefsson  <jas@extundo.com>
19269
19270         * lib/mempcpy.h: New file.
19271         * lib/mempcpy.c: New file.
19272
19273 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19274
19275         * modules/getdate, modules/posixtm: Depend on mktime.
19276
19277 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19278
19279         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19280         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19281         unicodeio.c, unicodeio.h, unlocked-io.h:
19282         Switch from LGPL to GPL.
19283
19284 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19285
19286         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19287         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19288         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19289         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19290         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19291         updated automatically by ../config/srclist-update.  This changes
19292         their license from LPGL to GPL.
19293
19294 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19295
19296         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19297         assumed to refer to the root of the most recent stable gettext version.
19298         * config/srclistvars.sh: Add defaults for eggert.
19299         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19300         Match "This program" as well as "The program".  This is needed
19301         for gettext.
19302
19303 2003-07-14  Jim Meyering  <jim@meyering.net>
19304
19305         Don't emit diagnostics.  Let callers do that.
19306         * lib/save-cwd.c: Don't include "error.h".
19307         (save_cwd): Don't call error.  Ensure that errno is valid
19308         when returning nonzero.
19309
19310         * lib/save-cwd.h (restore_cwd): Update prototype.
19311         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19312         Simplify.  Don't call error upon failure.  Let callers do that.
19313         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19314         when auditing is enabled.  But don't bother updating the #if.
19315
19316 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19317
19318         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19319         it breaks C++ compilation.
19320         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19321
19322 2003-07-10  Simon Josefsson  <jas@extundo.com>
19323
19324         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19325
19326 2003-07-10  Jim Meyering  <jim@meyering.net>
19327
19328         * m4/clock_time.m4: Remove trailing blank.
19329         * m4/intmax_t.m4: Likewise.
19330
19331 2003-07-10  Jim Meyering  <jim@meyering.net>
19332
19333         * lib/vasnprintf.c: Remove trailing blanks.
19334         Make cpp indentation consistent.
19335
19336 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19337
19338         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19339         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19340         Switch from LGPL to GPL.
19341
19342 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19343
19344         * config/srclist.txt: Sort sublists.  Add
19345         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19346         that differ from gnulib for one reason or another; we'd like this list
19347         to be smaller but for now let's document what we have.
19348
19349 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19350
19351         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19352         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19353         and sweeter "eval x=$x".
19354         * config/srclist.txt: Get lib/argp* from glibc.
19355
19356 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19357
19358         * lib/mktime.c: Fix some boundary cases and remove need for floating
19359         point.
19360
19361         Issue a compile-time diagnostic if time_t is floating point, or if
19362         two's complement arithmetic is not in effect, or if arithmetic
19363         right shift does not propagate the sign.  These assumptions were
19364         all in the original code but they weren't checked.
19365
19366         (TIME_T_MIDPOINT, verify): New macros.
19367         (__isleap): Remove; it has integer overflow problems.
19368         (leapyear): New function, without those problems.
19369         (ydhms_tm_diff): Remove; splitting into two parts.
19370         (ydhms_diff): New function, containing the arithmetic part of
19371         the old ydhms_tm_diff function.  Issue a compile-time
19372         diagnostic if we are not using C99 integer division.
19373         Avoid casts when possible.
19374         (guess_time_tm): New function, containing the checking part of
19375         the old ydhms_tm_diff function.  Return the new value, rather than
19376         the difference between it and the old.  Accept a new argument T
19377         so that *T specifies the old value.  Check for overflow in the result.
19378
19379         (__mktime_internal): Use a time_t offset, not a long int offset.
19380         This undoes the 2003-06-04 change, which is no longer needed now
19381         that we have better overflow checking.
19382         (localtime_offset): Likewise.
19383
19384         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19385         and long are 64-bit but int is only 32-bit.
19386         (ydhms_diff): Use long int to store year1 and yday1.
19387         Issue a compile-time diagnostic if long int is not wide enough.
19388
19389         (__mktime_internal): Use long int to store adjusted year and yday.
19390         Use plain C rather than preprocessor commands, if that doesn't
19391         affect efficiency.
19392         Check for overflow (and try to repair) after each probe
19393         rather than checking only at the very end.  This avoids some bugs
19394         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19395         does not equal GMT offset at maximum time).
19396         Use integer to check for overflow rather than floating point; this
19397         is more portable to non-IEEE hosts, and is a tad faster.
19398         When we detect that we are oscillating between two values,
19399         don't check whether tm_isdst has the requested value, since
19400         we already know the answer.  When tm_isdst has the wrong value,
19401         use a different heuristic to find the right one, based on the
19402         extreme values actually observed in practice in tz2003a,
19403         rather than the (overly optimistic) "previous 3 calendar quarters".
19404
19405         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19406         "T const" to accommodate glibc style.
19407         (check_result): Use less-confusing report format.  "long" -> "long int.
19408         (main): Likewise.
19409         Don't loop if the iteration overflows time_t.
19410         Allow a negative step in the iteration.
19411
19412 2003-07-06  Karl Berry  <karl@gnu.org>
19413
19414         * config/depcomp: update from automake.
19415         * config/config.sub: update from prep.
19416
19417 2003-07-03  Karl Berry  <karl@gnu.org>
19418
19419         * config/config.guess: update from prep.
19420
19421 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19422
19423         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19424         xreadlink.c now includes it unconditionally.
19425
19426 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19427
19428         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19429         having it depend on HAVE_SYS_TYPES_H.
19430
19431 2003-07-01  Bruno Haible  <bruno@clisp.org>
19432
19433         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19434         <sys/types.h> should be sufficient.
19435         Reported by Paul Eggert.
19436
19437 2003-06-26  Karl Berry  <karl@gnu.org>
19438
19439         * config/depcomp: update from automake.
19440
19441 2003-06-26  Bruno Haible  <bruno@clisp.org>
19442
19443         * modules/human: Depend on module stdbool.
19444
19445 2003-06-25  Bruno Haible  <bruno@clisp.org>
19446
19447         * modules/readlink: New file.
19448         * modules/xreadlink: Depend on it.
19449         * MODULES.html.sh (func_all_modules): Add readlink.
19450
19451 2003-06-25  Bruno Haible  <bruno@clisp.org>
19452
19453         * m4/readlink.m4: New file.
19454
19455 2003-06-25  Bruno Haible  <bruno@clisp.org>
19456
19457         * lib/readlink.c: New file.
19458
19459 2003-06-22  Karl Berry  <karl@gnu.org>
19460
19461         * config/srclist.txt: update mkinstalldirs from automake.
19462         * config/mkinstalldirs: update.
19463
19464 2003-06-22  Bruno Haible  <bruno@clisp.org>
19465
19466         Portability to mingw32.
19467         * m4/ssize_t.m4: New file, from GNU gettext.
19468         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
19469         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
19470
19471 2003-06-22  Bruno Haible  <bruno@clisp.org>
19472
19473         * modules/safe-read: Add m4/ssize_t.m4.
19474         * modules/xreadlink: Add m4/ssize_t.m4.
19475
19476 2003-06-20  Bruno Haible  <bruno@clisp.org>
19477
19478         Assume C89, so PARAMS isn't needed.
19479         * lib/unicodeio.h (PARAMS): Remove.
19480         * lib/unicodeio.c: Don't use PARAMS.
19481
19482 2003-06-18  Karl Berry  <karl@gnu.org>
19483
19484         * config/config.{guess,sub}: update from prep.
19485
19486 2003-06-18  Jim Meyering  <jim@meyering.net>
19487
19488         Merge changes from coreutils.
19489         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19490         Remove explicit declarations of xmalloc and realloc.
19491         Include xalloc.h.
19492         (read_utmp): Remove anachronistic cast of xmalloc.
19493
19494 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19495
19496         Assume C89, so PARAMS isn't needed.
19497         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19498         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19499         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19500         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19501         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19502         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19503         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19504         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19505         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19506         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19507         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19508         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19509         no longer needed. Anyway, config.h should always be included before any
19510         other file.
19511
19512 2003-06-11  Simon Josefsson  <jas@extundo.com>
19513
19514         * modules/sysexits: New file.
19515         * MODULES.html.sh (func_all_modules): Add sysexits.
19516
19517 2003-06-11  Simon Josefsson  <jas@extundo.com>
19518
19519         * lib/sysexit_.h: New file.
19520
19521 2003-06-11  Derek Price  <derek@ximbiot.com>
19522
19523         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19524         necessary.
19525
19526 2003-06-11  Bruno Haible  <bruno@clisp.org>
19527
19528         * m4/sysexits.m4: New file.
19529
19530 2003-06-10  Simon Josefsson  <jas@extundo.com>
19531
19532         * lib/argp.h: New file, from glibc.
19533         * lib/argp-ba.c: New file, from glibc.
19534         * lib/argp-eexst.c: New file, from glibc.
19535         * lib/argp-fmtstream.c: New file, from glibc.
19536         * lib/argp-fmtstream.h: New file, from glibc.
19537         * lib/argp-fs-xinl.c: New file, from glibc.
19538         * lib/argp-help.c: New file, from glibc.
19539         * lib/argp-namefrob.h: New file, from glibc.
19540         * lib/argp-parse.c: New file, from glibc.
19541         * lib/argp-pv.c: New file, from glibc.
19542         * lib/argp-pvh.c: New file, from glibc.
19543         * lib/argp-xinl.c: New file, from glibc.
19544
19545 2003-06-10  Simon Josefsson  <jas@extundo.com>
19546
19547         * modules/strchrnul: New file.
19548
19549 2003-06-10  Simon Josefsson  <jas@extundo.com>
19550
19551         * modules/argp: New file.
19552
19553 2003-06-10  Simon Josefsson  <jas@extundo.com>
19554
19555         * m4/strchrnul.m4: New file.
19556
19557 2003-06-10  Simon Josefsson  <jas@extundo.com>
19558
19559         * lib/strchrnul.h: New file.
19560         * lib/strchrnul.c: New file.
19561
19562 2003-06-10  Bruno Haible  <bruno@clisp.org>
19563
19564         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19565
19566 2003-06-07  Karl Berry  <karl@gnu.org>
19567
19568         * config/config.{guess,sub}: update from prep.
19569
19570 2003-06-07  Jim Meyering  <jim@meyering.net>
19571
19572         * modules/strtod: Use $(...) notation, not @...@ for
19573         AC_REPLACE'd variables.
19574         * modules/localcharset: Likewise.
19575
19576 2003-06-07  Jim Meyering  <jim@meyering.net>
19577
19578         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19579         in place of my name in the copyright comment.
19580         Remove definition and uses of __P.
19581
19582         From coreutils.
19583         * lib/stat.c: Don't declare xmalloc explicitly.
19584         Instead, include "xalloc.h".
19585         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19586         xrealloc, and xcalloc return values.
19587         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19588         Improve comment.
19589         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19590
19591 2003-06-07  Bruno Haible  <bruno@clisp.org>
19592
19593         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19594         avoid AC_CONFIG_LINKS.
19595         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19596         fnmatch.h, to avoid AC_CONFIG_LINKS.
19597         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19598
19599 2003-06-07  Bruno Haible  <bruno@clisp.org>
19600
19601         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19602         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19603         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19604         directory.
19605         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19606         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19607         directory.
19608
19609 2003-06-06  Jim Meyering  <jim@meyering.net>
19610
19611         Merge from coreutils.
19612         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19613         Consolidate declarations and initializations of *_base* locals.
19614
19615         Merge from coreutils.
19616         This avoids a core dump on systems without GNU putenv,
19617         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19618         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19619         (unsetenv): New static function, from GNU libc.
19620         (rpl_putenv): Use it.
19621
19622         * lib/modechange.c: Remove trailing blanks.
19623
19624         Merge from coreutils.
19625         * lib/fsusage.c: Remove declaration of statfs.
19626         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19627
19628         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19629
19630 2003-06-06  Jim Meyering  <jim@meyering.net>
19631
19632         * lib/stdbool_.h: Renamed from stdbool.h.in.
19633
19634 2003-06-06  Jim Meyering  <jim@meyering.net>
19635             Bruno Haible  <bruno@clisp.org>
19636
19637         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19638         Adjust Makefile.am snippet not to redirect directly to target.
19639         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19640
19641 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19642
19643         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19644         mismatch, look in future quarters as well as past.  This fixes a
19645         bug when processing fall-backwards gaps immediately after a long
19646         period of daylight-saving time.
19647
19648         * lib/mktime.c: Assume freestanding C89 or better.
19649         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19650         (__P): Remove; not used.
19651         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19652         (mktime, not_equal_tm, print_tm, check_result,
19653         main): Use prototypes.  Use const * where appropriate.
19654         (main): Fix typo in testing code that uncovered by above changes.
19655         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19656
19657 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19658
19659         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19660         locale.h, localeconv.  This merges changes from coreutils.
19661
19662         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19663         It can be removed after the next Autoconf is released.
19664         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19665         needed.
19666
19667 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19668
19669         * lib/mktime.c: Fix Debian bug 177940
19670         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19671         (localtime_offset): Now long int, not time_t, because we want it
19672         to be guaranteed to be signed.  All uses changed.
19673         (__mktime_internal): If overflow would occur when adding offset,
19674         don't add it.
19675
19676         Merge 'human' changes from coreutils.  Rewrite to support
19677         locale-specific notations like thousands separators.
19678         * lib/human.c: Simplify authorship notice.
19679         Include human.h immediately after config.h.
19680         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19681         <limits.h>: Do not include, since human.h does.
19682         (SIZE_MAX, UINTMAX_MAX): New macros.
19683         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19684         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19685         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19686         (power_letter): Renamed from suffixes.
19687         (generate_suffix_backwards): Remove.
19688         (adjust_value): Now takes int style (because of human.h changes)
19689         and long double value (for greater precision on some platforms).
19690         (group_number): New function.
19691         (human_readable): Use it.  Use integer options, not enum.
19692         Put the options before the sizes in the arg list.
19693         Support all the new options.
19694         The old human_readable function has been removed;
19695         use inttostr.h instead.
19696         (human_readable, default_block_size, humblock):
19697         Use uintmax_t, not int, for block sizes.
19698         (human_readable_inexact, block_size_types): Remove.
19699         (block_size_opts): New constant.
19700         (human_options): Renamed from human_block_size, with new signature
19701         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19702         * lib/human.h: Add copyright and authorship notice.
19703         Include <limits.h> and <stdbool.h> unconditionally.
19704         (PARAMS): Remove.  All uses removed.
19705         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19706         (enum human_inexact_style): Remove tag; now a nameless enum.
19707         (human_floor, human_ceiling, human_round_to_even): Now have
19708         values 2, 0, 1 rather than -1, 1, 0.
19709         (human_group_digits, human_suppress_point_zero, human_autoscale,
19710         human_base_1024, human_SI, human_B): New constants.
19711         (human_readable_inexact, human_block_size): Remove.
19712         (human_readable): Size args are now uintmax_t, not int.
19713         (human_options): New decl.
19714
19715         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19716         unnecessary now that we assume C89 or better.  This change
19717         imported from coreutils.
19718
19719         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19720         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19721         in the 2003-05-30 sync from glibc.
19722
19723         .h files should stand alone, but we shouldn't include <sys/types.h>
19724         if we can get away with just <stddef.h>.
19725
19726         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19727         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19728         rather than <sys/types.h>, as we merely need size_t.
19729         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19730         to get size_t.
19731         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19732         Include <stdio.h>, to get FILE.
19733         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19734         memcasecmp.h has included <stddef.h> and all we need is size_t.
19735         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19736         our interface, instead of including <sys/types.h>
19737
19738 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19739
19740         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19741         now, as glibc mktime is buggy on non-glibc systems.
19742
19743 2003-06-03  Karl Berry  <karl@gnu.org>
19744
19745         * config/config.sub: update from prep.
19746
19747 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19748
19749         [from coreutils]
19750         Fix some minor time-related bugs with POSIX time arguments.
19751         Some valid time stamps were being rejected (notably -1, and
19752         time stamps before 1900 on 64-bit hosts).  And some invalid
19753         time stamps were being accepted, e.g. September 31.
19754
19755         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
19756         that we can return (time_t) -1 successfully.
19757         * lib/posixtm.c: Likewise.
19758         [HAVE_STDBOOL_H]: Include <stdbool.h>.
19759         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
19760         (t): Remove static var.
19761         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
19762         of static var.  All uses changed.
19763         (year): Do not reject years before 1900; they can occur with
19764         64-bit time_t.
19765         (posix_time_parse): Do not check for out-of-range components;
19766         that is now the caller's responsibility, since our checks were
19767         only approximations.
19768         (posixtime): Use mktime to check for out-of-range components,
19769         since it knows them exactly.
19770         If mktime returns (time_t) -1, check whether an error actually occurred
19771         by invoking localtime on -1.
19772         (main) [TEST_POSIXTIME]: Check for input data errors, and report
19773         posixtime failures better.
19774         Improve the test data (in comments only).
19775
19776 2003-06-02  Karl Berry  <karl@gnu.org>
19777
19778         * config/mkinstalldirs (version): new variable.
19779         (--version): new option.
19780         (usage): improve message.
19781
19782 2003-05-30  Karl Berry  <karl@gnu.org>
19783
19784         * lib/mktime.c: update from libc.
19785
19786 2003-05-30  Bruno Haible  <bruno@clisp.org>
19787
19788         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
19789         * config/config.rpath: Upgrade to gettext-0.12.1.
19790
19791 2003-05-30  Bruno Haible  <bruno@clisp.org>
19792
19793         * m4/gettext.m4: Upgrade to gettext-0.12.1.
19794         * m4/nls.m4: New file, from gettext-0.12.1.
19795         * m4/po.m4: New file, from gettext-0.12.1.
19796         * m4/progtest.m4: Upgrade to gettext-0.12.1.
19797
19798 2003-05-30  Bruno Haible  <bruno@clisp.org>
19799
19800         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
19801         * lib/localcharset.h: Likewise.
19802         * lib/localcharset.c: Likewise.
19803
19804 2003-05-29  Karl Berry  <karl@gnu.org>
19805
19806         * config/config.rpath: update from gettext.
19807
19808 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19809
19810         Assume the headers required for C89 freestanding compilers.
19811         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
19812         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
19813         * m4/human.m4 (gl_HUMAN): Likewise.
19814         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
19815         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
19816         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19817         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
19818         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19819         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
19820
19821 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19822
19823         Assume the headers required for C89 freestanding compilers.
19824         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
19825         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
19826         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
19827         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
19828         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
19829         define, since <limits.h> is guaranteed to do that.
19830         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
19831         * lib/exclude.c: Include <stdbool.h> unconditionally.
19832         * lib/tempname.c: Include <stddef.h> unconditionally.
19833         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
19834         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
19835         <stddef.h> does that.
19836         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
19837         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
19838         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
19839         needed.
19840         * lib/xstrtol.c: Likewise.
19841         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
19842         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
19843
19844         * lib/addext.c (addext): Use assignment rather than cast, to avoid
19845         warnings on some platforms.
19846
19847         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19848         arbitrarily.
19849
19850 2003-05-26  Jim Meyering  <jim@meyering.net>
19851
19852         Merge in a change from coreutils:
19853         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
19854         that is guaranteed to be `no'.  Use `no_such_member' to indicate
19855         that condition, rather than `-1' which is slightly misleading.
19856         Change the name of the cache variable to have the gl_ prefix.
19857         Prompted by a patch from Richard Dawe for DJGPP.
19858
19859 2003-05-24  Karl Berry  <karl@gnu.org>
19860
19861         * config/config.guess: update from prep.
19862
19863 2003-05-22  Karl Berry  <karl@gnu.org>
19864
19865         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
19866
19867 2003-05-20  Karl Berry  <karl@gnu.org>
19868
19869         * config/config.guess: update from prep.
19870
19871 2003-05-18  Karl Berry  <karl@gnu.org>
19872
19873         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
19874         might actually be set by the user.
19875
19876         * config/depcomp, install-sh, mdate-sh: update from automake.
19877
19878 2003-05-17  Bruno Haible  <bruno@clisp.org>
19879
19880         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
19881         invalid expansion for AC_EGREP_CPP.
19882         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
19883         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
19884         Suggested by Akim Demaille <akim@epita.fr> in
19885         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
19886
19887 2003-05-12  Jim Meyering  <jim@meyering.net>
19888
19889         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
19890         the space-padded-by-default conversion specifiers, %e, %k, %l.
19891
19892 2003-05-12  Bruno Haible  <bruno@clisp.org>
19893
19894         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
19895         the string is longer than 4 KB.
19896
19897 2003-05-11  Karl Berry  <karl@gnu.org>
19898
19899         * config/config.{guess,sub}: update from prep.
19900
19901 2003-05-09  Bruno Haible  <bruno@clisp.org>
19902
19903         * modules/error: Add m4/strerror_r.m4 to file list.
19904
19905 2003-05-03  Bruno Haible  <bruno@clisp.org>
19906
19907         Upgrade to Unicode-4.0.
19908         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
19909         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
19910         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
19911         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
19912         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
19913         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
19914         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
19915         Change width of U+E0100..U+E01EF from 1 to 0.
19916
19917 2003-04-25  Jim Meyering  <jim@meyering.net>
19918
19919         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
19920         of type size_t, not int.
19921
19922 2003-04-25  Bruno Haible  <bruno@clisp.org>
19923
19924         * lib/copy-file.c: Include <stddef.h>, for size_t.
19925
19926 2003-04-21  Paul Eggert  <eggert@twinsun.com>
19927
19928         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
19929         code which expansion is under static control.  Patch imported from
19930         Akim Demaille's patch to Bison; see
19931         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
19932
19933 2003-04-14  Bruno Haible  <bruno@clisp.org>
19934
19935         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
19936
19937 2003-04-11  Jim Meyering  <jim@meyering.net>
19938
19939         Merge changes from Coreutils.
19940
19941         2003-03-22  Jim Meyering  <jim@meyering.net>
19942
19943         * lib/strftime.c (widen): Cast alloca return value to proper type.
19944
19945         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
19946
19947         From GNU libc.
19948         * lib/strftime.c (my_strftime): Handle very large width
19949         specifications for numeric values correctly.  Improve checks for
19950         overflow.
19951
19952         2003-01-19  Jim Meyering  <jim@meyering.net>
19953
19954         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
19955         definitions.
19956         (nl_get_alt_digit) [! defined my_strftime]: Define.
19957         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
19958         _nl_get_alt_digit and _nl_get_walt_digit.
19959
19960         * lib/strftime.c (my_strftime): Merge in locale-related changes from
19961         libc. These changes have no effect outside of _LIBC.
19962
19963 2003-04-10  Bruno Haible  <bruno@clisp.org>
19964
19965         * modules/findprog: New file.
19966         * MODULES.html.sh (func_all_modules): Add it.
19967
19968 2003-04-10  Bruno Haible  <bruno@clisp.org>
19969
19970         * m4/findprog.m4: New file.
19971         * m4/eaccess.m4: New file.
19972
19973 2003-04-10  Bruno Haible  <bruno@clisp.org>
19974
19975         * lib/findprog.h: New file, from GNU gettext.
19976         * lib/findprog.c: New file, from GNU gettext.
19977
19978 2003-04-05  Jim Meyering  <jim@meyering.net>
19979
19980         Merge changes from Coreutils.
19981
19982         * lib/exclude.h (PARAMS): Remove definition and uses.
19983         * lib/exclude.c: Remove uses of `PARAMS'.
19984
19985         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
19986         Add test-cases for DOS filenames. Declare program_name.
19987         (main): Set up program_name.  Patch by Rich Dawe.
19988
19989         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19990         error from mntctl.
19991         Use mntctl's return value to drive the entry-processing loop, since
19992         we can't rely on the value of the vmt_length member in the last
19993         entry.  On some systems doing so could result in exhausting
19994         virtual memory.  Based in part on a patch from Mike Jetzer.
19995
19996 2003-04-04  Bruno Haible  <bruno@clisp.org>
19997
19998         * modules/linebreak: New file.
19999         * MODULES.html.sh (func_all_modules): Add it.
20000
20001 2003-04-04  Bruno Haible  <bruno@clisp.org>
20002
20003         * m4/linebreak.m4: New file.
20004
20005 2003-04-04  Bruno Haible  <bruno@clisp.org>
20006
20007         * lib/linebreak.h: New file, from GNU gettext.
20008         * lib/linebreak.c: New file, from GNU gettext with slight
20009         modifications.
20010         * lib/lbrkprop.h: New file, from GNU gettext.
20011
20012 2003-04-03  Bruno Haible  <bruno@clisp.org>
20013
20014         * modules/utf8-ucs4: New file.
20015         * modules/utf16-ucs4: New file.
20016         * modules/ucs4-utf8: New file.
20017         * modules/ucs4-utf16: New file.
20018         * MODULES.html.sh (func_all_modules): Add them.
20019
20020 2003-04-03  Bruno Haible  <bruno@clisp.org>
20021
20022         * m4/utf-ucs4.m4: New file.
20023         * m4/ucs4-utf.m4: New file.
20024
20025 2003-04-03  Bruno Haible  <bruno@clisp.org>
20026
20027         * lib/utf8-ucs4.h: New file, from GNU gettext.
20028         * lib/utf16-ucs4.h: New file, from GNU gettext.
20029         * lib/ucs4-utf8.h: New file, from GNU gettext.
20030         * lib/ucs4-utf16.h: New file, from GNU gettext.
20031
20032 2003-04-02  Bruno Haible  <bruno@clisp.org>
20033
20034         * modules/binary-io: New file.
20035         * MODULES.html.sh (func_all_modules): Add it.
20036
20037 2003-04-02  Bruno Haible  <bruno@clisp.org>
20038
20039         * lib/binary-io.h: New file, from GNU gettext.
20040
20041 2003-04-01  Bruno Haible  <bruno@clisp.org>
20042
20043         * modules/pathname: New file.
20044         * MODULES.html.sh (func_all_modules): Add it.
20045
20046 2003-04-01  Bruno Haible  <bruno@clisp.org>
20047
20048         * lib/pathname.h: New file, from GNU gettext.
20049         * lib/concatpath.c: New file, from GNU gettext.
20050
20051 2003-03-30  Bruno Haible  <bruno@clisp.org>
20052
20053         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
20054
20055 2003-03-30  Bruno Haible  <bruno@clisp.org>
20056
20057         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
20058         function chown() doesn't exist.
20059
20060 2003-03-28  Bruno Haible  <bruno@clisp.org>
20061
20062         * modules/copy-file: New file.
20063         * MODULES.html.sh (func_all_modules): Add it.
20064
20065 2003-03-28  Bruno Haible  <bruno@clisp.org>
20066
20067         * m4/copy-file.m4: New file.
20068
20069 2003-03-28  Bruno Haible  <bruno@clisp.org>
20070
20071         * lib/copy-file.h: New file, from GNU gettext.
20072         * lib/copy-file.c: New file, from GNU gettext.
20073
20074 2003-03-18  Jim Meyering  <jim@meyering.net>
20075
20076         * lib/quote.c (quote_n): Fix typo in comment.
20077
20078 2003-03-18  Bruno Haible  <bruno@clisp.org>
20079
20080         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
20081         checking.
20082         * m4/onceonly_2_57.m4: Likewise.
20083
20084 2003-03-17  Bruno Haible  <bruno@clisp.org>
20085
20086         * m4/onceonly.m4: Require autoconf 2.54 or newer.
20087         (m4_quote): Remove macro.
20088         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
20089
20090 2003-03-14  Jim Meyering  <jim@meyering.net>
20091
20092         Merge changes from Coreutils.
20093         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
20094         to be const, in order to avoid warnings.
20095         (obstack_room): Likewise.
20096         (obstack_empty_p): Likewise.
20097
20098 2003-03-14  Bruno Haible  <bruno@clisp.org>
20099
20100         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
20101         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
20102
20103 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20104
20105         Merge changes from Bison.
20106         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
20107         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
20108         when compiling Bison 1.875's `bitset bset = obstack_alloc
20109         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
20110         * lib/hash.c: Include <stdbool.h> unconditionally.
20111
20112 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20113
20114         * m4/onceonly.m4 (m4_quote): New macro.
20115         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
20116         Quote AC_FOREACH variable-expansions properly.
20117
20118 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20119
20120         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
20121
20122 2003-03-09  Paul Eggert  <eggert@twinsun.com>
20123
20124         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
20125         Reported by Bruce Becker; see:
20126         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
20127
20128 2003-03-03  Paul Eggert  <eggert@twinsun.com>
20129             Bruno Haible  <bruno@clisp.org>
20130
20131         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
20132         Reported by John Hughes, see
20133         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
20134
20135 2003-02-20  Bruno Haible  <bruno@clisp.org>
20136
20137         * MODULES.html.sh (func_all_modules): Add poll.
20138
20139 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20140
20141         * modules/poll: New file.
20142
20143 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20144
20145         * lib/poll_.h: New file.
20146         * lib/poll.c: New file.
20147
20148 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20149
20150         * m4/poll.m4: New file.
20151
20152 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20153
20154         * modules/mathl: New file.
20155
20156 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20157
20158         * lib/mathl.h: New file.
20159         * lib/acosl.c: New file.
20160         * lib/asinl.c: New file.
20161         * lib/atanl.c: New file.
20162         * lib/ceill.c: New file.
20163         * lib/cosl.c: New file.
20164         * lib/expl.c: New file.
20165         * lib/floorl.c: New file.
20166         * lib/frexpl.c: New file.
20167         * lib/ldexpl.c: New file.
20168         * lib/logl.c: New file.
20169         * lib/sincosl.c: New file.
20170         * lib/sinl.c: New file.
20171         * lib/sqrtl.c: New file.
20172         * lib/tanl.c: New file.
20173         * lib/trigl.c: New file.
20174         * lib/trigl.h: New file.
20175
20176 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20177
20178         * m4/mathl.m4: New file.
20179
20180 2003-02-18  Bruno Haible  <bruno@clisp.org>
20181
20182         * MODULES.html.sh (func_all_modules): Add mathl.
20183
20184 2003-02-17  Bruno Haible  <bruno@clisp.org>
20185
20186         * modules/mkdtemp: New module.
20187         * MODULES.html.sh (func_all_modules): Add it.
20188
20189 2003-02-17  Bruno Haible  <bruno@clisp.org>
20190
20191         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
20192
20193 2003-02-17  Bruno Haible  <bruno@clisp.org>
20194
20195         * lib/mkdtemp.h: New file, from GNU gettext.
20196         * lib/mkdtemp.c: New file, from GNU gettext.
20197
20198 2003-02-02  Jim Meyering  <jim@meyering.net>
20199
20200         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
20201         e.g. glibc-2.2.93.
20202
20203 2003-01-31  Bruno Haible  <bruno@clisp.org>
20204
20205         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
20206         'rpl_rename'.
20207         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
20208         'rpl_strnlen'.
20209         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
20210         'rpl_strtod'.
20211         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
20212         'rpl_utime'.
20213
20214 2003-01-31  Bruno Haible  <bruno@clisp.org>
20215
20216         * lib/rename.c: #undef rename before defining rpl_rename.
20217         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
20218
20219 2003-01-30  Bruno Haible  <bruno@clisp.org>
20220
20221         * modules/vasnprintf, modules/vasprintf: New modules.
20222         * MODULES.html.sh (func_all_modules): Add them.
20223
20224 2003-01-30  Bruno Haible  <bruno@clisp.org>
20225
20226         * m4/signed.m4: New file, from GNU gettext.
20227         * m4/longdouble.m4: New file, from GNU gettext.
20228         * m4/wchar_t.m4: New file, from GNU gettext.
20229         * m4/wint_t.m4: New file, from GNU gettext.
20230         * m4/vasnprintf.m4: New file.
20231         * m4/vasprintf.m4: New file.
20232
20233 2003-01-30  Bruno Haible  <bruno@clisp.org>
20234
20235         * lib/printf-args.h: New file, from GNU gettext.
20236         * lib/printf-args.c: New file, from GNU gettext.
20237         * lib/printf-parse.h: New file, from GNU gettext.
20238         * lib/printf-parse.c: New file, from GNU gettext.
20239         * lib/vasnprintf.h: New file, from GNU gettext.
20240         * lib/vasnprintf.c: New file, from GNU gettext.
20241         * lib/asnprintf.c: New file, from GNU gettext.
20242         * lib/vasprintf.h: New file, from GNU gettext with modifications.
20243         * lib/vasprintf.c: New file, from GNU gettext.
20244         * lib/asprintf.c: New file, from GNU gettext.
20245
20246 2003-01-29  Bruno Haible  <bruno@clisp.org>
20247
20248         * modules/stpncpy: New module.
20249         * MODULES.html.sh (func_all_modules): Add it.
20250
20251 2003-01-29  Bruno Haible  <bruno@clisp.org>
20252
20253         * m4/stpncpy.m4: New file.
20254
20255 2003-01-29  Bruno Haible  <bruno@clisp.org>
20256
20257         * lib/stpncpy.h: New file, from GNU gettext with modifications.
20258         * lib/stpncpy.c: New file, from GNU gettext with modifications.
20259
20260 2003-01-28  Bruno Haible  <bruno@clisp.org>
20261
20262         * modules/c-ctype: New module.
20263         * MODULES.html.sh (func_all_modules): Add it.
20264
20265 2003-01-28  Bruno Haible  <bruno@clisp.org>
20266
20267         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
20268         Paul Eggert.
20269         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
20270         Paul Eggert.
20271
20272 2003-01-27  Bruno Haible  <bruno@clisp.org>
20273
20274         * modules/xsetenv: New module.
20275         * MODULES.html.sh (func_all_modules): Add it.
20276
20277 2003-01-27  Bruno Haible  <bruno@clisp.org>
20278
20279         * lib/xsetenv.h: New file, from GNU gettext.
20280         * lib/xsetenv.c: New file, from GNU gettext.
20281
20282 2003-01-23  Jim Meyering  <jim@meyering.net>
20283
20284         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20285         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20286
20287 2003-01-23  Bruno Haible  <bruno@clisp.org>
20288
20289         * modules/minmax: New module.
20290         * MODULES.html.sh (func_all_modules): Add it.
20291
20292 2003-01-23  Bruno Haible  <bruno@clisp.org>
20293
20294         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20295         Eggert.
20296
20297 2003-01-22  Bruno Haible  <bruno@clisp.org>
20298
20299         * modules/exit: New module.
20300         * MODULES.html.sh (func_all_modules): Add it.
20301
20302 2003-01-22  Bruno Haible  <bruno@clisp.org>
20303
20304         * lib/exit.h: New file, from GNU gettext.
20305
20306 2003-01-19  Bruno Haible  <bruno@clisp.org>
20307
20308         * gnulib-tool: Recognize option --extract-maintainer.
20309         (func_get_maintainer): New function.
20310         * modules/*: Add Maintainer entry.
20311
20312 2003-01-16  Jim Meyering  <jim@meyering.net>
20313
20314         * m4/regex.m4: The `regex' struct is both input and output.
20315         Initialize it before each use.  Patch by Tim Waugh.
20316
20317 2003-01-16  Bruno Haible  <bruno@clisp.org>
20318
20319         * MODULES.html.sh: Add a table of contents. Add the module name as
20320         leftmost column. Add hyperlinks.
20321
20322 2003-01-15  Bruno Haible  <bruno@clisp.org>
20323
20324         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20325
20326 2003-01-15  Bruno Haible  <bruno@clisp.org>
20327
20328         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20329         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20330         suffix.
20331
20332 2003-01-15  Bruno Haible  <bruno@clisp.org>
20333
20334         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20335
20336 2003-01-15  Bruno Haible  <bruno@clisp.org>
20337
20338         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20339         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20340
20341 2003-01-14  Jim Meyering  <jim@meyering.net>
20342
20343         * lib/same.c (same_name): Tweak a comment.
20344
20345 2003-01-14  Bruno Haible  <bruno@clisp.org>
20346
20347         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20348         when a string comparison is sufficient.
20349
20350 2003-01-14  Bruno Haible  <bruno@clisp.org>
20351
20352         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20353         'unsigned int'.
20354
20355 2003-01-14  Bruno Haible  <bruno@clisp.org>
20356
20357         * lib/hash-pjw.c: Add comment about low quality of this function.
20358
20359 2003-01-13  Bruno Haible  <bruno@clisp.org>
20360
20361         * modules/stpcpy: Distribute lib/stpcpy.h.
20362         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20363
20364 2003-01-13  Bruno Haible  <bruno@clisp.org>
20365
20366         * modules/*: Add a description.
20367         * modules/strpbrk: Fix Makefile.am snippet.
20368         * modules/strtoimax: Fix dependencies.
20369         * modules/strtoumax: Likewise.
20370
20371 2003-01-13  Bruno Haible  <bruno@clisp.org>
20372
20373         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20374         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20375         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20376
20377 2003-01-13  Bruno Haible  <bruno@clisp.org>
20378
20379         * gnulib-tool (func_create_testdir): Store config/* files in the main
20380         directory.
20381         * config.rpath: Move to ...
20382         * config/config.rpath: ... here.
20383         * modules/gettext: Contains config/config.rpath, not config.rpath.
20384         * modules/iconv: Likewise.
20385
20386 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20387
20388         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20389         to avoid collisions with libcurses and libreadline.
20390
20391         * m4/getstr.m4: Remove.
20392         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20393
20394 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20395
20396         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20397         to avoid collisions with libcurses and libreadline.
20398
20399         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20400         * lib/getstr.h, getstr.c: Remove.
20401         * lib/getline.c: Include "getline.h", to check interface.
20402         Move body of old getstr.c here: this defines MIN_CHUNK and
20403         declares getdelim2, which is renamed from getstr.
20404         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20405
20406         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20407         All uses changed.
20408         * lib/linebuffer.h: Likewise.
20409         (readline): Remove backward-compatibility macro.
20410
20411 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20412
20413         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20414         to avoid collisions with libcurses and libreadline.
20415         * getstr: Remove.
20416         * MODULES.html.sh: Remove getstr.
20417         * modules/getline: Depend on unlocked-io, not getstr.
20418
20419 2003-01-12  Jim Meyering  <jim@meyering.net>
20420
20421         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20422
20423 2003-01-10  Bruno Haible  <bruno@clisp.org>
20424
20425         * modules/alloca: Change Makefile.am requirements. Simplify Include
20426         requirements. Add lib/alloca_.h to file list.
20427
20428 2003-01-10  Bruno Haible  <bruno@clisp.org>
20429
20430         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20431
20432 2003-01-10  Bruno Haible  <bruno@clisp.org>
20433
20434         * lib/alloca_.h: New file.
20435         * lib/getdate.y: Unconditionally include alloca.h.
20436         * lib/makepath.c: Likewise.
20437         * lib/setenv.c: Likewise.
20438         * lib/userspec.c: Likewise.
20439
20440 2003-01-09  Karl Berry  <karl@gnu.org>
20441
20442         * MODULES.html.sh: include `dirname $0` in PATH, to find
20443         gnulib-tool.
20444
20445 2003-01-09  Bruno Haible  <bruno@clisp.org>
20446
20447         * modules/stdbool: Change configure.ac, Makefile.am requirements.
20448         Simplify Include requirements. Add lib/stdbool.h.in to file list.
20449
20450 2003-01-09  Bruno Haible  <bruno@clisp.org>
20451
20452         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
20453
20454 2003-01-09  Bruno Haible  <bruno@clisp.org>
20455
20456         * lib/stdbool.h.in: New file.
20457
20458 2003-01-09  Bruno Haible  <bruno@clisp.org>
20459
20460         * gnulib-tool (func_all_modules): Ignore files ending in ~.
20461         * MODULES.html.sh: Likewise.
20462
20463 2003-01-08  Jim Meyering  <jim@meyering.net>
20464
20465         * lib/full-write.c: Undefine and define-away `const' after inclusion
20466         of errno.h, not before.  Suggestion from Bruno Haible.
20467
20468 2003-01-08  Bruno Haible  <bruno@clisp.org>
20469
20470         * modules/full-read: Depend on full-write.
20471
20472 2003-01-08  Bruno Haible  <bruno@clisp.org>
20473
20474         * lib/safe-read.c: Include specification header first, to ensure its
20475         selfcontainedness.
20476         * lib/full-write.c: Likewise.
20477
20478 2003-01-07  Jim Meyering  <jim@meyering.net>
20479
20480         * lib/full-write.c: Rework so that it may serve to define full_read,
20481         too.
20482         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
20483
20484 2003-01-07  Bruno Haible  <bruno@clisp.org>
20485
20486         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20487         <inttypes.h>.
20488         * lib/xstrtol.h: Likewise.
20489         * lib/xstrtoimax.c: Likewise.
20490         * lib/xstrtoumax.c: Likewise.
20491         * lib/human.h: Likewise.
20492
20493         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20494         on systems that have <inttypes.h> but not <stdint.h>.
20495
20496 2003-01-07  Bruno Haible  <bruno@clisp.org>
20497
20498         * MODULES.html.sh: Add copyright notice.
20499         (missed_files): Omit CVS directory entries.
20500         (func_module): Make it work with sed-3.02.
20501         * MODULES.txt: Remove file.
20502
20503 2003-01-06  Jim Meyering  <jim@meyering.net>
20504
20505         * lib/version-etc.c: Update year in translatable copyright string.
20506
20507 2003-01-03  Karl Berry  <karl@gnu.org>
20508
20509         * config/config.{guess,sub}: update from prep.
20510
20511 2003-01-02  Karl Berry  <karl@gnu.org>
20512
20513         * doc/COPYING.DOC: belatedly updated to 1.2.
20514
20515 2003-01-01  Karl Berry  <karl@gnu.org>
20516
20517         * gnulib-tool (func_verify_module): report module name $module in
20518         error message, not $1.
20519         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20520         be created, only if it doesn't exist.
20521         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20522
20523 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20524
20525         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20526
20527 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20528
20529         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20530         memcmp if strcoll doesn't work.
20531
20532 2002-12-31  Bruno Haible  <bruno@clisp.org>
20533
20534         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20535         nonempty.
20536
20537 2002-12-31  Bruno Haible  <bruno@clisp.org>
20538
20539         * lib/memcoll.c (STRCOLL): New macro.
20540         (memcoll): Use it.
20541
20542 2002-12-31  Bruno Haible  <bruno@clisp.org>
20543
20544         * lib/localcharset.h: New file.
20545         * lib/localcharset.c: Include it.
20546         * lib/unicodeio.c: Likewise.
20547
20548 2002-12-31  Bruno Haible  <bruno@clisp.org>
20549
20550         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20551         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20552
20553 2002-12-31  Bruno Haible  <bruno@clisp.org>
20554
20555         * lib/getline.h: Include <stddef.h>, for size_t.
20556
20557         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20558         * lib/unicodeio.c: Don't include <stddef.h>.
20559
20560 2002-12-31  Bruno Haible  <bruno@clisp.org>
20561
20562         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20563         HAVE_TM_ZONE.
20564
20565 2002-12-24  Karl Berry  <karl@gnu.org>
20566
20567         * config/config.guess: update from prep.
20568
20569 2002-12-24  Bruno Haible  <bruno@clisp.org>
20570
20571         General infrasructure.
20572         * m4/README: Rewritten.
20573         * m4/onceonly.m4: New file.
20574         * m4/onceonly_2_57.m4: New file.
20575
20576         Module atexit.
20577         * m4/atexit.m4: New file.
20578
20579         Module strtod.
20580         * m4/strtod.m4: New file.
20581
20582         Module strtol.
20583         * m4/strtol.m4: New file.
20584
20585         Module strtoul.
20586         * m4/strtoul.m4: New file.
20587
20588         Module memchr.
20589         * m4/memchr.m4: New file.
20590
20591         Module memcmp.
20592         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20593         (jm_FUNC_MEMCMP): Invoke it.
20594
20595         Module memcpy.
20596         * m4/memcpy.m4: New file.
20597
20598         Module memmove.
20599         * m4/memmove.m4: New file.
20600
20601         Module memset.
20602         * m4/memset.m4: New file.
20603
20604         Module strcspn.
20605         * m4/strcspn.m4: New file.
20606
20607         Module strpbrk.
20608         * m4/strpbrk.m4: New file.
20609
20610         Module strstr.
20611         * m4/strstr.m4: New file.
20612
20613         Module strerror.
20614         * m4/strerror.m4: New file.
20615
20616         Module mktime.
20617         * m4/mktime.m4: Renamed from jm-mktime.m4.
20618         (gl_PREREQ_MKTIME): New macro.
20619         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20620
20621         Module malloc.
20622         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20623         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20624         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20625
20626         Module realloc.
20627         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20628         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20629         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20630
20631         Module strftime.
20632         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20633         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20634         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20635         gl_TM_GMTOFF.
20636         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20637
20638         Module xalloc.
20639         * m4/xalloc.m4: New file.
20640
20641         Module alloca.
20642         * m4/alloca.m4: New file.
20643
20644         Module putenv.
20645         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20646         (jm_FUNC_PUTENV): Invoke it.
20647
20648         Module setenv.
20649         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20650         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20651         when invoked twice.
20652         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20653         gt_FUNC_SETENV.
20654
20655         Module memrchr.
20656         * m4/memrchr.m4: New file.
20657
20658         Module stpcpy.
20659         * m4/stpcpy.m4: New file.
20660
20661         Module strcase.
20662         * m4/strcase.m4: New file.
20663
20664         Module strdup.
20665         * m4/strdup.m4: New file.
20666
20667         Module strnlen.
20668         * m4/strnlen.m4: New file.
20669
20670         Module strndup.
20671         * m4/strndup.m4: New file.
20672
20673         Module xstrtod.
20674         * m4/xstrtod.m4: New file.
20675
20676         Module xstrtol.
20677         * m4/xstrtol.m4: New file.
20678
20679         Module getdate.
20680         * m4/getdate.m4: New file.
20681
20682         Module unlocked-io.
20683         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20684         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20685         * m4/jm-glibc-io.m4n: Remove file.
20686
20687         Module long-options.
20688         * m4/long-options.m4: New file.
20689
20690         Module md5.
20691         * m4/md5.m4: New file.
20692
20693         Module sha.
20694         * m4/sha.m4: New file.
20695
20696         Module getstr.
20697         * m4/getstr.m4: New file.
20698
20699         Module getline.
20700         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20701         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20702         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20703         simply getline. Infoke gl_PREREQ_GETLINE.
20704
20705         Module obstack.
20706         * m4/obstack.m4: New file.
20707
20708         Module hash.
20709         * m4/hash.m4: New file.
20710
20711         Module readtokens.
20712         * m4/readtokens.m4: New file.
20713
20714         Module strverscmp.
20715         * m4/strverscmp.m4: New file.
20716
20717         Module stdbool.
20718         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20719         OSF/1.
20720
20721         Module strtoll.
20722         * m4/strtoll.m4: New file.
20723
20724         Module strtoull.
20725         * m4/strtoull.m4: New file.
20726
20727         Module strtoimax.
20728         * m4/strtoimax.m4: New file.
20729
20730         Module strtoumax.
20731         * m4/strtoumax.m4: New file.
20732
20733         Module xstrtoimax.
20734         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20735         jm_AC_PREREQ_XSTRTOIMAX.
20736         Moved the strtol prerequisites to strtol.m4.
20737         Moved the strtoll prerequisites to strtoll.m4.
20738         Moved the strtoimax prerequisites to strtoimax.m4.
20739
20740         Module xstrtoumax.
20741         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20742         jm_AC_PREREQ_XSTRTOUMAX.
20743         Moved the strtoul prerequisites to strtoul.m4.
20744         Moved the strtoull prerequisites to strtoull.m4.
20745         Moved the strtoumax prerequisites to strtoumax.m4.
20746
20747         Module chown.
20748         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20749         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20750
20751         Module dup2.
20752         * m4/dup2.m4: New file.
20753
20754         Module ftruncate.
20755         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
20756         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
20757
20758         Module getgroups.
20759         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
20760         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
20761
20762         Module gettimeofday.
20763         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
20764         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
20765         gl_PREREQ_GETTIMEOFDAY.
20766
20767         Module mkdir.
20768         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
20769         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
20770
20771         Module mkstemp.
20772         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
20773         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
20774         jm_AC_TYPE_UINTMAX_T.
20775         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
20776
20777         Module stat.
20778         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
20779         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
20780
20781         Module lstat.
20782         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
20783         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
20784
20785         Module timespec.
20786         * m4/timespec.m4 (gl_TIMESPEC): New macro.
20787         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
20788         * m4/st_mtim.m4: Indentation.
20789
20790         Module nanosleep.
20791         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
20792         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
20793         gl_PREREQ_NANOSLEEP.
20794
20795         Module regex.
20796         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
20797         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
20798         (gl_REGEX): New macro.
20799
20800         Module rename.
20801         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
20802         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
20803
20804         Module rmdir.
20805         * m4/rmdir.m4: New file.
20806
20807         Module utime.
20808         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
20809         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
20810         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
20811
20812         Module dirname.
20813         * m4/dirname.m4: New file.
20814
20815         Module getopt.
20816         * m4/getopt.m4: New file.
20817
20818         Module unistd-safer.
20819         * m4/unistd-safer.m4: New file.
20820
20821         Module fnmatch.
20822         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
20823         declaration.
20824         (gl_PREREQ_FNMATCH_EXTRA): New macro.
20825         (gl_FUNC_FNMATCH_POSIX): New macro.
20826         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
20827         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
20828         simply fnmatch.
20829
20830         Module exclude.
20831         * m4/exclude.m4: New file.
20832
20833         Module human.
20834         * m4/human.m4: New file.
20835
20836         Module acl.
20837         * m4/acl.m4: Nop.
20838
20839         Module backupfile.
20840         * m4/backupfile.m4: New file.
20841         * m4/d-ino.m4: Indentation.
20842
20843         Module fsusage.
20844         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
20845         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
20846         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
20847
20848         Module dirfd.
20849         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
20850         requirements.
20851
20852         Module euidaccess.
20853         * m4/euidaccess.m4: New file.
20854
20855         Module file-type.
20856         * m4/file-type.m4: New file.
20857
20858         Module fileblocks.
20859         * m4/fileblocks.m4: New file.
20860
20861         Module filemode.
20862         * m4/filemode.m4: New file.
20863
20864         Module isdir.
20865         * m4/isdir.m4: New file.
20866
20867         Module lchown.
20868         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
20869         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
20870
20871         Module makepath.
20872         * m4/makepath.m4: New file.
20873
20874         Module modechange.
20875         * m4/modechange.m4: New file.
20876
20877         Module mountlist.
20878         * m4/mountlist.m4: New file.
20879         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
20880         Indentation.
20881
20882         Module path-concat.
20883         * m4/path-concat.m4: New file.
20884
20885         Module pathmax.
20886         * m4/pathmax.m4: New file.
20887
20888         Module same.
20889         * m4/same.m4: New file.
20890
20891         Module save-cwd.
20892         * m4/save-cwd.m4: New file.
20893
20894         Module savedir.
20895         * m4/savedir.m4: New file.
20896
20897         Module xgetcwd.
20898         * m4/xgetcwd.m4: New file.
20899         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
20900
20901         Module xreadlink.
20902         * m4/xreadlink.m4: New file.
20903
20904         Module safe-read.
20905         * m4/safe-read.m4: New file.
20906
20907         Module safe-write.
20908         * m4/safe-write.m4: New file.
20909
20910         Module closeout.
20911         * m4/closeout.m4: New file.
20912
20913         Module stdio-safer.
20914         * m4/stdio-safer.m4: New file.
20915
20916         Module getpass.
20917         * m4/getpass.m4: New file.
20918
20919         Module getugroups.
20920         * m4/getugroups.m4: New file.
20921
20922         Module group-member.
20923         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
20924         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
20925
20926         Module idcache.
20927         * m4/idcache.m4: New file.
20928
20929         Module userspec.
20930         * m4/userspec.m4: New file.
20931
20932         Module gettime.
20933         * m4/clock_time.m4: New file.
20934         * m4/gettime.m4: New file.
20935
20936         Module settime.
20937         * m4/settime.m4: New file.
20938
20939         Module posixtm.
20940         * m4/posixtm.m4: New file.
20941
20942         Module gethostname.
20943         * m4/gethostname.m4: New file.
20944
20945         Module canon-host.
20946         * m4/canon-host.m4: New file.
20947
20948         Module gettext.
20949         * m4/codeset.m4: New file, from gettext-0.11.5.
20950         * m4/gettext.m4: New file, from gettext-0.11.5.
20951         * m4/glibc21.m4: New file, from gettext-0.11.5.
20952         * m4/iconv.m4: New file, from gettext-0.11.5.
20953         * m4/intdiv0.m4: New file, from gettext-0.11.5.
20954         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
20955         * m4/inttypes.m4: New file, from gettext-0.11.5.
20956         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
20957         * m4/isc-posix.m4: New file, from gettext-0.11.5.
20958         * m4/lcmessage.m4: New file, from gettext-0.11.5.
20959         * m4/lib-ld.m4: New file, from gettext-0.11.5.
20960         * m4/lib-link.m4: New file, from gettext-0.11.5.
20961         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
20962         * m4/progtest.m4: New file, from gettext-0.11.5.
20963         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
20964         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
20965         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
20966
20967         Module localcharset.
20968         * m4/localcharset.m4: New file.
20969
20970         Module hard-locale.
20971         * m4/hard-locale.m4: New file.
20972
20973         Module mbswidth.
20974         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
20975         onceonly macros.
20976         * m4/mbrtowc.m4: Add comment.
20977
20978         Module memcasecmp.
20979         * m4/memcasecmp.m4: New file.
20980
20981         Module memcoll.
20982         * m4/memcoll.m4: New file.
20983
20984         Module unicodeio.
20985         * m4/unicodeio.m4: New file.
20986
20987         Module rpmatch.
20988         * m4/rpmatch.m4: New file.
20989
20990         Module yesno.
20991         * m4/yesno.m4: New file.
20992
20993         Module exitfail.
20994         * m4/exitfail.m4: New file.
20995
20996         Module c-stack.
20997         * m4/c-stack.m4 (gl_C_STACK): New macro.
20998         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
20999
21000         Module error.
21001         * m4/error.m4 (gl_ERROR): New macro.
21002         (jm_PREREQ_ERROR): Use onceonly macros.
21003
21004         Module fatal.
21005         * m4/fatal.m4: New file.
21006
21007         Module getloadavg.
21008         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21009         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21010
21011         Module getpagesize.
21012         * m4/getpagesize.m4: New file.
21013
21014         Module getusershell.
21015         * m4/getusershell.m4: New file.
21016
21017         Module physmem.
21018         * m4/physmem.m4: New file.
21019
21020         Module posixver.
21021         * m4/posixver.m4: New file.
21022
21023         Module quotearg.
21024         * m4/quotearg.m4: New file.
21025
21026         Module quote.
21027         * m4/quote.m4: New file.
21028
21029         Module readutmp.
21030         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21031
21032         Module sig2str.
21033         * m4/sig2str.m4: New file.
21034
21035         Other.
21036         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21037         ulonglong.m4.
21038         * m4/intmax_t.m4: New file.
21039         * m4/d-type.m4: Indentation.
21040         * m4/jm-macros.m4: Update.
21041         * m4/prereq.m4 (jm_PREREQ): Update.
21042         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
21043         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
21044         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
21045         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
21046         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
21047         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
21048         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
21049         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
21050         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
21051         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
21052         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
21053         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
21054         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
21055         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
21056         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
21057         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
21058         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
21059         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
21060         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
21061
21062 2002-12-24  Bruno Haible  <bruno@clisp.org>
21063
21064         * MODULES.txt: Update according to m4/ changes.
21065
21066         Module gettext.
21067         * config.rpath: New file, from gettext-0.11.5.
21068
21069         * modules/*: New module descriptions.
21070         * gnulib-tool: New file.
21071         * MODULES.html.sh: New file.
21072
21073 2002-12-21  Karl Berry  <karl@gnu.org>
21074
21075         * doc/fdl.texi: update to version 1.2.
21076
21077 2002-12-19  Karl Berry  <karl@gnu.org>
21078
21079         * config/config.guess: update from prep.
21080
21081 2002-12-18  Bruno Haible  <bruno@clisp.org>
21082
21083         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
21084         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
21085
21086 2002-12-17  Bruno Haible  <bruno@clisp.org>
21087
21088         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
21089         stdlib.h, string.h.
21090
21091 2002-12-17  Bruno Haible  <bruno@clisp.org>
21092
21093         * lib/canon-host.c (strdup): Remove unused declaration.
21094
21095         * lib/fsusage.c: Include full_read.h.
21096         (get_fs_usage): Use full_read instead of safe_read.
21097
21098         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
21099
21100 2002-12-12  Karl Berry  <karl@gnu.org>
21101
21102         * config/config.guess: update from prep.
21103
21104 2002-12-11  Bruno Haible  <bruno@clisp.org>
21105
21106         * m4/setenv.m4: New file, from gettext-0.11.5.
21107
21108 2002-12-11  Bruno Haible  <bruno@clisp.org>
21109
21110         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
21111         not unsetenv().
21112         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
21113         modifications:
21114
21115         2002-12-11  Bruno Haible  <bruno@clisp.org>
21116
21117                 * setenv.c (alloca): Fall back to malloc.
21118                 (freea): New macro.
21119                 (setenv): Use freea() to free memory allocated with alloca().
21120
21121         2002-11-13  Bruno Haible  <bruno@clisp.org>
21122
21123                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
21124                 function declarations.
21125                 * unsetenv.c (unsetenv): Likewise.
21126
21127         2002-03-04  Bruno Haible  <bruno@clisp.org>
21128
21129                 Portability to AIX 4.3.3.
21130                 * unsetenv.c: New file, extracted from setenv.c.
21131                 * setenv.c: Move the unsetenv() function to unsetenv.c.
21132
21133         2001-12-20  Bruno Haible  <bruno@clisp.org>
21134
21135                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
21136                 use malloc instead. For SunOS 4.
21137
21138         2001-12-11  Bruno Haible  <bruno@clisp.org>
21139
21140                 * setenv.c: Declare alloca.
21141                 (compar_fn_t): New typedef.
21142                 (KNOWN_VALUE, STORE_VALUE): Use it.
21143
21144         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
21145         setenv.h.
21146
21147 2002-12-10  Paul Eggert  <eggert@twinsun.com>
21148
21149         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
21150         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
21151         Choose values that are less likely to collide with system fnmatch
21152         options.
21153         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
21154         defined (e.g., a pure POSIX system).
21155         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
21156         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
21157
21158 2002-12-06  Paul Eggert  <eggert@twinsun.com>
21159
21160         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
21161         a pain in practice to deal with generated m4 files.  This change
21162         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
21163
21164         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
21165         and jm-glibc-io.m4, as they are no longer a special case.
21166         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
21167         kludge and the auto-generation stuff.  Check only whether the
21168         functions are declared, not whether they exist, since older hosts
21169         that don't declare the functions can't use the optimization anyway.
21170
21171 2002-12-06  Jim Meyering  <jim@meyering.net>
21172
21173         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
21174
21175         Merge in changes from libc's misc/error.c, in preparation
21176         for the merge of gnulib's changes back into libc.
21177
21178         * lib/error.c (_): Define only if not already defined.
21179         Move definition to follow all #include directives.
21180         Include unlocked-io.h only if !_LIBC.
21181         [_LIBC]: Include <libio/libioP.h>.
21182         [USE_IN_LIBIO]: Include <libio/iolibio.h>
21183         (fflush): Tweak definition to use INTUSE.
21184         (putc): Define.
21185
21186 2002-12-05  Paul Eggert  <eggert@twinsun.com>
21187
21188         * lib/alloca.c [defined emacs]: Include "lisp.h".
21189         (xalloc_die) [defined emacs]: New macro.
21190         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
21191         [! defined emacs]: Include <xalloc.h>.
21192         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
21193         (pointer): Typedef to POINTER_TYPE *.
21194         (malloc): Remove decl; we now always use xmalloc.
21195         (alloca): Use old-style definition, since Emacs needs this.
21196         Check for arithmetic overflow when computing combined size.
21197
21198 2002-12-04  Paul Eggert  <eggert@twinsun.com>
21199
21200         Do not generate unlocked-io.h automatically, since it's easier to
21201         maintain it by hand.
21202
21203         * lib/unlocked-io.h: New file, from GNU diffutils,
21204         but with proper copyright notice and attribution.
21205         * lib/gen-uio: Remove.
21206         * lib/Makefile.am: Add copyright notice.
21207         (libfetish_a_SOURCES): Add unlocked-io.h.
21208         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
21209         (DISTCLEANFILES, io_functions): Remove macros.
21210         (EXTRA_DIST): Remove gen_uio.
21211         (unlocked-io.h): Remove rule.
21212
21213 2002-12-04  Jim Meyering  <jim@meyering.net>
21214
21215         Reflect the fact that stat.c and lstat.c are no longer generated.
21216         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
21217         (DISTCLEANFILES): Likewise.
21218         (EXTRA_DIST): Likewise.
21219         (all_local): Don't depend on stat.c or lstat.c.
21220         (stat.c, lstat.c): Remove rules.
21221         (EXTRA_DIST): Remove xstat.in.
21222
21223         * lib/xstat.in: Remove file.  Contents moved into stat.c.
21224         * lib/stat.c: New file.  Contents mostly from xstat.in.
21225         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
21226         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
21227
21228         * lib/safe-read.c: Rework so that it may serve to define safe_write,
21229         too.
21230         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
21231
21232 2002-12-03  Jim Meyering  <jim@meyering.net>
21233
21234         * lib/safe-read.c, safe-write.c: Change variable names and comments,
21235         but not semantics, to minimize the differences between these two files.
21236         (safe_read): Change comment to mention SAFE_READ_ERROR.
21237
21238         * lib/safe-read.c (IS_EINTR): Define.
21239         (safe_read): Use IS_EINTR in place of in-function cpp directives.
21240
21241 2002-12-02  Jim Meyering  <jim@meyering.net>
21242
21243         * lib/safe-read.c (EINTR): Define.
21244         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21245         (INT_MAX): Provide fallback.
21246         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
21247
21248         * lib/safe-read.h (SAFE_READ_ERROR): Define.
21249
21250 2002-12-02  Bruno Haible  <bruno@clisp.org>
21251
21252         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
21253         Define, taken from safe-read.c.
21254         (INT_MAX): Provide fallback.
21255         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21256         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
21257
21258         * lib/safe-read.c (EINTR): Remove definition.
21259         (safe_read): Don't use EINTR if it is absent.
21260
21261 2002-12-01  Jim Meyering  <jim@meyering.net>
21262
21263         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
21264         zero.
21265         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
21266
21267 2002-11-27  Paul Eggert  <eggert@twinsun.com>
21268
21269         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
21270         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
21271         with `if (! (value < limit)) abort ();', for readability.
21272
21273 2002-11-26  Karl Berry  <karl@gnu.org>
21274
21275         * lib/strdup.c: copy from libc again, with jim's ok.
21276         * lib/.cppi-disable: re-add strdup.c
21277
21278 2002-11-25  Karl Berry  <karl@gnu.org>
21279
21280         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21281         instead of "strtol.c".
21282
21283 2002-11-25  Karl Berry  <karl@gnu.org>
21284
21285         * config/install-sh: update from automake for variable quoting, $0 in
21286         error msgs, etc.
21287
21288         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21289         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21290         entry.
21291
21292 2002-11-25  Jim Meyering  <jim@meyering.net>
21293
21294         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21295
21296 2002-11-24  Karl Berry  <karl@gnu.org>
21297
21298         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21299         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21300
21301 2002-11-24  Jim Meyering  <jim@meyering.net>
21302
21303         Update from coreutils:
21304
21305         * lib/mktime.c: Merge in changes from libc.
21306
21307         Avoid a link-time failure on some Linux systems.
21308         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21309         (otherwise).
21310         (__mon_yday): Declare with the STATIC attribute.
21311         (__mktime_internal): Likewise.
21312         Based on a report from Greg Schafer.
21313
21314 2002-11-23  Jim Meyering  <jim@meyering.net>
21315
21316         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21317         Use `unsigned', not `int', as type of index.
21318
21319         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21320
21321         * lib/fsusage.c: Remove unneeded parentheses around operands of
21322         `defined'.
21323
21324 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21325
21326         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21327         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21328         so that we can be included first.
21329         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21330         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21331         No need to include stddef.h or sys/types.h any more.
21332         Surround local include files with "", not "<>".
21333         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21334         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21335         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21336         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21337         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21338         (ISPRINT): Remove; no longer needed now that we assume C89.
21339
21340         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21341         Preserve errno.
21342
21343         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21344         quotearg_char): Use SIZE_MAX rather than
21345         (size_t) -1 when we are talking about "infinity".
21346
21347         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21348
21349 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21350
21351         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21352         hint that one should use `if (! x) abort ();' rather than `assert
21353         (x);', and anyway it's one less thing to worry about configuring.
21354         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21355         hash_rehash, hash_insert): Use abort rather than assert.
21356
21357 2002-11-22  Bruno Haible  <bruno@clisp.org>
21358
21359         * lib/safe-read.h: Assume C89. Add comments.
21360         (safe_read): Change return type to size_t.
21361         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21362         byte counts > SSIZE_MAX correctly.
21363         * lib/safe-write.h: New file.
21364         * lib/safe-write.c: New file.
21365         * lib/full-read.h: New file.
21366         * lib/full-read.c: New file.
21367         * lib/full-write.h: Assume C89. Add comments.
21368         * lib/full-write.c: Include safe-write.h.
21369         (full_write): Rewritten to use safe_write.
21370         Suggested by Jim Meyering and Paul Eggert.
21371
21372 2002-11-21  Jim Meyering  <jim@meyering.net>
21373
21374         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21375
21376         Merge in changes from the coreutils.
21377
21378         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21379         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21380         <stdint.h>.
21381         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21382         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21383         int.  Work more efficiently if X is the same width as uintmax_t.
21384         Do not compare X to -1, to avoid bogus compiler warning.
21385         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21386         Don't assume that f_frsize and f_bsize are the same type.
21387
21388         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21389         warning on FreeBSD.
21390
21391         * lib/makepath.c (make_path): Restore umask *before* creating the final
21392         component.
21393         (make_path): Minor reformatting.
21394
21395         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21396         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21397         HAVE_MALLOC/HAVE_REALLOC.
21398
21399         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21400         dummy ones.  At least on GNU/Linux systems, `auto' means something
21401         else.
21402         From Michael Stone.
21403
21404 2002-11-21  Bruno Haible  <bruno@clisp.org>
21405
21406         Remove case insensitive option matching.
21407         * lib/argmatch.h (argcasematch): Remove declaration.
21408         (ARGCASEMATCH): Remove macro.
21409         (__xargmatch_internal): Remove case_sensitive argument.
21410         (XARGMATCH): Update.
21411         (XARGCASEMATCH): Remove macro.
21412         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21413         case_sensitive argument.
21414         (argcasematch): Remove function.
21415         (__xargmatch_internal): Remove case_sensitive argument.
21416         (main): Use XARGMATCH instead of XARGCASEMATCH.
21417
21418         * lib/xmalloc.c: Change compile-time error message. Add comment about
21419         required autoconf version.
21420
21421 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21422
21423         Merge argmatch cleanups from Bison.  Assume C89.
21424
21425         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21426         Include stdlib.h, for EXIT_FAILURE.
21427         Always include <string.h>, since we assume C89.
21428         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21429         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21430         Include <stddef.h> instead, since it's all we need for size_t.
21431         (PARAMS): Remove.  All uses removed.
21432         (ARRAY_CARDINALITY): Do not bother to #undef.
21433         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21434         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21435         Remove unnecessary parentheses.
21436         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21437         Insert necessary parentheses.
21438         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
21439         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
21440
21441 2002-11-19  Bruno Haible  <bruno@clisp.org>
21442
21443         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
21444         * lib/mbswidth.h: Include <stddef.h>, for size_t.
21445
21446         * lib/mbswidth.h (PARAMS): Remove macro.
21447         (mbswidth, mbsnwidth): Use ANSI C function declarations.
21448         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
21449
21450         * lib/gcd.h (PARAMS): Remove macro.
21451         (gcd): Use ANSI C function declarations.
21452         * lib/gcd.c (gcd): Likewise.
21453
21454 2002-11-15  Bruno Haible  <bruno@clisp.org>
21455
21456         * lib/strcspn.c: Include <stddef.h>.
21457         (strcspn): Use ANSI C function declaration. Change return type to
21458         size_t. Use NULL.
21459         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
21460         (strpbrk): Use NULL.
21461         * lib/strpbrk.h (PARAMS): Remove macro.
21462         (strpbrk): Use ANSI C function declaration.
21463         * lib/strstr.c: Don't include <sys/types.h>.
21464         * lib/strstr.h (PARAMS): Remove macro.
21465         (strstr): Use ANSI C function declarations.
21466
21467 2002-11-14  Karl Berry  <karl@gnu.org>
21468
21469         * config/mkinstalldirs: `do' on separate line, instead of
21470         `for var; do'.
21471
21472 2002-11-06  Bruno Haible  <bruno@clisp.org>
21473
21474         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
21475         * lib/gcd.c (gcd): Likewise.
21476
21477 2002-11-05  Bruno Haible  <bruno@clisp.org>
21478
21479         * lib/gcd.h: New file, from gettext-0.11.5.
21480         * lib/gcd.c: New file, from gettext-0.11.5.
21481
21482 2002-11-05  Bruno Haible  <bruno@clisp.org>
21483
21484         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21485         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21486         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21487         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21488
21489         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21490         <libintl.h>.
21491         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21492         <libintl.h>.
21493
21494         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21495         * lib/human.c: Include gettext.h instead of <libintl.h>.
21496         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21497         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21498         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21499         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21500         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21501         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21502         (textdomain): Remove definition.
21503         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21504
21505         * lib/long-options.c: Remove include of <libintl.h> and definition of
21506         _.
21507         * lib/same.c: Remove include of <libintl.h> and definition of _.
21508
21509 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21510
21511         * lib/config.charset: A few additions for Solaris.
21512
21513 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21514
21515         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21516         * lib/localcharset.c (locale_charset): Declare as extern "C".
21517
21518 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21519
21520         * lib/config.charset: msdos in uk_UA uses CP1125.
21521
21522 2002-11-04  Bruno Haible  <bruno@clisp.org>
21523
21524         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21525         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21526         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21527         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21528         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21529
21530 2002-11-04  Bruno Haible  <bruno@clisp.org>
21531
21532         * lib/localcharset.c (locale_charset): Don't return an empty string.
21533
21534 2002-11-04  Bruno Haible  <bruno@clisp.org>
21535
21536         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21537         aliases.
21538
21539 2002-11-04  Bruno Haible  <bruno@clisp.org>
21540
21541         * lib/config.charset: Update for newest glibc. Add canonical names
21542         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21543
21544 2002-11-04  Bruno Haible  <bruno@clisp.org>
21545
21546         * lib/config.charset: Add support for NetBSD.
21547
21548 2002-11-04  Bruno Haible  <bruno@clisp.org>
21549
21550         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21551
21552 2002-11-01  Bruno Haible  <bruno@clisp.org>
21553
21554         * configure.in: Add AC_CONFIG_AUX_DIR call.
21555         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21556         test/Makefile.
21557         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21558
21559 2002-09-28  Karl Berry  <karl@gnu.org>
21560
21561         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21562         installed automake until the next release, since changes have been
21563         made.
21564
21565 2002-09-25  Karl Berry  <karl@gnu.org>
21566
21567         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21568         * lib/getopt*: copy from libc/posix.
21569         * lib/gettext.h: copy from gettext.
21570         * lib/.cppi-disable: add strdup.c, gettext.h.
21571
21572 2002-09-25  Karl Berry  <karl@gnu.org>
21573
21574         * config/srclist.txt: enable gettext.h check.
21575         * config/config.{guess,sub}: update from prep.
21576         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21577                 from automake 1.6.3.
21578         See srclist*.
21579
21580 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21581
21582         * regex.c (PATFETCH): Remove the translating fetch.
21583         (PATFETCH_RAW): Rename to PATFETCH.
21584         (set_image_of_range): New fun.
21585         (SET_RANGE_TABLE_WORK_AREA): Use it.
21586         (regex_compile): Don't translate the pattern chars so eagerly.
21587         Only do it when inserting an `exactn' bytecode or when handling
21588         a char-range.
21589         (mutually_exclusive_p): Avoid empty statement.
21590
21591 2002-07-06  Jim Meyering  <meyering@lucent.com>
21592
21593         * m4/README: Don't mention Makefile.am.in.
21594         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21595
21596 2002-07-01  Jim Meyering  <meyering@lucent.com>
21597
21598         * lib/c-stack.c: Include sys/time.h.
21599         From Volker Borchert.
21600
21601 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21602
21603         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21604
21605 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21606
21607         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21608         New macro.  Use it uniformly instead of
21609         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21610         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21611         reported by Vin Shelton.
21612
21613 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21614
21615         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21616         Do not assume SA_SIGINFO behavior.
21617         Bug reported by Jim Meyering on NetBSD 1.5.2.
21618
21619 2002-06-22  Jim Meyering  <meyering@lucent.com>
21620
21621         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21622         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21623
21624         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21625         now that configure.ac uses AC_GNU_SOURCE.
21626         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21627         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21628
21629         Update to latest tools.  Suggestions from Paul Eggert.
21630         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21631         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21632         * m4/fnmatch.m4: Likewise.
21633         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21634         to AC_HEADER_STDBOOL
21635
21636 2002-06-22  Jim Meyering  <meyering@lucent.com>
21637
21638         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21639         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21640
21641 2002-06-22  Jim Meyering  <meyering@lucent.com>
21642
21643         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21644
21645         * lib/exitfail.c, exitfail.h: Likewise.
21646         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21647
21648         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21649         of fnmatch.h.
21650         (EXTRA_DIST): Add fnmatch_loop.c.
21651         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21652
21653         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21654         * lib/fnmatch.c: Update from diffutils-2.8.2.
21655         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21656         * lib/fnmatch.h: Remove file.
21657
21658 2002-06-21  Jim Meyering  <meyering@lucent.com>
21659
21660         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21661         * m4/mbrtowc.m4: Likewise.
21662
21663         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21664         * m4/mbswidth.m4: Reflect name change:
21665         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21666         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21667
21668         * m4/lib-link.m4: Update from gettext-0.11.2.
21669         * m4/gettext.m4: Likewise.
21670
21671         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21672         From Alfred M. Szmidt.
21673
21674 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21675
21676         * lib/file-type.h: Report an error if neither S_ISREG nor
21677         S_IFREG is defined, instead of using a test specific to glibc
21678         2.2.  This should be safe, since POSIX requires S_ISREG and
21679         Unix Version 7 had S_IFREG.  We don't need to check for
21680         <sys/types.h> since we don't use any symbols that it defines.
21681
21682 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21683
21684         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21685         $@-t, so that each temporary file name is unique and valid in the first
21686         8 characters, for operation under DOS.
21687
21688 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21689
21690         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21691
21692 2002-06-15  Jim Meyering  <meyering@lucent.com>
21693
21694         Work even with DJGPP 2.03, which lacks support for symlinks.
21695         From Richard Dawe.
21696         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21697         is defined.
21698         * lib/lchown.c (S_ISLNK): Likewise.
21699
21700 2002-06-15  Jim Meyering  <meyering@lucent.com>
21701
21702         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21703         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21704         have been included before this file.
21705
21706 2002-06-14  Jim Meyering  <meyering@lucent.com>
21707
21708         * lib/file-type.h: Use the version from diffutils-2.8.2.
21709         * lib/file-type.c: Likewise.
21710
21711 2002-06-07  Jim Meyering  <meyering@lucent.com>
21712
21713         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21714         They're needed at least for NetBSD 1.5.2.
21715         ($statxfs_includes): Include those same headers.
21716         ($statxfs_includes): Include sys/vfs.h if available.
21717         ($statxfs_includes): Likewise for sys/statvfs.h.
21718         Check for the following members in both structs statfs and statvfs:
21719         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21720
21721 2002-06-01  Jim Meyering  <meyering@lucent.com>
21722
21723         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21724         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21725
21726 2002-05-28  Jim Meyering  <meyering@lucent.com>
21727
21728         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21729         Reported by Volker Borchert.
21730
21731 2002-05-27  Jim Meyering  <meyering@lucent.com>
21732
21733         Fix a problem seen only on nonconforming systems whereby ls.c's
21734         use of localtime, and then of gettimeofday would cause trouble:
21735         the localtime call used to initialize rpl_gettimeofday's save
21736         mechanism would clobber ls's current local time information so
21737         that in any long listing the first file would always be listed
21738         with date 1970-01-01.  Analysis by Volker Borchert.
21739
21740         * lib/gettimeofday.c (localtime): Undefine.
21741         (rpl_localtime): New function.
21742
21743 2002-05-27  Jim Meyering  <meyering@lucent.com>
21744
21745         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21746         localtime.
21747
21748         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21749         use the replacement function; it wouldn't resolve at link time.
21750         Reported by Volker Borchert.
21751
21752 2002-05-22  Jim Meyering  <meyering@lucent.com>
21753
21754         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
21755         file-type.h.
21756         * lib/file-type.h: New file.
21757         * lib/file-type.c (file_type): New file/function.  Extracted from
21758         diffutils.
21759
21760 2002-04-30  Jim Meyering  <meyering@lucent.com>
21761
21762         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
21763
21764 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21765
21766         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
21767
21768 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21769
21770         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
21771         Do not check for alloca.h (no longer used) or stdbool.h (was never
21772         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
21773
21774 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21775
21776         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
21777
21778 2002-04-29  Jim Meyering  <meyering@lucent.com>
21779
21780         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
21781         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
21782         Use AC_FUNC_STRNLEN here instead.
21783
21784         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
21785         With autoconf-2.53a, it's part of AC_PROG_CC.
21786
21787 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21788
21789         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
21790         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
21791
21792 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21793
21794         * lib/sig2str.h, lib/sig2str.c: New files.
21795         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
21796
21797 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21798
21799         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
21800         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
21801         of 127, since 64 is the largest conceivable number for ancient
21802         nonstandard hosts.
21803         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
21804
21805 2002-04-28  Jim Meyering  <meyering@lucent.com>
21806
21807         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
21808
21809 2002-04-24  Jim Meyering  <meyering@lucent.com>
21810
21811         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
21812         (jm_PREREQ): Use it.
21813
21814         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
21815         mach/mach.h fcntl.h.
21816         Check for this function: setlocale.
21817
21818 2002-04-24  Jim Meyering  <meyering@lucent.com>
21819
21820         * lib/gettext.h: New file, from Gettext.
21821         * lib/Makefile.am (INCLUDES): Remove -I../intl.
21822         (libfetish_a_SOURCES): Add gettext.h.
21823
21824 2002-04-16  Jim Meyering  <meyering@lucent.com>
21825
21826         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
21827         ut_pid, ut_id, ut_exit.
21828
21829 2002-04-16  Jim Meyering  <meyering@lucent.com>
21830
21831         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
21832         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
21833         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
21834
21835 2002-04-12  Jim Meyering  <meyering@lucent.com>
21836
21837         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
21838         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
21839         existence of the getmntinfo function.  Needed for Darwin 5.3.
21840
21841         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
21842         This is necessary at least on Darwin 5.3.
21843
21844         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
21845         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
21846         strnlen.o in the library, and that makes some versions of ranlib
21847         object.
21848
21849 2002-04-12  Jim Meyering  <meyering@lucent.com>
21850
21851         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
21852
21853 2002-04-09  Jim Meyering  <meyering@lucent.com>
21854
21855         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
21856         to be more precise.  Rather than saying we're checking whether the
21857         function `works', say what we're testing.
21858         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
21859         Reported by Bruno Haible.
21860
21861 2002-03-10  Jim Meyering  <meyering@lucent.com>
21862
21863         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
21864         Suggestion from Santiago Vila.
21865
21866 2002-03-08  Jim Meyering  <meyering@lucent.com>
21867
21868         * lib/rename.c: Mention that this wrapper is needed also on
21869         mips-dec-ultrix4.4 systems.
21870
21871 2002-03-02  Jim Meyering  <meyering@lucent.com>
21872
21873         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
21874         not HAVE_CLOCK_SETTIME.
21875
21876 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21877
21878         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
21879         Check for clock_settime.
21880
21881 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21882
21883         * lib/nanosleep.h: Rename to....
21884         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
21885
21886         * lib/gettime.c: New file.
21887         * lib/settime.c: New file.
21888         * lib/stime.c: Remove.
21889
21890         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
21891         timespec.h.  Remove nanosleep.h.
21892
21893 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21894
21895         * m4/acl.m4: New file.
21896         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
21897         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
21898
21899 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21900
21901         * lib/acl.c, lib/acl.h: New files.
21902         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
21903
21904 2002-02-24  Jim Meyering  <meyering@lucent.com>
21905
21906         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
21907         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
21908         cause trouble.  Reported by Nelson Beebe.
21909
21910 2002-02-23  Paul Eggert  <eggert@twinsun.com>
21911
21912         * lib/path-concat.c (xpath_concat): Reorder code to pacify
21913         compilers that don't know that xalloc_die never returns.
21914
21915 2002-02-20  Jim Meyering  <meyering@lucent.com>
21916
21917         * lib/getdate.c: Regenerate using bison-1.33.
21918
21919 2002-02-17  Jim Meyering  <meyering@lucent.com>
21920
21921         * config/config.guess (main): Don't use `head -1'; it's no longer
21922         portable. Use `sed 1q' instead.
21923
21924 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
21925
21926         * m4/codeset.m4: Upgrade to gettext-0.11.
21927         * m4/gettext.m4: Upgrade to gettext-0.11.
21928         * m4/glibc21.m4: Upgrade to gettext-0.11.
21929         * m4/iconv.m4: Upgrade to gettext-0.11.
21930         * m4/isc-posix.m4: Upgrade to gettext-0.11.
21931         * m4/lcmessage.m4: Upgrade to gettext-0.11.
21932         * m4/lib-ld.m4: New file, from gettext-0.11.
21933         * m4/lib-link.m4: New file, from gettext-0.11.
21934         * m4/lib-prefix.m4: New file, from gettext-0.11.
21935         * m4/progtest.m4: Upgrade to gettext-0.11.
21936
21937 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21938
21939         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
21940         (jm_PREREQ): Use it.
21941
21942 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21943
21944         * lib/posixver.c, lib/posixver.h: New files.
21945         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21946
21947 2002-02-02  Paul Eggert  <eggert@twinsun.com>
21948             Bruno Haible  <bruno@clisp.org>
21949
21950         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
21951         (fwrite_success_callback): New declaration.
21952         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
21953         print_unicode_char. Call failure callback instead of error.
21954         (fwrite_success_callback): New function.
21955         (exit_failure_callback): New function.
21956         (fallback_failure_callback): New function.
21957         (print_unicode_char): Call unicode_to_mb.
21958
21959 2002-01-26  Jim Meyering  <meyering@lucent.com>
21960
21961         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
21962         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
21963
21964 2002-01-26  Jim Meyering  <meyering@lucent.com>
21965
21966         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
21967
21968 2002-01-22  Paul Eggert  <eggert@twinsun.com>
21969
21970         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
21971
21972 2002-01-22  Jim Meyering  <meyering@lucent.com>
21973
21974         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
21975         Otherwise, some versions of automake would omit the rule that makes
21976         Makefile from Makefile.in.
21977
21978 2002-01-21  Paul Eggert  <eggert@twinsun.com>
21979
21980         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
21981         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21982         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
21983         (memcoll): Set errno to zero if there is no error.
21984
21985         * lib/quotearg.c (quotearg_buffer_restyled):
21986         Fix bug with quoting buffers containing NUL when backslashing escapes.
21987         This bug was exposed by the other changes in this patch.
21988         (quotearg_n_options): New arg ARGSIZE.
21989         All callers changed.
21990         (quoting_options_from_style): New function.
21991         (quotearg_n_style): Use it.
21992         (quotearg_n_style_mem): New function.
21993
21994         * lib/quotearg.h (quotearg_n_style_mem): New function.
21995
21996 2002-01-19  Jim Meyering  <meyering@lucent.com>
21997
21998         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
21999         Remove useless quotes: DF_PROG="df".
22000         * m4/strnlen.m4: New file.
22001
22002 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22003
22004         * lib/backupfile.c (ISDIGIT): Comment fix.
22005         * lib/getdate.y (ISDIGIT): Likewise.
22006         * lib/posixtm.c (ISDIGIT, year): Likewise.
22007         * lib/strverscmp.c (ISDIGIT): Likewise.
22008         * lib/userspec.c (ISDIGIT): Likewise.
22009
22010 2002-01-16  Jim Meyering  <meyering@lucent.com>
22011
22012         * lib/getdate.y: Add three semicolons, each just before a closing
22013         brace. Bison (as of version 1.31) no longer papers over that mistake.
22014
22015 2002-01-05  Jim Meyering  <meyering@lucent.com>
22016
22017         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22018
22019 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22020
22021         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22022         not silently exit merely because the output buffer happens to
22023         have nothing pending.
22024
22025 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22026
22027         See the big note in ../ChangeLog.
22028         * lib/human.c (suffixes): Prefer K to k for 1024.
22029         (generate_suffix_backwards): New function.
22030         (human_readable_inexact): Use it.
22031         * lib/xstrtol.c (__xstrtol): If there is no number but there
22032         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22033         Accept 'K' as well as 'k'.
22034
22035 2001-12-15  Jim Meyering  <meyering@lucent.com>
22036
22037         * lib/regex.h (__restrict_arr): Update from libc.
22038
22039         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
22040         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
22041         (STREQ): Define.
22042
22043 2001-12-14  Jim Meyering  <meyering@lucent.com>
22044
22045         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
22046         Suggestion from Bruno Haible.
22047
22048 2001-12-10  Jim Meyering  <meyering@lucent.com>
22049
22050         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
22051         xrealloc, Instead, include "xalloc.h".
22052         (initbuffer): Don't cast xmalloc return value to char*.
22053         (readline): Reword comment.
22054         Don't cast xrealloc return value to char*
22055         Return NULL, not 0.
22056
22057 2001-12-09  Jim Meyering  <meyering@lucent.com>
22058
22059         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
22060         about `signed and unsigned type in conditional expression'.
22061         * lib/posixtm.c (posix_time_parse): Likewise.
22062
22063         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
22064
22065         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
22066         to avoid a pedantic warning.
22067
22068         * lib/getstr.c: Don't include assert.h.
22069         (getstr): Remove warning-evoking assertions.
22070         Return -1 if offset parameter is out of bounds.
22071         Change the type of a local from int to size_t.
22072
22073         * lib/strftime.c (my_strftime_localtime_r): Include this function
22074         definition in the `#if ! HAVE_TM_GMTOFF' block.
22075
22076         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
22077         Include xalloc.h instead.
22078
22079 2001-12-02  Jim Meyering  <meyering@lucent.com>
22080
22081         * lib/tempname.c: Don't declare getenv, thus reverting the change of
22082         2001-11-18.  It's no longer necessary, now that stdlib.h is always
22083         included.
22084
22085         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
22086         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
22087
22088 2001-11-30  Akim Demaille  <akim@epita.fr>
22089
22090         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
22091         before being defined.
22092
22093 2001-11-27  Paul Eggert  <eggert@twinsun.com>
22094
22095         * lib/quotearg.h (quotearg_n, quotearg_n_style):
22096         First arg is int, not unsigned.
22097         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22098         (SIZE_MAX, UINT_MAX): New macros.
22099         (quotearg_n_options): Abort if N is negative.
22100         Avoid overflow check on hosts where size_t is 64 bits and int
22101         is 32 bits, as overflow is impossible there.
22102         Fix off-by-one typo that caused unnecessary reallocation.
22103
22104 2001-11-27  Jim Meyering  <meyering@lucent.com>
22105
22106         * lib/tempname.c: Merge with version from libc.
22107         * lib/regex.c: Likewise.
22108
22109         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
22110         systems for which STDC_HEADERS is 0, it was not included, resulting in
22111         a warning about an integer-to-pointer conversion problem with getenv.
22112         Reported by Volker Borchert.
22113
22114 2001-11-26  Jim Meyering  <meyering@lucent.com>
22115
22116         * lib/gtod.h: Remove file.
22117         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
22118         * lib/gettimeofday.c: Don't include gtod.h.
22119         (GTOD_init): Remove function.
22120         (rpl_gettimeofday): Do its job here instead, rather than aborting.
22121         Suggestion from Volker Borchert.
22122
22123 2001-11-23  Jim Meyering  <meyering@lucent.com>
22124
22125         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
22126         it.
22127         * lib/hash.c (struct hash_table): Define it here instead.
22128
22129 2001-11-22  Jim Meyering  <meyering@lucent.com>
22130
22131         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
22132
22133 2001-11-20  Jim Meyering  <meyering@lucent.com>
22134
22135         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
22136         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
22137
22138 2001-11-19  Jim Meyering  <meyering@lucent.com>
22139
22140         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
22141         directory.  Use "conftestXXXXXX" as the template.
22142         Suggestion from Paul Eggert.
22143
22144         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
22145         immediately, so the test doesn't mistakenly hit the max-open-files
22146         limit.
22147
22148 2001-11-18  Paul Eggert  <eggert@twinsun.com>
22149
22150         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
22151         (TEMPORARIES): New macro.
22152         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
22153         removes an artificial limitation (e.g. HP-UX 10.20, where
22154         TMP_MAX is 17576).
22155
22156 2001-11-18  Jim Meyering  <meyering@lucent.com>
22157
22158         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
22159
22160 2001-11-18  Jim Meyering  <meyering@lucent.com>
22161
22162         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
22163         on SunOS 4.
22164
22165         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
22166         files will be created before anything else.
22167
22168 2001-11-17  Paul Eggert  <eggert@twinsun.com>
22169
22170         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
22171         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
22172
22173 2001-11-17  Jim Meyering  <meyering@lucent.com>
22174
22175         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
22176         Prompted by a report from Bob Proulx.
22177
22178         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
22179         Instead, require UTILS_FUNC_MKSTEMP.
22180
22181 2001-11-17  Jim Meyering  <meyering@lucent.com>
22182
22183         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
22184         Now, that's done as part of AC_FUNC_STRTOD.
22185
22186 2001-11-17  Jim Meyering  <meyering@lucent.com>
22187
22188         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
22189         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
22190         rather than group writable.  Patch by Juan F. Codagnone.
22191
22192         * lib/readtokens.c: Remove explicit declarations of xmalloc and
22193         xrealloc, Instead, include "xalloc.h".
22194
22195         * lib/mountlist.c: Include unlocked-io.h after all system headers.
22196         Remove explicit declarations of xmalloc, xrealloc,
22197         and xstrdup.  Instead, include "xalloc.h".
22198
22199         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
22200         unlocked-io.h.
22201         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
22202         Likewise.
22203         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
22204
22205         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
22206         Reported by Padraig Brady.
22207
22208         * lib/mkstemp.c: #undef mkstemp.
22209         Include config.h.
22210         (rpl_mkstemp): Rename from mkstemp.
22211         Protoize.
22212
22213 2001-11-16  Jim Meyering  <meyering@lucent.com>
22214
22215         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
22216         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
22217         determine the amount of total physical memory, use pstat_getstatic.
22218         HPUX-11 doesn't define _SC_PHYS_PAGES.
22219         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
22220         If sysconf couldn't be used to determine the amount of available
22221         physical memory, use both pstat_getstatic and pstat_getdynamic.
22222         Based on a patch from Bob Proulx.
22223
22224 2001-11-10  Jim Meyering  <meyering@lucent.com>
22225
22226         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
22227         (jm_PREREQ): Use it.
22228
22229 2001-11-09  Jim Meyering  <meyering@lucent.com>
22230
22231         * m4/jm-macros.m4: Require autoconf-2.52f.
22232         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
22233         Use these AC_-prefixed names, not the AM_-prefixed ones.
22234
22235         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
22236
22237 2001-11-05  Jim Meyering  <meyering@lucent.com>
22238
22239         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
22240
22241 2001-11-04  Jim Meyering  <meyering@lucent.com>
22242
22243         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
22244         $DEFS.
22245
22246 2001-11-03  Jim Meyering  <meyering@lucent.com>
22247
22248         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
22249         of AC_DEFUN.
22250
22251         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
22252         know the name of the variable in the macro definition.
22253
22254 2001-11-03  Jim Meyering  <meyering@lucent.com>
22255
22256         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
22257         in argmatch_to_argument call.
22258
22259         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
22260         argument.
22261
22262         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
22263         e.g., a fault due to an attempt to free a NULL pointer.
22264
22265 2001-11-01  Jim Meyering  <meyering@lucent.com>
22266
22267         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
22268         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
22269
22270 2001-11-01  Jim Meyering  <meyering@lucent.com>
22271
22272         * lib/dirfd.c, lib/dirfd.h: New files.
22273         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22274
22275         * lib/hash.c (hash_print) [TESTING]: Clean up.
22276
22277 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22278
22279         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22280         to avoid a warning if -Wall.
22281
22282 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22283
22284         * README: New file
22285         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22286         (per RMS's instructions, this is now the canonical source)
22287         * lgpl/, gpl/: New directories.
22288
22289 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22290
22291         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22292
22293 2001-10-21  Jim Meyering  <meyering@lucent.com>
22294
22295         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22296         this code would end up calling gettext even in packages built
22297         with --disable-nls.
22298         * lib/getopt.c (_): Likewise.
22299         * lib/regex.c (_): Likewise.
22300
22301 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22302
22303         * m4/error.m4 (jm_PREREQ_ERROR):
22304         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22305         AC_FUNC_STRERROR_R does that.
22306         Check for strerror declaration.
22307
22308         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22309         are supposed to have them these days.
22310         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22311         Merge changes from latest Autoconf CVS.
22312         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22313         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22314         POSIX decided to standardize on the int flavor of strerror_r.
22315
22316 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22317
22318         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22319         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22320         Use strerror_r that is only a macro, even if it is not a function.
22321         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22322         (private_strerror): Use prototypes, not old-style function definition.
22323         (print_errno_message): New function.
22324         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22325         char*-flavored one.
22326         (error_tail, error, error_at_line): Use it.
22327
22328 2001-10-11  Jim Meyering  <meyering@lucent.com>
22329
22330         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22331         and quote_n (1, ... to avoid clobbering a buffer.
22332
22333 2001-10-05  Jim Meyering  <meyering@lucent.com>
22334
22335         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22336         hash-pjw.h.
22337         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22338         * lib/hash-pjw.h: New file.
22339
22340 2001-09-30  Jim Meyering  <meyering@lucent.com>
22341
22342         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22343         `struct fsstat' has the `f_fstypename' member.
22344         Use that to define FS_TYPE, which is now used to make
22345         the getfsstat link test tighter.
22346
22347 2001-09-30  Jim Meyering  <meyering@lucent.com>
22348
22349         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22350         Include <sys/ucred.h>, for Apple Darwin.
22351         Include sys/mount.h and sys/fs_types.h only if available.
22352         (FS_TYPE): Define.
22353         (read_filesystem_list): Use FS_TYPE.
22354
22355 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22356
22357         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22358         a boolean context.
22359
22360 2001-09-29  Jim Meyering  <meyering@lucent.com>
22361
22362         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22363         [one-argument getmntent function]): Include stdio.h before mntent.h.
22364         SunOS 4.1.x needs it for the declaration of `FILE'.
22365         Patch by Volker Borchert.
22366
22367         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22368         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22369         sys/fs_types.h, and make the link-test for getfsstat guard #include
22370         directives with appropriate #if HAVE_*_H tests so that we can
22371         detect getfsstat on Apple Darwin1.3.7 systems.
22372         Reported by Nelson Beebe.
22373         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22374
22375 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22376
22377         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22378         #defines strtoimax.  Also treat the other strto* functions
22379         like strtoimax.
22380
22381         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22382         Check for strtoul and strtoumax,
22383         as those declarations are made even in the signed case.
22384         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22385         Likewise, for strtol and strtoimax.
22386
22387 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22388
22389         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22390         #defines strtoimax.  Also treat the other strto* functions
22391         like strtoimax.
22392
22393         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22394         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22395         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22396
22397 2001-09-26  Jim Meyering  <meyering@lucent.com>
22398
22399         Most macros in unlocked-io.h had the wrong number of arguments.
22400         * lib/gen-uio: New script.
22401         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22402         * lib/unlocked-io.hin: Remove file.
22403         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22404         rather than trying to embed it here.
22405         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22406         Reported by Padraig Brady.
22407
22408 2001-09-25  Volker Borchert  <bt@teknon.de>
22409
22410         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22411         `result'.
22412
22413 2001-09-24  Jim Meyering  <meyering@lucent.com>
22414
22415         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
22416
22417 2001-09-23  Jim Meyering  <meyering@lucent.com>
22418
22419         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
22420         instead of the mere test for existence of mntent.h.  The latter
22421         would get a false-positive on AIX 3.4 systems.
22422         In the outer getmntent if-block, don't die if neither of the getmntent
22423         tests succeeds.  Instead, just fall through and continue with the
22424         remaining tests.
22425
22426 2001-09-23  Jim Meyering  <meyering@lucent.com>
22427
22428         * lib/mountlist.c: Remove useless parentheses in #if directives.
22429         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22430         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22431
22432 2001-09-22  Jim Meyering  <meyering@lucent.com>
22433
22434         * m4/gettext.m4: New file.  From gettext.
22435         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22436         * m4/progtest.m4: Likewise
22437         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
22438         * m4/glibc21.m4: Likewise.
22439
22440         * m4/libintl.m4: Remove.  No longer used.
22441
22442 2001-09-22  Jim Meyering  <meyering@lucent.com>
22443
22444         * lib/localcharset.c: Update from latest gettext.
22445         * lib/config.charset: Likewise.
22446
22447 2001-09-20  Jim Meyering  <meyering@lucent.com>
22448
22449         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
22450         strtoimax.
22451         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
22452         strtoumax.
22453
22454 2001-09-20  Jim Meyering  <meyering@lucent.com>
22455
22456         * lib/xstrtol.c (strtoimax): Guard declaration with
22457         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
22458         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
22459         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
22460         (strtoumax): Likewise, for completeness (it wasn't necessary).
22461
22462 2001-09-17  Paul Eggert  <eggert@twinsun.com>
22463
22464         * lib/strtoimax.c (HAVE_LONG_LONG):
22465         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
22466         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
22467         to work around bug in IBM C compiler.
22468
22469 2001-09-17  Jim Meyering  <meyering@lucent.com>
22470
22471         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
22472         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
22473         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
22474         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
22475         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
22476         whenever the right hand side need not be expanded by the shell.
22477
22478 2001-09-16  Paul Eggert  <eggert@twinsun.com>
22479
22480         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
22481         library.  It's not correct, as some older glibcs are buggy.
22482         fnmatch wasn't fixed until glibc 2.2.
22483
22484         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
22485         special shell magic here.
22486
22487 2001-09-16  Jim Meyering  <meyering@lucent.com>
22488
22489         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22490         * m4/jm-macros.m4: Require it.
22491
22492 2001-09-16  Jim Meyering  <meyering@lucent.com>
22493
22494         * lib/mkdir.c: New file.
22495
22496 2001-09-15  Jim Meyering  <meyering@lucent.com>
22497
22498         * m4/jm-macros.m4: Check for help2man.
22499
22500 2001-09-11  Jim Meyering  <meyering@lucent.com>
22501
22502         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22503         The body, by Paul Eggert, was moved here from configure.in.
22504         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22505
22506 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22507
22508         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22509         (jm_PREREQ): Use it.
22510
22511 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22512
22513         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22514         Use ssize_t, not int, to store result of readlink.
22515         Check for ssize_t overflow as well as size_t overflow,
22516         as POSIX says the result of readlink is implementation-defined
22517         when ssize_t overflows.
22518         Remove unnecessary cast to char*.
22519         Use free+malloc instead of realloc, as the storage doesn't need
22520         to be preserved and it's clearer and can be more efficient that way.
22521         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22522         * lib/xreadlink.h (xreadlink): Update prototype.
22523
22524 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22525
22526         * lib/xgetcwd.c: Revert some of the previous change; intead,
22527         fix the HAVE_GETCWD_NULL code to behave more like the
22528         !HAVE_GETCWD_NULL code used to.
22529
22530         Include "xalloc.h".
22531         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22532         invoke xalloc_die.
22533
22534 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22535
22536         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22537         sys/param.h, as pathmax.h includes them.
22538
22539 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22540
22541         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22542         (jm_PREREQ_XGETCWD): New macro.
22543
22544         * m4/getcwd.m4: New file.
22545
22546 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22547
22548         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22549         like the HAVE_GETCWD_NULL code.
22550         Include pathmax.h if not HAVE_GETCWD.
22551         Do not include xalloc.h.
22552         (INITIAL_BUFFER_SIZE): New symbol.
22553         Do not use xmalloc / xrealloc, since the caller is responsible for
22554         handling errors.  Preserve errno around `free' during failure.
22555         Do not overrun buffer when using getwd.
22556
22557 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22558
22559         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22560         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22561         getcwd (NULL, 0).
22562
22563 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22564
22565         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22566         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22567         spotted by Jim Meyering.
22568
22569 2001-09-03  Jim Meyering  <meyering@lucent.com>
22570
22571         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22572         failure.
22573
22574 2001-09-02  Jim Meyering  <meyering@lucent.com>
22575
22576         * lib/error.c: Update from GNU libc.
22577
22578 2001-09-01  Jim Meyering  <meyering@lucent.com>
22579
22580         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22581         Used by df.
22582
22583 2001-09-01  Jim Meyering  <meyering@lucent.com>
22584
22585         * lib/xreadlink.c: New file.
22586         * lib/xreadlink.h: New file.
22587         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22588         xreadlink.h.
22589
22590         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22591         doesn't conflict with sparc Solaris 7's definition in
22592         /usr/include/sys/int_types.h.
22593
22594         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22595         files.
22596         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22597         and strncasecmp as r-values.  Unixware didn't have declarations.
22598
22599 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22600
22601         * lib/xstrtol.h: Add copyright notice.
22602         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22603         LONGINT_INVALID_SUFFIX_CHAR.
22604
22605 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22606
22607         * lib/xstrtol.c (strtoimax): New decl.
22608
22609 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22610
22611         * lib/xgetcwd.c: Don't include pathmax.h.
22612         Include stdlib.h and unistd.h if available.
22613         Include xalloc.h.
22614         (xmalloc, xstrdup, free): Remove decls.
22615         (xgetcwd): Don't assume sizes fit in unsigned.
22616         Check for overflow when computing sizes.
22617         Simplify reallocation code.
22618
22619 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22620
22621         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22622         a directory's st_size can have an arbitrary value, so the old
22623         usage could waste an arbitrary amount of memory.  All uses
22624         changed.
22625         * lib/savedir.h: Update prototype.
22626
22627 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22628
22629         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22630
22631         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22632         old strtoimax.c.
22633
22634         Also, make the following further changes to make this file's
22635         configuration more similar to that of strtol.c:
22636         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22637         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22638         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22639         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22640         changed to signed values.
22641
22642         And make the following changes as well:
22643         Fix copyright notice, as 1999 was missing.
22644         (verify): New macro.
22645         (strtoimax): Check sizes at compile-time, not run-time.
22646         Prefer strtol to strtoll if both work.
22647         (main): Remove; it was not that useful and was a pain to maintain.
22648
22649         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22650
22651 2001-08-31  Jim Meyering  <meyering@lucent.com>
22652
22653         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22654         Use an initial, malloc'd, buffer of length 128 rather than
22655         a statically allocated one of length 1024.
22656
22657 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22658
22659         Simplify code, partly by assuming autoconf 2.52 semantics.
22660
22661         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22662
22663         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22664         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22665         All uses removed.
22666         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22667         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22668         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22669         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22670         jm_AC_HEADER_INTTYPES_H.
22671         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22672
22673         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22674
22675         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22676         Quote first arg of AC_DEFUN.
22677         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22678         since they are needed to parse the include file even if we need
22679         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22680         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22681         but with opposite signedness.
22682
22683 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22684
22685         Merge 'exclude' changes from tar 1.13.22.
22686         This fixes one or two unlikely storage allocation overflow bugs,
22687         but doesn't change user-visible behavior otherwise.
22688
22689 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22690
22691         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22692         (jm_PREREQ_EXCLUDE): New macro.
22693
22694 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22695
22696         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22697         tm to be declared.
22698
22699 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22700
22701         * lib/hash.c: Remove '2001' from copyright notice.
22702
22703 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22704
22705         * lib/full-write.h: New file.
22706         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22707         * lib/full-write.c: Correct credits, as cccp.c no longer
22708         exists and anyway it was so heavily changed from the old cccp
22709         code as to be unrecognizable.  Include full-write.h.
22710         (full_write) Return size_t, with short writes meaning failure.
22711         All callers changed.  This fixes a bug with large buffers
22712         on 64-bit hosts.
22713         * lib/utime.c: Include full-write.h.
22714
22715 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22716
22717         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22718         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22719         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22720         Include if available.
22721         (<xalloc.h>): Include
22722         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22723         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22724         collide with FNM macros.
22725         (struct patopts): New struct.
22726         (struct exclude): Use it, as exclude patterns now come with options.
22727         (new_exclude): Support above changes.
22728         (new_exclude, add_exclude_file):
22729         Initial size must now be a power of two to simplify overflow checking.
22730         (free_exclude, fnmatch_no_wildcards): New function.
22731         (excluded_filename): No longer requires options arg, as the options
22732         are determined by add_exclude.  Now returns bool, not int.
22733         (excluded_filename, add_exclude):
22734         Add support for the fancy new exclusion options.
22735         (add_exclude, add_exclude_file): Now takes int options arg.
22736         Check for arithmetic overflow when computing sizes.
22737         (add_exclude_file): xrealloc might modify errno, so don't
22738         realloc until after errno might be used.
22739
22740         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22741         New macros.
22742         (free_exclude): New decl.
22743         (add_exclude, add_exclude_file): Now takes int options arg.
22744         (excluded_filename): No longer requires options arg, as the options
22745         are determined by add_exclude.  Now returns bool, not int.
22746
22747 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22748
22749         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22750
22751 2001-08-27  Jim Meyering  <meyering@lucent.com>
22752
22753         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
22754
22755         * lib/version-etc.c (N_): Remove definition.
22756         Revert most of last change.
22757         Instead, simply don't mark the `Copyright...' string for translation.
22758         Based on advice from Paul Eggert.
22759
22760         * lib/strtoxmax.c: Tweak comment.
22761
22762 2001-08-26  Jim Meyering  <meyering@lucent.com>
22763
22764         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
22765
22766         * m4/xstrtoimax.m4: New file.
22767         * m4/xstrtoumax.m4: Add comments explaining why we
22768         AC_REPLACE_FUNCS(strtol).
22769
22770 2001-08-26  Jim Meyering  <meyering@lucent.com>
22771
22772         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
22773         of copyright with `%s' so translators don't get an untranslated
22774         message in 2002.
22775         (COPYRIGHT_YEAR): Define.
22776         (version_etc): Use fprintf rather than fputs.
22777         Suggestion from Ulrich Drepper.
22778
22779         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
22780
22781         * lib/strtoll.c: New file, from GNU libc.
22782         * lib/xstrtoimax.c: New file.
22783
22784         * lib/xstrtol.h: Add xstrtoimax.
22785         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
22786         * lib/strtoimax.c: New file.  Likewise, but first define
22787         STRTOUXMAX_SIGNED.
22788
22789         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
22790         ...
22791         * lib/strtoxmax.c: ... then renamed to this.
22792
22793 2001-08-18  Paul Eggert  <eggert@twinsun.com>
22794
22795         * m4/inttypes.m4: Add AC_PREREQ(2.13).
22796         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
22797         (jm_AC_TYPE_INTMAX_T): New macro.
22798         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
22799
22800         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
22801
22802         * m4/longlong.m4: Renamed from ulonglong.m4.
22803         * m4/inttypes.m4: Renamed from inttypes_h.m4.
22804         * m4/uintmax_t.m4: Removed.
22805
22806 2001-08-13  Paul Eggert  <eggert@twinsun.com>
22807
22808         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
22809         Port to Solaris 8, where 'sed' requires a space after the 'r'
22810         command, and where sh dislikes "$/".  Clean up the spacing a bit.
22811         Redirect output to $tmp just once.
22812
22813 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
22814
22815         * lib/addext.c (<errno.h>): Include.
22816         (errno): Declare if not defined.
22817         (addext): Work correctly when pathconf returns -1 and leaves
22818         errno alone because there is no limit.  Also, work even if
22819         pathconf returns a value greater than SIZE_MAX.
22820
22821 2001-08-12  Jim Meyering  <meyering@lucent.com>
22822
22823         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
22824         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
22825         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
22826         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
22827         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
22828         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
22829         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
22830         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
22831         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
22832         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
22833         utime.m4, utimes.m4, xstrtoumax.m4:
22834         Quote the first argument in each use of AC_DEFUN.
22835
22836 2001-08-12  Jim Meyering  <meyering@lucent.com>
22837
22838         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
22839         Simply `return getcwd (NULL, 0);'.
22840         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
22841         Use 1300 as initial value for length, not PATH_MAX.
22842
22843         * lib/pathmax.h: Clean up cpp syntax.
22844
22845 2001-08-12  Jim Meyering  <meyering@lucent.com>
22846
22847         * lib/gettimeofday.c: New file.
22848         * lib/gtod.h: New file.
22849         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
22850
22851 2001-08-05  Jim Meyering  <meyering@lucent.com>
22852
22853         * m4/jm-macros.m4: Require autoconf-2.52.
22854
22855 2001-08-04  Jim Meyering  <meyering@lucent.com>
22856
22857         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
22858         stmt, to get in sync with glibc.
22859
22860 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22861
22862         The following changes are from gettext 0.10.39 as maintained by
22863         Bruno Haible.
22864
22865         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
22866         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
22867         with inverted sense.  All uses changed.
22868
22869         * lib/mbswidth.c: Don't include <limits.h>.
22870         Include <stdlib.h> and <string.h> unconditionally.
22871         (iswcntrl, mbsinit, ISCNTRL): New macros.
22872         (mbsnwidth): Use K&R style function declarations.
22873         Don't bother checking for MB_LEN_MAX == 1, since the compiler
22874         can optimize it when MB_CUR_MAX == 1.
22875         The width of control characters is zero, not 1.
22876
22877 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22878
22879         The following changes are from gettext 0.10.39 as maintained by
22880         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
22881
22882         * m4/codeset.m4: Upgrade to serial AM1.
22883         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
22884         all uses changed.  Quote first arg of AC_DEFUN.
22885         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
22886
22887         * m4/iconv.m4: Upgrade to serial AM2.
22888         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
22889         Add --with-libconv-prefix.
22890         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
22891         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
22892         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
22893         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
22894         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
22895
22896         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
22897         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
22898         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
22899         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
22900         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
22901         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
22902         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
22903         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
22904         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
22905
22906         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
22907         string.h any more.
22908
22909         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
22910         not the default value.
22911
22912         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
22913         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
22914         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
22915         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
22916         Also check for iswcntrl, used for wcwidth fallback.
22917         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
22918         to Autoconf 2.13.
22919
22920 2001-08-03  Jim Meyering  <meyering@lucent.com>
22921
22922         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
22923         as it was in the original.  Reported by Paul Eggert.
22924
22925 2001-07-16  Jim Meyering  <meyering@lucent.com>
22926
22927         * m4/gettimeofday.m4: New file.
22928         Prompted by a report from Bernhard Baehr.
22929
22930 2001-07-15  Jim Meyering  <meyering@lucent.com>
22931
22932         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
22933         stuff. Now it's in ../Makefile.cfg.
22934
22935 2001-07-15  Jim Meyering  <meyering@lucent.com>
22936
22937         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
22938         (BUILT_SOURCES): Add unlocked-io.h.
22939         (io_functions): Define.
22940         (unlocked-io.h): New rule.
22941         (DISTCLEANFILES): Add unlocked-io.h.
22942         (all-local): Depend on unlocked-io.h, to ensure it is created.
22943
22944         * lib/unlocked-io.hin: New file
22945
22946         * lib/regex.c: Update from glibc.
22947
22948 2001-07-05  Jim Meyering  <meyering@lucent.com>
22949
22950         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
22951         recommendation.
22952         (libfetish_a_SOURCES): Put all .h files here instead.
22953         Remove a thus-exposed (better checks in automake) duplicate and
22954         two unnecessary .h files.
22955
22956 2001-07-04  Jim Meyering  <meyering@lucent.com>
22957
22958         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
22959         that generates jm-glibc-io.m4 so that it doesn't trigger any make
22960         distcheck failure.
22961
22962 2001-07-02  Jim Meyering  <meyering@lucent.com>
22963
22964         The following changes were prompted by suggestions from Bruno Haible.
22965
22966         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
22967         is now generated.
22968         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
22969         definition of EXTRA_DIST.
22970         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
22971         ensure that the generated file is created/updated whenever the list
22972         of $(unlocked_functions) is changed.
22973         (jm-glibc-io.m4): New rule.
22974         (unlocked-io.h): New rule -- currently unused.
22975
22976 2001-06-24  Jim Meyering  <meyering@lucent.com>
22977
22978         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
22979         unmatched right bracket, rather than kludging it with an extra,
22980         falsely-matching quote in a comment.  Patch by Akim Demaille.
22981
22982 2001-06-11  Jim Meyering  <meyering@lucent.com>
22983
22984         * lib/regex.c: Update from GNU libc.
22985
22986 2001-05-27  Jim Meyering  <meyering@lucent.com>
22987
22988         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
22989         Check for ut_type in struct utmp.
22990
22991 2001-05-27  Jim Meyering  <meyering@lucent.com>
22992
22993         * lib/readutmp.h (UT_TYPE): Define.
22994
22995 2001-05-24  Jim Meyering  <meyering@lucent.com>
22996
22997         * lib/argmatch.c: Include "quote.h".
22998         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
22999         quote function.  Reported by Göran Uddeborg.
23000
23001 2001-05-22  Jim Meyering  <meyering@lucent.com>
23002
23003         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23004         now that we use the package-supplied version unconditionally.
23005         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23006
23007 2001-05-21  Jim Meyering  <meyering@lucent.com>
23008
23009         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23010         shell syntax errors.
23011
23012 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23013
23014         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23015
23016 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23017
23018         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23019         Don't bother to check library strftime, since
23020         we'll be using our own my_strftime function anyway.
23021         Define my_strftime instead of strftime.
23022
23023 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23024
23025         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23026         which is not yet declared.
23027
23028 2001-05-15  Jim Meyering  <meyering@lucent.com>
23029
23030         * m4/regex.m4: Use proper quoting so brackets appear in the test
23031         program.
23032         Reported by, and with help from, Bruno Haible.
23033
23034 2001-05-13  Jim Meyering  <meyering@lucent.com>
23035
23036         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23037         undefined.
23038
23039 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23040
23041         dirname code cleanup.  base_name now behaves more compatibly
23042         with POSIX basename when given file names that have trailing
23043         slashes, and similarly for dir_name.  Add new primitives
23044         base_len and dir_len.  Put the directory-name-related decls
23045         into dirname.h.
23046
23047         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
23048         * lib/backupfile.c (base_name): Likewise.
23049         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
23050         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
23051         * lib/makepath.c (strip_trailing_slashes): Likewise.
23052         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
23053         ISSLASH): Likewise.
23054         * lib/rename.c (strip_trailing_slashes): Likewise.
23055         * lib/same.c (base_name): Likewise.
23056         * lib/stripslash.c (ISSLASH): Likewise.
23057
23058         * lib/addext.c: Include <dirname.h> after size_t is defined.
23059         * lib/backupfile.c: Likewise.
23060
23061         * lib/addext.c (addext): Use base_len to trim redundant
23062         trailing slashes instead of doing it ourselves.
23063         But do not trim the last slash if it is not redundant.
23064
23065         * lib/backupfile.c (find_backup_file_name,
23066         max_backup_version): Use base_len instead of rolling it ourselves.
23067         Handle the case of "" and (on DOS) "C:" correctly.
23068
23069         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
23070         needed. Include <string.h>, <dirname.h>.
23071         (base_name): Allow file names ending in slashes, other than names
23072         that are all slashes.  In this case, return the basename followed
23073         by the slashes.  This is more general, and can be used in places
23074         where the original base_name purposely had an assertion failure.
23075         (base_len): New function.
23076
23077         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
23078         Do not include <assert.h>; no longer needed.
23079         Include xalloc.h.
23080         (memrchr): Remove decl.
23081         (dir_name_r): Remove.
23082         (dir_len): Renamed from dirlen.  All callers changed.
23083         Rewrite in terms of base_name, for simplicity and consistency.
23084         (dir_name): Never return NULL.  All callers changed.
23085         Do not include <stdlib.h> in test program; no longer needed.
23086         return 0; is fine for test program.
23087
23088         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
23089         New macros.
23090         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
23091
23092         * lib/path-concat.c (path_concat): Use base_len to compute
23093         base length, not strlen; this means we cannot rely on memcpy
23094         to null-terminate.
23095
23096         * lib/same.c (STREQ): Remove.
23097         (same_name): Handle the case where the basename ends in trailing '/'.
23098
23099         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
23100         a slash was stripped.  Do not strip the last slash after a
23101         file system prefix.
23102
23103 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23104
23105         * lib/Makefile.am (libfetish_a_SOURCES):
23106         Add strftime.c, since we now compile it on all hosts.
23107
23108         * lib/strftime.c (my_strftime):
23109         Define to nstrftime if emacs, but only if my_strftime is not defined.
23110         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
23111         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
23112         Add one more extra argument: a nanoseconds value.
23113         All uses changed.
23114         (ns): New macro.
23115         (my_strftime function): Add %N format.
23116         (emacs_strftimeu): Renamed from emacs_strftime,
23117         with extra ut argument.
23118
23119 2001-05-09  Paul Eggert  <eggert@twinsun.com>
23120
23121         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
23122
23123 2001-04-21  Jim Meyering  <meyering@lucent.com>
23124
23125         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
23126         doesn't interfere.
23127
23128 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23129
23130         * m4/ftruncate.m4: Check for chsize.
23131         Link with ftruncate.o unconditionally if ftruncate is missing.
23132         This was required when cross-compiling to i586-mingw32msvc.
23133
23134 2001-04-08  Jim Meyering  <meyering@lucent.com>
23135
23136         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
23137         recomputed; that's necessary when the offset spans a DST transition.
23138         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
23139
23140 2001-04-02  Jim Meyering  <meyering@lucent.com>
23141
23142         * lib/regex.h, regex.c: Update from GNU libc.
23143
23144 2001-03-24  Jim Meyering  <meyering@lucent.com>
23145
23146         * m4/jm-macros.m4: Require autoconf-2.49d.
23147
23148 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
23149
23150         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
23151
23152 2001-03-19  Paul Eggert  <eggert@twinsun.com>
23153
23154         * lib/version-etc.c (version_etc_copyright): Update to 2001.
23155
23156 2001-03-17  Jim Meyering  <meyering@lucent.com>
23157
23158         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
23159         now that the version in autoconf is equivalent.
23160         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
23161
23162         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
23163         Suggestion from Akim Demaille.
23164
23165         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
23166         (jm_PREREQ_TEMPNAME): New function.
23167
23168 2001-03-16  Paul Eggert  <eggert@twinsun.com>
23169
23170         * lib/tempname.c (uint64_t): Define to uintmax_t if
23171         not defined, and if UINT64_MAX is not defined.
23172         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
23173         Reported by John David Anglin.
23174
23175 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
23176
23177         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
23178         resolve alias if codeset is empty.
23179         * lib/config.charset (BeOS): Use wildcard syntax.
23180
23181 2001-03-13  Jim Meyering  <meyering@lucent.com>
23182
23183         * lib/path-concat.c (path_concat)
23184         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
23185         concatenating e.g., `C:' and `foo'.
23186         From Bruno Haible.
23187
23188 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23189
23190         * lib/localcharset.c (locale_charset): Don't use
23191         setlocale(LC_CTYPE,NULL). Don't return NULL.
23192         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
23193
23194 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23195
23196         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
23197         support for DOS/DJGPP.
23198
23199 2001-03-01  Paul Eggert  <eggert@twinsun.com>
23200
23201         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
23202         lacks mkstemp.  Compile our own tempname.c if we compile our own
23203         mkstemp.c, as mkstemp relies on tempname.
23204
23205 2001-03-01  Jim Meyering  <meyering@lucent.com>
23206
23207         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
23208         AH_VERBATIM really does output its argument verbatim.
23209
23210 2001-02-28  Paul Eggert  <eggert@twinsun.com>
23211
23212         * lib/Makefile.am (libfetish_a_SOURCES):
23213         Add dup-safer.c, fopen-safer.c.
23214         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
23215
23216         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
23217         * lib/unistd-safer.h: New files.
23218
23219 2001-02-25  Paul Eggert  <eggert@twinsun.com>
23220
23221         The mkstemp replacement is taken from glibc 2.2.2, with some
23222         portability fixes for use outside glibc, as follows:
23223
23224         * lib/tempname.c (struct_stat64): New macro.
23225         (direxists, __gen_tempname): Use it.
23226         This avoids a portability problem with Solaris 8.
23227
23228         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
23229         (<stddef.h>, <stdint.h>, <string.h>):
23230         Include only if STDC_HEADERS || _LIBC.
23231         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
23232         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
23233         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
23234         (__set_errno): Define this macro if <errno.h> doesn't.
23235         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
23236         Define these macros if <stdio.h> doesn't.
23237         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
23238         Define these macros if <sys/stat.h>
23239         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
23240         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
23241         __xstat64): Define if not _LIBC.
23242         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
23243         (__gen_tempname): Invoke gettimeofday only if
23244         HAVE_GETTIMEOFDAY || _LIBC;
23245         otherwise, fall back on plain "time".
23246         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
23247
23248         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
23249
23250         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
23251
23252 2001-02-18  Paul Eggert  <eggert@twinsun.com>
23253
23254         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
23255
23256 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23257
23258         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
23259         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
23260         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
23261         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23262
23263 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23264
23265         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
23266         Remove workaround macros for hosts that have mbrtowc but not
23267         mbstate_t, as we now insist on proper declarations for both
23268         before using mbrtowc.
23269
23270 2001-02-17  Jim Meyering  <meyering@lucent.com>
23271
23272         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
23273         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23274         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23275         UnixWare 7.1.1.
23276
23277         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23278         rather than AC_CACHE_VAL.
23279
23280 2001-02-17  Jim Meyering  <meyering@lucent.com>
23281
23282         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23283         around included file name.
23284
23285         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23286
23287         * lib/strftime.c: Update from GNU libc (the only changes were to
23288         comments).
23289
23290 2001-02-17  Jim Meyering  <meyering@lucent.com>
23291
23292         * lib/regex.c: Update from libc.
23293
23294 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23295
23296         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23297         clash.
23298
23299 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23300
23301         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23302         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23303         Reported by Mark Hounschell via Paul Eggert.
23304
23305 2001-02-07  Jim Meyering  <meyering@lucent.com>
23306
23307         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23308
23309 2001-02-05  Jim Meyering  <meyering@lucent.com>
23310
23311         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23312         it includes the patch required for `large file' support with at least
23313         HP-UX's 10.20 /bin/cc.
23314
23315 2001-02-03  Jim Meyering  <meyering@lucent.com>
23316
23317         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23318         AS_IF, now that it works once again (mysteriously).
23319         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23320
23321 2001-01-30  Jim Meyering  <meyering@lucent.com>
23322
23323         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23324         * m4/chown.m4: Rename conftestchown to conftest.chown.
23325         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23326         s/conftestdir2/conftest.d2/.
23327         * m4/utimes.m4: s/conftestdata/conftest.data/
23328         Inspired by Pavel Roskin's change in autoconf.
23329
23330 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23331
23332         * lib/config.charset: Update for FreeBSD 4.2.
23333
23334 2001-01-27  Jim Meyering  <meyering@lucent.com>
23335
23336         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23337         a use of AS_IF.
23338         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23339
23340 2001-01-26  Jim Meyering  <meyering@lucent.com>
23341
23342         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23343         quotearg.c includes it.
23344
23345 2001-01-26  Jim Meyering  <meyering@lucent.com>
23346
23347         * lib/quotearg.c: Include stddef.h.
23348         * lib/quote.c: Include stddef.h.
23349         Reported by Axel Kittenberger.
23350
23351         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23352         line in double quotes so that it evokes a better diagnostic.
23353         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23354         Reported by Axel Kittenberger.
23355
23356 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23357
23358         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23359         as if it was a `charset'.
23360
23361 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23362
23363         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23364         has const.
23365
23366 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23367
23368         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23369         to avoid a warning.  Add back 'const' to inptr.
23370
23371 2001-01-20  Jim Meyering  <meyering@lucent.com>
23372
23373         Be sure that headers are checked before used in code compiled
23374         for the type checks.
23375         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23376         In place of that, invoke jm_CHECK_ALL_TYPES.
23377         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23378         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23379         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23380         The check for ssize_t was mistakenly run before the test for unistd.h.
23381
23382         The configure-time check for stdbool.h was missing.
23383         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23384         (jm_PREREQ_HASH): New function.
23385
23386 2001-01-17  Jim Meyering  <meyering@lucent.com>
23387
23388         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23389         for autoconf-2.49c.
23390         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23391
23392 2001-01-16  Jim Meyering  <meyering@lucent.com>
23393
23394         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23395         From Bruno Haible.
23396
23397 2001-01-14  Jim Meyering  <meyering@lucent.com>
23398
23399         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23400         foo and bar.  Create conftestdir/ in the script, not in the C code.
23401         Remove directories in the script, not in the C code.
23402         Remove conftestdir{,2} before trying to create the directory.
23403         Make the entire configure script fail if the mkdir fails.
23404
23405 2001-01-14  Jim Meyering  <meyering@lucent.com>
23406
23407         * lib/rename.c: New file.  From Volker Borchert.
23408         Include stdlib.h, string.h or strings.h, and xalloc.h.
23409         Use strip_trailing_slashes rather than open-coding it.
23410
23411 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23412
23413         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
23414
23415 2001-01-03  Jim Meyering  <meyering@lucent.com>
23416
23417         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
23418         of local `inptr' to avoid warning with some system declarations of
23419         iconv.
23420
23421 2001-01-02  Volker Borchert  <bt@teknon.de>
23422
23423         * m4/rename.m4: New file.
23424         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23425
23426 2001-01-01  Jim Meyering  <meyering@lucent.com>
23427
23428         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23429         even on systems with utmpx.h.  It's necessary for the declaration of
23430         utmp's ut_user member.  Reported by Andreas Jaeger.
23431
23432         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23433         available. They are required for the declarations of getgrgid and
23434         getpwuid resp.
23435         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23436         Reported by Andreas Jaeger.
23437
23438 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
23439
23440         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
23441         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
23442         so `make install' also works in VPATH builds.
23443
23444 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
23445
23446         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
23447         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
23448         can be used in subdirectories.
23449
23450 2000-12-29  Paul Eggert  <eggert@twinsun.com>
23451
23452         * lib/modechange.c: Do not assume that mode_t uses the
23453         traditional octal encoding.  E.g. "chmod 1 FOO" should set
23454         the other-execute bit of FOO even if S_IXOTH != 1.
23455
23456         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23457         WOTH, XOTH, ALLM): New macros.
23458         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
23459          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
23460         Use them.
23461         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
23462         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
23463         (mode_compile):
23464         No need to use uintmax_t; unsigned long is long enough.
23465         Don't bother to get suffix since we don't use it.
23466
23467 2000-12-26  Jim Meyering  <meyering@lucent.com>
23468
23469         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
23470         better with autoheader.
23471
23472 2000-12-24  Jim Meyering  <meyering@lucent.com>
23473
23474         * lib/hash.c (is_prime): Return explicit boolean values.
23475         (hash_get_first): Return NULL to appease Irix5.6's 89.
23476         Reported by Nelson Beebe.
23477
23478 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
23479
23480         * lib/localcharset.c (locale_charset): Add support for Win32.
23481
23482 2000-12-18  Paul Eggert  <eggert@twinsun.com>
23483
23484         * lib/physmem.h, lib/physmem.c: New files.
23485
23486         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23487         (noinst_HEADERS): Add physmem.h.
23488
23489         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23490         't' for compatibility with Solaris 8 sort.
23491
23492 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23493
23494         * lib/config.charset: Add support for BeOS.
23495
23496 2000-12-17  Jim Meyering  <meyering@lucent.com>
23497
23498         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23499         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23500
23501 2000-12-16  Jim Meyering  <meyering@lucent.com>
23502
23503         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23504         N and M) would have treated it like `chown N:N FILE'.
23505
23506         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23507
23508 2000-12-16  Jim Meyering  <meyering@lucent.com>
23509
23510         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23511         SHELLS_FILE to a file name that's useful on djgpp systems.
23512         Include stdlib.h.
23513         (ADDITIONAL_DEFAULT_SHELLS): Define.
23514         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23515         Based mostly on a patch from Prashant TR.
23516
23517 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23518
23519         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23520         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23521         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23522
23523 2000-12-08  Andreas Schwab  <schwab@suse.de>
23524
23525         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23526         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23527
23528 2000-12-07  Jim Meyering  <meyering@lucent.com>
23529
23530         * lib/stripslash.c (ISSLASH): Define.
23531         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23532         `/'.
23533         From Prashant TR.
23534
23535         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23536         (dir_name_r): Declare this function as static.
23537         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23538         manifest itself on a name containing a mix of slashes and
23539         backslashes.
23540         Make this function work with names starting with a DOS-style
23541         drive letter and colon prefix.
23542         (dir_name): Append `.' if necessary.
23543         Based mostly on patches from Prashant TR and Eli Zaretskii.
23544
23545         * lib/dirname.h (dir_name_r): Remove prototype.
23546
23547 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23548
23549         * m4/off_t-format.m4: Remove this file.
23550         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23551
23552 2000-12-06  Jim Meyering  <meyering@lucent.com>
23553
23554         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23555         replacement strtoull, we may well need the replacement strtoul, too.
23556         Check for declarations of strtoul and strtoull.
23557         Check for strtol.  Mainly as a cue to cause automake to include
23558         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23559         Check for limits.h -- strtol.c needs it.
23560
23561 2000-12-05  Jim Meyering  <meyering@lucent.com>
23562
23563         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23564
23565 2000-12-04  Jim Meyering  <meyering@lucent.com>
23566
23567         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23568         Also include memory.h, stdlib.h, unistd.h if appropriate.
23569         Reported by Andreas Jaeger (conflicting declaration of malloc).
23570
23571 2000-12-02  Jim Meyering  <meyering@lucent.com>
23572
23573         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23574         * m4/jm-macros.m4 (jm_MACROS): require it.
23575
23576 2000-12-02  Jim Meyering  <meyering@lucent.com>
23577
23578         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23579
23580 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23581
23582         * lib/memrchr.c: Include <config.h> before any system include file.
23583
23584 2000-11-30  Jim Meyering  <meyering@lucent.com>
23585
23586         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23587
23588 2000-11-30  Jim Meyering  <meyering@lucent.com>
23589
23590         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23591
23592 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23593
23594         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23595
23596 2000-11-26  Jim Meyering  <meyering@lucent.com>
23597
23598         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23599
23600 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23601
23602         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23603         size of (size_t) -1; it's not portable.
23604
23605 2000-11-17  Jim Meyering  <meyering@lucent.com>
23606
23607         * lib/strstr.c: Update from GNU libc.
23608
23609 2000-11-17  Akim Demaille  <akim@epita.fr>
23610
23611         * lib/obstack.h: Formatting changes.
23612         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23613         prevent type checking.
23614         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23615         cast the value to (void *): assigning a `foo *' to a `void *'
23616         variable is valid.
23617         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23618
23619 2000-11-16  Jim Meyering  <meyering@lucent.com>
23620
23621         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23622
23623 2000-11-11  Jim Meyering  <meyering@lucent.com>
23624
23625         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23626
23627 2000-11-10  Jim Meyering  <meyering@lucent.com>
23628
23629         * lib/obstack.h: Update from GNU libc.
23630         * lib/obstack.c: Likewise.
23631
23632 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23633
23634         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23635
23636 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23637
23638         * lib/getusershell.c (setusershell): Use rewind rather than
23639         fseek/fseeko, to avoid configuration hassles with fseeko.
23640         Don't bother opening SHELLS_FILE if shellstream is NULL;
23641         it's not necessary.
23642
23643 2000-11-05  Jim Meyering  <meyering@lucent.com>
23644
23645         * lib/makepath.h (make_dir): Declare.
23646         * lib/makepath.c (make_dir): Remove `static' attribute.
23647         Tweak a comment.
23648
23649 2000-11-04  Jim Meyering  <meyering@lucent.com>
23650
23651         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23652
23653 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23654
23655         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23656         last one in a bucket, advance to the next bucket.
23657
23658 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23659
23660         * lib/fnmatch.c: Do not comment out all the code if we are using
23661         the GNU C library, because in some cases we are replacing buggy
23662         code in the GNU C library itself.
23663
23664 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23665
23666         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23667         (regex_compile): Catch bogus \(\1\).
23668
23669 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23670
23671         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23672         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23673         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23674
23675 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23676
23677         * lib/error.h, getline.h, modechange.h:
23678         Remove "2000" from Copyright line, as the file hasn't been
23679         changed this year other than in the copyright notice.
23680
23681         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23682         was changed this year.
23683
23684 2000-10-29  Jim Meyering  <meyering@lucent.com>
23685
23686         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23687         renaming.
23688         * m4/ls-mntd-fs.m4: Likewise
23689
23690 2000-10-29  Jim Meyering  <meyering@lucent.com>
23691
23692         * lib/xstat.in: Fix grammar in comment.
23693
23694 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23695
23696         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23697         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23698         doesn't define __restrict_arr.
23699
23700 2000-10-28  Jim Meyering  <meyering@lucent.com>
23701
23702         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23703         (jm_PREREQ_MEMCHR): New function.
23704
23705 2000-10-28  Jim Meyering  <meyering@lucent.com>
23706
23707         * lib/memchr.c: Update from libc.
23708         Adjust for portability:
23709         [HAVE_STDLIB_H]: Include stdlib.h.
23710         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23711         Undef __memchr, too.
23712         [!weak_alias]: Define __memchr to memchr.
23713
23714         * lib/regex.c: Update from libc.
23715         * lib/regex.h: Likewise.
23716         * lib/getopt1.c: Likewise.
23717         * lib/memcmp.c: Likewise.
23718
23719         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23720         Avoid using fseek, when possible -- it's broken by design.
23721         Patch by Ulrich Drepper.
23722
23723 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23724
23725         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23726         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23727         Giving in to popular pressure to shut up the compiler with casts.
23728
23729 2000-10-26  Jim Meyering  <meyering@lucent.com>
23730
23731         * lib/strftime.c: Update from libc.
23732
23733 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23734
23735         * regex.c: More `unsigned char' -> `re_char' changes.
23736         Also change several `int' into `re_wchar_t'.
23737         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23738         (PUSH_FAILURE_POINTER): Don't cast any more.
23739         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23740         We want GCC to complain, since this piece of code makes
23741         re_match non-reentrant, which *should* be fixed.
23742         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23743         (EXTEND_BUFFER): Use RETALLOC.
23744         (SET_LIST_BIT): Don't cast.
23745         (re_wchar_t): New type.
23746         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23747         that those two functions will always properly return.
23748         (IMMEDIATE_QUIT_CHECK): Cast to void.
23749         (analyse_first): Use recursion rather than an explicit stack.
23750         (re_compile_fastmap): Can't fail anymore.
23751         (re_search_2): Don't check re_compile_fastmap for failure.
23752         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
23753         Now also sets the new value (passed in a new argument).
23754         (re_match_2_internal): Use it.
23755         Also, use a new var `reg' of type size_t when looping through regs
23756         rather than reuse the inappropriate `mcnt'.
23757
23758 2000-10-25  Jim Meyering  <meyering@lucent.com>
23759
23760         * lib/obstack.c: Update from libc.
23761
23762 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
23763
23764         * regex.c (regex_compile): Change the way of handling a range from
23765         a char less than 256 to a char not less than 256.
23766
23767 2000-10-24  Andrew Innes  <andrewi@gnu.org>
23768
23769         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
23770         NT-Emacs only.
23771         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
23772         so that re_search functions only quit when callers expect them to.
23773
23774 2000-10-23  Jim Meyering  <meyering@lucent.com>
23775
23776         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
23777         wrong.  That set_locale call must not have any side effects.
23778         From Paul Eggert.
23779
23780 2000-10-22  Jim Meyering  <meyering@lucent.com>
23781
23782         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
23783         [CYCLIC]: Remove now-unused definition.
23784
23785         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
23786         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
23787         Suggestion from Ulrich Drepper.
23788
23789 2000-10-21  Jim Meyering  <meyering@lucent.com>
23790
23791         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
23792         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
23793         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
23794
23795 2000-10-21  Jim Meyering  <meyering@lucent.com>
23796
23797         * lib/dirname.c (memrchr): Declare if necessary.
23798         (dir_name): Remove the restriction that there be no
23799         trailing slashes.  Now, this code skips past them, effectively
23800         ignoring them.
23801         [TEST_DIRNAME] (main): New unit tests.
23802
23803         * lib/memrchr.c: New file from GNU libc.
23804         Undef __memrchr, too.
23805         [!weak_alias]: Define __memrchr to memrchr.
23806         Guard weak_alias use with `#ifdef weak_alias'.
23807
23808 2000-10-21  Jim Meyering  <meyering@lucent.com>
23809
23810         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
23811         (dir_name): Use dir_name_r.
23812         * lib/dirname.h (dir_name_r): Declare it.
23813
23814 2000-10-17  Jim Meyering  <meyering@lucent.com>
23815
23816         * lib/quote.h (PARAMS): Define and use.
23817         Reported by Akim Demaille.
23818
23819         * lib/getopt.c: Update from libc.
23820
23821 2000-10-16  Jim Meyering  <meyering@lucent.com>
23822
23823         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
23824         setlocale.
23825         From Jan Fedak.
23826
23827 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
23828
23829         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
23830
23831 2000-09-25  Jim Meyering  <meyering@lucent.com>
23832
23833         * lib/md5.h (rol): Define (from GnuPG).
23834
23835         * lib/sha.c: Give credit (GnuPG) where due.
23836         (M): Use rol rather than open-coding it.
23837         Add a FIXME comment.
23838
23839 2000-09-21  Jim Meyering  <meyering@lucent.com>
23840
23841         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
23842         Reported by Michael Stone.
23843
23844 2000-09-20  Jim Meyering  <meyering@lucent.com>
23845
23846         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
23847         (noinst_HEADERS): Add sha.h.
23848         Based on code from Scott G. Miller and from GnuPG.
23849
23850 2000-09-18  Jim Meyering  <meyering@lucent.com>
23851
23852         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
23853         LIBS. Otherwise, everyone ends up linking with -lelf for some
23854         configurations.
23855         Reported by Mike Stone.
23856
23857 2000-09-15  Jim Meyering  <meyering@lucent.com>
23858
23859         * lib/regex.c: Update from libc.
23860
23861 2000-09-10  Jim Meyering  <meyering@lucent.com>
23862
23863         * lib/getopt.c (_getopt_internal): Update from glibc.
23864
23865 2000-09-09  Jim Meyering  <meyering@lucent.com>
23866
23867         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
23868         think it should be used as a general replacement for isascii.
23869         * lib/fnmatch.c: Likewise.
23870         * lib/mbswidth.c: Likewise
23871         * lib/regex.c: Likewise.
23872
23873         Don't use atoi.
23874         * lib/userspec.c: Include sys/param.h and limits.h.
23875         Include xstrtol.h.
23876         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23877         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
23878         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
23879         UID, GID.  Check range.
23880
23881 2000-09-06  Jim Meyering  <meyering@lucent.com>
23882
23883         * lib/getopt.c (_getopt_internal): Update from glibc.
23884
23885 2000-08-30  Jim Meyering  <meyering@lucent.com>
23886
23887         * lib/strftime.c: Merge in changes from GNU libc.
23888
23889 2000-08-26  Jim Meyering  <meyering@lucent.com>
23890
23891         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
23892         * m4/fpending.m4: New file.
23893
23894 2000-08-26  Jim Meyering  <meyering@lucent.com>
23895
23896         * lib/closeout.c: Include "__fpending.h".
23897         (close_stdout_status): Return right away if there's nothing to flush.
23898
23899         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
23900         * lib/__fpending.c: New file.
23901         * lib/__fpending.h: New file.
23902
23903 2000-08-20  Jim Meyering  <meyering@lucent.com>
23904
23905         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
23906         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
23907         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
23908
23909 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
23910
23911         Improve fileutils installation on systems where running
23912         programs (like install) can't be unlinked.
23913         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
23914         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
23915
23916 2000-08-07  Paul Eggert  <eggert@twinsun.com>
23917
23918         Standardize on "memory exhausted" instead of "Memory exhausted"
23919         or "virtual memory exhausted".
23920         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
23921         "virtual memory exhausted".
23922         * lib/same.c (same_name): Invoke xalloc_die instead of printing
23923         our own message.
23924         * lib/userspec.c (parse_user_spec): Likewise.
23925         * lib/bumpalloc.h: comment fix
23926         * lib/same.c, userspec.c: Include xalloc.h.
23927
23928         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
23929         not char *const and pointing to a constant array.
23930         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
23931         (xrealloc): Comment fix.
23932
23933         * lib/userspec.c (parse_user_spec):
23934         Don't translate a message until just before returning,
23935         to avoid unnecessary translation.
23936
23937 2000-08-07  Jim Meyering  <meyering@lucent.com>
23938
23939         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
23940         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
23941         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
23942         getgroups.c, gethostname.c, getopt.h, group-member.c,
23943         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
23944         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
23945         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
23946         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
23947         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
23948         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
23949         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
23950         yesno.c: Back out Copyright date changes for each file with no change
23951         this year.  This eases coordination with other programs using the same
23952         source code modules.  From Paul Eggert.
23953
23954 2000-08-06  Paul Eggert  <eggert@twinsun.com>
23955
23956         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
23957         not char, for compatibility with glibc 2.1.3 strftime.c.
23958
23959 2000-08-03  Greg McGary  <greg@mcgary.org>
23960
23961         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
23962         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
23963         (EXTEND_BUFFER): Use them.
23964
23965 2000-08-01  Jim Meyering  <meyering@lucent.com>
23966
23967         * lib/dirname.c (ISSLASH): Define.
23968         (BACKSLASH_IS_PATH_SEPARATOR): Define.
23969         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
23970         both `\' and `/' may be use as path separators.
23971         Based on a patch from Prashant TR.
23972
23973 2000-07-31  Paul Eggert  <eggert@twinsun.com>
23974
23975         * lib/quotearg.c (quotearg_n_options): Don't make the initial
23976         slot vector a constant, since it might get modified.
23977
23978 2000-07-31  Jim Meyering  <meyering@lucent.com>
23979
23980         * lib/xmalloc.c: Use `virtual memory exhausted', not
23981         `Memory exhausted'.
23982         * lib/obstack.c (print_and_abort): Likewise.
23983
23984 2000-07-30  Paul Eggert  <eggert@twinsun.com>
23985
23986         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
23987         buffer, so that the caller can always quote one small
23988         component of a "memory exhausted" message in slot 0.
23989         From a suggestion by Jim Meyering.
23990
23991 2000-07-30  Jim Meyering  <meyering@lucent.com>
23992
23993         * lib/makepath.c (make_path): Quote the other instance, too.
23994
23995         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
23996         (STATIC_BUF_SIZE): Define.
23997         (quotearg_n_options): Use only statically allocated storage when
23998         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
23999         than STATIC_BUF_SIZE.
24000
24001 2000-07-29  Jim Meyering  <meyering@lucent.com>
24002
24003         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24004         * lib/dirname.c (dir_name): Likewise.
24005
24006         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24007         `/'.
24008
24009         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24010         (dir_name): Assert that there are no trailing slashes.
24011
24012 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24013
24014         * lib/mbswidth.h (mbswidth): Add a flags argument.
24015         (mbswidth): New declaration.
24016         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24017         * lib/mbswidth.c (mbswidth): Add a flags argument.
24018         (mbsnwidth): New function.
24019
24020 2000-07-24  Jim Meyering  <meyering@lucent.com>
24021
24022         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24023
24024 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24025
24026         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24027
24028 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24029
24030         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24031         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24032         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24033         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24034         invoke multibyte primitives.
24035
24036 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24037
24038         * lib/quotearg.c:
24039         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
24040         so that mbstate_t is always defined.
24041
24042         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
24043         be 1 in at least one GCC installation, and this configuration
24044         error is likely to be common.  Ignoring MB_LEN_MAX hurts
24045         performance on hosts that have mbrtowc but have only unibyte
24046         locales, but I assume these hosts are rare.
24047
24048 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24049
24050         * lib/mbswidth.c (_XOPEN_SOURCE):
24051         Don't define; this causes problems on Solaris 7.
24052         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
24053
24054 2000-07-23  Jim Meyering  <meyering@lucent.com>
24055
24056         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
24057         too: getgrgid, getpwuid, getuid.
24058
24059 2000-07-23  Jim Meyering  <meyering@lucent.com>
24060
24061         * lib/basename.c (base_name): Add an assertion.
24062
24063 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
24064
24065         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
24066         shadow its mbsinit function.
24067
24068 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24069
24070         * lib/mbswidth.h: New file.
24071         * lib/mbswidth.c: New file.
24072         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
24073         (noinst_HEADERS): Add mbswidth.h.
24074
24075 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24076
24077         * lib/config.charset: Add support for FreeBSD. Improve support for
24078         HP-UX and IRIX 6.
24079
24080 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
24081
24082         * m4/mbswidth.m4: New file.
24083         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
24084
24085 2000-07-15  Jim Meyering  <meyering@lucent.com>
24086
24087         * lib/makepath.c: Include quote.h.
24088         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
24089         corresponding argument in a `quote (...)' call.
24090         Give better diagnostics.
24091
24092         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
24093         (noinst_HEADERS): Add quote.h.
24094
24095         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
24096         from tar's src/misc.c.
24097         * lib/quote.h: New file.  Prototypes for same.
24098
24099 2000-07-14  Paul Eggert  <eggert@twinsun.com>
24100
24101         From a suggestion by Bruno Haible.
24102         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
24103         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
24104         to decide whether to define the BeOS workaround macro;
24105         this adjusts to the change to AC_MBSTATE_T.
24106
24107 2000-07-14  Jim Meyering  <meyering@lucent.com>
24108
24109         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
24110         jm_AC_TYPE_UINTMAX_T.
24111
24112 2000-07-13  Paul Eggert  <eggert@twinsun.com>
24113
24114         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
24115
24116         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
24117         quotearg_buffer_restyled): Add support for
24118         clocale_quoting_style.  Undo previous change to
24119         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
24120         and "{RIGHT QUOTATION MARK}" msgids.
24121
24122 2000-07-10  Paul Eggert  <eggert@twinsun.com>
24123
24124         From a suggestion by Bruno Haible.
24125         * m4/mbstate_t.m4 (AC_MBSTATE_T):
24126         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
24127         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
24128         and mbstate_t, to a single-part test that simply defines mbstate_t.
24129         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
24130         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
24131
24132 2000-07-10  Jim Meyering  <meyering@lucent.com>
24133
24134         * m4/strerror_r.m4: Mirror the correction made in autoconf.
24135
24136         * m4/gnu-source.m4: Output to confdefs.h directly.
24137         Suggestion from Akim Demaille.
24138
24139 2000-07-09  Paul Eggert  <eggert@twinsun.com>
24140
24141         The old behavior of quoting `like this' doesn't look good with
24142         newer, ISO-style fonts.  See:
24143         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
24144
24145         Instead, quote "like this" by default.  Let the translator
24146         tailor the locale-specific quoting behavior by providing
24147         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
24148
24149         * lib/quotearg.c (N_): New macro.
24150         (gettext_default): New function.
24151         (quotearg_buffer_restyled): Use
24152         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
24153         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
24154
24155 2000-07-09  Jim Meyering  <meyering@lucent.com>
24156
24157         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
24158         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
24159
24160         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
24161         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
24162
24163 2000-07-09  Jim Meyering  <meyering@lucent.com>
24164
24165         * lib/Most files: Update copyright dates to include 2000.
24166
24167 2000-07-08  Jim Meyering  <meyering@lucent.com>
24168
24169         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
24170         if not defined.
24171         (xgethostname): Remove now-unnecessary #ifdef.
24172         Move declaration of `err' into loop where it's used.
24173
24174 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24175         and Bruno Haible  <haible@clisp.cons.org>
24176
24177         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
24178         only if the test for an object-type mbstate_t fails.  This
24179         prevents us from mistakenly reporting that mbstate_t is a
24180         system object type after we "#define mbstate_t int" to work
24181         around its lack.
24182
24183 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24184         and Bruno Haible  <haible@clisp.cons.org>
24185
24186         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
24187
24188 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24189
24190         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
24191         to strerror_r.
24192         Include <ctype.h> for use of isalpha.
24193
24194 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24195
24196         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
24197         by allocating a larger buffer. Test the gethostname return value for
24198         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
24199         returns an error and ENAMETOOLONG isn't defined.
24200
24201 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24202
24203         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
24204         dimension.
24205
24206 2000-07-04  Jim Meyering  <meyering@lucent.com>
24207
24208         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
24209         of the deprecated AC_CHECKING.
24210
24211 2000-07-04  Jim Meyering  <meyering@lucent.com>
24212
24213         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
24214         Reported by Bruno Haible.
24215
24216 2000-07-04  Jim Meyering  <meyering@lucent.com>
24217
24218         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
24219         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
24220         lacks mbrtowc.
24221
24222 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24223
24224         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
24225         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
24226
24227 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24228         and Bruno Haible  <haible@clisp.cons.org>
24229
24230         * lib/quotearg.c (mbrtowc):
24231         Assign to *pwc, and return 1 only if result is nonzero.
24232         (iswprint): Use ISPRINT when substituting our own mbrtowc.
24233
24234 2000-07-03  Jim Meyering  <meyering@lucent.com>
24235
24236         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
24237
24238 2000-07-03  Jim Meyering  <meyering@lucent.com>
24239
24240         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
24241         This is necessary to get a definition of e.g., UTMP_FILE on
24242         HP-UX 10.20.
24243         From Bob Proulx.
24244
24245 2000-07-02  Jim Meyering  <meyering@lucent.com>
24246
24247         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
24248
24249         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
24250         AC_LIBOBJ(function_name).
24251         * m4/chown.m4: Likewise.
24252         * m4/fnmatch.m4: Likewise.
24253         * m4/ftruncate.m4: Likewise.
24254         * m4/getgroups.m4: Likewise.
24255         * m4/getline.m4: Likewise.
24256         * m4/group-member.m4: Likewise.
24257         * m4/jm-macros.m4: Likewise.
24258         * m4/lstat.m4: Likewise.
24259         * m4/malloc.m4: Likewise.
24260         * m4/memcmp.m4: Likewise.
24261         * m4/nanosleep.m4: Likewise.
24262         * m4/putenv.m4: Likewise.
24263         * m4/realloc.m4: Likewise.
24264         * m4/regex.m4: Likewise.
24265         * m4/stat.m4: Likewise.
24266         * m4/strftime.m4: Likewise.
24267
24268 2000-07-02  Jim Meyering  <meyering@lucent.com>
24269
24270         * lib/quotearg.c (mbstate_t): Don't define here.
24271
24272 2000-07-02  Jim Meyering  <meyering@lucent.com>
24273
24274         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24275
24276 2000-07-01  Jim Meyering  <meyering@lucent.com>
24277
24278         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24279
24280 2000-07-01  Jim Meyering  <meyering@lucent.com>
24281
24282         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24283         problem.
24284
24285 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24286
24287         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24288         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24289
24290 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24291
24292         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24293         per change in ../m4/ls-mntd-fs.m4.
24294         (read_filesystem_list): Ignore symbolic links.
24295
24296 2000-06-29  Jim Meyering  <meyering@lucent.com>
24297
24298         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24299         for declaration of strcmp.
24300
24301         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24302
24303         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24304         Avoid warning by casting result to `char *' to remove `const'.
24305
24306 2000-06-28  Jim Meyering  <meyering@lucent.com>
24307
24308         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24309         included by quotearg.c, for which we perform this test.  From
24310         Bruno Haible.
24311
24312 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24313
24314         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24315         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24316         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24317
24318 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24319
24320         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24321
24322 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24323
24324         savedir now sets errno on failure and invokes xmalloc to get memory.
24325         Fix a couple of other minor bugs while we're at it.
24326
24327         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24328         (NAMLEN): Remove macro.
24329         (malloc, realloc): Remove decls.
24330         (stpcpy): Likewise.
24331         ("xalloc.h"): Include.
24332         (NAME_SIZE_DEFAULT): New macro.
24333         (savedir): Use xmalloc / xrealloc to allocate memory.
24334         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24335         Skip "" directory entries.
24336         Use strlen to calculate directory entry length, since the old method
24337         is rarely used these days and isn't worth supporting.
24338         Don't use a pointer after freeing it.
24339         Check for integer overflow when calculating allocation size.
24340         Use memcpy to copy entries, instead of stpcpy.
24341         Set errno properly when returning NULL.
24342         Check for readdir error.
24343
24344 2000-06-26  Jim Meyering  <meyering@lucent.com>
24345
24346         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24347
24348 2000-06-25  Jim Meyering  <meyering@lucent.com>
24349
24350         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24351         Linux header bug when _XOPEN_SOURCE is defined to 500.
24352
24353 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24354
24355         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24356         deficiency.
24357
24358 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24359
24360         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24361         Include xalloc.h.
24362         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24363
24364 2000-06-24  Jim Meyering  <meyering@lucent.com>
24365
24366         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24367         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24368         for which strerror does return char*, but which lacks a conveniently
24369         accessible declaration of the function.  If the compile-test says
24370         strerror_r doesn't work, then resort to a `run'-test that works on
24371         BeOS and segfaults on DEC Unix.
24372
24373 2000-06-24  Jim Meyering  <meyering@lucent.com>
24374
24375         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24376
24377 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24378
24379         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24380         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24381
24382 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24383
24384         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24385         (mbrtowc, mbstate_t): Define substitutes if
24386         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24387         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24388         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24389
24390 2000-06-23  Jim Meyering  <meyering@lucent.com>
24391
24392         * m4/afs.m4: Add missing AC_MSG_RESULT.
24393         Reported by Bruno Haible.
24394
24395         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24396         Suggestion from Bruno Haible.
24397
24398 2000-06-23  Jim Meyering  <meyering@lucent.com>
24399
24400         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24401
24402 2000-06-21  Jim Meyering  <meyering@lucent.com>
24403
24404         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24405
24406 2000-06-21  Jim Meyering  <meyering@lucent.com>
24407
24408         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24409         (noinst_HEADERS): Add getstr.h.
24410
24411         * lib/getline.c (getstr): Move into a separate file.
24412         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24413         the following changes: new parameter, delim2; both delim[12]
24414         parameters have type `int', not `char'.  The latter would lose
24415         with 8-bit delimiters.
24416         * lib/getstr.h: New file.
24417
24418 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24419
24420         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24421         than 1024, return a memory chunk of least possible size, instead
24422         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24423         Use free/xmalloc instead of xrealloc to avoid copying for very long
24424         paths.
24425
24426 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24427
24428         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24429         the empty string.
24430
24431 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24432
24433         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24434         address, not strdup.  Include <stdlib.h> and don't declare free().
24435
24436 2000-06-19  Jim Meyering  <meyering@lucent.com>
24437
24438         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
24439
24440 2000-06-18  Jim Meyering  <meyering@lucent.com>
24441
24442         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
24443
24444         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
24445         `checking whether...' message to be consistent with that of the
24446         lstat test.
24447
24448 2000-06-18  Jim Meyering  <meyering@lucent.com>
24449
24450         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
24451         Besides, these days every porting target provides a mkdir function.
24452
24453         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
24454         needed. (this snippet comes from src/system.h).
24455
24456 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
24457
24458         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
24459
24460 2000-06-15  Paul Eggert  <eggert@twinsun.com>
24461
24462         * lib/human.c (adjust_value): New function.
24463         (human_readable_inexact): Apply rounding style even when
24464         printing approximate values.
24465
24466 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24467
24468         * lib/human.c (human_readable_inexact): Allow an input block
24469         size that is not a multiple of the output block size, and vice versa.
24470         Reported by Piergiorgio Sartor.
24471
24472 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24473
24474         * lib/getdate.y (get_date): Apply relative times after time
24475         zone indicator, not before.  Reported by Todd A. Jacobs.
24476
24477 2000-06-13  Jim Meyering  <meyering@lucent.com>
24478
24479         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
24480
24481         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
24482
24483 2000-06-12  Paul Eggert  <eggert@twinsun.com>
24484
24485         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24486
24487 2000-06-12  Jim Meyering  <meyering@lucent.com>
24488
24489         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24490         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24491         optional argument.
24492         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24493         the optional argument, `lib'.
24494
24495 2000-06-08  Jim Meyering  <meyering@lucent.com>
24496
24497         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24498
24499 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24500
24501         Rewrite largefile configuration so that we don't need to run
24502         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24503         AC_CANONICAL_HOST in configure.in -- jmm]
24504
24505         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24506         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24507         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24508         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24509         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24510         All uses changed.
24511         Instead of inspecting the output of getconf, try to compile the
24512         test program without and with the macro definition.
24513         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24514         for getconf.  Instead, check for the needed flags by compiling
24515         test programs.
24516
24517 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24518
24519         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24520
24521 2000-06-04  Jim Meyering  <meyering@lucent.com>
24522
24523         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24524         SunOS 4.1.4 for which gid_t is an unsigned type.
24525
24526 2000-06-03  Jim Meyering  <meyering@lucent.com>
24527
24528         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24529         now that autoconf requires that.
24530
24531         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24532         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24533         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24534
24535 2000-06-03  Jim Meyering  <meyering@lucent.com>
24536
24537         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24538
24539 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24540
24541         * m4/glibc21.m4: New file.
24542         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24543
24544 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24545
24546         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24547         newer, don't install charset.alias.
24548         * lib/config.charset: Change the Linux/glibc rules so they become empty
24549         on glibc-2.1 or newer.
24550
24551 2000-06-02  Jim Meyering  <meyering@lucent.com>
24552
24553         * lib/mountlist.c: Back out last change.  Instead, do this...
24554         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24555         me_dummy member using the same `ignore'-testing code.
24556         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24557         fs_type strings.
24558         From Mark D. Roth.
24559
24560 2000-05-29  Jim Meyering  <meyering@lucent.com>
24561
24562         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24563         mounts with the `ignore' attribute.  Based on a patch from
24564         Mark D. Roth.
24565
24566 2000-05-28  Jim Meyering  <meyering@lucent.com>
24567
24568         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24569         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24570         * m4/stat.m4: Likewise.
24571         * m4/lstat.m4: Likewise.
24572         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24573
24574         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24575         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24576
24577 2000-05-26  Jim Meyering  <meyering@lucent.com>
24578
24579         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24580
24581 2000-05-24  Jim Meyering  <meyering@lucent.com>
24582
24583         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24584         autoconf requires that.
24585         * m4/lib-check.m4: Likewise.
24586         * m4/jm-macros.m4: Likewise.
24587         * m4/strftime.m4: Likewise.
24588
24589         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24590         AC_CHECK_DECLS, now that autoconf requires that.
24591
24592 2000-05-22  Jim Meyering  <meyering@lucent.com>
24593
24594         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24595         * m4/lstat.m4: Likewise.
24596
24597 2000-05-22  Jim Meyering  <meyering@lucent.com>
24598
24599         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24600
24601 2000-05-20  Jim Meyering  <meyering@lucent.com>
24602
24603         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24604         (jm_PREREQ): Use it.
24605
24606 2000-05-18  Jim Meyering  <meyering@lucent.com>
24607
24608         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24609         back, too, since it may have been modified by allocate_entry.
24610         (hash_delete): Rewrite to use neither the assignment operator
24611         nor the comma operator in an if-expression.
24612
24613 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24614
24615         * lib/closeout.c:
24616         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24617         Remove; no longer needed.
24618         "quotearg.h": Add include.
24619         (file_name): Do not bother to explicitly initialize to NULL; it's less
24620         efficient on some hosts.
24621         (close_stdout_status): Remove test as to whether stdout was already
24622         closed; it breaks for the case "echo x | sort >&-".
24623         Quote file name colons.
24624         Do not assume that _("write error") lacks format strings.
24625
24626 2000-05-15  Jim Meyering  <meyering@lucent.com>
24627
24628         * lib/version-etc.c (version_etc_copyright): Update the copyright
24629         string used in all --version output.
24630
24631 2000-05-14  Jim Meyering  <meyering@lucent.com>
24632
24633         * lib/closeout.c (close_stdout_set_file_name): New function.
24634         (close_stdout_status): Use new file-scoped global.
24635         Return right away if fstat says the stdout file descriptor is invalid.
24636         * lib/closeout.h (close_stdout_set_file_name): Declare.
24637
24638 2000-05-10  Jim Meyering  <meyering@lucent.com>
24639
24640         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24641         (close_stdout_set_status): New function.
24642         * lib/closeout.h (close_stdout_set_status): Declare.
24643
24644 2000-05-09  Jim Meyering  <meyering@lucent.com>
24645
24646         * m4/gettext.m4: Rename this...
24647         * m4/libintl.m4: ...to this.
24648
24649 2000-05-08  Jim Meyering  <meyering@lucent.com>
24650
24651         * lib/long-options.c: Don't include closeout.h.
24652         (parse_long_options): Don't call close_stdout for --version.
24653
24654 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24655
24656         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24657         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24658         2.1.3 bug.  This avoids a clash when files like regex.c define
24659         _GNU_SOURCE.
24660
24661 2000-05-06  Jim Meyering  <meyering@lucent.com>
24662
24663         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24664         (AC_REPLACE_FUNCS): Add strnlen.
24665
24666         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24667         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24668
24669         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24670         AC_SEARCH_LIBS call for nanosleep.
24671         (LIB_NANOSLEEP): Set and AC_SUBST.
24672
24673 2000-05-06  Jim Meyering  <meyering@lucent.com>
24674
24675         * lib/strnlen.c: Undefine __strnlen and strnlen.
24676         [!weak_alias]: Define __strnlen to strnlen.
24677
24678         * lib/atexit.c: New file, from libiberty.
24679
24680 2000-05-06  Jim Meyering  <meyering@lucent.com>
24681
24682         * lib/closeout.c (close_stdout_status): Also check for errors on the
24683         stderr stream.
24684
24685 2000-05-05  Jim Meyering  <meyering@lucent.com>
24686
24687         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24688         AC_SEARCH_LIBS call for clock_gettime.
24689         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24690
24691         * m4/search-libs.m4: Update from autoconf.
24692
24693         su doesn't work on Solaris 2.6.
24694         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24695         <shadow.h>.  Reported by Dragos Harabor.
24696
24697 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24698
24699         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24700         memcpy instead of xmalloc, xrealloc, path_concat.
24701         (locale_charset): Treat empty environment variables as absent.
24702         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24703
24704 2000-05-04  Jim Meyering  <meyering@lucent.com>
24705
24706         * lib/getopt.c: Update from glibc.
24707         * lib/obstack.c: Likewise.
24708         * lib/obstack.h: Likewise.
24709         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24710         file
24711
24712         * lib/regex.h: Likewise.
24713         * lib/strndup.c: Likewise.
24714         * lib/strnlen.c: New file, from glibc.
24715
24716 2000-05-03  Jim Meyering  <meyering@lucent.com>
24717
24718         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24719
24720 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24721
24722         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24723         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24724         compile-time test, rather than inspecting host and OS, to
24725         decide whether to define _LARGEFILE_SOURCE.
24726
24727 2000-05-01  Jim Meyering  <meyering@lucent.com>
24728
24729         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24730
24731         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24732         Based on a patch from Bruno Haible.
24733
24734 2000-05-01  Jim Meyering  <meyering@lucent.com>
24735
24736         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24737
24738 2000-04-29  Jim Meyering  <meyering@lucent.com>
24739
24740         * lib/path-concat.c: Declare strdup only if it's not defined.
24741         * lib/canon-host.c: Likewise.
24742
24743 2000-04-28  Jim Meyering  <meyering@lucent.com>
24744
24745         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24746         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24747         is included first, then limits.h is included by locale.h by libintl.h.
24748         From John David Anglin.
24749
24750 2000-04-25  Jim Meyering  <meyering@lucent.com>
24751
24752         * lib/makepath.c (S_IRWXUGO): Define.
24753         (make_path): Always perform explicit chmod if MODE specifies any
24754         of the `special' permission bits.  Prompted by a bug report against
24755         install from Mate Wierdl and Joost van Baal.
24756
24757 2000-04-18  Jim Meyering  <meyering@lucent.com>
24758
24759         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
24760         (jm_PREREQ): Use it.
24761
24762 2000-04-18  Jim Meyering  <meyering@lucent.com>
24763
24764         * lib/README: New file.
24765
24766         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
24767         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
24768
24769 2000-04-17  Jim Meyering  <meyering@lucent.com>
24770
24771         Get it right :-)
24772         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
24773         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
24774         Suggestion from Akim Demaille.
24775
24776 2000-04-17  Jim Meyering  <meyering@lucent.com>
24777
24778         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
24779         the definition of it to rpl_strftime also defined-away the system's
24780         declaration.
24781
24782 2000-04-15  Jim Meyering  <meyering@lucent.com>
24783
24784         Use `C' to denote so-called `contiguous' files, the same way
24785         that tar does.
24786         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
24787         (ftypelet): Use S_ISCTG.
24788         From Michael Deutschmann.
24789
24790 2000-04-14  Jim Meyering  <meyering@lucent.com>
24791
24792         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
24793         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
24794         clobbered.
24795
24796 2000-04-14  Jim Meyering  <meyering@lucent.com>
24797
24798         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
24799
24800 2000-04-13  Jim Meyering  <meyering@lucent.com>
24801
24802         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
24803         AH_VERBATIM to insert required #ifndef into config.h.in.
24804         Suggestion from Akim Demaille.
24805
24806 2000-04-12  Jim Meyering  <meyering@lucent.com>
24807
24808         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
24809         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
24810         Christian Krackowizer.
24811
24812         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
24813         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
24814         (AC_SYS_LARGEFILE): Require.
24815         (AM_C_PROTOTYPES): Require.
24816
24817 2000-04-08  Jim Meyering  <meyering@lucent.com>
24818
24819         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
24820         names don't conflict.  Reported by Eli Zaretskii.
24821
24822 2000-04-07  Jim Meyering  <meyering@lucent.com>
24823
24824         * lib/putenv.c: Move inclusion of errno.h so it follows that of
24825         sys/types.h, to work around system header problems on AIX 3.2.5.
24826         From Bruno Haible.
24827
24828 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
24829
24830         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
24831         bug.  Deal with the different error behavior of Irix iconv.
24832
24833 2000-04-05  Paul Eggert  <eggert@twinsun.com>
24834
24835         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
24836         IRIX if the installer said otherwise.
24837
24838 2000-04-05  Jim Meyering  <meyering@lucent.com>
24839
24840         Portability tweaks required for ultrix4.3.
24841         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
24842         (jm_CHECK_DECLS): Add getutent to the list of functions.
24843         (_jm_DECL_HEADERS): Add utmpx.h.
24844         From John David Anglin.
24845
24846         * m4/strftime.m4: Back out the 2000-04-02 change.
24847         Instead of that change, simply undefine putenv in the test program.
24848
24849 2000-04-05  Jim Meyering  <meyering@lucent.com>
24850
24851         Portability tweaks required for ultrix4.3.
24852         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
24853         getutent.
24854         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
24855         * lib/canon-host.c: Declare strdup.
24856         * lib/path-concat.c: Likewise.
24857         From John David Anglin.
24858
24859 2000-04-04  Jim Meyering  <meyering@lucent.com>
24860
24861         Be more DOS 8.3-friendly.
24862         * lib/ref-add.sin: Renamed from ref-add.sed.in.
24863         * lib/ref-del.sin: Renamed from ref-del.sed.in.
24864         * lib/Makefile.am: Reflect renaming.
24865         Reported by Eli Zaretskii.
24866
24867         Use a temporary file name that won't clash with `charset.alias'
24868         in the DOS 8.3 name space.
24869         * lib/Makefile.am (charset_tmp): Define.
24870         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
24871         (uninstall-local): Likewise.
24872         Reported by Eli Zaretskii.
24873
24874 2000-04-03  Jim Meyering  <meyering@lucent.com>
24875
24876         * m4/gettext.m4: Fix typo in comment.
24877
24878         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
24879         textutils/configure.in).  Suggestion from Paul Eggert.
24880         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
24881
24882 2000-04-02  Paul Eggert  <eggert@twinsun.com>
24883
24884         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
24885         variable in the shell rather than using putenv, which isn't
24886         portable.  This avoids the configure-time inter-test dependency
24887         on the potentially-renamed putenv function.
24888
24889 2000-03-30  Paul Eggert  <eggert@twinsun.com>
24890
24891         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
24892         before checking struct stat.st_blksize, so that
24893         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
24894
24895 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24896
24897         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
24898         since strftime.c uses HAVE_STRFTIME to decide whether to use
24899         the underlying strftime.
24900
24901 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24902
24903         * lib/time/strftime.c (my_strftime): Make sure we call the system
24904         strftime, not ourselves, when invoking the underlying strftime.
24905
24906 2000-03-24  Jim Meyering  <meyering@lucent.com>
24907
24908         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
24909         (charset_alias): Define.
24910         (install-exec-local): Factor out common code.
24911         (uninstall-local): Split lines longer than 80.
24912         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
24913         (SUFFIXES): Define.
24914         (.sed.in.sed): New rule.  Don't redirect directly to $@.
24915         (CLEANFILES): Add ref-add.sed and ref-del.sed.
24916
24917 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
24918
24919         * lib/config.charset: Output a line containing "Packages using this
24920         file".
24921         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
24922         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
24923         ref-del.sed): New rules.
24924
24925 2000-03-17  Jim Meyering  <meyering@lucent.com>
24926
24927         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
24928         Otherwise, include <strings.h>
24929
24930 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
24931
24932         * lib/unicodeio.c (utf8_wctomb): New function.
24933         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
24934         format instead of in UCS-4 with platform dependent endianness.
24935
24936 2000-03-10  Jim Meyering  <meyering@lucent.com>
24937
24938         * m4/lib-check.m4: Look for getspnam in -lgen, too.
24939         From Marco Franzen.
24940
24941 2000-03-07  Paul Eggert  <eggert@twinsun.com>
24942
24943         * lib/savedir.c (savedir): Work even if directory size is
24944         negative; this can happen with some screwy NFS configurations.
24945
24946 2000-03-06  Jim Meyering  <meyering@lucent.com>
24947
24948         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
24949         if it's NULL (because we ran out of memory).  From Bruno Haible.
24950
24951 2000-03-05  Jim Meyering  <meyering@lucent.com>
24952
24953         * lib/localcharset.c ("path-concat.h"): Include.
24954         (get_charset_aliases): Use path_concat instead of ANSI string
24955         concatenation.
24956
24957         * lib/unicodeio.h (PARAMS): Define.
24958         Use it to guard prototype.
24959
24960 2000-03-04  Jim Meyering  <meyering@lucent.com>
24961
24962         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
24963         for lib/localcharset.c.
24964
24965 2000-03-04  Jim Meyering  <meyering@lucent.com>
24966
24967         * lib/Makefile.am (install-exec-local): Create $(libdir) before
24968         installing into it.
24969         (uninstall-local): Uncomment this rule so `make distcheck' works
24970         once again.
24971
24972         * lib/unicodeio.c (<errno.h>): Include it.
24973         (errno): Declare if not defined.
24974
24975         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
24976
24977         * lib/config.charset: New version, incorporating remarks from a linux
24978         i18n mailing list.  From Bruno Haible.
24979
24980 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
24981
24982         * m4/codeset.m4: New file.
24983         * m4/iconv.m4: New file.
24984         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
24985
24986 2000-03-03  Jim Meyering  <meyering@lucent.com>
24987
24988         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
24989
24990 2000-03-02  Jim Meyering  <meyering@lucent.com>
24991
24992         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
24993         the messages come out on separate lines.
24994
24995         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
24996         rather than jm_CHECK_DECLARATIONS.
24997         * m4/decl.m4: Remove now-unused file.
24998
24999         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25000         geteuid.
25001
25002 2000-03-02  Jim Meyering  <meyering@lucent.com>
25003
25004         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25005
25006 2000-03-01  Jim Meyering  <meyering@lucent.com>
25007
25008         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25009         * lib/unicodeio.c: Likewise.
25010
25011 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25012
25013         * lib/config.charset: New file.
25014         * lib/localcharset.c: New file.
25015         * lib/unicodeio.h, lib/unicodeio.c: New files.
25016         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25017         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25018         (noinst_HEADERS): Add unicodeio.h.
25019         (all-local, install-exec-local, charset.alias): New targets.
25020
25021 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25022
25023         * lib/quotearg.c (ALERT_CHAR): New macro.
25024         (quotearg_buffer_restyled): Use it.
25025
25026 2000-02-27  Jim Meyering  <meyering@lucent.com>
25027
25028         * m4/check-decl.m4: Add getenv to the list.
25029
25030 2000-02-27  Jim Meyering  <meyering@lucent.com>
25031
25032         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25033         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25034
25035         * lib/backupfile.c: Guard inclusion of stdlib.h with
25036         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25037         Declare malloc if needed.
25038
25039         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
25040         `#ifndef HAVE_DECL..'
25041         now that autoconf always defines the HAVE_DECL_ symbols.
25042         * lib/human.c: Likewise.
25043         * lib/same.c: Likewise.
25044         * lib/strtoumax.c: Likewise.
25045
25046         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
25047         declaration check was not run.
25048         * lib/hash.c: Likewise.
25049         * lib/human.c: Likewise.
25050         * lib/same.c: Likewise.
25051         * lib/strtoumax.c: Likewise.
25052
25053         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
25054         `.', then first look up the entire `.'-containing string as a login
25055         name.
25056
25057 2000-02-23  Jim Meyering  <meyering@lucent.com>
25058
25059         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
25060         in place of my hack.
25061
25062 2000-02-18  Paul Eggert  <eggert@twinsun.com>
25063
25064         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
25065         (textint): New typedef.
25066         (parser_control): Member year changed from int to textint.
25067         All uses changed.
25068         (YYSTYPE): Removed; replaced by %union with int and textint members.
25069         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
25070         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
25071         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
25072         (tSNUMBER, tUNUMBER): Now of type <textintval>.
25073         (date, number, to_year): Use width of number in digits, not its value,
25074         to determine whether it's a 2-digit year, or a 2-digit time.
25075         (yylex): Store number of digits of numeric tokens.
25076         Reported by John Kendall.
25077
25078         (parser_control): Changed from struct parser_control to typedef (for
25079         consistency).  All uses changed.
25080
25081         (tID): Removed; not used.
25082         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
25083
25084 2000-02-14  Paul Eggert  <eggert@twinsun.com>
25085
25086         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
25087         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
25088
25089 2000-02-12  Jim Meyering  <meyering@lucent.com>
25090
25091         * lib/userspec.c (ISDIGIT): Define it.
25092         (isdigit): Remove definition.
25093         (is_number): Use ISDIGIT, not isdigit.
25094         <libintl.h>: Include.
25095         (_ and N_): Define.
25096         (parse_user_spec): Mark translatable strings.
25097
25098 2000-02-10  Jim Meyering  <meyering@lucent.com>
25099
25100         With these changes, nanosleep.[ch] are finally enough like the other
25101         lib/* replacement files to compile on a few more losing systems.
25102
25103         * lib/nanosleep.h: Don't include config.h.
25104         Remove prototype from declaration of nanosleep.
25105         (PARAMS): Remove now-unneeded definition.
25106         * lib/nanosleep.c: #undef nanosleep.
25107         (rpl_nanosleep): Rename from nanosleep.
25108
25109 2000-02-10  Jim Meyering  <meyering@lucent.com>
25110
25111         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
25112         gnu_nanosleep to rpl_nanosleep.
25113
25114 2000-02-09  Jim Meyering  <meyering@lucent.com>
25115
25116         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
25117         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
25118
25119 2000-02-08  Akim Demaille  <akim@epita.fr>
25120
25121         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
25122         `[' and `]' and remove uses of `changequote'.
25123         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
25124         (AC_SYS_LARGEFILE): Likewise.
25125         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
25126         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
25127         of changequote.
25128         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
25129         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
25130         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
25131         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
25132
25133 2000-02-05  Jim Meyering  <meyering@lucent.com>
25134
25135         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
25136         Remove explicit use of AC_HEADER_TIME.  It is required by
25137         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
25138         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
25139         in autoconf whereby the expansion of the latter ended up preceding
25140         the expansion of its prerequisite, AC_HEADER_TIME.
25141         Reported by Volker Borchert.
25142
25143 2000-02-03  Jim Meyering  <meyering@lucent.com>
25144
25145         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
25146
25147 2000-02-03  Jim Meyering  <meyering@lucent.com>
25148
25149         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
25150         rather than with `#if HAVE_UTMPNAME'.
25151
25152 2000-02-02  Jim Meyering  <meyering@lucent.com>
25153
25154         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
25155         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
25156         Reported by Eli Zaretskii.
25157
25158 2000-02-01  Jim Meyering  <meyering@lucent.com>
25159
25160         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
25161
25162 2000-01-31  Jim Meyering  <meyering@lucent.com>
25163
25164         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
25165         functions.  Add the time.h and sys/time.h headers along with the
25166         AC_REQUIRE'ment of AC_HEADER_TIME.
25167
25168 2000-01-31  Jim Meyering  <meyering@lucent.com>
25169
25170         * lib/nanosleep.h (nanosleep): Guard declaration with
25171         `#if ! HAVE_DECL_NANOSLEEP'.
25172         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
25173         the declaration in that vendor's sys/timers.h.
25174         Reported by Christian Krackowizer.
25175
25176         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
25177         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
25178         (ISPRINT): Likewise.
25179         Reported by Tom Tromey.
25180
25181 2000-01-30  Jim Meyering  <meyering@lucent.com>
25182
25183         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
25184
25185         * m4/prereq.m4 (utmp_includes): Define.
25186         Check for ut_user and ut_name members in both struct utmpx
25187         and struct utmp.
25188
25189 2000-01-30  Jim Meyering  <meyering@lucent.com>
25190
25191         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
25192         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
25193         header files where only utmpx.ut_user is declared.
25194
25195         * lib/readutmp.h (UT_USER): Define.
25196
25197 2000-01-29  Jim Meyering  <meyering@lucent.com>
25198
25199         * m4/lib-check.m4: New file containing library-related checks from
25200         fileutils and sh-utils (textutils had none).
25201
25202 2000-01-28  Jim Meyering  <meyering@lucent.com>
25203
25204         * m4/perl.m4: Change format of warning message to look more like that
25205         from the missing script.  Suggestion from François Pinard.
25206
25207 2000-01-25  Jim Meyering  <meyering@lucent.com>
25208
25209         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
25210         well as time.h in the compile check.
25211         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
25212         Fix typo in cross-compiling case: s/yes/no/.
25213
25214 2000-01-23  Jim Meyering  <meyering@lucent.com>
25215
25216         * m4/jm-macros.m4: Move df-related tests here from
25217         fileutils/configure.in
25218
25219         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
25220         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
25221
25222         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
25223         s/space/ac_fsusage_space/.
25224         (jm_FILE_SYSTEM_USAGE): Take two parameters.
25225
25226         * m4/ftruncate.m4: New file (derived from part of
25227         fileutils/configure.in).
25228         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
25229         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
25230
25231         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
25232         AC_SUBST these here, rather than just in sh-util/configure.in, so
25233         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
25234         all the same.
25235         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
25236         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
25237         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
25238         (AC_SUBST(POW_LIBM)): Likewise.
25239         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
25240
25241 2000-01-23  Jim Meyering  <meyering@lucent.com>
25242
25243         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
25244         obstack.c.
25245
25246 2000-01-22  Jim Meyering  <meyering@lucent.com>
25247
25248         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
25249
25250         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
25251
25252         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
25253         configure.in
25254         (AC_CHECK_HEADERS): Likewise for sh-utils.
25255         (AC_CHECK_HEADERS): Likewise for textutils.
25256         Merge the three lists of headers.
25257
25258         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
25259         from fileutils' configure.in.
25260
25261         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
25262         code. Moved tests into their own function (_jm_DECL_HEADERS) in
25263         check-decl.m4.
25264
25265         * m4/check-decl.m4: Use #if rather than #ifdef.
25266         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
25267         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
25268         (_jm_DECL_HEADERS): Define new function.
25269         (jm_CHECK_DECLARATIONS): Require it.
25270
25271 2000-01-22  Jim Meyering  <meyering@lucent.com>
25272
25273         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25274         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25275         Required for some AIX systems.  Reported by Christian Krackowizer.
25276         [TESTING] (main): New function.
25277
25278         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25279         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25280         letters.
25281
25282         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25283         iswprint.
25284
25285         * lib/strverscmp.c (ISDIGIT): Define.
25286         (strverscmp): Use ISDIGIT, not isdigit.
25287
25288 2000-01-19  Jim Meyering  <meyering@lucent.com>
25289
25290         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25291         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25292         defines `struct timespec' in <sys/time.h>
25293
25294         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25295         Thanks to Akim for explaining.
25296
25297 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25298
25299         * lib/nanosleep.c (nanosleep):
25300         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25301         POSIX.1 doesn't require SA_INTERRUPT and some systems
25302         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25303         it's been part of POSIX.1 since day 1 (in 1988).
25304
25305 2000-01-17  Jim Meyering  <meyering@lucent.com>
25306
25307         * lib/interlock: Remove unused file.  Reported by François Pinard.
25308
25309 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25310
25311         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25312         alert, backslash, formfeed, and vertical tab unnecessarily in
25313         shell quoting style.
25314
25315 2000-01-16  Jim Meyering  <meyering@lucent.com>
25316
25317         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25318         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25319         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25320         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25321
25322 2000-01-16  Jim Meyering  <meyering@lucent.com>
25323
25324         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25325         because the latter didn't work.
25326
25327 2000-01-15  Jim Meyering  <meyering@lucent.com>
25328
25329         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25330         (AC_REPLACE_FUNCS): Add memcpy and memset.
25331         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25332         Add strpbrk.
25333         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25334
25335 2000-01-12  Jim Meyering  <meyering@lucent.com>
25336
25337         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25338         (jm_PREREQ): Use it.
25339         (jm_PREREQ_READUTMP): New macro.
25340         (jm_PREREQ): Use it.
25341
25342 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25343
25344         Quote multibyte characters correctly.
25345         * m4/c-bs-a.m4: New file.
25346         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25347         (jm_PREREQ): Use it.
25348
25349 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25350
25351         * m4/uintmax_t.m4: Port to autoconf 2.13.
25352
25353 2000-01-08  Jim Meyering  <meyering@ascend.com>
25354
25355         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25356         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25357
25358 2000-01-04  Jim Meyering  <meyering@ascend.com>
25359
25360         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25361         jm_STRUCT_DIRENT_D_TYPE.
25362         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25363         jm_STRUCT_DIRENT_D_INO.
25364         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25365         jm_STRUCT_UTIMBUF.
25366         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25367         renamings.
25368         * m4/utime.m4: Likewise.
25369
25370         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25371         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25372
25373 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25374
25375         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25376         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25377
25378 2000-01-02  Jim Meyering  <meyering@ascend.com>
25379
25380         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25381         remember if this is necessary.
25382
25383 1999-12-26  Jim Meyering  <meyering@ascend.com>
25384
25385         * m4/jm-macros.m4: Use it here.
25386         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25387
25388 1999-12-23  Jim Meyering  <meyering@ascend.com>
25389
25390         * m4/jm-macros.m4: Check for clock_gettime (moved from
25391         fileutils/configure.in)
25392         Check for gettimeofday.
25393
25394 1999-12-20  Jim Meyering  <meyering@ascend.com>
25395
25396         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25397         autoconf-2.14a-1999-12-20.
25398
25399 1999-12-19  Jim Meyering  <meyering@ascend.com>
25400
25401         * m4/lstat-slash.m4: New file.
25402         * m4/jm-macros.m4: Use the new macro:
25403         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25404
25405 1999-12-07  Jim Meyering  <meyering@ascend.com>
25406
25407         * m4/perl.m4: Require that File::Compare be available, too.
25408         Too many systems seem to lack it.
25409
25410         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25411         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25412
25413 1999-11-18  Paul Eggert  <eggert@twinsun.com>
25414
25415         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
25416         problem with the QNX 4.25 shell, which doesn't propagate exit
25417         status of failed commands inside shell assignments.
25418
25419 1999-11-17  Jim Meyering  <meyering@ascend.com>
25420
25421         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25422
25423 1999-11-07  Jim Meyering  <meyering@ascend.com>
25424
25425         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25426
25427 1999-11-06  Jim Meyering  <meyering@ascend.com>
25428
25429         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25430         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25431
25432 1999-11-05  Jim Meyering  <meyering@ascend.com>
25433
25434         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25435         configure.in of textutils, fileutils, and sh-utils into this one
25436         (shared between those packages) file.
25437         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
25438         AC_STRUCT_ST_BLKSIZE.
25439
25440 1999-11-03  Jim Meyering  <meyering@ascend.com>
25441
25442         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
25443         of AC_CHECK_TYPE checks includes unistd.h.
25444         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
25445         Suggestion from Akim Demaille.
25446
25447 1999-10-30  Jim Meyering  <meyering@ascend.com>
25448
25449         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
25450         m4-quoted string.
25451         * m4/ls-mntd-fs.m4: Likewise.
25452         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
25453         * m4/jm-winsz1.m4: Likewise.
25454
25455         * m4/const.m4: Remove file, since the fix made it into the experimental
25456         version of autoconf.
25457         * m4/mktime.m4: Likewise.
25458
25459         * m4/check-type.m4: Remove file, now that the latest version of
25460         AC_CHECK_TYPE takes a third arg to specify additional #includes.
25461
25462         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
25463         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
25464         AC_CHECK_TYPE.
25465
25466 1999-10-04  Jim Meyering  <meyering@ascend.com>
25467
25468         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
25469
25470 1999-09-22  Paul Eggert  <eggert@twinsun.com>
25471
25472         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
25473         2.95.1 bug with HP-UX 10.20.
25474
25475 1999-09-17  Jim Meyering  <meyering@ascend.com>
25476
25477         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
25478         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
25479         due to missing strdup (against sh-utils-2.0).
25480
25481 1999-08-29  Jim Meyering  <meyering@ascend.com>
25482
25483         * m4/jm-macros.m4: Require jm_BISON.
25484         * m4/bison.m4: New file.
25485
25486 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25487
25488         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25489         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25490
25491 1999-08-05  Jim Meyering  <meyering@ascend.com>
25492
25493         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25494         to avoid conflicts with `conftest' on 8+3 filesystems.
25495         Suggestion from Eli Zaretskii.
25496
25497 1999-08-04  Jim Meyering  <meyering@ascend.com>
25498
25499         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25500         fileutils and sh-utils (textutils's getline test was inadequate).
25501         (AM_FUNC_GETLINE): Run this test.
25502         (AC_CHECK_FUNCS): Check for getdelim.
25503         Reported by Bob Proulx.
25504
25505 1999-08-02  Jim Meyering  <meyering@ascend.com>
25506
25507         * m4/jm-macros.m4: Add a comment.
25508
25509 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25510
25511         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25512         <inttypes.h> defines strtoumax as a macro (and not as a
25513         function).
25514
25515 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25516
25517         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25518         that we can shift, multiply and divide unsigned long long
25519         values; Ultrix cc can't do it.
25520
25521 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25522
25523         * m4/mktime.m4: New file, which is a preview of what should appear
25524         in the next public autoconf release.
25525
25526 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25527
25528         * m4/lfs.m4: Remove this file.
25529         * m4/largefile.m4: New file.  It contains the old contents of
25530         lfs.m4, except that all names with prefix AC_LFS have been
25531         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25532         compatible with future autoconf versions.  Also, some minor m4
25533         quoting problems have been fixed.
25534
25535 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25536
25537         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25538         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25539         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25540         and simplify the shell code.
25541
25542 1999-08-01  Jim Meyering  <meyering@ascend.com>
25543
25544         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25545         m4.
25546
25547 1999-07-20  Jim Meyering  <meyering@ascend.com>
25548
25549         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25550
25551 1999-07-15  Jim Meyering  <meyering@ascend.com>
25552
25553         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25554
25555 1999-05-22  Jim Meyering  <meyering@ascend.com>
25556
25557         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25558
25559 1999-05-20  Jim Meyering  <meyering@ascend.com>
25560
25561         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25562         Add a colon after each `then' in case $4 is empty.
25563
25564 1999-05-16  Jim Meyering  <meyering@ascend.com>
25565
25566         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25567
25568 1999-05-10  Jim Meyering  <meyering@ascend.com>
25569
25570         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25571
25572         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25573         AC_FUNC_MKTIME.
25574
25575 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25576
25577         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25578
25579 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25580
25581         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25582         not CPPFLAGS, so that linking works correctly in IRIX.
25583
25584 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25585
25586         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25587
25588 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25589
25590         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25591         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25592         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25593         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25594         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25595
25596         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25597
25598 1999-04-20  Jim Meyering  <meyering@ascend.com>
25599
25600         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25601         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25602         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25603
25604 1999-04-18  Jim Meyering  <meyering@ascend.com>
25605
25606         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25607         * m4/jm-macros.m4: Use it.
25608
25609 1999-04-06  Jim Meyering  <meyering@ascend.com>
25610
25611         * m4/strftime.m4: Remove test for %f.
25612
25613 1999-03-29  Jim Meyering  <meyering@ascend.com>
25614
25615         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25616         superset of the AC_TYPE_* checks in the textutils, fileutils,
25617         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25618         AC_TYPE_PID_T.
25619
25620 1999-03-28  Jim Meyering  <meyering@ascend.com>
25621
25622         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25623         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25624         replaced e.g., in the *.sh files of the sh-utils.
25625
25626 1999-03-20  Jim Meyering  <meyering@ascend.com>
25627
25628         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25629         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25630         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25631
25632 1999-03-19  Jim Meyering  <meyering@ascend.com>
25633
25634         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25635
25636 1999-03-12  Jim Meyering  <meyering@ascend.com>
25637
25638         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25639
25640 1999-03-07  Jim Meyering  <meyering@ascend.com>
25641
25642         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25643         declared.
25644
25645 1999-02-17  Jim Meyering  <meyering@ascend.com>
25646
25647         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25648         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25649
25650 1999-02-07  Jim Meyering  <meyering@ascend.com>
25651
25652         * m4/group-member.m4: New file -- extracted from sh-utils'
25653         configure.in.
25654
25655         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25656         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25657
25658 1999-02-06  Jim Meyering  <meyering@ascend.com>
25659
25660         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25661         * m4/fnmatch.m4: Likewise.
25662         * m4/getgroups.m4: Likewise.
25663         * m4/lstat.m4: Likewise.
25664         * m4/malloc.m4: Likewise.
25665         * m4/putenv.m4: Likewise.
25666         * m4/realloc.m4: Likewise.
25667         * m4/regex.m4: Likewise.
25668         * m4/stat.m4: Likewise.
25669         * m4/strftime.m4: Likewise.
25670         Suggestion from Alain Magloire.
25671
25672         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25673         * m4/fnmatch.m4: Likewise.
25674         * m4/getgroups.m4: Likewise.
25675         * m4/getline.m4: Likewise.
25676         * m4/lstat.m4: Likewise.
25677         * m4/malloc.m4: Likewise.
25678         * m4/memcmp.m4: Likewise.
25679         * m4/putenv.m4: Likewise.
25680         * m4/realloc.m4: Likewise.
25681         * m4/regex.m4: Likewise.
25682         * m4/stat.m4: Likewise.
25683         * m4/strftime.m4: Likewise.
25684         Suggestion from Alain Magloire.
25685
25686         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25687         an argument.
25688
25689         * m4/regex.m4: Add a run-time Test for proper operation of
25690         re_compile_pattern.
25691
25692 1999-01-31  Jim Meyering  <meyering@ascend.com>
25693
25694         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25695
25696 1999-01-30  Jim Meyering  <meyering@ascend.com>
25697
25698         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25699
25700         * m4/jm-mktime.m4: Make this a wrapper around the official
25701         AM_FUNC_MKTIME rather than my private copy, now that the official one
25702         is up to date.
25703         * m4/mktime.m4: Remove file.
25704
25705         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25706         * m4/uptime.m4: Likewise.
25707         * m4/uintmax_t.m4: Likewise.
25708
25709 1999-01-28  Jim Meyering  <meyering@ascend.com>
25710
25711         * m4/jm-macros.m4: Use jm_AFS.
25712         * m4/afs.m4: New file (from fileutils' configure.in).
25713
25714         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25715         * m4/chown.m4: Likewise.
25716         * m4/d-ino.m4: Likewise.
25717         * m4/d-type.m4: Likewise.
25718         * m4/fnmatch.m4: Likewise.
25719         * m4/getgroups.m4: Likewise.
25720         * m4/gettext.m4: Likewise.
25721         * m4/jm-mktime.m4: Likewise.
25722         * m4/jm-winsz2.m4: Likewise.
25723         * m4/lcmessage.m4: Likewise.
25724         * m4/ls-mntd-fs.m4: Likewise.
25725         * m4/malloc.m4: Likewise.
25726         * m4/memcmp.m4: Likewise.
25727         * m4/putenv.m4: Likewise.
25728         * m4/realloc.m4: Likewise.
25729         * m4/st_mtim.m4: Likewise.
25730         * m4/strftime.m4: Likewise.
25731
25732 1999-01-16  Jim Meyering  <meyering@ascend.com>
25733
25734         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25735         (ARGMATCH_DIE_DECL): Define.
25736
25737 1999-01-12  Jim Meyering  <meyering@ascend.com>
25738
25739         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25740         Reported by Lars Hecking.
25741
25742 1999-01-10  Jim Meyering  <meyering@ascend.com>
25743
25744         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25745         gross kludge.
25746         * m4/inttypes_h.m4: Likewise.
25747         * m4/lstat.m4: Likewise.
25748         * m4/malloc.m4: Likewise.
25749         * m4/readdir.m4: Likewise.
25750         * m4/realloc.m4: Likewise.
25751         * m4/st_dm_mode.m4: Likewise.
25752         * m4/stat.m4: Likewise.
25753         * m4/utimbuf.m4: Likewise.
25754         * m4/utimes.m4: Likewise.
25755
25756         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
25757         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
25758         comments in config.h.in are meaningful.
25759
25760         * m4/jm-macros.m4: Require autoconf-2.13 here.
25761
25762         * m4/regex.m4: By default, don't use the included regex.c on systems
25763         with glibc 2.  Suggestion from Uli Drepper.
25764
25765 1999-01-02  Jim Meyering  <meyering@ascend.com>
25766
25767         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
25768
25769 1998-12-18  Jim Meyering  <meyering@ascend.com>
25770
25771         * m4/Makefile.am.in (Makefile.am): Simplify rule.
25772         Based on a suggestion from Lars Hecking.
25773
25774 1998-11-16  Paul Eggert  <eggert@twinsun.com>
25775
25776         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
25777
25778 1998-11-16  Jim Meyering  <meyering@ascend.com>
25779
25780         * m4/lfs.m4: Double-quote the `uname...` expression.
25781
25782 1998-11-14  Jim Meyering  <meyering@ascend.com>
25783
25784         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
25785         * m4/stat.m4: Likewise.
25786
25787 1998-11-03  Jim Meyering  <meyering@ascend.com>
25788
25789         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
25790         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
25791
25792 1998-10-18  Jim Meyering  <meyering@ascend.com>
25793
25794         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
25795
25796 1998-10-17  Jim Meyering  <meyering@ascend.com>
25797
25798         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
25799         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
25800         calls for those previously hard-coded headers.  Instead, take a new
25801         parameter.
25802         (jm_CHECK_DECLARATIONS): Reflect interface change.
25803         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
25804         (jm_CHECK_DECL_LOCALTIME_R): New macro.
25805
25806         * m4/mktime.m4: Test for spring-forward gap before long-running test.
25807
25808 1998-10-14  Jim Meyering  <meyering@ascend.com>
25809
25810         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
25811         instead of "TZ=America/Vancouver".  From Paul Eggert.
25812
25813 1998-10-11  Jim Meyering  <meyering@ascend.com>
25814
25815         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
25816         This adds a test for a recently added compatibility fix for mktime.c.
25817         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
25818
25819 1998-09-27  Jim Meyering  <meyering@ascend.com>
25820
25821         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
25822
25823         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
25824         ../configure.in, including a change from Gordon Matzigkeit to allow
25825         cross-compiling for the Hurd.
25826
25827         * m4/glibc.m4: New file/macro to test for the GNU C Library
25828         versions 1 and 2.  From Gordon Matzigkeit.
25829         Indent.
25830
25831 1998-09-21  Jim Meyering  <meyering@ascend.com>
25832
25833         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
25834
25835 1998-08-18  Paul Eggert  <eggert@twinsun.com>
25836
25837         Port nanosecond-resolution times to UnixWare 2.1.2 and
25838         pedantic Solaris 2.6.
25839
25840         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
25841         AC_STRUCT_ST_MTIM.
25842         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
25843         Generate name of ns member, instead of just 1 or undef.
25844         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
25845
25846 1998-08-15  Jim Meyering  <meyering@ascend.com>
25847
25848         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
25849         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
25850         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
25851         instead of jm_TYPE_SSIZE_T.
25852
25853 1998-08-12  Jim Meyering  <meyering@ascend.com>
25854
25855         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
25856
25857 1998-08-02  Jim Meyering  <meyering@ascend.com>
25858
25859         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
25860         in acconfig.h manually.
25861
25862 1998-07-31  Paul Eggert  <eggert@twinsun.com>
25863
25864         * m4/st_mtim.m4: New file.
25865
25866 1998-07-28  Jim Meyering  <meyering@ascend.com>
25867
25868         * m4/utimes.m4: Undef stat.
25869
25870 1998-07-25  Jim Meyering  <meyering@ascend.com>
25871
25872         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
25873         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
25874
25875 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
25876
25877         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
25878         uid and gid actually remain unchanged.
25879
25880 1998-07-07  Jim Meyering  <meyering@ascend.com>
25881
25882         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
25883
25884 1998-07-04  Jim Meyering  <meyering@ascend.com>
25885
25886         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
25887         to prove that this macro can be used in packages without regex.c.
25888
25889 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
25890
25891         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
25892         is to be used.
25893
25894 1998-07-03  Jim Meyering  <meyering@ascend.com>
25895
25896         * m4/gettext.m4: Add -lintl if it's found to be necessary.
25897
25898         * m4/gettext.m4: New file -- from gettext-0.10.35.
25899         * m4/lcmessage.m4: Likewise.
25900         * m4/progtest.m4: Likewise.
25901
25902         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
25903         * m4/jm-macros.m4: Require the new macro.
25904
25905 1998-06-29  Jim Meyering  <meyering@ascend.com>
25906
25907         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
25908         for the definition of NGROUPS (used in a system header included
25909         by sys/mount.h).
25910
25911 1998-06-28  Jim Meyering  <meyering@ascend.com>
25912
25913         * m4/ls-mntd-fs.m4: New file.
25914         * m4/fstypename.m4: New file.
25915
25916         * m4/jm-macros.m4: Require the new macro.
25917         * m4/jm-glibc-io.m4: New file.
25918
25919 1998-05-19  Jim Meyering  <meyering@ascend.com>
25920
25921         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
25922         * m4/lchown.m4: New file.
25923
25924         * m4/Makefile.am.in: New file.
25925         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
25926
25927 1998-05-14  Jim Meyering  <meyering@ascend.com>
25928
25929         * m4/Makefile.am (EXTRA_DIST): Add them.
25930         * m4/jm-macros.m4: New file.
25931         * m4/utimbuf.m4: New file.
25932
25933 1998-05-12  Jim Meyering  <meyering@ascend.com>
25934
25935         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
25936
25937 1998-05-11  Jim Meyering  <meyering@ascend.com>
25938
25939         * m4/isc-posix.m4: New file.
25940
25941 1998-05-10  Jim Meyering  <meyering@ascend.com>
25942
25943         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
25944
25945 1998-05-09  Jim Meyering  <meyering@ascend.com>
25946
25947         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
25948         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
25949         with automake.
25950
25951         * m4/ssize_t.m4: New file.
25952         * m4/mktime.m4: Remove file -- the new automake has this now.
25953
25954 1998-04-26  Jim Meyering  <meyering@ascend.com>
25955
25956         * m4/assert.m4: New file.
25957         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
25958
25959 1998-04-05  Jim Meyering  <meyering@ascend.com>
25960
25961         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
25962         (jm_PREREQ): Use it here.
25963
25964 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
25965
25966         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
25967         in acconfig.h.
25968
25969 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
25970
25971         * m4/prereq.m4: New file.
25972         * m4/error.m4: New file.
25973         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
25974
25975 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
25976
25977         * m4/getline.m4: Don't set am_cv_func_working_getline before the
25978         cache-check for the same variable -- that defeated the purpose of
25979         the test; the test program was never run.  This was a problem only
25980         on systems with losing getline functions -- HP-UX 10.20 is one.
25981         Reported by Bjorn Helgaas.
25982
25983 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
25984
25985         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
25986
25987 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
25988
25989         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
25990
25991         * m4/const.m4: New file.  Use an initializer in this declaration
25992         typedef int charset[2]; const charset x;
25993         Reported by Bob Glickstein.
25994
25995 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
25996
25997         * m4/chown.m4: Fix reversed types on -1 args to chown.
25998         From Kaveh Ghazi.
25999
26000 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26001
26002         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26003         Add lseek and memchr.
26004
26005         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26006         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26007         have a 20-character limit on names.
26008
26009 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26010
26011         * m4/inttypes_h.m4: New file.
26012         * m4/uintmax_t.m4: New file.
26013         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26014
26015 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26016   Free Software Foundation, Inc.
26017 Copying and distribution of this file, with or without modification,
26018 are permitted provided the copyright notice and this notice are preserved.