2a0e4045484fd53a1d8b723fd973a0efdcf6f084
[pspp] / ChangeLog
1 2007-01-27  Bruno Haible  <bruno@clisp.org>
2
3         * modules/unistr/base: Update.
4
5 2007-01-27  Bruno Haible  <bruno@clisp.org>
6
7         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
8         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
9         * modules/unistr/u32-mbtouc-unsafe: Renamed from
10         modules/unistr/u32-mbtouc.
11         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
12         * lib/unistr.h: Update.
13         * lib/linebreak.c: Update.
14         * modules/unistr/u32-mbtouc: Renamed from
15         modules/unistr/u32-mbtouc-safe.
16         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
17         * lib/unistr.h: Update.
18         * lib/unistr/u32-to-u8.c: Update.
19         * lib/unistr/u32-to-u16.c: Update.
20
21 2007-01-27  Bruno Haible  <bruno@clisp.org>
22
23         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
24         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
25         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
26         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
27         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
28         * modules/unistr/u16-mbtouc-unsafe: Renamed from
29         modules/unistr/u16-mbtouc.
30         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
31         * lib/unistr.h: Update.
32         * lib/linebreak.c: Update.
33         * modules/linebreak: Update.
34         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
35         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
36         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
37         * modules/unistr/u16-mbtouc: Renamed from
38         modules/unistr/u16-mbtouc-safe.
39         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
40         * lib/unistr.h: Update.
41         * lib/unistr/u16-to-u8.c: Update.
42         * modules/unistr/u16-to-u8: Update.
43         * lib/unistr/u16-to-u32.c: Update.
44         * modules/unistr/u16-to-u32: Update.
45
46 2007-01-27  Bruno Haible  <bruno@clisp.org>
47
48         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
49         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
50         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
51         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
52         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
53         * modules/unistr/u8-mbtouc-unsafe: Renamed from
54         modules/unistr/u8-mbtouc.
55         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
56         * lib/unistr.h: Update.
57         * lib/striconveh.c: Update.
58         * modules/striconveh: Update.
59         * lib/linebreak.c: Update.
60         * modules/linebreak: Update.
61         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
62         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
63         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
64         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
65         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
66         * lib/unistr.h: Update.
67         * lib/striconveh.c: Update.
68         * modules/striconveh: Update.
69         * lib/unistr/u8-to-u16.c: Update.
70         * modules/unistr/u8-to-u16: Update.
71         * lib/unistr/u8-to-u32.c: Update.
72         * modules/unistr/u8-to-u32: Update.
73
74 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
75
76         Sync from Libtool.
77         * lib/argz.c: Do not include strings.h nor memory.h, include
78         string.h unconditionally.  Patch by Simon Josefsson.
79
80 2007-01-27  Bruno Haible  <bruno@clisp.org>
81
82         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
83         from gl_HEADER_STRING_H_BODY.
84         (gl_HEADER_STRING_H_BODY): Require it.
85         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
86         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
87         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
88         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
89         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
90         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
91         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
92         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
93         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
94         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
95         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
96         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
97         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
98         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
99         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
100
101 2007-01-27  Bruno Haible  <bruno@clisp.org>
102
103         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
104         check_PROGRAMS into noinst_PROGRAMS.
105         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
106         check_PROGRAMS in this case.
107         (func_import): Set for_test to false.
108         (func_create_testdir): Set for_test to true.
109
110 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
111             Bruno Haible  <bruno@clisp.org>
112
113         * modules/strcasestr (Files): Remove lib/strcasestr.h.
114         (Depends-on): Add string.
115         (Includes): Use <string.h> instead of strcasestr.h.
116         * modules/string (Makefile.am): Also substitute the value of
117         REPLACE_STRCASESTR.
118         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
119         assume strcasestr is declared in <string.h> not <strings.h>. Also
120         set REPLACE_STRCASESTR.
121         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
122         REPLACE_STRCASESTR.
123         * lib/strcasestr.h: Remove file.
124         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
125         * lib/string_.h (strcasestr): New declaration.
126
127 2007-01-27  Bruno Haible  <bruno@clisp.org>
128
129         * lib/string_.h: Use 'extern'.
130
131 2007-01-27  Jim Meyering  <jim@meyering.net>
132
133         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
134         of set-but-not-used local, "q".
135
136         * lib/mempcpy.c: Include <config.h> before <string.h>.
137         This fixes a compilation error on HP-UX, due to the system's
138         "restrict"-using mempcpy prototype.
139
140 2007-01-26  Bruno Haible  <bruno@clisp.org>
141
142         Small optimization.
143         * lib/javacomp.c: Include c-strstr.h.
144          (is_envjavac_gcj): Use c_strstr instead of strstr.
145         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
146
147 2007-01-26  Bruno Haible  <bruno@clisp.org>
148
149         * MODULES.html.sh (Unicode string functions): Add the new modules.
150
151         * modules/uniconv/u32-strconv-to-locale: New file.
152         * lib/uniconv/u32-strconv-to-locale.c: New file.
153
154         * modules/uniconv/u16-strconv-to-locale: New file.
155         * lib/uniconv/u16-strconv-to-locale.c: New file.
156
157         * modules/uniconv/u8-strconv-to-locale: New file.
158         * lib/uniconv/u8-strconv-to-locale.c: New file.
159
160         * modules/uniconv/u32-strconv-from-locale: New file.
161         * lib/uniconv/u32-strconv-from-locale.c: New file.
162
163         * modules/uniconv/u16-strconv-from-locale: New file.
164         * lib/uniconv/u16-strconv-from-locale.c: New file.
165
166         * modules/uniconv/u8-strconv-from-locale: New file.
167         * lib/uniconv/u8-strconv-from-locale.c: New file.
168
169         * modules/uniconv/u32-strconv-to-enc: New file.
170         * lib/uniconv/u32-strconv-to-enc.c: New file.
171         * modules/uniconv/u32-strconv-to-enc-tests: New file.
172         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
173
174         * modules/uniconv/u16-strconv-to-enc: New file.
175         * lib/uniconv/u16-strconv-to-enc.c: New file.
176         * lib/uniconv/u-strconv-to-enc.h: New file.
177         * modules/uniconv/u16-strconv-to-enc-tests: New file.
178         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
179
180         * modules/uniconv/u8-strconv-to-enc: New file.
181         * lib/uniconv/u8-strconv-to-enc.c: New file.
182         * modules/uniconv/u8-strconv-to-enc-tests: New file.
183         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
184
185         * modules/uniconv/u32-strconv-from-enc: New file.
186         * lib/uniconv/u32-strconv-from-enc.c: New file.
187         * modules/uniconv/u32-strconv-from-enc-tests: New file.
188         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
189
190         * modules/uniconv/u16-strconv-from-enc: New file.
191         * lib/uniconv/u16-strconv-from-enc.c: New file.
192         * modules/uniconv/u16-strconv-from-enc-tests: New file.
193         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
194
195         * modules/uniconv/u8-strconv-from-enc: New file.
196         * lib/uniconv/u8-strconv-from-enc.c: New file.
197         * lib/uniconv/u-strconv-from-enc.h: New file.
198         * modules/uniconv/u8-strconv-from-enc-tests: New file.
199         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
200
201         * modules/uniconv/u32-conv-from-enc: New file.
202         * lib/uniconv/u32-conv-from-enc.c: New file.
203         * modules/uniconv/u32-conv-from-enc-tests: New file.
204         * tests/uniconv/test-u32-conv-from-enc.c: New file.
205
206         * modules/uniconv/u16-conv-from-enc: New file.
207         * lib/uniconv/u16-conv-from-enc.c: New file.
208         * lib/uniconv/u-conv-from-enc.h: New file.
209         * modules/uniconv/u16-conv-from-enc-tests: New file.
210         * tests/uniconv/test-u16-conv-from-enc.c: New file.
211
212         * modules/uniconv/u8-conv-from-enc: New file.
213         * lib/uniconv/u8-conv-from-enc.c: New file.
214         * modules/uniconv/u8-conv-from-enc-tests: New file.
215         * tests/uniconv/test-u8-conv-from-enc.c: New file.
216
217         * modules/uniconv/base: New file.
218         * lib/uniconv.h: New file.
219
220 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
221
222         * doc/gnulib-tool.texi (Initial import): Update to match current
223         behavior with strdup module.
224         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
225         * lib/memmem.h: Remove; all uses removed.  This is now done
226         by <string.h>.
227         * lib/mempcpy.h: Likewise.
228         * lib/memrchr.h: Likewise.
229         * lib/stpcpy.h: Likewise.
230         * lib/stpncpy.h: Likewise.
231         * lib/strcase.h: Likewise.
232         * lib/strchrnul.h: Likewise.
233         * lib/strdup.h: Likewise.
234         * lib/strndup.h: Likewise.
235         * lib/strnlen.h: Likewise.
236         * lib/strpbrk.h: Likewise.
237         * lib/strsep.h: Likewise.
238         * lib/strstr.h: Likewise.
239         * lib/strtok_r.h: Likewise.
240         * lib/string_.h: New file.
241         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
242         Rely on <string.h> instead.
243         * lib/canon-host.c: Likewise.
244         * lib/chdir-long.c: Likewise.
245         * lib/concatpath.c: Likewise.
246         * lib/exclude.c: Likewise.
247         * lib/fchdir.c: Likewise.
248         * lib/getaddrinfo.c: Likewise.
249         * lib/getcwd.c: Likewise.
250         * lib/getsubopt.c: Likewise.
251         * lib/glob.c: Likewise.
252         * lib/hard-locale.c: Likewise.
253         * lib/iconvme.c: Likewise.
254         * lib/javacomp.c: Likewise.
255         * lib/mempcpy.c: Likewise.
256         * lib/memrchr.c: Likewise.
257         * lib/regex_internal.h: Likewise.
258         * lib/stpncpy.c: Likewise.
259         * lib/strcasecmp.c: Likewise.
260         * lib/strchrnul.c: Likewise.
261         * lib/strdup.c: Likewise.
262         * lib/striconv.c: Likewise.
263         * lib/striconveh.c: Likewise.
264         * lib/striconveha.c: Likewise.
265         * lib/strncasecmp.c: Likewise.
266         * lib/strndup.c: Likewise.
267         * lib/strnlen.c: Likewise.
268         * lib/strsep.c: Likewise.
269         * lib/strstr.c: Likewise.
270         * lib/strtok_r.c: Likewise.
271         * lib/userspec.c: Likewise.
272         * lib/w32spawn.h: Likewise.
273         * lib/xstrndup.c: Likewise.
274         * lib/mountlist.c (strstr): Remove decl.
275         * m4/string_h.m4: New file.
276         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
277         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
278         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
279         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
280         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
281         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
282         Set REPLACE_STRCASECMP if necessary.
283         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
284         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
285         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
286         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
287         HAVE_DECL_STRDUP if necessary.
288         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
289         since gl_FUNC_STRNDUP does that now.
290         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
291         Check for decl here...
292         (gl_PREREQ_STRNLEN): ... not here.
293         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
294         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
295         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
296         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
297         necessary.
298         * modules/string: New file.
299         * modules/memmem (Files): Remove special-purpose include file.
300         (Depends-on): Add string.
301         (Include): Include <string.h>, not the removed file.
302         * modules/mempcpy: Likewise.
303         * modules/memrchr: Likewise.
304         * modules/stpcpy: Likewise.
305         * modules/stpncpy: Likewise.
306         * modules/strcase: Likewise.
307         * modules/strchrnul: Likewise.
308         * modules/strdup: Likewise.
309         * modules/strndup: Likewise.
310         * modules/strnlen: Likewise.
311         * modules/strpbrk: Likewise.
312         * modules/strsep: Likewise.
313         * modules/strstr: Likewise.
314         * modules/strtok_r: Likewise.
315         * tests/test-dirname.c: Don't include "strdup.h", since
316         <string.h> now suffices.
317         * tests/test-memmem.c: Don't include "memmem.h", since
318         <string.h> now suffices.
319
320 2007-01-25  Bruno Haible  <bruno@clisp.org>
321
322         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
323         *resultp is 0.
324
325         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
326         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
327         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
328         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
329
330         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
331         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
332         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
333         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
334         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
335         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
336
337 2007-01-24  Bruno Haible  <bruno@clisp.org>
338
339         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
340         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
341         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
342         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
343         gl_FUNC_FTS_CORE.
344         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
345         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
346         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
347         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
348         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
349         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
350         gl_FUNC_FCHOWNAT.
351         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
352         gl_FUNC_STRFTIME.
353         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
354         Reported by Ralf Wildenhues.
355
356 2007-01-24  Bruno Haible  <bruno@clisp.org>
357
358         Drop AC_REQUIRE calls that are redundant with the module dependencies.
359         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
360         gl_GETADDRINFO.
361         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
362         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
363         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
364
365 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
366
367         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
368         Don't use 'exit'; just return from 'main'.
369         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
370
371         * lib/fnmatch_.h: Readjust white space and comments to match
372         glibc, to avoid spurious diffs.
373
374 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
375
376         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
377         2004-12-01 change by Jakub Jelinek, since this code won't compile
378         if !LIBC.  Problem reported by Bob Proulx.
379
380 2007-01-23  Bruno Haible  <bruno@clisp.org>
381
382         * lib/striconveh.c: Include c-strcaseeq.h.
383         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
384         * modules/striconveh (Depends-on): Add c-strcaseeq.
385
386 2007-01-23  Bruno Haible  <bruno@clisp.org>
387
388         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
389
390         * modules/c-strcaseeq: New file.
391         * lib/c-strcaseeq.h: New file.
392
393         * modules/streq: New file.
394         * lib/streq.h: New file.
395
396 2007-01-23  Bruno Haible  <bruno@clisp.org>
397
398         * modules/striconveha-tests: New file.
399         * tests/test-striconveha.c: New file.
400
401         * lib/striconveha.h: Include <stdbool.h>.
402         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
403         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
404         (mem_iconveha_notranslit): Renamed from mem_iconveha.
405         (mem_iconveha): New function.
406         (str_iconveha_notranslit): Renamed from str_iconveha.
407         (str_iconveha): New function.
408         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
409         c-strcase.
410
411 2007-01-23  Bruno Haible  <bruno@clisp.org>
412
413         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
414         encodings without forgiving before trying any encoding with handler.
415         (str_iconveha): Try all encodings without forgiving before trying any
416         encoding with handler.
417
418 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
419
420         Import the following changes from libc.
421
422         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
423
424         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
425
426         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
427
428         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
429         normal_bracket label.
430
431         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
432
433         [BZ #361]
434         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
435         to normal_bracket after fetching the next character.
436
437 2007-01-22  Bruno Haible  <bruno@clisp.org>
438
439         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
440         argument.
441         * lib/striconveh.c (iconv_carefully_1): New function.
442         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
443         argument.
444         (str_cd_iconveh): Update.
445         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
446         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
447         * tests/test-striconveh.c (MAGIC): New macro.
448         (new_offsets): New function.
449         (main): Test call with and without offsets.
450
451 2007-01-22  Bruno Haible  <bruno@clisp.org>
452
453         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
454         * modules/sys_select (Makefile.am): Likewise.
455         * modules/sys_socket (Makefile.am): Likewise.
456         * modules/sys_time (Makefile.am): Likewise.
457
458 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
459
460         * modules/gettimeofday (License): Change from GPL to LGPL, since
461         gettimeofday is a library function.
462
463 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
464
465         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
466
467 2007-01-21  Bruno Haible  <bruno@clisp.org>
468
469         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
470
471 2007-01-21  Bruno Haible  <bruno@clisp.org>
472
473         * modules/striconveha: New file.
474         * lib/striconveha.h: New file.
475         * lib/striconveha.c: New file.
476         * MODULES.html.sh (Internationalization functions): Add striconveha.
477         * lib/striconv.c (str_iconv): Optimize the case of an empty input
478         string.
479         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
480
481 2007-01-21  Bruno Haible  <bruno@clisp.org>
482
483         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
484         * lib/striconveh.c (str_iconveh): Likewise.
485
486 2007-01-21  Bruno Haible  <bruno@clisp.org>
487
488         * lib/striconveh.h (mem_iconveh): New declaration.
489         * lib/striconveh.c (mem_iconveh): New function.
490         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
491
492 2007-01-21  Bruno Haible  <bruno@clisp.org>
493
494         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
495
496         * lib/striconveh.h (mem_cd_iconveh): Change specification.
497         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
498         original result buffer.
499         (str_cd_iconveh): Update.
500         * tests/test-striconveh.c (main): Update.
501
502         * lib/striconv.h (mem_cd_iconv): Change specification.
503         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
504         result buffer.
505         (str_cd_iconv): Update.
506         * tests/test-striconv.c (main): Update.
507
508 2007-01-21  Bruno Haible  <bruno@clisp.org>
509
510         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
511
512 2007-01-20  Jim Meyering  <jim@meyering.net>
513
514         * lib/userspec.c (parse_with_separator): If a user or group string
515         starts with "+", skip the corresponding name-to-ID look-up, since
516         such a look-up must fail: user and group names may not include "+".
517
518 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
519
520         * lib/poll.c: Include sys/time.h and time.h unconditionally,
521         since we now assume the sys_time module.
522         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
523         check for sys/time.h; no longer needed.
524         * modules/poll (Depends-on): Depend on sys_time.
525
526 2007-01-18  Bruno Haible  <bruno@clisp.org>
527
528         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
529         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
530
531         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
532         gettimeofday.
533
534         * tests/test-gettimeofday.c: Include <time.h>.
535         (dummy): Remove variable.
536
537         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
538         gl_HEADER_SYS_TIME_H.
539         (gl_HEADER_SYS_TIME_H): New macro.
540
541         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
542         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
543         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
544         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
545         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
546         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
547         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
548         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
549         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
550         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
551         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
552
553         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
554         last change; it caused a compilation error when cross-compiling to
555         Cygwin.
556
557 2007-01-18  Jim Meyering  <jim@meyering.net>
558
559         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
560         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
561         than the race-prone "test -d sys || mkdir sys".
562         (configure.ac): Use AC_PROG_MKDIR_P.
563         * modules/sys_select: Likewise.
564         * modules/sys_socket: Likewise.
565         * modules/sys_time: Likewise.
566
567 2007-01-18  Eric Blake  <ebb9@byu.net>
568
569         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
570         replace gettimeofday.
571         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
572         name, to avoid infinite recursion.
573
574 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
575
576         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
577         module sys_time.
578         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
579         assume timespec.h defines struct timeval.
580         * lib/settime.c: Likewise.
581         * lib/utimens.c: Likewise.
582         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
583         since we now assume the gettimeofday module.
584         * lib/tempname.c (__gen_tempname): Likewise.
585         * lib/gettimeofday.h: Remove.
586         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
587         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
588         Include <time.h>, for 'time()'.
589         (localtime_buffer_addr): Also use this workaround if
590         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
591         to simplify the uses.  All uses changed.
592         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
593         that #undef is inside {}, and 'const' follows type name consistently.
594         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
595         (gettimeofday): Do not use the maximum possible value for
596         tv->tv_usec, since that might break usages other than ls.c.
597         Instead, we'll leave ls.c alone.  This undoes today's patch
598         by Bruno.  Add a compile-time warning for 1s-clock resolution;
599         we've never observed the problem but might as well keep the
600         canary.
601         * lib/nanosleep.c: Include timespec.h first, for interface check.
602         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
603         now assume the sys_time module.
604         * lib/tempname.c: Likewise.
605         * lib/timespec.h: Likewise.
606         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
607         needed.
608         * lib/strftime.c: Likewise.
609         * lib/timespec.h: Likewise.
610         * lib/posixtm.c: Include posixtm.h first, for interface check.
611         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
612         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
613         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
614         * lib/sys_time_.h: New file.
615         * lib/timespec.h (struct timespec): Use long int, not long.
616         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
617         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
618         Remove obsolescent call to AC_HEADER_TIME.
619         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
620         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
621         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
622         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
623         Likewise.
624         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
625         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
626         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
627         into the sys_time module.  Check for gettimeofday just once.
628         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
629         for gettimeofday signature to just check the signature.  Merely
630         compile it, since linking doesn't test signature.  Improve test for
631         whether gettimeofday.o is actually needed.
632         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
633         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
634         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
635         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
636         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
637         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
638         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
639         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
640         than worrying about sys/time.h.
641         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
642         Don't bother worrying about TIME_WITH_SYS_TIME.
643         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
644         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
645         * m4/sys_time_h.m4: New file.
646         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
647         Don't include sys/time.h.  Return from main rather than exiting.
648         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
649         all uses changed.
650         * modules/gethrxtime (Depends-on): Add sys_time.
651         * modules/gettime (Depends-on): Likewise.
652         * modules/gettimeofday (Depends-on): Likewise.
653         * modules/nanosleep (Depends-on): Likewise.
654         * modules/settime (Depends-on): Likewise.
655         * modules/tempname (Depends-on): Likewise.
656         * modules/utimens (Depends-on): Likewise.
657         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
658         (Include:) Change back to <sys/time.h>.
659         (Maintainer:) Add self.
660         * modules/sys_time: New file.
661         * modules/tempname (Depends-on): Add gettimeofday.
662         * tests/test-gettimeofday.c: Include <sys/time.h>
663         rather than gettimeofday.h.
664
665 2007-01-17  Bruno Haible  <bruno@clisp.org>
666
667         * gnulib-tool (func_get_license): Revert last patch. Instead, let
668         the license default to GPL.
669         (func_create_testdir): Don't complain if a module is LGPL and its
670         tests module depends on GPLed modules.
671
672 2007-01-17  Bruno Haible  <bruno@clisp.org>
673
674         * lib/gettimeofday.c (gettimeofday): Add code for the case
675         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
676         maximum possible value for tv->tv_usec, rather than the minimum one.
677
678 2005-10-08  Martin Lambers  <marlam@marlam.de>
679 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
680 2007-01-16  Bruno Haible  <bruno@clisp.org>
681
682         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
683         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
684         gl_FUNC_GETTIMEOFDAY.
685         (Include): Add gettimeofday.h.
686         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
687         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
688         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
689         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
690         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
691         * lib/gettimeofday.h: New file.
692         * lib/gettimeofday.c: Include <sys/timeb.h>.
693         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
694         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
695         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
696         fall back on time().
697
698         * tests/test-gettimeofday.c: New file.
699         * modules/gettimeofday-tests: New file.
700
701 2007-01-16  Eric Blake  <ebb9@byu.net>
702
703         * modules/fnmatch (Depends-on): Depend on wchar.
704         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
705         * m4/fnmatch.m4: Likewise.
706         * modules/mbchar (Makefile.am): Assume <wchar.h>.
707         * m4/mbchar.m4: Likewise.
708         * modules/mbswidth (Depends-on): Depend on wchar.
709         * lib/mbswidth.c: Assume <wchar.h>.
710         * m4/mbswidth.m4: Likewise.
711         * modules/quotearg (Depends-on): Depend on wchar.
712         * lib/quotearg.c: Assume <wchar.h>.
713         * m4/quotearg.m4: Likewise.
714         * modules/regex (Depends-on): Depend on wchar.
715         * lib/regex_internal.h: Assume <wchar.h>.
716         * m4/regex.m4: Likewise.
717         * modules/stdint (Depends-on): Depend on wchar.
718         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
719         * m4/stdint.m4: Likewise.
720         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
721         * modules/strftime (Depends-on): Depend on wchar.
722         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
723         * modules/strtol (Depends-on): Depend on wchar.
724         * lib/strtol.c: Assume <wchar.h>.
725         * modules/wcwidth (Depends-on): Depend on wchar.
726         * lib/wcwidth.h: Assume <wchar.h>.
727         * m4/wcwidth.m4: Likewise.
728
729 2007-01-16  Bruno Haible  <bruno@clisp.org>
730
731         * modules/csharpexec-script: New, created from...
732         * modules/csharpexec: ... this.
733
734 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
735
736         * modules/javaexec-script: New, created from...
737         * modules/javaexec: ... this.
738
739 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
740
741         * modules/poll (Dependencies): Add sys_select.
742
743 2007-01-15  Jim Meyering  <jim@meyering.net>
744
745         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
746         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
747         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
748         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
749
750 2007-01-15  Bruno Haible  <bruno@clisp.org>
751
752         * modules/striconveh: New file.
753         * lib/striconveh.h: New file.
754         * lib/striconveh.c: New file.
755         * MODULES.html.sh (Internationalization functions): Add striconveh.
756
757         * modules/striconveh-tests: New file.
758         * tests/test-striconveh.c: New file.
759
760 2007-01-15  Bruno Haible  <bruno@clisp.org>
761
762         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
763         not from GNU libiconv or GNU libc.
764
765 2007-01-15  Bruno Haible  <bruno@clisp.org>
766
767         * doc/gnulib-intro.texi (Copyright): Explain the different license
768         terms for module descriptions, autoconf macros, tests, documentation.
769
770 2007-01-14  Bruno Haible  <bruno@clisp.org>
771
772         * modules/striconv-tests: New file.
773         * tests/test-striconv.c: New file.
774
775 2007-01-14  Bruno Haible  <bruno@clisp.org>
776
777         * modules/iconv-tests: New file.
778         * tests/test-iconv.c: New file.
779
780 2007-01-14  Bruno Haible  <bruno@clisp.org>
781
782         * gnulib-tool (func_get_license): For test modules, use the license of
783         the main module.
784
785 2007-01-14  Bruno Haible  <bruno@clisp.org>
786
787         * modules/iconv (Include): Clarify that <iconv.h> can only be included
788         if iconv is found to exist.
789
790 2007-01-14  Bruno Haible  <bruno@clisp.org>
791
792         * modules/c-ctype-tests: New file.
793         * tests/test-c-ctype.c: New file.
794
795 2007-01-14  Bruno Haible  <bruno@clisp.org>
796
797         * modules/binary-io-tests: New file.
798         * tests/test-binary-io.sh: New file.
799         * tests/test-binary-io.c: New file.
800
801 2007-01-14  Bruno Haible  <bruno@clisp.org>
802
803         * modules/array-oset-tests: New file.
804         * tests/test-array_oset.c: New file.
805
806 2007-01-14  Bruno Haible  <bruno@clisp.org>
807
808         * modules/array-list-tests: New file.
809         * tests/test-array_list.c: New file.
810
811 2007-01-14  Bruno Haible  <bruno@clisp.org>
812
813         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
814         and make.
815         Reported by Simon Josefsson in
816         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
817
818 2007-01-14  Bruno Haible  <bruno@clisp.org>
819
820         * modules/allocsa-tests: New file.
821         * tests/test-allocsa.c: New file.
822
823 2007-01-14  Bruno Haible  <bruno@clisp.org>
824
825         * modules/fchdir (Depends-on): Add absolute-header.
826         * modules/unistd (Depends-on): Likewise.
827
828 2006-12-30  Bruno Haible  <bruno@clisp.org>
829
830         * modules/fchdir: New file.
831         * modules/unistd (Files): Add lib/unistd_.h.
832         (Makefile.am): Generate unistd.h from unistd_.h.
833         * lib/fchdir.c: New file.
834         * lib/dirent_.h: New file.
835         * lib/unistd_.h: New file.
836         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
837         * m4/fchdir.m4: New file.
838         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
839         (gl_HEADER_UNISTD): Invoke it.
840         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
841         function.
842         * lib/backupfile.c (opendir, closedir): Undefine.
843         * lib/chown.c (open, close): Undefine.
844         * lib/clean-temp.c (open, close): Undefine.
845         * lib/copy-file.c (open, close): Undefine.
846         * lib/execute.c (open, close): Undefine.
847         * lib/fsusage.c (open, close): Undefine.
848         * lib/gc-gnulib.c (open, close): Undefine.
849         * lib/getcwd.c (opendir, closedir): Undefine.
850         * lib/glob.c (opendir, closedir): Undefine.
851         * lib/javacomp.c (open, close): Undefine.
852         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
853         * lib/openat-proc.c (open, close): Undefine.
854         * lib/pagealign_alloc.c (open, close): Undefine.
855         * lib/pipe.c (open, close): Undefine.
856         * lib/progreloc.c (open, close): Undefine.
857         * lib/savedir.c (opendir, closedir): Undefine.
858         * lib/utime.c (open, close): Undefine.
859         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
860
861 2007-01-10  Bruno Haible  <bruno@clisp.org>
862
863         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
864
865 2007-01-12  Eric Blake  <ebb9@byu.net>
866
867         Provide a robust <wchar.h>.  Further simplifications are now
868         possible in other modules, but not included here.
869         * modules/wchar: New module.
870         * m4/wchar.m4: New file.
871         * lib/wchar_.h: Likewise.
872         * modules/mbchar (Depends-on): Depend on wchar, as the first use
873         of the new module.
874         * MODULES.html.sh (Extended multibyte and wide character utilities):
875         New section.
876
877 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
878
879         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
880         to a reasonable default for memory allocation.
881         (xreadlink): Don't allocate a huge buffer, to work around a buggy
882         file system that reports garbage st_size values for symlinks.
883         Problem reported by Liyang Hu.
884
885 2007-01-11  Simon Josefsson  <simon@josefsson.org>
886
887         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
888         Emacs .#* auto-save files).
889
890 2007-01-11  Bruno Haible  <bruno@clisp.org>
891
892         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
893         directory.
894
895 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
896
897         Use @...@ consistently in lib/wctype_.h.
898         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
899         on it being set to 1 or 0.
900         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
901         go back to AC_SUBSTing it.
902         * modules/wctype (Makefile.am): Undo previous change.
903
904 2007-01-10  Eric Blake  <ebb9@byu.net>
905
906         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
907         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
908         * modules/wctype (Makefile.am): Likewise.
909         Reported by Chris McGuire.
910
911 2007-01-10  Jim Meyering  <jim@meyering.net>
912
913         fts.c: a small readability/maintainability improvement
914         * lib/fts.c (fts_read): Make this code slightly more readable and
915         maintainable by hoisting the "sp->fts_cur = p" assignments to
916         immediately follow the statements that set P.  Derived from
917         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
918
919 2007-01-10  Eric Blake  <ebb9@byu.net>
920
921         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
922         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
923         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
924         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
925         Reported by Chris McGuire.
926
927 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
928
929         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
930         in sed script.
931
932 2007-01-09  Bruno Haible  <bruno@clisp.org>
933
934         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
935         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
936         variables.
937         (func_module): Use them.
938
939 2007-01-09  Bruno Haible  <bruno@clisp.org>
940
941         * modules/unistr/base: New file.
942         * lib/unistr.h: New file.
943
944         * modules/unistr/u8-to-u16: New file.
945         * lib/unistr/u8-to-u16.c: New file.
946
947         * modules/unistr/u8-to-u32: New file.
948         * lib/unistr/u8-to-u32.c: New file.
949
950         * modules/unistr/u16-to-u8: New file.
951         * lib/unistr/u16-to-u8.c: New file.
952
953         * modules/unistr/u16-to-u32: New file.
954         * lib/unistr/u16-to-u32.c: New file.
955
956         * modules/unistr/u32-to-u8: New file.
957         * lib/unistr/u32-to-u8.c: New file.
958
959         * modules/unistr/u32-to-u16: New file.
960         * lib/unistr/u32-to-u16.c: New file.
961
962         * modules/unistr/u8-check: New file.
963         * modules/unistr/u16-check: New file.
964         * modules/unistr/u32-check: New file.
965         * lib/unistr/u8-check.c: New file.
966         * lib/unistr/u16-check.c: New file.
967         * lib/unistr/u32-check.c: New file.
968
969         * modules/unistr/u8-chr: New file.
970         * modules/unistr/u16-chr: New file.
971         * modules/unistr/u32-chr: New file.
972         * lib/unistr/u8-chr.c: New file.
973         * lib/unistr/u16-chr.c: New file.
974         * lib/unistr/u32-chr.c: New file.
975
976         * modules/unistr/u8-cmp: New file.
977         * modules/unistr/u16-cmp: New file.
978         * modules/unistr/u32-cmp: New file.
979         * lib/unistr/u8-cmp.c: New file.
980         * lib/unistr/u16-cmp.c: New file.
981         * lib/unistr/u32-cmp.c: New file.
982
983         * modules/unistr/u8-cpy: New file.
984         * modules/unistr/u16-cpy: New file.
985         * modules/unistr/u32-cpy: New file.
986         * lib/unistr/u8-cpy.c: New file.
987         * lib/unistr/u16-cpy.c: New file.
988         * lib/unistr/u32-cpy.c: New file.
989         * lib/unistr/u-cpy.h: New file.
990
991         * modules/unistr/u8-cpy-alloc: New file.
992         * modules/unistr/u16-cpy-alloc: New file.
993         * modules/unistr/u32-cpy-alloc: New file.
994         * lib/unistr/u8-cpy-alloc.c: New file.
995         * lib/unistr/u16-cpy-alloc.c: New file.
996         * lib/unistr/u32-cpy-alloc.c: New file.
997         * lib/unistr/u-cpy-alloc.h: New file.
998
999         * modules/unistr/u8-endswith: New file.
1000         * modules/unistr/u16-endswith: New file.
1001         * modules/unistr/u32-endswith: New file.
1002         * lib/unistr/u8-endswith.c: New file.
1003         * lib/unistr/u16-endswith.c: New file.
1004         * lib/unistr/u32-endswith.c: New file.
1005         * lib/unistr/u-endswith.h: New file.
1006
1007         * modules/unistr/u8-mblen: New file.
1008         * modules/unistr/u16-mblen: New file.
1009         * modules/unistr/u32-mblen: New file.
1010         * lib/unistr/u8-mblen.c: New file.
1011         * lib/unistr/u16-mblen.c: New file.
1012         * lib/unistr/u32-mblen.c: New file.
1013
1014         * modules/unistr/u8-mbtouc: New file.
1015         * modules/unistr/u16-mbtouc: New file.
1016         * modules/unistr/u32-mbtouc: New file.
1017         * lib/unistr/u8-mbtouc.c: New file.
1018         * lib/unistr/u16-mbtouc.c: New file.
1019         * lib/unistr/u32-mbtouc.c: New file.
1020
1021         * modules/unistr/u8-mbtouc-safe: New file.
1022         * modules/unistr/u16-mbtouc-safe: New file.
1023         * modules/unistr/u32-mbtouc-safe: New file.
1024         * lib/unistr/u8-mbtouc-safe.c: New file.
1025         * lib/unistr/u16-mbtouc-safe.c: New file.
1026         * lib/unistr/u32-mbtouc-safe.c: New file.
1027
1028         * modules/unistr/u8-move: New file.
1029         * modules/unistr/u16-move: New file.
1030         * modules/unistr/u32-move: New file.
1031         * lib/unistr/u8-move.c: New file.
1032         * lib/unistr/u16-move.c: New file.
1033         * lib/unistr/u32-move.c: New file.
1034         * lib/unistr/u-move.h: New file.
1035
1036         * modules/unistr/u8-next: New file.
1037         * modules/unistr/u16-next: New file.
1038         * modules/unistr/u32-next: New file.
1039         * lib/unistr/u8-next.c: New file.
1040         * lib/unistr/u16-next.c: New file.
1041         * lib/unistr/u32-next.c: New file.
1042
1043         * modules/unistr/u8-prev: New file.
1044         * modules/unistr/u16-prev: New file.
1045         * modules/unistr/u32-prev: New file.
1046         * lib/unistr/u8-prev.c: New file.
1047         * lib/unistr/u16-prev.c: New file.
1048         * lib/unistr/u32-prev.c: New file.
1049
1050         * modules/unistr/u8-set: New file.
1051         * modules/unistr/u16-set: New file.
1052         * modules/unistr/u32-set: New file.
1053         * lib/unistr/u8-set.c: New file.
1054         * lib/unistr/u16-set.c: New file.
1055         * lib/unistr/u32-set.c: New file.
1056         * lib/unistr/u-set.h: New file.
1057
1058         * modules/unistr/u8-startswith: New file.
1059         * modules/unistr/u16-startswith: New file.
1060         * modules/unistr/u32-startswith: New file.
1061         * lib/unistr/u8-startswith.c: New file.
1062         * lib/unistr/u16-startswith.c: New file.
1063         * lib/unistr/u32-startswith.c: New file.
1064         * lib/unistr/u-startswith.h: New file.
1065
1066         * modules/unistr/u8-stpcpy: New file.
1067         * modules/unistr/u16-stpcpy: New file.
1068         * modules/unistr/u32-stpcpy: New file.
1069         * lib/unistr/u8-stpcpy.c: New file.
1070         * lib/unistr/u16-stpcpy.c: New file.
1071         * lib/unistr/u32-stpcpy.c: New file.
1072         * lib/unistr/u-stpcpy.h: New file.
1073
1074         * modules/unistr/u8-stpncpy: New file.
1075         * modules/unistr/u16-stpncpy: New file.
1076         * modules/unistr/u32-stpncpy: New file.
1077         * lib/unistr/u8-stpncpy.c: New file.
1078         * lib/unistr/u16-stpncpy.c: New file.
1079         * lib/unistr/u32-stpncpy.c: New file.
1080         * lib/unistr/u-stpncpy.h: New file.
1081
1082         * modules/unistr/u8-strcat: New file.
1083         * modules/unistr/u16-strcat: New file.
1084         * modules/unistr/u32-strcat: New file.
1085         * lib/unistr/u8-strcat.c: New file.
1086         * lib/unistr/u16-strcat.c: New file.
1087         * lib/unistr/u32-strcat.c: New file.
1088         * lib/unistr/u-strcat.h: New file.
1089
1090         * modules/unistr/u8-strchr: New file.
1091         * modules/unistr/u16-strchr: New file.
1092         * modules/unistr/u32-strchr: New file.
1093         * lib/unistr/u8-strchr.c: New file.
1094         * lib/unistr/u16-strchr.c: New file.
1095         * lib/unistr/u32-strchr.c: New file.
1096
1097         * modules/unistr/u8-strcmp: New file.
1098         * modules/unistr/u16-strcmp: New file.
1099         * modules/unistr/u32-strcmp: New file.
1100         * lib/unistr/u8-strcmp.c: New file.
1101         * lib/unistr/u16-strcmp.c: New file.
1102         * lib/unistr/u32-strcmp.c: New file.
1103
1104         * modules/unistr/u8-strcpy: New file.
1105         * modules/unistr/u16-strcpy: New file.
1106         * modules/unistr/u32-strcpy: New file.
1107         * lib/unistr/u8-strcpy.c: New file.
1108         * lib/unistr/u16-strcpy.c: New file.
1109         * lib/unistr/u32-strcpy.c: New file.
1110         * lib/unistr/u-strcpy.h: New file.
1111
1112         * modules/unistr/u8-strcspn: New file.
1113         * modules/unistr/u16-strcspn: New file.
1114         * modules/unistr/u32-strcspn: New file.
1115         * lib/unistr/u8-strcspn.c: New file.
1116         * lib/unistr/u16-strcspn.c: New file.
1117         * lib/unistr/u32-strcspn.c: New file.
1118         * lib/unistr/u-strcspn.h: New file.
1119
1120         * modules/unistr/u8-strdup: New file.
1121         * modules/unistr/u16-strdup: New file.
1122         * modules/unistr/u32-strdup: New file.
1123         * lib/unistr/u8-strdup.c: New file.
1124         * lib/unistr/u16-strdup.c: New file.
1125         * lib/unistr/u32-strdup.c: New file.
1126         * lib/unistr/u-strdup.h: New file.
1127
1128         * modules/unistr/u8-strlen: New file.
1129         * modules/unistr/u16-strlen: New file.
1130         * modules/unistr/u32-strlen: New file.
1131         * lib/unistr/u8-strlen.c: New file.
1132         * lib/unistr/u16-strlen.c: New file.
1133         * lib/unistr/u32-strlen.c: New file.
1134         * lib/unistr/u-strlen.h: New file.
1135
1136         * modules/unistr/u8-strmblen: New file.
1137         * modules/unistr/u16-strmblen: New file.
1138         * modules/unistr/u32-strmblen: New file.
1139         * lib/unistr/u8-strmblen.c: New file.
1140         * lib/unistr/u16-strmblen.c: New file.
1141         * lib/unistr/u32-strmblen.c: New file.
1142
1143         * modules/unistr/u8-strmbtouc: New file.
1144         * modules/unistr/u16-strmbtouc: New file.
1145         * modules/unistr/u32-strmbtouc: New file.
1146         * lib/unistr/u8-strmbtouc.c: New file.
1147         * lib/unistr/u16-strmbtouc.c: New file.
1148         * lib/unistr/u32-strmbtouc.c: New file.
1149
1150         * modules/unistr/u8-strncat: New file.
1151         * modules/unistr/u16-strncat: New file.
1152         * modules/unistr/u32-strncat: New file.
1153         * lib/unistr/u8-strncat.c: New file.
1154         * lib/unistr/u16-strncat.c: New file.
1155         * lib/unistr/u32-strncat.c: New file.
1156         * lib/unistr/u-strncat.h: New file.
1157
1158         * modules/unistr/u8-strncmp: New file.
1159         * modules/unistr/u16-strncmp: New file.
1160         * modules/unistr/u32-strncmp: New file.
1161         * lib/unistr/u8-strncmp.c: New file.
1162         * lib/unistr/u16-strncmp.c: New file.
1163         * lib/unistr/u32-strncmp.c: New file.
1164
1165         * modules/unistr/u8-strncpy: New file.
1166         * modules/unistr/u16-strncpy: New file.
1167         * modules/unistr/u32-strncpy: New file.
1168         * lib/unistr/u8-strncpy.c: New file.
1169         * lib/unistr/u16-strncpy.c: New file.
1170         * lib/unistr/u32-strncpy.c: New file.
1171         * lib/unistr/u-strncpy.h: New file.
1172
1173         * modules/unistr/u8-strnlen: New file.
1174         * modules/unistr/u16-strnlen: New file.
1175         * modules/unistr/u32-strnlen: New file.
1176         * lib/unistr/u8-strnlen.c: New file.
1177         * lib/unistr/u16-strnlen.c: New file.
1178         * lib/unistr/u32-strnlen.c: New file.
1179         * lib/unistr/u-strnlen.h: New file.
1180
1181         * modules/unistr/u8-strpbrk: New file.
1182         * modules/unistr/u16-strpbrk: New file.
1183         * modules/unistr/u32-strpbrk: New file.
1184         * lib/unistr/u8-strpbrk.c: New file.
1185         * lib/unistr/u16-strpbrk.c: New file.
1186         * lib/unistr/u32-strpbrk.c: New file.
1187         * lib/unistr/u-strpbrk.h: New file.
1188
1189         * modules/unistr/u8-strrchr: New file.
1190         * modules/unistr/u16-strrchr: New file.
1191         * modules/unistr/u32-strrchr: New file.
1192         * lib/unistr/u8-strrchr.c: New file.
1193         * lib/unistr/u16-strrchr.c: New file.
1194         * lib/unistr/u32-strrchr.c: New file.
1195
1196         * modules/unistr/u8-strspn: New file.
1197         * modules/unistr/u16-strspn: New file.
1198         * modules/unistr/u32-strspn: New file.
1199         * lib/unistr/u8-strspn.c: New file.
1200         * lib/unistr/u16-strspn.c: New file.
1201         * lib/unistr/u32-strspn.c: New file.
1202         * lib/unistr/u-strspn.h: New file.
1203
1204         * modules/unistr/u8-strstr: New file.
1205         * modules/unistr/u16-strstr: New file.
1206         * modules/unistr/u32-strstr: New file.
1207         * lib/unistr/u8-strstr.c: New file.
1208         * lib/unistr/u16-strstr.c: New file.
1209         * lib/unistr/u32-strstr.c: New file.
1210         * lib/unistr/u-strstr.h: New file.
1211
1212         * modules/unistr/u8-strtok: New file.
1213         * modules/unistr/u16-strtok: New file.
1214         * modules/unistr/u32-strtok: New file.
1215         * lib/unistr/u8-strtok.c: New file.
1216         * lib/unistr/u16-strtok.c: New file.
1217         * lib/unistr/u32-strtok.c: New file.
1218         * lib/unistr/u-strtok.h: New file.
1219
1220         * modules/unistr/u8-uctomb: New file.
1221         * modules/unistr/u16-uctomb: New file.
1222         * modules/unistr/u32-uctomb: New file.
1223         * lib/unistr/u8-uctomb.c: New file.
1224         * lib/unistr/u16-uctomb.c: New file.
1225         * lib/unistr/u32-uctomb.c: New file.
1226
1227         * MODULES.html.sh (Unicode string functions): Add the new modules.
1228
1229 2007-01-08  Bruno Haible  <bruno@clisp.org>
1230
1231         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
1232         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
1233         subdirectories.
1234
1235 2007-01-08  Karl Berry  <karl@gnu.org>
1236
1237         * doc/error.texi: mention that main() fns must set program_name
1238         when progname is used.
1239
1240 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
1241
1242         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
1243         WCTYPE_H is empty, for the benefit of builds from non-distclean
1244         directories.  Problem reported by Eric Blake in
1245         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
1246
1247 2007-01-08  Bruno Haible  <bruno@clisp.org>
1248
1249         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
1250         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
1251         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
1252         PROVIDE_CANONICALIZE_FILENAME_MODE.
1253         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
1254
1255 2007-01-08  Bruno Haible  <bruno@clisp.org>
1256
1257         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
1258         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
1259         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
1260         * lib/fts.c: Likewise.
1261         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
1262
1263 2006-12-25  Bruno Haible  <bruno@clisp.org>
1264
1265         * modules/utf8-ucs4-safe: New file.
1266         * lib/utf8-ucs4-safe.h: New file.
1267         * lib/unistr/utf8-ucs4-safe.c: New file.
1268
1269         * modules/utf16-ucs4-safe: New file.
1270         * lib/utf16-ucs4-safe.h: New file.
1271         * lib/unistr/utf16-ucs4-safe.c: New file.
1272
1273         * MODULES.html.sh (Unicode string functions): Add the new modules.
1274
1275 2007-01-08  Bruno Haible  <bruno@clisp.org>
1276
1277         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
1278         (Depends-on): Add unitypes.
1279         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1280         (u8_mbtouc_aux): Move out to separate file.
1281         (u8_mbtouc): Use ucs4_t, uint8_t types.
1282         * lib/unistr/utf8-ucs4.c: New file.
1283
1284         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
1285         (Depends-on): Add unitypes.
1286         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1287         (u16_mbtouc_aux): Move out to separate file.
1288         (u16_mbtouc): Use ucs4_t, uint16_t types.
1289         * lib/unistr/utf16-ucs4.c: New file.
1290
1291         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
1292         (Depends-on): Add unitypes.
1293         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
1294         (u8_uctomb_aux): Move out to separate file.
1295         (u8_uctomb): Use ucs4_t, uint8_t types.
1296         * lib/unistr/ucs4-utf8.c: New file.
1297
1298         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
1299         (Depends-on): Add unitypes.
1300         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
1301         (u16_uctomb_aux): Move out to separate file.
1302         (u16_uctomb): Use ucs4_t, uint16_t types.
1303         * lib/unistr/ucs4-utf16.c: New file.
1304
1305 2006-12-25  Bruno Haible  <bruno@clisp.org>
1306
1307         * modules/unitypes: New file.
1308         * lib/unitypes.h: New file.
1309         * MODULES.html.sh (func_all_modules): New section "Unicode string
1310         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
1311         this section. Add unitypes.
1312
1313 2007-01-08  Bruno Haible  <bruno@clisp.org>
1314
1315         Avoid variable names that conflict with those from libtool.
1316         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
1317         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
1318         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1319         library_names_spec to acl_library_names_spec, hardcode_* to
1320         acl_hardcode_*.
1321         Reported by Ralf Wildenhues.
1322
1323 2007-01-08  Bruno Haible  <bruno@clisp.org>
1324
1325         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1326         definition.
1327         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1328         definition.
1329         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1330         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1331         definition.
1332         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1333         definition.
1334         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1335         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1336         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1337         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1338         definition.
1339         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1340         definition.
1341         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1342         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1343         GC_USE_<algorithm>.
1344         * lib/gc-libgcrypt.c: Likewise.
1345         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1346         * modules/gc-arctwo (configure.ac): Likewise.
1347         * modules/gc-des (configure.ac): Likewise.
1348         * modules/gc-hmac-md5 (configure.ac): Likewise.
1349         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1350         * modules/gc-md2 (configure.ac): Likewise.
1351         * modules/gc-md4 (configure.ac): Likewise.
1352         * modules/gc-md5 (configure.ac): Likewise.
1353         * modules/gc-random (configure.ac): Likewise.
1354         * modules/gc-rijndael (configure.ac): Likewise.
1355         * modules/gc-sha1 (configure.ac): Likewise.
1356
1357 2007-01-08  Bruno Haible  <bruno@clisp.org>
1358
1359         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1360         macro definition.
1361         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1362         definition.
1363         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1364         definition.
1365         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1366         * modules/fcntl-safer (configure.ac): Likewise.
1367         * modules/fopen-safer (configure.ac): Likewise.
1368         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1369         GNULIB_FWRITEERROR macro definition.
1370
1371 2007-01-08  Bruno Haible  <bruno@clisp.org>
1372
1373         * m4/gnulib-common.m4: New file.
1374         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1375         (func_get_filelist): Add m4/gnulib-common.m4.
1376
1377 2007-01-08  Bruno Haible  <bruno@clisp.org>
1378
1379         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1380         command.
1381
1382 2007-01-08  Jim Meyering  <jim@meyering.net>
1383
1384         Use a more robust test for a "can't happen" condition.
1385         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1386         narrowed the st_size value.  Presuming the "can't happen" condition
1387         is true, that narrowing could conceivably convert an invalid st_size
1388         value into a valid one.  Instead, use a change based on Matthew
1389         Woehlke's original patch.
1390
1391         Slight readability improvement: use an assert-like macro
1392         in place of literal "abort ()" uses.
1393         * lib/fts.c (fts_assert): Define.
1394         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1395         Use this macro instead of a bare 'abort'.
1396
1397 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1398
1399         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1400         simply work around them.
1401         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1402         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1403         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1404         Don't bother to define as macros, since the standard doesn't require it.
1405         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1406         longer worry about IRIX 5.3.
1407         (HAVE_WCTYPE_CTMP_BUG): Remove.
1408
1409 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1410
1411         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1412         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1413         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1414         Problems reported by Georg Schwarz for IRIX 5.3.
1415
1416         * gnulib-tool (autoconf_minversion): Take the maximum version number
1417         found, not the minimum.  Problem reported by James Youngman.
1418
1419 2007-01-03  Karl Berry  <karl@gnu.org>
1420
1421         * doc/error.texi: new file, explaining interaction with progname.
1422         * doc/gnulib.texi: include it.  Update copyright.
1423
1424 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1425
1426         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1427         AC_CANONICAL_HOST, to improve autobuild outputs.
1428
1429 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1430             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1431
1432         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1433         sockets, server sockets, and other file descriptors.  Count errors
1434         to compute the return value.  Reorder the code a bit to be easier
1435         to follow.  Don't set event bits that were not requested (except
1436         POLLERR and POLLHUP).
1437
1438 2007-01-01  Bruno Haible  <bruno@clisp.org>
1439
1440         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1441
1442 2007-01-03  Jim Meyering  <jim@meyering.net>
1443
1444         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1445
1446 2007-01-02  Bruno Haible  <bruno@clisp.org>
1447
1448         * modules/settime (Include): Require timespec.h.
1449         * modules/nanosleep (Include): Likewise.
1450
1451 2007-01-01  Bruno Haible  <bruno@clisp.org>
1452
1453         * gnulib-tool (func_emit_copyright_notice): Bump year.
1454         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1455
1456 2007-01-01  Bruno Haible  <bruno@clisp.org>
1457
1458         Improve support for OpenBSD.
1459         * build-aux/config.rpath (libname_spec): Export.
1460         (library_names_spec): New variable. Export.
1461         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
1462         library_names_spec from the config.rpath output. Locate shared library
1463         through the name pattern in library_names_spec.
1464
1465 2007-01-01  Eric Blake  <ebb9@byu.net>
1466
1467         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1468
1469 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1470
1471         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1472         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1473         assume the C locale, and avoid an "eval" that could cause trouble.
1474         Problem with SORT reported by Bob Proulx.
1475
1476         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1477         Define.  Trivial patch from Henning Nielsen Lund, originally
1478         sent to bug-grep@gnu.org today.
1479
1480 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1481
1482         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
1483         struct stat.  Problem reported by Henning Nielsen Lund.
1484         * lib/acl.c: Include acl.h first, to check interface.  Don't
1485         bother to include sys/types.h and sys/stat.h again.
1486
1487 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1488
1489         Import the following change from libc; problem reported by
1490         Sven Verdoolaege.
1491
1492         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
1493
1494         [BZ #1373]
1495         * lib/argp.h: Remove __NTH for __argp_usage inline function.
1496
1497 2006-12-28  Jim Meyering  <jim@meyering.net>
1498
1499         * build-aux/announce-gen: Do not assume that the package
1500         builds any of tar.gz, tar.bz2, and .xdelta files.
1501         Suggestion from Simon Josefsson.
1502
1503 2006-12-28  Simon Josefsson  <simon@josefsson.org>
1504
1505         * modules/announce-gen: New file.
1506
1507 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
1508
1509         * lib/mbchar.h: Just include <wctype.h>; the wctype module
1510         handles its gotchas now.
1511         * lib/mbswidth.c: Likewise.
1512         * lib/wcwidth.h: Likewise.
1513         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
1514         and iswcntrl; the wctype module does this stuff now.
1515         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1516         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1517         * modules/mbchar (Depends-on): Add wctype.
1518         * modules/mbswidth (Depends-on): Likewise.
1519         * modules/wcwidth (Depends-on): Likewise.
1520
1521 2006-12-27  Eric Blake  <ebb9@byu.net>
1522
1523         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
1524         module uses more than what <wctype.h> is required to provide.
1525
1526 2006-12-26  Eric Blake  <ebb9@byu.net>
1527
1528         * gnulib-tool (sed_extract_prog): Avoid space-tab.
1529
1530 2006-12-26  Eric Blake  <ebb9@byu.net>
1531
1532         * modules/absolute-header: New module.
1533         * modules/fcntl (Depends-on): Depend on it.
1534         * modules/inttypes (Depends-on): Likewise.
1535         * modules/stdint (Depends-on): Likewise.
1536         * modules/sys_stat (Depends-on): Likewise.
1537         * modules/wctype (Depends-on): Likewise.
1538         * MODULES.html.sh (Support for building libraries and
1539         executables): Document it.
1540
1541 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1542
1543         * gnulib-tool (SED): Remove, undoing previous change.
1544         The problem was that it broke coreutils on Solaris, because
1545         "sed --posix" leaked into a makefile.
1546         (sed): New alias, if 'alias' and GNU sed.
1547
1548 2006-12-24  Jim Meyering  <jim@meyering.net>
1549
1550         Work around an fchownat bug in glibc-2.4:
1551         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1552         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1553         in spite of the -P option.
1554         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1555         New macros.
1556         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1557         * modules/openat (Files): Add lib/fchownat.c.
1558         * lib/openat.c (fchownat): Don't define here.  Move to...
1559         * lib/fchownat.c: ...this new file.
1560
1561 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1562
1563         Fix bug reported by Bruno Haible in
1564         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1565         where quotearg.c didn't compile on Mac OS X 10.2 because it
1566         lacks <wchar.h> and wint_t.
1567         * lib/wctype_.h (__wctype_wint_t): New type.
1568         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1569         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1570         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1571         Arg is now of type __wctype_wint_t, not wint_t.
1572         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1573         substitute HAVE_WINT_T.
1574         * modules/wctype (Files): Add m4/wint_t.m4.
1575         (wctype.h): Substitute HAVE_WINT_T.
1576
1577 2006-12-23  Bruno Haible  <bruno@clisp.org>
1578
1579         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1580
1581 2006-12-23  Bruno Haible  <bruno@clisp.org>
1582
1583         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1584         S_ISLNK.
1585         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1586         mingw.
1587
1588 2006-12-22  Bruno Haible  <bruno@clisp.org>
1589
1590         * lib/copy-file.c: Include acl.h.
1591         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1592         Close the file descriptors only after being done with copy_acl.
1593         * modules/copy-file (Depends-on): Add acl.
1594
1595 2006-12-22  Bruno Haible  <bruno@clisp.org>
1596
1597         * gnulib-tool (SED): New variable.
1598         Use $SED instead of sed everywhere.
1599
1600 2006-12-22  Bruno Haible  <bruno@clisp.org>
1601
1602         * modules/no-c++: New file.
1603         * m4/no-c++.m4: New file.
1604         * MODULES.html.sh (Support for building libraries and executables):
1605         Add no-c++.
1606
1607 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1608
1609         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1610         Include <limits.h>, and use its INT_MAX to rewrite the
1611         j loop so that it does not overflow 'int'.  Problem reported by
1612         Ralf Wildenhues in
1613         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1614         Play it safe by shifting left by 1 rather than multiplying by 2,
1615         as GCC is less likely to optimize this away when the value
1616         is signed (when it assumes overflow leads to undefined behavior).
1617         Also, don't assume time_t uses two's complement.
1618
1619 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1620
1621         * MODULES.html.sh: New module wctype.
1622         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1623         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1624         <wctype.h>, since the new wctype module should fix this.
1625         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1626         the wctype module should arrange for it.
1627         * lib/regex_internal.h: Likewise.
1628         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1629         since the wctype module should handle this now.
1630         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1631         * modules/fnmatch (Depends-on): Add wctype.
1632         * modules/quotearg (Depends-on): Likewise.
1633         * modules/regex (Depends-on): Likewise.
1634
1635 2006-12-19  Bruno Haible  <bruno@clisp.org>
1636
1637         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1638         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1639
1640 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1641
1642         * modules/savewd (Depends-on): Fix dependency on fcntl.
1643
1644 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1645
1646         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1647         conforms to C99, rather than relying on the user's environment
1648         setting of STDINT_H.
1649
1650 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1651         and Eric Blake  <ebb9@byu.net>
1652
1653         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1654         This is more consistent with the other defines here.
1655         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1656         Port to z/OS.  Problem reported by Paul Gilmartin.
1657         Change local vars to use gl_ prefix rather than ac_.
1658         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1659         with other defines.
1660         * modules/double-slash-root: New module.
1661         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1662         (Depends-on): Add double-slash-root.
1663         * MODULES.html.sh (File system functions): Mention new module.
1664
1665 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1666
1667         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1668         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1669         This is for the benefit of gzip, which doesn't do i18n.
1670
1671 2006-12-12  Jim Meyering  <jim@meyering.net>
1672
1673         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1674         Reported by Andreas Schwab <schwab@suse.de>.
1675
1676 2006-12-12  Bruno Haible  <bruno@clisp.org>
1677
1678         Merge these changes.
1679         2006-09-05  Bruno Haible  <bruno@clisp.org>
1680         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1681         iconv_alloc succeeded.
1682         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1683         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1684         test for " && dest " at the end - dest is always != NULL there. Call
1685         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1686         with 2xNULL arguments, also to flush the state storage. Handle the
1687         IRIX iconv behaviour. Realloc the final result, to throw away unused
1688         memory.
1689
1690 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1691
1692         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1693         and fchmodat unconditionally, since glibc 2.4 has them.
1694         Problem reported by Arkadiusz Miskiewicz.
1695
1696 2006-12-10  Bruno Haible  <bruno@clisp.org>
1697
1698         * gnulib-tool (func_import): Show the include files only for those
1699         modules that are copied and specified.
1700         Reported by Karl Berry.
1701
1702 2006-12-08  Jim Meyering  <jim@meyering.net>
1703
1704         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1705         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1706
1707         * build-aux/announce-gen: Add two new options, both optional:
1708         --bootstrap-tools=TOOL_LIST
1709               a comma-separated list of tools, e.g.,
1710               autoconf,automake,bison,gnulib
1711         --gnulib-snapshot-date=DATE
1712               if gnulib is in the bootstrap tool list,
1713               then report this as the snapshot date.
1714               If not specified, use the current date/time.
1715               If you specify a date here, be sure it's UTC.
1716
1717 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1718
1719         * tests/test-argp-2.sh: Fix test to match actual output.
1720         (func_compare): Fix sed script to be portable.
1721
1722 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1723
1724         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1725         workaround for this case.  It is not autoconfigured now; offhand
1726         it's hard to see how to autoconfigure it.
1727
1728 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1729
1730         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1731         a directory that is about to be chowned.  Such a directory's
1732         initial file permissions should permit the owner only and this
1733         should not be changed until after the chown, since the group and
1734         other bits would be incorrect if they granted permission before
1735         the chown.
1736
1737         Fix porting problem for iswctype reported by Georg Schwarz in:
1738         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1739         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1740         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1741         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1742         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1743
1744 2006-12-03  Jim Meyering  <jim@meyering.net>
1745
1746         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1747         p->fts_statp may not yet be defined.
1748         (fts_read): Instead, set it in the caller, once p->fts_statp is
1749         sure to be defined, and corresponds to a top-level directory.
1750         This bug made du -x fail.  Here's the coreutils test case:
1751         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1752         Reported by Mike Frysinger.
1753
1754 2006-12-01  Jim Meyering  <jim@meyering.net>
1755
1756         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1757         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1758         Reported by Simon Josefsson.
1759
1760 2006-11-30  Jim Meyering  <jim@meyering.net>
1761
1762         * m4/warning.m4: Use the all-permissive copyright notice
1763         recommended by RMS (rather than LGPL).
1764         * m4/vararrays.m4: Likewise.
1765         * m4/flexmember.m4: Likewise.
1766
1767 2006-11-29  Bruno Haible  <bruno@clisp.org>
1768
1769         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1770         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1771         using +=.
1772         Reported by Simon Josefsson <simon@josefsson.org>.
1773
1774 2006-11-28  James Youngman <jay@gnu.org>
1775
1776         * README: Advise users that they might find the bug-gnulib@gnu.org
1777         and autotools-announce@gnu.org mailing lists useful.
1778
1779 2006-11-28  Bruno Haible  <bruno@clisp.org>
1780
1781         * m4/ptrdiff_max.m4: Remove file.
1782
1783 2006-11-21  Bruno Haible  <bruno@clisp.org>
1784
1785         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1786         _AC_COMPUTE_INT.
1787         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1788         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1789         _AC_COMPUTE_INT.
1790         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1791         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1792         _AC_COMPUTE_INT.
1793         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1794
1795 2006-11-28  Jim Meyering  <jim@meyering.net>
1796
1797         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
1798         warning from "gcc -Wshadow" about shadowing the builtin.
1799
1800 2006-11-27  Bruno Haible  <bruno@clisp.org>
1801
1802         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
1803         _AC_COMPUTE_INT.
1804         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1805
1806 2006-11-27  Bruno Haible  <bruno@clisp.org>
1807             Paul Eggert  <eggert@cs.ucla.edu>
1808
1809         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
1810
1811 2006-11-26  Bruno Haible  <bruno@clisp.org>
1812
1813         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1814         noinst_LTLIBRARIES.
1815
1816 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
1817             Bruno Haible  <bruno@clisp.org>
1818
1819         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
1820         if compiling with "gcc -ansi".
1821
1822 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1823
1824         Fix some incompatibilities with gcc -ansi -pedantic.
1825         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
1826         if compiling pedantically with GCC, unless it's C99 or later.
1827         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
1828         it mishandles gcc -ansi -pedantic as well.
1829         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
1830         if gcc -pedantic.
1831         * lib/regexec.c (check_node_accept_bytes): Don't use auto
1832         initializers for struct if -pedantic, unless it's C99 or later.
1833
1834 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
1835
1836         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
1837         Don't close an fd more than once. Identical atimes indicate
1838         success, not failure.
1839
1840 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
1841
1842         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
1843
1844 2006-11-23  Jim Meyering  <jim@meyering.net>
1845
1846         * build-aux/announce-gen: New file.  From coreutils.
1847
1848 2006-11-22  Jim Meyering  <jim@meyering.net>
1849
1850         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
1851         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
1852         (fts_read): Use a temporary to narrow the overused st_size member
1853         before using it in a switch statement.  Reported by Matthew Woehlke.
1854
1855         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
1856         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
1857
1858 2006-11-20  Bruno Haible  <bruno@clisp.org>
1859
1860         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
1861         changequote instead of pairs of brackets.
1862         Reported by Andreas Schwab <schwab@suse.de>.
1863
1864 2006-11-21  Jim Meyering  <jim@meyering.net>
1865
1866         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
1867         so as to remain compatible with older compilers.
1868         Patch from Michael Deutschmann.
1869
1870 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1871
1872         * MODULES.html.sh (File system functions): Add openat.
1873
1874         * lib/openat.h (rpl_fstatat): New macro, if
1875         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
1876         (fstatat): Define to rpl_fstatat under the same conditions,
1877         unless COMPILING_FSTATAT.
1878         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
1879         seems to have the bug.
1880         * lib/fstatat.c: New file.
1881         * modules/openat (Files): Add it.
1882
1883 2006-11-20  Bruno Haible  <bruno@clisp.org>
1884
1885         * Makefile: New file.
1886
1887 2006-11-20  Jim Meyering  <jim@meyering.net>
1888
1889         The beginnings of syntax-related checks for gnulib.
1890         * lib/Makefile: New file.
1891         * lib/t-idcache: New script.  Ensure that the two halves of
1892         idcache.c stay in sync.
1893
1894         * lib/idcache.c: Adjust comments in user- and group- portions to
1895         be more accurate, and to be consistent with one another.
1896
1897 2006-11-20  Jim Meyering  <jim@meyering.net>
1898
1899         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
1900         continue using the flexible array member (thus, this module performs
1901         half as many malloc calls), with the addition that...
1902         (getgroup, getuser): Consistently record a non-match via an empty
1903         "name" string, and map an empty string match to a NULL return value.
1904         * modules/idcache (Depends-on): Re-add flexmember.
1905
1906         * lib/idcache.c (getuser): Remove all uses of the register keyword.
1907         (getuidbyname, getgroup, getgidbyname): Likewise.
1908
1909         Use cleaner syntax: NULL rather than 0.
1910         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
1911
1912 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1913
1914         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
1915         It mishandled the case where the group was missing.
1916         Problem reported by Greg Schafer.
1917         * modules/idcache: Likewise.
1918
1919 2006-11-18  Jim Meyering  <jim@meyering.net>
1920
1921         * check-module (%exempt_header): Add exception for some
1922         conditionally-included headers.
1923
1924         * modules/i-ring (Depends-on): Add verify.
1925         (License): Change to LGPL.
1926
1927 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1928
1929         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
1930         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
1931         and inttostr.h.  Use snprintf rather than uinttostr, so that
1932         LGPLed code doesn't depend on GPLed.
1933
1934 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
1935
1936         * modules/inline (License): Change from GPL to LGPL.
1937
1938 2006-11-17  Jim Meyering  <jim@meyering.net>
1939
1940         * modules/d-type (License): Switch to LGPL.
1941
1942 2006-11-15  Bruno Haible  <bruno@clisp.org>
1943
1944         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
1945
1946 2006-11-15  Eric Blake  <ebb9@byu.net>
1947
1948         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
1949         the module dependency.
1950
1951 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1952             Bruno Haible  <bruno@clisp.org>
1953
1954         * gnulib-tool (func_create_testdir): Add license consistency check.
1955
1956 2006-11-15  Eric Blake  <ebb9@byu.net>
1957
1958         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
1959         random "(cached)" in configure output.
1960
1961 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1962
1963         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
1964         test for conforming inttypes.h is both announced and cached.
1965
1966         * MODULES.html.sh (seen_modules, seen_files): New variables.
1967         (func_module): Rewrite to use a few less gnulib-tool and sed
1968         invocations.  Avoid a couple of quadratic algorithms for ...
1969         (missed_modules, missed_files): ... these, with ...
1970         (func_append, func_tmpdir): ... these new functions, from
1971         gnulib-tool.  Analogously, install traps for cleanup.
1972
1973         * tests/test-gc.c (main): Remove unused variables.
1974         * tests/test-read-file.c: Include stdlib.h, for 'free'.
1975
1976 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
1977
1978         * modules/inttostr (License): Change to LGPL.
1979
1980 2006-11-14  Eric Blake  <ebb9@byu.net>
1981
1982         * modules/tempname (License): Change to LGPL.
1983
1984 2006-11-14  Eric Blake  <ebb9@byu.net>
1985
1986         * doc/functions.texi (Function Portability): *printf functions on
1987         Cygwin now understand all POSIX size specifiers.
1988
1989 2006-11-14  Bruno Haible  <bruno@clisp.org>
1990
1991         * modules/c-ctype (License): Change to LGPL.
1992
1993 2006-11-12  Bruno Haible  <bruno@clisp.org>
1994
1995         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
1996         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
1997         for GNOME libraries, for which the include files are installed in
1998         subdirectories of $prefix/include.
1999
2000 2006-11-12  Bruno Haible  <bruno@clisp.org>
2001
2002         * m4/lib-link.m4: Require at least autoconf-2.54.
2003         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
2004         name to underscores for the --with option.
2005
2006 2006-11-13  Bruno Haible  <bruno@clisp.org>
2007
2008         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
2009         the tests directory.
2010         Reported by Ralf Wildenhues.
2011
2012 2006-11-13  Bruno Haible  <bruno@clisp.org>
2013
2014         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
2015         (func_emit_initmacro_end): Undo the override here.
2016         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
2017         Works around the famous automake error in coreutils.
2018
2019 2006-11-13  Eric Blake  <ebb9@byu.net>
2020
2021         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
2022         element, not its node.
2023
2024 2006-11-12  Bruno Haible  <bruno@clisp.org>
2025
2026         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
2027         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
2028
2029 2006-11-12  Bruno Haible  <bruno@clisp.org>
2030
2031         * gnulib-tool: New option --local-symlink.
2032         (func_usage): Document it.
2033         (lsymbolic): New variable.
2034         (func_import, func_create_testdir): If --symlink was not specified,
2035         test whether --local-symlink was specified and the file comes from
2036         the local_gnulib_dir.
2037
2038 2006-11-12  Bruno Haible  <bruno@clisp.org>
2039
2040         * gnulib-tool (func_ln): New function.
2041         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
2042
2043 2006-11-12  Bruno Haible  <bruno@clisp.org>
2044
2045         Finish support for source files in subdirectories.
2046         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2047         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2048         AUTOMAKE_OPTIONS.
2049         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2050
2051 2006-11-12  Bruno Haible  <bruno@clisp.org>
2052
2053         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2054         EXTRA_lib_SOURCES augmentation.
2055         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2056
2057 2006-11-12  Jim Meyering  <jim@meyering.net>
2058
2059         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2060         file descriptors.  This also averts a failure on systems with
2061         native openat support when a traversed directory lacks "x" access.
2062         * lib/fts_.h: Include "i-ring.h"
2063         (struct FTS) [fts_fd_ring]: New member.
2064         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2065         (FCHDIR): Add parentheses.
2066         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2067         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2068         When descending, rather than simply closing the previous
2069         fts_cwd_fd value, push that file descriptor onto the ring.
2070         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2071         (fts_open): Initialize the new fd_ring member.
2072         (fts_close): Clear the ring.
2073         (fts_safe_changedir): When possible, use our new fd_ring to skip
2074         the diropen and fstat and dev/ino comparison that would normally
2075         accompany a virtual `chdir ("..")'.
2076
2077         * modules/fts (Depends-on): Add i-ring.
2078         * modules/i-ring: New module.
2079         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2080         * m4/i-ring.m4: New file.
2081
2082 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2083
2084         * gnulib-tool (func_create_testdir): Fix replacement of
2085         `build-aux' in configure.ac.  Run autotools in gltests
2086         subdirectory.
2087         (func_create_testdir, func_create_megatestdir, test): There is
2088         no need for '--force' in most autotool invocations in a new
2089         tree.  Actually fail the whole test if any of the tools, or the
2090         configure or make stages fail.
2091
2092         Sync from Automake.
2093         * build-aux/gnupload: Revert last change.  Add pointer to upload
2094         instructions of the GNU Maintenance Instructions.
2095         Suggestion by Karl Berry.
2096
2097 2006-11-10  Jim Meyering  <jim@meyering.net>
2098
2099         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
2100
2101 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2102
2103         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
2104         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
2105         (bind_textdomain_codeset) [! ENABLE_NLS]:
2106         Evaluate all the arguments.  That way, callers get compatible behavior
2107         if the arguments have side effects.  Also, it avoids some GCC
2108         diagnostics in some cases; Joel E. Denny reported problems when Bison
2109         was configured with --enable-gcc-warnigs.
2110
2111 2006-11-10  Jim Meyering  <jim@meyering.net>
2112
2113         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
2114         relevant options in CFLAGS (like -O, -fno-inline) are taken into
2115         account.
2116
2117 2006-11-10  Jim Meyering  <jim@meyering.net>
2118
2119         * modules/inline: New file/module.
2120         * modules/xalloc (Files): Remove m4/inline.m4.
2121         (Depends-on): Add inline, instead.
2122         * modules/oset: Likewise.
2123         * modules/list: Likewise.
2124
2125 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2126
2127         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
2128         Problem reported by Matthew Woehlke.
2129
2130 2006-11-09  Bruno Haible  <bruno@clisp.org>
2131
2132         * lib/tempname.c (gen_tempname): Remove variant that invokes
2133         __gen_tempname.
2134         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
2135         __gen_tempname.
2136
2137 2006-11-08  Bruno Haible  <bruno@clisp.org>
2138
2139         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
2140         to 'yes' instead of 'cross-compiling'.
2141
2142 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
2143
2144         * lib/quotearg.h (quotearg_free): New decl.
2145         * lib/quotearg.c (quotearg_free): New function.
2146         (slot0, nslots, slotvec0, slotvec):
2147         Now file-scope so that quotearg_free can get at them.
2148
2149 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2150
2151         Sync from Automake.
2152         * build-aux/gnupload: Add missing 'gnu' to example URL.
2153         Report by Karl Berry.
2154
2155 2006-11-08  Bruno Haible  <bruno@clisp.org>
2156
2157         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
2158         Suggested by Paul Eggert.
2159
2160 2006-11-08  Jim Meyering  <jim@meyering.net>
2161
2162         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
2163         It's already included if !_LIBC.
2164         (fts_safe_changedir): Add a comment.
2165
2166 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2167
2168         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
2169         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
2170         Matthew Woehlke.
2171
2172         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
2173         definitions up, to avoid colliding with change below.
2174         (static_inline) [HAVE_INLINE]: New macro.
2175         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
2176         Provide extern decls when !HAVE_INLINE.  Do not define unless
2177         static_inline is defined, either by us or by xmalloc.c.  Use
2178         static_inline rather than static inline.
2179         (XCALLOC): Optimize sizeof(T) = 1 case.
2180         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2181
2182 2006-11-07  Bruno Haible  <bruno@clisp.org>
2183
2184         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
2185         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
2186         AC_C_INLINE.
2187         * modules/xalloc (Files): Add m4/inline.m4.
2188
2189 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2190
2191         * README: Fix typo.
2192         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
2193         (Miscellanous Notes): ...from this.
2194
2195 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2196
2197         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
2198         Mention that offsetof should be used instead of sizeof.
2199         From Bruno Haible.
2200
2201 2006-11-07  Bruno Haible  <bruno@clisp.org>
2202
2203         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
2204
2205 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2206
2207         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2208         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
2209         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2210         (gl_tree_add_before, gl_tree_add_after):
2211         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
2212         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
2213         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2214         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
2215         (gl_linked_add_after, gl_linked_add_at): Likewise.
2216         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
2217         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2218         (gl_tree_add_before, gl_tree_add_after): Likewise.
2219         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
2220         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
2221         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
2222
2223 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2224
2225         * lib/gl_oset.h: Use C comment style, not C++ comment style.
2226
2227 2006-11-06  Bruno Haible  <bruno@clisp.org>
2228
2229         * m4/inline.m4: New file.
2230         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
2231         * modules/list (Files): Add m4/inline.m4.
2232         * modules/oset (Files): Likewise.
2233
2234 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2235
2236         * lib/idcache.c: Include <stddef.h>, for offsetof.
2237         (struct userid.name): Change from char * to a flexible array member.
2238         All uses changed.
2239         * modules/idcache (Depends-on): Add flexmember.
2240
2241         * MODULES.html.sh (Core language properties): New module flexmember.
2242         * modules/flexmember, m4/flexmember.m4: New files.
2243
2244         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
2245         inline functions that are identical with the old xnmalloc_inline,
2246         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
2247         that we can avoid some unnecessary integer multiplications and
2248         divisions in the common case where the element size is known at
2249         compile time.
2250         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
2251         needed.
2252         (xnboundedmalloc): Remove.
2253         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
2254         arguments, for consistency with rest of this header.
2255         (xcharalloc): Rewrite using XNMALLOC.
2256         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
2257         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
2258         versions have been moved to lib/xalloc.h and renamed to be the
2259         non-*_inline versions.
2260         (xmalloc, xrealloc): Implement without reference to the xnmalloc
2261         and xnrealloc functions, since those functions are now inline and
2262         now call us.
2263         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
2264         renaming described above.
2265         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
2266         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
2267         captures the dependency in AC_C_INLINE.
2268
2269         New module canonicalize-lgpl, proposed by Charles Wilson in
2270         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
2271         with a few small changes afterwards.
2272         * MODULES.html.sh (File system functions): New module
2273         canonicalize-lgpl.
2274         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
2275         and canonicalize_file_name.
2276         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
2277         * modules/canonicalize-lgpl: New files.
2278
2279 2006-11-05  Bruno Haible  <bruno@clisp.org>
2280
2281         * gnulib-tool (func_import, func_create_testdir): Create directories
2282         also for files in subdirectories of lib/.
2283
2284 2006-11-05  Bruno Haible  <bruno@clisp.org>
2285
2286         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
2287         ANSI C compliant.
2288
2289 2006-11-03  Bruno Haible  <bruno@clisp.org>
2290
2291         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2292         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
2293         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
2294         (xnboundedmalloc): New inline function.
2295         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
2296         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
2297         xmalloc.
2298         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
2299         xmalloc.
2300         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
2301         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
2302         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
2303         xmalloc.
2304         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2305         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
2306         xmalloc.
2307         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
2308         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2309         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
2310         xmalloc.
2311         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2312         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
2313         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2314         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
2315         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
2316         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
2317         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
2318
2319 2006-11-03  Bruno Haible  <bruno@clisp.org>
2320
2321         * lib/c-ctype.h [C++]: Define functions without name mangling.
2322         * lib/fwriteerror.h [C++]: Likewise.
2323         * lib/gcd.h [C++]: Likewise.
2324         * lib/linebreak.h [C++]: Likewise.
2325
2326 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2327
2328         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2329         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2330         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2331         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2332         Check for functions and headers just once.
2333         Check for declaration of canonicalize_file_name.
2334         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2335
2336 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2337
2338         * gnulib-tool (func_import): Fix typo in actioncmd.
2339
2340 2006-11-02  Bruno Haible  <bruno@clisp.org>
2341
2342         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2343         newline sequence in the Makefile.am snippet as a space, like "make"
2344         does.
2345         Reported by Roger Persson <perrog@gmail.com>.
2346
2347 2006-11-01  Bruno Haible  <bruno@clisp.org>
2348
2349         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2350         already declared in <string.h>.
2351         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2352
2353 2006-11-01  Bruno Haible  <bruno@clisp.org>
2354
2355         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2356         * lib/strcase.h: Include <string.h>.
2357         (strcasecmp): Define to rpl_strcasecmp here.
2358
2359 2006-11-01  Bruno Haible  <bruno@clisp.org>
2360
2361         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2362
2363 2006-11-01  Eric Blake  <ebb9@byu.net>
2364
2365         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2366
2367         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2368
2369 2006-10-29  Bruno Haible  <bruno@clisp.org>
2370
2371         Make it compile in C++ mode.
2372         * lib/full-write.c (full_rw): Add a cast.
2373
2374 2006-11-01  Bruno Haible  <bruno@clisp.org>
2375
2376         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2377         be POSIX compliant.
2378         Reported by Roger Persson <perrog@gmail.com>.
2379
2380 2006-11-01  Eric Blake  <ebb9@byu.net>
2381
2382         * lib/getopt_.h: Fix comments.
2383
2384 2006-10-31  Eric Blake  <ebb9@byu.net>
2385
2386         * modules/tmpdir (Depends-on): Add sys_stat.
2387         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2388         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2389         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2390         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2391         tempname.
2392
2393 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2394
2395         Avoid some C++ diagnostics reported by Bruno Haible.
2396         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2397         xmalloc.
2398         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2399         (struct slotvec): Move to top level.
2400         (quotearg_n_options): Rewrite to avoid xmalloc.
2401         * lib/xalloc.h (xcharalloc): New function.
2402         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2403         [defined __cplusplus]: Add function template that provides result
2404         type propagation.  This part of the change is from Bruno Haible.
2405
2406 2006-10-29  Bruno Haible  <bruno@clisp.org>
2407
2408         Make it compile in C++ mode.
2409         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2410         * lib/strnlen1.c (strnlen1): Cast memchr result.
2411         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2412         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2413         (create_temp_dir): Rename local variable 'template'.
2414         (compile_csharp_using_sscli): Add cast.
2415         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2416         * lib/findprog.c (find_in_path): Likewise.
2417         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2418         * lib/wait-process.c (register_slave_subprocess): Likewise.
2419
2420 2006-10-22  Bruno Haible  <bruno@clisp.org>
2421
2422         * modules/tsearch: New file.
2423         * lib/tsearch.h: New file.
2424         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2425         * m4/tsearch.m4: New file.
2426         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2427
2428 2006-10-29  Eric Blake  <ebb9@byu.net>
2429
2430         * lib/arcfour.c: Assume config.h.
2431         * lib/arctwo.c: Likewise.
2432         * lib/base64.c: Likewise.
2433         * lib/check-version.c: Likewise.
2434         * lib/crc.c: Likewise.
2435         * lib/des.c: Likewise.
2436         * lib/gc-gnulib.c: Likewise.
2437         * lib/gc-libgcrypt.c: Likewise.
2438         * lib/gc-pbkdf2-sha1.c: Likewise.
2439         * lib/getaddrinfo.c: Likewise.
2440         * lib/getdelim.c: Likewise.
2441         * lib/getline.c: Likewise.
2442         * lib/hmac-md5.c: Likewise.
2443         * lib/hmac-sha1.c: Likewise.
2444         * lib/iconvme.c: Likewise.
2445         * lib/md2.c: Likewise.
2446         * lib/md4.c: Likewise.
2447         * lib/memxor.c: Likewise.
2448         * lib/read-file.c: Likewise.
2449         * lib/readline.c: Likewise.
2450         * lib/rijndael-alg-fst.c: Likewise.
2451         * lib/rijndael-api-fst.c: Likewise.
2452         * lib/xgetdomainname.c: Likewise.
2453
2454 2006-10-28  Eric Blake  <ebb9@byu.net>
2455
2456         * lib/xstrndup.c: Assume config.h.
2457
2458 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
2459
2460         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
2461         stat-macros.h is now for our own macros, whereas stat_h is for
2462         macros in the <sys/stat.h> name space.
2463         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
2464         (STAT_MACROS_H): Remove.
2465         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2466         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2467         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2468         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2469         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2470         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2471         Move these macros to ...
2472         * lib/stat_.h: here.  Don't include stat-macros.h.
2473         * lib/canonicalize.c: Don't include stat-macros.h.
2474         * lib/chown.c: Likewise.
2475         * lib/euidaccess.c: Likewise.
2476         * lib/file-type.c: Likewise.
2477         * lib/filemode.c: Likewise.
2478         * lib/glob.c: Likewise.
2479         * lib/isapipe.c: Likewise.
2480         * lib/lchown.c: Likewise.
2481         * lib/lstat.c: Likewise.
2482         * lib/mkdir-p.c: Likewise.
2483         * lib/rmdir.c: Likewise.
2484         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
2485         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
2486         unless mkdir isn't declared, to speed up 'configure'.
2487         Always create sys/stat.h, since it's unlikely any real sys/stat.h
2488         would define all the S_* symbols.
2489         * modules/canonicalize (Depends-on):
2490         Depend on sys_stat, not stat-macros.
2491         * modules/chown: Likewise.
2492         * modules/euidaccess: Likewise.
2493         * modules/filemode: Likewise.
2494         * modules/file-type: Likewise.
2495         * modules/glob: Likewise.
2496         * modules/isapipe: Likewise.
2497         * modules/lchown: Likewise.
2498         * modules/lstat: Likewise.
2499         * modules/mkancesdirs: Likewise.
2500         * modules/rmdir: Likewise.
2501         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
2502         * modules/modechange: Likewise.
2503         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
2504         (configure.ac): Remove gl_STAT_MACROS.
2505         * modules/sys_stat (Depends-on): Remove stat-macros.
2506
2507 2006-10-27  Bruno Haible  <bruno@clisp.org>
2508
2509         * m4/signed.m4: Remove file.
2510         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
2511         invocation.
2512         * modules/vasnprintf (Files): Remove m4/signed.m4.
2513
2514 2006-10-27  Bruno Haible  <bruno@clisp.org>
2515
2516         Update to GNU gettext 0.16.
2517         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
2518         m4/inttypes-h.m4, m4/signed.m4.
2519         * m4/gettext.m4: Update to GNU gettext 0.16.
2520         * m4/intl.m4: New file, from GNU gettext.
2521         * m4/intldir.m4: New file, from GNU gettext.
2522         * config/srclist.txt: Update
2523
2524 2006-10-27  Eric Blake  <ebb9@byu.net>
2525
2526         * MODULES.html.sh: Document tempname.
2527         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
2528         dependencies.
2529         (Files): Move lib/tempname.c...
2530         * modules/tempname: ...to this new module.
2531         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2532         (gl_PREREQ_TEMPNAME): Move...
2533         * m4/tempname.m4: ...to this new file.
2534         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2535         * modules/sys_stat (Depends-on): Add stat-macros.
2536         * lib/stat_.h (includes): Pick up stat macros.
2537         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2538         if stat macros are broken.
2539         * lib/tempname.c (includes): No need to include "stat-macros.h".
2540         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2541         (direxists, __path_search) [!_LIBC]: Don't compile these in
2542         gnulib; the tmpdir module covers that.
2543         * lib/tempname.h: New file.
2544
2545 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2546
2547         * COPYING: Explain how gnulib-tool converts licence headers.
2548         Almost all wording by Eric Blake.
2549
2550 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2551
2552         * lib/mbchar.h (is_basic_table): Make read-only.
2553         * lib/mbchar.c (is_basic_table): Likewise.
2554         Reported by John Darrington.
2555
2556 2006-10-25  Bruno Haible  <bruno@clisp.org>
2557
2558         * lib/progname.h (set_program_name): Undefine before defining.
2559
2560 2006-10-25  Bruno Haible  <bruno@clisp.org>
2561
2562         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2563         false for non-gcc C++ compilers.
2564         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2565
2566 2006-10-24  Bruno Haible  <bruno@clisp.org>
2567
2568         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2569         iconv implementations like Irix iconv.
2570
2571 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2572
2573         * modules/vararrays: New file.
2574         * m4/vararrays.m4: New file, taken from diffutils.
2575         * MODULES.html.sh: New module vararrays.
2576
2577 2006-10-24  Karl Berry  <karl@gnu.org>
2578
2579         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2580         Don't call GNU Unix.
2581
2582 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2583
2584         * users.txt: Add Libtool.
2585
2586         Sync from Libtool:
2587
2588         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2589
2590         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2591         to gnulib's policy of including config.h unconditionally.
2592
2593 2006-10-24  Bruno Haible  <bruno@clisp.org>
2594
2595         * modules/wcwidth (Files): Add m4/wint_t.m4.
2596         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2597         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2598
2599 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2600
2601         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2602         to pacify GCC with some -W flags enabled.  Problem reported by
2603         Bruno Haible.
2604
2605 2006-10-24  Jim Meyering  <jim@meyering.net>
2606
2607         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2608         Reported by Karl Berry.
2609
2610 2006-10-23  Bruno Haible  <bruno@clisp.org>
2611
2612         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2613
2614 2006-10-24  Bruno Haible  <bruno@clisp.org>
2615
2616         * lib/gl_list.h: Use C comment style, not C++ comment style.
2617
2618 2006-10-23  Eric Blake  <ebb9@byu.net>
2619
2620         * lib/getaddrinfo.c (includes): Add missing include.
2621
2622 2006-10-23  Bruno Haible  <bruno@clisp.org>
2623             Paul Eggert  <eggert@cs.ucla.edu>
2624
2625         Ability to rename obstack_free.
2626         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2627         obstack_free.
2628         (obstack_free): Invoke the __obstack_free macro.
2629         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2630
2631 2006-10-23  Bruno Haible  <bruno@clisp.org>
2632             Paul Eggert  <eggert@cs.ucla.edu>
2633
2634         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2635         __argc, __argv from the declaration. (They are defined as macros on
2636         mingw.)
2637
2638 2006-10-22  Bruno Haible  <bruno@clisp.org>
2639
2640         * doc/gnulib-intro.texi: New file.
2641         * doc/gnulib.texi: Include it.
2642
2643 2006-10-21  Bruno Haible  <bruno@clisp.org>
2644
2645         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2646         "Introduction", "Miscellanous Notes", "Particular Modules".
2647
2648 2006-10-21  Bruno Haible  <bruno@clisp.org>
2649
2650         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2651         Change mostlyclean-local rule to avoid sh syntax error from bash
2652         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2653
2654 2006-10-23  Jim Meyering  <jim@meyering.net>
2655
2656         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2657         in place of snprintf.
2658
2659         * modules/inttostr (Files): Add lib/uinttostr.c.
2660         * lib/uinttostr.c (inttostr): New file/function.
2661         * lib/inttostr.h (uinttostr): Declare.
2662         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2663         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2664         Add uinttostr.
2665         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2666
2667 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2668
2669         * lib/canonicalize.c (ELOOP): Define if not already defined.
2670         Problem reported by Bruno Haible in
2671         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2672
2673 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2674
2675         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2676         Problem reported by Perry Smith and Ville Laurikari.
2677
2678         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2679         uses.
2680
2681 2006-10-19  Bruno Haible  <bruno@clisp.org>
2682
2683         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2684         for mingw.
2685
2686 2006-10-19  Bruno Haible  <bruno@clisp.org>
2687
2688         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2689         Needed for mingw.
2690
2691 2006-10-19  Bruno Haible  <bruno@clisp.org>
2692
2693         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2694
2695 2006-10-19  Bruno Haible  <bruno@clisp.org>
2696
2697         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2698         it.
2699
2700 2006-10-19  Bruno Haible  <bruno@clisp.org>
2701
2702         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2703         invocation.
2704
2705 2006-10-19  Bruno Haible  <bruno@clisp.org>
2706
2707         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2708         mountlist by default.
2709
2710 2006-10-16  Bruno Haible  <bruno@clisp.org>
2711
2712         * lib/c-strstr.c: Include c-strstr.h.
2713
2714 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2715
2716         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2717         in a slash.
2718
2719 2006-10-18  Bruno Haible  <bruno@clisp.org>
2720
2721         * lib/lock.h [C++]: Wrap definitions in extern "C".
2722
2723 2006-10-18  Bruno Haible  <bruno@clisp.org>
2724
2725         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2726         gl_LIBOBJS list.
2727
2728 2006-10-18  Bruno Haible  <bruno@clisp.org>
2729
2730         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2731
2732 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2733
2734         * lib/xstrtol.h: Include gettext.h.
2735         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2736         Problem reported by Eric Blake.
2737         * modules/xstrtol (Depends-on): Add gettext-h.
2738
2739 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2740
2741         * lib/strftime.c (advance): New macro.
2742         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2743         incomplete type, so you can't add 0 to it.  Problem and patch
2744         reported by Eelco Dolstra for dietlibc.
2745
2746 2006-10-18  Jim Meyering  <jim@meyering.net>
2747
2748         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2749         type for a local, and rename it: s/up/user_proc/.
2750
2751 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2752
2753         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2754         READ_UTMP_USER_PROCESS.
2755         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2756
2757 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2758
2759         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2760         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2761
2762 2006-10-17  Eric Blake  <ebb9@byu.net>
2763
2764         * lib/sigprocmask.c (sigprocmask): Fix typo.
2765
2766         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2767
2768         * modules/clean-temp (Makefile.am): Don't add to make output...
2769         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2770         config.h.
2771
2772 2006-10-17  Bruno Haible  <bruno@clisp.org>
2773
2774         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2775         differently if DEFAULT_TEXT_DOMAIN is set.
2776
2777 2006-10-16  Bruno Haible  <bruno@clisp.org>
2778
2779         * lib/clean-temp.c: Include fwriteerror.h.
2780
2781 2006-10-16  Bruno Haible  <bruno@clisp.org>
2782
2783         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2784
2785 2006-10-16  Bruno Haible  <bruno@clisp.org>
2786
2787         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2788         * lib/sigprocmask.h: Include <sys/types.h>.
2789         (sigset_t): Use the system's definition if present.
2790
2791 2006-10-17  Eric Blake  <ebb9@byu.net>
2792
2793         * lib/xvasprintf.c (includes): Assume config.h.
2794         * lib/xasprintf.c (includes): Likewise.
2795
2796 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2797
2798         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
2799         at least as wide as intmax_t.
2800
2801 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
2802
2803         (Imported from Automake.)
2804         * build-aux/gnupload: Update to version 1.1 of directive file.
2805
2806 2006-10-16  Eric Blake  <ebb9@byu.net>
2807
2808         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
2809         match Automake 1.10a.
2810
2811 2006-10-14  Bruno Haible  <bruno@clisp.org>
2812
2813         * modules/sigprocmask: New file.
2814         * lib/sigprocmask.h: New file.
2815         * lib/sigprocmask.c: New file.
2816         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
2817         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
2818         request sigprocmask.o.
2819         (gl_PREREQ_SIGPROCMASK): New macro.
2820         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
2821         (Depends-on): Add sigprocmask.
2822         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
2823         gt_SIGNALBLOCKING. Test for 'raise' only once.
2824         * lib/fatal-signal.c: Include sigprocmask.h.
2825         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
2826         unblock_fatal_signals): Define always.
2827         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2828         sigprocmask.
2829
2830 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
2831
2832         Sync from Automake.
2833         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
2834         which incorrectly sets the mode of an existing destination
2835         directory.  In some cases the unpatched install-sh could do the
2836         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
2837         system.  We hope this is rare in practice, but it's clearly worth
2838         fixing.  Problem reported by Alex Unleashed in
2839         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
2840         Also, don't bother to check for -m bugs unless we're using -m;
2841         suggested by Stepan Kasal.
2842
2843 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2844
2845         Sync from Automake.
2846         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
2847         `-c' flag, so they appear at the same position as in %FASTDEP%
2848         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
2849         which ignores unknown options only after the first non-option.
2850         Bug report against M4 by Nelson H. F. Beebe.
2851
2852 2006-10-13  Jim Meyering  <jim@meyering.net>
2853
2854         Fix a bug in yesterday's change.
2855         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
2856         p->fts_statp->st_dev would be used uninitialized.
2857         Ensures that we always call fts_stat on the very first entry.
2858         Miklos Szeredi reported that find -xdev stopped working.
2859
2860 2006-10-12  Bruno Haible  <bruno@clisp.org>
2861
2862         * gnulib-tool (func_get_automake_snippet): Append an automatically
2863         computed EXTRA_DIST augmentation.
2864         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
2865         * modules/alloca-opt (Makefile.am): Likewise.
2866         * modules/allocsa (Makefile.am): Likewise.
2867         * modules/arcfour (Makefile.am): Likewise.
2868         * modules/arctwo (Makefile.am): Likewise.
2869         * modules/argmatch (Makefile.am): Likewise.
2870         * modules/argz (Makefile.am): Likewise.
2871         * modules/atexit (Makefile.am): Likewise.
2872         * modules/backupfile (Makefile.am): Likewise.
2873         * modules/byteswap (Makefile.am): Likewise.
2874         * modules/c-strtod (Makefile.am): Likewise.
2875         * modules/c-strtold (Makefile.am): Likewise.
2876         * modules/calloc (Makefile.am): Likewise.
2877         * modules/canon-host (Makefile.am): Likewise.
2878         * modules/canonicalize (Makefile.am): Likewise.
2879         * modules/chdir-long (Makefile.am): Likewise.
2880         * modules/chdir-safer (Makefile.am): Likewise.
2881         * modules/check-version (Makefile.am): Likewise.
2882         * modules/chown (Makefile.am): Likewise.
2883         * modules/cloexec (Makefile.am): Likewise.
2884         * modules/close-stream (Makefile.am): Likewise.
2885         * modules/closeout (Makefile.am): Likewise.
2886         * modules/crc (Makefile.am): Likewise.
2887         * modules/csharpexec (Makefile.am): Likewise.
2888         * modules/cycle-check (Makefile.am): Likewise.
2889         * modules/des (Makefile.am): Likewise.
2890         * modules/dev-ino (Makefile.am): Likewise.
2891         * modules/dirfd (Makefile.am): Likewise.
2892         * modules/dirname (Makefile.am): Likewise.
2893         * modules/dup2 (Makefile.am): Likewise.
2894         * modules/eealloc (Makefile.am): Likewise.
2895         * modules/error (Makefile.am): Likewise.
2896         * modules/euidaccess (Makefile.am): Likewise.
2897         * modules/exclude (Makefile.am): Likewise.
2898         * modules/exitfail (Makefile.am): Likewise.
2899         * modules/fcntl-safer (Makefile.am): Likewise.
2900         * modules/fcntl (Makefile.am): Likewise.
2901         * modules/file-type (Makefile.am): Likewise.
2902         * modules/fileblocks (Makefile.am): Likewise.
2903         * modules/filemode (Makefile.am): Likewise.
2904         * modules/filenamecat (Makefile.am): Likewise.
2905         * modules/fnmatch (Makefile.am): Likewise.
2906         * modules/fopen-safer (Makefile.am): Likewise.
2907         * modules/fpending (Makefile.am): Likewise.
2908         * modules/fprintftime (Makefile.am): Likewise.
2909         * modules/free (Makefile.am): Likewise.
2910         * modules/fsusage (Makefile.am): Likewise.
2911         * modules/ftruncate (Makefile.am): Likewise.
2912         * modules/fts (Makefile.am): Likewise.
2913         * modules/gc-arcfour (Makefile.am): Likewise.
2914         * modules/gc-des (Makefile.am): Likewise.
2915         * modules/gc-hmac-md5 (Makefile.am): Likewise.
2916         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
2917         * modules/gc-md4 (Makefile.am): Likewise.
2918         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2919         * modules/gc-sha1 (Makefile.am): Likewise.
2920         * modules/gc (Makefile.am): Likewise.
2921         * modules/getaddrinfo (Makefile.am): Likewise.
2922         * modules/getcwd (Makefile.am): Likewise.
2923         * modules/getdelim (Makefile.am): Likewise.
2924         * modules/getdomainname (Makefile.am): Likewise.
2925         * modules/getgroups (Makefile.am): Likewise.
2926         * modules/gethostname (Makefile.am): Likewise.
2927         * modules/gethrxtime (Makefile.am): Likewise.
2928         * modules/getline (Makefile.am): Likewise.
2929         * modules/getloadavg (Makefile.am): Likewise.
2930         * modules/getlogin_r (Makefile.am): Likewise.
2931         * modules/getndelim2 (Makefile.am): Likewise.
2932         * modules/getopt (Makefile.am): Likewise.
2933         * modules/getpagesize (Makefile.am): Likewise.
2934         * modules/getpass-gnu (Makefile.am): Likewise.
2935         * modules/getpass (Makefile.am): Likewise.
2936         * modules/getsubopt (Makefile.am): Likewise.
2937         * modules/gettime (Makefile.am): Likewise.
2938         * modules/gettimeofday (Makefile.am): Likewise.
2939         * modules/getugroups (Makefile.am): Likewise.
2940         * modules/getusershell (Makefile.am): Likewise.
2941         * modules/glob (Makefile.am): Likewise.
2942         * modules/group-member (Makefile.am): Likewise.
2943         * modules/hard-locale (Makefile.am): Likewise.
2944         * modules/hash (Makefile.am): Likewise.
2945         * modules/hmac-md5 (Makefile.am): Likewise.
2946         * modules/hmac-sha1 (Makefile.am): Likewise.
2947         * modules/human (Makefile.am): Likewise.
2948         * modules/idcache (Makefile.am): Likewise.
2949         * modules/imaxabs (Makefile.am): Likewise.
2950         * modules/imaxdiv (Makefile.am): Likewise.
2951         * modules/inet_ntop (Makefile.am): Likewise.
2952         * modules/inet_pton (Makefile.am): Likewise.
2953         * modules/intprops (Makefile.am): Likewise.
2954         * modules/inttostr (Makefile.am): Likewise.
2955         * modules/inttypes (Makefile.am): Likewise.
2956         * modules/isapipe (Makefile.am): Likewise.
2957         * modules/javaversion (Makefile.am): Likewise.
2958         * modules/lchmod (Makefile.am): Likewise.
2959         * modules/lchown (Makefile.am): Likewise.
2960         * modules/localcharset (Makefile.am): Likewise.
2961         * modules/long-options (Makefile.am): Likewise.
2962         * modules/lstat (Makefile.am): Likewise.
2963         * modules/malloc (Makefile.am): Likewise.
2964         * modules/mathl (Makefile.am): Likewise.
2965         * modules/mbchar (Makefile.am): Likewise.
2966         * modules/md2 (Makefile.am): Likewise.
2967         * modules/md4 (Makefile.am): Likewise.
2968         * modules/md5 (Makefile.am): Likewise.
2969         * modules/memcasecmp (Makefile.am): Likewise.
2970         * modules/memchr (Makefile.am): Likewise.
2971         * modules/memcmp (Makefile.am): Likewise.
2972         * modules/memcoll (Makefile.am): Likewise.
2973         * modules/memcpy (Makefile.am): Likewise.
2974         * modules/memmem (Makefile.am): Likewise.
2975         * modules/memmove (Makefile.am): Likewise.
2976         * modules/mempcpy (Makefile.am): Likewise.
2977         * modules/memrchr (Makefile.am): Likewise.
2978         * modules/memset (Makefile.am): Likewise.
2979         * modules/memxor (Makefile.am): Likewise.
2980         * modules/mkancesdirs (Makefile.am): Likewise.
2981         * modules/mkdir-p (Makefile.am): Likewise.
2982         * modules/mkdir (Makefile.am): Likewise.
2983         * modules/mkdtemp (Makefile.am): Likewise.
2984         * modules/mkstemp (Makefile.am): Likewise.
2985         * modules/mktime (Makefile.am): Likewise.
2986         * modules/modechange (Makefile.am): Likewise.
2987         * modules/mountlist (Makefile.am): Likewise.
2988         * modules/nanosleep (Makefile.am): Likewise.
2989         * modules/obstack (Makefile.am): Likewise.
2990         * modules/openat (Makefile.am): Likewise.
2991         * modules/pagealign_alloc (Makefile.am): Likewise.
2992         * modules/pathmax (Makefile.am): Likewise.
2993         * modules/physmem (Makefile.am): Likewise.
2994         * modules/poll (Makefile.am): Likewise.
2995         * modules/posixtm (Makefile.am): Likewise.
2996         * modules/posixver (Makefile.am): Likewise.
2997         * modules/putenv (Makefile.am): Likewise.
2998         * modules/quote (Makefile.am): Likewise.
2999         * modules/quotearg (Makefile.am): Likewise.
3000         * modules/raise (Makefile.am): Likewise.
3001         * modules/read-file (Makefile.am): Likewise.
3002         * modules/readline (Makefile.am): Likewise.
3003         * modules/readlink (Makefile.am): Likewise.
3004         * modules/readtokens (Makefile.am): Likewise.
3005         * modules/readutmp (Makefile.am): Likewise.
3006         * modules/realloc (Makefile.am): Likewise.
3007         * modules/regex (Makefile.am): Likewise.
3008         * modules/rename-dest-slash (Makefile.am): Likewise.
3009         * modules/rename (Makefile.am): Likewise.
3010         * modules/rijndael (Makefile.am): Likewise.
3011         * modules/rmdir (Makefile.am): Likewise.
3012         * modules/rpmatch (Makefile.am): Likewise.
3013         * modules/safe-read (Makefile.am): Likewise.
3014         * modules/safe-write (Makefile.am): Likewise.
3015         * modules/same-inode (Makefile.am): Likewise.
3016         * modules/same (Makefile.am): Likewise.
3017         * modules/save-cwd (Makefile.am): Likewise.
3018         * modules/savedir (Makefile.am): Likewise.
3019         * modules/setenv (Makefile.am): Likewise.
3020         * modules/settime (Makefile.am): Likewise.
3021         * modules/sha1 (Makefile.am): Likewise.
3022         * modules/sig2str (Makefile.am): Likewise.
3023         * modules/snprintf (Makefile.am): Likewise.
3024         * modules/stat-macros (Makefile.am): Likewise.
3025         * modules/stat-time (Makefile.am): Likewise.
3026         * modules/stdbool (Makefile.am): Likewise.
3027         * modules/stdint (Makefile.am): Likewise.
3028         * modules/stdlib-safer (Makefile.am): Likewise.
3029         * modules/stpcpy (Makefile.am): Likewise.
3030         * modules/stpncpy (Makefile.am): Likewise.
3031         * modules/strcase (Makefile.am): Likewise.
3032         * modules/strcasestr (Makefile.am): Likewise.
3033         * modules/strchrnul (Makefile.am): Likewise.
3034         * modules/strcspn (Makefile.am): Likewise.
3035         * modules/strdup (Makefile.am): Likewise.
3036         * modules/strerror (Makefile.am): Likewise.
3037         * modules/strftime (Makefile.am): Likewise.
3038         * modules/strndup (Makefile.am): Likewise.
3039         * modules/strnlen (Makefile.am): Likewise.
3040         * modules/strpbrk (Makefile.am): Likewise.
3041         * modules/strsep (Makefile.am): Likewise.
3042         * modules/strstr (Makefile.am): Likewise.
3043         * modules/strtod (Makefile.am): Likewise.
3044         * modules/strtoimax (Makefile.am): Likewise.
3045         * modules/strtok_r (Makefile.am): Likewise.
3046         * modules/strtol (Makefile.am): Likewise.
3047         * modules/strtoll (Makefile.am): Likewise.
3048         * modules/strtoul (Makefile.am): Likewise.
3049         * modules/strtoull (Makefile.am): Likewise.
3050         * modules/strtoumax (Makefile.am): Likewise.
3051         * modules/strverscmp (Makefile.am): Likewise.
3052         * modules/sys_socket (Makefile.am): Likewise.
3053         * modules/sys_stat (Makefile.am): Likewise.
3054         * modules/sysexits (Makefile.am): Likewise.
3055         * modules/time_r (Makefile.am): Likewise.
3056         * modules/timegm (Makefile.am): Likewise.
3057         * modules/timespec (Makefile.am): Likewise.
3058         * modules/tmpfile-safer (Makefile.am): Likewise.
3059         * modules/trim (Makefile.am): Likewise.
3060         * modules/unistd-safer (Makefile.am): Likewise.
3061         * modules/unlinkdir (Makefile.am): Likewise.
3062         * modules/unlocked-io (Makefile.am): Likewise.
3063         * modules/userspec (Makefile.am): Likewise.
3064         * modules/utime (Makefile.am): Likewise.
3065         * modules/utimecmp (Makefile.am): Likewise.
3066         * modules/utimens (Makefile.am): Likewise.
3067         * modules/vasnprintf (Makefile.am): Likewise.
3068         * modules/vasprintf (Makefile.am): Likewise.
3069         * modules/vsnprintf (Makefile.am): Likewise.
3070         * modules/xalloc (Makefile.am): Likewise.
3071         * modules/xgetcwd (Makefile.am): Likewise.
3072         * modules/xnanosleep (Makefile.am): Likewise.
3073         * modules/xreadlink (Makefile.am): Likewise.
3074         * modules/xstrtod (Makefile.am): Likewise.
3075         * modules/xstrtol (Makefile.am): Likewise.
3076         * modules/xstrtold (Makefile.am): Likewise.
3077         * modules/yesno (Makefile.am): Likewise.
3078         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3079
3080 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3081
3082         * modules/error (Makefile.am): Distribute files through
3083         EXTRA_DIST, not lib_SOURCES.
3084
3085 2006-10-12  Eric Blake  <ebb9@byu.net>
3086
3087         * modules/error (Makefile.am): Distribute files in /lib.
3088         * modules/obstack (Makefile.am): Likewise.
3089
3090 2006-10-12  Bruno Haible  <bruno@clisp.org>
3091
3092         * modules/acl (Makefile.am): Distribute all files in lib/ through
3093         EXTRA_DIST.
3094         * modules/arcfour (Makefile.am): Likewise.
3095         * modules/arctwo (Makefile.am): Likewise.
3096         * modules/argmatch (Makefile.am): Likewise.
3097         * modules/argz (Makefile.am): Likewise.
3098         * modules/atexit (Makefile.am): Likewise.
3099         * modules/backupfile (Makefile.am): Likewise.
3100         * modules/c-strtod (Makefile.am): Likewise.
3101         * modules/c-strtold (Makefile.am): Likewise.
3102         * modules/calloc (Makefile.am): Likewise.
3103         * modules/canon-host (Makefile.am): Likewise.
3104         * modules/canonicalize (Makefile.am): Likewise.
3105         * modules/chdir-long (Makefile.am): Likewise.
3106         * modules/chdir-safer (Makefile.am): Likewise.
3107         * modules/check-version (Makefile.am): Likewise.
3108         * modules/chown (Makefile.am): Likewise.
3109         * modules/cloexec (Makefile.am): Likewise.
3110         * modules/close-stream (Makefile.am): Likewise.
3111         * modules/closeout (Makefile.am): Likewise.
3112         * modules/crc (Makefile.am): Likewise.
3113         * modules/cycle-check (Makefile.am): Likewise.
3114         * modules/des (Makefile.am): Likewise.
3115         * modules/dirfd (Makefile.am): Likewise.
3116         * modules/dirname (Makefile.am): Likewise.
3117         * modules/dup2 (Makefile.am): Likewise.
3118         * modules/euidaccess (Makefile.am): Likewise.
3119         * modules/exclude (Makefile.am): Likewise.
3120         * modules/exitfail (Makefile.am): Likewise.
3121         * modules/fcntl-safer (Makefile.am): Likewise.
3122         * modules/file-type (Makefile.am): Likewise.
3123         * modules/fileblocks (Makefile.am): Likewise.
3124         * modules/filemode (Makefile.am): Likewise.
3125         * modules/filenamecat (Makefile.am): Likewise.
3126         * modules/fnmatch (Makefile.am): Likewise.
3127         * modules/fopen-safer (Makefile.am): Likewise.
3128         * modules/fpending (Makefile.am): Likewise.
3129         * modules/fprintftime (Makefile.am): Likewise.
3130         * modules/free (Makefile.am): Likewise.
3131         * modules/fsusage (Makefile.am): Likewise.
3132         * modules/ftruncate (Makefile.am): Likewise.
3133         * modules/fts (Makefile.am): Likewise.
3134         * modules/gc (Makefile.am): Likewise.
3135         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3136         * modules/getaddrinfo (Makefile.am): Likewise.
3137         * modules/getcwd (Makefile.am): Likewise.
3138         * modules/getdelim (Makefile.am): Likewise.
3139         * modules/getdomainname (Makefile.am): Likewise.
3140         * modules/getgroups (Makefile.am): Likewise.
3141         * modules/gethostname (Makefile.am): Likewise.
3142         * modules/gethrxtime (Makefile.am): Likewise.
3143         * modules/getline (Makefile.am): Likewise.
3144         * modules/getloadavg (Makefile.am): Likewise.
3145         * modules/getlogin_r (Makefile.am): Likewise.
3146         * modules/getopt (Makefile.am): Likewise.
3147         * modules/getpass (Makefile.am): Likewise.
3148         * modules/getpass-gnu (Makefile.am): Likewise.
3149         * modules/getsubopt (Makefile.am): Likewise.
3150         * modules/gettime (Makefile.am): Likewise.
3151         * modules/gettimeofday (Makefile.am): Likewise.
3152         * modules/getugroups (Makefile.am): Likewise.
3153         * modules/getusershell (Makefile.am): Likewise.
3154         * modules/glob (Makefile.am): Likewise.
3155         * modules/group-member (Makefile.am): Likewise.
3156         * modules/hard-locale (Makefile.am): Likewise.
3157         * modules/hash (Makefile.am): Likewise.
3158         * modules/hmac-md5 (Makefile.am): Likewise.
3159         * modules/hmac-sha1 (Makefile.am): Likewise.
3160         * modules/human (Makefile.am): Likewise.
3161         * modules/idcache (Makefile.am): Likewise.
3162         * modules/imaxabs (Makefile.am): Likewise.
3163         * modules/imaxdiv (Makefile.am): Likewise.
3164         * modules/inet_ntop (Makefile.am): Likewise.
3165         * modules/inet_pton (Makefile.am): Likewise.
3166         * modules/inttostr (Makefile.am): Likewise.
3167         * modules/isapipe (Makefile.am): Likewise.
3168         * modules/lchown (Makefile.am): Likewise.
3169         * modules/long-options (Makefile.am): Likewise.
3170         * modules/lstat (Makefile.am): Likewise.
3171         * modules/malloc (Makefile.am): Likewise.
3172         * modules/mathl (Makefile.am): Likewise.
3173         * modules/mbchar (Makefile.am): Likewise.
3174         * modules/md2 (Makefile.am): Likewise.
3175         * modules/md4 (Makefile.am): Likewise.
3176         * modules/md5 (Makefile.am): Likewise.
3177         * modules/memcasecmp (Makefile.am): Likewise.
3178         * modules/memchr (Makefile.am): Likewise.
3179         * modules/memcmp (Makefile.am): Likewise.
3180         * modules/memcoll (Makefile.am): Likewise.
3181         * modules/memcpy (Makefile.am): Likewise.
3182         * modules/memmem (Makefile.am): Likewise.
3183         * modules/memmove (Makefile.am): Likewise.
3184         * modules/mempcpy (Makefile.am): Likewise.
3185         * modules/memrchr (Makefile.am): Likewise.
3186         * modules/memset (Makefile.am): Likewise.
3187         * modules/memxor (Makefile.am): Likewise.
3188         * modules/mkancesdirs (Makefile.am): Likewise.
3189         * modules/mkdir (Makefile.am): Likewise.
3190         * modules/mkdir-p (Makefile.am): Likewise.
3191         * modules/mkdtemp (Makefile.am): Likewise.
3192         * modules/mkstemp (Makefile.am): Likewise.
3193         * modules/mktime (Makefile.am): Likewise.
3194         * modules/modechange (Makefile.am): Likewise.
3195         * modules/mountlist (Makefile.am): Likewise.
3196         * modules/nanosleep (Makefile.am): Likewise.
3197         * modules/openat (Makefile.am): Likewise.
3198         * modules/pagealign_alloc (Makefile.am): Likewise.
3199         * modules/physmem (Makefile.am): Likewise.
3200         * modules/poll (Makefile.am): Likewise.
3201         * modules/posixtm (Makefile.am): Likewise.
3202         * modules/posixver (Makefile.am): Likewise.
3203         * modules/putenv (Makefile.am): Likewise.
3204         * modules/quote (Makefile.am): Likewise.
3205         * modules/quotearg (Makefile.am): Likewise.
3206         * modules/raise (Makefile.am): Likewise.
3207         * modules/read-file (Makefile.am): Likewise.
3208         * modules/readline (Makefile.am): Likewise.
3209         * modules/readlink (Makefile.am): Likewise.
3210         * modules/readtokens (Makefile.am): Likewise.
3211         * modules/readutmp (Makefile.am): Likewise.
3212         * modules/realloc (Makefile.am): Likewise.
3213         * modules/regex (Makefile.am): Likewise.
3214         * modules/rename (Makefile.am): Likewise.
3215         * modules/rename-dest-slash (Makefile.am): Likewise.
3216         * modules/rijndael (Makefile.am): Likewise.
3217         * modules/rmdir (Makefile.am): Likewise.
3218         * modules/rpmatch (Makefile.am): Likewise.
3219         * modules/safe-read (Makefile.am): Likewise.
3220         * modules/safe-write (Makefile.am): Likewise.
3221         * modules/same (Makefile.am): Likewise.
3222         * modules/save-cwd (Makefile.am): Likewise.
3223         * modules/savedir (Makefile.am): Likewise.
3224         * modules/setenv (Makefile.am): Likewise.
3225         * modules/settime (Makefile.am): Likewise.
3226         * modules/sha1 (Makefile.am): Likewise.
3227         * modules/sig2str (Makefile.am): Likewise.
3228         * modules/snprintf (Makefile.am): Likewise.
3229         * modules/stdlib-safer (Makefile.am): Likewise.
3230         * modules/stpcpy (Makefile.am): Likewise.
3231         * modules/stpncpy (Makefile.am): Likewise.
3232         * modules/strcase (Makefile.am): Likewise.
3233         * modules/strcasestr (Makefile.am): Likewise.
3234         * modules/strchrnul (Makefile.am): Likewise.
3235         * modules/strcspn (Makefile.am): Likewise.
3236         * modules/strdup (Makefile.am): Likewise.
3237         * modules/strerror (Makefile.am): Likewise.
3238         * modules/strftime (Makefile.am): Likewise.
3239         * modules/strndup (Makefile.am): Likewise.
3240         * modules/strnlen (Makefile.am): Likewise.
3241         * modules/strpbrk (Makefile.am): Likewise.
3242         * modules/strsep (Makefile.am): Likewise.
3243         * modules/strstr (Makefile.am): Likewise.
3244         * modules/strtod (Makefile.am): Likewise.
3245         * modules/strtoimax (Makefile.am): Likewise.
3246         * modules/strtok_r (Makefile.am): Likewise.
3247         * modules/strtol (Makefile.am): Likewise.
3248         * modules/strtoll (Makefile.am): Likewise.
3249         * modules/strtoul (Makefile.am): Likewise.
3250         * modules/strtoull (Makefile.am): Likewise.
3251         * modules/strtoumax (Makefile.am): Likewise.
3252         * modules/strverscmp (Makefile.am): Likewise.
3253         * modules/time_r (Makefile.am): Likewise.
3254         * modules/timegm (Makefile.am): Likewise.
3255         * modules/tmpfile-safer (Makefile.am): Likewise.
3256         * modules/unistd-safer (Makefile.am): Likewise.
3257         * modules/unlinkdir (Makefile.am): Likewise.
3258         * modules/userspec (Makefile.am): Likewise.
3259         * modules/utime (Makefile.am): Likewise.
3260         * modules/utimecmp (Makefile.am): Likewise.
3261         * modules/utimens (Makefile.am): Likewise.
3262         * modules/vasnprintf (Makefile.am): Likewise.
3263         * modules/vasprintf (Makefile.am): Likewise.
3264         * modules/vsnprintf (Makefile.am): Likewise.
3265         * modules/xalloc (Makefile.am): Likewise.
3266         * modules/xgetcwd (Makefile.am): Likewise.
3267         * modules/xnanosleep (Makefile.am): Likewise.
3268         * modules/xreadlink (Makefile.am): Likewise.
3269         * modules/xstrtod (Makefile.am): Likewise.
3270         * modules/xstrtol (Makefile.am): Likewise.
3271         * modules/xstrtold (Makefile.am): Likewise.
3272         * modules/yesno (Makefile.am): Likewise.
3273
3274 2006-10-12  Jim Meyering  <jim@meyering.net>
3275
3276         * m4/getloadavg.m4: Revert the change below.
3277
3278         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
3279         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
3280         fail with a symlink, which is what coreutils' ./bootstrap now
3281         creates by default.
3282
3283 2006-10-12  Bruno Haible  <bruno@clisp.org>
3284
3285         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
3286         mingw.
3287         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
3288         MSVC and mingw explicitly.
3289
3290 2006-10-11  Simon Josefsson  <jas@extundo.com>
3291             Bruno Haible  <bruno@clisp.org>
3292
3293         Add support for multiple gnulib-tool invocations in the scope of a
3294         single configure.ac file.
3295         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
3296         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
3297         with the same contents as the _LIBADD variable.
3298         (func_emit_initmacro_start, func_emit_initmacro_end,
3299         func_emit_initmacro_done): New functions.
3300         (func_import, func_create_testdir): Invoke them. Allow the identifiers
3301         gl_LIBOBJS and gl_LTLIBOBJS.
3302
3303 2006-10-11  Bruno Haible  <bruno@clisp.org>
3304
3305         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
3306         (func_create_testdir): Don't create po/Makefile.am, don't invoke
3307         autoreconf. Instead, invoke autopoint explicitly but move back the
3308         *.m4 files from gnulib.
3309
3310 2006-10-11  Bruno Haible  <bruno@clisp.org>
3311
3312         * gnulib-tool (func_usage): Make module names after --create-testdir
3313         optional.
3314         (func_create_testdir): If no module was specified, use nearly all
3315         modules.
3316
3317 2006-10-12  Jim Meyering  <jim@meyering.net>
3318
3319         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3320         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3321         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3322         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3323         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3324         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3325         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3326         (fts_set_stat_required): New function.
3327         (fts_open): Defer the calls to fts_stat, if possible or requested.
3328         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3329         into fts_stat itself.
3330         (fts_read): Perform any required (deferred) fts_stat call.
3331         (fts_build): Likewise, for the directory we're about to open and read.
3332         In the readdir loop, carefully decide whether each entry will require
3333         an eventual call to fts_stat, using dirent.d_type info if available.
3334         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3335         a command line argument into this function.  Update all callers.
3336         Map a return value of FTS_DOT to FTS_D for a command line argument.
3337         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3338         Thanks to Miklos Szeredi for his tenacity and for the initial
3339         bug report about "find" failing on a FUSE-based file system.
3340
3341         * lib/fts.c (fts_open): Use consistent indentation.
3342
3343 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3344
3345         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3346         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3347         reported by Jim Meyering.  All uses of cache variables renamed
3348         to match Autoconf's.
3349         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3350         the other one.
3351
3352         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3353         Fix misspelling in diagnostic.
3354
3355 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3356
3357         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3358         defined.  Problem reported by Matthew Woehlke.
3359
3360         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3361         Add support for Tandem NonStop R series.
3362         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3363         Use new macro.
3364
3365         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3366         (has_trailing_slash): Omit size arg; all callers changed.
3367         Omit 'inline', since it doesn't help performance and we'd
3368         need to configure it.
3369         Don't count //, ///, etc. as having a trailing slash.
3370         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3371         (rpl_rename_dest_slash): On failure, use rename's errno rather
3372         than (in some cases) an incorrect or junk errno.
3373         Simplify code by removing need to compute length; this does
3374         cause it to make two passes instead of one over the file name,
3375         but it's worth it.
3376
3377         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3378         change, since Autoconf's version may no longer be appropriate now
3379         that we are using CVS Autoconf's version.  Add support for Tandem.
3380
3381 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3382             Bruno Haible  <bruno@clisp.org>
3383
3384         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3385         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3386         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3387         gl_AC_TYPE_LONG_LONG.
3388
3389         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3390         instead of HAVE_LONG_LONG.
3391         * lib/printf-args.c (printf_fetchargs): Likewise.
3392         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3393         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3394         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3395         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3396         gl_AC_TYPE_LONG_LONG.
3397
3398 2006-10-11  Bruno Haible  <bruno@clisp.org>
3399
3400         * m4/longlong.m4: Add comments.
3401         * m4/ulonglong.m4: Likewise.
3402
3403 2006-10-10  Bruno Haible  <bruno@clisp.org>
3404
3405         Make it possible to #define stpcpy, strdup to aliases.
3406         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3407         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3408
3409 2006-10-10  Bruno Haible  <bruno@clisp.org>
3410
3411         Make it possible to #define gcd to an alias.
3412         * lib/gcd.c: Include config.h.
3413
3414 2006-10-10  Bruno Haible  <bruno@clisp.org>
3415
3416         Make it possible to #define c_isascii to an alias.
3417         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3418         defined. Undefine the macros before defining them, to avoid gcc
3419         warnings.
3420         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3421         define NO_C_CTYPE_MACROS early.
3422
3423 2006-10-10  Bruno Haible  <bruno@clisp.org>
3424
3425         Make it possible to #define set_program_name to an alias.
3426         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3427         ENABLE_RELOCATABLE early.
3428
3429 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3430
3431         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3432         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3433         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3434         More generally, don't assume that 64-bit signed int is available
3435         if unsigned int is, and vice versa.
3436         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3437         unsigned symbols, not on their signed counterparts.
3438         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3439         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3440         (UINT64_C, UINTMAX_C):
3441         Likewise.
3442         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3443         unsigned counterparts.
3444         (Have_long_long, Unsigned): New macros.
3445         (Int): Renamed from INT.
3446         (strtoimax): Use the new macros.
3447         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3448         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3449         * modules/inttypes (inttypes.h): Substitute
3450         HAVE_UNSIGNED_LONG_LONG_INT.
3451         * modules/stdint (stdint.h): Likewise.
3452         (Files): Add m4/ulonglong.m4.
3453
3454 2006-10-10  Bruno Haible  <bruno@clisp.org>
3455
3456         Fix a gcc -Wshadow warning.
3457         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3458         to 'bucket'.
3459         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
3460         gl_linked_indexof_from_to): Likewise.
3461         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
3462         Likewise.
3463         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
3464         Likewise.
3465         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3466         Reported by Eric Blake.
3467
3468 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3469
3470         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3471         for NetBSD.  Problem reported by Bruno Haible.
3472
3473 2006-10-09  Jim Meyering  <jim@meyering.net>
3474
3475         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3476         Patch from Bruno Haible.
3477
3478 2006-10-09  Jim Meyering  <jim@meyering.net>
3479
3480         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3481         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3482         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
3483
3484 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3485
3486         Don't include <config.h> twice; this doesn't work in some cases,
3487         e.g., when config.h has "#define intmax_t long long int" and
3488         we include <config.h>, <inttypes.h>, <config.h> in that order.
3489         Problem reported by Matthew Woehlke in:
3490         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
3491         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
3492         * lib/fts-cycle.c: Don't include config.h.
3493         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
3494         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
3495         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
3496         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
3497         inttypes.h.
3498         * lib/xstrtoumax.c: Likewise.
3499         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
3500         __strtol and the like, so that this module is more like its siblings.
3501         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
3502         Remove; no longer needed now that we assume gnulib inttypes.h.
3503
3504 2006-10-08  Bruno Haible  <bruno@clisp.org>
3505
3506         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
3507         option.
3508
3509 2006-10-07  Jim Meyering  <jim@meyering.net>
3510
3511         * modules/inttypes (inttypes.h): Revert what seems to have been
3512         an inadvertent part of today's change: use "|", not "/" in the
3513         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
3514
3515 2006-10-07  Bruno Haible  <bruno@clisp.org>
3516
3517         * modules/sublist: New file.
3518
3519 2006-10-07  Bruno Haible  <bruno@clisp.org>
3520
3521         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
3522         * modules/argz (argz.h): Likewise.
3523         * modules/arpa_inet (arpa/inet.h): Likewise.
3524         * modules/byteswap (byteswap.h): Likewise.
3525         * modules/configmake (configmake.h): Likewise.
3526         * modules/fcntl (fcntl.h): Likewise.
3527         * modules/fnmatch (fnmatch.h): Likewise.
3528         * modules/getopt (getopt.h): Likewise.
3529         * modules/glob (glob.h): Likewise.
3530         * modules/inttypes (inttypes.h): Likewise.
3531         * modules/netinet_in (netinet/in.h): Likewise.
3532         * modules/poll (poll.h): Likewise.
3533         * modules/stdbool (stdbool.h): Likewise.
3534         * modules/stdint (stdint.h): Likewise.
3535         * modules/sys_select (sys/select.h): Likewise.
3536         * modules/sys_socket (sys/socket.h): Likewise.
3537         * modules/sys_stat (sys/stat.h): Likewise.
3538         * modules/sysexits (sysexits.h): Likewise.
3539         * modules/unistd (unistd.h): Likewise.
3540         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3541         Add a "DO NOT EDIT" comment to the generated file.
3542         (func_import): Likewise for gnulib-comp.m4.
3543
3544 2006-10-07  Bruno Haible  <bruno@clisp.org>
3545
3546         * lib/gl_sublist.h: New file.
3547         * lib/gl_sublist.c: New file.
3548
3549 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3550
3551         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3552         name (relative to the original working directory) and the file
3553         name component (relative to the temporary working directory).  All
3554         callers changed.
3555         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3556         * lib/mkdir-p.c (make_dir_parents): Likewise.
3557         * lib/mkdir-p.h (make_dir_parents): Likewise.
3558
3559 2006-10-06  Eric Blake  <ebb9@byu.net>
3560
3561         Define several macros for use by the clean-temp module.
3562         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3563         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3564         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3565
3566         * lib/clean-temp.h (close_stream_temp): New declaration.
3567         * lib/clean-temp.c (includes): Pull in headers according to what
3568         other modules are in use.
3569         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3570
3571 2006-10-06  Bruno Haible  <bruno@clisp.org>
3572
3573         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3574         instead of fopen, fwriteerror.
3575
3576 2006-10-06  Bruno Haible  <bruno@clisp.org>
3577
3578         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3579         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3580         int.
3581         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3582         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3583         Return an error indicator.
3584         Suggested by Eric Blake.
3585
3586 2006-10-06  Bruno Haible  <bruno@clisp.org>
3587
3588         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3589         Reported by Eric Blake.
3590
3591 2006-10-06  Bruno Haible  <bruno@clisp.org>
3592
3593         * modules/closeout (Description): Mention stderr too.
3594
3595 2006-10-06  Bruno Haible  <bruno@clisp.org>
3596         and Paul Eggert  <eggert@cs.ucla.edu>
3597
3598         * lib/closeout.c (close_stdout): Also close stderr.
3599         * lib/closeout.h: Update comment.
3600
3601 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3602
3603         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3604         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3605         * lib/dirchownmod.c: Include lchown.h.
3606         * lib/lchown.c: Don't include files that lchown.h now includes.
3607         Don't declare chown, since lchown.h now does that.
3608         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3609         (lchown): Define to rpl_chown if lchown is declared but
3610         does not exist.  Declare using a prototype if lchown is not
3611         declared.  Add a copyright notice.
3612         * lib/mkstemp.h: Include <unistd.h>.
3613         * lib/openat.c: Include lchown.h.
3614
3615         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3616         we now test for that separately.
3617         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3618         rather than O_NOFOLLOW, when testing whether it's possible to
3619         avoid a race condition reliably.
3620         * lib/savewd.c (savewd_chdir): Likewise.
3621
3622         Remove macros that are no longer needed now that stdint.h is
3623         reliable.
3624         * lib/fsusage.c (UINTMAX_MAX): Remove.
3625         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3626         * lib/utimecmp.c (SIZE_MAX): Remove.
3627
3628         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3629
3630         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3631         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3632         O_NOATIME works.
3633
3634 2006-10-05  Bruno Haible  <bruno@clisp.org>
3635
3636         * lib/gl_list.h (gl_sortedlist_search_from_to,
3637         gl_sortedlist_indexof_from_to): New declarations.
3638         (gl_list_implementation): New fields sortedlist_search_from_to,
3639         sortedlist_indexof_from_to.
3640         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3641         inline functions.
3642         * lib/gl_list.c (gl_sortedlist_search_from_to,
3643         gl_sortedlist_indexof_from_to): New functions.
3644         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3645         function.
3646         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3647         (gl_array_sortedlist_search_from_to): New function.
3648         (gl_array_list_implementation): Update.
3649         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3650         function.
3651         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3652         (gl_carray_sortedlist_search_from_to): New function.
3653         (gl_carray_list_implementation): Update.
3654         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3655         gl_linked_sortedlist_indexof_from_to): New functions.
3656         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3657         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3658         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3659         gl_tree_sortedlist_indexof_from_to): New functions.
3660         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3661         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3662         Update.
3663         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3664         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3665         Update.
3666
3667 2006-10-05  Bruno Haible  <bruno@clisp.org>
3668
3669         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3670         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3671         (struct gl_list_implementation): Add fields search_from_to,
3672         indexof_from_to. Remove fields search, indexof.
3673         (gl_list_search): Use the search_from_to method.
3674         (gl_list_search_from, gl_list_search_from_to): New functions.
3675         (gl_list_indexof): Use the indexof_from_to method.
3676         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3677         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3678         (gl_list_search_from, gl_list_search_from_to): New functions.
3679         (gl_list_indexof): Use the indexof_from_to method.
3680         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3681         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3682         gl_array_indexof. Add start_index, end_index arguments.
3683         (gl_array_search_from_to): Renamed from gl_array_search. Add
3684         start_index, end_index arguments.
3685         (gl_array_remove, gl_array_list_implementation): Update.
3686         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3687         gl_carray_indexof. Add start_index, end_index arguments.
3688         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3689         start_index, end_index arguments.
3690         (gl_carray_remove, gl_carray_list_implementation): Update.
3691         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3692         gl_linked_search. Add start_index, end_index arguments.
3693         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3694         start_index, end_index arguments.
3695         (gl_linked_remove): Update.
3696         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3697         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3698         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3699         field to 'size_t'.
3700         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3701         gl_tree_search. Add start_index, end_index arguments.
3702         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3703         start_index, end_index arguments.
3704         (gl_tree_remove): Update.
3705         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3706         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3707         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3708         function.
3709         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3710         gl_tree_search. Add start_index, end_index arguments.
3711         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3712         start_index, end_index arguments.
3713         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3714         Update.
3715         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3716
3717 2006-10-05  Bruno Haible  <bruno@clisp.org>
3718
3719         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3720
3721         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3722         fwriteerror_temp): New declarations.
3723         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3724         (descriptors): New variable.
3725         (cleanup): First, close the descriptors.
3726         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3727         fclose_temp, fwriteerror_temp): New functions.
3728
3729 2006-10-04  Jim Meyering  <jim@meyering.net>
3730
3731         * lib/fts.c (fts_open): Tiny comment change.
3732
3733 2006-10-04  Bruno Haible  <bruno@clisp.org>
3734
3735         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3736         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3737         gl_LOCK_BODY.
3738         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3739         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3740         gl_LOCK_EARLY_BODY.
3741         (gl_LOCK): Require gl_LOCK_BODY.
3742
3743 2006-10-04  Bruno Haible  <bruno@clisp.org>
3744
3745         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3746         (gl_oset_search_atleast): New declaration.
3747         (struct gl_oset_implementation): Add field 'search_atleast'.
3748         (gl_oset_search_atleast): New inline function.
3749         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3750         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3751         (gl_array_oset_implementation): Update.
3752         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3753         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3754         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3755
3756 2006-10-04  Bruno Haible  <bruno@clisp.org>
3757
3758         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3759
3760 2006-10-03  Bruno Haible  <bruno@clisp.org>
3761
3762         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3763         from gl_avltreehash_list_implementation.
3764
3765 2006-10-03  Bruno Haible  <bruno@clisp.org>
3766
3767         * lib/gl_oset.c (gl_oset_add): Fix return type.
3768
3769 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3770
3771         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3772
3773 2006-10-02  Eric Blake  <ebb9@byu.net>
3774
3775         * modules/strnlen (Depends-on): Add extensions.
3776
3777 2006-10-02  Eric Blake  <ebb9@byu.net>
3778
3779         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3780         definition in 2.60+.
3781
3782 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3783
3784         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3785         checks.
3786
3787 2006-10-02  Bruno Haible  <bruno@clisp.org>
3788
3789         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3790         to the AUTOMAKE_OPTIONS.
3791         Reported by Jim Meyering.
3792
3793 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3794
3795         Work around bug in Solaris 10 /proc file system:
3796         /proc/self/fd/NNN/.. isn't the parent directory of
3797         the directory whose file descriptor is NNN.  This needs to
3798         be worked around at run time, not compile time, since a
3799         program might be built on Solaris 8, where things work, and
3800         run on Solaris 10.
3801         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
3802         to use the following interface instead:
3803         (OPENAT_BUFFER_SIZE): New macro.
3804         (openat_proc_name): New function.
3805         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
3806         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
3807         Likewise.
3808         * lib/openat-proc.c: New file.
3809         * modules/openat (Files): Add lib/openat-proc.c.
3810         (Depends-on): Add same-inode, stdbool.
3811         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
3812
3813 2006-09-29  Bruno Haible  <bruno@clisp.org>
3814
3815         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
3816         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
3817         argument. Set stdout_closed before testing for ferror, not after.
3818         (fwriteerror, fwriteerror_no_ebadf): New functions.
3819
3820 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3821
3822         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
3823
3824 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
3825
3826         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
3827         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
3828
3829 2006-09-28  Jim Meyering  <jim@meyering.net>
3830
3831         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
3832         Include <unistd.h>.
3833
3834 2006-09-28  Bruno Haible  <bruno@clisp.org>
3835
3836         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
3837         * modules/linkedhash-list (Depends-on): Likewise.
3838         * modules/rbtreehash-list (Depends-on): Likewise.
3839
3840 2006-09-28  Bruno Haible  <bruno@clisp.org>
3841
3842         * lib/strndup.h: Simplify the redefinition of strndup.
3843         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
3844         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
3845
3846 2006-09-28  Bruno Haible  <bruno@clisp.org>
3847
3848         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
3849         * lib/gl_linkedhash_list.c: Likewise.
3850         * lib/gl_rbtreehash_list.c: Likewise.
3851
3852 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
3853
3854         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
3855         getaddrinfo.
3856
3857         * lib/__fpending.h: Don't include <stdio_ext.h> unless
3858         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
3859         it causes <stdio_ext.h> to cause a compile-time error.
3860         Problem reported by Nelson H. F. Beebe.
3861         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
3862         of HAVE_DECL___PENDING.
3863
3864         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
3865         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
3866         declaration.
3867
3868 2006-09-27  Jim Meyering  <jim@meyering.net>
3869
3870         This file could end up with a definition for a function
3871         named __strndup, rather than rpl_strndup on a system with
3872         incomplete weak_alias support.
3873         * lib/strndup.c (strndup): Rename from __strndup.
3874         Remove #defines that used to map __strndup to strndup.
3875         Don't use K&R prototypes.
3876         Remove LIBC-related code, since this file is not sync'd with glibc.
3877         * lib/strndup.h: Revamp, accordingly.
3878         * m4/strndup.m4: Modernize.
3879
3880 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3881
3882         * modules/savewd (Depends-on): Add 'raise'.
3883         * lib/savewd.c: Include <signal.h>, for 'raise'.
3884
3885 2006-09-26  Jim Meyering  <jim@meyering.net>
3886
3887         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
3888         when we detect Darwin 8.7.0's acl_get_file bug.
3889         Rearrange to perform the new (below) run-test while $LIBS
3890         contains any acl-related library.  Set USE_ACL at the end.
3891         (gl_ACL_GET_FILE): New function.
3892
3893 2006-09-26  Eric Blake  <ebb9@byu.net>
3894
3895         * lib/verror.c: Include <config.h> unconditionally.
3896
3897 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3898
3899         * modules/clock-time (Maintainer): Add self.
3900         * modules/getlogin_r (Depends-on): Add extensions.
3901
3902 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3903
3904         * modules/clock-time: New module.
3905         * modules/nanosleep (Depends-on): Add clock-time.
3906         * modules/gethrxtime (Depends-on): Likewise.
3907         * modules/gettime (Depends-on): Likewise.
3908         * modules/settime (Depends-on): Likewise.
3909
3910         * modules/fts-lgpl: Depend on openat.
3911         * modules/mkancesdirs: Depend on savewd.
3912         * modules/mkdir-p: Likewise.
3913
3914 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3915
3916         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
3917
3918         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
3919         `gl_have_arbitrary_file_name_length_limit' to
3920         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
3921         actually works between configure runs.
3922
3923 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3924             Bruno Haible  <bruno@clisp.org>
3925
3926         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
3927
3928 2006-09-25  Jim Meyering  <jim@meyering.net>
3929
3930         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
3931         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
3932
3933 2006-09-25  Eric Blake  <ebb9@byu.net>
3934
3935         * gnulib-tool (func_import, func_create_testdir): Fix typos in
3936         exec's in 2006-09-18 patch when shuffling fds.
3937
3938 2006-09-25  Bruno Haible  <bruno@clisp.org>
3939
3940         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
3941         Reported by Jim Meyering.
3942
3943 2006-09-24  Jim Meyering  <jim@meyering.net>
3944
3945         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
3946         compare a pointer against a literal "0".  That caused failures with
3947         at least HP-UX's hpcc.
3948
3949 2006-09-22  Simon Josefsson  <jas@extundo.com>
3950
3951         * modules/gc-sha1:
3952         * modules/gc-md4:
3953         * modules/gc-hmac-sha1:
3954         * modules/gc-hmac-md5:
3955         * modules/gc-des:
3956         * modules/gc-arcfour: Distribute more files.
3957
3958 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3959
3960         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
3961         (gl_linked_iterator_from_to): Initialize struct completely.
3962         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
3963         (gl_tree_iterator_from_to): Likewise
3964         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
3965         * lib/gl_array_list.c [lint] (gl_array_iterator)
3966         (gl_array_iterator_from_to): Likewise.
3967         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
3968         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
3969         (gl_carray_iterator_from_to): Likewise.
3970
3971         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
3972         * lib/md4.c (md4_process_block): Remove unused variable.
3973         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
3974         parentheses for clarity.
3975
3976 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3977
3978         * modules/bison-i18n (Depends-on): Add gettext.
3979
3980 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3981
3982         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
3983         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
3984         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
3985         also add missing comma that caused broken test.
3986         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
3987         stdlib.h, for `abort'.
3988         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
3989         variables.
3990         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
3991         include unistd.h if present, for `rmdir'.
3992         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
3993         variables.
3994         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
3995         in the process include standard headers for prototypes.
3996         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
3997         gets declared on GNU/Linux.
3998         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
3999         unistd.h, for `rmdir'.
4000         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
4001
4002         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
4003         always true.
4004         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
4005
4006         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
4007
4008 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4009
4010         * gnulib-tool (func_version): Create output all at once.  This
4011         may help avoid triggering unnecessary SIGPIPEs, and at any
4012         rate it doesn't hurt.
4013
4014 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4015             Bruno Haible  <bruno@clisp.org>
4016
4017         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
4018         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4019         * m4/signed.m4 (bh_C_SIGNED): Likewise.
4020
4021         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
4022         (gl_FUNC_VASPRINTF): Invoke it.
4023
4024 2006-09-22  Bruno Haible  <bruno@clisp.org>
4025
4026         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
4027         getloadavg.c as first argument.
4028
4029 2006-09-22  Bruno Haible  <bruno@clisp.org>
4030
4031         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
4032         at the beginning of the gl_INIT macro.
4033         * modules/getloadavg (configure.ac): Pass $gl_source_base to
4034         gl_GETLOADAVG.
4035
4036 2006-09-22  Bruno Haible  <bruno@clisp.org>
4037
4038         * gnulib-tool (func_create_megatestdir): Don't include the config-h
4039         module.
4040         Suggested by Ralf Wildenhues.
4041
4042 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
4043
4044         Import this patch from libc:
4045
4046         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4047
4048         * lib/regex_internal.c (re_string_reconstruct): Handle
4049         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4050         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4051         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4052         re_string_context_at.
4053
4054         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4055         now requires it.
4056         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4057         gl_REGEX now does it for us.
4058         (gl_REGEX): Add test taken from
4059         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4060
4061         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4062         Check that large offsets work.  Modernize Autoconf usages.
4063         Prefer "yes" to mean a good thing rather than a bad.
4064         Don't put "#define mkstemp" in config.h, as this might interfere
4065         with standard system headers that "#define mkstemp mkstemp64".
4066
4067         * modules/mkstemp (Depends-on): Add extensions, so that
4068         mkstemp is visible on some platforms.
4069         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4070         (Include): Change to "mkstemp.h" from <stdlib.h>.
4071         (Files): Add mkstemp.h.
4072
4073         * lib/mkstemp.h: New file, since some standard headers
4074         #define mkstemp.
4075         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4076         Include "mkstemp.h".
4077         Make the _LIBC code resemble glibc original more,
4078         e.g., use K&R style.
4079         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4080         (mkstemp): Remove, since mkstemp.h does this for us.
4081         * lib/stdlib--.h: Include mkstemp.h.
4082
4083         Import this patch from libc:
4084
4085         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4086
4087         * lib/tempname.c (__gen_tempname): Change attempts_min
4088         into a macro.  Use preprocessor to decide how to initialize
4089         attempts [Coverity CID 67].
4090
4091 2006-09-20  Bruno Haible  <bruno@clisp.org>
4092
4093         * lib/mkdtemp.c: Import from libc.
4094         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4095                 * sysdeps/posix/tempname.c (__gen_tempname): Change
4096                 attempts_min into a macro.  Use preprocessor to decide how to
4097                 initialize attempts [Coverity CID 67].
4098         2001-11-27  Paul Eggert  <eggert@twinsun.com>
4099                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
4100                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
4101
4102 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4103
4104         * gnulib-tool (func_exit): New function, to allow to pass the
4105         exit status portably through the trap.  Use everywhere.
4106         (--help, --version): Signal a write error.
4107         (trap): catch SIGPIPE, for write errors.
4108         Exit at the end of the trap, with the correct exit status.
4109
4110 2006-09-19  Karl Berry  <karl@gnu.org>
4111
4112         * doc/gnulib.texi: note about the license texinfo files.
4113
4114 2006-09-19  Eric Blake  <ebb9@byu.net>
4115
4116         * gnulib-tool: Avoid space-tab.
4117
4118 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4119
4120         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
4121         that prevented coreutils 6.1 from building.  Problem reported
4122         by Petter Reinholdtsen.
4123
4124 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4125
4126         * gnulib-tool (avoidlist): Fix typo that broke options like
4127         --avoid=lock that are used by coreutils bootstrap.
4128
4129 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
4130
4131         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
4132         more systematically.
4133
4134 2006-09-18  Jim Meyering  <jim@meyering.net>
4135
4136         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
4137
4138 2006-09-18  Bruno Haible  <bruno@clisp.org>
4139
4140         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
4141
4142 2006-09-18  Bruno Haible  <bruno@clisp.org>
4143
4144         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
4145         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
4146         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
4147         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
4148         * m4/gettext.m4: Require autoconf >= 2.52.
4149         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
4150         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
4151         of gl_cv_header_inttypes_h.
4152
4153 2006-09-18  Bruno Haible  <bruno@clisp.org>
4154
4155         * lib/javaversion.c: Include configmake.h.
4156
4157 2006-09-18  Bruno Haible  <bruno@clisp.org>
4158
4159         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
4160         avoid that the while loops be executed in a subshell.
4161
4162 2006-09-18  Bruno Haible  <bruno@clisp.org>
4163
4164         * MODULES.html.sh (func_module): Break long lines.
4165         Suggested by Bruce Korb <bkorb@gnu.org>.
4166
4167 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4168
4169         Speed up by a factor of 1.12.
4170         * gnulib-tool (nl): New variable.
4171         (func_import): Rewrite include directive extraction to only read each
4172         directive once.
4173
4174 2006-09-17  Bruno Haible  <bruno@clisp.org>
4175
4176         * modules/javaversion (Makefile.am): Remove DEFS setting.
4177         (Depends-on): Add configmake, for PKGDATADIR definition.
4178
4179 2006-09-17  Bruno Haible  <bruno@clisp.org>
4180
4181         * gnulib-tool (func_create_testdir): Rewrite all files at once.
4182
4183 2006-09-17  Bruno Haible  <bruno@clisp.org>
4184
4185         * gnulib-tool (func_append): New function, stolen from libtool.m4.
4186         (func_modules_transitive_closure, func_modules_add_dummy,
4187         func_modules_to_filelist, func_import, func_create_testdir,
4188         func_create_megatestdir, ...): Use it wherever possible.
4189         Suggested by Ralf Wildenhues.
4190
4191 2006-09-16  Karl Berry  <karl@gnu.org>
4192
4193         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
4194         to avoid sectioning errors.
4195         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
4196         [ifinfo]: blank line after @center-ed titles.
4197         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
4198         Spell FSF address consistently with others.
4199         (These changes approved by rms.)
4200
4201 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4202
4203         Speed up by a factor of 1.61.
4204         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
4205         already checked module names again.
4206
4207 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4208
4209         Speed up by a factor of 1.13.
4210         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
4211         for new_files, and the input to func_add_or_update.
4212
4213 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4214
4215         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
4216         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
4217
4218 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4219
4220         * modules/mkancesdirs (Depends-on): Add fcntl.
4221         * modules/savewd: New file.
4222         * MODULES.html.sh (File system functions): Add savewd.
4223
4224         * modules/configmake (Makefile.am): Add support for the
4225         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
4226
4227 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4228
4229         * m4/savewd.m4: New file.
4230
4231 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4232
4233         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
4234         (dirchownmod): New arg FD.  All callers changed.
4235         Use FD rather than opening the directory ourself, as opening is
4236         now the caller's responsibility.
4237         * lib/dirchownmod.h: Likewise.
4238         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
4239         hosts that require <sys/types.h> before <sys/stat.h>.  Include
4240         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
4241         (test_dir): Remove.
4242         (mkancesdirs): Return length of prefix of FILE that has already
4243         been made, or -2 if there is a child doing the work.  Redo
4244         algorithm so that it is O(N) rather than O(N**2).  Optimize away
4245         ".", and treat ".." specially since it might stray back into
4246         already-created areas.  Use a subprocess if necessary.  New arg
4247         WD; all users changed.  MAKE_DIR function should now return 1
4248         if it creates a directory that is not readable.  Return -2 if
4249         a child process is spun off.
4250         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
4251         Adjust signature to match code.
4252         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
4253         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
4254         all users changed.
4255         * lib/savewd.c, lib/savewd.h: New files.
4256
4257 2006-09-15  Jim Meyering  <jim@meyering.net>
4258
4259         * modules/rename-dest-slash: New module.
4260         * MODULES.html.sh (posix_compat): Add it here.
4261
4262         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
4263
4264 2006-09-15  Jim Meyering  <jim@meyering.net>
4265
4266         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
4267         file.
4268
4269         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
4270
4271 2006-09-15  Jim Meyering  <jim@meyering.net>
4272
4273         * lib/rename-dest-slash.c (has_trailing_slash): Use
4274         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
4275         (rpl_rename_dest_slash): Perform the cheaper trailing slash
4276         test before testing whether SRC is a directory.
4277         Suggestions from Bruno Haible.
4278
4279         Avoid a warning about an unused variable.
4280         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
4281         into the #ifdef block where it's used.
4282
4283         * lib/rename-dest-slash.c: New file.
4284
4285 2006-09-14  Bruno Haible  <bruno@clisp.org>
4286
4287         * lib/allocsa.c: Include <config.h> unconditionally.
4288         * lib/asnprintf.c: Likewise.
4289         * lib/asprintf.c: Likewise.
4290         * lib/c-strcasecmp.c: Likewise.
4291         * lib/c-strcasestr.c: Likewise.
4292         * lib/c-strncasecmp.c: Likewise.
4293         * lib/c-strstr.c: Likewise.
4294         * lib/classpath.c: Likewise.
4295         * lib/clean-temp.c: Likewise.
4296         * lib/concatpath.c: Likewise.
4297         * lib/copy-file.c: Likewise.
4298         * lib/csharpcomp.c: Likewise.
4299         * lib/csharpexec.c: Likewise.
4300         * lib/execute.c: Likewise.
4301         * lib/fatal-signal.c: Likewise.
4302         * lib/findprog.c: Likewise.
4303         * lib/fwriteerror.c: Likewise.
4304         * lib/gl_array_list.c: Likewise.
4305         * lib/gl_array_oset.c: Likewise.
4306         * lib/gl_avltree_list.c: Likewise.
4307         * lib/gl_avltree_oset.c: Likewise.
4308         * lib/gl_avltreehash_list.c: Likewise.
4309         * lib/gl_carray_list.c: Likewise.
4310         * lib/gl_linked_list.c: Likewise.
4311         * lib/gl_linkedhash_list.c: Likewise.
4312         * lib/gl_list.c: Likewise.
4313         * lib/gl_oset.c: Likewise.
4314         * lib/gl_rbtree_list.c: Likewise.
4315         * lib/gl_rbtree_oset.c: Likewise.
4316         * lib/gl_rbtreehash_list.c: Likewise.
4317         * lib/imaxabs.c: Likewise.
4318         * lib/imaxdiv.c: Likewise.
4319         * lib/javacomp.c: Likewise.
4320         * lib/javaexec.c: Likewise.
4321         * lib/javaversion.c: Likewise.
4322         * lib/linebreak.c: Likewise.
4323         * lib/localcharset.c: Likewise.
4324         * lib/lock.c: Likewise.
4325         * lib/mbchar.c: Likewise.
4326         * lib/mbswidth.c: Likewise.
4327         * lib/mkdtemp.c: Likewise.
4328         * lib/pipe.c: Likewise.
4329         * lib/printf-args.c: Likewise.
4330         * lib/printf-parse.c: Likewise.
4331         * lib/progname.c: Likewise.
4332         * lib/progreloc.c: Likewise.
4333         * lib/readlink.c: Likewise.
4334         * lib/sh-quote.c: Likewise.
4335         * lib/stpcpy.c: Likewise.
4336         * lib/stpncpy.c: Likewise.
4337         * lib/strcasecmp.c: Likewise.
4338         * lib/strcasestr.c: Likewise.
4339         * lib/strcspn.c: Likewise.
4340         * lib/striconv.c: Likewise.
4341         * lib/strncasecmp.c: Likewise.
4342         * lib/strnlen1.c: Likewise.
4343         * lib/strstr.c: Likewise.
4344         * lib/strtok_r.c: Likewise.
4345         * lib/tls.c: Likewise.
4346         * lib/tmpdir.c: Likewise.
4347         * lib/unicodeio.c: Likewise.
4348         * lib/unsetenv.c: Likewise.
4349         * lib/vasnprintf.c: Likewise.
4350         * lib/vasprintf.c: Likewise.
4351         * lib/wait-process.c: Likewise.
4352         * lib/xallocsa.c: Likewise.
4353         * lib/xsetenv.c: Likewise.
4354         * lib/xstriconv.c: Likewise.
4355
4356 2006-09-13  Simon Josefsson  <jas@extundo.com>
4357
4358         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4359         that internally, suggested by Ralf Wildenhues
4360         <Ralf.Wildenhues@gmx.de>.
4361
4362 2006-09-13  Simon Josefsson  <jas@extundo.com>
4363
4364         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4365         @LIBOBJS@.
4366         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4367
4368 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4369
4370         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4371         longer worry about uses that don't define HAVE_CONFIG_H.
4372         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4373         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4374         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4375         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4376         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4377         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4378         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4379         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4380         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4381         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4382         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4383         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4384         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4385         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4386         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4387         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4388         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4389         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4390         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4391         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4392         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4393         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4394         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4395         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4396         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4397         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4398         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4399         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4400         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4401         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4402         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4403         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4404         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4405         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4406         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4407         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4408         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4409         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4410         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4411         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4412         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4413         Likewise.
4414
4415 2006-09-13  Eric Blake  <ebb9@byu.net>
4416
4417         * lib/getopt.c: Fix typo in last commit.
4418
4419 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4420
4421         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4422         dgettext.
4423
4424 2006-09-12  Jim Meyering  <jim@meyering.net>
4425
4426         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4427         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4428         Reported by Nelson H. F. Beebe.
4429
4430 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4431
4432         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4433         program_invocation_name and program_invocation_short_name are
4434         initialized.
4435         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4436         and program_invocation_short_name to argp.h, so they are visible
4437         to user programs.
4438         * lib/argp.h: Likewise
4439
4440 2006-09-10  Bruno Haible  <bruno@clisp.org>
4441
4442         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4443         m4/inttypes_h.m4, m4/uintmax_t.m4.
4444
4445 2006-09-10  Bruno Haible  <bruno@clisp.org>
4446
4447         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4448         gl_AC_TYPE_UINTMAX_T.
4449
4450 2006-09-10  Bruno Haible  <bruno@clisp.org>
4451
4452         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4453
4454 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4455
4456         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4457         convention.  Text proposed by Bruno Haible.
4458         (struct argp_option): Document the use of N_() wrappers.
4459
4460         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
4461         '\v', and translate the two parts separately, instead of feeding
4462         the whole string to gettext.  This allows to exclude
4463         '\v' from the strings visible to the translator by writing doc
4464         strings as N_("..") "\v" N_("..").
4465
4466 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4467
4468         * config/srclist.txt: Undo latest change; the bug was fixed.
4469
4470 2006-09-09  Bruno Haible  <bruno@clisp.org>
4471
4472         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4473         assignments if building a library without libtool.
4474         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4475         in func_emit_lib_Makefile_am.
4476         (func_import): When building a static library libfoo.a, arrange to
4477         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4478         (func_create_testdir): Likewise.
4479         * modules/gc (configure.ac, Makefile.am): If building statically,
4480         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4481         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4482         * modules/striconv (configure.ac, Makefile.am): Likewise.
4483         Based on a suggestion by Ralf Wildenhues.
4484
4485 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4486
4487         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4488         Check for unistd.h too, since Autoconf doesn't assume POSIX.
4489         Also:
4490
4491         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4492         Add year_2050_test to catch glibc bug 2821
4493         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4494
4495         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4496         Prefer #ifdef to #if.
4497
4498         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
4499         Return from 'main' instead of calling 'exit'.
4500
4501 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4502
4503         * lib/mktime.c (guess_time_tm): Fix bug where mktime
4504         returned the maximum time_t value rather than (time_t) -1.
4505         Problem originally reported by William Bardwell
4506         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4507
4508         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4509         Moved to here ...
4510         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4511         ... from here.
4512
4513 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4514
4515         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
4516         2821 is fixed.
4517
4518 2006-09-08  Jim Meyering  <jim@meyering.net>
4519
4520         Don't make generated files read-only.  That would bother too many
4521         people.  However, do retain the ability to work when targets are
4522         read-only: remove the destination and temporary files before writing
4523         them (when generated via sed or echo), or by using the -f option for
4524         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
4525         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4526         * modules/byteswap, modules/configmake, modules/fcntl:
4527         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4528         * modules/localcharset, modules/netinet_in, modules/poll:
4529         * modules/stdbool, modules/stdint, modules/sys_select:
4530         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4531
4532 2006-09-08  Jim Meyering  <jim@meyering.net>
4533
4534         Avoid new build failure on FreeBSD 6.0.
4535         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4536         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4537         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4538
4539 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4540
4541         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4542
4543 2006-09-07  Jim Meyering  <jim@meyering.net>
4544
4545         Fix global typo in last change: use chmod u-w, not chmod u-x.
4546         Spotted by Paul Eggert and Bruce Korb.
4547         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4548         * modules/byteswap, modules/configmake, modules/fcntl:
4549         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4550         * modules/localcharset, modules/netinet_in, modules/poll:
4551         * modules/stdbool, modules/stdint, modules/sys_select:
4552         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4553
4554 2006-09-06  Jim Meyering  <jim@meyering.net>
4555
4556         Make generated files be read-only.
4557         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4558         Ensure that each generated file is now read-only.
4559         * modules/argz: Likewise.
4560         * modules/arpa_inet: Likewise.
4561         * modules/byteswap: Likewise.
4562         * modules/configmake: Likewise.
4563         * modules/fcntl: Likewise.
4564         * modules/fnmatch: Likewise.
4565         * modules/getopt: Likewise.
4566         * modules/glob: Likewise.
4567         * modules/inttypes: Likewise.
4568         * modules/netinet_in: Likewise.
4569         * modules/poll: Likewise.
4570         * modules/stdbool: Likewise.
4571         * modules/stdint: Likewise.
4572         * modules/sys_select: Likewise.
4573         * modules/sys_socket: Likewise.
4574         * modules/sys_stat: Likewise.
4575         * modules/sysexits: Likewise.
4576         * modules/localcharset: Same as above, but continue using temporary
4577         file named "t-$@" (why different?) rather than the "$@-t" used
4578         everywhere else.
4579
4580         * modules/sysexits (Makefile.am): Replace literal occurrences
4581         of "sysexit.h" more readable, and more consistent, "$@".
4582
4583 2006-09-06  Bruno Haible  <bruno@clisp.org>
4584
4585         * modules/striconv: New file.
4586         * modules/xstriconv: New file.
4587         * MODULES.html.sh (Internationalization functions): Add striconv,
4588         xstriconv.
4589
4590 2006-09-06  Bruno Haible  <bruno@clisp.org>
4591
4592         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4593         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4594         not using libtool correctly.
4595
4596 2006-09-06  Bruno Haible  <bruno@clisp.org>
4597
4598         * lib/striconv.h: New file.
4599         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4600         iconvstring.c.
4601         * lib/xstriconv.h: New file.
4602         * lib/xstriconv.c: New file.
4603
4604 2006-09-06  Bruno Haible  <bruno@clisp.org>
4605
4606         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4607         lib_..._LDFLAGS.
4608
4609 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4610
4611         * lib/argz_.h: Sync from Libtool.
4612
4613         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4614                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4615
4616         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4617
4618 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4619
4620         * modules/trim: New file.
4621
4622 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4623
4624         * lib/trim.h: New file.
4625         * lib/trim.c: New file.
4626
4627 2006-09-05  Bruno Haible  <bruno@clisp.org>
4628
4629         * MODULES.html.sh (String handling): Add trim.
4630
4631 2006-09-04  Karl Berry  <karl@gnu.org>
4632
4633         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4634         until next release.
4635
4636 2006-09-03  Bruno Haible  <bruno@clisp.org>
4637
4638         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4639         correctly.
4640
4641 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4642
4643         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4644         not gl_GETLOADAVG.  Omit unneeded semicolons.
4645         Problems reported by Ralf Wildenhues in
4646         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4647         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4648         at the end, which is the usual gnulib style.
4649
4650         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4651         of doing all the work ourselves.
4652         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4653         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4654
4655 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4656
4657         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4658         Problem reported by Ralf Wildenhues in
4659         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4660
4661         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4662         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4663
4664 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4665
4666         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4667         yesterday's patch by changing test -n to test -z.
4668
4669 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4670
4671         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4672         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4673         the former is now obsolescent.
4674
4675         * modules/chdir-long (Depends-on): Add fcntl.
4676
4677 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4678
4679         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4680         obsolescent, and programs should use gnulib instead.
4681         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4682         but with prefixes changed.
4683
4684 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4685
4686         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4687         or stdbool.h, because they might not exist while configuring.
4688
4689         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4690         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4691         does that for us.
4692         (O_DIRECTORY): Remove.
4693
4694 2006-08-31  Eric Blake  <ebb9@byu.net>
4695
4696         * gnulib-tool: Don't let emacs change spaces to TAB.
4697
4698 2006-08-31  Bruno Haible  <bruno@clisp.org>
4699
4700         * gnulib-tool: When calling func_import more than once, do it in a
4701         subshell.
4702         Reported by Eric Blake <ebb9@byu.net>.
4703
4704 2006-08-31  Bruno Haible  <bruno@clisp.org>
4705
4706         * gnulib-tool (nl): Remove variable.
4707         (sed_transform_lib_file): Use more robust test for config-h module.
4708         (func_import): Fix typo in 2006-08-25 patch.
4709
4710 2006-08-31  Bruno Haible  <bruno@clisp.org>
4711
4712         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4713         specified, augment Makefile.am variables instead of assigning them.
4714
4715 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4716
4717         Work around a bug in both the Linux and SunOS 64-bit kernels:
4718         nanosleep mishandles sleeps for longer than 2**31 seconds.
4719         Problem reported by Frank v Waveren in
4720         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4721         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4722         Check for nanosleep bug.
4723         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4724
4725 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4726
4727         Work around a bug in both the Linux and SunOS 64-bit kernels:
4728         nanosleep mishandles sleeps for longer than 2**31 seconds.
4729         Problem reported by Frank v Waveren in
4730         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4731         * lib/nanosleep.c (BILLION): New constant.
4732         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4733         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4734         implementation.
4735
4736 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4737
4738         * modules/nanosleep (Depends-on): Add gettime.
4739
4740 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4741         and Simon Josefsson  <jas@extundo.com>
4742         and Oskar Liljeblad  <oskar@osk.mine.nu>
4743
4744         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4745         * gnulib-tool (func_import): New license type 'unmodifiable license
4746         text'.
4747         * modules/fdl: Use it.  Longer description.
4748         * module/gpl, module/lgpl: New files.
4749
4750 2006-08-30  Jim Meyering  <jim@meyering.net>
4751
4752         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4753         shadowing the parameter.
4754
4755 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4756
4757         Sync from Libtool:
4758
4759         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4760
4761         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4762         sharing with gnulib.  Report by Eric Blake.
4763
4764 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4765
4766         * modules/isapipe: New file.
4767         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4768
4769 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4770
4771         * modules/configmake (Makefile.am): Add a comment, and omit
4772         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4773         by Bruno Haible.
4774
4775 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4776
4777         * m4/isapipe.m4: New file.
4778
4779 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4780
4781         * lib/isapipe.c, lib/isapipe.h: New files.
4782
4783 2006-08-29  Jim Meyering  <jim@meyering.net>
4784
4785         * modules/configmake (Makefile.am): Make configmake.h depend on
4786         Makefile.  Otherwise, a stale configmake.h could hang around.
4787
4788 2006-08-29  Eric Blake  <ebb9@byu.net>
4789
4790         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4791         resolution of upstream bug 3044.
4792
4793 2006-08-29  Bruno Haible  <bruno@clisp.org>
4794
4795         * modules/localcharset (Depends-on): Add configmake.
4796         (Makefile.am): Remove setting of LIBDIR through DEFS.
4797
4798 2006-08-29  Bruno Haible  <bruno@clisp.org>
4799
4800         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
4801         defined.
4802
4803 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4804
4805         * modules/fcntl: New file.
4806         * modules/chdir-safer (Depends-on): Add fcntl.
4807         * modules/fts: Likewise.
4808         * modules/mkdir-p: Likewise.
4809
4810         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
4811         This undoes the most recent change, since we're now addressing the
4812         problem in a different way.
4813
4814         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
4815         into output, since the output might be called Makefile.am even
4816         if $makefile_name is something different.
4817         (func_import): Use $makefile_am rather than
4818         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
4819         empty.
4820
4821         * modules/inttypes (Files): Add m4/inttypes-h.m4.
4822
4823 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4824
4825         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
4826         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
4827         recent change to stdint.m4, since we're now addressing the problem in a
4828         different way.
4829
4830 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4831
4832         * m4/fcntl_h.m4: New file.
4833
4834 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4835
4836         * lib/fcntl_.h: New file.
4837         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
4838         the fcntl module.
4839         * lib/dirchownmod.c: Likewise.
4840         * lib/fts.c: Likewise.
4841
4842         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
4843         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
4844         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
4845         just before including <inttypes.h>, to avoid circular inclusion.
4846
4847 2006-08-28  Jim Meyering  <jim@meyering.net>
4848
4849         * doc/visibility.texi: Actually read and correct the grammar of the
4850         sentence affected by yesterday's change.
4851
4852 2006-08-28  Eric Blake  <ebb9@byu.net>
4853
4854         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
4855         needs wrapper.
4856
4857 2006-08-28  Eric Blake  <ebb9@byu.net>
4858
4859         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
4860
4861 2006-08-28  Eric Blake  <ebb9@byu.net>
4862
4863         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
4864
4865 2006-08-28  Bruno Haible  <bruno@clisp.org>
4866
4867         * modules/c-strstr: New file, from GNU gettext.
4868         * MODULES.html.sh (String handling): Add c-strstr.
4869
4870 2006-08-28  Bruno Haible  <bruno@clisp.org>
4871
4872         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
4873         macros.
4874         Reported by Eric Blake.
4875
4876 2006-08-28  Bruno Haible  <bruno@clisp.org>
4877
4878         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
4879         (VASNPRINTF): Return a string of length > INT_MAX without failing.
4880         * lib/vasprintf.c: Include errno.h, limits.h.
4881         (EOVERFLOW): New fallback definition.
4882         (vasprintf): Test here whether the string length is > INT_MAX.
4883         * lib/vsnprintf.c: Include errno.h, limits.h.
4884         (EOVERFLOW): New fallback definition.
4885         (vsnprintf): Fix bug when generated string was too long for the buffer.
4886         Test here whether the string length is > INT_MAX.
4887
4888 2006-08-28  Bruno Haible  <bruno@clisp.org>
4889
4890         * lib/inttypes_.h (SCNX*): Remove definitions.
4891         Reported by Eric Blake.
4892
4893 2006-08-28  Bruno Haible  <bruno@clisp.org>
4894
4895         * lib/c-strstr.h: New file, from GNU gettext.
4896         * lib/c-strstr.c: New file, from GNU gettext.
4897
4898 2006-08-28  Bruno Haible  <bruno@clisp.org>
4899
4900         * gnulib-tool: Reorder some statements.
4901
4902 2006-08-28  Bruno Haible  <bruno@clisp.org>
4903
4904         * gnulib-tool: New option --makefile-name.
4905         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
4906         $makefile_name.
4907         (func_import): Write $makefile_name to the cache file, and read it from
4908         there unless explicitly specified. Use $makefile_name as file name
4909         instead of Makefile.am. Adjust the recommendations accordingly.
4910
4911 2006-08-28  Bruno Haible  <bruno@clisp.org>
4912
4913         * gnulib-tool (func_verify_module): Check against misapplying patch.
4914
4915 2006-08-28  Bruno Haible  <bruno@clisp.org>
4916
4917         * gnulib-tool (func_relativize, func_relconcat): New functions.
4918         Give an error if --local-dir is given with --update.
4919         Remove trailing slashes from $local_gnulib_dir.
4920         (func_import): Store the relativized $local_gnulib_dir in
4921         gnulib-cache.m4, and read it from there if not specified explicitly.
4922
4923 2006-08-28  Bruno Haible  <bruno@clisp.org>
4924
4925         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
4926         is the current directory. Respect also $local_gnulib_dir.
4927
4928 2006-08-28  Bruno Haible  <bruno@clisp.org>
4929             Simon Josefsson  <jas@extundo.com>
4930
4931         BeOS portability.
4932         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
4933
4934 2006-08-27  Jim Meyering  <jim@meyering.net>
4935
4936         * doc/visibility.texi: Remove duplicate word: "pointer".
4937
4938 2006-08-26  Bruno Haible  <bruno@clisp.org>
4939
4940         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
4941         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
4942         (Makefile.am): Create inttypes.h from inttypes_.h.
4943         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
4944
4945         * modules/imaxabs: New file.
4946
4947         * modules/imaxdiv: New file.
4948
4949 2006-08-26  Bruno Haible  <bruno@clisp.org>
4950
4951         * m4/inttypes.m4: New file.
4952         * m4/_inttypes_h.m4: Remove file.
4953         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
4954         PRI_MACROS_BROKEN.
4955         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
4956
4957         * m4/imaxabs.m4: New file.
4958
4959         * m4/imaxdiv.m4: New file.
4960
4961 2006-08-26  Bruno Haible  <bruno@clisp.org>
4962
4963         * lib/inttypes_.h: New file.
4964         * lib/inttypes.h: Remove file.
4965         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
4966
4967         * lib/imaxabs.c: New file.
4968
4969         * lib/imaxdiv.c: New file.
4970
4971 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4972
4973         New config-h module, so that "make" output needn't be cluttered
4974         by -DHAVE_CONFIG_H.
4975         * MODULES.html.sh (Support for building libraries and executables):
4976         Add config-h.
4977         * modules/config-h: New file.
4978         * gnulib-tool (nl, sed_transform_lib_file): New vars.
4979         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
4980         the config-h module is used.
4981
4982         New configmake module, so that "make" output needn't be cluttered
4983         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
4984         * MODULES.html.sh (Support for building libraries and executables):
4985         Add configmake.
4986         * modules/configmake: New file.
4987
4988 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4989
4990         * m4/config-h.m4: New file.
4991
4992 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4993
4994         * config/srclist.txt: Add elisp-comp.
4995
4996 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4997
4998         * MODULES.html.sh (Support for building libraries and executables):
4999         Add elisp-comp.
5000         * build-aux/elisp-comp: New file.
5001         * modules/elisp-comp: New file.
5002
5003 2006-08-24  Bruno Haible  <bruno@clisp.org>
5004
5005         * gnulib-tool (func_create_testdir): Use non-default values of
5006         sourcebase and m4base.
5007
5008 2006-08-24  Bruno Haible  <bruno@clisp.org>
5009
5010         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
5011         HTML structure.
5012
5013 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
5014
5015         * modules/openat (Depends-on): Add lchown.
5016
5017 2006-08-23  Bruno Haible  <bruno@clisp.org>
5018
5019         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
5020         of gl_LOCK_EARLY instead of gl_LOCK.
5021
5022 2006-08-23  Bruno Haible  <bruno@clisp.org>
5023
5024         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
5025         on OSF/1 to no.
5026         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
5027
5028 2006-08-23  Bruno Haible  <bruno@clisp.org>
5029
5030         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
5031         as unusable.
5032
5033         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
5034         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
5035         (gl_LOCK): New macro.
5036
5037 2006-08-22  Simon Josefsson  <jas@extundo.com>
5038
5039         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
5040         to md5 module.
5041
5042 2006-08-22  Simon Josefsson  <jas@extundo.com>
5043
5044         * MODULES.html.sh: Add "Support for maintaining and release
5045         projects".
5046
5047         * build-aux/gnupload: New file, from coreutils.
5048
5049 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5050
5051         Avoid the need for AC_LIBSOURCES in m4 macros.
5052         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5053         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5054         * modules/check-version (EXTRA_DIST): Add check-version.h.
5055         * modules/crc (EXTRA_DIST): Add crc.h.
5056         * modules/des (EXTRA_DIST): Add des.h.
5057         * modules/gc (EXTRA_DIST): Add gc.h.
5058         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5059         * modules/getline (EXTRA_DIST): Add getline.h.
5060         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5061         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5062         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5063         * modules/md2 (EXTRA_DIST): Add md2.h.
5064         * modules/md4 (EXTRA_DIST): Add md4.h.
5065         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5066         * modules/read-file (EXTRA_DIST): Add read-file.h.
5067         * modules/readline (EXTRA_DIST): Add readline.h.
5068         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5069         rijndael-api-fst.h.
5070
5071 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5072
5073         * m4/rijndael.m4 (gl_ARCFOUR):
5074         * m4/arctwo.m4 (gl_ARCTWO):
5075         * m4/check-version.m4 (gl_CHECK_VERSION):
5076         * m4/crc.m4 (gl_CRC):
5077         * m4/des.m4 (gl_DES):
5078         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5079         * m4/gc.m4 (gl_GC):
5080         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5081         * m4/getline.m4 (gl_FUNC_GETLINE):
5082         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5083         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5084         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
5085         * m4/md2.m4 (gl_MD2):
5086         * m4/md4.m4 (gl_MD4):
5087         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
5088         * m4/read-file.m4 (gl_FUNC_READ_FILE):
5089         * m4/readline.m4 (gl_FUNC_READLINE):
5090         * m4/rijndael.m4 (gl_RIJNDAEL):
5091         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5092         to get the necessary .h files and whatnot.
5093
5094 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5095
5096         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
5097         gnulib rather than the other way around.
5098         * config/srclistvars.sh (COREUTILS): Remove.
5099
5100 2006-08-22  Jim Meyering  <jim@meyering.net>
5101
5102         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
5103
5104         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
5105
5106 2006-08-22  Eric Blake  <ebb9@byu.net>
5107
5108         * modules/regexprops-generic: New file.
5109         * MODULES.html.sh (Support for building documentation): List it.
5110
5111 2006-08-22  Eric Blake  <ebb9@byu.net>
5112
5113         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
5114         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
5115         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
5116         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
5117
5118 2006-08-22  Bruno Haible  <bruno@clisp.org>
5119
5120         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
5121         and lib_LTLIBRARIES like the other lib_* variables.
5122
5123 2006-08-22  Bruno Haible  <bruno@clisp.org>
5124
5125         * build-aux/x-to-1.in: New file, from GNU gettext.
5126
5127 2006-08-22  Bruno Haible  <bruno@clisp.org>
5128
5129         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
5130         <utmpx.h> exists.
5131
5132 2006-08-22  Bruno Haible  <bruno@clisp.org>
5133
5134         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
5135         <utmpx.h> exists.
5136
5137 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5138
5139         BeOS portability.
5140         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
5141         exist.
5142         Problem reported by Bruno Haible.
5143
5144 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5145
5146         Avoid the need for AC_LIBSOURCES in m4 macros.
5147         * modules/acl (EXTRA_DIST): Add acl.h.
5148         * modules/argmatch (Files): Add m4/argmatch.m4.
5149         (configure.ac): Add gl_ARGMATCH.
5150         (EXTRA_DIST): Renamed from lib_SOURCES, for
5151         consistency with the other modules.  Remove argmatch.c.
5152         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
5153         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
5154         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
5155         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
5156         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
5157         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
5158         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
5159         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
5160         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
5161         * modules/closeout (EXTRA_DIST): Add closeout.h.
5162         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
5163         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
5164         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
5165         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
5166         dirname.h; remove basename.c and stripslash.c.
5167         * modules/exclude (EXTRA_DIST): Add exclude.h.
5168         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
5169         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
5170         * modules/file-type (EXTRA_DIST): Add file-type.h.
5171         * modules/filemode (EXTRA_DIST): Add filemode.h.
5172         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
5173         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5174         * modules/fpending (EXTRA_DIST): Add __fpending.h.
5175         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
5176         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
5177         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
5178         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
5179         * modules/getdate (EXTRA_DIST): Add getdate.c.
5180         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
5181         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
5182         * modules/getpass (EXTRA_DIST): Add getpass.h.
5183         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
5184         * modules/group-member (EXTRA_DIST): Add group-member.h.
5185         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
5186         * modules/hash (EXTRA_DIST): Add hash.h.
5187         * modules/human (EXTRA_DIST): Add human.h.
5188         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
5189         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
5190         * modules/lchown (EXTRA_DIST): Add lchown.h.
5191         * modules/long-options (EXTRA_DIST): Add long-options.h.
5192         * modules/lstat (EXTRA_DIST): Add lstat.h.
5193         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
5194         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
5195         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
5196         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
5197         * modules/memxor (EXTRA_DIST): Add memxor.h.
5198         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
5199         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
5200         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
5201         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
5202         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
5203         * modules/physmem (EXTRA_DIST): Add physmem.h.
5204         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
5205         * modules/posixver (EXTRA_DIST): Add posixver.h.
5206         * modules/quote (EXTRA_DIST): Add quote.h.
5207         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
5208         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
5209         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
5210         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
5211         regex_internal.h regexec.c.
5212         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
5213         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
5214         * modules/same (EXTRA_DIST): Add same.h.
5215         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
5216         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
5217         * modules/savedir (EXTRA_DIST): Add savedir.h.
5218         * modules/sha1 (EXTRA_DIST): Add sha1.h.
5219         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
5220         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
5221         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
5222         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
5223         * modules/strdup (EXTRA_DIST): Add strdup.h.
5224         * modules/strftime (EXTRA_DIST): Add strftime.h.
5225         * modules/strndup (EXTRA_DIST): Add strndup.h.
5226         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
5227         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
5228         * modules/time_r (EXTRA_DIST): Add time_r.h.
5229         * modules/timespec (EXTRA_DIST): Add timespec.h.
5230         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5231         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
5232         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
5233         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
5234         * modules/userspec (EXTRA_DIST): Add userspec.h.
5235         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
5236         * modules/utimens (EXTRA_DIST): Add utimens.h.
5237         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
5238         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
5239         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
5240         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
5241         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
5242         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
5243         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
5244         * modules/yesno (EXTRA_DIST): Add yesno.h.
5245
5246 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5247
5248         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
5249
5250         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
5251         * m4/dev-ino.m4, same-inode.m4: Remove.
5252
5253         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
5254         * m4/acl.m4 (AC_FUNC_ACL):
5255         * m4/backupfile.m4 (gl_BACKUPFILE):
5256         * m4/c-strtod.m4 (gl_C99_STRTOLD):
5257         * m4/canon-host.m4 (gl_CANON_HOST):
5258         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5259         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
5260         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
5261         * m4/cloexec.m4 (gl_CLOEXEC):
5262         * m4/close-stream.m4 (gl_CLOSE_STREAM):
5263         * m4/closeout.m4 (gl_CLOSEOUT):
5264         * m4/dirfd.m4 (gl_FUNC_DIRFD):
5265         * m4/dirname.m4 (gl_DIRNAME):
5266         * m4/exclude.m4 (gl_EXCLUDE):
5267         * m4/exitfail.m4 (gl_EXITFAIL):
5268         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
5269         * m4/file-type.m4 (gl_FILE_TYPE):
5270         * m4/filemode.m4 (gl_FILEMODE):
5271         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
5272         * m4/fpending.m4 (gl_FUNC_FPENDING):
5273         * m4/fprintftime.m4 (gl_FPRINTFTIME):
5274         * m4/fts.m4 (gl_FUNC_FTS):
5275         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
5276         * m4/getdate.m4 (gl_GETDATE):
5277         * m4/gethrxtime.m4 (gl_GETHRXTIME):
5278         * m4/getpagesize.m4 (gl_GETPAGESIZE):
5279         * m4/getpass.m4 (gl_FUNC_GETPASS):
5280         * m4/gettime.m4 (gl_GETTIME):
5281         * m4/getugroups.m4 (gl_GETUGROUPS):
5282         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
5283         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
5284         * m4/hard-locale.m4 (gl_HARD_LOCALE):
5285         * m4/hash.m4 (gl_HASH):
5286         * m4/idcache.m4 (gl_IDCACHE):
5287         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
5288         * m4/lchown.m4 (gl_FUNC_LCHOWN):
5289         * m4/long-options.m4 (gl_LONG_OPTIONS):
5290         * m4/lstat.m4 (gl_FUNC_LSTAT):
5291         * m4/md5.m4 (gl_MD5):
5292         * m4/memcasecmp.m4 (gl_MEMCASECMP):
5293         * m4/memcoll.m4 (gl_MEMCOLL):
5294         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
5295         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
5296         * m4/memxor.m4 (gl_MEMXOR):
5297         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
5298         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
5299         * m4/modechange.m4 (gl_MODECHANGE):
5300         * m4/mountlist.m4 (gl_MOUNTLIST):
5301         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5302         * m4/openat.m4 (gl_FUNC_OPENAT):
5303         * m4/pathmax.m4 (gl_PATHMAX):
5304         * m4/physmem.m4 (gl_PHYSMEM):
5305         * m4/posixtm.m4 (gl_POSIXTM):
5306         * m4/posixver.m4 (gl_POSIXVER):
5307         * m4/quote.m4 (gl_QUOTE):
5308         * m4/quotearg.m4 (gl_QUOTEARG):
5309         * m4/readtokens.m4 (gl_READTOKENS):
5310         * m4/readutmp.m4 (gl_READUTMP):
5311         * m4/regex.m4 (gl_REGEX):
5312         * m4/safe-read.m4 (gl_SAFE_READ):
5313         * m4/safe-write.m4 (gl_SAFE_WRITE):
5314         * m4/same.m4 (gl_SAME):
5315         * m4/save-cwd.m4 (gl_SAVE_CWD):
5316         * m4/savedir.m4 (gl_SAVEDIR):
5317         * m4/settime.m4 (gl_SETTIME):
5318         * m4/sha1.m4 (gl_SHA1):
5319         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5320         * m4/stat-macros.m4 (gl_STAT_MACROS):
5321         * m4/stat-time.m4 (gl_STAT_TIME):
5322         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5323         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5324         * m4/strdup.m4 (gl_FUNC_STRDUP):
5325         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5326         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5327         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5328         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5329         * m4/time_r.m4 (gl_TIME_R):
5330         * m4/timespec.m4 (gl_TIMESPEC):
5331         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5332         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5333         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5334         * m4/userspec.m4 (gl_USERSPEC):
5335         * m4/utimecmp.m4 (gl_UTIMECMP):
5336         * m4/utimens.m4 (gl_UTIMENS):
5337         * m4/xalloc.m4 (gl_XALLOC):
5338         * m4/xgetcwd.m4 (gl_XGETCWD):
5339         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5340         * m4/xreadlink.m4 (gl_XREADLINK):
5341         * m4/xstrtod.m4 (gl_XSTRTOD):
5342         * m4/yesno.m4 (gl_YESNO):
5343         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5344         to get the necessary .h files and whatnot.
5345
5346 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5347             Bruno Haible  <bruno@clisp.org>
5348
5349         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5350         /bin/sh understanding of '!' conditional negation.
5351
5352 2006-08-21  Jim Meyering  <jim@meyering.net>
5353
5354         * modules/openat (Depends-on): Really alphabetize.
5355
5356         * modules/acl (Depends-on): Add error and quote.
5357
5358         * check-module (find_included_lib_files): Add at-func.c to the
5359         ok-to-include-more-than-once white list.
5360
5361         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5362
5363 2006-08-21  Bruno Haible  <bruno@clisp.org>
5364
5365         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5366         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5367         Reported by Martin Lambers <marlam@marlam.de>.
5368
5369 2006-08-21  Bruno Haible  <bruno@clisp.org>
5370
5371         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5372         specify an installation location, don't emit a noinst_LIBRARIES or
5373         noinst_LTLIBRARIES assignment.
5374
5375 2006-08-21  Bruno Haible  <bruno@clisp.org>
5376
5377         BeOS portability.
5378         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5379         BeOS has mbrtowc() but no <wctype.h>.
5380
5381 2006-08-21  Bruno Haible  <bruno@clisp.org>
5382
5383         BeOS portability.
5384         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5385         exist.
5386
5387 2006-08-21  Bruno Haible  <bruno@clisp.org>
5388
5389         BeOS portability.
5390         * lib/mbchar.h: Include <wctype.h> only if it exists.
5391
5392 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5393
5394         Remove files that are no longer needed by their respective modules.
5395         * m4/obstack.m4: Remove.
5396         * m4/strerror_r.m4: Remove.
5397         * m4/uint32_t.m4: Remove.
5398         * m4/uintptr_t.m4: Remove.
5399         * m4/ullong_max.m4: Remove.
5400         * m4/xstrtoimax.m4: Remove.
5401         * m4/xstrtoumax.m4: Remove.
5402
5403         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5404         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5405         dependencies now capture this.
5406
5407         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5408         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5409         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5410         * m4/human.m4 (gl_HUMAN): Likewise.
5411         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5412         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5413
5414         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5415
5416         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5417         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5418         stdint.
5419         * m4/human.m4 (gl_HUMAN): Likewise.
5420         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5421         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5422         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5423         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5424         * m4/xstrtol (gl_XSTRTOL): Likewise.
5425
5426         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5427         AC_TYPE_LONG_LONG_INT.
5428         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5429         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5430         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5431         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5432
5433         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5434         on stdbool.
5435
5436         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5437         (gl_PREREQ_XSTRTOUL): Remove.
5438
5439         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5440
5441         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5442         mode.
5443
5444 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5445
5446         Add and change modules to make it easier for coreutils to use
5447         gnulib-tool.
5448         * modules/backupfile (Files): Remove m4/d-ino.m4.
5449         (Depends-on): Add d-ino.
5450         * modules/cycle-check (Depends-on): Add stdint.
5451         (lib_SOURCES): Add cycle-check.h.
5452         * modules/d-ino: New module.
5453         * modules/d-type: New module.
5454         * modules/error (Files): Remove m4/strerror_r.m4.
5455         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5456         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5457         m4/inttypes_h.m4, m4/uintmax_t.m4.
5458         (Depends-on): Add stdint.
5459         (lib_SOURCES): Add fsusage.h.
5460         * modules/getcwd (Files): Remove d-ino.m4.
5461         (Depends-on): Add d-ino.
5462         * modules/getndelim2 (Depends-on): Add stdint.
5463         * modules/glob (Files): Remove m4/d-type.m4.
5464         (Depends-on): Add d-type.
5465         * modules/host-os: New module.
5466         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5467         m4/inttypes_h.m4, m4/uintmax_t.m4.
5468         * Depends-on: Add stdint.
5469         (lib_SOURCES): Add human.h.
5470         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5471         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5472         m4/uintmax_t.m4, m4/ulonglong.m4.
5473         (Depends-on): Add stdint.
5474         (EXTRA_DIST): Add inttostr.h.
5475         * modules/lchmod: New module.
5476         * modules/link-follow: New module.
5477         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5478         (Depends-on): Add lchmod.
5479         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5480         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5481         (Depends-on): Add stdint.
5482         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
5483         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5484         (Depends-on): Add stdint.
5485         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
5486         * modules/perl: New module.
5487         * modules/regex (Depends-on): Add stdint.
5488         * modules/rmdir-errno: New module.
5489         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5490         m4/intmax_t.m4.
5491         (Depends-on): Add stdint.
5492         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5493         m4/uintmax_t.m4.
5494         (Depends-on): Add stdint.
5495         * modules/unlink-busy: New module.
5496         * modules/utimecmp (Depends-on): Add stdint.
5497         * modules/uptime: New module.
5498         * modules/winsz-ioctl: New module.
5499         * modules/winsz-termios: New module.
5500         * modules/xnanosleep (Depends-on): Add nanosleep.
5501         * modules/ullong_max: Remove.
5502         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
5503         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
5504         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
5505         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
5506         (Depends-on): Add inttypes.
5507         (lib_SOURCES): Add xstrtol.h.
5508         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
5509         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
5510         * MODULES.html.sh: Move 'assert' into the assert section.
5511         Move 'dummy' into the linking section.
5512         Remove ullong_max.
5513         Add section for compatibility checks for POSIX:2001 functions,
5514         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
5515         winsz-ioctl, and winsz-termios into it.
5516         Add lchmod.
5517         Add top-level Misc section and put host-os, perl, and uptime
5518         into it.
5519
5520 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5521
5522         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
5523         now assume the stdint module.  Do not include inttypes.h.
5524         * lib/fsusage.h: Likewise.
5525         * lib/getndelim2.c: Likewise.
5526         * lib/human.h: Likewise.
5527         * lib/inttostr.h: Likewise.
5528         * lib/obstack.c: Likewise.
5529         * lib/regex_internal.h: Likewise.
5530         * lib/tempname.c: Likewise.
5531         * lib/utimecmp.c: Likewise.
5532         * lib/xstrtol.h: Likewise.
5533
5534         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5535
5536         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5537         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5538         * lib/xtime.h: Likewise.
5539
5540 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5541
5542         * modules/openat (Files): Add lib/fchmodat.c.
5543         Fixes problem reported by Jay Youngman.
5544
5545 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5546
5547         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5548         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5549
5550 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5551             Bruno Haible  <bruno@clisp.org>
5552
5553         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5554         and is a script that invokes bison. Tighten the code. Add comments.
5555
5556 2006-08-18  Jim Meyering  <jim@meyering.net>
5557
5558         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5559         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5560         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5561         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5562
5563 2006-08-18  Bruno Haible  <bruno@clisp.org>
5564
5565         * modules/bison-i18n: New file.
5566         * MODULES.html.sh (Internationalization functions): Add it.
5567
5568 2006-08-18  Bruno Haible  <bruno@clisp.org>
5569
5570         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5571         sys/statvfs.h. When getmntinfo was found, check its declaration and
5572         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5573
5574 2006-08-18  Bruno Haible  <bruno@clisp.org>
5575
5576         * m4/bison-i18n.m4: New file, from bison.
5577
5578 2006-08-18  Bruno Haible  <bruno@clisp.org>
5579
5580         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5581         (ME_DUMMY): Treat "kernfs" as a dummy.
5582         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5583
5584 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5585
5586         Update from coreutils.
5587
5588         2006-08-15  Jim Meyering  <jim@meyering.net>
5589
5590         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5591
5592         2006-01-17  Jim Meyering  <jim@meyering.net>
5593
5594         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5595
5596         2006-01-11  Jim Meyering  <jim@meyering.net>
5597
5598         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5599         Check for the lchmod function.
5600
5601 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5602
5603         Update from coreutils.
5604
5605         * lib/__fpending.h: Add copyright notice.
5606         * lib/fprintftime.h: Likewise.
5607         * lib/savedir.c: Use (C) in copyright notice.
5608         * lib/savedir.h: Likewise.
5609
5610         2006-08-15  Jim Meyering  <jim@meyering.net>
5611
5612         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5613         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5614         in support of the EXPECTED_ERRNO macro.
5615         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5616         definitions.  Instead, define the appropriate symbols and include
5617         "at-func.c".
5618         * lib/mkdirat.c (mkdirat): Likewise.
5619         * lib/fchmodat.c (fchmodat): Likewise.
5620         (ENOSYS): Remove definition.
5621         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5622         it.  Don't include "unistd--.h" -- it wasn't ever used.
5623
5624         2006-01-17  Jim Meyering  <jim@meyering.net>
5625
5626         Rewrite fts.c not to change the current working directory,
5627         by using openat, fstatat, fdopendir, etc..
5628
5629         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5630         (HAVE_OPENAT_SUPPORT): Define.
5631         [_LIBC] (fchdir): Don't undef or define; no longer used.
5632         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5633         Now, this `function' always succeeds, and consumes its file descriptor
5634         parameter -- so callers must not close such FDs.  Update callers.
5635         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5636         (diropen): Add parameter, SP.  Adjust all callers.
5637         Implement using diropen_fd, rather than open.
5638         (fts_open): Initialize new member, fts_cwd_fd.
5639         Remove fts_rft-setting code.
5640         (fts_close): Close fts_cwd_fd, if necessary.
5641         (__opendir2): Define in terms of opendir or opendirat,
5642         depending on whether the FST_NOCHDIR flag is set.
5643         (fts_build): Since fts_safe_changedir consumes its FD, and since
5644         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5645         and close the dup'd file descriptor upon failure.
5646         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5647         (fts_safe_changedir): Tweak semantics to reflect that this function
5648         now calls cwd_advance_fd and hence consumes its FD argument.
5649         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5650         [struct FTS] (fts_rft): Remove now-unused member.
5651         [struct FTS] (fts_cycle.state): Improve comment.
5652
5653         * lib/openat.c (openat_needs_fchdir): New function.
5654         * lib/openat.h (openat_needs_fchdir): Declare it.
5655
5656 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5657
5658         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5659         Problem and fix reported by Pádraig Brady in
5660         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5661
5662 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5663
5664         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5665
5666 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5667
5668         * lib/memcoll.c (memcoll): Optimize for the common case where the
5669         arguments are bytewise equal.
5670
5671 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5672
5673         * doc/regexprops-generic.texi: Add a copyright notice.
5674
5675 2006-08-15  Bruno Haible  <bruno@clisp.org>
5676
5677         * modules/tmpdir (License): Change to LGPL.
5678
5679 2006-08-15  Bruno Haible  <bruno@clisp.org>
5680
5681         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5682         module.
5683
5684 2006-08-14  Simon Josefsson  <jas@extundo.com>
5685
5686         * config/srclist.txt: Add gnupload.
5687
5688 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5689
5690         Change copyright notice from LGPL 2 to GPL 2, since that's the
5691         standard form used in the gnulib repository.
5692         * tests/test-lock.c: Likewise.
5693         * tests/test-stdint.c: Likewise.
5694         * tests/test-tls.c: Likewise.
5695
5696         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5697         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5698         Add copyright notice.
5699
5700         * check-module: Add copyright notice.  Output a copyright
5701         notice if "--version" is specified.
5702         * modules/COPYING: New file.
5703         * tests/test-getaddrinfo.c: Add copyright notice.
5704         * tests/test-verify.c: Likewise.
5705
5706 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5707
5708         Change copyright notice from LGPL 2 to GPL 2, since that's the
5709         standard form used in the gnulib repository.
5710         * lib/lock.c: LGPL -> GPL.
5711         * lib/lock.h: Likewise.
5712         * lib/strnlen1.c: Likewise.
5713         * lib/strnlen1.h: Likewise.
5714         * lib/tls.c: Likewise.
5715         * lib/tls.h: Likewise.
5716         * lib/tmpdir.c: Likewise.
5717
5718         * lib/TODO: Remove; this belongs only in coreutils.
5719
5720 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5721
5722         Add copyright notices to long-enough files that lack them, since
5723         otherwise the files aren't clearly free.  Use the same notice that
5724         getdate.texi already uses.
5725         * doc/alloca-opt.texi: Add copyright notice.
5726         * doc/alloca.texi: Likewise.
5727         * doc/ctime.texi: Likewise.
5728         * doc/functions.texi: Likewise.
5729         * doc/gcd.texi: Likewise.
5730         * doc/gnulib-tool.texi: Likewise.
5731         * doc/inet_ntoa.texi: Likewise.
5732         * doc/visibility.texi: Likewise.
5733
5734         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5735         * doc/quote.texi: Add copyright notice.
5736
5737         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5738         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5739         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5740         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5741         is now obsolete, and give a pointer to the Sun list.
5742         Add copyright notice.
5743
5744 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5745
5746         * config/srclistvars.sh: Add copyright notice.
5747
5748 2006-08-14  Eric Blake  <ebb9@byu.net>
5749
5750         Import the following change from libc:
5751
5752         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5753
5754         Upstream bug 2997.
5755         * lib/misc/error.c: Add space between program name and message if file
5756         name is missing.
5757
5758 2006-08-12  Karl Berry  <karl@gnu.org>
5759
5760         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5761         remove, these originate in gnulib now.
5762
5763 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5764
5765         * doc/Makefile (standards.info standards.html standards.dvi):
5766         Also depend on make-stds.texi.
5767
5768 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5769
5770         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5771         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5772
5773         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5774         in wchar_t.  Problem reported by Eric Blake.
5775
5776         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5777         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5778         Also, help the compiler to keep LEN in a register.
5779
5780 2006-08-11  Eric Blake  <ebb9@byu.net>
5781
5782         * users.txt: Sort.  Add tar.
5783
5784 2006-08-11  Bruno Haible  <bruno@clisp.org>
5785
5786         * users.txt: New file.
5787
5788 2006-08-11  Bruno Haible  <bruno@clisp.org>
5789
5790         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5791         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5792
5793 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5794
5795         * modules/snprintf (Depends-on): Remove minmax.
5796         (Maintainer): Add self and Bruno.
5797
5798 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5799
5800         * lib/.cppi-disable: Add snprintf.h, socket_.h.
5801         * lib/snprintf.c: Include <errno.h> and <limits.h>.
5802         (EOVERFLOW): Define if the system does not.
5803         Do not include "minmax.h"; it wasn't used.
5804         (snprintf): Don't assume size_t promotes to an unsigned type.
5805         Fix bug when generated string was too long for the buffer: the
5806         buffer's contents are supposed to be the initial prefix of the
5807         output.  Don't assume vasnprintf returns EOVERFLOW if the size
5808         exceeds INT_MAX; do the check ourselves.
5809
5810         Import the following changes from libc:
5811
5812         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
5813
5814         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
5815         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
5816         set wc to the byte which couldn't be converted.
5817         (re_string_reconstruct): Don't clear valid_raw_len before calling
5818         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
5819         tip_context using re_string_context_at.
5820
5821         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
5822
5823         * lib/posix/regex.h: g++ still cannot handled [restrict].
5824
5825         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
5826
5827         * lib/posix/regex.h: Remove special handling for VMS.
5828
5829 2006-08-10  Jim Meyering  <jim@meyering.net>
5830
5831         * modules/same-inode: New module.
5832         * modules/dev-ino: New module.
5833         * modules/cycle-check: Depend on these modules, rather than simply
5834         including their .h files.
5835         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
5836         required via m4/cycle-check.m4.
5837         * modules/same: Depend on new same-inode module, rather than
5838         including same-inode.h.
5839         * modules/chdir-safer: New file.
5840
5841         * modules/chown (Depends-on): Add stat-macros.
5842
5843 2006-08-10  Jim Meyering  <jim@meyering.net>
5844
5845         * m4/cycle-check.m4: New file.
5846         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
5847         * m4/dev-ino.m4, m4/same-inode.m4: New files.
5848
5849 2006-08-10  Eric Blake  <ebb9@byu.net>
5850
5851         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
5852         in from original proposal.
5853
5854 2006-08-10  Eric Blake  <ebb9@byu.net>
5855         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5856
5857         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
5858         namespace.
5859
5860 2006-08-10  Bruno Haible  <bruno@clisp.org>
5861
5862         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
5863         as well.
5864
5865 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5866
5867         Sync from coreutils.
5868
5869         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
5870
5871         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
5872         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
5873
5874 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5875
5876         * modules/restrict: Remove; no longer needed now that we assume
5877         Autoconf 2.59 or later.
5878         * MODULES.html.sh: Remove 'restrict'.
5879         * modules/argp (Depends-on): Remove 'restrict'.
5880         * modules/base64 (Depends-on): Likewise.
5881         * modules/gc (Depends-on): Likewise.
5882         * modules/getaddrinfo (Depends-on): Likewise.
5883         * modules/glob (Depends-on): Likewise.
5884         * modules/inet_ntop (Depends-on): Likewise.
5885         * modules/inet_pton (Depends-on): Likewise.
5886         * modules/memxor (Depends-on): Likewise.
5887         * modules/regex (Depends-on): Likewise.
5888         * modules/strtok_r (Depends-on): Likewise.
5889         * modules/time_r (Depends-on): Likewise.
5890
5891 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5892
5893         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
5894         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
5895         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5896         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
5897         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
5898         * m4/memxor.m4 (gl_MEMXOR): Likewise.
5899         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
5900         gl_C_RESTRICT replaced by AC_C_RESTRICT.
5901
5902         Merge from coreutils.
5903         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
5904         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
5905         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5906         * m4/time_r.m4 (gl_TIME_R): Likewise.
5907
5908 2006-08-09  Karl Berry  <karl@gnu.org>
5909
5910         * config/srclist.txt: no more gettext-tools, per Bruno.
5911
5912 2006-08-08  Eric Blake  <ebb9@byu.net>
5913
5914         * modules/verror: New module.
5915         * MODULES.html.sh: Document it.
5916
5917 2006-08-08  Eric Blake  <ebb9@byu.net>
5918
5919         * lib/verror.h, lib/verror.c: New files.
5920
5921 2006-08-08  Eric Blake  <ebb9@byu.net>
5922
5923         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
5924         verror_at_line output complies with GNU Coding Standards even when
5925         file is NULL.
5926
5927 2006-08-07  Bruno Haible  <bruno@clisp.org>
5928
5929         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
5930         versions of AIX.
5931         Reported by Ralf Wildenhues.
5932
5933 2006-08-07  Bruno Haible  <bruno@clisp.org>
5934
5935         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
5936         in an AC_DEFUN. Needed so that the autoconf snippets can use
5937         AC_REQUIRE.
5938
5939 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5940
5941         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5942         Initialize pkgdata_DATA.
5943         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
5944         overriding it.
5945
5946 2006-08-06  Eric Blake  <ebb9@byu.net>
5947
5948         * lib/error.h: Fold in some upstream changes from glibc.
5949         * lib/error.c: Likewise.
5950
5951 2006-08-04  Bruno Haible  <bruno@clisp.org>
5952
5953         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5954         Make the mostlyclean-local rule depend on mostlyclean-generic.
5955         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
5956
5957 2006-07-31  Bruno Haible  <bruno@clisp.org>
5958
5959         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
5960         <stdlib.h>, <string.h>.
5961
5962 2006-07-30  Bruno Haible  <bruno@clisp.org>
5963
5964         * modules/readlink (License): Change to LGPL.
5965
5966 2006-07-30  Bruno Haible  <bruno@clisp.org>
5967
5968         * modules/javaversion (Makefile.am): Distribute javaversion.java and
5969         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
5970         set PKGDATADIR to point to it.
5971
5972 2006-07-30  Bruno Haible  <bruno@clisp.org>
5973
5974         * modules/csharpexec (configure.ac): Comment out macro invocation.
5975         * modules/javaexec (configure.ac): Likewise.
5976         * modules/javacomp-script (configure.ac): Likewise.
5977
5978         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
5979
5980 2006-07-30  Bruno Haible  <bruno@clisp.org>
5981
5982         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
5983         linked-list.
5984
5985 2006-07-30  Bruno Haible  <bruno@clisp.org>
5986
5987         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
5988
5989 2006-07-30  Bruno Haible  <bruno@clisp.org>
5990
5991         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5992         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
5993         get removed.
5994
5995 2006-07-29  Bruno Haible  <bruno@clisp.org>
5996
5997         Make it possible for gnulib-tool to work with locally modified or
5998         augmented gnulib repositories.
5999         * gnulib-tool (func_usage): Document --local-dir option.
6000         (local_gnulib_dir): New variable.
6001         Handle --local-dir option.
6002         (func_lookup_file): New function.
6003         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
6004         (func_get_description, func_get_filelist, func_get_description,
6005         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
6006         func_get_automake_snippet, func_get_include_directive,
6007         func_get_license, func_get_maintainer): Use func_lookup_file.
6008         (func_import, func_create_testdir): Use func_lookup_file.
6009
6010 2006-07-29  Bruno Haible  <bruno@clisp.org>
6011
6012         * modules/setenv (Depends-on): Add unistd.
6013
6014 2006-07-29  Bruno Haible  <bruno@clisp.org>
6015
6016         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
6017
6018 2006-07-29  Bruno Haible  <bruno@clisp.org>
6019
6020         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
6021
6022 2006-07-29  Bruno Haible  <bruno@clisp.org>
6023
6024         * gnulib-tool (import, update): If there is no Makefile.am, look at
6025         aclocal.m4, instead of bailing out.
6026
6027 2006-07-29  Bruno Haible  <bruno@clisp.org>
6028
6029         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
6030         Categorize the options by when they are useful.
6031
6032 2006-07-29  Bruno Haible  <bruno@clisp.org>
6033
6034         * gnulib-tool (func_usage): Document option --no-libtool.
6035         Handle option --no-libtool.
6036         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
6037         for changed semantics of $libtool variable.
6038         (func_import): Likewise. If libtool is not used, show this through
6039         an option --no-libtool.
6040         (func_create_testdir): Update.
6041
6042 2006-07-29  Bruno Haible  <bruno@clisp.org>
6043
6044         * gnulib-tool (func_import): Extend error message about missing
6045         --doc-base.
6046
6047 2006-07-29  Bruno Haible  <bruno@clisp.org>
6048
6049         * gnulib-tool (func_import): Don't create the $docbase directory if
6050         there is no file to store there.
6051
6052 2006-07-29  Bruno Haible  <bruno@clisp.org>
6053
6054         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6055         relevant, look for configure.ac there, not in the current directory.
6056         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6057
6058 2006-07-29  Bruno Haible  <bruno@clisp.org>
6059
6060         * gnulib-tool (SORT): New variable.
6061         (func_usage): Undocument --assume-autoconf option.
6062         Remove --assume-autoconf option handling.
6063         (autoconf_minversion): Determine from the contents of configure.ac.
6064         (func_import): Remove autoconf_minversion handling.
6065         Suggested by Eric Blake.
6066
6067 2006-07-29  Bruno Haible  <bruno@clisp.org>
6068
6069         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6070
6071 2006-07-29  Bruno Haible  <bruno@clisp.org>
6072
6073         * config/srclist.txt (*setenv.[ch]): Remove rules.
6074
6075 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6076
6077         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6078
6079 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6080
6081         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6082         arpa/inet.h.
6083
6084 2006-07-28  Simon Josefsson  <jas@extundo.com>
6085
6086         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
6087         * modules/inet_pton (Depends-on): Likewise.
6088
6089 2006-07-28  Simon Josefsson  <jas@extundo.com>
6090
6091         * m4/netinet_in_h.m4: New file.
6092
6093 2006-07-28  Simon Josefsson  <jas@extundo.com>
6094
6095         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
6096         #include's.
6097
6098 2006-07-28  Simon Josefsson  <jas@extundo.com>
6099
6100         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
6101         #include's.
6102
6103 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
6104
6105         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
6106         setgid on directories only if they set these bits.
6107         * lib/modechange.h: Remove obsolete comment about masks.
6108
6109 2006-07-28  Eric Blake  <ebb9@byu.net>
6110
6111         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6112         macro expansion.
6113
6114 2006-07-28  Bruno Haible  <bruno@clisp.org>
6115
6116         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
6117
6118 2006-07-28  Bruno Haible  <bruno@clisp.org>
6119
6120         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
6121
6122 2006-07-28  Bruno Haible  <bruno@clisp.org>
6123
6124         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
6125         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
6126         Define fallbacks.
6127         Avoids link error on FreeBSD 4.x.
6128         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
6129
6130         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
6131         encoding.
6132         * lib/mbswidth.c (iswcntrl): Likewise.
6133
6134 2006-07-27  Bruno Haible  <bruno@clisp.org>
6135
6136         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
6137         test.
6138
6139 2006-07-27  Bruno Haible  <bruno@clisp.org>
6140
6141         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
6142         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
6143         defined.
6144
6145 2006-07-26  Eric Blake  <ebb9@byu.net>
6146
6147         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
6148
6149 2006-07-26  Eric Blake  <ebb9@byu.net>
6150
6151         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
6152         like mingw that lack mkstemp.
6153         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
6154         avoid compilation warning on mingw.
6155
6156 2006-07-26  Bruno Haible  <bruno@clisp.org>
6157
6158         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
6159         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
6160         INT_FAST*_MIN, INTPTR_MIN.
6161
6162 2006-07-25  Bruno Haible  <bruno@clisp.org>
6163
6164         * modules/version-etc (Depends-on): Add stdarg.
6165
6166 2006-07-25  Bruno Haible  <bruno@clisp.org>
6167
6168         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
6169         complex commands.
6170
6171 2006-07-25  Bruno Haible  <bruno@clisp.org>
6172
6173         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
6174         defined in <stdarg.h> or config.h.
6175
6176 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6177
6178         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
6179         (gl_STDIO_SAFER): Remove.
6180
6181 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6182
6183         * MODULES.html.sh (File stream based Input/Output):
6184         Add fopen-safer, tmpfile-safer; remove stdio-safer.
6185         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
6186         * modules/fopen-safer, modules/tmpfile-safer: New files.
6187         * modules/stdio-safer: Remove.
6188
6189 2006-07-24  Bruno Haible  <bruno@clisp.org>
6190
6191         * modules/tmpdir: New file.
6192         * MODULES.html.sh (File system functions): Add it.
6193
6194 2006-07-24  Bruno Haible  <bruno@clisp.org>
6195
6196         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
6197         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
6198
6199 2006-07-24  Bruno Haible  <bruno@clisp.org>
6200
6201         * modules/clean-temp: New file.
6202
6203 2006-07-24  Bruno Haible  <bruno@clisp.org>
6204
6205         * m4/tmpdir.m4: New file, from GNU gettext.
6206
6207 2006-07-24  Bruno Haible  <bruno@clisp.org>
6208
6209         * lib/tmpdir.h: New file, from GNU gettext.
6210         * lib/tmpdir.c: New file, from GNU gettext.
6211
6212 2006-07-24  Bruno Haible  <bruno@clisp.org>
6213
6214         * lib/clean-temp.h: New file, from GNU gettext.
6215         * lib/clean-temp.c: New file, from GNU gettext.
6216
6217 2006-07-23  Eric Blake  <ebb9@byu.net>
6218
6219         * modules/stdio-safer (Files): Add tmpfile-safer.c.
6220         (Depends-on): Add binary-io.
6221
6222 2006-07-23  Eric Blake  <ebb9@byu.net>
6223
6224         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
6225
6226 2006-07-23  Eric Blake  <ebb9@byu.net>
6227
6228         * lib/tmpfile-safer.c: New file.
6229         * lib/stdio-safer.h (fopen_safer): Add prototype.
6230         * lib/stdio--.h (tmpfile): Make safer.
6231
6232 2006-07-23  Bruno Haible  <bruno@clisp.org>
6233
6234         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
6235         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
6236         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
6237         gl_linked_remove_at): Use it.
6238
6239 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6240         and Simon Josefsson <jas@extundo.com>
6241
6242         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
6243
6244         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
6245
6246 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6247
6248         * modules/close-stream: New file.
6249         * modules/closeout (Description): Make it clear that it exits
6250         with a diagnostic on error.
6251         (Depends-on): Add close-stream.  Remove fpending, stdbool.
6252         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
6253
6254 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6255
6256         * m4/close-stream.m4: New file.
6257
6258 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6259
6260         * lib/close-stream.c, lib/close-stream.h: New files.
6261
6262 2006-07-22  Bruno Haible  <bruno@clisp.org>
6263
6264         Merge from GNU gettext 0.15.
6265
6266         2006-05-01  Bruno Haible  <bruno@clisp.org>
6267
6268                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
6269
6270         2006-07-22  Bruno Haible  <bruno@clisp.org>
6271
6272                 * modules/javaversion: New file.
6273                 * MODULES.html.sh (Java): Add javaversion.
6274
6275         2006-03-12  Bruno Haible  <bruno@clisp.org>
6276
6277                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
6278
6279         2005-12-04  Bruno Haible  <bruno@clisp.org>
6280
6281                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
6282                 (untested).
6283
6284         2006-06-21  Bruno Haible  <bruno@clisp.org>
6285
6286                 Avoid warnings from recent versions of mcs.
6287                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
6288                 -o, -L, -r any more. Use options documented since mcs-1.0
6289                 instead. Similarly for -g.
6290
6291         2005-12-04  Bruno Haible  <bruno@clisp.org>
6292
6293                 * build-aux/csharpcomp.sh.in: Suffix for resources is
6294                 .resources, not .resource.
6295
6296         2005-07-09  Bruno Haible  <bruno@clisp.org>
6297
6298                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
6299                 add a .dll suffix.
6300                 Reported by Mark Junker <mjscod@gmx.de>.
6301
6302         2006-07-22  Bruno Haible  <bruno@clisp.org>
6303
6304                 * modules/gettext: Upgrade to gettext-0.15.
6305                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
6306                 m4/visibility.m4.
6307                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
6308
6309 2006-07-22  Bruno Haible  <bruno@clisp.org>
6310
6311         Merge from GNU gettext 0.15.
6312
6313         2006-03-25  Bruno Haible  <bruno@clisp.org>
6314
6315                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
6316
6317         2006-07-21  Bruno Haible  <bruno@clisp.org>
6318
6319                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6320                 "1.1".
6321
6322         2006-05-09  Bruno Haible  <bruno@clisp.org>
6323
6324                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6325                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6326                 for the conftestver execution.
6327
6328         2006-05-01  Bruno Haible  <bruno@clisp.org>
6329
6330                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6331                 optional target-version argument. Verify that the compiler
6332                 groks source of the specified source-version, or add -source
6333                 option as necessary. Verify that the compiler produces
6334                 bytecode in the specified target-version, or add -target and
6335                 -source options as necessary. Make the result of the test
6336                 available as variable CONF_JAVAC. Also log error output in
6337                 config.log.
6338
6339         2006-03-11  Bruno Haible  <bruno@clisp.org>
6340
6341                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6342
6343         2006-05-09  Bruno Haible  <bruno@clisp.org>
6344
6345                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6346                 CLASSPATH_SEPARATOR to a semicolon.
6347
6348         2006-03-12  Bruno Haible  <bruno@clisp.org>
6349
6350                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6351                 available as variable CONF_JAVA, for subsequent autoconf
6352                 tests. Also log error output in config.log.
6353
6354         2006-07-19  Bruno Haible  <bruno@clisp.org>
6355
6356                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6357                 that getline works on glibc2 systems. Needed to avoid trouble
6358                 in relocatable.c.
6359                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6360
6361         2005-12-04  Bruno Haible  <bruno@clisp.org>
6362
6363                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6364                 launcher (untested).
6365
6366         2005-12-04  Bruno Haible  <bruno@clisp.org>
6367
6368                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6369
6370         2006-07-22  Bruno Haible  <bruno@clisp.org>
6371
6372                 * gettext.m4: Update from GNU gettext-0.15.
6373                 * nls.m4: Likewise.
6374                 * po.m4: Likewise.
6375                 * inttypes-pri.m4: Likewise.
6376                 * inttypes-h.m4: Renamed from inttypes.m4.
6377                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6378
6379 2006-07-22  Bruno Haible  <bruno@clisp.org>
6380
6381         Merge from GNU gettext 0.15.
6382
6383         2005-07-05  Bruno Haible  <bruno@clisp.org>
6384
6385                 * printf-args.c (printf_fetchargs): Work around broken
6386                 definition of wint_t on mingw.
6387
6388         2005-02-12  Bruno Haible  <bruno@clisp.org>
6389
6390                 * xallocsa.h: Add extern "C" for C++.
6391
6392         2006-05-17  Bruno Haible  <bruno@clisp.org>
6393
6394                 Cygwin portability.
6395                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6396
6397         2006-04-30  Bruno Haible  <bruno@clisp.org>
6398
6399                 * progreloc.c: Include <mach-o/dyld.h> if available.
6400                 (find_executable): Use _NSGetExecutablePath when possible.
6401
6402         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6403
6404                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6405                 function.
6406
6407         2005-12-29  Bruno Haible  <bruno@clisp.org>
6408
6409                 * progreloc.c (set_program_name_and_installdir): Fix
6410                 compilation error.
6411
6412         2005-12-04  Bruno Haible  <bruno@clisp.org>
6413
6414                 Cygwin portability.
6415                 * progreloc.c: Include <windows.h> also on Cygwin.
6416                 (find_executable): Add support for Cygwin.
6417                 (set_program_name_and_installdir): Handle also platforms with
6418                 nonempty EXEEXT.
6419
6420         2006-07-11  Bruno Haible  <bruno@clisp.org>
6421
6422                 * javacomp.c: Fix a comment.
6423                 Reported by Jim Meyering.
6424
6425         2006-04-30  Bruno Haible  <bruno@clisp.org>
6426
6427                 * javacomp.h (compile_java_class): Add source_version,
6428                 target_version arguments.
6429                 * javacomp.c: Rewritten to choose only a compiler that
6430                 respects the specified source_version and target_version.
6431
6432         2006-06-27  Bruno Haible  <bruno@clisp.org>
6433
6434                 Assume correct S_ISDIR macro.
6435                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6436
6437         2006-07-22  Bruno Haible  <bruno@clisp.org>
6438
6439                 * javaversion.h: New file, from GNU gettext.
6440                 * javaversion.c: New file, from GNU gettext.
6441                 * javaversion.java: New file, from GNU gettext.
6442                 * javaversion.class: New file, from GNU gettext.
6443
6444         2006-05-17  Bruno Haible  <bruno@clisp.org>
6445
6446                 Cygwin portability.
6447                 * javaexec.c (execute_java_class): Test for jview program
6448                 also on Cygwin.
6449
6450         2006-04-09  Bruno Haible  <bruno@clisp.org>
6451
6452                 * fatal-signal.c: Don't include string.h.
6453                 (at_fatal_signal): Use a copying loop instead of memcpy.
6454
6455         2005-12-04  Bruno Haible  <bruno@clisp.org>
6456
6457                 * csharpexec.c: Add support for 'clix' launcher (untested).
6458                 (execute_csharp_using_sscli): New function.
6459                 (execute_csharp_program): Call it.
6460
6461         2006-06-21  Bruno Haible  <bruno@clisp.org>
6462
6463                 Avoid warnings from recent versions of mcs.
6464                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
6465                 -o, -L, -r any more. Use options documented since mcs-1.0
6466                 instead. Similarly for -g.
6467
6468         2005-07-09  Bruno Haible  <bruno@clisp.org>
6469
6470                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6471                 add a .dll suffix.
6472                 Reported by Mark Junker <mjscod@gmx.de>.
6473
6474         2006-06-17  Bruno Haible  <bruno@clisp.org>
6475
6476                 * config.charset: Update for NetBSD 3.0.
6477
6478         2006-05-17  Bruno Haible  <bruno@clisp.org>
6479
6480                 Cygwin portability.
6481                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6482
6483         2006-05-16  Bruno Haible  <bruno@clisp.org>
6484
6485                 * localcharset.c [CYGWIN]: Include <windows.h>.
6486                 (get_charset_aliases): For Cygwin, return the same CPxxx
6487                 aliases list as under WIN32.
6488                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
6489                 the environment variables. Fall back to GetACP().
6490
6491         2006-04-05  Bruno Haible  <bruno@clisp.org>
6492
6493                 * config.charset: Update Juan Manuel Guerrero's address.
6494
6495         2005-02-12  Bruno Haible  <bruno@clisp.org>
6496
6497                 * allocsa.h: Add extern "C" for C++.
6498
6499         2005-02-10  Bruno Haible  <bruno@clisp.org>
6500
6501                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
6502                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
6503
6504         2006-07-22  Bruno Haible  <bruno@clisp.org>
6505
6506                 * gettext.h: Update to GNU gettext-0.15.
6507
6508 2006-07-22  Bruno Haible  <bruno@clisp.org>
6509
6510         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
6511         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
6512         lib-prefix.m4, longdouble.m4, ssize_t.m4.
6513
6514 2006-07-21  Eric Blake  <ebb9@byu.net>
6515
6516         * modules/stdlib-safer: New file.
6517         * MODULES.html.sh (File stream based Input/Output): Add
6518         stdlib-safer.
6519
6520 2006-07-21  Eric Blake  <ebb9@byu.net>
6521
6522         * lib/stdlib-safer.h: New file from coreutils, required by
6523         stdlib--.h.
6524
6525 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6526
6527         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
6528
6529 2006-07-20  Bruno Haible  <bruno@clisp.org>
6530
6531         * gnulib-tool: Recognize new option --assume-autoconf.
6532         (autoconf_minversion): New variable.
6533         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6534
6535 2006-07-20  Bruno Haible  <bruno@clisp.org>
6536
6537         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6538
6539 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6540
6541         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6542         Reindent and repaginate.
6543
6544 2006-07-19  Derek Price  <derek@ximbiot.com>
6545
6546         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6547         Correct grammar.
6548
6549 2006-07-17  Bruno Haible  <bruno@clisp.org>
6550
6551         * modules/list: New file.
6552         * modules/array-list: New file.
6553         * modules/carray-list, modules/carray-list-tests: New files.
6554         * modules/linked-list, modules/linked-list-tests: New files.
6555         * modules/avltree-list, modules/avltree-list-tests: New files.
6556         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6557         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6558         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6559         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6560         * modules/oset: New file.
6561         * modules/array-oset: New file.
6562         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6563         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6564         * tests/test-carray_list.c: New file.
6565         * tests/test-linked_list.c: New file.
6566         * tests/test-avltree_list.c: New file.
6567         * tests/test-rbtree_list.c: New file.
6568         * tests/test-linkedhash_list.c: New file.
6569         * tests/test-avltreehash_list.c: New file.
6570         * tests/test-rbtreehash_list.c: New file.
6571         * tests/test-avltree_oset.c: New file.
6572         * tests/test-rbtree_oset.c: New file.
6573         * MODULES.html.sh (Container data structures): New section.
6574
6575 2006-07-17  Bruno Haible  <bruno@clisp.org>
6576
6577         * m4/gl_list.m4: New file.
6578
6579 2006-07-17  Bruno Haible  <bruno@clisp.org>
6580
6581         * lib/gl_list.h: New file.
6582         * lib/gl_list.c: New file.
6583         * lib/gl_array_list.h: New file.
6584         * lib/gl_array_list.c: New file.
6585         * lib/gl_carray_list.h: New file.
6586         * lib/gl_carray_list.c: New file.
6587         * lib/gl_linked_list.h: New file.
6588         * lib/gl_linked_list.c: New file.
6589         * lib/gl_anylinked_list1.h: New file.
6590         * lib/gl_anylinked_list2.h: New file.
6591         * lib/gl_avltree_list.h: New file.
6592         * lib/gl_avltree_list.c: New file.
6593         * lib/gl_anyavltree_list1.h: New file.
6594         * lib/gl_anyavltree_list2.h: New file.
6595         * lib/gl_rbtree_list.h: New file.
6596         * lib/gl_rbtree_list.c: New file.
6597         * lib/gl_anyrbtree_list1.h: New file.
6598         * lib/gl_anyrbtree_list2.h: New file.
6599         * lib/gl_anytree_list1.h: New file.
6600         * lib/gl_anytree_list2.h: New file.
6601         * lib/gl_linkedhash_list.h: New file.
6602         * lib/gl_linkedhash_list.c: New file.
6603         * lib/gl_anyhash_list1.h: New file.
6604         * lib/gl_anyhash_list2.h: New file.
6605         * lib/gl_avltreehash_list.h: New file.
6606         * lib/gl_avltreehash_list.c: New file.
6607         * lib/gl_rbtreehash_list.h: New file.
6608         * lib/gl_rbtreehash_list.c: New file.
6609         * lib/gl_anytreehash_list1.h: New file.
6610         * lib/gl_anytreehash_list2.h: New file.
6611
6612         * lib/gl_oset.h: New file.
6613         * lib/gl_oset.c: New file.
6614         * lib/gl_array_oset.h: New file.
6615         * lib/gl_array_oset.c: New file.
6616         * lib/gl_avltree_oset.h: New file.
6617         * lib/gl_avltree_oset.c: New file.
6618         * lib/gl_rbtree_oset.h: New file.
6619         * lib/gl_rbtree_oset.c: New file.
6620         * lib/gl_anytree_oset.h: New file.
6621
6622 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6623
6624         * m4/mkancesdirs.m4: New file.
6625         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6626         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6627         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6628         it.
6629
6630 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6631
6632         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6633         * lib/mkancesdirs.h: New files.
6634         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6635         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6636         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6637         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6638         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6639         callers changed.  Revamp internals significantly, by not
6640         attempting to create directories that are temporarily more
6641         permissive than the final results.  Do not attempt to use
6642         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6643         This removes some race conditions, fixes some bugs, and simplifies
6644         things.  Use new dirchownmod function to do owner and mode changes.
6645         * lib/mkdir-p.h: Likewise.
6646         * lib/modechange.c (octal_to_mode): New function.
6647         (struct mode_change): New member mentioned.
6648         (make_node_op_equals): New arg mentioned.  All callers changed.
6649         (mode_compile): Keep track of which mode bits the user has explicitly
6650         mentioned.
6651         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6652         New arg PMODE_BITS, to keep track of which mode bits the user
6653         mentioned; it treats S_ISUID and S_ISGID speciall.
6654         All callers changed.
6655         * lib/modechange.h: Likewise.
6656
6657 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6658
6659         * MODULES.html.sh: Add mkancestors.
6660         * modules/mkancesdirs: New module.
6661         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6662         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6663         The chdir-safer and afs files are now orphans; I'll remove them
6664         unless someone speaks up.
6665         Add lib/dirchownmod.c, lib/dirchownmod.h.
6666         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6667         Add lchown, mkancesdirs.
6668         (Maintainer): Add self.
6669
6670 2006-07-15  Karl Berry  <karl@gnu.org>
6671
6672         * gnulib-tool: help message wording/arrangement.
6673
6674 2006-07-14  Simon Josefsson  <jas@extundo.com>
6675
6676         * doc/gnulib.texi (Libtool and Windows): New section.
6677
6678 2006-07-12  Simon Josefsson  <jas@extundo.com>
6679
6680         * modules/gendocs (License): Fix license, approved by Karl.
6681
6682 2006-07-12  Eric Blake  <ebb9@byu.net>
6683
6684         * MODULES.html.sh: Add gendocs.
6685
6686 2006-07-11  Eric Blake  <ebb9@byu.net>
6687
6688         * modules/fdl: New module, to install doc/fdl.texi.
6689         * MODULES.html.sh: Add new section for documentation modules.
6690         * gnulib-tool: Avoid space-tab.
6691         (--doc-base): New option, to manage files from doc.
6692
6693 2006-07-11  Eric Blake  <ebb9@byu.net>
6694
6695         * m4/absolute-header.m4: Fix comments to match recent change.
6696
6697 2006-07-11  Eric Blake  <ebb9@byu.net>
6698
6699         * gnulib-tool: List --doc-base before --tests-base.
6700
6701 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6702
6703         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6704
6705 2006-07-11  Bruno Haible  <bruno@clisp.org>
6706
6707         * README: Mention where to put documentation.
6708
6709 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6710
6711         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6712
6713 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6714
6715         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6716         to stdint.m4.
6717
6718 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6719
6720         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6721         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6722         "no/such/file/stdint.h" when there is no such file, so that
6723         the resulting C code can be parsed by dodgy compilers.
6724         Problems reported by Bob Proulx.
6725
6726 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6727
6728         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6729         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6730         macros into the GNU _D_EXACT_NAMLEN.
6731         * lib/savedir.c:  Likewise.
6732         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6733
6734 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6735         and Paul Eggert  <eggert@cs.ucla.edu>
6736
6737         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6738         * m4/savedir.m4:
6739         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6740         macros into the GNU _D_EXACT_NAMLEN.
6741
6742 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6743
6744         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6745         around the absolute name, to work around a problem with the HP-UX
6746         11.23 native C compiler, reported by Bob Proulx.
6747
6748 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6749
6750         * doc/maintain.texi, make-stds.texi: Sync from
6751         <http://savannah.gnu.org/projects/gnustandards>.
6752
6753 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6754
6755         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6756
6757 2006-07-09  Jim Meyering  <jim@meyering.net>
6758
6759         * m4/glob.m4: Remove a doubled word in a comment.
6760
6761 2006-07-09  Jim Meyering  <jim@meyering.net>
6762
6763         * lib/argp-pv.c: Remove a doubled word in a comment.
6764         * lib/check-version.c (check_version): Likewise.
6765         * lib/javacomp.c (compile_java_class): Likewise.
6766
6767 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6768
6769         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6770         for the benefit of people using Autoconf 2.60.  If you want to
6771         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6772         (or m4/onceonly.m4, if pre-2.57) manually.
6773
6774 2006-07-08  Jim Meyering  <jim@meyering.net>
6775
6776         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6777         comment.
6778         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6779         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6780         comment.
6781
6782 2006-07-08  Jim Meyering  <jim@meyering.net>
6783
6784         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6785
6786 2006-07-07  Simon Josefsson  <jas@extundo.com>
6787
6788         * tests/test-crc.c: Change expected crc value, the test vector
6789         were probably computed using the old broken crc.c?
6790
6791 2006-07-06  Simon Josefsson  <jas@extundo.com>
6792
6793         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6794         now the canonical place for the M4 file).
6795
6796         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
6797         from the sys_socket dependency now.
6798
6799         * modules/inet_pton (Files): Ditto.
6800
6801         * modules/inet_ntop (Files): Ditto.
6802
6803 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6804
6805         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
6806         not gl_PREREQ_GETUSERSHELL.
6807
6808 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6809
6810         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
6811         with only one argument, for Autoconf 2.60.
6812         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
6813         expand to nothing, so add a shell command to avoid syntax error.
6814         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6815
6816 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6817
6818         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
6819
6820 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6821
6822         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
6823         no longer needed.  Check for isblank decl.
6824         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
6825         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
6826         of existence.
6827
6828 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6829
6830         * lib/getloadavg.c: Use __VMS, not VMS.
6831         * lib/getopt.c: Likewise.
6832         * lib/getpagesize.h: Likewise.
6833         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
6834         and probably does not work.
6835
6836 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6837
6838         * lib/.cppi-disable: Add wcwidth.
6839         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
6840         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
6841         (ISGRAPH): Remove.  All uses changed to isgraph.
6842         (FOLD) [!defined _LIBC]: Remove special case.
6843         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
6844         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
6845         HAVE_ISBLANK.
6846         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
6847         case.
6848
6849 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6850
6851         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
6852         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
6853         brackets.  Other minor changes to suppress some compiler
6854         warnings.
6855
6856 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6857         and Paul Eggert  <eggert@cs.ucla.edu>
6858
6859         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
6860         of invoking obsolescent AC_HEADER_DIRENT macro.
6861         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
6862         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
6863         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
6864         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
6865         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
6866         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6867         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
6868         * m4/readdir.m4: Remove; no longer needed.
6869
6870 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6871         and Paul Eggert  <eggert@cs.ucla.edu>
6872
6873         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
6874         Don't worry about this obsolete case any more.
6875         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
6876         directories.
6877         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
6878         worry about this obsolete case any more.
6879         * lib/fts.c: Likewise.
6880         * lib/getcwd.c: Likewise.
6881         * lib/glob.h: Likewise.
6882         * lib/savedir.c: Likewise.
6883
6884 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6885
6886         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
6887         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
6888         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
6889         needed.
6890         All uses removed.
6891         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6892         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6893         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
6894         needed.
6895         * m4/getdate.m4 (gl_GETDATE): Likewise.
6896         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6897         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6898         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6899         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6900         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6901         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6902         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
6903         needed.
6904
6905 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6906
6907         * lib/memcasecmp.c: Include <limits.h>.
6908         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
6909         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
6910         Don't assume isdigit succeeds only on '0' through '9'.
6911
6912 2006-07-05  Eric Blake  <ebb9@byu.net>
6913
6914         * modules/getaddrinfo (Depends-on): Add snprintf.
6915
6916 2006-07-05  Eric Blake  <ebb9@byu.net>
6917
6918         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
6919         to avoid 'header present but could not be compiled' on cygwin.
6920
6921 2006-07-05  Eric Blake  <ebb9@byu.net>
6922
6923         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
6924         missing from netdb.h.
6925         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
6926
6927 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6928
6929         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
6930         no longer needed.
6931         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
6932         * m4/getdate.m4 (gl_GETDATE): Likewise.
6933         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6934         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6935         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6936         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6937         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6938
6939 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6940
6941         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
6942         All uses of is_space replaced by isspace.
6943         * lib/exit.h: Don't talk about STDC_HEADERS.
6944         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
6945         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
6946         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
6947         replaced by isprint etc.
6948         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
6949         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6950         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
6951         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
6952         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
6953         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6954
6955 2006-07-05  Bruno Haible  <bruno@clisp.org>
6956
6957         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
6958         the function exists, before testing against AIX.
6959         Reported by Martin Lambers <marlam@marlam.de>.
6960
6961 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6962
6963         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
6964         From Mark D. Baushke.
6965
6966 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6967
6968         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
6969         to the absolute name, not just one, to bypass Sun C 5.8's
6970         "warning: #include of /usr/include/... may be non-portable".
6971
6972 2006-07-04  Eric Blake  <ebb9@byu.net>
6973
6974         * modules/dirname-tests: New test module.
6975         * tests/test-dirname.c: New file, replacing dirname.c
6976         TEST_DIRNAME section that was recently deleted.
6977
6978 2006-07-04  Bruno Haible  <bruno@clisp.org>
6979
6980         Assume ANSI C header files and <ctype.h> functions.
6981         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
6982         (mbsnwidth): Use isprint, iscntrl instead.
6983
6984 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6985
6986         Merge from coreutils.
6987         * MODULES.html.sh: Add xstrtold.
6988         * modules/xstrtold: New file.
6989         * modules/cycle-check (Files): Add lib/same-inode.h.
6990         * modules/dirname (Files): Add m4/double-slash-root.m4.
6991         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
6992         * modules/mkdir-p (Files): Add lib/same-inode.h.
6993         * modules/same (Files): Add lib/same-inode.h.
6994
6995 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6996
6997         * m4/absolute-header.m4: Renamed from full-header-path.m4.
6998         This is to keep the terminology clean; POSIX talks about
6999         "absolute pathnames", not "full pathnames", but the GNU
7000         Coding Standards say to use "path" for something else;
7001         so use "absolute" to keep both sides happy.
7002         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
7003         Set gl_absolute_header, not gl_full_header_path.
7004         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
7005         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
7006         All uses changed.
7007
7008         Merge from coreutils.
7009
7010         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7011
7012         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
7013         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
7014         want to require the building of c-strtod.o.
7015         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
7016         needs -lm directly.
7017         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
7018
7019         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7020
7021         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
7022         --as-needed option if available.  Problem reported by Albert Chin in
7023         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
7024         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
7025         cc merely issues a bunch of annoying warnings for --as-needed
7026         (this problem was reported by Bob Proulx).  Also, try linking with
7027         -lm to detect a bug in binutils 2.16 (this problem was reported
7028         by Ralf Wildenhues).
7029
7030         2006-06-18  Jim Meyering  <jim@meyering.net>
7031
7032         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
7033         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
7034         macro.
7035         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
7036         also check for glibc-2.4's abort-inducing bug.
7037
7038         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
7039         Low-probability clean-up should be to use rmdir to get rid of
7040         the just-created directory, not unlink.
7041
7042         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
7043         configure fail, and request a bug report to inform us about it.
7044         Add a comment that, barring reports to the contrary, in 2007 we'll
7045         assume ftruncate is universally available.
7046
7047         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7048
7049         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7050
7051         2006-03-12  Jim Meyering  <jim@meyering.net>
7052
7053         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7054         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7055         * m4/same.m4 (gl_SAME): Likewise.
7056         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7057
7058         2006-03-11  Eric Blake  <ebb9@byu.net>
7059
7060         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7061         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7062         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7063         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7064
7065 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7066
7067         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7068         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7069         reported by Mark D. Baushke, one in
7070         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7071
7072         Merge from coreutils.
7073
7074         * lib/.cppi-disable: Add stdint_.h.
7075         * lib/.cvsignore: Add stdint.h.
7076
7077         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7078
7079         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7080         both double and long double versions.
7081         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7082         * lib/xstrtold.c: New file.
7083         * lib/xstrtod.h (xstrtold): New decl.
7084
7085         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7086
7087         * lib/filemode.c (setst): Remove.
7088         (strmode): Rewrite to avoid setst.  This makes the code shorter,
7089         (arguably) clearer, and the generated code is a bit smaller on my
7090         Debian GNU/Linux stable x86 host.
7091
7092         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7093
7094         * lib/filemode.c: Include "filemode.h" first, to test the interface.
7095         Assume that filemode.h includes sys/types.h and sys/stat.h.
7096         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
7097         (ftypelet): Reorder to put common cases first, for efficiency.
7098         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
7099         to do 'M'.
7100         (strmode): Renamed from mode_string, and now stores 12 bytes instead
7101         of 10, for compatibility with FreeBSD.  All callers changed.
7102         (filemodestring): Now stores 12 bytes instead of 10, and sets file
7103         types that can't be deduced solely from st_mode.  First arg is now a
7104         const pointer.
7105         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
7106         (strmode): Renamed from mode_string.
7107         (filemodestring): New decl.
7108         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
7109         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
7110         needed.
7111         (S_ISPORT, S_ISWHT): New macros, if not already defined.
7112
7113         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7114
7115         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
7116         fsusage.h now does that.  Include fsusage.h first, to test interface.
7117         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
7118         at most one method (the old code could have generated decls that
7119         didn't conform to C89, not that this was ever exercised).
7120         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
7121
7122         2006-03-19  Jim Meyering  <jim@meyering.net>
7123
7124         Work even in a chroot where d_ino values for entries in "/"
7125         don't match the stat.st_ino values for the same names.
7126         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
7127         number, iterate through all entries again, using lstat instead.
7128         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
7129         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
7130
7131         * lib/getcwd.c (__getcwd): Clarify a comment.
7132         Use memcpy in place of a call to strcpy.
7133
7134         2006-03-12  Jim Meyering  <jim@meyering.net>
7135
7136         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
7137         matches that of the current directory (which we're about to chdir ".."
7138         out of), then save the dev-ino of the parent, instead.
7139
7140         * lib/same-inode.h (SAME_INODE): New file/macro.
7141         * lib/chdir-safer.c (SAME_INODE): Remove definition.
7142         Include "same-inode.h", instead.
7143         * lib/same.c: Likewise.
7144         * lib/cycle-check.h: Include "same-inode.h".
7145         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
7146         * lib/cycle-check.c (SAME_INODE): Remove definition.
7147         * lib/root-dev-ino.h: Include "same-inode.h".
7148
7149         2006-03-11  Eric Blake  <ebb9@byu.net>
7150
7151         * lib/same.c (same_name): s/base_name/last_component/
7152         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
7153         * lib/filenamecat.c (file_name_concat): Likewise.
7154
7155         2006-03-11  Eric Blake  <ebb9@byu.net>,
7156                     Paul Eggert  <eggert@cs.ucla.edu>
7157
7158         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
7159         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
7160         drive prefix.
7161         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
7162         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
7163         (last_component): New method.
7164         * lib/dirname.c (dir_len): Determine when drive letters need a
7165         subsequent slash.  Preserve // when it is special.
7166         (dir_name): Don't append dot when drive letter is absolute.
7167         [TEST_DIRNAME]: Move into a full-blown gnulib test.
7168         * lib/basename.c (base_name): New semantics - malloc the result.
7169         Preserve // when it is special.  Preserve relative files that look
7170         like drive letters.
7171         (base_len): Preserve // when it is special.
7172         (last_component): New method, similar to old base_name semantics.
7173         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
7174         base_name.  Strip redundant slashes from ///.
7175
7176 2006-07-03  Jim Meyering  <jim@meyering.net>
7177
7178         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
7179         macro is used before the first cycle_check call.
7180
7181 2006-07-03  Eric Blake  <ebb9@byu.net>
7182
7183         * modules/dirname (Depends-on): Add xstrndup.
7184
7185 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7186
7187         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
7188         test cases, so that config.log is a bit easier to follow.
7189
7190 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7191
7192         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
7193         both are 64 bits, since this seems to be the tradition, and this
7194         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
7195         we ever run into a host that prefers long long to long in this
7196         case, we'll need another configure-time test.  Problem reported by
7197         Jim Meyering.
7198
7199 2006-07-02  Eric Blake  <ebb9@byu.net>
7200
7201         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
7202
7203 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7204
7205         * modules/inttypes (Depends-on): No longer depends on stdint.
7206         * modules/stdint (Description): Say more about assumptions.
7207         Say that the fast types might differ.  Say macros are used.
7208         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
7209         (Makefile.am): Revise list of substituted symbols to match
7210         new stdint.m4.
7211         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
7212         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
7213         * tests/test-stdint.c (verify_same_types)
7214         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
7215         the code conforms to C99/C89.
7216         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
7217         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
7218
7219 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7220
7221         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
7222         but fix a bug, by requiring at least 64 bits.
7223         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
7224         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
7225         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
7226         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
7227
7228         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
7229         changes.  Make 2.59 a prerequisite.  Check and substitute for
7230         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
7231         inttypes.h.  Do not use special include files; just use the
7232         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
7233         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
7234         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
7235         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
7236         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
7237         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
7238         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
7239         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
7240         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
7241         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
7242         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
7243         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
7244         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
7245         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
7246         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
7247         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
7248         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
7249         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
7250         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
7251         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
7252         WINT_MAX.  Check for C99 conformance more strictly, by detecting
7253         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
7254         not check for things that C99 does not require, e.g., int8_t.  If
7255         a test isn't needed unless <stdint.h> isn't working, and is
7256         unlikely to be needed for any other reason, then don't do it
7257         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
7258         size_t, since we assume C89 freestanding at least.  Do not check
7259         for sig_atomic_t, wchar_t, or wint_t, since the code now does
7260         the right thing even if the types are not defined.  Instead use:
7261         (gl_STDINT_TYPE_PROPERTIES): New macro.
7262         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
7263         testing whether <sys/types.h> clashes, as Autoconf does this for
7264         us now.  All uses removed.
7265         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
7266         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
7267         (gl_CHECK_TYPE_SAME):
7268         Remove; no longer needed.
7269         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
7270         exists, since we'll return 0 anyway in that case.
7271         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
7272
7273 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7274
7275         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
7276         possible collision with system files.
7277         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
7278         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
7279         WCHAR_MIN and WCHAR_MAX in this case.
7280         (<stddef.h>): Do not include; no longer needed.
7281         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
7282         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
7283         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
7284         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
7285         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
7286         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
7287         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
7288         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
7289         !defined(__c99))]: Include in this case too, since it's harmless
7290         now.
7291         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
7292         dangerous to do so.
7293         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
7294         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
7295         (_STDINT_MIN, _STDINT_MAX): New macros.
7296         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
7297         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
7298         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
7299         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
7300         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
7301         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
7302         macros, not typedefs; this simplifies things quite a bit.
7303         Use long int for all types narrower than int64_t.
7304         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
7305         Define in terms of long long int or int64_t or long int,
7306         not int64_t or int32_t.  This saves some compile-time testing.
7307         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
7308         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
7309         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
7310         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
7311         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
7312         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
7313         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
7314         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
7315         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
7316         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
7317         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7318         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7319         undef any previous version and define our own version, for
7320         simplicity and consistency with the new macros for types.
7321         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7322         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7323         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7324         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7325         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7326         @WINT_T_SUFFIX@ to keep things simple here.
7327         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7328         Simplify by assuming typical 8/16/32/64 host, since we're
7329         already doing that elsewhere anyway.
7330         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7331         and assume long long int is 64 bits if available.  This
7332         speeds up 'configure'.
7333
7334 2006-07-01  Eric Blake  <ebb9@byu.net>
7335
7336         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7337         Reported by Andreas Buening.
7338
7339 2006-07-01  Eric Blake  <ebb9@byu.net>
7340
7341         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7342
7343 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7344
7345         * lib/getaddrinfo.c: fixed typo
7346
7347 2006-06-29  Jim Meyering  <jim@meyering.net>
7348
7349         * modules/strftime (Maintainer): Add my name, since with the
7350         FPRINTFTIME changes strftime.c has forked from glibc.
7351
7352 2006-06-29  Eric Blake  <ebb9@byu.net>
7353
7354         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7355
7356 2006-06-29  Eric Blake  <ebb9@byu.net>
7357
7358         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7359
7360 2006-06-29  Eric Blake  <ebb9@byu.net>
7361
7362         * lib/stat_.h: New file.
7363
7364 2006-06-29  Eric Blake  <ebb9@byu.net>
7365
7366         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7367         unused static function.
7368
7369 2006-06-29  Eric Blake  <ebb9@byu.net>
7370
7371         * doc/functions.texi (Function Portability): Document missing lstat
7372         on mingw.
7373
7374 2006-06-29  Eric Blake  <ebb9@byu.net>
7375
7376         * MODULES.html.sh: Add sys_stat.
7377         * modules/sys_stat: New module.
7378         * modules/mkstemp (Depends-on): Add sys_stat.
7379
7380 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7381
7382         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7383
7384 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7385
7386         * m4/c-bs-a.m4: Removed.
7387
7388 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7389
7390         * lib/strftime.c: Assume strftime() exists.
7391
7392 2006-06-29  Derek Price  <derek@ximbiot.com>
7393
7394         * modules/c-bs-a: Removed - \a is C89.
7395         * MODULES.html.sh: Remove c-bs-a.
7396
7397 2006-06-29  Bruno Haible  <bruno@clisp.org>
7398
7399         * modules/wcwidth (License): Change to LGPL.
7400
7401 2006-06-28  Simon Josefsson  <jas@extundo.com>
7402
7403         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7404         on _WIN32.
7405
7406         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7407         getnameinfo.
7408
7409 2006-06-28  Simon Josefsson  <jas@extundo.com>
7410
7411         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7412
7413 2006-06-28  Simon Josefsson  <jas@extundo.com>
7414
7415         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7416         functions there.  It will succeed on Windows XP, but on Windows
7417         2000 and (presumably) earlier, it will fail, and use the internal
7418         re-implementation.
7419         (use_win32_p): New function.
7420         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7421         Support AI_NUMERICSERV to disable getservbyname.
7422         (getnameinfo): New function, only supports
7423         NI_NUMERICHOST|NI_NUMERICSERV for now.
7424
7425         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7426         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7427         getnameinfo.
7428
7429 2006-06-28  Eric Blake  <ebb9@byu.net>
7430
7431         * modules/wcwidth: New file.
7432         * modules/mbchar (Depends-on): Add wcwidth.
7433         * modules/mbswidth (Depends-on): Add wcwidth.
7434         * MODULES.html.sh: Add wcwidth.
7435
7436 2006-06-28  Eric Blake  <ebb9@byu.net>
7437
7438         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7439         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7440
7441 2006-06-28  Eric Blake  <ebb9@byu.net>
7442
7443         * lib/xvasprintf.h: Fix comments.
7444
7445 2006-06-28  Eric Blake  <ebb9@byu.net>
7446
7447         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7448         * lib/mbswidth.c (wcwidth): Move from here...
7449         * lib/wcwidth.h: ...to this new file.
7450
7451 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7452
7453         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7454
7455         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7456         it's obsolete.
7457         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7458
7459 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7460
7461         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
7462         Autoconf 2.60 says this stuff was obsolete.
7463
7464 2006-06-28  Bruno Haible  <bruno@clisp.org>
7465
7466         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7467
7468 2006-06-28  Bruno Haible  <bruno@clisp.org>
7469
7470         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7471         gt_TYPE_WCHAR_T.
7472
7473 2006-06-28  Bruno Haible  <bruno@clisp.org>
7474
7475         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7476         declaration for wcwidth.
7477         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7478
7479 2006-06-28  Bruno Haible  <bruno@clisp.org>
7480
7481         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7482         (mkdir): Define using _mkdir.
7483
7484 2006-06-28  Bruno Haible  <bruno@clisp.org>
7485
7486         * lib/getaddrinfo.h: Fix POSIX URL.
7487         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
7488         _WIN32.
7489         (use_win32_p): Make static.
7490         (getaddrinfo): Reject service name if it is empty or does not consist
7491         solely of decimal digits, or if its value is > 65535.
7492         (getnameinfo): Remove useless casts.
7493
7494 2006-06-27  Simon Josefsson  <jas@extundo.com>
7495
7496         * modules/sys_select: New file, suggested by Bruno Haible, Paul
7497         Eggert and Martin Lambers.
7498
7499 2006-06-27  Simon Josefsson  <jas@extundo.com>
7500
7501         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
7502         Eggert and Martin Lambers.
7503
7504 2006-06-27  Bruno Haible  <bruno@clisp.org>
7505
7506         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
7507         result to 0, not to empty.
7508         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
7509
7510 2006-06-27  Bruno Haible  <bruno@clisp.org>
7511
7512         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
7513
7514 2006-06-26  Simon Josefsson  <jas@extundo.com>
7515
7516         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
7517         present.
7518
7519 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
7520
7521         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
7522         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
7523         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
7524
7525 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
7526
7527         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
7528
7529 2006-06-26  Bruno Haible  <bruno@clisp.org>
7530
7531         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7532
7533 2006-06-26  Bruno Haible  <bruno@clisp.org>
7534
7535         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7536
7537 2006-06-26  Bruno Haible  <bruno@clisp.org>
7538
7539         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7540         SGI C compiler in pre-C99 mode.
7541         Suggested by Mark D. Baushke and Larry Jones.
7542
7543 2006-06-26  Bruno Haible  <bruno@clisp.org>
7544
7545         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7546         WCHAR_MAX.
7547         Reported by Mark D. Baushke and Larry Jones.
7548
7549 2006-06-26  Bruno Haible  <bruno@clisp.org>
7550
7551         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7552         in pre-C99 mode.
7553         Suggested by Mark D. Baushke and Larry Jones.
7554
7555 2006-06-23  Simon Josefsson  <jas@extundo.com>
7556             Bruno Haible  <bruno@clisp.org>
7557
7558         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7559         Emit mostlyclean-local rule.
7560         (func_emit_tests_Makefile_am): Likewise.
7561         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7562
7563 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7564
7565         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7566
7567 2006-06-23  Bruno Haible  <bruno@clisp.org>
7568
7569         * tests/test-stdint.c: Update to match ISO C 99 Technical
7570         Corrigendum 1.
7571
7572 2006-06-23  Bruno Haible  <bruno@clisp.org>
7573
7574         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7575
7576 2006-06-23  Bruno Haible  <bruno@clisp.org>
7577
7578         * lib/stdint_.h: Treat IRIX like OpenBSD.
7579
7580 2006-06-23  Bruno Haible  <bruno@clisp.org>
7581
7582         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7583         ISO C 99 Technical Corrigendum 1.
7584
7585 2006-06-22  Simon Josefsson  <jas@extundo.com>
7586
7587         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7588         MinGW.
7589
7590 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7591
7592         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7593         needed.  Some compiler complained about some of them.  Problem reported
7594         by Larry Jones in
7595         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7596
7597 2006-06-21  Simon Josefsson  <jas@extundo.com>
7598
7599         * tests/test-getaddrinfo.c: New file.
7600
7601         * modules/getaddrinfo-tests: New file.
7602
7603         * MODULES.html.sh: Add inet_pton.
7604
7605         * modules/inet_pton: New file.
7606
7607 2006-06-21  Simon Josefsson  <jas@extundo.com>
7608
7609         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7610         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7611         of using the (limited) gnulib implementation on Windows XP.
7612
7613         * m4/inet_pton.m4: New file.
7614
7615 2006-06-21  Simon Josefsson  <jas@extundo.com>
7616
7617         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7618         variable.
7619
7620         * lib/socket_.h: Don't define WINVER.
7621
7622         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7623         slightly modified to work in gnulib.
7624
7625 2006-06-21  Simon Josefsson  <jas@extundo.com>
7626
7627         * doc/gnulib.texi (Windows sockets): Add.
7628
7629 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7630
7631         * lib/read-file.c (fread_file): Start with buffer allocation of
7632         0 bytes rather than 1 byte; this simplifies the code.
7633         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7634         code to free buffer and save/restore errno.
7635         (internal_read_file): Remove unused local.
7636
7637 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7638
7639         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7640         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7641         Problem reported by Denis Excoffier in
7642         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7643
7644 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7645
7646         * modules/sys_socket, modules/socklen: Include sys/types since
7647         FreeBSD 4.x's sys/socket.h needs it.
7648
7649 2006-06-19  Simon Josefsson  <jas@extundo.com>
7650
7651         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7652
7653 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7654
7655         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7656
7657 2006-06-19  Bruno Haible  <bruno@clisp.org>
7658
7659         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7660         and FULL_PATH_INTTYPES_H in angle brackets.
7661         Reported by Mark D. Baushke <mdb@gnu.org>.
7662
7663 2006-06-17  Eric Blake  <ebb9@byu.net>
7664
7665         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7666         errno.
7667
7668 2006-06-17  Bruno Haible  <bruno@clisp.org>
7669
7670         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7671         <sys/inttypes.h>.
7672
7673 2006-06-17  Bruno Haible  <bruno@clisp.org>
7674
7675         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7676         whether errno is declared. Assume <errno.h> declares errno.
7677
7678 2006-06-17  Bruno Haible  <bruno@clisp.org>
7679
7680         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7681
7682 2006-06-17  Bruno Haible  <bruno@clisp.org>
7683
7684         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7685         problem on Solaris 2.5.1.
7686
7687 2006-06-16  Eric Blake  <ebb9@byu.net>
7688
7689         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7690         * lib/unicodeio.c [!defined errno]: Likewise.
7691         * lib/strtol.c [!defined errno]: Likewise.
7692         * lib/strtod.c [!defined errno]: Likewise.
7693
7694 2006-06-15  Eric Blake  <ebb9@byu.net>
7695
7696         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7697
7698 2006-06-15  Eric Blake  <ebb9@byu.net>
7699
7700         * config/srclist.txt (ssize_t.m4): Lose sync.
7701
7702 2006-06-15  Bruno Haible  <bruno@clisp.org>
7703
7704         * modules/stdint (Files): Include m4/full-header-path.m4,
7705         m4/size_max.m4, m4/wchar_t.m4.
7706         (Makefile.am): Many more substitutions.
7707         * modules/stdint-tests: New file.
7708         * tests/test-stdint.c: New file.
7709
7710 2006-06-15  Bruno Haible  <bruno@clisp.org>
7711
7712         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7713         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7714         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7715         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7716         gl_CHECK_TYPE_SAME): New macros.
7717
7718 2006-06-15  Bruno Haible  <bruno@clisp.org>
7719
7720         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7721
7722 2006-06-15  Bruno Haible  <bruno@clisp.org>
7723
7724         * lib/stdint_.h: Rewritten to be fully auto-configured.
7725         Fixes bug on HP-UX/IA64.
7726
7727 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7728
7729         * lib/getdate.y (__attribute__): Don't define if already defined.
7730         Problem reported by Larry Jones.
7731         * lib/utimens.c (__attribute__): Likewise.
7732
7733 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7734
7735         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7736         reported by Andreas Schwab.
7737
7738 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7739             Bruno Haible  <bruno@clisp.org>
7740
7741         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7742         check for the declaration of strnlen and a run test that exposes the
7743         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7744         rpl_strndup.
7745
7746 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7747             Bruno Haible  <bruno@clisp.org>
7748
7749         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7750
7751 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7752
7753         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7754         compile test, for Tru64 4.0D.
7755
7756 2006-05-28  Karl Berry  <karl@gnu.org>
7757
7758         * config/srclist.txt (printf-args.c): lose sync.
7759
7760 2006-05-26  Martin Lambers  <marlam@marlam.de>
7761
7762         * lib/getpass.c: Updates the test for the native W32 API, and adds
7763         missing includes, thus fixing compilation warnings.
7764
7765 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7766
7767         * lib/exclude.c (exclude_fnmatch): New function.
7768         (excluded_file_name): Call exclude_fnmatch.
7769         * lib/exclude.h (excluded_file_name): New prototype
7770
7771 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7772
7773         * lib/tempname.c (small_open, large_open): New macros.
7774         (__open, __open64) [!_LIBC]: Remove.
7775         (__gen_tempname): Use small_open and large_open instead of __open
7776         and __open64.  This fixes a portability bug on HP-UX 11.11i
7777         reported by Simon Wing-Tang in
7778         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7779
7780 2006-05-24  Bruno Haible  <bruno@clisp.org>
7781
7782         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7783         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7784         Reported by Thorsten Maerz <torte@netztorte.de> via
7785         Aaron Stone <aaron@serendipity.cx>.
7786
7787 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7788
7789         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7790         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7791         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7792         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7793         not really conditional on the cache.
7794         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7795
7796 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7797
7798         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
7799         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
7800         (my_usleep): Don't mishandle maximum value.
7801
7802 2006-05-19  Jim Meyering  <jim@meyering.net>
7803
7804         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
7805
7806 2006-05-17  Bruno Haible  <bruno@clisp.org>
7807
7808         Cygwin portability.
7809         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
7810
7811 2006-05-17  Bruno Haible  <bruno@clisp.org>
7812
7813         * lib/stdint_.h: Fix recognition of Cygwin.
7814
7815 2006-05-15  Bruno Haible  <bruno@clisp.org>
7816
7817         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
7818         on libtool patch by Ralf Wildenhues.
7819
7820 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7821
7822         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
7823         test for C99 conformance; (bool) 0.5 is an integer constant
7824         expression, but (bool) -0.5 is not.  Problem reported by Fedor
7825         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
7826
7827 2006-05-11  Simon Josefsson  <jas@extundo.com>
7828
7829         * m4/xvasprintf.m4: Fix obvious typo.
7830
7831 2006-05-11  Jim Meyering  <jim@meyering.net>
7832
7833         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
7834         James Lemley.
7835
7836 2006-05-10  Simon Josefsson  <jas@extundo.com>
7837
7838         * lib/md4.c: Typo fix, update copyright years.
7839         (K1, K2): Don't use L because it turn computations into 64-bit on
7840         64-bit platforms.
7841
7842 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
7843
7844         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
7845         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
7846         unwanted sign propagation, e.g., on hosts with 64-bit int.
7847         There still are some problems with reeelly weird theoretical hosts
7848         (e.g., 33-bit int) but it's not worth worrying about now.
7849         * lib/sha1.c (rol): Likewise.
7850         (K1, K2, K3, K4): Remove unnecessary L suffix.
7851
7852 2006-05-10  Bruno Haible  <bruno@clisp.org>
7853
7854         * lib/des.c: Cast to avoid warnings.
7855
7856 2006-05-09  Bruno Haible  <bruno@clisp.org>
7857
7858         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
7859         (Depends-on): Depend also on xsize, stdarg.
7860         (configure.ac): Add gl_XVASPRINTF.
7861
7862 2006-05-09  Bruno Haible  <bruno@clisp.org>
7863
7864         * m4/xvasprintf.m4: New file.
7865
7866 2006-05-09  Bruno Haible  <bruno@clisp.org>
7867
7868         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
7869         (EOVERFLOW): Define fallback value.
7870         (xstrcat): New function.
7871         (xvasprintf): Recognize the special case of a string concatenation.
7872
7873 2006-05-08  Eric Blake  <ebb9@byu.net>
7874
7875         * gnulib-tool (func_version): Base copyright year on CVS date.
7876         (func_emit_copyright_notice): New function.
7877         (func_emit_lib_Makefile_am): Use it.
7878         (func_emit_tests_Makefile_am): Likewise.
7879         (func_import): Likewise.
7880
7881 2006-05-08  Bruno Haible  <bruno@clisp.org>
7882
7883         * modules/stdarg: New file.
7884         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
7885
7886 2006-05-08  Bruno Haible  <bruno@clisp.org>
7887
7888         * m4/stdarg.m4: New file, from GNU gettext.
7889
7890 2006-05-08  Bruno Haible  <bruno@clisp.org>
7891
7892         * config/srclist.txt (build-aux/config.rpath): different from latest
7893         release.
7894
7895 2006-05-08  Bruno Haible  <bruno@clisp.org>
7896
7897         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
7898
7899 2006-05-05  Jim Meyering  <jim@meyering.net>
7900
7901         * m4/warning.m4: New file, derived from bison's file by the same name.
7902
7903 2006-05-03  Bruno Haible  <bruno@clisp.org>
7904
7905         * lib/stdint_.h: Shorter URL.
7906         * lib/inttypes.h: Likewise.
7907
7908 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7909
7910         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
7911
7912 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7913
7914         * lib/verify.h: Document the internals better.  Most of this change
7915         was written by Bruno Haible.
7916
7917 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7918
7919         * doc/verify.texi: New file, partly based on a proposal by
7920         Bruno Haible.
7921
7922 2006-05-02  Bruno Haible  <bruno@clisp.org>
7923
7924         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
7925         test from here...
7926         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
7927
7928 2006-04-29  Bruno Haible  <bruno@clisp.org>
7929
7930         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
7931         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
7932
7933 2006-04-29  Bruno Haible  <bruno@clisp.org>
7934
7935         * gnulib-tool: Make --update option actually work.
7936
7937 2006-04-29  Bruno Haible  <bruno@clisp.org>
7938
7939         * doc/gcd.texi: New file.
7940         * doc/gnulib.texi: Include it.
7941
7942 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7943
7944         * lib/getdate.y (get_date): When adding relative date, start with the
7945         initial time, not with the result of the first mktime call.
7946
7947 2006-04-25  Bruno Haible  <bruno@clisp.org>
7948
7949         * gnulib-tool (func_import): Output the include directives in three
7950         blocks, sorted separately.
7951         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7952
7953 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7954
7955         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
7956         to define main with arguments, for C++.  Reported by Eric Blake.
7957         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
7958         Prefer 'int main ()' to 'int main (void)', for C++.
7959         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
7960         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
7961         for 'main', for C99 and C++.
7962
7963 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7964
7965         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
7966         Don't assume that exit status -1 is valid.
7967         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7968         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
7969         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
7970         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
7971         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
7972         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
7973         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
7974         functions can be used without declaring them, or that you can
7975         exit with status -1.
7976         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
7977
7978 2006-04-24  Karl Berry  <karl@gnu.org>
7979
7980         * config/srclist.txt (longdouble.m4): sync lost.
7981
7982 2006-04-24  Eric Blake  <ebb9@byu.net>
7983
7984         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
7985
7986 2006-04-24  Bruno Haible  <bruno@clisp.org>
7987
7988         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
7989         poll() implementation in AIX.
7990         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7991
7992 2006-04-24  Bruno Haible  <bruno@clisp.org>
7993
7994         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
7995         assigned exactly once.
7996
7997 2006-04-23  Claudio Fontana  <claudio@gnu.org>
7998             Bruno Haible  <bruno@clisp.org>
7999
8000         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
8001         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
8002         for AM_CPPFLAGS.
8003
8004 2006-04-23  Bruno Haible  <bruno@clisp.org>
8005
8006         * modules/copy-file: Depend on unistd.
8007         * modules/execute: Likewise.
8008         * modules/fatal-signal: Likewise.
8009         * modules/findprog: Likewise.
8010         * modules/mkdtemp : Likewise.
8011         * modules/pipe: Likewise.
8012         * modules/wait-process: Likewise.
8013
8014 2006-04-23  Bruno Haible  <bruno@clisp.org>
8015
8016         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
8017         condition was already detected.
8018         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8019
8020 2006-04-23  Bruno Haible  <bruno@clisp.org>
8021
8022         * lib/copy-file.c: Include <unistd.h> unconditionally.
8023         * lib/execute.c: Likewise.
8024         * lib/fatal-signal.c: Likewise.
8025         * lib/findprog.c: Likewise.
8026         * lib/mkdtemp.c: Likewise.
8027         * lib/pipe.h: Likewise.
8028         * lib/pipe.c: Likewise.
8029         * lib/wait-process.h: Likewise.
8030
8031 2006-04-23  Bruno Haible  <bruno@clisp.org>
8032
8033         * gnulib-tool (func_usage): Fix --import description. Document
8034         --update.
8035         (func_import): Create temporary file in a temporary directory, if
8036         --dry-run is specified. Silence errors from 'grep' when there are no
8037         m4 files in $m4dir.
8038         (func_create_testdir): Silence errors from 'grep' when there are no
8039         m4 files in $m4dir.
8040         Reported by Karl Berry <karl@freefriends.org>.
8041
8042 2006-04-20  Bruno Haible  <bruno@clisp.org>
8043
8044         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8045         one argument, so that the code will be portable to Autoconf 2.60.
8046         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8047         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8048         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8049
8050 2006-04-19  Derek Price  <derek@ximbiot.com>
8051             Eric Blake  <ebb9@byu.net>
8052
8053         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8054         rather than "/full/path.h".  Update comment to match.  Shorten &
8055         generalize m4_translit call via AS_TR_CPP.
8056
8057 2006-04-19  Derek Price  <derek@ximbiot.com>
8058             Eric Blake  <ebb9@byu.net>
8059
8060         * lib/inttypes.h: Correct grammar in comment.
8061
8062 2006-04-18  Derek Price  <derek@ximbiot.com>
8063             Paul Eggert  <eggert@cs.ucla.edu>
8064
8065         * modules/inttypes: New file.
8066         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8067
8068 2006-04-18  Derek Price  <derek@ximbiot.com>
8069             Paul Eggert  <eggert@cs.ucla.edu>
8070
8071         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8072         New files.
8073
8074 2006-04-18  Derek Price  <derek@ximbiot.com>
8075             Paul Eggert  <eggert@cs.ucla.edu>
8076
8077         * lib/inttypes.h: New file.
8078         * lib/strtoimax.c: Assume <inttypes.h>.
8079
8080 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8081
8082         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8083         isn't mounted.  Problem reported by Kir Kolyshkin.
8084
8085 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
8086
8087         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
8088         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
8089         Derek R. Price.
8090         * lib/regex.h (RE_DUP_MAX): Update comment to match current
8091         implementation.
8092
8093 2006-04-12  Eric Blake  <ebb9@byu.net>
8094
8095         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
8096         is now done automatically by the corresponding Autoconf macro.
8097
8098 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
8099
8100         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
8101         time_r.h.
8102
8103 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8104
8105         Merge regex changes from libc, removing some of our
8106         POSIX-conformance changes that were rejected and redoing them in a
8107         less-intrusive way.
8108
8109         * lib/regcomp.c (re_compile_internal, init_dfa):
8110         Length arg is now size_t, not Idx.  All uses changed.
8111         (peek_token): Forward decl now says internal_function.
8112         (__re_error_msgid, __re_error_msgid_idx):
8113         Now static rather than extern with attribute_hidden.
8114         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
8115         For some reason libc prefers K&R style defns for external functions.
8116         (regerror) [!defined _LIBC]: Likewise.
8117         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
8118         (seek_collating_symbol_entry, lookup_collation_sequence_value):
8119         (build_range_exp, build_collating_symbol):
8120         Use K&R-style defn.
8121         (re_compile_fastmap): Use '\0' to memset, not 0.
8122         (utf8_sb_map): Make the calculations more obvious.
8123         (init_dfa, parse_bracket_exp, build_charclass_op):
8124         Call calloc and cast result, as glibc does.
8125         (init_word_char, fetch_token, peek_token, peek_token_bracket):
8126         (build_range_exp, build_collating_symbol):
8127         Now internal functions.
8128
8129         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
8130
8131         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
8132         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
8133         Don't depend on VMS; depend on __VMS instead, for POSIX
8134         namespace cleanness.
8135         (regoff_t): Define to ssize_t, not long int.
8136
8137         Remove the REG_ macros named below.  Instead, make the old names
8138         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
8139         __USE_GNU_REGEX.
8140         (REG_BACKSLASH_ESCAPE_IN_LISTS):
8141         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
8142         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
8143         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
8144         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
8145         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
8146         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
8147         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
8148         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
8149         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
8150         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
8151         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
8152         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
8153         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
8154         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
8155         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
8156         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
8157         (REG_NREGS):
8158         Remove.  All uses replaced by the old RE_* names.
8159         (RE_BACKSLASH_ESCAPE_IN_LISTS):
8160         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
8161         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
8162         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
8163         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
8164         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
8165         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
8166         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
8167         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
8168         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
8169         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
8170         Don't bother having these macros be independent of each others'
8171         values, since they no longer exist in the POSIX name space.
8172
8173         Rename the following member names back to their old names,
8174         unless !__USE_GNU_REGEX.  All uses changed back.
8175         (buffer): Renamed from re_buffer.
8176         (allocated): Renamed from re_allocated.
8177         (used): Renamed from re_used.
8178         (syntax): Renamed from re_syntax.
8179         (fastmap): Renamed from re_fastmap.
8180         (translate): Renamed from re_translate.
8181         (can_be_null): Renamed from re_can_be_null.
8182         (regs_allocated): Renamed from re_regs_allocated.
8183         (fastmap_accurate): Renamed from re_fastmap_accurate.
8184         (no_sub): Renamed from re_no_sub.
8185         (not_bol): Renamed from re_not_bol.
8186         (not_eol): Renamed from re_not_eol.
8187         (newline_anchor): Renamed from re_newline_anchor.
8188         (num_regs): Renamed from rm_num_regs.
8189         (start): Renamed from rm_start.
8190         (end): Renamed from rm_end.
8191
8192         (free_state): Move up a bit.
8193
8194         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
8195         #define to be empty.
8196         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
8197         when that is what is intended.
8198         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
8199         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
8200         (MAX): New macro.
8201         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
8202         All uses changed back to re_malloc, etc.  It's now the caller's
8203         responsibility to check for overflow; all callers changed.
8204         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
8205         (re_x2nrealloc): Remove.
8206         (free_state): Remove decl.
8207
8208         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
8209         (re_set_registers, re_exec):
8210         Use K&R-style defn.
8211
8212         2006-01-31  Roland McGrath  <roland@redhat.com>
8213
8214         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
8215         Reported by Mike Frysinger <vapier@gentoo.org>.
8216
8217         2006-01-15  Andreas Jaeger  <aj@suse.de>
8218
8219         [BZ #1950]
8220         * lib/regex_internal.c (re_string_reconstruct): Adjust for
8221         build_wcs_upper_buffer change.
8222         (build_wcs_upper_buffer): Change return type.
8223
8224         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
8225
8226         * lib/regex_internal.h: Include <stdint.h> if available.
8227
8228         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
8229
8230         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
8231
8232         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
8233
8234         * lib/regcomp.c: Adjust for changed secondary hash function.
8235
8236         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
8237
8238         * lib/regex.h: Pretty printing.
8239         Clean up namespace a bit.
8240
8241         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
8242
8243         * lib/regexec.c (update_cur_sifted_state, check_arrival,
8244         check_arrival_add_next_nodes): Avoid using uninitialized variable.
8245
8246         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8247                     Ulrich Drepper  <drepper@redhat.com>
8248
8249         [BZ #1302]
8250         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
8251         changed.
8252         (bitset_word_t): Renamed from bitset_word.  All uses changed.
8253
8254         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
8255
8256         [BZ #281]
8257         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
8258         * lib/regcomp.c: Remove unnecessary uses of
8259         unsigned RE_TRANSLATE_TYPE.
8260         * lib/regex_internal.h: Likewise.
8261         * lib/regex_internal.c: Likewise.
8262         * lib/regexec.c: Likewise.
8263         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
8264
8265         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
8266
8267         * lib/regexec.c (find_recover_state): Remove unnecessary
8268         initialization.
8269         (transit_state_bkref): Make DFA a const pointer.
8270         (get_subexp): Likewise.
8271         (check_arrival): Likewise.
8272         (update_cur_sifted_state): Likewise.
8273         (re_search_internal): Likewise.
8274         (prune_impossible_nodes): Likewise.
8275         (acquire_init_state_context): Likewise.
8276         (proceed_next_node): Likewise.
8277         (set_regs): Likewise.
8278         (free_fail_stack_return): Likewise.
8279         (check_arrival_expand_ecl): Mark DFA parameter as const.
8280         (check_arrival_expand_ecl_sub): Likewise.
8281         (check_subexp_limits): Likewise.
8282         (sub_epsilon_src_nodes):  Likewise.
8283         (add_epsilon_src_nodes):  Likewise.
8284         (merge_state_array): Likewise.
8285         (update_regs): Likewise.
8286         (build_trtable): Likewise.
8287         (sift_states_backward): Mark MCTX parameter as const.
8288         (build_sifted_states): Likewise.
8289         (update_cur_sifted_state): Likewise.
8290         (sift_states_mkref): Likewise.
8291         (check_arrival_expand_ecl): Mark eclosure as const.
8292         (check_dst_limits_calc_pos_1): Likewise.
8293         * lib/regex_internal.h (re_match_context_t): Make dfa a const
8294         pointer.
8295
8296         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
8297
8298         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
8299         (transit_state_sb): Likewise.
8300         (transit_state_mb): Likewise.
8301         (sift_states_iter_mb): Likewise.
8302         (check_arrival_add_next_nodes): Likewise.
8303         (check_node_accept_bytes): Change first parameter to pointer-to-const.
8304         [_LIBC] (re_search_2_stub): Use mempcpy.
8305
8306         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
8307         mbrtowc for very simple UTF-8 case.
8308
8309         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
8310         a pointer-to-const.
8311         (re_acquire_state_context): Likewise.
8312         * lib/regex_internal.h: Adjust prototypes.
8313
8314         * lib/regex.c: Prevent using C++ compilers.
8315
8316         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
8317         (re_acquire_state_context): Likewise.
8318
8319 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8320
8321         * modules/regex (Depends-on): Add ssize_t.
8322
8323 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8324
8325         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8326         translation table.
8327
8328 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8329
8330         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8331
8332 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8333             Bruno Haible  <bruno@clisp.org>
8334
8335         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8336         <sys/types.h> and <inttypes.h>.
8337
8338 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8339
8340         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8341         `__error_t_defined', so argp.h will not typedef the former.
8342
8343 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8344
8345         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8346         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8347         glibc names.  Even if glibc is changed to conform to POSIX, the
8348         traditional names will be available anyway, since regex depends on
8349         the extensions module.  Also, fix a longstanding typo in the
8350         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8351         reported by Emanuele Giaquinta.  Also, change sense of cached
8352         variable, so that the message makes sense.
8353
8354 2006-03-24  Simon Josefsson  <jas@extundo.com>
8355
8356         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8357         including some doc fixes.
8358         (base64_encode_alloc): Fix +1 bug on allocation failures.
8359
8360 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8361
8362         * lib/base64.c (base64_encode): Do not read past end of array with
8363         unsanitized input on systems with CHAR_BIT > 8.
8364
8365 2006-03-24  Eric Blake  <ebb9@byu.net>
8366
8367         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8368
8369 2006-03-22  Karl Berry  <karl@gnu.org>
8370
8371         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8372         * config/srclistvars.sh (COREUTILS): new var.
8373
8374 2006-03-17  Jim Meyering  <jim@meyering.net>
8375
8376         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8377         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8378
8379 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8380
8381         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8382         no longer needs it.  Instead, check that regoff_t is as least
8383         as wide as ptrdiff_t.
8384
8385         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8386         so that our regex.h stays compatible with the installed regex.
8387         This is helpful for installers who configure --without-included-regex.
8388         Problem reported by Emanuele Giaquinta.
8389
8390 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8391
8392         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8393         Typedef to long int, not to off_, as POSIX will likely change
8394         in that direction.
8395
8396 2006-03-15  Eric Blake  <ebb9@byu.net>
8397
8398         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8399
8400 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8401
8402         * lib/argp-help.c (validate_uparams): Fix typo
8403         * lib/argp-parse.c (argp_default_options): Consistently begin help
8404         messages with a lowercase letter.
8405
8406 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8407
8408         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8409         overrun buffers and shouldn't be used (much as gets shouldn't be
8410         used).
8411         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8412
8413 2006-03-08  Simon Josefsson  <jas@extundo.com>
8414
8415         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8416         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8417
8418 2006-03-08  Simon Josefsson  <jas@extundo.com>
8419
8420         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8421         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8422
8423 2006-03-08  Simon Josefsson  <jas@extundo.com>
8424
8425         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8426         signal that configure disabled the device.
8427
8428 2006-03-08  Simon Josefsson  <jas@extundo.com>
8429
8430         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8431         languages.
8432
8433 2006-03-07  Simon Josefsson  <jas@extundo.com>
8434
8435         * modules/getopt (Depends-on): Add unistd.
8436
8437         * modules/unistd: New file.
8438
8439 2006-03-07  Simon Josefsson  <jas@extundo.com>
8440
8441         * modules/gc-random: New file.
8442
8443 2006-03-07  Simon Josefsson  <jas@extundo.com>
8444
8445         * m4/unistd_h.m4: New file.
8446
8447 2006-03-07  Simon Josefsson  <jas@extundo.com>
8448
8449         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8450         test to be side-effect free by storing the result in the cache
8451         variable gl_cv_lib_readline, and moving the assignment of
8452         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8453         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8454
8455 2006-03-07  Simon Josefsson  <jas@extundo.com>
8456
8457         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8458         error on missing devices (the functions will return an error).
8459
8460         * m4/gc.m4: Move random stuff to gc-random.m4
8461
8462 2006-03-07  Simon Josefsson  <jas@extundo.com>
8463
8464         * lib/unistd_.h: New file.
8465
8466 2006-03-07  Simon Josefsson  <jas@extundo.com>
8467
8468         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8469
8470 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8471
8472         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8473         Problem reported by Juan Manuel Guerrero.
8474
8475 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8476
8477         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8478         the unistd module.
8479         * lib/getlogin_r.c: Likewise.
8480         * lib/getlogin_r.h: Likewise.
8481         * lib/glob.c: Likewise.
8482         * lib/pagealign_alloc.c: Likewise.
8483         * lib/unistd_.h: Remove; no longer needed.
8484
8485 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8486
8487         * MODULES.html.sh (Support for systems lacking POSIX:2001):
8488         Add unistd.
8489         * modules/c-stack (Depends-on): Add unistd.
8490         * modules/getlogin_r: Likewise.
8491         * modules/glob: Likewise.
8492         * modules/pagealign_alloc: Likewise.
8493         * modules/unistd (Files): Remove lib/unistd_.h.
8494         (EXTRA_DIST): Remove.
8495         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
8496         need unistd_.h.
8497         (MOSTLYCLEANFILES): Remove unistd.h-t.
8498
8499 2006-03-03  Simon Josefsson  <jas@extundo.com>
8500
8501         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
8502
8503 2006-03-03  Simon Josefsson  <jas@extundo.com>
8504
8505         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
8506         libidn and bison.
8507
8508 2006-03-03  Simon Josefsson  <jas@extundo.com>
8509
8510         * build-aux/maint.mk: Add indent target.
8511
8512 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
8513
8514         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
8515         our replacement poll.h in any case, to avoid a differing
8516         declaration from a system header.  Seen on AIX.
8517
8518 2006-03-01  Simon Josefsson  <jas@extundo.com>
8519
8520         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
8521         <kasal@ucw.cz>.
8522
8523 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8524
8525         * modules/gettime (Depends-on): Add extensions module.
8526         * modules/nanosleep (Depends-on): Likewise.
8527         * modules/settime (Depends-on): Likewise.
8528
8529 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8530
8531         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8532         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8533         pedantically.
8534         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8535         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8536
8537         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8538         not "==".  Reported by Ralf Wildenhues.
8539
8540 2006-03-01  Karl Berry  <karl@gnu.org>
8541
8542         * doc/Copyright/request-*: new files, synced from gnuorg.
8543
8544 2006-03-01  Karl Berry  <karl@gnu.org>
8545
8546         * config/srclist.txt (Copyright/*): new entries.
8547
8548 2006-02-28  Simon Josefsson  <jas@extundo.com>
8549
8550         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8551
8552 2006-02-27  Simon Josefsson  <jas@extundo.com>
8553
8554         * lib/base64.h: Indent #define's.  From Jim Meyering
8555         <jim@meyering.net>.
8556
8557 2006-02-27  Jim Meyering  <jim@meyering.net>
8558
8559         Revert the change of 2006-02-24, so these files can continue
8560         to be sync'd from gettext.
8561         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8562         of `config.h'.
8563
8564 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8565
8566         * modules/intprops: New file.
8567         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8568         Add intprops.
8569         * modules/getloadavg (Files): Remove lib/intprops.h.
8570         (Depends-on): Add intprops.
8571         * modules/human: Likewise.
8572         * modules/inttostr: Likewise.
8573         * modules/openat: Likewise.
8574         * modules/sig2str: Likewise.
8575         * modules/userspec: Likewise.
8576         * modules/utimecmp: Likewise.
8577         * modules/xnanosleep: Likewise.
8578         * modules/xstrtol: Likewise.
8579
8580 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8581
8582         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8583         * modules/lock-tests (TESTS): Use $(EXEEXT).
8584         * modules/tls-tests: Likewise.
8585         * modules/argp-tests: Likewise.
8586         (check_PROGRAMS): New var, replacing...
8587         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8588
8589 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8590
8591         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8592         `config.h'.
8593
8594 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8595
8596         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8597
8598 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8599
8600         Sync from coreutils.
8601         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8602         gl_CHDIR_SAFER.
8603
8604 2006-02-22  Jim Meyering  <jim@meyering.net>
8605
8606         Sync from coreutils.
8607         * m4/chdir-safer.m4: New file.
8608
8609 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8610
8611         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8612         AT_FDCWD exceeds INT_MAX.
8613         * lib/openat.h (AT_FDCWD): Likewise.
8614
8615 2006-02-17  Eric Blake  <address@hidden>
8616
8617         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8618
8619 2006-02-16  Simon Josefsson  <jas@extundo.com>
8620
8621         * modules/getaddrinfo (Depends-on): Add sys_socket.
8622
8623 2006-02-15  Simon Josefsson  <jas@extundo.com>
8624
8625         * build-aux/maint.mk: Add dsyntax-check rule.
8626
8627 2006-02-15  Eric Blake  <ebb9@byu.net>
8628
8629         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8630         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8631         'present but cannot compile' warnings on cygwin.
8632         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8633         use ws2tcpip.h if sys/socket.h works.
8634         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8635         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8636
8637 2006-02-14  Simon Josefsson  <jas@extundo.com>
8638
8639         * modules/maintainer-makefile (Files): Rename.
8640
8641         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8642         and (the local) Makefile.cfg to maint-cfg.mk.
8643
8644         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8645         to the latter.
8646
8647         * modules/maintainer-makefile: New module.
8648
8649         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8650         severaly stripped to make it possible to build it up from scratch
8651         with reliable tests.
8652
8653         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8654         fixes to permit overriding the default actions when configure and
8655         makefile are not available.
8656
8657 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8658
8659         Sync from coreutils.
8660         * modules/lstat (Depends-on): Don't depend on xalloc.
8661         (License): Change from GPL to LGPL, since this is now simply a
8662         replacement for a libc function.
8663
8664 2006-02-14  Jim Meyering  <jim@meyering.net>
8665
8666         Sync from coreutils.
8667
8668         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8669         failure on deficient systems, and simplify gnulib lgpl dependencies.
8670         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8671         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8672
8673         * lib/xalloc-die.c: Remove unused definition of N_.
8674
8675 2006-02-14  Jim Meyering  <jim@meyering.net>
8676
8677         Sync from coreutils.
8678         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8679         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8680         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8681         double-quote uses of that variable, to accommodate the rare case in
8682         which getmntent is available in none of the libraries checked.  This
8683         happens at least on FreeBSD 5.0.
8684
8685 2006-02-13  Simon Josefsson  <jas@extundo.com>
8686
8687         * gnulib-tool (Usage): Fix --import, from
8688         karl@freefriends.org (Karl Berry).
8689
8690 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8691
8692         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8693
8694 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8695
8696         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8697         "autoupdate" on 2005-12-12.
8698
8699 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8700
8701         * modules/closeout (Depends-on): Remove atexit.
8702
8703 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8704
8705         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8706         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8707
8708 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8709
8710         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8711         __EXTENSIONS__ if this causes compilation to fail.  Problem
8712         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8713         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8714
8715 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8716
8717         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8718         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8719         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8720         All uses changed.
8721
8722 2006-01-26  Simon Josefsson  <jas@extundo.com>
8723
8724         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8725         prototype is visible on mingw32.
8726
8727         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8728         for mingw32.
8729
8730         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8731         mingw32).
8732
8733 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8734
8735         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8736         attempt to open for write; this always fails, at least on POSIX
8737         hosts.  This reinstates the 2006-01-09 change, which was
8738         inadvertently removed.
8739
8740 2006-01-26  Bruno Haible  <bruno@clisp.org>
8741
8742         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8743         Reported by Paul Eggert.
8744
8745 2006-01-26  Bruno Haible  <bruno@clisp.org>
8746             Paul Eggert  <eggert@cs.ucla.edu>
8747
8748         * lib/stdbool_.h (_Bool)
8749         [(! (defined __cplusplus || defined __BEOS__)
8750           && !defined __GNUC__
8751           && !(defined __HP_cc || defined __xlc__
8752                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8753                || defined __sgi))]:
8754         #define to signed char in these cases too; this simplifies
8755         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8756         etc., separately) and makes it more conservative.
8757
8758 2006-01-25  Simon Josefsson  <jas@extundo.com>
8759
8760         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8761         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8762         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8763
8764 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8765
8766         * lib/argp-namefrob.h: Bugfix. Remove stray #
8767
8768 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8769
8770         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8771         so that we test the test.
8772         Check for yet another HP-UX cc bug involving *bool |= bool.
8773
8774 2006-01-25  Karl Berry  <karl@gnu.org>
8775
8776         * config/srclist.txt (vasnprintf.c): sync lost.
8777
8778 2006-01-25  Jim Meyering  <jim@meyering.net>
8779
8780         Sync from the stable (b5) branch of coreutils:
8781
8782         * lib/fts.c (fts_children): Don't let close() clobber errno from
8783         failed fchdir().
8784
8785         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8786         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8787         a dangling symlink.  That can also happen at least for ELOOP.
8788         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8789         FYI, this bug predates the inclusion of fts.c in coreutils.
8790
8791         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8792         in their own block, so pre-c99 compilers don't object.
8793
8794         Avoid the double-free (first in fts_read, second in fts_close) that
8795         would occur when an `active' directory is made inaccessible (e.g.,
8796         via chmod a-x) during a traversal.
8797         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8798         before returning.  Reproduce this failure by
8799         mkdir -p a/b; cd a; chmod a-x . b
8800         Reported by Stavros Passas.
8801
8802 2006-01-25  Jim Meyering  <jim@meyering.net>
8803
8804         * lib/fileblocks.c: Remove more useless parentheses.
8805         * lib/readutmp.h: Likewise.
8806
8807 2006-01-25  Bruno Haible  <bruno@clisp.org>
8808
8809         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
8810         warnings.
8811         Reported by Paul Eggert.
8812
8813 2006-01-25  Bruno Haible  <bruno@clisp.org>
8814
8815         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
8816         rid of a trap command. For Solaris sh.
8817         Reported by Mark D. Baushke <mdb@gnu.org>.
8818
8819 2006-01-24  Simon Josefsson  <jas@extundo.com>
8820
8821         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
8822         Bruno.
8823
8824 2006-01-24  Karl Berry  <karl@gnu.org>
8825
8826         * config/srclist.txt (argp-namefrob.h): sync lost.
8827
8828 2006-01-24  Jim Meyering  <jim@meyering.net>
8829
8830         * modules/openat (Files): Add lib/intprops.h.
8831         From Mark D. Baushke.
8832
8833 2006-01-24  Jim Meyering  <jim@meyering.net>
8834
8835         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
8836         Reported by Mark D. Baushke.
8837
8838 2006-01-24  Jim Meyering  <jim@meyering.net>
8839
8840         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
8841
8842 2006-01-24  Bruno Haible  <bruno@clisp.org>
8843
8844         * modules/strnlen (Maintainer): Change from glibc to all.
8845
8846 2006-01-24  Bruno Haible  <bruno@clisp.org>
8847
8848         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
8849         Patch by Paul Eggert.
8850
8851 2006-01-24  Bruno Haible  <bruno@clisp.org>
8852
8853         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
8854         already has it.
8855         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
8856         2005-11-26.
8857
8858         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
8859         'signed char' to avoid problems with the built-in _Bool type.
8860         Reported by Paul Eggert on 2005-11-26.
8861
8862 2006-01-24  Bruno Haible  <bruno@clisp.org>
8863
8864         * gnulib-tool (func_import): Avoid constructing complicated sed
8865         expressions inside backquote.
8866         Report and solution by Mark D. Baushke <mdb@gnu.org>.
8867
8868 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
8869
8870         These changes imported from libc.
8871         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
8872         test and two separate function calls.
8873         * lib/strndup.c (__strndup): Add libc_hidden_def.
8874
8875 2006-01-23  Simon Josefsson  <jas@extundo.com>
8876
8877         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
8878         Remove the test_*_SOURCES variable: automake infers it by default.
8879         * modules/tls-tests: Likewise.
8880
8881 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8882
8883         Work around porting bugs reported by Dieter in
8884         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
8885         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
8886         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
8887         Include "getopt.h" first, to check interface.
8888         (getenv): Declare only if defined HAVE_DECL_GETENV &&
8889         !HAVE_DECL_GETENV.
8890         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
8891         (__strndup): Revert to K&R-style function dfns, the glibc style.
8892         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
8893         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
8894         Include strnlen.h first, to get prototype properly.
8895         (strnlen): Renamed from __strnlen.
8896         Remove weak alias.
8897
8898 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8899
8900         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
8901
8902 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8903
8904         * config/srclist.txt: Adjust to reflect glibc reorganization.
8905         This affects only comments.
8906
8907 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8908
8909          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
8910          Reported by Bruce Korb <bkorb@gnu.org>.
8911
8912 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
8913
8914         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
8915         to pacify gcc -Wswitch-default.
8916
8917 2006-01-22  Bruno Haible  <bruno@clisp.org>
8918
8919         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
8920         temporary buffer for sprintf, take into account the precision also
8921         for 'd', 'i', 'u', 'o', 'x', 'X'.
8922
8923 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8924
8925         * modules/argp-tests: New module
8926         * tests/test-argp.c: New file
8927         * tests/test-argp-2.sh: New file
8928
8929 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8930
8931         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
8932         (__argp_base_name): Removed
8933         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
8934         typo.
8935         (__argp_base_name): Provide macro definition or extern declaration
8936         depending on the configuration
8937
8938 2006-01-20  Simon Josefsson  <jas@extundo.com>
8939
8940         * modules/inet_ntop (Depends-on): Depend on sys_socket.
8941
8942 2006-01-20  Simon Josefsson  <jas@extundo.com>
8943
8944         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
8945
8946 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
8947
8948         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
8949         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
8950         Suggested by Bruno Haible.
8951
8952 2006-01-20  Karl Berry  <karl@gnu.org>
8953
8954         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
8955         until changes propagate, I guess.
8956
8957 2006-01-19  Simon Josefsson  <jas@extundo.com>
8958
8959         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
8960
8961 2006-01-19  Simon Josefsson  <jas@extundo.com>
8962
8963         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
8964
8965 2006-01-19  Simon Josefsson  <jas@extundo.com>
8966
8967         * gnulib-tool: Set check_PROGRAMS.
8968
8969         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8970         modules/des-tests, modules/gc-arcfour-tests,
8971         modules/gc-arctwo-tests, modules/gc-des-tests,
8972         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8973         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8974         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8975         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8976         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8977         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
8978         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
8979         test_*_SOURCES.
8980
8981 2006-01-18  Simon Josefsson  <jas@extundo.com>
8982
8983         * modules/socklen (Depends-on): Depend on sys_socket.
8984
8985 2006-01-18  Simon Josefsson  <jas@extundo.com>
8986
8987         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8988         modules/des-tests, modules/gc-arcfour-tests,
8989         modules/gc-arctwo-tests, modules/gc-des-tests,
8990         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8991         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8992         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8993         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8994         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8995         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
8996         $(EXEEXT) to automake TESTS variable, for mingw32.
8997
8998 2006-01-17  Simon Josefsson  <jas@extundo.com>
8999
9000         * modules/socklen (Include): Need sys/socket.h.
9001
9002 2006-01-17  Bruno Haible  <bruno@clisp.org>
9003
9004         * modules/ssize_t (Include): Add <sys/types.h>.
9005
9006 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
9007
9008         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
9009         it's not portable and it doesn't work with cross-compiles.
9010         Problem reported by Bruno Haible.  Fix missing-$ typo in
9011         'test "gl_cv_ignore_unused_libraries" ...' that prevented
9012         -zignore from being used with Sun's C compiler.
9013
9014 2006-01-12  Simon Josefsson  <jas@extundo.com>
9015
9016         * lib/base64.c: Fix warning, reported by Bruno Haible
9017         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
9018
9019 2006-01-12  Bruno Haible  <bruno@clisp.org>
9020
9021         * modules/ldd: New file.
9022         * build-aux/ldd.sh.in: New file.
9023         * MODULES.html.sh (Support for building libraries and executables): Add
9024         ldd.
9025
9026 2006-01-12  Bruno Haible  <bruno@clisp.org>
9027
9028         * m4/ldd.m4: New file.
9029
9030 2006-01-12  Bruno Haible  <bruno@clisp.org>
9031
9032         * gnulib-tool (func_import, func_create_testdir): Don't go into an
9033         endless loop while replacing $auxdir with build-aux.
9034
9035 2006-01-11  Simon Josefsson  <jas@extundo.com>
9036
9037         * lib/stdint_.h (SIZE_MAX): Add missing (.
9038
9039 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
9040
9041         Sync from coreutils.
9042         * lib/md5.c: Fix commentary typos.
9043         (alignof, UNALIGNED_P): No need for a GCC-specific version.
9044         * lib/md5.h (__attribute__): Remove; unused.
9045         * lib/sha1.c: Fix commentary to match md5 better.
9046         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9047         so that we don't need to worry about alignment.  All uses changed.
9048         This merges the 2005-10-28 md5 change into sha1.
9049
9050 2006-01-11  Jim Meyering  <jim@meyering.net>
9051
9052         Sync from coreutils.
9053         * lib/md5.c (OP): Fix spacing.
9054
9055 2006-01-11  Bruno Haible  <bruno@clisp.org>
9056
9057         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9058         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9059         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9060
9061 2006-01-11  Bruno Haible  <bruno@clisp.org>
9062
9063         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9064         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9065         the "early" section as well.
9066
9067 2006-01-11  Bruno Haible  <bruno@clisp.org>
9068
9069         Avoid "ar: no archive members specified" error on MacOS X.
9070         * gnulib-tool (func_modules_add_dummy): New function.
9071         (func_import, func_create_testdir): Invoke it.
9072
9073 2006-01-11  Bruno Haible  <bruno@clisp.org>
9074
9075         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9076         with $auxdir in AC_CONFIG_FILES statements.
9077
9078 2006-01-11  Bruno Haible  <bruno@clisp.org>
9079
9080         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9081         Initialize also noinst_HEADERS to empty.
9082
9083 2006-01-11  Bruno Haible  <bruno@clisp.org>
9084
9085         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
9086         variables.
9087         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
9088         autoreconf.
9089
9090 2006-01-11  Bruno Haible  <bruno@clisp.org>
9091
9092         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
9093         overridable by the user.
9094         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9095
9096 2006-01-10  Simon Josefsson  <jas@extundo.com>
9097
9098         * modules/sys_socket: New file.
9099
9100 2006-01-10  Simon Josefsson  <jas@extundo.com>
9101
9102         * m4/sys_socket_h.m4: New file.
9103
9104 2006-01-10  Simon Josefsson  <jas@extundo.com>
9105
9106         * lib/socket_.h: New file.
9107
9108 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9109
9110         * modules/readutmp (Maintainer): Add myself.
9111
9112 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9113
9114         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
9115         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
9116         People who are still concerned with buggy memcmp implementations
9117         can invoke gl_FUNC_MEMCMP themselves.
9118
9119 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9120
9121         * lib/regex_internal.h (BITSET_WORD_BITS):
9122         Work around a bug in 64-bit PGC (before version 6.1-2), where the
9123         preprocessor mishandles large unsigned values as if they were signed.
9124         Problem reported by Claudio Fontana in
9125         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
9126
9127 2006-01-10  Jim Meyering  <jim@meyering.net>
9128
9129         Avoid the double-free (first in fts_read, second in fts_close) that
9130         would occur when an `active' directory is made inaccessible (e.g.,
9131         via chmod a-x) during a traversal.
9132         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9133         before returning.  Reproduce this failure by
9134         mkdir -p a/b; cd a; chmod a-x . b
9135         Reported by Stavros Passas.
9136
9137         Sync from coreutils.
9138         * lib/sha1.c: Tweak grammar in a comment.
9139
9140 2006-01-10  Jim Meyering  <jim@meyering.net>
9141
9142         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
9143         Patch by Joerg Sonnenberger.
9144
9145 2006-01-10  Bruno Haible  <bruno@clisp.org>
9146
9147         * modules/readutmp: Depend on module free.
9148         * modules/strtok_r: Depend on module restrict.
9149
9150 2006-01-10  Bruno Haible  <bruno@clisp.org>
9151
9152         * modules/gettext (configure.ac): Add an invocation of
9153         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
9154
9155 2006-01-10  Bruno Haible  <bruno@clisp.org>
9156
9157         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
9158         Reported by Werner Lemberg <wl@gnu.org>.
9159
9160 2006-01-10  Bruno Haible  <bruno@clisp.org>
9161
9162         * lib/localcharset.c: Update from GNU gettext.
9163
9164 2006-01-10  Bruno Haible  <bruno@clisp.org>
9165
9166         * lib/argp.h (__const): Remove macro. Use const instead.
9167         * lib/argp-fmtstream.h (__const): Likewise.
9168         * lib/glob_.h (__const): Remove macro.
9169         * lib/glob-libc.h: Use const instead of __const.
9170
9171 2006-01-10  Bruno Haible  <bruno@clisp.org>
9172
9173         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
9174         variable.
9175         Needed to avoid an automake error regarding the 'gettext' module.
9176
9177 2006-01-09  Simon Josefsson  <jas@extundo.com>
9178
9179         * modules/inet_ntop (Depends-on): Add restrict.
9180
9181 2006-01-09  Simon Josefsson  <jas@extundo.com>
9182
9183         * modules/gc-rijndael-tests (License): Put under LGPL.
9184
9185         * modules/gc-des-tests (License): Likewise.
9186
9187         * modules/gc-arcfour-tests (License): Likewise.
9188
9189         * modules/gc-arctwo-tests (License): Likewise.
9190
9191         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
9192
9193         * modules/gc-hmac-sha1-tests (Files): Likewise.
9194
9195         * modules/gc-hmac-md5-tests (License): Likewise.
9196
9197         * modules/gc-sha1-tests (License): Likewise.
9198
9199         * modules/gc-md5-tests (License): Likewise.
9200
9201         * modules/gc-md4-tests (License): Likewise.
9202
9203         * modules/gc-md2-tests (License): Likewise.
9204
9205         * modules/gc-tests (License): Likewise.
9206
9207         * modules/des-tests (License): Likewise.
9208
9209         * modules/md4-tests (License): Likewise.
9210
9211         * modules/md2-tests (License): Likewise.
9212
9213 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9214
9215         Sync from coreutils:
9216
9217         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
9218         * modules/lib-ignore: New file.
9219         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
9220         chdir-safer.m4, lchmod.m4.
9221         * modules/openat: Add mkdirat.c, openat-priv.h.
9222
9223 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9224
9225         Sync from coreutils.
9226         * m4/lib-ignore.m4: New file.
9227         * m4/lchmod.m4: New file.
9228
9229 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9230
9231         Sync from coreutils.
9232         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
9233         for write access: POSIX says that must fail.
9234         * lib/fts.c (diropen): Likewise.
9235         * lib/save-cwd.c (save_cwd): Likewise.
9236         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
9237         well, for minor improvements on hosts that lack O_DIRECTORY.
9238         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
9239         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
9240         Fall back on chown if open failed with EACCES.
9241
9242         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
9243         Report an error at compile-time if only a 1-second nominal clock
9244         resolution is found.
9245
9246         * lib/lchmod.h: New file.
9247         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
9248         (make_dir_parents): Use lchown rather than chown, and
9249         lchmod rather than chmod.
9250
9251         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
9252         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
9253         "proc" reported by n0dalus.
9254
9255         * lib/mountlist.c: Include <limits.h>.
9256         (dev_from_mount_options)
9257         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
9258         New function.  It no longer assumes "dev=" has the System V meaning
9259         on Linux (since it doesn't).  It also parses "dev=" more carefully.
9260         (read_file_system_list)
9261         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
9262         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
9263         dev= in that case.
9264
9265         * lib/posixtm.h (PDS_PRE_2000): New macro.
9266         * lib/posixtm.c (year): Arg is now syntax_bits rather than
9267         allow_century.  All usages changed.  Reject dates outside the range
9268         1969-1999 if PDS_PRE_2000 is used.
9269
9270 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9271
9272         Sync from coreutils.
9273         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
9274         (Time of day items): Mention the possibility of leap seconds.
9275         Problem reported by Dr. David Alan Gilbert.
9276
9277 2006-01-09  Jim Meyering  <jim@meyering.net>
9278
9279         Sync from coreutils.
9280
9281         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
9282
9283         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
9284
9285         * lib/modechange.c (mode_compile): Reject an invalid mode string
9286         that starts with an octal digit.  From Andreas Gruenbacher.
9287
9288         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
9289         and dup to open_safer and dup_safer, respectively.
9290         (openat_permissive): Fix typo in comment.
9291
9292         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
9293         "gettext.h"; either no longer needed or are guaranteed by openat.h.
9294         (_): Remove; no longer needed.
9295         (openat): Renamed from rpl_openat; no need for rpl_openat
9296         since openat.h renames openat for us.
9297         Replace most of the body with a call to openat_permissive,
9298         to avoid duplicate code.
9299         Port to (probably hypothetical) environments were mode_t is
9300         wider than int.
9301         (openat_permissive): Require mode arg, so that we can check
9302         types better.  Put it just after flags.  Change cwd failure
9303         indicator from pointer-to-bool to pointer-to-errno-value.
9304         All callers changed.
9305         Invoke openat_save_fail and/or openat_restore_fail if
9306         cwd_errno is null, so that openat can call us.
9307         (openat_permissive, fdopendir, fstatat, unlinkat):
9308         Simplify errno handling to avoid some duplicate code,
9309         as it's OK to set errno on success.
9310         * lib/openat.h: Revamp code so that function macros depend on
9311         __OPENAT_PREFIX only, not also on AT_FDCWD.
9312         (openat_ro): Remove.  Caller changed to use openat_permissive.
9313         (openat_permissive): Now a macro, if not a function.
9314         (openat_restore_fail, openat_save_fail): Now always functions,
9315         since mkdirat needs them even if __OPENAT_PREFIX is defined.
9316
9317         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
9318         and openat.c.
9319         * lib/mkdirat.c: Include openat-priv.h.
9320         Remove definitions of macros defined therein.
9321         * lib/openat.c: Likewise.
9322
9323         * lib/mkdirat.c (mkdirat): New file and function.
9324         * lib/openat.h (mkdirat): Declare.
9325
9326         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9327
9328         * lib/openat.h (openat_permissive): Declare.
9329         (openat_ro): Define.
9330
9331         * lib/openat.c (EXPECTED_ERRNO): New macro.
9332         (openat_permissive): New function -- used in remove.c rewrite.
9333         (all functions): Set errno just before returning, only if there
9334         was an actual failure.
9335         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9336
9337         Emulate openat-family functions using Linux's procfs, if possible.
9338         Idea and some code based on Ulrich Drepper's glibc changes.
9339
9340         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9341         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9342         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9343         before falling back on save_cwd and restore_cwd.
9344         (fdopendir, fstatat, unlinkat): Likewise.
9345
9346         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9347         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9348
9349         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9350         as second argument to va_arg.  Otherwise, some versions of gcc
9351         warn that `if this code is reached, the program will abort'.
9352
9353 2006-01-09  Jim Meyering  <jim@meyering.net>
9354
9355         Sync from coreutils.
9356         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9357         Require openat-priv.h.
9358
9359 2006-01-09  Bruno Haible  <bruno@clisp.org>
9360
9361         * modules/strnlen (Include): Use strnlen.h.
9362
9363 2006-01-09  Bruno Haible  <bruno@clisp.org>
9364
9365         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9366
9367 2006-01-09  Bruno Haible  <bruno@clisp.org>
9368
9369         * lib/sysexit_.h (EX_OK): New macro.
9370         Suggested by Martin Lambers <marlam@marlam.de>.
9371
9372 2006-01-09  Bruno Haible  <bruno@clisp.org>
9373
9374         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9375         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9376
9377 2006-01-09  Bruno Haible  <bruno@clisp.org>
9378
9379         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9380         numbers.
9381
9382 2006-01-09  Bruno Haible  <bruno@clisp.org>
9383
9384         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9385         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9386         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9387         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9388
9389 2006-01-09  Bruno Haible  <bruno@clisp.org>
9390
9391         * build-aux/javacomp.sh.in: New file, moved from lib/.
9392         * modules/javacomp-script (Files): Update.
9393         (configure.ac): Add AC_CONFIG_FILES invocation.
9394         (EXTRA_DIST): Remove variable.
9395
9396         * build-aux/javaexec.sh.in: New file, moved from lib/.
9397         * modules/javaexec (Files): Update.
9398         (configure.ac): Add AC_CONFIG_FILES invocation.
9399         (EXTRA_DIST): Remove javaexec.sh.in.
9400
9401         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9402         * modules/csharpcomp-script (Files): Update.
9403         (configure.ac): Add AC_CONFIG_FILES invocation.
9404         (EXTRA_DIST): Remove variable.
9405
9406         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9407         * modules/csharpexec (Files): Update.
9408         (configure.ac): Add AC_CONFIG_FILES invocation.
9409         (EXTRA_DIST): Remove csharpexec.sh.in.
9410
9411 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9412
9413         Sync from coreutils.
9414
9415         Add POSIX ACL support
9416         * lib/acl.h (copy_acl, set_acl): Add declarations.
9417         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9418         systems other than Linux.
9419         (chmod_or_fchmod): New function: use fchmod when possible,
9420         and chmod otherwise.
9421         (file_has_acl): Add a POSIX ACL implementation, with a
9422         Linux-specific subcase.
9423         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9424         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9425         acls are unsupported.
9426         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9427         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9428         are unsupported.
9429
9430 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9431
9432         Sync from coreutils.
9433         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9434
9435 2006-01-07  Bruno Haible  <bruno@clisp.org>
9436
9437         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9438         gl_EARLY.
9439
9440 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9441
9442         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9443         Problem reported for Mingw by Mark Junker.
9444
9445 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9446
9447         * README: Gnulib normally doesn't generate a tarball.
9448
9449 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9450
9451         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9452         long int, not int, for nanosecond counts, so that people who are
9453         used to POSIX struct timespec won't be surprised.  Reported by Jim
9454         Meyering.
9455
9456 2005-12-28  Bruno Haible  <bruno@clisp.org>
9457
9458         * build-aux/config.rpath: Update from GNU gettext.
9459
9460 2005-12-16  Jim Meyering  <jim@meyering.net>
9461
9462         * modules/fprintftime: New module.
9463         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
9464
9465 2005-12-16  Jim Meyering  <jim@meyering.net>
9466
9467         * m4/fprintftime.m4: New file.
9468
9469 2005-12-16  Jim Meyering  <jim@meyering.net>
9470
9471         * lib/fprintftime.c, lib/fprintftime.h: New files.
9472
9473 2005-12-15  Simon Josefsson  <jas@extundo.com>
9474
9475         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9476         new m4/socklen.m4.
9477
9478 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9479
9480         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9481         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9482
9483 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9484
9485         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
9486         * lib/argp-help.c (fill_in_uparams): Check if the constructed
9487         struct uparams is valid. Fall back to the default values if it is
9488         not.
9489
9490 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9491
9492         * modules/argp (Files): Add argp-pin.c
9493         (Depends-on): dirname
9494         (lib_SOURCES): Add argp-pin.c
9495
9496 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9497
9498         * m4/argp.m4:  Check if program_invocation_name and
9499         program_invocation_short_name are declared and define appropriate
9500         macros if they are not.
9501
9502 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9503
9504         * lib/argp-help.c (__argp_base_name): New function
9505         (__argp_short_program_name): Rewrite using __argp_base_name
9506         * lib/argp-namefrob.h: Define program_invocation_name and
9507         program_invocation_short_name if requested
9508         (__argp_base_name): Add prototype
9509         * lib/argp-parse.c (argp_def): Use gettext wrappers
9510         (argp_default_parser): Use __argp_base_name
9511         * lib/argp-pin.c: New file. Defines program_invocation_name and
9512         program_invocation_short_name on systems that lack them.
9513
9514 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9515
9516         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
9517         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9518         porting problem reported by Georg Schwarz in
9519         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9520
9521 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9522
9523         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
9524         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9525         porting problem reported by Georg Schwarz in
9526         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9527
9528 2005-12-05  Bruno Haible  <bruno@clisp.org>
9529
9530         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9531         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9532         Reported by Mark Junker <mjscod@gmx.de>.
9533
9534 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9535
9536         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9537         Use implementation from Albert Chin, with some
9538         comments/corrections by Stepan Kasal and myself.
9539
9540 2005-12-02  Bruno Haible  <bruno@clisp.org>
9541
9542         * gnulib-tool (func_import): Accept GPLed build tool modules when
9543         --lgpl is given.
9544         * modules/csharpcomp-script: New file.
9545         * modules/csharpcomp: Depend on it.
9546         * modules/javacomp-script: New file.
9547         * modules/javacomp: Depend on it.
9548         Suggested by Simon Josefsson.
9549
9550 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9551
9552         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9553         statement, to work around an HP-UX 10.20 compiler bug reported by
9554         Peter O'Gorman.
9555
9556 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9557
9558         * modules/savedir (Depends-on): Add openat.
9559
9560 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9561
9562         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9563         (uintmax_t) [defined uintmax_t]: Do not declare.
9564         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9565         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9566         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9567         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9568         sake of portability to weird hosts that C allows (though we don't
9569         know of any practical examples).
9570
9571         * lib/savedir.h (fdsavedir): New decl.
9572         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9573         contains most of the former guts of savedir.
9574         (savedir): Use savedirstream.
9575         Include "openat.h".
9576
9577 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9578
9579         * modules/obstack (Files): Add m4/ulonglong.m4.
9580         Problem reported by Davide Angelocola.
9581
9582 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9583
9584         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9585         coreutils no longer futzes with rounding modes.
9586
9587 2005-11-14  Jim Meyering  <jim@meyering.net>
9588
9589         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9590         replacement of mkstemp.
9591
9592 2005-11-10  Simon Josefsson  <jas@extundo.com>
9593
9594         * lib/readline.c: Remove EOL.
9595
9596 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9597
9598         * modules/gethrxtime (Depends-on): Add gettime.
9599
9600 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9601
9602         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9603         or gettimeofday; no longer needed.
9604
9605 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9606
9607         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9608         time business.
9609         (gethrxtime) [! (HAVE_NANOUPTIME
9610         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9611         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9612         our own approximation.
9613
9614 2005-11-08  Eric Blake  <ebb9@byu.net>
9615
9616         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9617
9618 2005-11-08  Eric Blake  <ebb9@byu.net>
9619
9620         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9621
9622 2005-11-04  Bruno Haible  <bruno@clisp.org>
9623
9624         * gnulib-tool: Implement --update mode.
9625
9626 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9627
9628         Fix porting problem reported by Theodoros V. Kalamatianos.
9629         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9630         Don't assume that futimes failing means we must fail.
9631
9632 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9633
9634         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9635         variables to suggest the intended function of the PATH_MAX check.
9636
9637 2005-10-30  Kean Johnston  <jkj@sco.com>
9638
9639         Trivial changes to support SCO systems.
9640         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9641         as PATH_MAX.
9642         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9643         where __ptr is null when no I/O is pending.
9644
9645 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9646
9647         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9648         leave errno alone.  Problem reported by Dmitry V. Levin.
9649
9650 2005-10-28  Simon Josefsson  <jas@extundo.com>
9651
9652         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9653         Test more.
9654
9655         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9656
9657         * modules/md2, modules/md2-tests: New files.
9658
9659 2005-10-28  Simon Josefsson  <jas@extundo.com>
9660
9661         * m4/inet_ntop.m4: More tests.
9662
9663         * m4/gc-md2.m4, md2.m4: New file.
9664
9665 2005-10-28  Simon Josefsson  <jas@extundo.com>
9666
9667         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9668         "restrict" keywords, as per POSIX.  Protect the function
9669         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9670         Don't use K&R prototypes.  Check the sprintf return values.
9671         Re-define EAFNOSUPPORT if not present.  Indent.
9672
9673         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9674         suggested by Bruno Haible <bruno@clisp.org>.
9675
9676         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9677
9678         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9679
9680         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9681         libgcrypt).
9682
9683         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9684
9685         * lib/md2.h, lib/md2.c: New files.
9686
9687 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9688
9689         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9690         errno alone.  Problem reported by Frederic Jolliton.
9691
9692 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9693
9694         * modules/verify (License): Change from GPL to LGPL.  This is a
9695         tiny module and there are apparently near-equivalents that are
9696         under the BSD license.
9697
9698 2005-10-24  Simon Josefsson  <jas@extundo.com>
9699
9700         * modules/sha1: Relicense to LGPL.
9701
9702 2005-10-24  Simon Josefsson  <jas@extundo.com>
9703
9704         * lib/md4.h: Shrink buffer size, now that we changed the type.
9705
9706 2005-10-23  Simon Josefsson  <jas@extundo.com>
9707
9708         * gnulib-tool (func_import): Fix --tests-base.
9709
9710 2005-10-22  Simon Josefsson  <jas@extundo.com>
9711
9712         * modules/arcfour (Depends-on): Need stdint.
9713
9714 2005-10-22  Simon Josefsson  <jas@extundo.com>
9715
9716         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9717         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9718
9719 2005-10-22  Simon Josefsson  <jas@extundo.com>
9720
9721         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9722         suggested by Bruno Haible <bruno@clisp.org>.
9723
9724 2005-10-22  Simon Josefsson  <jas@extundo.com>
9725
9726         * lib/crc.h: Include stddef.h, for size_t.
9727
9728 2005-10-22  Simon Josefsson  <jas@extundo.com>
9729
9730         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9731         arcfour_context struct (simplify test vector testing in GNU
9732         Shishi).
9733
9734 2005-10-21  Simon Josefsson  <jas@extundo.com>
9735
9736         * modules/des, modules/des-tests: New files.
9737
9738         * modules/gc-des, modules/gc-des-tests: New files.
9739
9740         * tests/test-des.c, tests/test-gc-des.c: New file.
9741
9742 2005-10-21  Simon Josefsson  <jas@extundo.com>
9743
9744         * modules/arctwo, modules/arctwo-tests: New files.
9745
9746         * tests/test-arctwo.c: New file.
9747
9748         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9749
9750         * tests/test-gc-arctwo.c: New file.
9751
9752 2005-10-21  Simon Josefsson  <jas@extundo.com>
9753
9754         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9755         Bruno Haible <bruno@clisp.org>.
9756
9757         * m4/gc-des.m4: New file.
9758
9759 2005-10-21  Simon Josefsson  <jas@extundo.com>
9760
9761         * m4/arctwo.m4: New file.
9762
9763         * m4/gc-arctwo.m4: New file.
9764
9765 2005-10-21  Simon Josefsson  <jas@extundo.com>
9766
9767         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9768         block.
9769
9770 2005-10-21  Simon Josefsson  <jas@extundo.com>
9771
9772         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9773         <bruno@clisp.org>.
9774
9775         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9776
9777         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9778         Bruno Haible <bruno@clisp.org>.
9779
9780         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9781         <bruno@clisp.org>.
9782
9783 2005-10-21  Simon Josefsson  <jas@extundo.com>
9784
9785         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9786
9787 2005-10-21  Simon Josefsson  <jas@extundo.com>
9788
9789         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9790
9791 2005-10-21  Simon Josefsson  <jas@extundo.com>
9792
9793         * lib/des.h, lib/des.c: New files.
9794
9795         * lib/gc-gnulib.c: Support DES.c
9796
9797 2005-10-21  Simon Josefsson  <jas@extundo.com>
9798
9799         * lib/arctwo.h, lib/arctwo.c: New files.
9800
9801         * lib/gc-gnulib.c: Support ARCTWO.
9802
9803 2005-10-21  Simon Josefsson  <jas@extundo.com>
9804
9805         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
9806         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9807
9808 2005-10-21  Simon Josefsson  <jas@extundo.com>
9809
9810         * gnulib-tool (func_import, func_create_testdir): Define automake
9811         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
9812         Makefile.am snippet),
9813         suggested by Bruno Haible <bruno@clisp.org>.
9814
9815         * modules/gc (Makefile.am): Use it.
9816
9817 2005-10-21  Bruno Haible  <bruno@clisp.org>
9818
9819         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
9820         patch.
9821
9822 2005-10-19  Simon Josefsson  <jas@extundo.com>
9823
9824         * tests/test-gc-rijndael.c: New file.
9825
9826         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
9827
9828 2005-10-19  Simon Josefsson  <jas@extundo.com>
9829
9830         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
9831         interface too.
9832
9833 2005-10-19  Simon Josefsson  <jas@extundo.com>
9834
9835         * tests/test-gc-arcfour.c: New file.
9836
9837         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
9838
9839 2005-10-19  Simon Josefsson  <jas@extundo.com>
9840
9841         * modules/gc-md4, modules/gc-md4-tests: New file.
9842
9843         * tests/test-gc-md4.c: New file.
9844
9845 2005-10-19  Simon Josefsson  <jas@extundo.com>
9846
9847         * m4/gc-md4.m4: New file.
9848
9849 2005-10-19  Simon Josefsson  <jas@extundo.com>
9850
9851         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
9852         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
9853         <kasal@ucw.cz>.
9854
9855 2005-10-19  Simon Josefsson  <jas@extundo.com>
9856
9857         * m4/gc-arcfour.m4: New file.
9858
9859         * m4/gc-rijndael.m4: New file.
9860
9861 2005-10-19  Simon Josefsson  <jas@extundo.com>
9862
9863         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
9864
9865 2005-10-19  Simon Josefsson  <jas@extundo.com>
9866
9867         * lib/gc-gnulib.c: Support ARCFOUR.
9868
9869 2005-10-19  Simon Josefsson  <jas@extundo.com>
9870
9871         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
9872         support.
9873
9874         * lib/gc.h: Add ECB enum type.
9875
9876         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
9877
9878 2005-10-18  Simon Josefsson  <jas@extundo.com>
9879
9880         * tests/test-md5.c: New file.
9881
9882         * modules/md5-tests: New file.
9883
9884 2005-10-18  Simon Josefsson  <jas@extundo.com>
9885
9886         * tests/test-md4.c: New file.
9887
9888         * modules/md4, modules/md4-tests: New files.
9889
9890 2005-10-18  Simon Josefsson  <jas@extundo.com>
9891
9892         * m4/md4.m4: New file.
9893
9894 2005-10-18  Simon Josefsson  <jas@extundo.com>
9895
9896         * lib/md4.h, lib/md4.c: New files, based on md5.?.
9897
9898 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
9899
9900         * gnulib-tool (func_create_testdir): Omit the second check whether
9901         BUILT_SOURCES in nonempty.
9902
9903 2005-10-17  Simon Josefsson  <jas@extundo.com>
9904
9905         * tests/test-rijndael.c: New file.
9906
9907 2005-10-17  Simon Josefsson  <jas@extundo.com>
9908
9909         * modules/sha1: Depend on stdint instead of md5.
9910
9911         * modules/md5: Depend on stdint, remove uint32_t.
9912
9913 2005-10-17  Simon Josefsson  <jas@extundo.com>
9914
9915         * modules/gc-sha1-tests: New file.
9916
9917         * tests/test-gc-sha1.c: New file.
9918
9919 2005-10-17  Simon Josefsson  <jas@extundo.com>
9920
9921         * m4/md5.m4: Remove call to uint32_t.m4.
9922
9923 2005-10-17  Simon Josefsson  <jas@extundo.com>
9924
9925         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
9926
9927         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
9928         md5.h.
9929
9930         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
9931
9932         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
9933
9934 2005-10-17  Simon Josefsson  <jas@extundo.com>
9935
9936         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
9937
9938 2005-10-17  Simon Josefsson  <jas@extundo.com>
9939
9940         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
9941
9942 2005-10-17  Simon Josefsson  <jas@extundo.com>
9943
9944         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
9945
9946         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
9947
9948 2005-10-17  Bruno Haible  <bruno@clisp.org>
9949
9950         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
9951         that it can also be used in a test.
9952
9953 2005-10-16  Bruno Haible  <bruno@clisp.org>
9954
9955         * gnulib-tool (func_emit_tests_Makefile_am): Also define
9956         TESTS_ENVIRONMENT, so that individual tests can augment it.
9957
9958         * gnulib-tool (func_create_testdir): Use an intermediate target for
9959         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
9960         macros, like $(ALLOCA_H), which cannot be passed through the command
9961         line.
9962
9963 2005-10-15  Simon Josefsson  <jas@extundo.com>
9964
9965         * modules/rijndael-tests: New file.
9966
9967         * modules/rijndael: New file.
9968
9969 2005-10-15  Simon Josefsson  <jas@extundo.com>
9970
9971         * m4/rijndael.m4: New file.
9972
9973 2005-10-15  Simon Josefsson  <jas@extundo.com>
9974
9975         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
9976
9977         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
9978
9979 2005-10-14  Simon Josefsson  <jas@extundo.com>
9980
9981         * tests/test-arcfour.c: New file.
9982
9983         * modules/arcfour, modules/arcfour-tests: New files.
9984
9985 2005-10-14  Simon Josefsson  <jas@extundo.com>
9986
9987         * m4/arcfour.m4: New file.
9988
9989 2005-10-14  Simon Josefsson  <jas@extundo.com>
9990
9991         * lib/arcfour.h, lib/arcfour.c: New files.
9992
9993 2005-10-14  Roland McGrath  <roland@redhat.com>
9994
9995         Import from libc.  [BZ #1331]
9996         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
9997         macro argument.
9998         Reported by Matej Vela <vela@debian.org>.
9999
10000 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10001
10002         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
10003         include <wchar.h>; no longer needed.
10004
10005 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10006
10007         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
10008
10009 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
10010         and  Ulrich Drepper  <drepper@redhat.com>
10011
10012         Import from libc.
10013         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
10014         instead of inline stream orientation test and two separate
10015         function calls.  Pay no attention to USE_IN_LIBIO.
10016
10017 2005-10-13  Simon Josefsson  <jas@extundo.com>
10018
10019         * modules/gc-hmac-md5-tests: New file.
10020
10021         * tests/test-gc-hmac-sha1.c: New file.
10022
10023         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
10024
10025         * modules/gc-hmac-md5-tests: New file.
10026
10027         * tests/test-gc-md5.c: New file.
10028
10029         * modules/gc-md5-tests: New file.
10030
10031 2005-10-13  Simon Josefsson  <jas@extundo.com>
10032
10033         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
10034         Move memory allocation outside of loop.
10035
10036 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
10037
10038         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
10039         intermediate directory is in a read-only file system.  Problem
10040         reported by Eric Blake.
10041
10042 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
10043
10044         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10045
10046 2005-10-12  Simon Josefsson  <jas@extundo.com>
10047
10048         * tests/test-hmac-sha1.c: New file.
10049
10050         * modules/hmac-sha1-tests: New file.
10051
10052         * modules/hmac-sha1: New file.
10053
10054 2005-10-12  Simon Josefsson  <jas@extundo.com>
10055
10056         * modules/gc-sha1: New file.
10057
10058 2005-10-12  Simon Josefsson  <jas@extundo.com>
10059
10060         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10061
10062         * tests/test-gc-pbkdf2-sha1.c: New file.
10063
10064 2005-10-12  Simon Josefsson  <jas@extundo.com>
10065
10066         * modules/gc-md5, modules/gc-hmac-md5: New files.
10067
10068         * modules/gc (Files): Remove md5, memxor and hmac files.
10069
10070 2005-10-12  Simon Josefsson  <jas@extundo.com>
10071
10072         * m4/gc-pbkdf2-sha1.m4: New file.
10073
10074         * m4/gc-hmac-sha1.m4: New file.
10075
10076         * m4/gc-sha1: New file.
10077
10078         * m4/hmac-sha1.m4: New file.
10079
10080 2005-10-12  Simon Josefsson  <jas@extundo.com>
10081
10082         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10083
10084         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
10085
10086 2005-10-12  Simon Josefsson  <jas@extundo.com>
10087
10088         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
10089         suggested by Bruno Haible <bruno@clisp.org>.
10090
10091 2005-10-12  Simon Josefsson  <jas@extundo.com>
10092
10093         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
10094
10095 2005-10-12  Simon Josefsson  <jas@extundo.com>
10096
10097         * lib/gc-pbkdf2-sha1.c: New file.
10098
10099         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
10100
10101 2005-10-12  Simon Josefsson  <jas@extundo.com>
10102
10103         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
10104
10105         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
10106
10107 2005-10-12  Simon Josefsson  <jas@extundo.com>
10108
10109         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
10110         GC_USE_HMAC_MD5, respectively.
10111
10112         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
10113         (gc_md5): Fix typo.
10114
10115         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
10116
10117         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
10118
10119         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
10120
10121 2005-10-12  Bruno Haible  <bruno@clisp.org>
10122
10123         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
10124         Reported by Stepan Kasal <kasal@ucw.cz>.
10125
10126 2005-10-11  Simon Josefsson  <jas@extundo.com>
10127
10128         * tests/test-crc.c: New file.
10129
10130         * modules/crc, modules/crc-tests: New files.
10131
10132 2005-10-11  Simon Josefsson  <jas@extundo.com>
10133
10134         * m4/crc.m4: New file.
10135
10136 2005-10-11  Simon Josefsson  <jas@extundo.com>
10137
10138         * lib/gc.h: Add gc_hash and gc_hash_buffer.
10139
10140         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
10141
10142         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
10143
10144 2005-10-11  Simon Josefsson  <jas@extundo.com>
10145
10146         * lib/crc.h, lib/crc.c: New files.
10147
10148         * lib/gc.h (gc_hash_buffer): Add doc.
10149
10150 2005-10-11  Bruno Haible  <bruno@clisp.org>
10151
10152         * modules/c-strcasestr: New file.
10153         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
10154
10155 2005-10-11  Bruno Haible  <bruno@clisp.org>
10156
10157         * modules/c-strcase: New file.
10158         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
10159
10160 2005-10-11  Bruno Haible  <bruno@clisp.org>
10161
10162         * lib/strcasecmp.c: Include limits.h.
10163         (strcasecmp): Avoid integer overflow on exotic platforms.
10164         * lib/strncasecmp.c: Include limits.h.
10165         (strncasecmp): Avoid integer overflow on exotic platforms.
10166         Reported by Paul Eggert.
10167
10168 2005-10-11  Bruno Haible  <bruno@clisp.org>
10169
10170         * lib/c-strcasestr.h: New file, from GNU gettext.
10171         * lib/c-strcasestr.c: New file, from GNU gettext.
10172
10173 2005-10-11  Bruno Haible  <bruno@clisp.org>
10174
10175         * lib/c-strcase.h: New file, from GNU gettext.
10176         * lib/c-strcasecmp.c: New file, from GNU gettext.
10177         * lib/c-strncasecmp.c: New file, from GNU gettext.
10178
10179 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10180
10181         * modules/mempcpy (License): GPL -> LGPL.
10182         * modules/strchrnul (License): Likewise.
10183         * modules/sysexits (License): Likewise.
10184
10185 2005-10-08  Simon Josefsson  <jas@extundo.com>
10186
10187         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
10188
10189 2005-10-07  Simon Josefsson  <jas@extundo.com>
10190
10191         * m4/memxor.m4: Remove gl_C_RESTRICT call.
10192
10193 2005-10-06  Simon Josefsson  <jas@extundo.com>
10194
10195         * tests/test-hmac-md5.c: New file.
10196
10197         * modules/hmac-md5-tests: New file.
10198
10199         * modules/hmac-md5: New file.
10200
10201 2005-10-06  Simon Josefsson  <jas@extundo.com>
10202
10203         * m4/hmac-md5.m4: New file.
10204
10205         * m4/memxor.m4: Require gl_C_RESTRICT.
10206
10207 2005-10-06  Simon Josefsson  <jas@extundo.com>
10208
10209         * lib/memxor.c (memxor): Avoid casts and warnings.
10210
10211 2005-10-06  Simon Josefsson  <jas@extundo.com>
10212
10213         * lib/hmac-md5.c: New file.
10214
10215         * lib/hmac.h: New file.
10216
10217 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10218
10219         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
10220         promotes to int, not unsigned int, to catch the AIX 5.3
10221         compiler bug.
10222
10223 2005-10-05  Simon Josefsson  <jas@extundo.com>
10224
10225         * modules/memxor: New file.
10226
10227         * modules/iconv (Files): Move config.rpath to havelib, it is used
10228         there.
10229
10230         * modules/havelib (Files): Add config.rpath.
10231
10232 2005-10-05  Simon Josefsson  <jas@extundo.com>
10233
10234         * m4/memxor.m4: New file.
10235
10236 2005-10-05  Simon Josefsson  <jas@extundo.com>
10237
10238         * lib/memxor.c (memxor): Fix compiler error.
10239
10240         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
10241         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
10242
10243         * lib/memxor.h, lib/memxor.c: New files.
10244
10245         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
10246         we assume all systems have it, suggested by Jim Meyering
10247         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
10248         any systems lack sys/socket.h; mingw32 is known to lack it, but we
10249         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
10250         same reasons.
10251
10252 2005-10-05  Simon Josefsson  <jas@extundo.com>
10253
10254         * config/srclist.txt: Add glibc bug 1423 for md5.h.
10255
10256 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10257
10258         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
10259         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
10260         needed, since the source code now assumes these .h files.
10261
10262 2005-10-05  Derek Price  <derek@ximbiot.com>
10263
10264         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
10265
10266 2005-10-05  Bruno Haible  <bruno@clisp.org>
10267
10268         * modules/stdint (License): Change to LGPL.
10269
10270 2005-10-04  Simon Josefsson  <jas@extundo.com>
10271
10272         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
10273         D. Baushke" <mdb@gnu.org>.
10274
10275 2005-10-04  Bruno Haible  <bruno@clisp.org>
10276
10277         * lib/verify.h (verify_true): Provide alternative definition for C++.
10278
10279 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
10280
10281         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
10282         (SSIZE_MAX): New macro, if not already defined.
10283         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
10284         than 2 GiB.
10285
10286 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10287
10288         Sync from coreutils.
10289         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
10290         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
10291         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
10292         ULLONG_MAX doesn't work with 2.7.2.1.
10293
10294 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10295
10296         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
10297         From Ben Pfaff.
10298
10299         * modules/exclude (Depends-on): Depend on verify.
10300         * modules/strtoimax (Depends-on): Likewise.
10301         * modules/utimecmp (Depends-on): Likewise.
10302
10303 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10304
10305         * lib/exclude.c: Include verify.h.
10306         (verify): Remove.  All callers changed to use verify.h's version.
10307         * lib/strtoimax.c: Likewise.
10308         * lib/utimecmp.c: Likewis.e
10309
10310         Sync from coreutils.
10311         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
10312         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
10313         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
10314         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
10315         bother returning ENOSYS if settimeofday or stime fails; just let
10316         them return whatever errno they want to return.
10317         * lib/utimens.c: Include unistd.h, for dup2.
10318         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10319         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10320
10321 2005-10-02  Jim Meyering  <jim@meyering.net>
10322
10323         Sync from coreutils.
10324         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10325         from glibc-2.2.5 that fails for read-only files.
10326
10327 2005-10-02  Jim Meyering  <jim@meyering.net>
10328
10329         Sync from coreutils.
10330         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10331         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10332         `#if HAVE_CONFIG_H'.
10333         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10334         Remove AT_FDCWD test.
10335         Do not consume the fd unless successful.
10336         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10337         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10338         block, so that we don't even try to compile it if settimeofday is
10339         available.  This works around a compilation failure on OSF1 V5.1,
10340         due to stime requiring a `long int*' while tv_sec is `int'.
10341
10342 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10343
10344         Sync from coreutils.
10345         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10346         against `yes', rather than just testing for nonempty.
10347
10348 2005-10-01  Simon Josefsson  <jas@extundo.com>
10349
10350         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10351         and Darwin.
10352
10353         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10354         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10355         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10356         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10357         Check if struct addrinfo is declared.
10358
10359 2005-10-01  Simon Josefsson  <jas@extundo.com>
10360
10361         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10362         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10363         AI_* and EAI_* definitions.  Protect function declarations.
10364
10365 2005-10-01  Jim Meyering  <jim@meyering.net>
10366
10367         Sync from coreutils.
10368
10369         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10370         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10371         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10372         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10373         in the inet and nsl libraries.  Required on Solaris 5.7.
10374
10375 2005-10-01  Jim Meyering  <jim@meyering.net>
10376
10377         Sync from coreutils.
10378         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10379         in the inet and nsl libraries.  Required on Solaris 5.7.
10380
10381 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10382
10383         * lib/getdelim.c (getdelim): Remove unused variables.
10384
10385 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10386
10387         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10388         so that the code works even with ancient cpp.  Portability problem
10389         with GCC 2.7.2.1 reported by Thomas M.Ott.
10390
10391 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10392
10393         * modules/regex (Depends-on): Add strcase.
10394
10395         * modules/gethostname (Licence): Change from GPL to LGPL, since
10396         gethostname.c is a trivial implementation of a standard library
10397         function.
10398         * modules/poll (License): Change from GPL to LGPL, since it's
10399         derived from LGPL code.
10400
10401 2005-09-27  Jim Meyering  <jim@meyering.net>
10402
10403         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10404         HAVE_CONFIG_H.
10405
10406         * lib/intprops.h (signed_type_or_expr__): Define.
10407         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10408         for unsigned types.
10409
10410 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10411
10412         * lib/verify.h (verify_expr): Remove, replacing with:
10413         (verify_true): New macro that returns true instead of void.
10414         (verify_type__): Remove.
10415         (verify): Use verify_true rather than verify_type__.
10416
10417 2005-09-26  Bruno Haible  <bruno@clisp.org>
10418
10419         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10420         is necessary.
10421         (lib_SOURCES): Remove mbchar.c.
10422         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10423         (Files): Add m4/mbrtowc.m4.
10424         * modules/mbiter: Likewise.
10425         * modules/mbuiter: Likewise.
10426
10427 2005-09-26  Bruno Haible  <bruno@clisp.org>
10428
10429         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10430         compile mbchar.c if they are not both present.
10431         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10432         * m4/mbiter.m4 (gl_MBITER): Likewise.
10433         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10434         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10435         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10436
10437 2005-09-25  Jim Meyering  <jim@meyering.net>
10438
10439         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10440         also uses socklen_t.
10441
10442 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10443
10444         * lib/utimens.c (ENOSYS): Define if not already defined.
10445         (futimens): Support having a null PATH if the file descriptor
10446         is nonnegative.
10447
10448         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10449         Remove.
10450         (__attribute): Define to empty unless GCC 3.1 or later.
10451         This works around a core dump on OpenBSD 3.4, which has GCC
10452         2.95.3, which dumps core when given __attribute__(()).  It also
10453         simplifies other tests, since we really don't want to bother with
10454         worrying about which ancient version of GCC supported what.
10455         Original problem reported by Yoann Vandoorselaere, with part of
10456         the fix suggested by Derek Price.
10457
10458 2005-09-24  Jim Meyering  <jim@meyering.net>
10459
10460         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
10461         so we can once again use a positive bitfield width of 1 -- now we
10462         don't have to explain why we were using a bitfield width of 2.
10463
10464 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10465
10466         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10467         and similarly for the other external symbols.  Problem reported
10468         by James Gallager.
10469
10470         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10471         bug reported by Jim Meyering.
10472
10473         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10474         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10475         not needed, since socklen is a prerequisite module.
10476
10477 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10478
10479         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10480         Problem reported by Eric Blake.
10481         (getaddrinfo): Initialize se so that it's not garbage.
10482         Redo internal storage allocation so that it doesn't make unportable
10483         assumptions about alignment.
10484         Fix a memory leak.
10485
10486         * lib/utimens.c (futimens): Use futimesat if available.
10487         Prefer it to futimes since it doesn't have the futimes bug.
10488
10489         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
10490         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
10491         Instead, declare a function that returns a pointer to an array,
10492         and use verify_type__ to declare the size of the array.
10493         Problem and germ of a solution reported by Bruno Haible.
10494         (verify_type__): Use 2, not 1, for bitfield size, to avoid
10495         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
10496
10497 2005-09-23  Jim Meyering  <jim@meyering.net>
10498
10499         Sync from coreutils.
10500         Correct build failure (socklen_t not defined) on at least
10501         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
10502         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
10503
10504 2005-09-23  Jim Meyering  <jim@meyering.net>
10505
10506         * modules/getaddrinfo (Depends-on): Add socklen.
10507
10508 2005-09-23  Bruno Haible  <bruno@clisp.org>
10509
10510         * tests/test-verify.c: New file.
10511
10512 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10513
10514         Sync from coreutils.
10515
10516         * modules/argmatch (Depends-on): Add verify.
10517         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
10518         unistd-safer.
10519         * modules/save-cwd (Depends-on): Likewise.
10520
10521         * modules/openat (Files): Add lib/openat-die.c.
10522         (Depends-on): Remove error, exitfail.
10523         Add dirname.
10524
10525         * modules/verify: New file.
10526         * MODULES.html.sh (Diagnostics <assert.h>): New section,
10527         with "verify" module.
10528
10529 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10530
10531         Sync from coreutils.
10532
10533         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10534         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10535         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10536         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10537         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10538         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10539         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10540         Don't bother checking for string.h, stdlib.h, unistd.h.
10541         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10542         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10543         module's job.
10544         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10545         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10546
10547         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10548         (gl_GETDATE): Use it.
10549
10550         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10551
10552 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10553
10554         Sync from coreutils.
10555
10556         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10557         stat-time.h.
10558         * lib/argmatch.h: Include verify.h
10559         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10560         (ARGMATCH_ASSERT): Remove; unused.
10561         * lib/canonicalize.c: Assume STDC_HEADERS.
10562         * lib/exclude.c: Include "strcase.h".
10563         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10564         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10565         and stdio-safer.h.
10566         (getusershell): Call fopen, not fopen_safer.
10567         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10568         Do not include unistd-safer.h.
10569         (save_cwd): Don't call fd_safer; no longer needed
10570         now that we include fcntl--.h.
10571
10572         * lib/getdate.y (relative_time): New type.
10573         (RELATIVE_TIME_0): New constant.
10574         (parser_control): Use relative_time instead of doing it ourselves.
10575         (%union): Add new relative_time rel member.
10576         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10577         Now typeless.
10578         (relunit, relunit_snumber): Now of type rel.
10579         (zone, rel, relunit, get_date): Adjust to above changes.
10580
10581         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10582         Do not include unistd-safer.h.
10583         (getloadavg): Don't call fd_safer; no longer needed
10584         now that we include fcntl--.h.
10585
10586         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10587         (make_dir_parents): Treat ENOSYS like EEXIST.
10588
10589         Improve quality of diagnostics on restore_cwd failure.
10590         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10591         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10592         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10593         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10594         each time through the loop.  Do not diagnose restore_cwd failure;
10595         that is the caller's job (and perhaps the caller does not care).
10596
10597         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10598         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10599         If the file already exists but is not a directory, don't bother
10600         to try to make its parents.
10601         Close potential file descriptor leak if we can't chdir("/") (!).
10602         Don't always return true if chdir($PWD) fails; return true only
10603         if the requested action was done successfully (except for the
10604         chdir($PWD)).
10605         Don't log final directory unless we actually made it.
10606         Refactor to avoid duplicate code to fix up permissions.
10607         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10608
10609         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10610         to make it a bit faster and (I hope) clearer.
10611         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10612         Fix bug in formats like %2N.
10613
10614         * lib/verify.h: New file.
10615
10616 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10617
10618         Sync from coreutils.
10619         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10620
10621 2005-09-22  Jim Meyering  <jim@meyering.net>
10622
10623         Sync from coreutils.
10624
10625         * m4/lstat.m4 (gl_FUNC_LSTAT):
10626         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10627         Remove obsolete comment.
10628         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10629         * m4/xstrtod.m4: Likewise.
10630
10631         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10632
10633 2005-09-22  Jim Meyering  <jim@meyering.net>
10634
10635         Sync from coreutils.
10636
10637         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10638
10639         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10640         the .tm_year member, since otherwise gcc-4.0 would now warn about
10641         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10642
10643         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10644         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10645
10646         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10647         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10648         when run in a time zone for which daylight savings time is in effect
10649         for the starting date.
10650
10651         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10652         stop us from restricting permissions of just-created absolute-named
10653         directories.
10654         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10655         to restore initial working directory.
10656         * lib/mkdir-p.c (make_dir_parents): New parameter:
10657         different_working_dir, to tell caller if/when we change the working
10658         directory and are unable to return to the initial one.
10659         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10660         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10661         `return false'.  This fixes a bug introduced on 2004-07-30.
10662
10663         * lib/openat.c (fdopendir): Be sure to close the supplied
10664         file descriptor before returning.  This makes our replacement
10665         implementation a little closer to Solaris's, where fdopendir
10666         ties the file descriptor to the returned DIR* pointer.
10667         * lib/openat.c (unlinkat): New function.
10668         * lib/openat.h (unlinkat): Add prototype.
10669         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10670         (openat_restore_fail): Rename from openat_restore_die.
10671         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10672
10673         Provide an alternative to exiting immediately upon save_cwd or
10674         restore_cwd failure.  Now, an application can arrange e.g.,
10675         to perform a longjump in that case.
10676         * lib/openat.c: Include dirname.h.
10677         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10678         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10679         and openat_restore_die rather than calling error directly.
10680         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10681
10682         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10683         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10684         define.
10685
10686         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10687         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10688                             int utc, int nanoseconds);
10689         Background:
10690         date should not have to allocate a megabyte of virtual memory to
10691         handle a format argument like +%1048575T.  When implemented with
10692         strftime, it must allocate such a buffer, use strftime to fill it
10693         in, print it, then free it.
10694         With fprintftime, it simply prints everything and exits.
10695         With no need for memory allocation, that's one fewer way to fail.
10696         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10697         optional field width, not before, so we accept %9:z, not %:9z.
10698         (my_strftime): Be sure to use L_('x') for literals.
10699
10700         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10701         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10702         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10703         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10704         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10705         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10706         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10707         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10708         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10709         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10710         * lib/xgethostname.c, lib/xreadlink.c:
10711         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10712
10713         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10714         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10715         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10716         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10717         and don't include <sys/file.h>).
10718
10719 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10720
10721         Sync from coreutils.
10722
10723         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10724         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10725         [!LDAV_DONE]: Avoid unused variable warning.
10726
10727 2005-09-21  Bruno Haible  <bruno@clisp.org>
10728
10729         * lib/unicodeio.h (unicode_to_mb): New declaration.
10730
10731 2005-09-20  Derek Price  <derek@ximbiot.com>
10732
10733         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10734         getaddrinfo.h.
10735
10736 2005-09-20  Bruno Haible  <bruno@clisp.org>
10737
10738         * gnulib-tool: Remove trailing slashes from the values specified for
10739         --source-base, --m4-base, --tests-base, --aux-dir.
10740         Suggested by Simon Josefsson <jas@extundo.com>.
10741
10742 2005-09-20  Bruno Haible  <bruno@clisp.org>
10743
10744         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10745         func_modules_to_filelist, func_import, func_create_testdir): Make all
10746         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10747         change when gnulib-tool is invoked in a different locale.
10748
10749 2005-09-19  Simon Josefsson  <jas@extundo.com>
10750
10751         * m4/socklen.m4: Fix typo.
10752
10753 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10754
10755         Use a consistent style for including <config.h>.
10756         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10757         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10758         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10759         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10760         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10761         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10762         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10763         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10764         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10765         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10766         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10767         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10768         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10769         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10770         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10771         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10772         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10773         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10774         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10775         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10776         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10777         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10778         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10779         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10780         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10781         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10782         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10783         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10784         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10785         lib/xstrtoumax.c, lib/yesno.c:
10786         Standardize inclusion of config.h.
10787         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10788         lib/inttostr.h:  Removed inclusion of config.h from header files.
10789         * lib/inttostr.c:  Adjusted in-tree users.
10790         * lib/timespec.h: Remove superfluous warning to include config.h.
10791         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10792         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10793         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10794         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10795         config.h with HAVE_CONFIG_H.
10796
10797 2005-09-19  Jim Meyering  <jim@meyering.net>
10798
10799         * modules/pathmax (License): Change to LGPL.
10800
10801 2005-09-19  Derek Price  <derek@ximbiot.com>
10802
10803         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
10804
10805 2005-09-19  Bruno Haible  <bruno@clisp.org>
10806
10807         * gnulib-tool (import): Provide default for --tests-base.
10808
10809 2005-09-19  Bruno Haible  <bruno@clisp.org>
10810
10811         * doc/quote.texi: New file, extracted from gnulib.texi.
10812         * doc/ctime.texi: New file, extracted from gnulib.texi.
10813         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
10814         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
10815         * doc/gnulib.texi: Include them.
10816
10817 2005-09-18  Bruno Haible  <bruno@clisp.org>
10818
10819         Portability fix.
10820         * gnulib-tool (func_readlink): New function.
10821         (func_ln_if_changed): Use it.
10822
10823 2005-09-18  Bruno Haible  <bruno@clisp.org>
10824
10825         * gnulib-tool: Support --with-tests also with --import.
10826         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
10827         (func_import): Use variables $testsbase and $inctests. Emit a
10828         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
10829         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
10830         SUBDIRS += $testsdir.
10831         (func_create_testdir): Update.
10832
10833 2005-09-18  Bruno Haible  <bruno@clisp.org>
10834
10835         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
10836         instead of $dry_run.
10837         (func_cp_if_changed, func_mv_if_changed): Remove functions.
10838         (func_ln_if_changed): Don't handle dry-run here.
10839         (func_import): In dry-run mode, detect more precisely which actions
10840         would be performed, and don't use "...ing" verbs.
10841
10842 2005-09-18  Bruno Haible  <bruno@clisp.org>
10843
10844         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
10845         (func_import): Use join on two temporary files instead of three nested
10846         loops, in order to determine which files are new or old.
10847
10848 2005-09-18  Bruno Haible  <bruno@clisp.org>
10849
10850         * gnulib-tool (func_import): Comment out code that spits out the
10851         new files with --dry-run.
10852
10853 2005-09-18  Bruno Haible  <bruno@clisp.org>
10854
10855         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
10856
10857 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10858
10859         * lib/stat-time.h: New file.
10860         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
10861         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
10862         in a different way.
10863         (timespec_cmp): New function.
10864         * lib/utimecmp.c: Include stat-time.h.
10865         (SYSCALL_RESOLUTION): Depend on whether various struct stat
10866         members exist, not on the obsolescent ST_MTIM_NSEC.
10867         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
10868
10869 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10870
10871         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
10872
10873 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10874
10875         * MODULES.html.sh (File system functions): Add stat-time.
10876         * modules/stat-time: New file.
10877         * modules/timespec (Files): Remove m4/st_mtim.m4; this
10878         is now done in a different way, by the stat-time module.
10879         * modules/utimecmp (Depends-on): Add stat-time.
10880
10881 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10882
10883         * m4/st_mtim.m4: Remove.  Superseded by...
10884         * m4/stat-time.m4: New file.
10885         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
10886         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
10887
10888 2005-09-15  Derek Price  <derek@ximbiot.com>
10889
10890         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
10891
10892 2005-09-15  Derek Price  <derek@ximbiot.com>
10893
10894         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
10895         * lib/regex_internal.c: Ditto, using this...
10896         (__GNUC_PREREQ): ...new macro.
10897         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
10898         using...
10899         (__GNUC_PREREQ): ...this new macro.
10900
10901         * lib/strstr.h: Include string.h. Define strstr as a macro here.
10902
10903 2005-09-15  Derek Price  <derek@ximbiot.com>
10904             Paul Eggert  <eggert@cs.ucla.edu>
10905
10906         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
10907         changes, consolidating in...
10908         * lib/regex_internal.h: ...this file.
10909
10910 2005-09-13  Jim Meyering  <jim@meyering.net>
10911
10912         * lib/canon-host.c: Filter through gnu indent and reword comments
10913         slightly.
10914         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
10915
10916 2005-09-13  Derek Price  <derek@ximbiot.com>
10917
10918         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
10919         failure.
10920         Reported by Jim Meyering  <jim@meyering.net>.
10921
10922 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10923
10924         * lib/base64.c: Typo.
10925         (base64_encode): Put b64str in initialized data section.
10926
10927 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
10928
10929         Merge glibc and coreutils changes into gnulib, plus a few
10930         extra fixes.
10931         * lib/md5.c: Use #error rather than a string.
10932         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
10933         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
10934         (__attribute__): Define to empty for non recent-GCC.
10935         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
10936         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
10937         Renamed from their non-__ counterparts, with new macros replacing
10938         them if not _LIBC.  Add __THROW attribute.
10939         (rol): Remove.
10940         (struct md5_ctx): Align buffer if using GCC.
10941         * lib/sha1.h (struct sha1_ctx): Likewise.
10942         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
10943         The old name was backwards.
10944         (NOTSWAP): Remove; not used.
10945         (rol): New macro, moved here from md5.h.
10946         (sha1_process_block): Remove a FIXME that doesn't make sense.
10947
10948 2005-09-12  Derek Price  <derek@ximbiot.com>
10949
10950         Return usable errors from canon-host.
10951         * lib/canon-host.h: New file.
10952         * lib/canon-host.c (canon_host): Wrap...
10953         (canon_host_r): ...this new function, which now relies exclusively on
10954         getaddrinfo.
10955         (ch_strerror): New function.
10956         (last_cherror): New global.
10957         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
10958         interface.
10959         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
10960         void *.
10961         (freeaddrinfo): Free ai->ai_canonname when set.
10962
10963 2005-09-12  Derek Price  <derek@ximbiot.com>
10964
10965         Make canon-host require getaddrinfo.
10966         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
10967         AC_LIBSOURCE canon-host.h.  Call...
10968         (gl_PREREQ_CANON_HOST): ...this new function, which requires
10969         gl_GETADDRINFO.
10970         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
10971
10972 2005-09-12  Derek Price  <derek@ximbiot.com>
10973
10974         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
10975         LGPL.
10976         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
10977
10978 2005-09-12  Derek Price  <derek@ximbiot.com>
10979
10980         * lib/gai_strerror.c: Include config.h when available.  Include
10981         getaddrinfo.h before other headers to test interface.
10982         Reported by Larry Jones <lawrence.jones@ugs.com>.
10983
10984 2005-09-12  Derek Price  <derek@ximbiot.com>
10985             Paul Eggert  <eggert@cs.ucla.edu>
10986
10987         * modules/glob (Files): Add glob-libc.h.
10988
10989 2005-09-12  Derek Price  <derek@ximbiot.com>
10990             Paul Eggert  <eggert@cs.ucla.edu>
10991
10992         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
10993         glob_.h, glob-libc.h.
10994         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
10995
10996 2005-09-12  Derek Price  <derek@ximbiot.com>
10997             Paul Eggert  <eggert@cs.ucla.edu>
10998
10999         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
11000         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
11001         protecting things that should be done only in gnulib contexts.
11002         * lib/glob_.h: New file, containing only the glob things needed for
11003         gnulib.
11004         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
11005         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
11006         (glob, globfree, glob_pattern_p): Now defined simply in terms of
11007         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
11008         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
11009         and to respect the namespace rules better.
11010
11011 2005-09-08  Simon Josefsson  <jas@extundo.com>
11012
11013         * modules/socklen: New file.
11014
11015 2005-09-08  Simon Josefsson  <jas@extundo.com>
11016
11017         * m4/socklen.m4: New file.
11018
11019 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11020
11021         * modules/utimens (Files): Add m4/utimbuf.m4, since
11022         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
11023         Reported by Sergey Poznyakoff.
11024
11025 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11026
11027         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
11028         definitions, since that's the preferred style in glibc.
11029         Fix a minor spacing issue, and update copyright notice to match
11030         glibc's.
11031
11032 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11033
11034         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
11035
11036 2005-09-06  Simon Josefsson  <jas@extundo.com>
11037
11038         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
11039         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
11040
11041 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11042
11043         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
11044         warning.
11045
11046 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11047
11048         * config/srclist.txt: Add glibc bug 1302.
11049
11050 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11051
11052         Change bitset word type from unsigned int to unsigned long int,
11053         as this has better performance on typical 64-bit hosts.
11054         Port bitset code to hosts with unusual word sizes.
11055         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11056         (build_collating_symbol):
11057         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11058         argument is a bitset.  This is merely a style issue, but it makes
11059         it clearer that an entire array is expected.
11060         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11061         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11062         Port to the case where bitset_word is not the same as unsigned int.
11063         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11064         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11065         Likewise.
11066         * lib/regexec.c (check_dst_limits_calc_pos_1,
11067         check_subexp_matching_top):
11068         (build_trtable, group_nodes_into_DFAstates):
11069         Likewise.
11070         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11071         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11072         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11073         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11074         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11075         * lib/regcomp.c (optimize_subexps, lower_subexp):
11076         Work even if bitset_word has holes in its bitwise representation.
11077         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11078         * lib/regexec.c (check_dst_limits_calc_pos_1,
11079         check_subexp_matching_top):
11080         Likewise.
11081         * lib/regex_internal.c (re_string_reconstruct):
11082         Don't assume UCHAR_MAX == 255.
11083         * lib/regex_internal.h (bitset_set_all): Likewise.
11084         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
11085         All uses changed.
11086         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
11087         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
11088         All uses changed.
11089         (BITSET_WORD_MAX): New macro.
11090         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
11091         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
11092         (bitset_empty, bitset_copy):
11093         Prefer sizeof (bitset) to multiplying it out ourselves.
11094         (bitset_not_merge): Remove; unused.
11095         (bitset_contain): Return bool, not unsigned int with one bit on.
11096         All callers changed.
11097         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
11098         alignment than re_node_set; do this by defining a new internal
11099         type struct dests_alloc and using it to allocate memory.
11100
11101 2005-09-05  Bruno Haible  <bruno@clisp.org>
11102
11103         * gnulib-tool (func_import): Fix comparison in handling of symbolic
11104         links.
11105
11106 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
11107
11108         * modules/size_max (Makefile.am): Add size_max.h
11109
11110 2005-09-04  Derek Price  <derek@ximbiot.com>
11111
11112         * gnulib-tool (func_import): Fix reversed $symbolic logic.
11113
11114 2005-09-03  Simon Josefsson  <jas@extundo.com>
11115
11116         * gnulib-tool: Fix typo.
11117
11118 2005-09-03  Simon Josefsson  <jas@extundo.com>
11119
11120         * config/srclist.txt: Add glibc bug 1293.
11121
11122 2005-09-03  Derek Price  <derek@ximbiot.com>
11123
11124         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
11125         From Larry Jones <lawrence.jones@ugs.com>.
11126
11127 2005-09-02  Simon Josefsson  <jas@extundo.com>
11128
11129         * modules/socklen: New file.
11130
11131 2005-09-02  Simon Josefsson  <jas@extundo.com>
11132
11133         * modules/havelib: New module.
11134
11135         * modules/gettext, modules/iconv, modules/lock, modules/readline:
11136         Use havelib.
11137
11138 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11139
11140         Check for arithmetic overflow when calculating sizes, to prevent
11141         some buffer-overflow issues.  These patches are conservative, in the
11142         sense that when I couldn't determine whether an overflow was possible,
11143         I inserted a run-time check.
11144         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
11145         macros.
11146         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
11147         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
11148         (re_xnrealloc, re_x2nrealloc): New inline functions.
11149         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
11150         parse_bracket_exp):
11151         (build_equiv_class, build_charclass): Check for arithmetic overflow
11152         in size expression calculations.
11153         * lib/regex_internal.c (re_string_realloc_buffers):
11154         (build_wcs_upper_buffer, re_node_set_add_intersect):
11155         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
11156         (re_dfa_add_node, register_state): Likewise.
11157         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
11158         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
11159         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
11160         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
11161
11162 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11163
11164         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
11165         m4/ulonglong.m4.  Problem reported by Martin Lambers.
11166
11167 2005-09-02  Bruno Haible  <bruno@clisp.org>
11168
11169         Support for lib vs. lib64 distinction on biarch platforms.
11170         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
11171         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
11172         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
11173
11174 2005-09-02  Bruno Haible  <bruno@clisp.org>
11175
11176         * gnulib-tool (import): In the other first-use case, provide defaults
11177         as well.
11178
11179 2005-09-02  Bruno Haible  <bruno@clisp.org>
11180
11181         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
11182         patches not yet found in the latest gettext release.
11183
11184 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11185
11186         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
11187         to avoid a collision with bits/local_lim.h in glibc.
11188         All uses changed.  Problem reported by Dmitry V. Levin in
11189         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
11190
11191         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
11192         bugs in int versus size_t comparisons.
11193         (re_string_context_at): Fix bug where the code assumed that
11194         Idx is signed.
11195
11196         Use bool where appropriate.
11197         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
11198         All callers changed.
11199         (calc_eclosure_iter): Likewise, for ROOT arg.
11200         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
11201         (build_charclass_op): Likewise, for NON_MATCH arg.
11202         * lib/regex_internal.c (re_string_allocate, re_string_construct):
11203         (re_string_construct_common): Likewise, for ICASE arg.
11204         * lib/regexec.c (re_search_2_stub, re_search_stub):
11205         Likewise, for RET_LEN arg.
11206         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
11207         (set_regs): Likewise, for FL_BACKTRACK arg.
11208         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
11209         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
11210         (calc_eclosure_iter, parse_bracket_exp):
11211         Use bool for internal variables that are booleans.
11212         * lib/regexec.c (re_search_internal, check_matching,
11213         proceed_next_node):
11214         (set_regs, build_sifted_states, sift_states_bkref):
11215         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
11216         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11217         (find_collation_sequence_value):
11218         Likewise.
11219         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
11220         (re_node_set_compare):
11221         Return bool, not int. All callers changed.
11222         * lib/regexec.c (check_halt_node_context, check_dst_limits):
11223         (build_trtable, check_node_accept): Likewise.
11224         * lib/regex_internal.h: Include stdbool.h.
11225
11226         Fix bugs uncovered when converting to bool.
11227         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
11228         failure instead of charging ahead blindly.
11229         * lib/regex_internal.c (register_state): Likewise.
11230         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
11231         for freeing internal storage.
11232         (group_nodes_into_DFA_states): Use unsigned int, not int, for
11233         bitset pieces used as boolean, to avoid undefined behavior
11234         on hosts that do int overflow checking.
11235
11236 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11237
11238         * config/srclist.txt: Add glibc bugs 1285-1287.
11239
11240 2005-09-01  Jim Meyering  <jim@meyering.net>
11241
11242         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
11243         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
11244         Require gl_STAT_MACROS, too.
11245
11246 2005-09-01  Bruno Haible  <bruno@clisp.org>
11247
11248         * gnulib-tool (import): In the first-use case, provide defaults.
11249
11250 2005-09-01  Bruno Haible  <bruno@clisp.org>
11251
11252         * gnulib-tool (func_import): Remove the .tmp files.
11253
11254 2005-09-01  Bruno Haible  <bruno@clisp.org>
11255
11256         * gnulib-tool (func_import): Fix handling of symbolic links.
11257
11258 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11259
11260         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
11261         old glibc regex code mishandles strings longer than 2**31 bytes.
11262         This patch fixes this when the regex code is used in gnulib
11263         (i.e., outside glibc).
11264
11265         This patch should not affect the use of the regex code inside
11266         glibc.  No doubt this problem also needs to be handled for glibc
11267         as well, but the result will be an incompatible change to the
11268         glibc ABI, and the old ABI will have to be supported too.  That
11269         can be the the subject for another patch.
11270
11271         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
11272         governing whether the rest of this patch is active.  By default,
11273         the macro is disabled and the patch has no effect.
11274         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
11275         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
11276         (struct re_pattern_buffer, re_search, re_search_2, re_match):
11277         (re_match_2, re_set_registers): Use the new types.
11278         * lib/regex_internal.h (Idx, re_hashval_t): New types.
11279         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
11280         New macros.
11281         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
11282         (re_string_context_at, bin_tree_t, re_dfastate_t):
11283         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
11284         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
11285         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
11286         (re_string_char_size_at, re_string_wchar_at):
11287         (re_string_elem_size_at):
11288         Use the new types and macros to port to 64-bit hosts.
11289         Use unsigned types for internal values, so that the code
11290         mostly works even for arrays larger than SSIZE_MAX.
11291         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
11292         (search_duplicated_node, calc_eclosure_iter, fetch_number):
11293         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
11294         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
11295         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
11296         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
11297         (calc_inveclosure, parse_dup_op, build_range_exp):
11298         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
11299         (fetch_number, create_token_tree, mark_opt_subexp):
11300         Likewise.
11301         * lib/regex_internal.c (re_string_construct_common,
11302         create_ci_newstate):
11303         (create_cd_newstate, re_string_allocate, re_string_construct):
11304         (re_string_realloc_buffers, build_wcs_upper_buffer):
11305         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11306         (re_string_reconstruct, re_string_peek_byte_case):
11307         (re_string_fetch_byte_case, re_string_context_at):
11308         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11309         (re_node_set_init_copy, re_node_set_add_intersect):
11310         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11311         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11312         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11313         (re_acquire_state, re_acquire_state_context, register_state):
11314         Likewise.
11315         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
11316         search_cur_bkref_entry):
11317         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
11318         (re_search_internal, re_search_2_stub, re_search_stub)
11319         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11320         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11321         (update_cur_sifted_state, check_dst_limits):
11322         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11323         (check_subexp_limits, sift_states_bkref, merge_state_array):
11324         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11325         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11326         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11327         (expand_bkref_cache, check_node_accept_bytes):
11328         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11329         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11330         (acquire_init_state_context, check_halt_node_context):
11331         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11332         (sift_states_backward, clean_state_log_if_needed):
11333         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11334         (find_recover_state, transit_state_sb, transit_state_mb):
11335         (transit_state_bkref, build_trtable, match_ctx_clean):
11336         Likewise.
11337         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11338         to work around an assumption that REG_MISSING is negative.
11339
11340         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11341         (seek_collating_symbol_entry) [defined _LIBC]:
11342         (lookup_collation_sequence_value) [defined _LIBC]:
11343         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11344         Use prototypes rather than old-style function definitions.
11345         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11346         (transit_state_sb) [0]:
11347         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11348
11349         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11350         rm_eo.
11351
11352         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11353         (optimize_subexps, lower_subexp):
11354         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11355         since the signed shift might overflow.  Use 1u<<31 instead.
11356         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11357         Likewise.
11358         * lib/regexec.c (check_dst_limits_calc_pos_1,
11359         check_subexp_matching_top): Likewise.
11360
11361         * lib/regcomp.c (optimize_subexps, lower_subexp):
11362         Use CHAR_BIT rather than 8, for clarity.
11363         * lib/regexec.c (check_dst_limits_calc_pos_1):
11364         (check_subexp_matching_top): Likewise.
11365         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11366         have to worry about portability issues when shifting it left.
11367         Remove no-longer-needed test for table_size > 0.
11368         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11369         in a word, as the resulting behavior is undefined.
11370         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11371         in one case, a <= should have been an <, and in another case the
11372         whole test was missing.
11373         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11374         the standard name CHAR_BIT.
11375         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11376         this is not true on one's complement and signed-magnitude hosts.
11377
11378         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11379         next_last_offset.
11380         (struct re_dfa_t): Remove unused member states_alloc.
11381         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11382
11383 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11384
11385         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11386         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11387         and large-file glibc and in 32-bit large-file Solaris.
11388
11389 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11390
11391         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11392         lengths fit in regoff_t; this isn't true if regoff_t is the same
11393         width as size_t.
11394         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11395         (= START + RANGE) instead of RANGE.  This avoids overflow
11396         problems when regoff_t is the same width as size_t.
11397         All callers changed.
11398         (re_search_2_stub): Check for overflow when adding the
11399         sizes of the two strings.
11400         (re_search_stub): Check for overflow when adding START
11401         to RANGE; if it occurs, substitute the extreme value.
11402
11403 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11404
11405         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11406
11407 2005-08-31  Jim Meyering  <jim@meyering.net>
11408
11409         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11410         a pointer-to-const.
11411         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11412         (register_state): Likewise.
11413         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11414         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11415         (group_nodes_into_DFAstates): Likewise.
11416
11417 2005-08-31  Jim Meyering  <jim@meyering.net>
11418
11419         * check-module: Add a FIXME comment.
11420
11421 2005-08-31  Eric Blake  <ebb9@byu.net>
11422
11423         * modules/unistd-safer (Files): Add unistd--.h.
11424         * modules/stdio-safer (Files): Add stdio--.h.
11425
11426 2005-08-31  Derek Price  <derek@ximbiot.com>
11427
11428         * lib/getdelim.c (getdelim): Return EOF on EOF.
11429         Reported by Larry Jones <lawrence.jones@ugs.com>.
11430
11431 2005-08-31  Bruno Haible  <bruno@clisp.org>
11432
11433         Avoid unnecessary diffs in the generated lib/Makefile.am.
11434         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11435         the generated files.
11436         (func_import): Don't set cmd.
11437
11438 2005-08-31  Bruno Haible  <bruno@clisp.org>
11439
11440         * lib/strstr.c: Include <stddef.h>, for NULL.
11441         * lib/strcasestr.c: Likewise.
11442         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11443
11444 2005-08-31  Bruno Haible  <bruno@clisp.org>
11445
11446         * gnulib-tool: New option --macro-prefix.
11447         (func_import): Use macro_prefix.
11448         (import): Handle option --macro-prefix.
11449
11450 2005-08-31  Bruno Haible  <bruno@clisp.org>
11451
11452         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11453         Also use new variables cached_lgpl, cached_libtool.
11454
11455 2005-08-31  Bruno Haible  <bruno@clisp.org>
11456
11457         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11458         always instantiating them.
11459
11460 2005-08-31  Bruno Haible  <bruno@clisp.org>
11461
11462         * gnulib-tool (func_import): Read the previous cached settings
11463         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
11464         earlier added by gnulib but are now dropped. Warn when a gnulib file
11465         overwrites a non-gnulib file.
11466
11467 2005-08-31  Bruno Haible  <bruno@clisp.org>
11468
11469         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11470         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11471         projects that don't keep autogenerated files in CVS. Put into
11472         actioncmd only the specified modules, not the transitive closure.
11473
11474 2005-08-31  Bruno Haible  <bruno@clisp.org>
11475
11476         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11477         Create directories that shall be filled.
11478         (import): Don't look for gl_* macros in configure.ac. Recurse across
11479         all directories containing a gnulib-cache.m4 files, if meaningful.
11480
11481 2005-08-31  Bruno Haible  <bruno@clisp.org>
11482
11483         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
11484         (import): Set seen_libtool when we see gl_LIBTOOL.
11485
11486 2005-08-31  Bruno Haible  <bruno@clisp.org>
11487
11488         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
11489         declaration macro definitions from generated gnulib.m4.
11490
11491 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
11492
11493         * lib/iconvme.h: Add prototype for iconv_alloc.
11494
11495 2005-08-29  Simon Josefsson  <jas@extundo.com>
11496
11497         * lib/iconvme.c: Fix errno.
11498
11499 2005-08-29  Bruno Haible  <bruno@clisp.org>
11500
11501         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
11502         that it works when the directory contains spaces.
11503
11504 2005-08-29  Bruno Haible  <bruno@clisp.org>
11505
11506         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
11507
11508 2005-08-29  Bruno Haible  <bruno@clisp.org>
11509
11510         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
11511         Emit more advice.
11512
11513 2005-08-29  Bruno Haible  <bruno@clisp.org>
11514         and Stepan Kasal  <kasal@ucw.cz>
11515
11516         * check-module: If more parameters are given, check each of them
11517         separately; add more exceptions, as noted by Jim Meyering.
11518         (check_module): New procedure.
11519         (%exempt_header): Now contains all exceptions.
11520
11521 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
11522
11523         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
11524
11525 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
11526
11527         * lib/iconvme.c: Split iconv_string into iconv_alloc.
11528
11529 2005-08-28  Bruno Haible  <bruno@clisp.org>
11530
11531         * m4/gnulib-tool.m4: New file.
11532
11533 2005-08-27  Jim Meyering  <jim@meyering.net>
11534
11535         * modules/unistd-safer (Files): Add pipe-safer.c.
11536         * modules/fcntl-safer (Files): Add creat-safer.c.
11537
11538 2005-08-27  Jim Meyering  <jim@meyering.net>
11539
11540         * m4/stdlib-safer.m4: New file.  From coreutils.
11541         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11542         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11543         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11544         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11545         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11546
11547 2005-08-27  Jim Meyering  <jim@meyering.net>
11548
11549         * lib/fopen-safer.c: Merge minor changes from coreutils.
11550         * lib/dup-safer.c: Likewise.
11551         * lib/fd-safer.c: Likewise.
11552
11553         Merge from coreutils.
11554         * lib/stdio--.h: New file.
11555         * lib/stdlib--.h: New file.
11556         * lib/mkstemp-safer.c: New file.
11557
11558         GNU tar needs these.
11559         * lib/pipe-safer.c: New file.
11560         * lib/creat-safer.c: New file.
11561         * lib/fcntl--.h (creat): Define to creat_safer.
11562         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11563         * lib/unistd--.h (pipe): Define to pipe_safer.
11564         * lib/unistd-safer.h: Declare pipe_safer.
11565
11566 2005-08-26  Simon Josefsson  <jas@extundo.com>
11567
11568         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11569         Haible <bruno@clisp.org>.
11570
11571 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11572
11573         * lib/regex_internal.h: Remove all references to
11574         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11575         or better.
11576         (bitset_not, bitset_merge, bitset_not_merge):
11577         (bitset_mask, re_string_allocate, re_string_construct):
11578         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11579         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11580         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11581         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11582         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11583         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11584         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11585         (re_acquire_state_context):
11586         Remove unnecessary forward decls.
11587         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11588         Put __attribute at function definition,
11589         now that the function decl has been removed.
11590         * lib/regex_internal.c (re_string_peek_byte_case):
11591         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11592         Likewise.
11593
11594 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11595
11596         * m4/regex.m4: Add AC_PREREQ(2.50).
11597         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11598
11599 2005-08-25  Simon Josefsson  <jas@extundo.com>
11600
11601         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11602         __fsetlocking.
11603
11604 2005-08-25  Simon Josefsson  <jas@extundo.com>
11605
11606         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11607         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11608         GLIBC specific code.
11609
11610 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11611
11612         Make regex safe for g++.  This fixes one real bug (an "err"
11613         that should have been "*err").  g++ problem reported by
11614         Sam Steingold.
11615         * lib/regex_internal.h (re_calloc): New macro, consistent with
11616         re_malloc etc.  All callers of calloc changed to use re_calloc.
11617         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11618         not int.  All callers changed.
11619         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11620         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11621         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11622         (find_recover_state): Change "err" to "*err"; this fixes what
11623         appears to be a real bug.
11624         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11625         versus int.
11626
11627 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11628
11629         * modules/regex (Depends-on): Add malloc, since the code
11630         assumes that !malloc(0) means failure.
11631
11632 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11633
11634         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11635
11636         alloca modernization/simplification for regex.
11637         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11638         needs to be at the start of the file, and can be moved into
11639         regex_internal.h and simplified.
11640         * lib/regex_internal.h: Include <alloca.h>.
11641         (__libc_use_alloca) [!defined _LIBC]: New macro.
11642         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11643         now works outside glibc.
11644
11645 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11646
11647         * config/srclist.txt: Add glibc bugs 1241, 1245.
11648
11649 2005-08-25  Jim Meyering  <jim@meyering.net>
11650
11651         * lib/open-safer.c: Include <config.h>.
11652         Otherwise, we'd lose LARGEFILE support in any file using
11653         e.g. "fcntl--.h"
11654
11655 2005-08-25  Bruno Haible  <bruno@clisp.org>
11656
11657         * m4/minmax.m4: Require autoconf 2.52.
11658         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11659         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11660         alternatives of translit over the alphabet.
11661         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11662
11663 2005-08-24  Simon Josefsson  <jas@extundo.com>
11664
11665         * tests/test-getpass.c: New file.
11666
11667 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11668
11669         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11670         for GNU regex features.
11671
11672 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11673
11674         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11675         * lib/regex.h (regerror): Likewise.
11676
11677         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11678         requires this.  (The code never needed it.)
11679
11680         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11681         All uses of recently-renamed identifiers changed to use the new,
11682         POSIX-compliant names.  The code will build and run just fine
11683         without these changes, but it's better to eat our own dog food
11684         and use the standard-conforming names.
11685
11686         * lib/regex.h: Fix a multitude of POSIX name space violations.
11687         These changes have an effect only for programs that define
11688         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11689         do not change anything for programs compiled in the normal way.
11690         Also, there is no effect on the ABI.
11691
11692         (_REGEX_SOURCE): New macro.
11693         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11694         defined and _GNU_SOURCE is not; this fixes a name space violation.
11695
11696         Rename the following macros to obey POSIX requirements.
11697         The old names are still visible as macros if _REGEX_SOURCE is defined.
11698         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11699         RE_BACKSLASH_ESCAPE_IN_LISTS.
11700         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11701         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11702         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11703         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11704         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11705         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11706         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11707         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11708         (REG_INTERVALS): renamed from RE_INTERVALS.
11709         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11710         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11711         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11712         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11713         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11714         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11715         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11716         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11717         RE_UNMATCHED_RIGHT_PAREN_ORD.
11718         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11719         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11720         (REG_DEBUG): renamed from RE_DEBUG.
11721         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11722         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11723         unusual, since we can't clash with the POSIX REG_ICASE.
11724         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11725         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11726         (REG_NO_SUB): renamed from RE_NO_SUB.
11727         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11728         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11729         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11730         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11731         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11732         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11733         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11734         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11735         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11736         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11737         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11738         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11739         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11740         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11741         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11742         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11743         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11744         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11745         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11746         (REG_FIXED): Renamed from REGS_FIXED.
11747         (REG_NREGS): Renamed from RE_NREGS.
11748
11749         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11750         of other REG_* macros, since POSIX says the user is allowed to
11751         #undef these macros selectively.
11752
11753         (reg_errcode_t): Update comment stating what other tables need
11754         to be consistent.
11755
11756         Rename the following enum values to obey POSIX requirements.
11757         The old names are still visible as macros.
11758         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11759         is not defined, since GNU is supposed to be a superset of POSIX as
11760         much as possible, and since we want reg_errcode_t to be a signed
11761         type for implementation consistency.
11762         (_REG_NOERROR): Renamed from REG_NOERROR.
11763         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11764         (_REG_BADPAT): Renamed from REG_BADPAT.
11765         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11766         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11767         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11768         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11769         (_REG_EBRACK): Renamed from REG_EBRACK.
11770         (_REG_EPAREN): Renamed from REG_EPAREN.
11771         (_REG_EBRACE): Renamed from REG_EBRACE.
11772         (_REG_BADBR): Renamed from REG_BADBR.
11773         (_REG_ERANGE): Renamed from REG_ERANGE.
11774         (_REG_ESPACE): Renamed from REG_ESPACE.
11775         (_REG_BADRPT): Renamed from REG_BADRPT.
11776         (_REG_EEND): Renamed from REG_EEND.
11777         (_REG_ESIZE): Renamed from REG_ESIZE.
11778         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11779         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11780         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11781         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11782         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11783
11784         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11785         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11786         changed.  But support the old name if the new one is not defined
11787         and if _REGEX_SOURCE.
11788
11789         Change the following member names in struct re_pattern_buffer.
11790         The old names are still supported if !_REGEX_SOURCE.
11791         The new names are always supported, regardless of _REGEX_SOURCE.
11792         (re_buffer): Renamed from buffer.
11793         (re_allocated): Renamed from allocated.
11794         (re_used): Renamed from used.
11795         (re_syntax): Renamed from syntax.
11796         (re_fastmap): Renamed from fastmap.
11797         (re_translate): Renamed from translate.
11798         (re_can_be_null): Renamed from can_be_null.
11799         (re_regs_allocated): Renamed from regs_allocated.
11800         (re_fastmap_accurate): Renamed from fastmap_accurate.
11801         (re_no_sub): Renamed from no_sub.
11802         (re_not_bol): Renamed from not_bol.
11803         (re_not_eol): Renamed from not_eol.
11804         (re_newline_anchor): Renamed from newline_anchor.
11805
11806         Change the following member names in struct re_registers.
11807         The old names are still supported if !_REGEX_SOURCE.
11808         The new names are always supported, regardless of _REGEX_SOURCE.
11809         (rm_num_regs): Renamed from num_regs.
11810         (rm_start): Renamed from start.
11811         (rm_end): Renamed from end.
11812
11813         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
11814         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
11815         Prepend __ to parameter names.
11816
11817         Undo yesterday's changes.
11818
11819 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11820
11821         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
11822         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
11823         lib/regex.c.
11824
11825 2005-08-24  Jim Meyering  <jim@meyering.net>
11826
11827         Sync from coreutils.
11828         * m4/fcntl-safer.m4: New file.
11829
11830         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
11831         and object files for this module.
11832
11833 2005-08-24  Jim Meyering  <jim@meyering.net>
11834
11835         Sync from coreutils.
11836         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
11837
11838 2005-08-24  Jim Meyering  <jim@meyering.net>
11839
11840         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
11841         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
11842
11843 2005-08-24  Jim Meyering  <jim@meyering.net>
11844
11845         * modules/fcntl-safer: New module.
11846         * modules/fts (Depends-on): Add fcntl-safer.
11847         * MODULES.html.sh (File descriptor based Input/Output):
11848         Add fcntl-safer.
11849
11850 2005-08-24  Bruno Haible  <bruno@clisp.org>
11851
11852         Support for unit test modules.
11853         * modules/README: Mention tests modules.
11854         * modules/TEMPLATE-TESTS: New file.
11855         * gnulib-tool: New options --extract-tests-module, --with-tests and
11856         --tests-base (unused for the moment).
11857         (testsbase, inctests): New variables.
11858         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
11859         (func_verify_module): Exclude TEMPLATE-TESTS.
11860         (func_verify_nontests_module, func_verify_tests_module): New functions.
11861         (func_get_dependencies): Add implicit dependency for tests modules.
11862         (func_get_tests_module): New function.
11863         (func_modules_transitive_closure): When --with-tests was specified,
11864         include the unit tests as well, unless explicitly avoided.
11865         (func_emit_lib_Makefile_am): Ignore the tests modules here.
11866         (func_emit_tests_Makefile_am): New function.
11867         (func_create_testdir): When --with-tests was specified, emit a
11868         tests/ directory.
11869         * MODULES.html.sh (Future developments): Update.
11870
11871 2005-08-24  Bruno Haible  <bruno@clisp.org>
11872
11873         * modules/tls-tests: New file.
11874         * tests/test-tls.c: New file, from GNU gettext.
11875
11876 2005-08-24  Bruno Haible  <bruno@clisp.org>
11877
11878         * modules/lock-tests: New file.
11879         * tests/test-lock.c: New file, from GNU gettext.
11880
11881 2005-08-24  Bruno Haible  <bruno@clisp.org>
11882
11883         * lib/lock.h: Add multiple inclusion guard.
11884         * lib/tls.h: Add multiple inclusion guard.
11885
11886 2005-08-24  Bruno Haible  <bruno@clisp.org>
11887
11888         * gnulib-tool: Add support for the --aux-dir option to
11889         --create-testdir, --create-megatestdir, --test, --megatest.
11890         (func_create_testdir, func_create_megatestdir): Optionally emit a
11891         AC_CONFIG_AUX_DIR directive.
11892         (create-testdir, create-megatestdir, test, megatest): Provide a
11893         default value for $auxdir.
11894
11895 2005-08-24  Bruno Haible  <bruno@clisp.org>
11896
11897         * gnulib-tool (import): Use compound statement instead of subshell
11898         where possible.
11899
11900 2005-08-24  Bruno Haible  <bruno@clisp.org>
11901
11902         * gnulib-tool (import): Change --aux-dir default to "build-aux".
11903
11904 2005-08-24  Bruno Haible  <bruno@clisp.org>
11905
11906         * gnulib-tool (func_version): Update.
11907
11908 2005-08-24  Bruno Haible  <bruno@clisp.org>
11909
11910         * gnulib-tool (func_import, func_create_testdir,
11911         func_create_megatestdir): Quote all autoconf macro arguments.
11912
11913 2005-08-24  Bruno Haible  <bruno@clisp.org>
11914
11915         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
11916         option --force, because --force causes the aclocal.m4 of each
11917         subdirectory to be newer than the corresponding config.h.in.
11918
11919 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11920
11921         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
11922         All contents moved to gl_REGEX.
11923         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
11924         assume that it does.
11925
11926 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11927
11928         * lib/regex.h (REG_NOSYS)
11929         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
11930         Define, since POSIX requires it as of 2001.
11931         (_REG_ENOSYS)
11932         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
11933         New private symbol, used to keep the enum signed in all cases.
11934         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
11935         Youngman in
11936         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
11937
11938         * lib/regex_internal.c (re_string_skip_chars, register_state):
11939         (calc_state_hash):
11940         Remove forward decls; no longer needed now that we use prototypes.
11941         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
11942         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
11943         (clean_state_log_if_needed): Likewise.
11944
11945 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11946
11947         * config/srclist.txt: Add glibc bugs 1231-1233.
11948
11949 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11950
11951         Fix problems reported by Sam Steingold in
11952         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
11953         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
11954         assumed that reg_errcode_t is a signed type, which is not
11955         necessarily true if _XOPEN_SOURCE is not defined.
11956         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
11957         since some compilers warn about it otherwise.
11958
11959 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11960
11961         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
11962         (init_word_char, create_initial_state, duplicate_node_closure):
11963         (fetch_token, peek_token_bracket, build_range_exp):
11964         (build_collating_symbol): Remove forward decls; no longer needed
11965         now that we use prototypes.
11966
11967         * lib/regcomp.c:
11968         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
11969         (re_compile_fastmap_iter, regcomp, regerror, regfree):
11970         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
11971         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
11972         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
11973         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
11974         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
11975         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
11976         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
11977         (build_range_exp, build_collating_symbol, parse_bracket_exp):
11978         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
11979         (build_charclass, build_charclass_op, fetch_number, create_tree):
11980         (create_token_tree, mark_opt_subexp, duplicate_tree):
11981         Use prototypes rather than old-style definitions.
11982
11983         * lib/regex_internal.c:
11984         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
11985         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
11986         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11987         (re_string_reconstruct, re_string_peek_byte_case):
11988         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
11989         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11990         (re_node_set_init_copy, re_node_set_add_intersect):
11991         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11992         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11993         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11994         (re_acquire_state, re_acquire_state_context, register_state):
11995         (create_ci_newstate, create_cd_newstate, free_state):
11996         Likewise.
11997         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
11998         re_search_2):
11999         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
12000         (re_search_internal, prune_impossible_nodes):
12001         (acquire_init_state_context, check_matching, static):
12002         (check_halt_node_context, check_halt_state_context, proceed_next_node):
12003         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
12004         (update_regs, sift_states_backward, build_sifted_states):
12005         (clean_state_log_if_needed, merge_state_array):
12006         (update_cur_sifted_state, add_epsilon_src_nodes):
12007         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
12008         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
12009         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
12010         (find_recover_state, check_subexp_matching_top, transit_state_mb):
12011         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
12012         (check_arrival, check_arrival_add_next_nodes):
12013         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12014         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12015         (check_node_accept_bytes, check_node_accept, extend_buffers):
12016         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
12017         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
12018         (sift_ctx_init):
12019         Likewise.
12020
12021         * lib/regex_internal.h:
12022         (re_string_allocate, re_string_construct, re_string_reconstruct):
12023         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
12024         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
12025         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
12026         (re_string_context_at, re_string_peek_byte_case):
12027         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
12028         is defined, since we now use prototypes always.
12029
12030         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
12031         C89 or better.  All uses removed.
12032
12033 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12034
12035         * config/srclist.txt: Add glibc bugs 1220-1227.
12036
12037 2005-08-20  Jim Meyering  <jim@meyering.net>
12038
12039         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
12040         of unused local, dfa.
12041
12042 2005-08-20  Bruno Haible  <bruno@clisp.org>
12043
12044         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12045
12046 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12047
12048         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12049         (re_node_set_insert_last, re_dfa_add_node):
12050         Rename local variables to avoid GCC shadowing warnings.
12051
12052 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12053
12054         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12055         [defined lint]: Suppress bogus uninitialized-variable warnings.
12056
12057         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12058         and let the caller return REG_ESPACE if out of space.  This
12059         removes an uninitialied-variable warning with GCC 4.0.1, and also
12060         avoids taking the address of a local variable.  All callers
12061         changed.
12062
12063 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12064
12065         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12066         $LIBCSRC/posix/regexec.c.
12067         Add glibc bug 1217 for regcomp.c.
12068
12069 2005-08-19  Jim Meyering  <jim@meyering.net>
12070
12071         * lib/regexec.c (proceed_next_node): Redo local variables to
12072         avoid GCC shadowing warnings.
12073
12074 2005-08-18  Bruno Haible  <bruno@clisp.org>
12075
12076         * lib/strstr.c (strstr): Fix return value in multibyte case.
12077         * lib/strcasestr.c (strcasestr): Likewise.
12078
12079 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12080
12081         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12082
12083 2005-08-17  Jim Meyering  <jim@meyering.net>
12084
12085         Make the %s format (seconds since the epoch) work for a negative
12086         number and when used with a zero-padded field width, e.g. %015s.
12087
12088         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
12089         label so that it precedes the code to set `digits'.  Otherwise,
12090         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
12091         print `00-22'.  Now, it prints `-0022', as it should.
12092
12093 2005-08-17  Bruno Haible  <bruno@clisp.org>
12094
12095         * modules/strstr (Files): Add m4/mbrtowc.m4.
12096         (Depends-on): Add mbuiter.
12097
12098 2005-08-17  Bruno Haible  <bruno@clisp.org>
12099
12100         * modules/strcasestr: New file.
12101         * MODULES.html.sh (String handling, based on ANSI C 89): Add
12102         strcasestr.
12103
12104 2005-08-17  Bruno Haible  <bruno@clisp.org>
12105
12106         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
12107
12108 2005-08-17  Bruno Haible  <bruno@clisp.org>
12109
12110         * modules/mbuiter: New file.
12111         * MODULES.html.sh (Extended multibyte and wide character utilities):
12112         Add mbuiter.
12113
12114 2005-08-17  Bruno Haible  <bruno@clisp.org>
12115
12116         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
12117         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
12118
12119 2005-08-17  Bruno Haible  <bruno@clisp.org>
12120
12121         * m4/strcasestr.m4: New file.
12122
12123 2005-08-17  Bruno Haible  <bruno@clisp.org>
12124
12125         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
12126         * lib/strstr.c: Completely rewritten, with multibyte locale support.
12127
12128 2005-08-17  Bruno Haible  <bruno@clisp.org>
12129
12130         * lib/strcasestr.h: New file.
12131         * lib/strcasestr.c: New file.
12132
12133 2005-08-17  Bruno Haible  <bruno@clisp.org>
12134
12135         * lib/strcasecmp.c: Use mbuiter.h.
12136
12137 2005-08-17  Bruno Haible  <bruno@clisp.org>
12138
12139         * lib/mbuiter.h: New file.
12140
12141 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12142
12143         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
12144         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
12145         and gl_GETOPT are both invoked via different paths (as happens
12146         with GNU tar CVS because it uses both argp and getopt), the former
12147         wins.
12148
12149 2005-08-16  Bruno Haible  <bruno@clisp.org>
12150
12151         * modules/tls: New file.
12152         * MODULES.html.sh (Multithreading): Add tls.
12153
12154 2005-08-16  Bruno Haible  <bruno@clisp.org>
12155
12156         * modules/strnlen1: New file.
12157         * MODULES.html.sh (String handling): Add strnlen1.
12158
12159 2005-08-16  Bruno Haible  <bruno@clisp.org>
12160
12161         * modules/strcase (Files): Add m4/mbrtowc.m4.
12162         (Depends-on): Add strnlen1, mbchar.
12163
12164 2005-08-16  Bruno Haible  <bruno@clisp.org>
12165
12166         * modules/mbiter: New file.
12167         * MODULES.html.sh (Extended multibyte and wide character utilities):
12168         Add mbiter.
12169
12170 2005-08-16  Bruno Haible  <bruno@clisp.org>
12171
12172         * modules/mbfile: New file.
12173         * MODULES.html.sh (Extended multibyte and wide character utilities):
12174         Add mbfile.
12175
12176 2005-08-16  Bruno Haible  <bruno@clisp.org>
12177
12178         * modules/mbchar: New file.
12179         * MODULES.html.sh (Extended multibyte and wide character utilities):
12180         New section.
12181
12182 2005-08-16  Bruno Haible  <bruno@clisp.org>
12183
12184         * m4/tls.m4: New file, from GNU gettext.
12185
12186 2005-08-16  Bruno Haible  <bruno@clisp.org>
12187
12188         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
12189         always.
12190         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
12191
12192 2005-08-16  Bruno Haible  <bruno@clisp.org>
12193
12194         * m4/mbiter.m4: New file.
12195
12196 2005-08-16  Bruno Haible  <bruno@clisp.org>
12197
12198         * m4/mbfile.m4: New file.
12199
12200 2005-08-16  Bruno Haible  <bruno@clisp.org>
12201
12202         * m4/mbchar.m4: New file.
12203
12204 2005-08-16  Bruno Haible  <bruno@clisp.org>
12205
12206         * lib/tls.h: New file, from GNU gettext.
12207         * lib/tls.c: New file, from GNU gettext.
12208
12209 2005-08-16  Bruno Haible  <bruno@clisp.org>
12210
12211         * lib/strnlen1.h: New file.
12212         * lib/strnlen1.c: New file.
12213
12214 2005-08-16  Bruno Haible  <bruno@clisp.org>
12215
12216         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
12217         (mbi_init): Update.
12218         (mbi_avail, mbi_advance): Let the iteration end before the terminating
12219         NUL byte, not after it.
12220
12221 2005-08-16  Bruno Haible  <bruno@clisp.org>
12222
12223         * lib/strcase.h (strcasecmp): Add note in comments.
12224         * lib/strncasecmp.c: Use code from strcasecmp.c.
12225         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
12226         (strcasecmp): Work correctly in multibyte locales.
12227
12228 2005-08-16  Bruno Haible  <bruno@clisp.org>
12229
12230         * lib/mbiter.h: New file.
12231
12232 2005-08-16  Bruno Haible  <bruno@clisp.org>
12233
12234         * lib/mbfile.h: New file.
12235
12236 2005-08-16  Bruno Haible  <bruno@clisp.org>
12237
12238         * lib/mbchar.h: New file.
12239         * lib/mbchar.c: New file.
12240
12241 2005-08-16  Bruno Haible  <bruno@clisp.org>
12242
12243         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
12244         the valid ones. Makes the comparison operations transitive:
12245         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
12246         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
12247
12248 2005-08-15  Simon Josefsson  <jas@extundo.com>
12249
12250         * modules/ssize_t (License): Change to 'unlimited'.
12251
12252         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
12253
12254 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12255
12256         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
12257         Add comments for each pending glibc patch.
12258
12259 2005-08-15  Bruno Haible  <bruno@clisp.org>
12260
12261         * lib/regex.h (__restrict_arr): Don't define to __restrict if
12262         __cplusplus is defined.
12263
12264 2005-08-14  Jim Meyering  <jim@meyering.net>
12265
12266         Sync from coreutils.
12267
12268         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
12269         Use the hash-table-based cycle-detection code not just when
12270         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
12271         Reported by James Youngman in
12272         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
12273         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
12274         FTS_TIGHT_CYCLE_CHECK.
12275         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
12276         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
12277         once again.
12278         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
12279         * lib/fts.c (fd_safer): Remove decl.
12280         Include fcntl--.h rather than unistd-safer.h
12281         (fts_safe_changedir): Don't call fd_safer; no longer needed
12282         now that we include fcntl--.h.
12283
12284 2005-08-12  Simon Josefsson  <jas@extundo.com>
12285
12286         * modules/getndelim2: Use ssize_t module.
12287         * modules/getnline: Likewise.
12288         * modules/safe-read: Likewise.
12289         * modules/xreadlink: Likewise.
12290
12291         * modules/ssize_t: New file.
12292
12293 2005-08-12  Simon Josefsson  <jas@extundo.com>
12294
12295         * m4/readline.m4: Look for termcap, curses or ncurses if required.
12296
12297 2005-08-12  Simon Josefsson  <jas@extundo.com>
12298
12299         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12300         ssize_t.
12301
12302 2005-08-12  Simon Josefsson  <jas@extundo.com>
12303
12304         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
12305         readline, getdelim and check_version.
12306         (Support for systems lacking ISO C 99: Sizes of integer types):
12307         Add size_max.
12308
12309 2005-08-12  Bruno Haible  <bruno@clisp.org>
12310
12311         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
12312
12313 2005-08-11  Simon Josefsson  <jas@extundo.com>
12314
12315         * modules/readline: New file.
12316
12317         * modules/strnlen (Files): Add strnlen.h.
12318
12319 2005-08-11  Simon Josefsson  <jas@extundo.com>
12320
12321         * m4/readline.m4: New file.
12322
12323 2005-08-11  Simon Josefsson  <jas@extundo.com>
12324
12325         * lib/readline.h, readline.c: New file.
12326
12327 2005-08-11  Simon Josefsson  <jas@extundo.com>
12328
12329         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12330         gl_AVOID.
12331
12332 2005-08-11  Bruno Haible  <bruno@clisp.org>
12333
12334         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12335
12336 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12337
12338         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12339
12340 2005-08-10  Simon Josefsson  <jas@extundo.com>
12341
12342         * tests/test-iconvme.c: New file.
12343
12344 2005-08-10  Simon Josefsson  <jas@extundo.com>
12345
12346         * m4/strnlen.m4: New file.
12347
12348         * m4/strndup.m4: Don't check for strnlen declaration, done in
12349         strnlen.m4.
12350
12351 2005-08-10  Simon Josefsson  <jas@extundo.com>
12352
12353         * lib/strndup.c: Use strnlen.h.
12354
12355         * lib/strnlen.h: New file.
12356
12357 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12358
12359         * README: Typos.
12360
12361 2005-08-02  Simon Josefsson  <jas@extundo.com>
12362
12363         * modules/readline: New file.
12364
12365 2005-08-02  Simon Josefsson  <jas@extundo.com>
12366
12367         * modules/getdelim: New file.
12368
12369         * modules/getline: Rewrite, don't use getndelim2.
12370
12371 2005-08-02  Simon Josefsson  <jas@extundo.com>
12372
12373         * m4/getline.m4: Separate out getdelim stuff into separate module.
12374
12375         * m4/getdelim.m4: New file.
12376
12377 2005-08-02  Simon Josefsson  <jas@extundo.com>
12378
12379         * lib/getline.h, getline.c: Rewrite.
12380
12381         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12382
12383 2005-07-31  Bruno Haible  <bruno@clisp.org>
12384
12385         * lib/lock.h (gl_lock_initializer): New macro.
12386         (gl_lock_define_initialized): Use it.
12387         (gl_rwlock_initializer): New macro.
12388         (gl_rwlock_define_initialized): Use it.
12389         (gl_recursive_lock_initializer): New macro.
12390         (gl_recursive_lock_define_initialized): Use it.
12391
12392 2005-07-30  Karl Berry  <karl@gnu.org>
12393
12394         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12395         Report from Ben Pfaff, regarding getopt.
12396
12397 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12398
12399         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12400         normal way.
12401         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12402         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12403         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12404         (gl_GETOPT): Use the new macros.  Most of the implementation
12405         is moved to the new macros.  This is for programs like Emacs
12406         that don't want all the functionality of gl_GETOPT.
12407
12408 2005-07-26  Bruno Haible  <bruno@clisp.org>
12409
12410         * m4/lock.m4: Update from GNU gettext.
12411
12412 2005-07-26  Bruno Haible  <bruno@clisp.org>
12413
12414         * lib/lock.h: Update from GNU gettext.
12415         * lib/lock.c: Update from GNU gettext.
12416
12417 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12418
12419         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12420         obsolescent AC_TRY_RUN.  Include the default includes files, for
12421         'exit'.
12422
12423 2005-07-24  Bruno Haible  <bruno@clisp.org>
12424
12425         * modules/visibility: New file.
12426         * MODULES.html.sh (Misc): Add visibility.
12427
12428 2005-07-24  Bruno Haible  <bruno@clisp.org>
12429
12430         * m4/visibility.m4: New file.
12431
12432 2005-07-24  Bruno Haible  <bruno@clisp.org>
12433
12434         * doc/visibility.texi: New file.
12435
12436 2005-07-22  Bruno Haible  <bruno@clisp.org>
12437
12438         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12439         $(ALLOCA_H), redundant through BUILT_SOURCES.
12440         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12441         redundant through BUILT_SOURCES.
12442         * modules/byteswap (Makefile.am): Remove explicit dependency on
12443         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12444         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12445         $(FNMATCH_H), redundant through BUILT_SOURCES.
12446         * modules/getopt (Makefile.am): Remove explicit dependency on
12447         $(GETOPT_H), redundant through BUILT_SOURCES.
12448         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12449         redundant through BUILT_SOURCES.
12450         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12451         redundant through BUILT_SOURCES.
12452         * modules/stdbool (Makefile.am): Remove explicit dependency on
12453         $(STDBOOL_H), redundant through BUILT_SOURCES.
12454         * modules/stdint (Makefile.am): Remove explicit dependency on
12455         $(STDINT_H), redundant through BUILT_SOURCES.
12456         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12457         Remove explicit dependency on $(SYSEXITS_H).
12458         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
12459
12460 2005-07-18  Simon Josefsson  <jas@extundo.com>
12461
12462         * lib/check-version.c (check_version): Accept identical versions too.
12463
12464 2005-07-18  Bruno Haible  <bruno@clisp.org>
12465
12466         * modules/lock: New file.
12467         * MODULES.html.sh (Multithreading): New section.
12468
12469 2005-07-18  Bruno Haible  <bruno@clisp.org>
12470
12471         * m4/lock.m4: New file, from GNU gettext.
12472
12473 2005-07-18  Bruno Haible  <bruno@clisp.org>
12474
12475         * lib/lock.h: New file, from GNU gettext.
12476         * lib/lock.c: New file, from GNU gettext.
12477
12478 2005-07-18  Bruno Haible  <bruno@clisp.org>
12479
12480         * lib/lock.h (gl_once_t): New type.
12481         (gl_once_define, gl_once): New macros.
12482         * lib/lock.c (fresh_once): New variable.
12483         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
12484         functions.
12485
12486 2005-07-16  Simon Josefsson  <jas@extundo.com>
12487
12488         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
12489         workaround, suggested by Bruno.
12490
12491 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12492
12493         * modules/xalloc (Depends-on): Add xalloc-die.
12494         * modules/xvasprintf (Depends-on): Add xalloc-die.
12495
12496 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12497
12498         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
12499         with a minor change.
12500
12501 2005-07-15  Bruno Haible  <bruno@clisp.org>
12502
12503         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
12504         When using lib/poll.c, define poll as rpl_poll.
12505
12506 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
12507
12508         * modules/argp (Depends-on): Remove unlocked-io.
12509
12510 2005-07-14  Derek Price  <derek@ximbiot.com>
12511
12512         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
12513         for glob symlink bug.
12514
12515 2005-07-14  Bruno Haible  <bruno@clisp.org>
12516
12517         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
12518         Instead, test for *_unlocked function declarations directly.
12519
12520 2005-07-11  Simon Josefsson  <jas@extundo.com>
12521
12522         * modules/size_max: New file.
12523
12524         * modules/xsize: Depend on size_max module for size_max.m4.
12525
12526 2005-07-11  Simon Josefsson  <jas@extundo.com>
12527
12528         * lib/size_max.h: New file.
12529
12530 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12531
12532         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12533         copyright symbol and the year.
12534         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12535         (version_etc_va): Use parameterized copyright notice.
12536         Reword to conform to the current GNU coding standards.
12537
12538 2005-07-11  Karl Berry  <karl@gnu.org>
12539
12540         * doc/gnulib.texi (Quoting): new node.
12541         (Initial import): more info, from Patrice.
12542
12543 2005-07-11  Bruno Haible  <bruno@clisp.org>
12544
12545         * gnulib-tool (func_usage): Document option --avoid.
12546         (Command line options): Handle --avoid.
12547         (func_acceptable): New function.
12548         (func_modules_transitive_closure): Use it.
12549
12550 2005-07-11  Bruno Haible  <bruno@clisp.org>
12551
12552         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12553         Reported by Jim Meyering.
12554
12555 2005-07-10  Bruno Haible  <bruno@clisp.org>
12556
12557         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12558         Needed when size_t is smaller than 'unsigned int'.
12559         Reported by Paul Eggert.
12560
12561 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12562
12563         * modules/argp (Depends-on): Add unlocked-io
12564
12565 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12566
12567         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12568         block of defines.
12569
12570 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12571
12572         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12573         fix now.
12574
12575 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12576         and Paul Eggert  <eggert@cs.ucla.edu>
12577
12578         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12579         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12580
12581 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12582
12583         * modules/regex (Files): Add lib/regex_internal.c,
12584         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12585         (Depends-on): Add extensions.
12586         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12587
12588 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12589
12590         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12591         pathconf.
12592         * m4/same.m4 (gl_SAME): Likewise.
12593         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12594
12595         * m4/regex.m4: Adjust to new libc regex implementation.
12596         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12597         all the .c and .h parts of (the new) regex.
12598         Quote the m4 stuff better.
12599         Check for RE_ICASE bug of old gnulib.
12600         Check for REG_STARTEND of recent libc.
12601         Rename local variables from jm_* to gl_*.
12602         Quote operand of "test -f".
12603         Say "recent enough" version of libc, not "version 2".
12604         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12605         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12606         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12607         Remove check for btowc, isascii.
12608         Require AM_LANGINFO_CODESET.
12609
12610 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12611
12612         * lib/regex.c, regex.h: Sync from libc.
12613         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12614         * lib/regexec.c:
12615         New files, synced from libc, except that regex_internal.h
12616         currently has a small porting fix.
12617
12618 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12619
12620         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12621         regex_internal.c, regexec.c.
12622         Add regex_internal.h too, but as a comment, since the libc version
12623         is currently broken in gnulib mode.
12624
12625 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12626
12627         Support programs like Emacs that use gnulib but not gettext.
12628         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12629         * modules/gettext-h: New file.
12630         * modules/gettext (Files): Remove lib/gettext.h.
12631         (Depends-on): Add gettext-h.
12632         (Makefile.am): Remove lib_SOURCES.
12633         * modules/argmatch, modules/c-stack, modules/closeout:
12634         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12635         * modules/execute, modules/file-type, modules/getaddrinfo:
12636         * modules/getopt, modules/human, modules/javacomp:
12637         * modules/javaexec, modules/mkdir-p, modules/obstack:
12638         * modules/openat, modules/pagealign_alloc, modules/pipe:
12639         * modules/quotearg, modules/regex, modules/rpmatch:
12640         * modules/unicodeio, modules/userspec, modules/version-etc:
12641         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12642         * modules/xsetenv:
12643         Depend on gettext-h, not gettext.
12644
12645 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12646
12647         * gnulib-tool (func_import): Add support for 'public domain' license.
12648         * modules/alloca, modules/atexit, modules/memmove:
12649         Now public domain, not GPL.
12650         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12651         * modules/realloc, modules/strerror, modules/strtod:
12652         Now LGPL, not GPL.
12653
12654 2005-07-05  Bruno Haible  <bruno@clisp.org>
12655
12656         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12657         autoconf CVS. Needed for mingw.
12658
12659 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12660
12661         Remove the dependency of the strftime module on the tzset module.
12662         * modules/strftime (Depends-on): Remove dependency on tzset.
12663
12664 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12665
12666         Remove the dependency of the strftime module on the tzset module.
12667         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12668         gl_FUNC_TZSET_CLOBBER.
12669
12670 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12671
12672         Remove the dependency of the strftime module on the tzset module.
12673         * lib/strftime.c (my_strftime)
12674         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12675         Copy the input structure, to work around some of the bug with
12676         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12677         Solaris releases, you should also use the tzset module, but we won't
12678         require it as a dependency any more since we don't want LGPLed code
12679         to depend on GPLed code.
12680
12681 2005-07-02  Jim Meyering  <jim@meyering.net>
12682
12683         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12684         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12685         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12686         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12687
12688 2005-07-02  Jim Meyering  <jim@meyering.net>
12689
12690         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12691
12692 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12693
12694         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12695         declares only 'struct timespec;' (!).
12696
12697 2005-07-01  Jim Meyering  <jim@meyering.net>
12698
12699         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12700         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12701         * lib/save-cwd.c, tempname.c:
12702         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12703         and don't include <sys/file.h>).
12704
12705 2005-06-29  Jim Meyering  <jim@meyering.net>
12706
12707         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12708         type name.  Use the variable name instead.
12709         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12710         Likewise.
12711
12712 2005-06-28  Simon Josefsson  <jas@extundo.com>
12713
12714         * modules/check-version (Files): Add check-version.m4.
12715
12716 2005-06-28  Simon Josefsson  <jas@extundo.com>
12717
12718         * m4/check-version.m4: New file, suggested by Jim Meyering
12719         <jim@meyering.net>.
12720
12721 2005-06-28  Simon Josefsson  <jas@extundo.com>
12722
12723         * lib/check-version.h, lib/check-version.c: New files.
12724
12725 2005-06-28  Simon Josefsson  <jas@extundo.com>
12726
12727         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12728         collision with global variable.  Better indentation.  Don't
12729         increment buffer pointer beyond buffer end.  Based on comments
12730         from Paul Eggert <eggert@cs.ucla.edu>.
12731
12732         * lib/base64.h: Indent.
12733
12734 2005-06-28  Simon Josefsson  <jas@extundo.com>
12735
12736         * doc/gnulib.texi (Library version handling): New section.
12737
12738 2005-06-28  Jim Meyering  <jim@meyering.net>
12739
12740         * check-module (find_included_lib_files): Hard-code another
12741         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12742         but modules/fts-lgpl (correctly) does not list those files.
12743
12744         * modules/canonicalize (Files): Add lib/pathmax.h.
12745
12746 2005-06-25  Simon Josefsson  <jas@extundo.com>
12747
12748         * modules/check-version: New file.
12749
12750 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12751
12752         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12753         initializer of struct addrinfo, as an indication that we don't
12754         care how many members the structure has.
12755
12756 2005-06-24  Derek Price  <derek@ximbiot.com>
12757         and Bruno Haible  <bruno@clisp.org>
12758
12759         Remove stat module & update lstat.
12760         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12761         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12762         * m4/stat.m4: Remove this file.
12763
12764 2005-06-24  Derek Price  <derek@ximbiot.com>
12765         and Bruno Haible  <bruno@clisp.org>
12766
12767         Remove stat module & update lstat.
12768         * lib/stat.c: Remove this file...
12769         (slash_aware_lstat): ...moving this content and its support...
12770         * lib/lstat.c (rpl_lstat): ...into here.
12771         * lib/lstat.h: New file.
12772
12773 2005-06-24  Derek Price  <derek@ximbiot.com>
12774         and Bruno Haible  <bruno@clisp.org>
12775
12776         Remove stat module & update lstat.
12777         * config/srclist.txt (libc sources): Remove stat.
12778
12779 2005-06-24  Derek Price  <derek@ximbiot.com>
12780         and Bruno Haible  <bruno@clisp.org>
12781
12782         Remove stat module & update lstat.
12783         * MODULES.html.sh (stat): Remove.
12784         * MODULES.html: Regenerated.
12785         * modules/lstat (Description): Correct function name.
12786         (Files): Add "lstat.h".
12787         (Depends-on): Remove stat, add xalloc, stat-macros.
12788         * modules/stat: Remove this file.
12789         (Include): Add "lstat.h", remove <sys/stat.h>.
12790
12791 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12792
12793         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12794         (ranged_convert): Don't save conversion in a temporary struct.
12795         This causes a warning with GCC 4.0.0, and anyway in the typical
12796         case it's not worth the extra 100 bytes or so of code.
12797         (ranged_convert, __mktime_internal): When calling a function via a
12798         pointer P, use P () rather than (*P) (), as we now assume C89 or
12799         better.
12800
12801 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12802
12803         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
12804         "who -r" failed to give output.  Problem reported by Tim Waugh.
12805
12806         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
12807         (xcalloc): Use it to avoid needless tests.
12808         Problem reported by Jim Meyering.
12809
12810 2005-06-20  Derek Price  <derek@ximbiot.com>
12811
12812         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
12813         unnecessary for Autoconfs > 2.59c.
12814
12815 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12816
12817         * lib/argp.h (__option_is_short): Check upper limit of
12818         __key. Isprint() requires its argument to have the value
12819         of an unsigned char or EOF.
12820
12821 2005-06-16  Jim Meyering  <jim@meyering.net>
12822
12823         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
12824         when either N or S is zero.
12825
12826 2005-06-16  Derek Price  <derek@ximbiot.com>
12827
12828         * m4/bison.m4: Declare YACC & YFLAGS precious.
12829
12830 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
12831
12832         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
12833         multibyte string or pattern, fall back on unibyte matching.
12834         Problem reported by James Youngman.
12835
12836 2005-06-08  Bruno Haible  <bruno@clisp.org>
12837
12838         * modules/csharpcomp: New file.
12839         * MODULES.html.sh (C#): Add csharpcomp.
12840
12841 2005-06-08  Bruno Haible  <bruno@clisp.org>
12842
12843         * m4/csharpcomp.m4: New file, from GNU gettext.
12844
12845 2005-06-08  Bruno Haible  <bruno@clisp.org>
12846
12847         * lib/csharpcomp.h: New file, from GNU gettext.
12848         * lib/csharpcomp.c: New file, from GNU gettext.
12849         * lib/csharpcomp.sh.in: New file, from GNU gettext.
12850
12851 2005-06-08  Bruno Haible  <bruno@clisp.org>
12852
12853         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
12854         warning on mingw.
12855
12856 2005-06-07  Derek Price  <derek@ximbiot.com>
12857
12858         Sync from CVS.
12859         * lib/glob_.h: Indent nested #ifdef.
12860
12861 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12862
12863         Sync from coreutils.
12864         Use "file name" when talking about file names, instead of "filename"
12865         or "path", as per the GNU coding standards.
12866         * lib/mkdir-p.c: Renamed from makepath.c.
12867         (make_dir_parents): Renamed from make_path.  All callers changed.
12868         * lib/mkdir-p.h: Likewise.  All includers changed.
12869         * lib/filenamecat.c: Renamed from path-concat.c.
12870         (file_name_concat): Renamed from path_concat.  All callers changed.
12871         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
12872         * lib/filenamecat.h: Likewise.  All includers changed.
12873         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
12874         in comments or local variable names.
12875         * lib/basename.c: Likewise.
12876         * lib/canonicalize.c, canonicalize.h: Likewise.
12877         * lib/dirname.c, dirname.h: Likewise.
12878         * lib/euidaccess.c: Likewise.
12879         * lib/exclude.c: Likewise
12880         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
12881         * lib/fsusage.c, fsuage.h: Likewise.
12882         * lib/fts.c, fts_.h: Likewise.
12883         * lib/getcwd.c: Likewise.
12884         * lib/getloadavg.c: Likewise.
12885         * lib/mkstemp.c: Likewise.
12886         * lib/mountlist.c, mountlist.h: Likewise.
12887         * lib/openat.c, openat.h: Likewise.
12888         * lib/readlink-stub.c: Likewise.
12889         * lib/readutmp.c, readutmp.h: Likewise.
12890         * lib/rename.c: Likewise.
12891         * lib/rmdir.c: Likewise.
12892         * lib/same.c: Likewise.
12893         * lib/savedir.c: Likewise.
12894         * lib/stripslash.c: Likewise.
12895         * lib/tempname.c: Likewise.
12896         * lib/xreadlink.c: Likewise.
12897         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
12898         All uses changed.
12899         * lib/exclude.h: Likewise.
12900
12901         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
12902         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12903         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
12904         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12905         * lib/pathmax.h: Include <limits.h> unconditionally, since other
12906         files have been getting away with it for years (MORE/BSD 4.3
12907         is extinct now).
12908         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
12909         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12910
12911         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
12912         Define to 256, not 255, as per modern POSIX.
12913
12914 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12915
12916         Sync from coreutils.
12917         Use "file name" when talking about file names, instead of "filename"
12918         or "path", as per the GNU coding standards.
12919         * MODULES.html.sh: mkdir-p renamed from makepath.
12920         filenamecat renamed from path-concat.
12921         * modules/filenamecat: Renamed from modules/path-concat.
12922         (Files): filenamecat.h and filenamecat.c renamed from
12923         path-concat.h and path-concat.c.
12924         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
12925         (Include): filenamecat.h, not path-concat.h.
12926         * modules/mkdir-p: Renamed from modules/makepath.
12927         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
12928         makepath.c.
12929         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
12930         (Include): mkdir-p.h, not makepath.h.
12931
12932 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12933
12934         Sync from coreutils.
12935         * m4/mkdir-p.m4: Renamed from makepath.m4.
12936         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
12937         Rename files from makepath.c to mkdir-p.c, and from
12938         makepath.h to mkdir-p.h.
12939         * m4/filenamecat.m4: Renamed from path-concat.m4.
12940         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
12941         Rename files from path-concat.c to filenamecat.c,
12942         and from path-concat.h to filenamecat.h.
12943         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
12944         "file name" in local variables or comments.
12945         * m4/rename.m4: Likewise.
12946
12947 2005-06-01  Bruno Haible  <bruno@clisp.org>
12948
12949         * modules/csharpexec: New file.
12950         * MODULES.html.sh (C#): New section.
12951
12952 2005-06-01  Bruno Haible  <bruno@clisp.org>
12953
12954         * m4/csharp.m4: New file, from GNU gettext.
12955         * m4/csharpexec.m4: New file, from GNU gettext.
12956
12957 2005-06-01  Bruno Haible  <bruno@clisp.org>
12958
12959         * lib/csharpexec.h: New file, from GNU gettext.
12960         * lib/csharpexec.c: New file, from GNU gettext.
12961         * lib/csharpexec.sh.in: New file, from GNU gettext.
12962
12963 2005-05-31  Derek Price  <derek@ximbiot.com>
12964             Paul Eggert  <eggert@cs.ucla.edu>
12965
12966         Sync from cvs.
12967         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12968
12969 2005-05-31  Derek Price  <derek@ximbiot.com>
12970             Paul Eggert  <eggert@cs.ucla.edu>
12971
12972         Sync from cvs.
12973         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12974
12975 2005-05-29  Derek Price  <derek@ximbiot.com>
12976
12977         * config/srclist.txt (glob_.h, glob.c): Add these files.
12978
12979 2005-05-29  Derek Price  <derek@ximbiot.com>
12980
12981         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
12982         * modules/glob: New file.
12983         * modules/getlogin_r: Add link to POSIX spec in description.
12984
12985 2005-05-29  Derek Price  <derek@ximbiot.com>
12986             Paul Eggert  <eggert@cs.ucla.edu>
12987
12988         * m4/glob.m4: New file.
12989
12990 2005-05-29  Derek Price  <derek@ximbiot.com>
12991             Paul Eggert  <eggert@cs.ucla.edu>
12992
12993         * lib/glob_.h, lib/glob.c: New files.
12994
12995 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12996
12997         * modules/fts (Files): Remove m4/inttypes-pri.m4.
12998         * modules/fts-lgpl (Depends-on): Remove gettext.
12999
13000 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13001
13002         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
13003         and don't require gt_INTTYPES_PRI.
13004
13005 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13006
13007         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
13008
13009         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
13010         the configuration hassle isn't worth it.
13011         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
13012         (LONGEST_MODIFIER, PRIuMAX): Remove.
13013
13014 2005-05-27  Bruno Haible  <bruno@clisp.org>
13015
13016         * lib/getlogin_r.h: Remove second include of <stddef.h>.
13017
13018 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
13019
13020         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
13021         _POSIX_PTHREAD_SEMANTICS for Solaris.
13022
13023 2005-05-25  Derek Price  <derek@ximbiot.com>
13024
13025         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
13026
13027 2005-05-25  Derek Price  <derek@ximbiot.com>
13028             Paul Eggert  <eggert@cs.ucla.edu>
13029
13030         * modules/getlogin_r, m4/getlogin_r.m4: New files.
13031         * lib/getlogin_r.c, getlogin_r.h: New files.
13032
13033 2005-05-25  Bruno Haible  <bruno@clisp.org>
13034             Derek Price  <derek@ximbiot.com>
13035
13036         * lib/getlogin_r.h: Simplify API documentation.
13037
13038 2005-05-23  Derek Price  <derek@ximbiot.com>
13039
13040         * modules/minmax (Files): Add m4/minmax.m4.
13041         (configure.ac): Add gl_MINMAX.
13042
13043 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13044
13045         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13046         so that unistd-safer.h (GPL'ed code) need not be included.
13047
13048 2005-05-22  Bruno Haible  <bruno@clisp.org>
13049
13050         * m4/minmax.m4: New file.
13051         Based on a patch by Derek Price <derek@ximbiot.com>.
13052
13053 2005-05-22  Bruno Haible  <bruno@clisp.org>
13054
13055         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13056         (INT64_MIN): Fix definition.
13057         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13058
13059         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13060         NEED_SIGNED_INT_TYPES.
13061
13062         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13063         HAVE_SYSTEM_INTTYPES.
13064
13065 2005-05-22  Bruno Haible  <bruno@clisp.org>
13066
13067         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13068         Also include <sys/param.h> if it defines MIN, MAX.
13069         Based on a patch by Derek Price <derek@ximbiot.com>.
13070
13071 2005-05-21  Jim Meyering  <jim@meyering.net>
13072
13073         * modules/fts (Files): Add m4/inttypes-pri.m4.
13074         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13075
13076 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13077
13078         New fts module.
13079         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13080         (setup_dir, free_dir): New functions.
13081         (enter_dir, leave_dir): Define trivial
13082         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13083         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13084         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
13085         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
13086         Move to fts-cycle.c.
13087         (fts_open): Use setup_dir.
13088         (fts_close): Use free_dir.
13089         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
13090         This adds a label and some gotos, but the alternatives were messier.
13091         Check for memory allocation failure when entering a dir.
13092         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
13093         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
13094         (FTS): New member fts_cycle, that is a union that contains the
13095         old active_dir_ht and cycle_state.  All uses changed to mention
13096         fts_cycle.ht and fts_cycle.state.
13097         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
13098         fts.c, with the following changes:
13099         (setup_dir, free_dir): New functions.
13100         (enter_dir): Now returns bool.  Return true if successful, false
13101         if memory exhausted.  All callers changed.
13102         Do not bother partly cleaning up on
13103         memory allocation failure; that is free_dir's job.
13104         However, free ad if hash_insert fails, to avoid memory leak.
13105         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
13106         fts->fts_options to see which union member to use.
13107
13108 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13109
13110         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
13111         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
13112
13113 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13114
13115         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
13116
13117 2005-05-20  Jim Meyering  <jim@meyering.net>
13118
13119         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
13120         Now a macro, to pacify GCC.
13121
13122 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13123
13124         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
13125         of -1.
13126
13127 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13128
13129         * lib/chown.c (rpl_chown): Return -1 on failure.
13130
13131 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13132
13133         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
13134         Don't check for stddef.h.
13135         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
13136         don't use its results.
13137         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
13138         since we include them unconditionally.  Don't require
13139         AM_STDBOOL_H, since stdbool is a prerequisite.
13140         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
13141         since we assume C89 or better.
13142         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
13143         as we don't use their results.
13144         Don't check for fchdir, memmove, memset, strrchr, as we use
13145         them unconditionally.
13146         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
13147         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
13148
13149 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13150
13151         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
13152         Include <stddef.h> unconditionally, since we assume C89 now.
13153         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
13154         * lib/fts.c: Include fts_.h first, to check interface.
13155         Do not include intprops.h; no longer needed.
13156         Include cycle-check.h and hash.h, since fts_.h no longer does.
13157         Remove unnecessary casts of closedir to void.
13158         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
13159         decide whether to decrement nlinks.
13160         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
13161         (FTS): Use struct hash_table * instead of Hash_table, so that
13162         we no longer need to include hash.h here.
13163
13164 2005-05-18  Jim Meyering  <jim@meyering.net>
13165
13166         * modules/dirfd (License): Change to LGPL.  Most of the code
13167         is already in the public domain.
13168
13169 2005-05-18  Jim Meyering  <jim@meyering.net>
13170
13171         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
13172         Reported by Yoann Vandoorselaere.
13173
13174 2005-05-17  Jim Meyering  <jim@meyering.net>
13175
13176         * m4/fts.m4: New file, from coreutils.
13177
13178 2005-05-17  Jim Meyering  <jim@meyering.net>
13179
13180         * lib/fts.c, lib/fts_.h: New files, from coreutils.
13181
13182 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13183
13184         Sync from coreutils.
13185         * m4/unlinkdir.m4: New file.
13186
13187 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13188
13189         Sync from coreutils.
13190         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
13191         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
13192         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
13193         White space changes only.
13194         * lib/makepath.c (make_path): Port to hosts where leading "//" is
13195         special.
13196         * lib/yesno.c: Include getline.h, not ctype.h.
13197         (yesno): Don't remove leading white space; POSIX doesn't allow it.
13198         Use getline to remove arbitrary restriction on response length.
13199
13200 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13201
13202         * config/srclist-update: Spell out "Street" in FSF postal
13203         mail address; this is the style the FSF seems to prefer.
13204
13205         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
13206         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
13207         this updates FSF postal mail address.
13208
13209         Sync from coreutils.
13210         * modules/unlinkdir: New file.
13211         * modules/yesno (Depends-on): Add getline.
13212         * MODULES.html.sh (File system functions): Add unlinkdir.
13213
13214 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13215
13216         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
13217         lib/strsep.h:
13218         Change the initial comment to refer to GPL, not LGPL.
13219         gnulib-tool will change it to LGPL as needed.
13220
13221         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
13222         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
13223         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
13224         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
13225         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
13226         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
13227         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
13228         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
13229         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
13230         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
13231         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
13232         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
13233         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
13234         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
13235         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
13236         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
13237         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
13238         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
13239         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
13240         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
13241         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
13242         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
13243         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
13244         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
13245         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
13246         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
13247         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
13248         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
13249         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
13250         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
13251         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
13252         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
13253         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
13254         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
13255         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
13256         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
13257         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
13258         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
13259         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
13260         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
13261         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
13262         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
13263         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
13264         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
13265         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
13266         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
13267         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
13268         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
13269         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
13270         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
13271         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13272         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
13273         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
13274         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
13275         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
13276         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
13277         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
13278         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
13279         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
13280         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
13281         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
13282         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
13283         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
13284         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
13285         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
13286         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
13287         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
13288         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
13289         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
13290         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
13291         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
13292         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
13293         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
13294         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
13295         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
13296         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
13297         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
13298         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
13299         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
13300         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
13301         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
13302         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
13303         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
13304         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
13305         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
13306         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
13307         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
13308         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
13309         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
13310         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
13311         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
13312         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
13313         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
13314         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
13315         lib/yesno.c, lib/yesno.h:
13316         Update FSF postal mail address.
13317
13318 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13319
13320         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13321         tests/test-memmem.c, tests/test-stpncpy.c:
13322         Update FSF postal mail address.
13323
13324 2005-05-13  Bruno Haible  <bruno@clisp.org>
13325
13326         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13327         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13328         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13329         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13330         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13331         Add support for 64-bit integers in the MSVC compiler.
13332
13333 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13334
13335         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13336
13337 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13338
13339         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13340
13341 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13342
13343         * doc/getdate.texi (General date syntax): Don't say that date
13344         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13345         Problem reported by Nic Ferrier.
13346
13347 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13348
13349         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13350         specified in ai_socktype. Fix invalid ai_protocol
13351         check. ai_protocol is usually set to 0 or depending on
13352         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13353         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13354         ai_socktype / ai_protocol in the returned addrinfo structure.
13355
13356 2005-05-10  Simon Josefsson  <jas@extundo.com>
13357
13358         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13359         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13360
13361 2005-05-10  Karl Berry  <karl@gnu.org>
13362
13363         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13364         (from http://www.gnu.org/licenses).
13365         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13366         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13367         fdl.texi suffices.
13368
13369 2005-05-10  Karl Berry  <karl@gnu.org>
13370
13371         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13372         (COPYING.DOC): remove.
13373
13374         * config/srclist-update: new FSF address.
13375
13376 2005-05-10  Derek Price  <derek@ximbiot.com>
13377
13378         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13379         possible.
13380
13381 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13382             Bruno Haible  <bruno@clisp.org>
13383
13384         * modules/inet_ntop: New file.
13385         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13386         inet_ntop.
13387
13388 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13389             Bruno Haible  <bruno@clisp.org>
13390
13391         * m4/inet_ntop.m4: New file.
13392
13393 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13394             Bruno Haible  <bruno@clisp.org>
13395
13396         * lib/inet_ntop.h: New file.
13397         * lib/inet_ntop.c: New file, from glibc with modifications.
13398
13399 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13400
13401         * modules/time_r (License): Change to LGPL.
13402         * modules/extensions (License): Change to LGPL.  Actually,
13403         the license is more permissive than that, but currently gnulib-tool
13404         doesn't know how to handle more-permissive licenses.
13405
13406         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13407         Problem reported by Dave Love.
13408
13409 2005-05-08  Jim Meyering  <jim@meyering.net>
13410
13411         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13412         blank.
13413
13414 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13415
13416         * modules/argmatch (Depends-on): Add stdbool.
13417         * modules/backupfile (Depends-on): Likewise.
13418         * modules/chdir-long (Depends-on): Likewise.
13419         * modules/closeout (Depends-on): Likewise.
13420         * modules/cycle-check (Depends-on): Likewise.
13421         * modules/dirname (Depends-on): Likewise.
13422         * modules/fnmatch (Depends-on): Likewise.
13423         * modules/fsusage (Depends-on): Likewise.
13424         * modules/fwriteerror (Depends-on): Likewise.
13425         * modules/getcwd (Depends-on): Likewise.
13426         * modules/getloadavg (Depends-on): Likewise.
13427         * modules/hard-locale (Depends-on): Likewise.
13428         * modules/makepath (Depends-on): Likewise.
13429         * modules/mountlist (Depends-on): Likewise.
13430         * modules/nanosleep (Depends-on): Likewise.
13431         * modules/posixtm (Depends-on): Likewise.
13432         * modules/quotearg (Depends-on): Likewise.
13433         * modules/readtokens (Depends-on): Likewise.
13434         * modules/readtokens0 (Depends-on): Likewise.
13435         * modules/readutmp (Depends-on): Likewise.
13436         * modules/save-cwd (Depends-on): Likewise.
13437         * modules/strftime (Depends-on): Likewise.
13438         * modules/userspec (Depends-on): Likewise.
13439         * modules/utimecmp (Depends-on): Likewise.
13440         * modules/xgetcwd (Depends-on): Likewise.
13441         * modules/xnanosleep (Depends-on): Likewise.
13442         * modules/xstrtod (Depends-on): Likewise.
13443         * modules/yesno (Depends-on): Likewise.
13444
13445 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13446
13447         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13448         needless checks.
13449
13450 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13451
13452         Merge from coreutils.  Among other things,
13453         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13454         * lib/fd-safer.c: New file.
13455         * lib/fcntl-safer.h, open-safer.c: Remove.
13456         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13457         * lib/dup-safer.c: Include unistd-safer.h first.
13458         Don't include errno.h.
13459         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
13460         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
13461         * lib/file-type.c: Rely on file-type.h change.
13462         * lib/getloadavg.c: Include unistd-safer.h.
13463         (getloadavg): Use safer open.
13464         * lib/getusershell.c: Include "stdio-safer.h".
13465         (getusershell): Use safer fopen.
13466         * lib/long-options.c (long_options): Use NULL rather than 0.
13467         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13468         'free'.
13469         * lib/modechange.c: Likewise.
13470         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13471         (MODE_DONE): New constant.
13472         (struct mode_change): Remove 'next' member.
13473         (make_node_op_equals): New function; like the old one of the
13474         same name, except it allocates an array.
13475         (mode_compile, mode_create_from_ref): Use it.
13476         (mode_compile): Allocate result as an array, not a linked list.
13477         Parse octal string ourself, so that we catch mistakes like "+0".
13478         (mode_adjust): Arg is an array, not a linked list.
13479         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13480         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13481         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13482         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
13483         Remove.  This is now stat-macros.h's job.
13484         (talloc): Remove.  All callers replaced by xalloc, so that
13485         our invokers don't have to worry about reporting memory failures.
13486         (make_node_op_equals): Remove.
13487         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13488         New constants.
13489         (struct mode_change): Moved here from modechange.h.
13490         (mode_append_entry): Remove.
13491         (mode_compile): Remove MASKED_OPS arg, since it encouraged
13492         apps to have incorrect behavior.  Use simpler algorithm for head
13493         and tail.  Don't futz with umask; that's now the job of mode_adjust.
13494         Detect more invalid usages rather than having somewhat-random behavior.
13495         Don't insert an "a=" action, as that leads to incorrect behavior.
13496         (mode_compile, mode_create_from_ref): Return NULL on error instead
13497         of an enum, since now there's only one way to have an error.  All
13498         callers changed.
13499         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
13500         at the correct time.  Simplify calculation of "+u" and its ilk.
13501         Don't mishandle "+X".
13502         (mode_free): Remove "register" and localize decls.
13503         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13504         (struct mode_change): Move to modechange.c; callers don't
13505         need to see this stuff.
13506         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
13507         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
13508         (mode_change, mode_adjust): Reflect the new signatures noted above.
13509         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
13510         that might redefine system include files.
13511         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
13512         (my_usleep): Use NULL rather than (void *) 0.
13513         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
13514         Use siginterrupt to specify that system calls should be interrupted.
13515         (rpl_nanosleep): Move initialization of suspended closer to call of
13516         my_usleep.
13517         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
13518         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
13519         (desirable_utmp_entry): New function.
13520         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
13521         using x2nrealloc, to simplify logic.
13522         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
13523         size calculation.  Do not assume utmp file is a regular file.
13524         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
13525         (READ_UTMP_CHECK_PIDS): New constant.
13526         * lib/save-cwd.c: Include unistd-safer.h.
13527         (save_cwd): Use fd_safer.
13528         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
13529         [!_LIBC] Include "stat-macros.h" instead.
13530         * lib/unistd-safer.h (fd_safer): New decl.
13531
13532 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13533
13534         * modules/getloadavg (Depends-on): Add unistd-safer.
13535         * modules/getusershell (Depends-on): Add stdio-safer.
13536         * modules/lstat (Depends-on): Remove xalloc.
13537         * modules/mkstemp (Depends-on): Add stat-macros.
13538         * modules/modechange (Depends-on): Remove xstrtol.
13539         Add stat-macros, xalloc.
13540         * modules/save-cwd (Depends-on): Add unistd-safer.
13541         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13542         * modules/unistd-safer (Files): Add lib/fd-safer.c
13543         (Makefile.am): Remove lib_SOURCES.
13544
13545         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13546         Remove fcntl-safer; unistd-safer supersedes it.
13547
13548 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13549
13550         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13551         AC_HEADER_STAT.
13552         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13553         (gl_PREREQ_CHOWN): Remove.
13554         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13555         it.  Don't require AC_HEADER_STAT.
13556         (gl_PREREQ_LSTAT): Remove.
13557         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13558         Don't require AC_HEADER_STAT.
13559         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13560         (gl_PREREQ_RMDIR): Remove.
13561         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13562         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13563         the stat-macros module a prerequisite.
13564         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13565         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13566         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13567         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13568         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13569         variable names.
13570         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13571         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13572         variable prefixes.
13573         * m4/fcntl-safer.m4: Remove.
13574         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13575         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13576         Invoke gl_PREREQ_FD_SAFER.
13577         (gl_PREREQ_FD_SAFER): New macro.
13578         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13579         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13580         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13581         Remove duplicate call to AC_LIBOBJ(readutmp).
13582         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13583
13584         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13585         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13586
13587 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13588
13589         * MODULES.html.sh (Misc): Add byteswap.
13590
13591 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13592
13593         * modules/getcwd (Depends-on): Add extensions.
13594         * modules/openat (Depends-on): Likewise.
13595
13596 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13597
13598         * modules/byteswap: New file.
13599
13600 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13601
13602         * m4/byteswap.m4: New file.
13603
13604 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13605
13606         * lib/byteswap_.h: New file.
13607
13608 2005-04-25  Karl Berry  <karl@gnu.org>
13609
13610         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13611
13612 2005-04-25  Albert Chin  <china@thewrittenword.com>
13613
13614         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13615         Toolkit C bug.
13616
13617 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13618
13619         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13620         (func_ln_if_changed) Remove forcibly for no error message
13621         in case file does not exist.
13622
13623 2005-04-19  Simon Josefsson  <jas@extundo.com>
13624
13625         * gnulib-tool (Options): Make --symlink mean --symbolic.
13626
13627 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13628
13629         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13630
13631 2005-04-16  Simon Josefsson  <jas@extundo.com>
13632
13633         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13634
13635 2005-04-15  Simon Josefsson  <jas@extundo.com>
13636
13637         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13638
13639 2005-04-15  Simon Josefsson  <jas@extundo.com>
13640
13641         * gnulib-tool: Rename --symlink to --symbolic.
13642
13643 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13644
13645         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13646         symbolic links to files instead of copying/moving.  Add --aux-dir,
13647         specifying directory relative --dir where auxiliary build tools
13648         are placed.
13649
13650 2005-04-14  Bruno Haible  <bruno@clisp.org>
13651
13652         * modules/allocsa (License): Change to LGPL.
13653         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13654
13655 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13656
13657         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13658         that "UTC +1 second" continues to work.  Problem reported
13659         by Dmitry V. Levin.
13660         (relunit_snumber): New rule.
13661         (relunit): Use it.
13662
13663 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13664
13665         * lib/getdate.y (universal_time_zone_table): New constant.
13666         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13667         universal_time_zone_table.
13668         (lookup_zone): Prefer universal_time_zone_table to
13669         local_time_zone_table, so that "GMT" time stamps are allowed in
13670         London during the summer.  Problem reported by Ian Abbott.
13671
13672 2005-04-12  Jim Meyering  <jim@meyering.net>
13673
13674         * lib/human.c (humblock): Set *options even when returning due to
13675         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13676         warning from gcc-4.
13677
13678 2005-04-09  Jim Meyering  <jim@meyering.net>
13679
13680         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13681         -Wuninitialized: initialize tm0.tm_year.
13682
13683 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13684
13685         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13686         count, since there's no maximum.  All uses changed.
13687         Add member dsts_seen.
13688         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13689         not being INT_MAX.
13690         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13691         Use pc_rels_seen to decide whther a date is absolute.
13692
13693         * lib/getdate.y (number): Don't overwrite year.
13694         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13695         check.
13696
13697 2005-04-02  Simon Josefsson  <jas@extundo.com>
13698
13699         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13700         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13701
13702 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13703
13704         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13705         where no absolute path name can be longer than PATH_MAX.
13706
13707 2005-03-27  Jim Meyering  <jim@meyering.net>
13708
13709         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13710
13711 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13712
13713         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13714         "one's complement" -> "ones' complement" in comment, as per Knuth.
13715         "value of type" -> "type or expression" in comment.
13716         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13717
13718 2005-03-26  Jim Meyering  <jim@meyering.net>
13719
13720         Comment nits.
13721         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13722         Correct typos: s/or/of/.
13723
13724 2005-03-26  Jim Meyering  <jim@meyering.net>
13725
13726         * modules/check-include-files: Move to ../ and rename to...
13727         * check-module: ...this.
13728
13729 2005-03-25  Jim Meyering  <jim@meyering.net>
13730
13731         * modules/xvasprintf (Files): Add xalloc.h.
13732
13733 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13734
13735         * modules/gettext (Files): config/config.rpath ->
13736         build-aux/config.rpath
13737         * modules/iconv (Files): Likewise.
13738         Problem reported by Oskar Liljeblad.
13739
13740 2005-03-23  Jim Meyering  <jim@meyering.net>
13741
13742         * modules/check-include-files: New script to check for
13743         missing dependencies, multiple includes, etc.
13744
13745         * modules/c-strtold (Depends-on): Add xalloc.
13746         * modules/c-strtod (Depends-on): Add xalloc.
13747         * modules/hash (Depends-on): Add xalloc.
13748         (Files): Remove lib/xalloc.h.
13749
13750         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13751         * modules/userspec (Files): Add lib/inttostr.h.
13752
13753 2005-03-23  Jim Meyering  <jim@meyering.net>
13754
13755         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13756
13757 2005-03-22  Jim Meyering  <jim@meyering.net>
13758
13759         * modules/stat-macros: New module.
13760         * modules/canonicalize, modules/euidaccess, modules/file-type,
13761         * modules/filemode, modules/lchown, modules/makepath,
13762         * modules/rmdir, modules/stat: Depend on new stat-macros module
13763         rather than listing lib/stat-macros.h manually.
13764         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13765
13766 2005-03-22  Jim Meyering  <jim@meyering.net>
13767
13768         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13769
13770 2005-03-22  Bruno Haible  <bruno@clisp.org>
13771
13772         * config/srclist.txt: Replace target directory 'config' with
13773         'build-aux'.
13774         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13775         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13776         ../build-aux/.
13777
13778 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13779
13780         * modules/chdir-long (Depends-on): Add mempcpy.
13781
13782         * modules/acl, modules/backupfile, modules/c-strtod,
13783         modules/c-strtold, modules/canon-host, modules/canonicalize,
13784         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13785         modules/exclude, modules/exitfail, modules/file-type,
13786         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13787         modules/getdate, modules/getline, modules/getpagesize,
13788         modules/getpass, modules/getugroups, modules/group-member,
13789         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13790         modules/inttostr, modules/long-options, modules/makepath,
13791         modules/md5, modules/memcasecmp, modules/memcoll,
13792         modules/modechange, modules/mountlist, modules/path-concat,
13793         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13794         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13795         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
13796         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
13797         modules/strftime, modules/strndup, modules/strverscmp,
13798         modules/timespec, modules/unlocked-io, modules/userspec,
13799         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
13800         modules/yesno:
13801         Remove lib_SOURCES line from Makefile.am section, as this is now
13802         done automatically by the corresponding Autoconf macro.
13803
13804 2005-03-21  Jim Meyering  <jim@meyering.net>
13805
13806         Changes imported from coreutils.
13807
13808         * lib/cycle-check.c: Don't include xalloc.h.
13809
13810         * lib/path-concat.c: Don't include assert.h.
13811         (path_concat): Remove assertion that would have triggered
13812         for ABASE starting with more than one slash.
13813         Reported by Andreas Schwab.
13814
13815         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
13816         properly when ABASE is an absolute file name.
13817         Correct the description of this function.
13818         Include <assert.h>.
13819         Add an assertion and a test driver.
13820         This fixes a bug introduced on 2004-07-02.
13821         Andreas Schwab reported the resulting failure of cp --parents:
13822         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
13823
13824 2005-03-21  Jim Meyering  <jim@meyering.net>
13825
13826         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
13827         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
13828
13829 2005-03-21  Jim Meyering  <jim@meyering.net>
13830         and  Paul Eggert  <eggert@cs.ucla.edu>
13831
13832         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
13833         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
13834         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
13835         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
13836         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
13837         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
13838         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
13839         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
13840         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
13841         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
13842         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
13843         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
13844         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
13845         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
13846         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
13847         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
13848         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
13849         for these modules.
13850
13851 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
13852
13853         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
13854         (which shouldn't happen), generate nothing instead of returning 0
13855         immediately, so that nstrftime (NULL, ...) doesn't return 0.
13856
13857 2005-03-16  Bruno Haible  <bruno@clisp.org>
13858
13859         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
13860         HAVE_LONGLONG_64BIT.
13861
13862 2005-03-16  Bruno Haible  <bruno@clisp.org>
13863
13864         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
13865         HAVE_LONGLONG_64BIT.
13866
13867 2005-03-16  Bruno Haible  <bruno@clisp.org>
13868
13869         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
13870         HAVE_LONGLONG_64BIT.
13871
13872 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13873
13874         * lib/strftime.c (my_strftime): Prepend space to format so that we can
13875         reliably distinguish strftime failure from empty output on POSIX
13876         hosts.
13877
13878 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13879
13880         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
13881         (iconv_string): Don't guess a size-zero buffer, as that might cause
13882         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
13883         result would be 'too large', where 'too large' is (heuristically)
13884         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
13885         overflow concerns.  This will prevent some unwanted malloc failures
13886         when the inputs are very large.
13887
13888 2005-03-15  Karl Berry  <karl@gnu.org>
13889
13890         * config/srclist.txt (config.rpath): from gettext.
13891         * config/config.rpath: update.
13892
13893 2005-03-15  Bruno Haible  <bruno@clisp.org>
13894
13895         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
13896         to 'negate'.
13897
13898         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
13899         variable.
13900
13901         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
13902         results.
13903
13904 2005-03-14  Simon Josefsson  <jas@extundo.com>
13905
13906         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
13907         <fx@gnu.org>.
13908
13909 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
13910
13911         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
13912         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
13913         intprops.h.
13914         * lib/strtol.c: Likewise.
13915
13916 2005-03-14  Jim Meyering  <jim@meyering.net>
13917
13918         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
13919         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
13920         to be nonzero so that we (and caller) can detect the difference
13921         between a valid zero-length expansion and an error return, even
13922         when the underlying strftime fails before writing anything into
13923         that location.
13924
13925 2005-03-14  Bruno Haible  <bruno@clisp.org>
13926
13927         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
13928         Update from GNU gettext 0.14.3.
13929
13930 2005-03-10  Jim Meyering  <jim@meyering.net>
13931
13932         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
13933
13934 2005-03-10  Jim Meyering  <jim@meyering.net>
13935
13936         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
13937         so that this module works on systems without fchdir.
13938
13939 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
13940
13941         Factor int-properties macros into a single file, except for
13942         glibc-related files.
13943         * lib/intprops.h: New file.
13944         * lib/getloadavg.c: Include it instead of limits.h.
13945         (INT_STRLEN_BOUND): Remove.
13946         * lib/human.c: Include intprops.h.
13947         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
13948         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
13949         302/1000.
13950         * lib/inttostr.h: Include intprops.h instead of limits.h.
13951         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
13952         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
13953         for consistency with intprops.h.
13954         (time_t_is_integer, twos_complement_arithmetic): Use them.
13955         * lib/sig2str.h: Include <signal.h>, intprops.h.
13956         (INT_STRLEN_BOUND): Remove.
13957         * lib/strftime.c (TYPE_SIGNED): Remove.
13958         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
13959         * lib/strtol.c: Adjust comments to match intprops.h.
13960         * lib/userspec.c: Include intprops.h.
13961         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
13962         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
13963         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
13964         instead of rolling our own expressions.
13965         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
13966
13967         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
13968         instead of int.
13969         (my_strftime): Do not mishandle years close to INT_MAX, by doing
13970         the right thing even if adding 1900 would overflow.  Similarly
13971         for tm_mon + 1 and tm_yday + 1.
13972         Make %Y always equivalent to %C%y, and similarly for %G and %g.
13973         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
13974         (DO_SIGNED_NUMBER): New macro.
13975         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
13976
13977 2005-03-07  Bruno Haible  <bruno@clisp.org>
13978
13979         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
13980
13981 2005-03-07  Bruno Haible  <bruno@clisp.org>
13982
13983         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
13984
13985 2005-03-04  Derek R. Price  <derek@ximbiot.com>
13986
13987         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
13988         (func_import): Only replace files via --import when they have actually
13989         changed.
13990
13991 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13992
13993         * m4/mmap-anon.m4: New file.
13994         * m4/pagealign_alloc.m4: New file.
13995
13996 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13997             Bruno Haible  <bruno@clisp.org>
13998
13999         * modules/pagealign_alloc: New file.
14000         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
14001
14002 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14003             Bruno Haible  <bruno@clisp.org>
14004
14005         * lib/pagealign_alloc.h: New file.
14006         * lib/pagealign_alloc.c: New file.
14007
14008 2005-03-03  Bruno Haible  <bruno@clisp.org>
14009
14010         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
14011         Use an all-permissive copyright notice, recommended by RMS.
14012
14013 2005-03-02  Bruno Haible  <bruno@clisp.org>
14014
14015         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
14016         of AIX, the replacement has to be done only after <string.h> is
14017         included, therefore not in config.h. stpncpy.h does the replacement,
14018         and stpncpy.c uses it.
14019
14020 2005-03-02  Bruno Haible  <bruno@clisp.org>
14021
14022         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
14023         stpncpy.c uses it.
14024
14025 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14026
14027         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
14028         The workaround isn't strictly needed for POSIX conformance, and
14029         it's too much of a pain to configure and maintain.  We'll ask
14030         people to fix their kernels instead.
14031         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
14032         (NANOSLEEP_BUG_WORKAROUND): Remove.
14033         (xnanosleep): Remove the workaround.
14034
14035 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14036
14037         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
14038         Reported by Derek Price.
14039         (Include): Add "timespec.h".
14040
14041         * modules/xnanosleep (Depends-on): Remove gethrxtime.
14042
14043 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14044
14045         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14046         to detect nanosleep bug.
14047
14048 2005-03-01  Bruno Haible  <bruno@clisp.org>
14049
14050         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14051
14052 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14053
14054         * modules/gethrxtime: New file.
14055         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14056         (Depends-on): Add gethrxtime.
14057         (configure.ac): Add gl_XNANOSLEEP.
14058         (Makefile.am): Remove lib_SOURCES line.
14059
14060 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14061
14062         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14063         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14064
14065 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14066
14067         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14068         * lib/timespec.h (gettime): Return void, since it always
14069         succeeds now.  All uses changed.
14070         * lib/gettime.c (gettime) Likewise.
14071         [HAVE_NANOTIME]: Prefer nanotime.
14072         Assume gettimeofday succeeds, as POSIX requires.
14073         Assime time () succeeds, since other code already does.
14074         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14075         (timespec_subtract): Remove.
14076         (NANOSLEEP_BUG_WORKAROUND): New constant.
14077         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14078         things considerably.  Use it only on GNU/Linux hosts, since the
14079         workaround shouldn't be needed elsewhere.
14080
14081 2005-02-24  Bruno Haible  <bruno@clisp.org>
14082
14083         * modules/gettext (Files): Add m4/glibc2.m4.
14084
14085 2005-02-24  Bruno Haible  <bruno@clisp.org>
14086
14087         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
14088         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
14089         * m4/progtest.m4:
14090         Update from GNU gettext 0.14.2.
14091         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
14092
14093 2005-02-24  Bruno Haible  <bruno@clisp.org>
14094
14095         * lib/localcharset.c: Update from GNU gettext 0.14.2.
14096         * lib/config.charset: Update from GNU gettext 0.14.2.
14097
14098 2005-02-24  Bruno Haible  <bruno@clisp.org>
14099
14100         * lib/gettext.h: Update from GNU gettext 0.14.2.
14101
14102 2005-02-23  Simon Josefsson  <jas@extundo.com>
14103
14104         * m4/iconvme.m4: New file.
14105
14106 2005-02-23  Jim Meyering  <jim@meyering.net>
14107
14108         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
14109         change.
14110         Thanks to Bruno Haible for catching it.
14111
14112 2005-02-22  Simon Josefsson  <jas@extundo.com>
14113
14114         * modules/iconvme: New file.
14115
14116         * MODULES.html.sh: Add iconvme.
14117
14118 2005-02-22  Simon Josefsson  <jas@extundo.com>
14119
14120         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
14121
14122 2005-02-22  Simon Josefsson  <jas@extundo.com>
14123
14124         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
14125
14126 2005-02-22  Jim Meyering  <jim@meyering.net>
14127
14128         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
14129         s/ifndef/ifdef/.
14130
14131 2005-02-20  Neil Conway  <neilc@samurai.com>
14132
14133         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
14134         returned by OSX/Darwin if the specified buffer is not large
14135         enough for the hostname.
14136
14137 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14138
14139         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
14140         pass it to _help, otherwise the latter coredumps trying to
14141         dereference state.root_argp.
14142
14143 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14144
14145         * modules/chdir-long (Depends-on): Add memrchr.
14146         * modules/memrchr (Files): Add lib/memrchr.h.
14147         (Include): "memrchr.h".
14148
14149 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14150
14151         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
14152
14153 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14154
14155         * lib/memrchr.h: New file.
14156         * lib/chdir-long.c: Include it.
14157         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
14158         Don't bother including stddef.h.
14159
14160 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
14161
14162         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
14163         inclusion.
14164         Include <sys/types.h>, for dev_t.
14165         (ME_DUMMY, ME_REMOTE): Move from here....
14166         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
14167         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
14168         Dmitry V. Levin.
14169         Include mountlist.h first, to test the interface.
14170
14171 2005-01-29  Bruno Haible  <bruno@clisp.org>
14172
14173         * lib/progname.c (program_name): Initialize.
14174         Needed when linking statically on MacOS X.
14175
14176 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14177
14178         Sync from coreutils.
14179         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
14180         (Depends-on): Add c-strtod.
14181         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
14182
14183 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14184
14185         Sync from coreutils.
14186         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
14187
14188         Remove files that are specific to coreutils.
14189         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
14190
14191 2005-01-28  Bruno Haible  <bruno@clisp.org>
14192
14193         * modules/javacomp: New file.
14194         * MODULES.html.sh (Java): Add javacomp.
14195
14196 2005-01-28  Bruno Haible  <bruno@clisp.org>
14197
14198         * m4/javacomp.m4: New file, from GNU gettext.
14199
14200 2005-01-28  Bruno Haible  <bruno@clisp.org>
14201
14202         * lib/javacomp.sh.in: New file, from GNU gettext.
14203         * lib/javacomp.h: New file, from GNU gettext.
14204         * lib/javacomp.c: New file, from GNU gettext.
14205
14206 2005-01-26  Simon Josefsson  <jas@extundo.com>
14207
14208         * lib/gai_strerror.c: Use GPL in header.
14209
14210 2005-01-26  Bruno Haible  <bruno@clisp.org>
14211
14212         * modules/javaexec: New file.
14213         * MODULES.html.sh (Java): Add javaexec.
14214
14215 2005-01-26  Bruno Haible  <bruno@clisp.org>
14216
14217         * m4/javaexec.m4: New file, from GNU gettext.
14218
14219 2005-01-26  Bruno Haible  <bruno@clisp.org>
14220
14221         * lib/javaexec.sh.in: New file, from GNU gettext.
14222         * lib/javaexec.h: New file, from GNU gettext.
14223         * lib/javaexec.c: New file, from GNU gettext.
14224
14225 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14226
14227         * modules/lchown (Depends-on): Remove lchown.h
14228
14229 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14230
14231         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
14232         must be defined if the header file was not found, in order
14233         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
14234
14235 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14236
14237         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
14238         initializers for struct pentry_state.
14239         (__argp_error): Check return value of __asprintf
14240         (__argp_failure): Translate error message
14241
14242         * lib/argp-parse.c: Removed braces around the expansion of N_()
14243
14244 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14245
14246         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
14247         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
14248         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
14249         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
14250         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
14251         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
14252         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
14253         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
14254         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
14255         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
14256         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
14257         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
14258         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
14259         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
14260         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
14261         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
14262         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
14263         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
14264         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
14265         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
14266         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
14267         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
14268         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
14269         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
14270         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
14271         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
14272         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
14273         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
14274         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
14275         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
14276         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
14277         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
14278         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
14279         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
14280         xstrtol.m4, xstrtoumax.m4, yesno.m4:
14281         Use an all-permissive copyright notice, recommended by RMS.
14282
14283 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
14284
14285         * modules/chdir-long (Depends-on): Remove mempcpy.
14286
14287 2005-01-21  Jim Meyering  <jim@meyering.net>
14288
14289         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
14290         same value as for Solaris 9.
14291
14292         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
14293         component length.  This included changing the parameter to be
14294         of type `char *' rather than `char const *'.
14295         * lib/chdir-long.h (chdir_long): Update prototype.
14296
14297         * lib/openat.c (fdopendir, fstatat): New functions.
14298         * lib/openat.h: Include headers required for use of DIR and struct
14299         stat.
14300         [AT_SYMLINK_NOFOLLOW]: Define.
14301         (fdopendir, fstatat): Add prototypes.
14302
14303 2005-01-21  Bruno Haible  <bruno@clisp.org>
14304
14305         * modules/classpath: New file.
14306         * MODULES.html.sh (Java): Add classpath.
14307
14308 2005-01-21  Bruno Haible  <bruno@clisp.org>
14309
14310         * lib/classpath.h: New file, from GNU gettext.
14311         * lib/classpath.c: New file, from GNU gettext.
14312
14313 2005-01-20  Simon Josefsson  <jas@extundo.com>
14314
14315         * modules/version-etc-fsf: New file.
14316
14317 2005-01-20  Simon Josefsson  <jas@extundo.com>
14318
14319         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14320         * lib/version-etc.c: Remove version_etc_copyright.
14321         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14322         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14323
14324 2005-01-20  Simon Josefsson  <jas@extundo.com>
14325
14326         * lib/base64.h (isbase64): Add.
14327
14328         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14329         using a unsigned prototype, don't inline.
14330         (base64_decode): Use it.
14331
14332 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14333
14334         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14335         it.
14336
14337 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14338
14339         * lib/save-cwd.c (save_cwd): Remove code to support the case
14340         where fchdir is missing or flaky.
14341
14342 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14343
14344         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14345
14346 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14347
14348         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14349         AC_LIBSOURCES now does this.
14350         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14351         with new ullong_max module.
14352
14353 2005-01-19  Bruno Haible  <bruno@clisp.org>
14354
14355         * modules/sh-quote: New file.
14356         * MODULES.html.sh (Executing programs): Add sh-quote.
14357
14358 2005-01-19  Bruno Haible  <bruno@clisp.org>
14359
14360         * lib/sh-quote.h: New file, from GNU gettext.
14361         * lib/sh-quote.c: New file, from GNU gettext.
14362
14363 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14364
14365         Merge from coreutils.
14366         * m4/ullong_max.m4: New file.
14367         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14368         (gl_MACROS): Assume localeconv exists.
14369
14370 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14371
14372         Merge changes from coreutils, as described below in several
14373         changelogs dated today.
14374
14375         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14376         (O_DIRECTORY): Remove; not needed here, since "." must be
14377         a directory.  All uses removed.
14378         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14379         universal on Suns, and we also need to test for IRIX.
14380         Revamp code to use 'if' rather than '#if'.
14381         Avoid unnecessary comparison of cwd->desc to 0.
14382
14383         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14384         for known valid error numbers rather than observed invalid ones.
14385
14386 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14387
14388         * modules/ullong_max: New file.
14389
14390         * modules/chdir-long, modules/openat: New files.
14391         * modules/save-cwd (Depends-on): Depend on chdir-long.
14392         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14393
14394 2005-01-18  Jim Meyering  <jim@meyering.net>
14395
14396         Merge from coreutils.
14397         * m4/chdir-long.m4, m4/openat.m4: New files.
14398         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14399         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14400         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14401         is sane and DOES follow symlinks.  Besides, testing 20 different
14402         systems found no broken chown implementations.
14403         Prompted by a change in rsync's copy of this macro.
14404         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14405
14406         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14407
14408         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14409         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14410         NULL-means-set-to-current-time semantics.
14411         Remove temporary file immediately, rather than waiting
14412         for configure's at-exit trap code to do it.
14413
14414 2005-01-18  Jim Meyering  <jim@meyering.net>
14415
14416         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14417
14418         * lib/utimens.c (futimens): Account for the fact that futimes
14419         can also fail with errno == ENOSYS or errno == ENOENT.
14420         Patch from Dmitry V. Levin.
14421
14422         Change the name of the robust chdir function from chdir to chdir_long.
14423         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14424         (restore_cwd): Use chdir_long, not chdir.
14425         * lib/chdir-long.c: Renamed from chdir.c.
14426         * lib/chdir-long.h: Renamed from chdir.h.
14427         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14428         Hurd.
14429
14430 2005-01-18  Bruno Haible  <bruno@clisp.org>
14431
14432         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14433         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14434         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14435         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14436         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14437         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14438         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14439         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14440         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14441         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14442         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14443         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14444         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14445         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14446         Use an all-permissive copyright notice, recommended by RMS.
14447
14448 2005-01-18  Bob Proulx  <bob@proulx.com>
14449
14450         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14451         simplify offsetof() macro construct to avoid compile failure with
14452         native HP-UX 11.0 ANSI C compiler.
14453
14454 2005-01-17  Bruno Haible  <bruno@clisp.org>
14455
14456         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14457         redundant because stpncpy.m4 takes care of it.
14458
14459 2005-01-17  Bruno Haible  <bruno@clisp.org>
14460
14461         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
14462
14463 2005-01-17  Bruno Haible  <bruno@clisp.org>
14464
14465         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14466         used.
14467
14468 2005-01-17  Bruno Haible  <bruno@clisp.org>
14469
14470         * lib/fwriteerror.h (fwriteerror): Change specification to include
14471         fclose.
14472         * lib/fwriteerror.c: Include <stdbool.h>.
14473         (fwriteerror): At the end, close the file stream. Record whether
14474         stdout was already closed.
14475
14476 2005-01-17  Bruno Haible  <bruno@clisp.org>
14477
14478         * lib/execute.c (environ): Declare if needed.
14479         * lib/pipe.c (environ): Likewise.
14480         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14481
14482 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14483
14484         * modules/argp: Depend on vsnprintf
14485
14486 2005-01-10  Jim Meyering  <jim@meyering.net>
14487
14488         * modules/closeout (Depends-on): Add atexit.
14489
14490 2005-01-06  Bruno Haible  <bruno@clisp.org>
14491
14492         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
14493
14494 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14495
14496         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
14497         definitions to be after all include files, to avoid collisions.
14498         Problem reported by Bob Proulx.
14499
14500 2005-01-04  Jim Meyering  <jim@meyering.net>
14501
14502         Changes imported from coreutils.
14503         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
14504         as the mkstemp template, use a temporary directory and an
14505         8.3-friendly template to avoid trouble on systems like DJGPP.
14506         Reported by Juan M. Guerrero via Stepan Kasal.
14507         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
14508         close. Remove the temporary directory right away, rather than waiting
14509         for configure's at-exit trap code to do it.
14510         Suggestion from Stepan Kasal.
14511
14512 2005-01-01  Simon Josefsson  <jas@extundo.com>
14513
14514         * gnulib-tool: Print #include directives when --import'ing.
14515
14516 2004-12-28  Simon Josefsson  <jas@extundo.com>
14517
14518         * tests/test-base64.c: Include required header files.  Remove
14519         unused variables.
14520
14521 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14522
14523         * modules/error (Depends-on): Remove gettext.
14524
14525 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14526
14527         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
14528         not needed.  This removes a dependency on the gettext module.
14529         [defined _LIBC]: Do not include <libintl.h>; not needed.
14530
14531 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14532
14533         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14534         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14535
14536 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14537
14538         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14539         HAVE_DECL_STRTOLD.
14540
14541 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14542
14543         * modules/getdate (Depends-on): Remove alloca-opt.
14544
14545 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14546
14547         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14548
14549 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14550
14551         * lib/argp-parse.c: Include <stddef.h>.
14552         (alignof, alignto): New macros.
14553         (parser_init): Don't assume that void * is aligned sufficiently
14554         for struct option.
14555
14556         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14557         need to extend the stack.
14558         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14559         large.
14560
14561 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14562
14563         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14564
14565 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14566
14567         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14568         (2004-10-24) change.  Apparently this was a false alarm.
14569
14570         * modules/getdate: Depend on alloca-opt, not alloca.
14571
14572 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14573
14574         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14575         Remove now-obsolete comment about AIX.
14576         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14577         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14578         (YYMAXDEPTH): New macro.
14579
14580 2004-12-18  Simon Josefsson  <jas@extundo.com>
14581
14582         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14583
14584 2004-12-18  Bruno Haible  <bruno@clisp.org>
14585
14586         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14587
14588 2004-12-18  Bruno Haible  <bruno@clisp.org>
14589
14590         * lib/fatal-signal.c (fatal_signals): Make non-const.
14591         (init_fatal_signals): New function.
14592         (uninstall_handlers, install_handlers): Ignore signals that were set to
14593         SIG_IGN.
14594         (at_fatal_signal): Call init_fatal_signals.
14595         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14596         SIG_IGN.
14597         Reported by Paul Eggert.
14598
14599 2004-12-18  Bruno Haible  <bruno@clisp.org>
14600
14601         * doc/alloca.texi: New file.
14602         * doc/alloca-opt.texi: New file.
14603
14604 2004-12-17  Jim Meyering  <jim@meyering.net>
14605
14606         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14607         Otherwise, install-sh could exit with improper exit status when
14608         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14609
14610 2004-12-16  Simon Josefsson  <jas@extundo.com>
14611
14612         * tests/test-base64.c: Add license.
14613
14614 2004-12-15  Stepan Kasal  <address@hidden>
14615
14616         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14617
14618 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14619
14620         * modules/getcwd (Files): Add m4/d-ino.m4.
14621         Suggested by Mark D. Baushke.
14622
14623 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14624
14625         * lib/getdate.y (textint): New member "negative".
14626         (time_zone_hhmm): New function.
14627         Expect 14 shift-reduce conflicts, not 13.
14628         (o_colon_minutes): New rule.
14629         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14630         (yylex): Set the "negative" member of signed numbers.
14631
14632 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14633
14634         * doc/getdate.texi (Time of day items, Time zone items):
14635         Describe new formats +00:00, UTC+00:00.
14636
14637 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14638
14639         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14640         spurious "-l"s.  Problem reported by Stepan Kasal.
14641
14642 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14643
14644         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14645         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14646
14647 2004-12-04  Simon Josefsson  <jas@extundo.com>
14648
14649         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14650         Vandoorselaere <yoann@prelude-ids.org>.
14651
14652 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14653
14654         Changes imported from coreutils.
14655         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14656         exist.
14657         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14658
14659 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14660
14661         Changes imported from coreutils.
14662         * lib/hard-locale.c: Assume <locale.h> exists.
14663         Include "strdup.h".
14664         (GLIBC_VERSION): New macro.
14665         (hard_locale): Assume setlocale exists.
14666         Rewrite to avoid #ifdef.
14667         Use strdup rather than malloc + strcpy.
14668         * lib/human.c: Assume <locale.h> exists.
14669         (human_readable): Assume localeconv exists.
14670
14671 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14672
14673         * modules/hard-locale (Depends-on): Add strdup.
14674
14675 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14676
14677         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14678         convert T2, not T.  (Imported from libc.)
14679
14680 2004-11-30  Simon Josefsson  <jas@extundo.com>
14681
14682         * modules/restrict (License): Change to LGPL.
14683
14684 2004-11-30  Simon Josefsson  <jas@extundo.com>
14685
14686         * m4/restrict.m4: Add copyright and copying conditions.
14687
14688 2004-11-30  Simon Josefsson  <jas@extundo.com>
14689
14690         * m4/base64.m4: New file.
14691
14692 2004-11-30  Simon Josefsson  <jas@extundo.com>
14693
14694         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14695         base64.
14696
14697         * tests/test-base64.c: New file.
14698
14699         * modules/base64: New file.
14700
14701 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14702
14703         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14704         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14705
14706         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14707
14708 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14709
14710         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14711         (__getcwd.c): Don't restore errno; glibc doesn't.
14712         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14713         first, falling back to our code only if its results look suspicious.
14714         Ensure that the resulting buffer is only as large as necessary.
14715
14716         * lib/readutmp.c: Include readutmp.h first.
14717         Include <errno.h>, since readutmp.h no longer does that.
14718         * lib/readutmp.h: Don't include <errno.h>,
14719         <sys/param.h>, <time.h>; not needed to establish interface.
14720         (errno): Remove decl.
14721         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14722         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14723         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14724
14725 2004-11-28  Simon Josefsson  <jas@extundo.com>
14726
14727         * lib/base64.h, base64.c: New file.
14728
14729 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14730
14731         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14732
14733 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14734
14735         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14736         (Depends-on): Remove pathmax, same.  Add mempcpy.
14737         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14738         (Makefile.am): Append getcwd.h to lib_SOURCES.
14739         (Include): Add getcwd.h.
14740         (Maintainer): Change from Jim Meyering to "all, glibc",
14741         since getdate now uses intended-for-glibc code.
14742         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14743         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14744
14745 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14746
14747         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14748         HP's ANSI C compiler.
14749         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14750         Declaring int functions causes warnings on some modern systems and
14751         shouldn't be needed to compile on ancient ones.
14752         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14753         defined.
14754
14755         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14756         with the following changes.
14757         (__set_errno): Parenthesize properly.
14758         Include <stdbool.h>.
14759         (MIN, MAX, MATCHING_INO): New macros.
14760         (__getcwd): Define with prototype, not K&R form.
14761         Use heuristics to allocate default buffer on stack if possible.
14762         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14763         behavior, and to avoid the PATH_MAX limit when computing
14764         ../../../../...
14765         Use MATCHING_INO to compare inode number to file.
14766         Check for arithmetic overflow in size calculations.
14767         Fix bug in reallocation of dot array that caused getcwd to fail
14768         on directories nested deeper than 75.
14769         Be more careful about saving errno on error.
14770         Do not use realloc; use only free+malloc, as this is a bit
14771         more flexible and avoids a needless copy operation.
14772         Do not inspect st_dev and st_ino for symbolic links; POSIX
14773         doesn't specify the latter.
14774         Check for closedir errors.
14775         Avoid needless casts.
14776         Use "#ifdef weak_alias" around weak_alias, to be like other
14777         glibc code.
14778         The following changes to getcwd.c have effect only when used in
14779         gnulib; they have no effect inside glibc proper.
14780         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14781         as alloca isn't used.
14782         (alloca, __alloca): Likewise.
14783         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14784         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14785         unconditionally, as gnulib assumes C89 or better.
14786         Do not include <sys/param.h>.
14787         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14788         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14789         better.
14790         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14791         Include <dirent.h> in a way that is compatible with modern Autoconf.
14792         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14793         New macros, if not already defined.
14794         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14795         Use "_LIBC", not "defined _LIBC", for consistency.
14796         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
14797         a mempcpy module.
14798         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
14799         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
14800         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
14801         credit only to Jim Meyering and adjust the copyright dates.
14802         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
14803         <stdlib.h>, <unistd.h>, "pathmax.h".
14804         Instead, include "xgetcwd.h" (first) and "getcwd.h".
14805         (INITIAL_BUFFER_SIZE): Remove.
14806         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
14807
14808 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14809
14810         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
14811         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
14812         Use the _ONCE methods, for efficiency.
14813         Check for fcntl.h.  In test program, include <errno.h>
14814         and <fcntl.h> if available.  Remove old K&R cruft from
14815         test program.  Check for common errors in GNU/Linux,
14816         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
14817         don't do AC_LIBOBJ, as that's getcwd.m4's job.
14818         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
14819         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
14820         name accordingly.
14821         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
14822         accommodate new getcwd.c.
14823         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
14824         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
14825         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
14826         that's all we need now.
14827
14828 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14829
14830         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
14831         argp-parse.c depends on getopt internals, that means we should
14832         always use our getopt, to be on the safe side.
14833         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
14834         order not to spoil the result of an eventual previous invocation
14835         of gl_GETOPT_SUBSTITUTE.
14836
14837 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14838
14839         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
14840         redefinition warnings. To avoid them, include the defines
14841         in `#if !defined __need_getopt ... #endif'. The only place
14842         where __getopt_argv_const is used is in definitions
14843         of getopt_long and getopt_long_only below, which are as well
14844         protected by `#ifndef __need_getopt'.
14845         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
14846         __need_getopt after including <stdio.h> and <unistd.h> These
14847         headers might have defined it.
14848
14849 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14850
14851         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
14852
14853 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14854
14855         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
14856         (futimens): New function, which uses futimes if available.
14857         (futimens, utimens): Support timespec==NULL, with same semantics
14858         as utime and utimens.
14859         * lib/utimens.h (futimens): New decl.
14860
14861 2004-11-23  Jim Meyering  <jim@meyering.net>
14862
14863         * lib/getopt_.h: Remove trailing blanks.
14864
14865 2004-11-23  Jim Meyering  <jim@meyering.net>
14866
14867         * lib/__fpending.c: Add comment.
14868
14869 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
14870
14871         * modules/canonicalize (Depends-on): Add xreadlink.
14872         Problem reported by James Youngman.
14873
14874 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
14875
14876         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
14877         New macros.
14878         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
14879         optopt): Use them instead of invoking ## directly; otherwise, the
14880         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
14881
14882 2004-11-19  Bruno Haible  <bruno@clisp.org>
14883
14884         * lib/strtok_r.c: Move comments from here...
14885         * lib/strtok_r.h: ... to here.
14886
14887 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14888
14889         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
14890         implementations that mishandle size_t overflow.
14891
14892 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14893
14894         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
14895         might fail.  Problem reported by Yoann Vandoorselaere.
14896         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
14897         implementations that mishandle size_t overflow.
14898
14899 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14900
14901         * modules/canon-host (Depends-on): Add strdup.
14902
14903 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14904
14905         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
14906
14907 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14908
14909         * lib/canon-host.c: Include "strdup.h".
14910         (canon_host): Use getaddrinfo if available, so that IPv6 works.
14911         Use strdup instead of malloc/strcpy to duplicate strings.
14912
14913         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
14914         (human_space_before_unit): New constant.
14915         * lib/human.c (human_readable): Support it.
14916
14917         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
14918         (xgetcwd): Set errno correctly when failing.
14919         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
14920         the failure is actually due to a PATH_MAX problem.
14921
14922         Further getopt changes to make it more likely that glibc will
14923         buy the changes back.
14924         * lib/getopt.c (POSIXLY_CORRECT): New constant.
14925         (getopt): Use it, so to preserve glibc semantic
14926         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
14927         when compiling for libc.
14928         * lib/getopt_.h (__getopt_argv_const): Bring it back.
14929         (getopt_long, getopt_long_only): Use it.
14930
14931         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14932         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
14933         (getopt): Argv is now char * const *, as per standard.
14934         (_getopt_internal_r, _getopt_internal): Argv is now char **,
14935         not char *__getopt_argv_const *.
14936         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14937         _getopt_long_only_r): Likewise.
14938         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
14939         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14940         _getopt_long_r, _getopt_long_only_r): Likewise.
14941         * lib/getopt_.h (__getopt_argv_const): Remove.
14942         (getopt): Argv is now char * const *, as per standard.
14943
14944         * lib/getdate.y (tORDINAL): New token.
14945         (day, relunit): Allow it for relative times.
14946         (relative_time_table): Use tORDINAL for ordinals.
14947
14948 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14949
14950         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
14951         Document that "second" isn't allowed as an ordinal number.
14952
14953 2004-11-16  Jim Meyering  <jim@meyering.net>
14954
14955         * modules/closeout (Depends-on): Add fpending.
14956
14957 2004-11-15  Jim Meyering  <jim@meyering.net>
14958
14959         * lib/closeout.c: Include "__fpending.h" once again.
14960         Include <stdbool.h>.
14961         (close_stdout): Don't fail just because stdout was closed initially,
14962         since some programs don't write to stdout in the normal course of
14963         operation (other than --version and --help), and we don't want this
14964         function to make e.g. `touch file >&-' fail.
14965         But do fail if it was closed and someone has tried to write to it.
14966         E.g., `printf foo >&-' must fail.
14967
14968 2004-11-13  Jim Meyering  <jim@meyering.net>
14969
14970         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
14971
14972 2004-11-12  Simon Josefsson  <jas@extundo.com>
14973
14974         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
14975         small doc fix is still pending.
14976
14977 2004-11-11  Simon Josefsson  <jas@extundo.com>
14978
14979         * modules/strtok_r: New file.
14980
14981         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14982         strtok_r.
14983
14984 2004-11-11  Simon Josefsson  <jas@extundo.com>
14985
14986         * m4/strtok_r.m4: New file.
14987
14988         * m4/getopt.m4: Replace opterr.
14989
14990 2004-11-11  Simon Josefsson  <jas@extundo.com>
14991
14992         * lib/strtok_r.h, strtok_r.c: New file.
14993
14994 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14995
14996         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
14997         of replacing opterr, getopt, etc.  This should handle the
14998         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
14999
15000 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15001
15002         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
15003         we can stop lying to compilers about the constness of argv when we
15004         are compiled outside glibc.
15005         (getopt, getopt_long, getopt_long_only): Use it.
15006         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15007         _getopt_internal, getopt): Likewise.
15008         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15009         _getopt_long_only_r): Likewise.
15010         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15011         _getopt_long_r, _getopt_long_only_r): Likewise.
15012
15013         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
15014         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
15015         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
15016         the other external symbols.
15017         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
15018         declaration, since the above renaming now works around collisions.
15019
15020 2004-11-11  Jim Meyering  <jim@meyering.net>
15021
15022         * lib/linebreak.c: Remove trailing blanks.
15023         * lib/alloca_.h: Likewise.
15024         * lib/acosl.c: Likewise.
15025         * lib/euidaccess.c: Likewise.
15026         * lib/allocsa.h: Likewise.
15027
15028 2004-11-10  Simon Josefsson  <jas@extundo.com>
15029
15030         * m4/getaddrinfo.m4: New file.
15031
15032 2004-11-10  Simon Josefsson  <jas@extundo.com>
15033
15034         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
15035
15036 2004-11-10  Simon Josefsson  <jas@extundo.com>
15037
15038         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15039         getaddrinfo.
15040
15041         * modules/getaddrinfo: New file.
15042
15043 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15044
15045         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15046
15047 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15048
15049         * lib/mktime.c (SHR): New macro, which is a portable
15050         substitute for >> that should work even on Crays.
15051         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15052         Problem reported by Mark D. Baushke in
15053         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15054         * lib/getdate.y (SHR): Likewise.
15055         (tm_diff): Use it.
15056         * lib/strftime.c (SHR): Likewise.
15057         (tm_diff): Use it.
15058         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15059         quote_these_too, so that right shifts are well defined.  All uses
15060         changed.
15061
15062 2004-11-10  Jim Meyering  <jim@meyering.net>
15063
15064         Ensure that no close failure goes unreported.
15065         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15066         return early when it seems there's nothing to flush.
15067         Don't include __fpending.h.
15068
15069 2004-11-10  Jim Meyering  <jim@meyering.net>
15070
15071         * modules/closeout (Depends-on): Remove fpending.
15072
15073 2004-11-10  Jim Meyering  <jim@meyering.net>
15074
15075         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15076
15077 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15078
15079         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15080         gl_FUNC_STRFTIME.
15081         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15082         and AC_REQUIRE when possible, to avoid duplicate checks.
15083         Check for <wchar.h>.
15084
15085 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15086
15087         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
15088
15089 2004-11-09  Bruno Haible  <bruno@clisp.org>
15090
15091         * m4/sockpfaf.m4: New file.
15092
15093 2004-11-05  Bruno Haible  <bruno@clisp.org>
15094
15095         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
15096         Reported by Mark D. Baushke <mdb@cvshome.org>.
15097
15098 2004-11-04  Bruno Haible  <bruno@clisp.org>
15099
15100         2004-09-11  Bruno Haible  <bruno@clisp.org>
15101                 * allocsa.valgrind: New file.
15102         2004-02-06  Bruno Haible  <bruno@clisp.org>
15103                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
15104                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
15105                 Reported by Christopher Seip <chris.seip@hp.com>.
15106
15107 2004-11-04  Bruno Haible  <bruno@clisp.org>
15108
15109         * modules/allocsa (Files): Add lib/allocsa.valgrind.
15110         (Makefile.am): Distribute it.
15111
15112 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
15113
15114         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
15115         with errno == ERANGE if the buffer is too small.
15116         Problem reported by Mark D. Baushke.
15117
15118 2004-11-03  Albert Chin  <china@thewrittenword.com>
15119             Paul Eggert  <eggert@cs.ucla.edu>
15120
15121         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
15122         equivalent, substitute $ac_type for equivalent type rather than
15123         blindly using uint32_t *always* which won't work if uint32_t is not
15124         available.  Define _UINT32_T to work around typedef of uint32_t if
15125         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
15126         2.5.1.
15127
15128 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15129
15130         * m4/jm-macros.m4: Sync from coreutils.
15131         (gl_MACROS): Check for mbrlen, for pathchk.
15132         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
15133
15134 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15135
15136         * lib/xreadlink.c (MAXSIZE): New macro.
15137         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
15138         size does not exceed MAXSIZE.  Avoid cast.
15139         As suggested by Mark D. Baushke in
15140         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
15141         if readlink fails with buffer size just under MAXSIZE, try again
15142         with MAXSIZE.
15143
15144 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15145
15146         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
15147
15148 2004-11-02  Derek R. Price  <derek@ximbiot.com>
15149         and  Paul Eggert  <eggert@cs.ucla.edu>
15150
15151         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
15152         (get_date): Overparenthesize to avoid GCC warning.
15153
15154 2004-11-02  Bruno Haible  <bruno@clisp.org>
15155
15156         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
15157         returns void.
15158
15159 2004-11-02  Bruno Haible  <bruno@clisp.org>
15160
15161         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
15162         function returns void.
15163
15164 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15165
15166         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
15167         fflush_unlocked, flockfile, funlockfile, funlockfile,
15168         fputs_unlocked, putc_unlocked.
15169
15170 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15171
15172         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15173         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
15174         already declared.
15175
15176 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15177
15178         * modules/getdate (Files): Add doc/getdate.texi.
15179         (Depends-on): Add setenv, xalloc.
15180
15181 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15182
15183         * lib/getdate.y: Add support for TZ="foo" within a date string.
15184         Fix some bugs near time_t boundaries.  Reject dates with
15185         out-of-range components, e.g., "Sept 31".
15186         Include <stdlib.h>, "setenv.h", "xalloc.h".
15187         (ISDIGIT_LOCALE): Remove; unused.
15188         Note that the TZ and time functions used here are not reentrant.
15189         (mktime_ok, get_tz): New functions.
15190         (TZBUFSIZE): New constant.
15191         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
15192         This requires that we sometimes generate our own TZ="XXX..." setting.
15193
15194 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15195
15196         * doc/getdate.texi: New file, from coreutils with modifications for
15197         the new TZ parsing.
15198
15199 2004-10-27  Derek R. Price  <derek@ximbiot.com>
15200
15201         * lib/mktime.c (not_equal_tm): Remove redundant check.
15202
15203 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15204
15205         * modules/regex (lib_SOURCES): Add regex.c.
15206         Reported by James Youngman in
15207         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
15208
15209 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15210
15211         * lib/getdate.y: Use Bison 1.875 features, and some minor
15212         code cleanups.  This change does not affect semantics.
15213         Don't include <stdlib.h>; no longer needed.
15214         Don't include unlocked-io.h; only the "#if TEST" code uses
15215         stdio, and performance isn't crucial there.
15216         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
15217         Bison 1.875 features as described below.
15218         All uses of "PC." replaced by "pc->".
15219         (YYSTYPE): Add a forward declaration.
15220         (yylex, yyerror): Use full prototypes in forward decls.
15221         Use "%pure-parser" rather than obsolescent "%pure_parser".
15222         Use %parse-param and %lex-param instead of obsolescent
15223         YYPARSE_PARAM and YYLEX_PARAM.
15224         (meridian_table, month_and_day_table, time_units_table,
15225         relative_time_table, time_zone_table, military_table,
15226         lookup_zone, lookup_word, get_date):
15227         Use NULL instead of 0 where appropriate.
15228         (to_hour): Avoid abort (), to avoid a dependency on
15229         stdlib.h.
15230         (yyerror, yylex): Now accepts parser_control * arg.
15231         (main) [TEST]: Use '\0' rather than 0 for char.
15232
15233 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15234
15235         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
15236
15237 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15238
15239         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
15240         It's now the caller's responsibility to handle the case where
15241         !HAVE_GETPAGESIZE && !defined getpagesize.
15242
15243         * lib/mktime.c (leapyear): Arg is long int, not int.
15244
15245 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
15246
15247         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
15248
15249 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
15250
15251         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
15252         missing.  Problem reported by James Youngman.
15253
15254 2004-10-16  Simon Josefsson  <jas@extundo.com>
15255
15256         * gnulib-tool: Fix comments.  Fix parse problem.
15257         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
15258
15259 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
15260
15261         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
15262         implementation of getopt_long.  Problem reported by Alexander Taler in:
15263         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
15264
15265 2004-10-15  Bruno Haible  <bruno@clisp.org>
15266
15267         * gnulib-tool: Untabify. Initialize supplied_libname.
15268         (func_usage): More homogenous output.
15269         (func_modules_transitive_closure, func_modules_to_filelist,
15270         func_emit_lib_Makefile_am): New functions.
15271         (func_import): New function, extracted from big case statement. Use
15272         func_get_license, func_modules_transitive_closure,
15273         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
15274         opt_lgpl. Don't use test -a, as it's not portable.
15275         (func_create_testdir): Use func_modules_transitive_closure,
15276         func_modules_to_filelist, func_emit_lib_Makefile_am.
15277
15278 2004-10-15  Bruno Haible  <bruno@clisp.org>
15279
15280         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
15281
15282 2004-10-15  Bruno Haible  <bruno@clisp.org>
15283
15284         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
15285         the portions belonging to each module.
15286         Suggested by Derek Robert Price <derek@ximbiot.com>.
15287
15288 2004-10-12  Simon Josefsson  <jas@extundo.com>
15289
15290         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15291         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
15292         to real functions.
15293
15294 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15295
15296         * modules/vsnprintf: New file.
15297
15298 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15299
15300         * m4/vsnprintf.m4: New file.
15301
15302 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15303
15304         * lib/vsnprintf.h: New file.
15305         * lib/vsnprintf.c: New file.
15306
15307 2004-10-11  Bruno Haible  <bruno@clisp.org>
15308
15309         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
15310         vsnprintf.
15311
15312 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15313
15314         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
15315
15316 2004-10-07  Bruno Haible  <bruno@clisp.org>
15317
15318         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15319         fits into the provided buffer.
15320
15321 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15322
15323         * lib/diacrit.c, diacrit.h: Add GPL notice.
15324
15325         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15326         notice.
15327         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15328         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15329         This avoids a potential constant-folding bug.
15330
15331 2004-10-05  Bruno Haible  <bruno@clisp.org>
15332
15333         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15334         for the declaration of strsep.
15335
15336 2004-10-05  Bruno Haible  <bruno@clisp.org>
15337
15338         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15339
15340 2004-10-04  Simon Josefsson  <jas@extundo.com>
15341
15342         * modules/memmem: New file.
15343         * tests/test-memmem.c: New file.
15344         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15345
15346 2004-10-04  Simon Josefsson  <jas@extundo.com>
15347
15348         * m4/memmem.m4: New file.
15349
15350 2004-10-04  Simon Josefsson  <jas@extundo.com>
15351
15352         * lib/memmem.h: New file.
15353         * lib/memmem.c: New file, taken from glibc.
15354
15355 2004-10-04  Simon Josefsson  <jas@extundo.com>
15356
15357         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15358         '#ifdef USE_UNLOCKED_IO'.
15359
15360 2004-10-04  Simon Josefsson  <jas@extundo.com>
15361
15362         * config/srclist.txt: Add memmem from glibc.
15363
15364 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15365
15366         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15367
15368         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15369         modules/exclude, modules/getdate, modules/getline,
15370         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15371         modules/getusershell, modules/linebuffer, modules/md5,
15372         modules/mountlist, modules/posixtm, modules/readtokens,
15373         modules/readutmp, modules/regex, modules/sha1,
15374         modules/version-etc, modules/yesno:
15375         Remove dependency on unlocked-io.
15376
15377 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15378
15379         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15380
15381         * m4/unlocked-io.m4: Add copyright notice.
15382         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15383
15384 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15385
15386         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15387         * lib/xmalloc.c (xmemdup): Likewise.
15388         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15389         XFREE): Remove these long-obsolescent macros.
15390         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15391         * lib/xstrdup.c: Remove.
15392
15393         * lib/regex.c (re_comp): Cast gettext return value to char *,
15394         Problem reported by Martin Neitzel via Mark D. Baushke.
15395
15396 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15397
15398         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15399         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15400         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15401         regex.c, sha1.c, version-etc.c, yesno.c:
15402         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15403         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15404         the includer's responsibility.
15405
15406         Sync from coreutils.
15407
15408         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15409         points to the start of a string, as the C Standard says the
15410         resulting behavior is undefined.
15411
15412         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15413         simple -> simple_backups, numbered_existing ->
15414         numbered_existing_backups, numbered -> numbered_backups
15415         to avoid shadowing problems.  All uses changed.
15416         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15417         * lib/backupfile.c (check_extension, numbered_backup):
15418         Rename locals to avoid shadowing 'basename'.
15419         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15420         once.
15421
15422         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15423         * lib/.cvsignore: Add getopt.h.
15424
15425 2004-10-04  Bruno Haible  <bruno@clisp.org>
15426
15427         * modules/README: New file.
15428         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15429         not a module.
15430
15431 2004-10-02  Jim Meyering  <jim@meyering.net>
15432
15433         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15434
15435 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15436
15437         * modules/strsep: New file.
15438
15439 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15440
15441         * m4/strsep.m4: New file.
15442
15443 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15444
15445         * lib/strsep.h: New file.
15446         * lib/strsep.c: New file.
15447
15448 2004-10-01  Simon Josefsson  <jas@extundo.com>
15449
15450         * lib/snprintf.c (snprintf): Handle size==0.
15451
15452 2004-10-01  Simon Josefsson  <jas@extundo.com>
15453             Bruno Haible  <bruno@clisp.org>
15454
15455         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15456         (snprintf): Declare 'args'.
15457
15458 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
15459
15460         * lib/snprintf.c: Remove comments as to why each header is needed.
15461
15462 2004-10-01  Bruno Haible  <bruno@clisp.org>
15463
15464         * MODULES.html.sh: Add strsep.
15465
15466 2004-09-30  Simon Josefsson  <jas@extundo.com>
15467
15468         * modules/snprintf: New file.
15469
15470 2004-09-30  Simon Josefsson  <jas@extundo.com>
15471
15472         * m4/snprintf.m4: New file.
15473
15474 2004-09-30  Simon Josefsson  <jas@extundo.com>
15475
15476         * lib/snprintf.h, lib/snprintf.c: New files.
15477
15478 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15479
15480         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15481         (hol_entry_help): Never translate an empty string.
15482         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
15483         * lib/argp.h (OPTION_NO_TRANS): New option.
15484
15485 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15486
15487         * modules/argp (Maintainer): Replace Simon Josefsson
15488         by Sergey Poznyakoff.
15489
15490 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15491
15492         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
15493         changes merged back into glibc.
15494
15495 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15496
15497         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
15498
15499 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15500
15501         * lib/xvasprintf.c: Include xalloc.h.
15502         (xvasprintf): Use xalloc_die, not xmalloc_die.
15503
15504 2004-09-29  Bruno Haible  <bruno@clisp.org>
15505
15506         * modules/alloca-opt: New file, derived from modules/alloca.
15507         * modules/allocsa: Depend on alloca-opt instead of alloca.
15508         * modules/setenv: Likewise.
15509         * modules/vasnprintf: Likewise.
15510         * MODULES.html.sh: Add alloca-opt.
15511
15512 2004-09-28  Simon Josefsson  <jas@extundo.com>
15513
15514         * gnulib-tool: New parameter --lgpl, to asseert that modules are
15515         LGPL, and to replace license template from GPL to LGPL.
15516
15517 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15518
15519         * modules/dummy: Change license to LGPL.
15520
15521 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15522
15523         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
15524
15525 2004-09-24  Simon Josefsson  <jas@extundo.com>
15526
15527         * modules/minmax (License): Change from GPL to LGPL.
15528
15529 2004-09-23  Simon Josefsson  <jas@extundo.com>
15530
15531         * gnulib-tool (--import): Typo.
15532
15533 2004-09-23  Simon Josefsson  <jas@extundo.com>
15534
15535         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15536
15537 2004-09-22  Bruno Haible  <bruno@clisp.org>
15538
15539         * modules/*: Add 'License' field.
15540         * gnulib-tool: Accept --extract-license option.
15541         (func_get_license): New function.
15542
15543 2004-09-21  Bruno Haible  <bruno@clisp.org>
15544
15545         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15546         Reported by Simon Josefsson.
15547
15548 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15549
15550         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15551         gl_AC_TYPE_LONG_LONG.
15552
15553 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15554
15555         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15556
15557 2004-09-18  Simon Josefsson  <jas@extundo.com>
15558         and  Paul Eggert  <eggert@cs.ucla.edu>
15559
15560         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15561         calls with autoreconf.  Define GL_LIB.
15562
15563 2004-09-14  Karl Berry  <karl@gnu.org>
15564
15565         * config/srclist.txt: unsync setenv.c, sigh.
15566
15567 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15568
15569         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15570         Problem reported by Bruno Haible in:
15571         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15572
15573 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15574
15575         * config/srclist.txt: Comment out argp-pvh.c.
15576
15577 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15578
15579         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15580         in case some system header has #define'd it.  Problem reported by
15581         Soeren D. Schulze in
15582         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15583
15584 2004-09-09  Karl Berry  <karl@gnu.org>
15585
15586         * regex.[ch]: delete from the root.  These were supposed to be
15587                 synced with emacs cvs, but this has not happened for about
15588                 a year, and anyway nothing else uses emacs regex.[ch].
15589                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15590                 lib/regex[.ch] is untouched.
15591
15592 2004-09-09  Bruno Haible  <bruno@clisp.org>
15593
15594         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15595
15596 2004-09-09  Bruno Haible  <bruno@clisp.org>
15597
15598         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15599         modifications.
15600         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15601
15602 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15603
15604         * modules/xvasprintf: New file.
15605         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15606
15607 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15608
15609         * lib/xvasprintf.h: New file.
15610         * lib/xvasprintf.c: New file.
15611         * lib/xasprintf.c: New file.
15612
15613 2004-09-08  Bruno Haible  <bruno@clisp.org>
15614
15615         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15616
15617 2004-09-08  Bruno Haible  <bruno@clisp.org>
15618
15619         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15620         length is > INT_MAX.
15621         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15622         more.
15623
15624 2004-09-08  Bruno Haible  <bruno@clisp.org>
15625
15626         * lib/stdint_.h: New file, taken from GNU clisp.
15627
15628 2004-09-08  Bruno Haible  <bruno@clisp.org>
15629             Oskar Liljeblad  <oskar@osk.mine.nu>
15630
15631         * modules/stdint: New file.
15632         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15633
15634 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15635
15636         Import from coreutils.
15637         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15638         strings on unbounded length.  alloca's performance benefits aren't
15639         that important here.
15640         (V_STRDUP): Remove.
15641         (parse_with_separator): New function, with most of the internals
15642         of the old parse_user_spec.  Allow user to omit both user and group,
15643         for compatibility with FreeBSD.
15644         Clone only the user name, not the entire spec.
15645         Do not set *uid, *gid unless entirely successful.
15646         Avoid memory leak in some failing cases.
15647         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15648         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15649         (parse_user_spec): Rewrite to use parse_with_separator.
15650
15651 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15652
15653         * modules/userspec: Don't depend on alloca.
15654
15655 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15656
15657         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15658
15659 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15660
15661         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15662         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15663         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15664
15665 2004-08-16  Simon Josefsson  <jas@extundo.com>
15666
15667         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15668         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15669         Add --dry-run for --import.
15670         Let user provided command line parameters override configure.ac
15671         settings.
15672
15673 2004-08-12  Simon Josefsson  <jas@extundo.com>
15674
15675         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15676         as discussed with Paul Eggert in threads rooted at
15677         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15678         and
15679         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15680         Before, the test was empty, and relied on ELIDE_CODE in source
15681         code.)
15682         (gl_PREREQ_GETOPT): New macro.
15683         (gl_GETOPT): Use them.
15684
15685 2004-08-12  Simon Josefsson  <jas@extundo.com>
15686
15687         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15688         * lib/getopt_.h: Renamed from getopt.h.
15689
15690 2004-08-12  Simon Josefsson  <jas@extundo.com>
15691
15692         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15693         Change default library name from libfoo to libgnu.
15694         Now, if you have a configure.ac that says:
15695                 gl_SOURCE_BASE(gl)
15696                 gl_M4_BASE(gl/m4)
15697                 gl_MODULES(error getopt etcetera)
15698                 gl_INIT
15699         you can import all you need by running:
15700                 ../gnulib/gnulib-tool --import
15701
15702         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15703         (Makefile.am): Rewrite, use logic from argz.
15704         (Include): Use <getopt.h> instead of "getopt.h".
15705
15706 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15707
15708         * modules/argp (Files): Add m4/unlocked-io.m4.
15709         (Depends-on): Add extensions.
15710
15711 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15712
15713         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15714         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15715         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15716         Check for program_invocation_name, program_invocation_short_name,
15717         flockfile, funlockfile, features.h, _getopt_long_only_r.
15718
15719 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15720
15721         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15722         its complicated substitute.
15723         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15724         and program_invocation_name.
15725         (__argp_basename) [!_LIBC]: Remove; the only use was
15726         replaced by its body.
15727         (__argp_short_program_name): Change condition from
15728         !defined __argp_short_program_name to
15729         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15730         to match argp-namefrob.h.
15731         (__argp_failure): Don't assume strerror_r returns char *.
15732         * lib/argp-parse.c (N_): Define unconditionally.
15733         (argp_default_options): Fill out initializers with 0 to avoid
15734         gcc warnings.
15735
15736 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15737
15738         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15739         getopt1.c.
15740
15741 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15742
15743         Merge from coreutils.
15744
15745         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15746
15747         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15748         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15749
15750 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15751
15752         Merge from coreutils.
15753
15754         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15755         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15756         for Reliant Unix 5.43.
15757
15758         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15759         (union fooround): Use uintmax_t, not long int.
15760         The rest is a merge from libc:
15761         [defined _LIBC]: Include <shlib-compat.h>.
15762         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15763
15764         * lib/settime.c (settime): Recode to avoid warning with
15765         Sun Forte C 6U2.
15766
15767         * lib/strverscmp.c: Convert to UTF-8.
15768
15769 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15770
15771         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15772         m4/uintmax_t.m4.
15773
15774 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15775
15776         * modules/xalloc-die: New file.
15777         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15778
15779         * modules/md5 (Files): Add m4/uint32_t.m4.
15780         * modules/sha1: Renamed from modules/sha.
15781         (Files):
15782         Rename lib/sha.h to lib/sha1.h.
15783         Rename lib/sha.c to lib/sha1.c.
15784         Rename m4/sha.m4 to m4/sha1.m4.
15785         (lib_SOURCES): Likewise.
15786         (configure.ac): Rename gl_SHA to gl_SHA1.
15787         (Include): sha.h -> sha1.h.
15788
15789 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15790
15791         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15792         * m4/sha1.m4: Renamed from sha.m4.
15793         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15794
15795 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15796
15797         * lib/obstack.h (obstack_empty_p):
15798         Don't assume that chunk->contents is suitably aligned.
15799         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
15800         Likewise. Problem reported by Benno in
15801         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
15802
15803         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
15804         readable.  This could be improved further but it'd take some work.
15805
15806 2004-08-08  Simon Josefsson  <jas@extundo.com>
15807
15808         * modules/xgethostname (Depends-on): Remove exit and error (not
15809         used).
15810
15811         * modules/getpass-gnu: Add getpass.h.
15812         (Depends-on): Add stdbool.
15813         * modules/getpass: Add getpass.h.
15814
15815 2004-08-08  Simon Josefsson  <jas@extundo.com>
15816
15817         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
15818         Check getpass declaration.
15819
15820 2004-08-08  Simon Josefsson  <jas@extundo.com>
15821
15822         * lib/xgethostname.c: Don't include error.h (not used).
15823
15824         * lib/getpass.h: Add.
15825         * lib/getpass.c: Include getpass.h first.
15826
15827 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
15828
15829         * lib/xalloc-die.c: New file.
15830         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
15831         All uses removed.
15832         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
15833         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
15834         xalloc-die.c.
15835         (_, N_, xalloc_die): Move to xalloc-die.c.
15836         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
15837         so that we needn't mess with xalloc_msg_memory_exhausted.
15838
15839         * lib/sha1.h: Renamed from sha.h.
15840         (SHA1_H): Renamed from _SHA_H.
15841         (sha1_ctx): Renamed from sha_ctx.
15842         (sha1_init_ctx): Renamed from sha_init_ctx.
15843         (sha1_process_block): Renamed from sha_process_block.
15844         (sha1_process_bytes): Renamed from sha_process_bytes.
15845         (sha1_finish_ctx): Renamed from sha_finish_ctx.
15846         (sha1_read_ctx): Renamed from sha_read_ctx.
15847         (sha1_stream): Renamed from sha_stream.
15848         (sha1_buffer): Renamed from sha_buffer.
15849         * lib/sha1.c: Likewise; renamed from sha.c.
15850         Do not include <sys/types.h>.
15851         Include <stddef.h> rather than <stdlib.h>.
15852
15853 2004-08-08  Bruno Haible  <bruno@clisp.org>
15854
15855         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
15856         FILESYSTEM_PREFIX_LEN.
15857         * lib/progreloc.c: Likewise.
15858         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
15859
15860 2004-08-06  Simon Josefsson  <jas@extundo.com>
15861
15862         * modules/progname (Depends-on): Don't depend on stdbool.
15863
15864 2004-08-06  Simon Josefsson  <jas@extundo.com>
15865
15866         * modules/getsubopt: New file.
15867         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15868         getsubopt.
15869
15870 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15871
15872         More merge from coreutils.
15873
15874         * m4/utimens.m4, m4/utimecmp.m4: New files.
15875         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
15876         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
15877         prereq.m4, sha.m4: Import changes from coreutils.
15878
15879 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15880
15881         More merge from coreutils.
15882         * modules/raise, modules/readtokens0, modules/utimens:
15883         * modules/utimecmp, module/xnanosleep: New files.
15884         * modules/strftime: Add lib/strftime.h.
15885         Change include from <time.h> to "strftime.h".
15886         * modules/yesno: Add lib/yesno.h.
15887         * modules/backupfile: Remove lib/addext.c.
15888         * modules/euidaccess: Add stat-macros.h.
15889         * modules/canonicalize, modules/euidaccess,
15890         modules/filemode, modules/lchown, modules/makepath,
15891         modules/rmdir, modules/stat: Likewise.
15892
15893 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15894
15895         Merge from tar.
15896         * lib/argp-help.c (make_hol, hol_append): Don't assume that
15897         SIZE_MAX is a valid preprocessor constant.
15898         (__argp_basename): Change from "#ifndef _LIBC"
15899         to "#ifndef __argp_short_program_name", so that
15900         we don't compile these functions for tar.
15901
15902         More merges from coreutils.
15903         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
15904         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
15905         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
15906         * lib/addext.c: Remove; no longer needed.
15907         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
15908         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
15909         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
15910         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
15911         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
15912         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
15913         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
15914         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
15915         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
15916         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15917         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
15918         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
15919         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
15920         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
15921         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
15922         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
15923         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
15924         Import changes from coreutils.
15925
15926 2004-08-05  Simon Josefsson  <jas@extundo.com>
15927
15928         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
15929
15930 2004-08-05  Simon Josefsson  <jas@extundo.com>
15931
15932         * m4/getsubopt.m4: New file.
15933
15934 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15935
15936         Merge from coreutils.
15937
15938         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
15939         * m4/getcwd-path-max.m4: New files.
15940
15941         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
15942         FILESYSTEM_PREFIX_LEN ->
15943         FILE_SYSTEM_PREFIX_LEN.
15944         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
15945         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
15946         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
15947         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
15948
15949         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
15950         prerequisite modules now handle the DOS stuff.
15951         Don't check for unistd.h.
15952
15953 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15954
15955         Merge from coreutils.
15956
15957         * lib/.gdb-history: Remove; this doesn't belong here.
15958
15959         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
15960         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
15961         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
15962         * lib/getcwd.c: New files.
15963
15964         * lib/dirname.h: Include <stdbool.h>.
15965         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
15966         for consistency with POSIX terminology.  All uses changed.
15967         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
15968         (strip_trailing_slashes): Use bool for booleans.
15969         * lib/stripslash.c (strip_trailing_slashes): Likewise.
15970
15971         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
15972         sometimes returns a positive errno value even when it succeeds.
15973         (print_errno_message) [!LIBC]: Fall back on strerror if
15974         __strerror_r fails.
15975
15976         * lib/path-concat.c (mempcpy): Don't define if a system header defines
15977         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
15978         (longest_relative_suffix): New function.
15979         (path_concat): Use it.  Assume first argument is not NULL.
15980         Port to DOS.  Omit redundant separators.
15981         Report an error instead of returning NULL.
15982         Use mempcpy instead of memcpy.
15983         (xpath_concat): Remove: not declared or used.
15984
15985         * lib/same.h: Include <stdbool.h>
15986         (same_name): Return bool, not int.
15987         * lib/same.c (same_name): Likewise.
15988         (errno): Don't declare; we assume C89 or better now.
15989
15990         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
15991         if not already defined.
15992
15993         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
15994         * lib/dup-safer.c (errno): Likewise.
15995
15996 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15997
15998         Merge from coreutils.
15999         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
16000         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
16001         * modules/path-concat: Don't depend on strdup.
16002
16003 2004-08-03  Simon Josefsson  <jas@extundo.com>
16004
16005         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
16006         * lib/progname.h: Don't include stdbool.h.
16007
16008 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16009
16010         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
16011         * MODULES.html.sh (func_all_modules): Remove fatal.
16012
16013 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16014
16015         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
16016
16017 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16018
16019         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
16020         working.
16021
16022 2004-08-02  Simon Josefsson  <jas@extundo.com>
16023
16024         * lib/getsubopt.h: New file, with comments from Bruno Haible.
16025         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
16026         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
16027
16028 2004-08-01  Simon Josefsson  <jas@extundo.com>
16029
16030         * lib/xgetdomainname.c: Include stdlib.h, for free().
16031
16032 2004-07-19  Bruno Haible  <bruno@clisp.org>
16033
16034         * MODULES.html.sh (func_all_modules): Add dummy.
16035
16036 2004-07-16  Simon Josefsson  <jas@extundo.com>
16037
16038         * modules/dummy: New file.
16039
16040 2004-07-16  Simon Josefsson  <jas@extundo.com>
16041
16042         * lib/dummy.c: New file.
16043
16044 2004-07-16  Bruno Haible  <bruno@clisp.org>
16045
16046         * lib/backupfile.h: Add extern "C" for C++.
16047         * lib/closeout.h: Likewise.
16048         * lib/copy-file.h: Likewise.
16049         * lib/findprog.h: Likewise.
16050         * lib/full-write.h: Likewise.
16051         * lib/pathname.h: Likewise.
16052         * lib/progname.h: Likewise.
16053         * lib/stpcpy.h: Likewise.
16054         * lib/stpncpy.h: Likewise.
16055         * lib/strcase.h: Likewise.
16056         * lib/strstr.h: Likewise.
16057         * lib/xalloc.h: Likewise.
16058
16059         * lib/mbswidth.h: Add extern "C" for C++.
16060         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16061
16062 2004-07-13  Robert Millan  <robertmh@gnu.org>
16063
16064         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16065
16066 2004-07-09  Simon Josefsson  <jas@extundo.com>
16067
16068         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16069         failed without this.)
16070
16071 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16072
16073         * modules/chown (Files): Add lib/fchown-stub.c, since
16074         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16075
16076 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16077
16078         * lib/fchown-stub.c: New file.
16079
16080 2004-06-24  Jim Meyering  <jim@meyering.net>
16081
16082         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16083
16084 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16085
16086         * modules/argz: Omit "#include".
16087
16088         * MODULES.html.sh (func_all_modules): Add calloc, to match
16089         2004-06-01 addition of calloc module.
16090
16091 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16092
16093         * m4/argz.m4: New file, which is autoupdated from libtool.
16094
16095 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16096
16097         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
16098         libtool.
16099
16100 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16101
16102         * config/srclist-update: Don't insist on "USA." before the
16103         close-comment, as libtool omits the period and puts the */ on a
16104         separate line.
16105         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
16106         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
16107
16108 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
16109
16110         * modules/argz: New file.
16111         * MODULES.html.sh (func_all_modules): Add argz.
16112
16113 2004-06-12  Jim Meyering  <jim@meyering.net>
16114         and  Paul Eggert  <eggert@cs.ucla.edu>
16115
16116         * modules/hash (Files): Add lib/xalloc.h.
16117         * modules/pipe (Depends-on): Add wait-process.
16118         * modules/stat (Depends-on): Add xalloc.
16119         * modules/userspec (Files): Add lib/userspec.h.
16120         * modules/xstrto
16121
16122         Upgrade from gettext-0.13.
16123         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
16124         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
16125         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
16126
16127 2004-06-10  Jim Meyering  <jim@meyering.net>
16128
16129         * lib/calloc.c: New file.
16130
16131 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
16132
16133         * lib/getdate.y (yylex): Allow space between sign and number.
16134         Problem reported by Dan Jacobson.
16135
16136 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16137
16138         Merge from coreutils CVS.
16139
16140         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
16141         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
16142         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
16143         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
16144         xstrtol.m4: Fix copyright date and/or serial number.
16145
16146         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
16147         See if we need an fchown replacement.
16148         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
16149         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
16150         and use the replacement function if we detect either defect.
16151
16152         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
16153         gl_UTIMECMP.
16154
16155 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16156         and  Jim Meyering  <jim@meyering.net>
16157
16158         Merge from coreutils CVS.
16159
16160         * lib/stat-macros.h: New file, with contents from file-type.h
16161         and coreutils' system.h.
16162         * lib/file-type.c: Include "stat-macros.h".
16163         * lib/file-type.h (file_type): Move all macro definitions to new file,
16164         stat-macros.h.
16165
16166         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
16167         Wrap old code with this conditional.
16168         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
16169         function that does not dereference symlinks.
16170         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
16171
16172         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
16173         dependency problems.
16174         (xreadlink): Accept new arg SIZE, for efficiency.
16175         All decls and uses changed.
16176         * lib/xreadlink.h: Include <stddef.h>, for size_t.
16177
16178         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
16179         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
16180
16181         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
16182         sysexits.h.
16183
16184 2004-06-01  Jim Meyering  <jim@meyering.net>
16185
16186         * m4/calloc.m4: New file.
16187
16188 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
16189
16190         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
16191         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
16192         Also, fix a typo in a diagnostic.
16193
16194 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16195
16196         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
16197         or AC_FUNC_REALLOC.
16198
16199 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16200
16201         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
16202         macros to be defined.
16203         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
16204         the allocator returns NULL because the requested size is zero.
16205
16206 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16207
16208         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
16209         var.  Add comment explaining why libc still defines it.  This
16210         merges the following patch from glibc:
16211         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
16212
16213 2004-05-20  Andreas Schwab  <schwab@suse.de>
16214
16215         * m4/free.m4: Replace free if it not known to work, not the other
16216         way round.
16217
16218 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
16219
16220         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
16221         present in glibc since revision 1.1 of this file.
16222         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
16223         obstack_alignment_mask, obstack_alloc, obstack_base,
16224         obstack_blank, obstack_blank_fast, obstack_chunk_size,
16225         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
16226         obstack_grow0, obstack_init, obstack_int_grow,
16227         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
16228         obstack_next_free, obstack_object_size, obstack_ptr_grow,
16229         obstack_ptr_grow_fast, obstack_room): Remove declarations of
16230         nonexistent functions.
16231
16232 2004-05-18  Karl Berry  <karl@gnu.org>
16233
16234         * config/srclist.txt: break link for vasnprintf.c.
16235
16236 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16237
16238         Port obstack to the AS/400, where pointers are 16 bytes wide and
16239         you cannot cast an integer to a valid pointer.  This patch is
16240         currently waiting to be integrated into glibc; see
16241         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
16242
16243         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
16244         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
16245         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
16246         (struct obstack): temp member is now a union of a pointer and
16247         an integer, instead of an integer.  All integer uses changed.
16248         This does not affect the physical layout of struct obstack,
16249         except on hosts (like the AS/400) where the size or alignment of
16250         void * is greater than that of ptrdiff_t.
16251         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
16252         __STDC__)]: Store temporary in pointer member of union, not
16253         integer member.
16254         * lib/obstack.c: Include <stddef.h>, for offsetof.
16255         (struct fooalign): Remove; it doesn't need a name.
16256         (union fooround): Change double to long double, and add void *.
16257         (DEFAULT_ALIGNMENT): Use offsetof to compute.
16258         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
16259         not a macro.  Hence the values are always int; so remove all
16260         casts-to-int in uses.
16261
16262 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16263
16264         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
16265         we can get this patch merged into glibc.
16266
16267 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16268             Paul Eggert  <eggert@cs.ucla.edu>
16269
16270         * m4/argp: Depend on alloca.
16271
16272 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16273             Paul Eggert  <eggert@cs.ucla.edu>
16274
16275         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
16276         freecoding.
16277
16278 2004-05-17  Bruno Haible  <bruno@clisp.org>
16279
16280         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
16281         precision that consists of a '.' followed by an empty digit string.
16282         Patch by Tor Lillqvist <tml@iki.fi>.
16283
16284 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16285
16286         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
16287         for backward compatibility with older code.  We need our own
16288         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
16289         it under some other name, and our alloca.h will define it.
16290
16291 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16292             Derek Price  <derek@ximbiot.com>
16293
16294         * lib/alloca.c: Include <alloca.h>, to get our interface.
16295         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
16296         include <alloca.h> first.  Use C89 prototype for alloca; this
16297         requires including <stddef.h> for size_t.  Use extern "C" if C++.
16298         Use #elif for simplicity, since we can assume C89 now.
16299         Don't try to source the system alloca.h since it will not be found
16300         and to prevent recursively including its replacement.
16301         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
16302         * lib/regex.c: Likewise.
16303
16304 2004-05-16  Derek Price  <derek@ximbiot.com>
16305             Paul Eggert  <eggert@cs.ucla.edu>
16306
16307         getline cleanup.  This changes the getndelim2 API: both order of
16308         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
16309         no delimiter).
16310
16311         * lib/getline.c: Don't include stddef.h or stdio.h, since our
16312         interface does that.
16313         (getline): Always use getdelim, so that we don't have two
16314         copies of this code.
16315         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
16316         if available.
16317         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
16318         (GETNDELIM2_MAXIMUM): New macro.
16319         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16320         instead of the old practice of delim2==0.  All callers changed.
16321         Return -1 on overflow, instead of returning junk.
16322         Do not set *linesize unless allocation succeeds.
16323         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16324         that we include sys/types.h.
16325         * lib/getnline.h: Likewise.
16326         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16327         (getndelim2): Reorder arguments.
16328         * lib/getnline.c (getnline, getndelim):
16329         Don't discard the NMAX argument.
16330         (getnline): Invoke getndelim, to avoid code duplication.
16331         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16332         of (size_t) -1 by callers of the getnline family.
16333
16334 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16335
16336         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16337         Check for gettimeofday.
16338         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16339         Check for settimeofday, stime.
16340
16341 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16342
16343         * lib/nanosleep.c (suspended): Change its type from int to
16344         sig_atomic_t volatile.
16345         (first_call): Make it private to rpl_nanosleep, and have it
16346         be zero initially as that's a bit faster.
16347         (my_usleep): Round up fractional times instead of truncating them,
16348         as this is the usual meaning for 'sleep'.
16349
16350         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16351         doesn't work.
16352         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16353         (ENOSYS): Define if not defined.
16354         (settime): Fall back on stime if it exists and settimeofday fails.
16355         But don't bother with fallbacks if a method fails with errno == EPERM.
16356
16357 2004-05-11  Jim Meyering  <jim@meyering.net>
16358
16359         Prior to this change, the save_cwd caller required read access to the
16360         current directory on most systems (ones with the fchdir function).
16361
16362         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16363         fails, try write-only, and finally, resort to using xgetcwd.
16364
16365 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16366
16367         * lib/obstack.c, obstack.h: Import changes from libc.
16368
16369 2004-04-28  Bruno Haible  <bruno@clisp.org>
16370
16371         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16372         also implicitly appends .exe to executables.
16373         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16374         accepts Windows pathnames.
16375         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16376         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16377         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16378         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16379         Reported by Derek Robert Price <derek@ximbiot.com>.
16380
16381 2004-04-21  Karl Berry  <karl@gnu.org>
16382
16383         * config/srclist.txt (localcharset.c): break sync.
16384
16385 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16386
16387         * m4/host-os.m4: Add a copyright notice.
16388
16389 2004-04-20  Jim Meyering  <jim@meyering.net>
16390
16391         Change UTILS_ to gl_ in AC_DEFINE'd names.
16392         Change utils_- and jm_-prefixed variables, too.
16393         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16394         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16395         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16396
16397         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16398         Don't emit trailing blanks.
16399         Also rename jm_-prefixed variables to have gl_ prefix.
16400
16401         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16402         Also rename jm_-prefixed variables to have gl_ prefix.
16403
16404         * m4/jm-macros.m4: Reflect the renamings.
16405         * m4/prereq.m4: Likewise.
16406
16407 2004-04-20  Jim Meyering  <jim@meyering.net>
16408
16409         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16410         memory.
16411
16412 2004-04-20  Jim Meyering  <jim@meyering.net>
16413             Bruno Haible  <bruno@clisp.org>
16414
16415         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16416         memory when realloc fails.
16417
16418 2004-04-19  Jim Meyering  <jim@meyering.net>
16419
16420         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16421         now that readutmp.c may call `free (0)'.
16422
16423 2004-04-19  Bruno Haible  <bruno@clisp.org>
16424
16425         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16426         * m4/inttypes_h.m4: Likewise.
16427         * m4/stdint_h.m4: Likewise.
16428         * m4/intmax_t.m4: Likewise.
16429         * m4/uintmax_t.m4: Likewise.
16430
16431 2004-04-18  Jim Meyering  <jim@meyering.net>
16432
16433         * m4/prereq.m4: Don't forbid jm_ prefix.
16434
16435         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16436         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16437         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16438         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16439         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16440         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16441         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16442         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16443         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16444         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16445         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16446         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16447         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16448         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16449         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16450         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16451         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16452         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16453         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16454
16455 2004-04-18  Jim Meyering  <jim@meyering.net>
16456
16457         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16458         failure, don't leak memory and do call END_UTMP_ENT.
16459
16460 2004-04-16  Jim Meyering  <jim@meyering.net>
16461
16462         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
16463         coreutils' stat program.
16464         (gl_PREREQ): Don't require jm_PREREQ_STAT.
16465
16466 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16467
16468         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16469         C89.
16470         (CHAR_BIT): Remove, since we assume C89.
16471         Include <stdint.h> if available, as per current Autoconf CVS advice.
16472
16473 2004-03-31  Jim Meyering  <jim@meyering.net>
16474
16475         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16476         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16477         * m4/xalloc.m4: Likewise.
16478
16479 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16480
16481         Merge from coreutils.
16482
16483         * m4/inttostr.m4: New file.
16484         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
16485         Require AM_STDBOOL_H and gl_TIMESPEC instead.
16486         Require gl_CLOCK_TIME.
16487         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
16488
16489 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16490
16491         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
16492         not bool, to be more consistent with Unix conventions.
16493         Suggested by Bruno Haible.
16494
16495         Merge from coreutils.
16496
16497         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
16498         * lib/umaxtostr.c: New files.
16499
16500         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
16501         the usual <time.h> dance.
16502         (get_date): Change signature to support fractional time stamps.
16503         All callers changed.
16504         * lib/getdate.y: Include "getdate.h" first, as we can now
16505         assume C89 and don't need to worry about 'const'.
16506         Similarly, include "unlocked-io.h" near start, not in middle.
16507         Include <limits.h>.
16508         (textint.value): Use long int rather than int.
16509         (textint.digits): Use size_t rather than int.
16510         (BILLION, LOG10_BILLION): New constants.
16511         (parser_control): New member rel_ns.  Members day_ordinal,
16512         time_zone, month, day, hour, minutes, rel_year, rel_month,
16513         rel_day, rel_hour, rel_minutes, rel_seconds
16514         are now long int, not int.  Member seconds is now struct timespec,
16515         not int.  New member timespec_seen.  Members dates_seen, days_seen,
16516         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
16517         not int.
16518         (%union.intval): Now long int, not int.
16519         New member timespec.
16520         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
16521         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
16522         (spec): Now is a timespec or an item list.
16523         (timespec, items): New nonterminals.
16524         (time, rel, relunit, number, get_date):
16525         Add support for fractional seconds.
16526         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
16527         (gmtime, localtime, mktime): Remove decls; not needed with C89.
16528         (to_hour): First arg is now long int, not int.
16529         (to_year): Returns long int, not int.
16530         Don't treat year -70 like 70.
16531         (tm_diff): Returns long int, not int.
16532         (lookup_word): Use bool instead of int when appropriate.
16533         (yylex): Use size_t for count, not int.
16534         Detect overflow when parsing large integer constants.
16535         Add support for fractions.
16536         (get_date): Make pointers 'const' if possible.
16537         Use more-portable code to detect integer overflow.
16538         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16539         Don't use ctime; it's not reliable if the year has >4 digits.
16540
16541         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16542         This is for compatibility with BSD.
16543
16544         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16545         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16546         From coreutils' system.h.
16547
16548         * lib/userspec.c: Don't include "posixver.h".
16549         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16550         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16551         compatible extension.  Simplify code by removing a boolean int
16552         that was always nonzero if a string was nonnull.
16553
16554 2004-03-30  Jim Meyering  <jim@meyering.net>
16555
16556         Merge from coreutils.
16557
16558         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16559         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16560         on some systems one must include <grp.h> before it.
16561         Reported by Christian Krackowizer.
16562
16563 2004-03-30  Jim Meyering  <jim@meyering.net>
16564
16565         Merge from coreutils.
16566
16567         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16568
16569         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16570         an empty input stream.
16571
16572         * lib/readtokens.c: Include <stdbool.h>.
16573         (readtoken): Use `size_t' rather than int/long.
16574         All callers adjusted.
16575         Use `bool' rather than `int' where appropriate.
16576         Use memset rather than an explicit loop.
16577         Use x2nrealloc rather than xrealloc.
16578         Allow the use of `\0' as a delimiter.
16579         (readtokens): Likewise.
16580         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16581
16582 2004-03-30  Jim Meyering  <jim@meyering.net>
16583
16584         * m4/realloc.m4: Remove file, since now it does no more than
16585         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16586         the `configure.ac' section of module/realloc.
16587         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16588
16589 2004-03-30  Bruno Haible  <bruno@clisp.org>
16590
16591         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16592         nonnull.
16593
16594 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16595
16596         Merge changes to getloadavg.c from coreutils and Emacs.
16597
16598         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16599         Define to an expression, not to the empty string.
16600         Include cloexec.h and xalloc.h.
16601         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16602         Use set_cloexec_flag rather than rolling our own.
16603         * lib/cloexec.c, lib/cloexec.h: New files.
16604
16605 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16606
16607         * m4/cloexec.m4: New file.
16608
16609 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16610
16611         * lib/getopt.h: Sync with libc CVS.
16612
16613 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16614             Bruno Haible  <bruno@clisp.org>
16615
16616         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16617         mbswidth.
16618
16619 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16620             Bruno Haible  <bruno@clisp.org>
16621
16622         * lib/mbswidth.h: Include <wchar.h> only if
16623         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16624         <wchar.h>.
16625         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16626
16627 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16628
16629         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16630         Sync with libc CVS.
16631         * lib/getopt_int.h: New file, also synced from libc.
16632
16633 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16634
16635         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16636         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16637         Bring back getopt.c, getopt.h, getopt1.c.
16638
16639 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16640
16641         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16642         All uses changed.  Check for sa_sigaction member; this fixes
16643         a bug first reported by Jason Andrade in
16644         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16645
16646 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16647
16648         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16649         '#if' expressions.  Unlike the code it replaces, it does not
16650         depend on (defined _SC_PAGESIZE).  However, it does depend on
16651         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16652         first reported by Jason Andrade in
16653         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16654
16655 2004-02-25  Simon Josefsson  <jas@extundo.com>
16656
16657         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16658
16659 2004-02-25  Simon Josefsson  <jas@extundo.com>
16660
16661         * lib/strdup.h: New file.
16662         * lib/strdup.c: Include it.
16663         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16664         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16665
16666 2004-02-23  Karl Berry  <karl@gnu.org>
16667
16668         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16669         (from fencepost.gnu.org:/gd/gnuorg).
16670
16671 2004-02-23  Karl Berry  <karl@gnu.org>
16672
16673         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16674         * config/srclist.txt: add maintain/standards documents.
16675
16676 2004-02-18  Bruno Haible  <bruno@clisp.org>
16677
16678         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16679         Reported by Derek Robert Price <derek@ximbiot.com>.
16680
16681 2004-02-16  Karl Berry  <karl@gnu.org>
16682
16683         * config/mkinstalldirs, install-sh: update from automake.
16684
16685 2004-02-06  Karl Berry  <karl@gnu.org>
16686
16687         * m4/po.m4: update from gettext 0.14.1.
16688
16689 2004-02-06  Karl Berry  <karl@gnu.org>
16690
16691         * lib/config.charset: update from gettext 0.14.1.
16692
16693 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16694
16695         Add comments and code, prompted by suggestions from Bruno Haible
16696         for sh-quote.
16697         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16698         describing the enum quoting_style values.
16699         * lib/quotearg.c (quotearg_alloc): New function.
16700         (quotearg_buffer_restyled): Treat lone { and } as special.
16701         Treat = as special.  Work around bug with older shells
16702         that "see" a '\' that is really the 2nd byte of a multibyte char.
16703         Quote empty string with shell_quoting_style.
16704
16705 2004-02-03  Bruno Haible  <bruno@clisp.org>
16706
16707         * m4/pipe.m4: New file, from GNU gettext.
16708
16709 2004-02-03  Bruno Haible  <bruno@clisp.org>
16710
16711         * lib/pipe.h: New file, from GNU gettext.
16712         * lib/pipe.c: New file, from GNU gettext.
16713
16714 2004-01-27  Bruno Haible  <bruno@clisp.org>
16715
16716         * m4/execute.m4: New file, from GNU gettext.
16717
16718 2004-01-27  Bruno Haible  <bruno@clisp.org>
16719
16720         * lib/execute.h: New file, from GNU gettext.
16721         * lib/execute.c: New file, from GNU gettext.
16722         * lib/w32spawn.h: New file, from GNU gettext.
16723
16724 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16725
16726         Merge from diffutils.
16727
16728         * lib/file-type.c (file_type): Add typed memory objects.
16729         * lib/file-type.h (S_TYPEISTMO): New macro.
16730
16731         * lib/c-stack.h (c_stack_action): Remove argv argument.
16732         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16733         (die): Don't calculate message unless segv_action returns.
16734         (get_stack_location, min_address_from_argv, max_address_from_argv,
16735         volatile stack_base, volatile_stack_size): Remove.
16736         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16737         that every segmentation violation is a stack overflow.  (Ouch!)
16738         See Debian bug 136249 (still outstanding) for more info about why
16739         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16740
16741 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16742
16743         Exit-status fix from coreutils.
16744
16745         Use exit_failure consistently in place of EXIT_FAILURE,
16746         so that program exit statuses are consistent on failure.
16747
16748         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16749         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16750         * lib/argmatch.h: Comment fix to match the above.
16751         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16752         Now a macro referring to exit_failure, instead of a separate
16753         variable.  Include "exitfail.h" to get it.
16754         * lib/xstrtol.h: Include "exitfail.h".
16755         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16756
16757         * lib/long-options.c (parse_long_options): Use prototype
16758         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16759         for clarity.
16760
16761 2004-01-21  Jim Meyering  <jim@meyering.net>
16762
16763         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16764         so as not to conflict with a different-sized __mktime_internal
16765         function in GNU libc.
16766         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16767         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16768
16769 2004-01-20  Karl Berry  <karl@gnu.org>
16770
16771         * config/config.guess: update from config.
16772
16773         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16774
16775 2004-01-20  Bruno Haible  <bruno@clisp.org>
16776
16777         Safer stack allocation.
16778         * lib/setenv.c: Include allocsa.h.
16779         (alloca): Remove fallback definition.
16780         (freea): Remove macro.
16781         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16782         instead of freea.
16783
16784 2004-01-20  Bruno Haible  <bruno@clisp.org>
16785
16786         * m4/eealloc.m4: New file, from GNU gettext.
16787
16788 2004-01-20  Bruno Haible  <bruno@clisp.org>
16789
16790         * m4/allocsa.m4: New file, from GNU gettext.
16791
16792 2004-01-20  Bruno Haible  <bruno@clisp.org>
16793
16794         * lib/xallocsa.h: New file, from GNU gettext.
16795         * lib/xallocsa.c: New file, from GNU gettext.
16796
16797 2004-01-20  Bruno Haible  <bruno@clisp.org>
16798
16799         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
16800
16801 2004-01-20  Bruno Haible  <bruno@clisp.org>
16802
16803         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
16804         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
16805         specially.
16806
16807 2004-01-20  Bruno Haible  <bruno@clisp.org>
16808
16809         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
16810         patch.
16811
16812 2004-01-20  Bruno Haible  <bruno@clisp.org>
16813
16814         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
16815
16816 2004-01-20  Bruno Haible  <bruno@clisp.org>
16817
16818         * lib/eealloc.h: New file.
16819
16820 2004-01-20  Bruno Haible  <bruno@clisp.org>
16821
16822         * lib/binary-io.h: Avoid warnings on Cygwin.
16823
16824 2004-01-20  Bruno Haible  <bruno@clisp.org>
16825
16826         * lib/allocsa.h: New file, from GNU gettext.
16827         * lib/allocsa.c: New file, from GNU gettext.
16828
16829 2004-01-18  Karl Berry  <karl@gnu.org>
16830
16831         * doc/gpl.texi, doc/lgpl.texi: new files.
16832
16833 2004-01-18  Karl Berry  <karl@gnu.org>
16834
16835         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
16836         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
16837
16838 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16839
16840         Merge from coreutils.
16841
16842         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
16843         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
16844         (gl_DEFAULT_POSIX2_VERSION): Move
16845         the documentation from 'configure' into 'config.hin',
16846         so that 'configure --help' isn't burdened by it and
16847         we don't have to worry about its formatting there.
16848         Reword the documentation so that it's more succinct
16849         and can be run together into a single paragraph.
16850         * m4/same.m4 (gl_SAME): Check for pathconf.
16851
16852 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16853
16854         Merge from coreutils.
16855
16856         * lib/posixver.c: Include posixver.h.
16857
16858         * lib/same.c: Include <stdbool.h>, <limits.h>.
16859         (_POSIX_NAME_MAX): Define if not defined.
16860         (MIN): New macro.
16861         (same_name): If file names are silently truncated, report
16862         that the file names are the same if they are the same after
16863         the silent truncation.
16864
16865         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
16866         conversion function.
16867         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
16868         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
16869         longer needed.
16870
16871 2004-01-15  Jim Meyering  <jim@meyering.net>
16872
16873         Merge from coreutils.
16874
16875         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
16876         if no library is required.
16877         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
16878         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
16879         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
16880         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
16881         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
16882         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
16883         value, $ac_cv_search_crypt, if it's "none required".
16884         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
16885         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
16886         not gl_FUNC_GETLOADAVG.
16887         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
16888         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
16889
16890 2004-01-15  Jim Meyering  <jim@meyering.net>
16891
16892         Merge from coreutils.
16893
16894         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
16895         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
16896         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
16897
16898         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
16899         optional configure-time default.
16900
16901         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16902
16903         * lib/xreadlink.c (xreadlink): Correct outdated comment.
16904
16905 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
16906
16907         Merge from coreutils.
16908
16909         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
16910         value, $ac_cv_search_nanosleep, if it's "none required".
16911
16912 2004-01-14  Paul Eggert  <eggert@twinsun.com>
16913
16914         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
16915         with like-named macro in fnmatch.c.
16916         (EXT): Use an internal constant instead.
16917
16918         Merge fnmatch patches from glibc.
16919         * lib/fnmatch.c (mbsinit): Remove define.
16920         Add libc_hidden_ver (__fnmatch, fnmatch).
16921         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
16922         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
16923
16924 2004-01-14  Karl Berry  <karl@gnu.org>
16925
16926         * config/install-sh: update from automake.
16927
16928 2004-01-13  Karl Berry  <karl@gnu.org>
16929
16930         * config/install-sh: update from automake.
16931
16932 2004-01-09  Karl Berry  <karl@gnu.org>
16933
16934         * config/install-sh: update from automake.
16935
16936 2004-01-05  Karl Berry  <karl@gnu.org>
16937
16938         * config/config.{sub,guess}: update from config.
16939
16940 2003-12-31  Karl Berry  <karl@gnu.org>
16941
16942         * config/depcomp: update from automake.
16943
16944 2003-12-14  Karl Berry  <karl@gnu.org>
16945
16946         * lib/config.charset: update from gettext-runtime.
16947
16948 2003-12-03  Paul Eggert  <eggert@twinsun.com>
16949
16950         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
16951         Bug reported by Alfred M. Szmidt.
16952
16953 2003-12-03  Bruno Haible  <bruno@clisp.org>
16954
16955         * m4/gettext.m4: Upgrade from gettext-0.13.
16956         * m4/po.m4: Upgrade from gettext-0.13.
16957         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
16958         * m4/intmax.m4: New file, from gettext-0.13.
16959         * m4/printf-posix.m4: New file, from gettext-0.13.
16960
16961 2003-11-29  Karl Berry  <karl@gnu.org>
16962
16963         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
16964
16965 2003-11-25  Paul Eggert  <eggert@twinsun.com>
16966             Bruno Haible  <bruno@clisp.org>
16967
16968         * lib/printf-parse.h: Don't include sys/types.h.
16969         (ARG_NONE): New macro.
16970         (char_directive): Change type of *arg_index fields to size_t.
16971         * lib/printf-parse.c: Don't include sys/types.h.
16972         (SSIZE_MAX): Remove macro.
16973         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
16974         Remove unnecessary overflow check.
16975         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
16976         fields.
16977
16978 2003-11-25  Bruno Haible  <bruno@clisp.org>
16979
16980         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
16981
16982 2003-11-25  Bruno Haible  <bruno@clisp.org>
16983
16984         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
16985         gt_TYPE_SSIZE_T.
16986
16987 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16988
16989         * modules/alloca: Remove dependency on xalloc.
16990
16991 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16992
16993         * lib/alloca.c: Remove dependency on xalloc module.
16994         (xalloc_die): Remove.
16995         (memory_full) [!defined emacs]: New macro.
16996         [!defined emacs]: Don't include xalloc.h.
16997         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
16998         address arithmetic overflows.  Change datatypes a bit to avoid
16999         unnecessary casts.
17000
17001 2003-11-22  Jim Meyering  <jim@meyering.net>
17002
17003         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
17004         s/size/size_t/.
17005
17006 2003-11-21  Karl Berry  <karl@gnu.org>
17007
17008         * config/config.{sub,guess}: update from config.
17009
17010 2003-11-18  Karl Berry  <karl@gnu.org>
17011
17012         * config/config.{sub,guess}: update from config.
17013
17014         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
17015
17016 2003-11-17  Paul Eggert  <eggert@twinsun.com>
17017
17018         * README: Mention that S+T cannot overflow if S is the size of
17019         an existing object and T is sufficiently small.
17020
17021 2003-11-17  Jim Meyering  <jim@meyering.net>
17022
17023         On systems without utime and without a utimes function capable of
17024         dealing with a NULL struct utimbuf* argument, this utime replacement
17025         could -- in unusual circumstances -- leak a file descriptor.
17026         * lib/utime.c: Include <unistd.h> and <errno.h>.
17027         (utime_null): Be sure to close `fd' and to preserve errno.
17028         Reported by Geoff Collyer via Arnold Robbins.
17029
17030 2003-11-17  Bruno Haible  <bruno@clisp.org>
17031
17032         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
17033         (Depends-on): Add xsize.
17034
17035 2003-11-17  Bruno Haible  <bruno@clisp.org>
17036
17037         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
17038
17039 2003-11-17  Bruno Haible  <bruno@clisp.org>
17040
17041         * lib/vasnprintf.c (alloca): Remove fallback definition.
17042         (freea): Remove definition.
17043         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
17044         Reported by Paul Eggert.
17045
17046 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17047             Bruno Haible  <bruno@clisp.org>
17048
17049         Protect against address arithmetic overflow.
17050         * lib/printf-args.h: Include stddef.h.
17051         (arguments): Change type of field 'count' to size_t.
17052         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17053         'unsigned int' where appropriate.
17054         * lib/printf-parse.h: Include sys/types.h.
17055         (char_directive): Change type of *arg_index fields to ssize_t.
17056         (char_directives): Change type of fields 'count', max_*_length to
17057         size_t.
17058         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17059         (SSIZE_MAX): Define fallback value.
17060         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17061         instead of 'int' where appropriate. Check a_allocated, d_allocated
17062         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17063         * lib/vasnprintf.c: Include xsize.h.
17064         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17065         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17066         overflow. Avoid wraparound when converting a width or precision from
17067         decimal to binary.
17068
17069 2003-11-16  Bruno Haible  <bruno@clisp.org>
17070
17071         Update from GNU gettext.
17072         * lib/printf-parse.c: Generalize to it can be compiled for wide
17073         strings.
17074         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17075         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17076         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17077         SNPRINTF): New macros.
17078         Don't include <alloca.h> if the file is used inside libintl.
17079         (local_wcslen): New function, for Solaris 2.5.1.
17080         (VASNPRINTF): Use it instead of wcslen.
17081
17082 2003-11-16  Bruno Haible  <bruno@clisp.org>
17083
17084         * lib/xsize.h (xmax): New function.
17085         (xsum, xsum3, xsum4): Declare as "pure" functions.
17086
17087 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17088
17089         * modules/xalloc (Files): Undo latest change, since xalloc.h
17090         no longer needs SIZE_MAX or PTRDIFF_MAX.
17091
17092 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17093
17094         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
17095         gl_PTRDIFF_MAX.
17096
17097 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17098
17099         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
17100         "return", to pacify some unknown compiler.  Problem reported
17101         by Joerg Schilling.
17102
17103 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17104
17105         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
17106         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
17107         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
17108         heuristic is just as accurate as far as we know, and it removes a
17109         dependency on size_max.m4 and ptrdiff_max.m4.
17110
17111 2003-11-11  Bruno Haible  <bruno@clisp.org>
17112
17113         * modules/xsize (Files): Add m4/size_max.m4.
17114         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
17115
17116 2003-11-11  Bruno Haible  <bruno@clisp.org>
17117
17118         * m4/size_max.m4: New file.
17119         * m4/ptrdiff_max.m4: New file.
17120         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
17121         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
17122         (gl_XALLOC): Invoke it.
17123
17124 2003-11-11  Bruno Haible  <bruno@clisp.org>
17125
17126         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
17127         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
17128         defined.
17129
17130 2003-11-10  Paul Eggert  <eggert@twinsun.com>
17131
17132         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
17133         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
17134         rejected some allocations of exactly SIZE_MAX - 2 bytes.
17135         From Bruno Haible.
17136         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
17137         not (size_t) -1, since it's defined here.
17138
17139 2003-11-09  Karl Berry  <karl@gnu.org>
17140
17141         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
17142
17143 2003-11-06  Paul Eggert  <eggert@twinsun.com>
17144
17145         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
17146         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
17147         Reject sizes of exactly SIZE_MAX bytes.
17148         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
17149         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
17150
17151 2003-11-05  Bruno Haible  <bruno@clisp.org>
17152
17153         * lib/xsize.h: Include limits.h, to avoid a possible collision with
17154         SIZE_MAX defined in <limits.h> on Solaris.
17155
17156 2003-11-04  Jim Meyering  <jim@meyering.net>
17157
17158         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
17159         variable names, rather than @VAR@.
17160         * modules/poll: Likewise.
17161
17162 2003-11-04  Bruno Haible  <bruno@clisp.org>
17163
17164         * modules/xsize: New file.
17165         * modules/linebreak: Depend on xsize.
17166         * MODULES.html.sh (func_all_modules): Add xsize.
17167
17168 2003-11-04  Bruno Haible  <bruno@clisp.org>
17169
17170         * m4/xsize.m4: New file.
17171
17172 2003-11-04  Bruno Haible  <bruno@clisp.org>
17173
17174         * lib/xsize.h: New file.
17175         * lib/linebreak.c: Include xsize.h.
17176         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
17177         argument for overflow.
17178         Suggested by Paul Eggert.
17179
17180 2003-11-03  Karl Berry  <karl@gnu.org>
17181
17182         * config/config.{guess,sub}: update from config.
17183
17184 2003-11-03  Jim Meyering  <jim@meyering.net>
17185
17186         * modules/userspec (lib_SOURCES): Add userspec.h.
17187         (Include): Add "userspec.h".
17188         Improve description.
17189
17190 2003-11-03  Jim Meyering  <jim@meyering.net>
17191
17192         * lib/userspec.c: Include "userspec.h".
17193         * lib/userspec.h: New file.
17194
17195 2003-11-03  Bruno Haible  <bruno@clisp.org>
17196
17197         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
17198
17199 2003-11-03  Bruno Haible  <bruno@clisp.org>
17200
17201         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
17202         available, to avoid (extremely rare) race condition.
17203         Suggested by Paul Eggert.
17204
17205 2003-11-02  Karl Berry  <karl@gnu.org>
17206
17207         * config/srclist.txt (vasprintf.c): sync broken, sigh.
17208
17209 2003-10-31  Paul Eggert  <eggert@twinsun.com>
17210
17211         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
17212         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
17213         (read_filesystem_list): Set and use me_type_malloced.
17214         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
17215         whatever the type happens to be), for brevity and consistency.
17216         Check for size calculation overflow on Alphas running OSF/1.
17217
17218 2003-10-31  Jim Meyering  <jim@meyering.net>
17219
17220         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
17221
17222         * lib/linebuffer.c: Include <string.h> for declaration of memset.
17223
17224 2003-10-30  Paul Eggert  <eggert@twinsun.com>
17225             Bruno Haible  <bruno@clisp.org>
17226
17227         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
17228         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
17229
17230 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17231
17232         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
17233         netbsd*-gnu*.  Suggested by Robert Millan.
17234
17235 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17236
17237         * modules/group-member: Depend on stdbool.
17238
17239 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17240
17241         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
17242
17243 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17244
17245         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
17246         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
17247         after the 'gnu' in these cases.  This fixes some bugs in the
17248         previous change, and is based on suggestions by Robert Millan.
17249
17250 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17251
17252         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
17253         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
17254         no longer needed.
17255         * lib/quotearg.c (quotearg_n_options): Use it.
17256         * lib/group-member.c: Include <stdbool.h>.
17257         (free_group_info): Arg is now const *; don't free arg.
17258         (get_group_info): Now returns bool and accepts struct group_info *,
17259         rather than returning a malloc'ed struct group_info *.
17260         All uses changed.  Check for overflow in internal size calculation.
17261
17262         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
17263         rather than xmalloc/xrealloc.
17264         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
17265         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
17266         conformance bug: the old code used a pointer after freeing the
17267         storage that it addressed.
17268         * lib/hash.c (hash_initialize): Simplify the code by using
17269         xalloc_oversized rather than doing it by hand.
17270         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
17271         the buffer preserved.  Use free and xmalloc instead.
17272         * lib/quotearg.c (quotearg_n_options): Likewise.
17273         Use a simpler test for size overflow.  Don't use xalloc_oversized
17274         because unsigned int might be wider than size_t (!); this suggests
17275         that we should switch from unsigned int to size_t for slot numbers.
17276
17277 2003-10-28  Paul Eggert  <eggert@twinsun.com>
17278
17279         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
17280         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
17281         NetBSD kernels.  Requested by Richard Stallman.
17282
17283 2003-10-27  Paul Eggert  <eggert@twinsun.com>
17284
17285         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
17286         to allocate the returned structure.  Do not allocate a subarray,
17287         as x2nrealloc will do that.
17288         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
17289         instead of xnrealloc.
17290         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
17291
17292 2003-10-27  Bruno Haible  <bruno@clisp.org>
17293
17294         * lib/stdbool_.h: Better support for BeOS.
17295
17296 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17297
17298         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
17299         now uses inline.
17300
17301 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17302
17303         * lib/xalloc.h (xalloc_oversized): New static inline function, for
17304         callers that want to do their own size-overflow checking.  Include
17305         <stdbool.h>, since xalloc_oversized returns bool.
17306         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
17307         to use xalloc_oversized.
17308
17309         Add two functions x2realloc, x2nrealloc, for programs that grow
17310         arrays dynamically by doubling their sizes.
17311         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
17312         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
17313         New functions.
17314
17315         Port to C99 semantics for 'inline' of external functions.
17316         Bug reported by Bruno Haible.
17317         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
17318         with the old contents of xnmalloc.
17319         (xnmalloc, xmalloc): Use it.
17320         (xnrealloc_inline): New static inline function,
17321         with the old contents of xnrealloc.
17322         (xnrealloc, xrealloc): Use it.
17323
17324         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17325         that.
17326
17327 2003-10-26  Karl Berry  <karl@gnu.org>
17328
17329         * config/srclist.txt (COPYING.DOC): no longer available from
17330         /gd/gnuorg; don't know where the ultimate source is.
17331
17332 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17333
17334         Fix several address-calculation bugs in the hash modules,
17335         plus some minor code cleanup.
17336
17337         * lib/hash.h: Include <stdbool.h>, for bool.
17338         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17339         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17340         hash_get_n_entries, hash_get_max_bucket_length,
17341         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17342         hash_rehash): Use size_t rather than unsigned.
17343         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17344         hash_get_n_buckets_used, hash_get_n_entries,
17345         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17346         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17347         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17348         Likewise.
17349         (SIZE_MAX): Define if not defined.
17350         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17351         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17352         hash_print):
17353         Use const * when possible.
17354         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17355         (check_tuning): Fix bug: if tuning parameters were very close to
17356         0 or 1, rounding errors could have caused subscript violations.
17357         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17358         (hash_initialize): Add 'fail:' label
17359         to free table and return NULL, and use it to simplify code.
17360         Use calloc rather than clearing the storage ourself.
17361         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17362         buffer size calculations.
17363         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17364         Include <stddef.h>, for size_t.
17365         * lib/hash-pjw.c (hash_pjw): Likewise.
17366         Switch to method described by Bruno Haible.
17367         Include <limits.h>, for CHAR_BIT.
17368         (SIZE_BITS): New macro.
17369
17370 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17371
17372         * m4/getline.m4 (AM_FUNC_GETLINE):
17373         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17374         hosts.  Problem reported by Derek Robert Price in
17375         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17376         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17377         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17378
17379 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17380
17381         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17382         ceiling the allocation at NMAX bytes rather than silently
17383         discarding input bytes before NMAX is reached.  This makes
17384         a difference only if NMAX exceeds SIZE_MAX / 2.
17385
17386         * lib/obstack.c: Merge from glibc.
17387         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17388         Add libc_hidden_def (_obstack_newchunk).
17389         (_obstack_free) [! defined _LIBC]: Remove.
17390         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17391         a clone of the function body.
17392         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17393         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17394
17395         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17396         glibc.
17397         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17398         arg to memcpy.
17399
17400         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17401         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17402         Don't use lvalue casts, as GCC plans to remove support for them
17403         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17404         was also present in the non-GCC version, indicating that this
17405         code had always been buggy and had never been widely used.
17406         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17407         Use the fast variant of each macro, rather than copying the
17408         definiens of the fast variant; that way, we'll be more likely to
17409         catch future bugs in the fast variants.
17410
17411 2003-10-20  Bruno Haible  <bruno@clisp.org>
17412
17413         * modules/wait-process: New file.
17414         * MODULES.html.sh (func_all_modules): Add wait-process.
17415
17416 2003-10-20  Bruno Haible  <bruno@clisp.org>
17417
17418         * m4/wait-process.m4: New file.
17419
17420 2003-10-20  Bruno Haible  <bruno@clisp.org>
17421
17422         * lib/wait-process.h: New file, from GNU gettext.
17423         * lib/wait-process.c: New file, from GNU gettext.
17424
17425 2003-10-19  Jim Meyering  <jim@meyering.net>
17426
17427         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17428         HPUX 10.20.
17429
17430 2003-10-18  Karl Berry  <karl@gnu.org>
17431
17432         * config/config.guess: update from config.
17433
17434 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17435
17436         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17437         (getgroups): First arg is int, not size_t.
17438         Don't let 'free' mangle errno.
17439
17440 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17441
17442         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17443
17444 2003-10-16  Karl Berry  <karl@gnu.org>
17445
17446         * config/config.{guess,sub}: update from config.
17447
17448 2003-10-16  Jim Meyering  <jim@meyering.net>
17449
17450         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17451         memcpy.
17452
17453 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17454
17455         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17456         (SIZE_MAX): Remove.
17457         (new_exclude, add_exclude_file): Initial size no longer needs to
17458         be a power of 2.
17459         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
17460         our own address arithmetic overflow checking.
17461
17462         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
17463         (fnmatch): Do not alloca more than 2000 wide characters;
17464         instead, use malloc for large buffers.
17465         Check for address arithmetic overflow, and return -1
17466         with errno set to ENOMEM in that case.
17467         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17468         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17469         instead, return -1.  Check for address arithmetic overflow.
17470
17471 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17472
17473         Handle invalid suffixes and overflow independently, so that
17474         callers can treat them independently as needed.  Fix some bugs in
17475         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17476         suffix for a human-readable blocksize.  The major caller-visible
17477         change is the addition of a new
17478         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17479         that both overflow and suffix chars were found.
17480
17481         * lib/human.c (humblock): Don't check separately for invalid suffix
17482         char; that is xstrtoumax's job (now that its bug is fixed).
17483         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
17484         INTMAX_MAX]: New macros.
17485         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
17486         TYPE_MAXIMUM): New macros.
17487         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
17488         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
17489         if overflow occurs, as it's what __strtol does and it's more useful
17490         in practice.
17491         (__xstrtol): If __strtol reports some error other than ERANGE,
17492         reflect it to the caller as LONGINT_INVALID.  If it reports
17493         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
17494         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
17495         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
17496         value.
17497         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
17498         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
17499         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
17500         [defined UINTMAX_MAX]: New macros.
17501
17502 2003-10-14  Bruno Haible  <bruno@clisp.org>
17503
17504         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
17505
17506 2003-10-14  Bruno Haible  <bruno@clisp.org>
17507
17508         * m4/sig_atomic_t: New file, from GNU gettext.
17509         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
17510
17511 2003-10-14  Bruno Haible  <bruno@clisp.org>
17512
17513         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
17514         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
17515         Also use volatile where needed.
17516
17517 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17518
17519         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
17520         Change maintainer from Bruno Haible to 'all'.
17521
17522 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17523
17524         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
17525
17526 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17527
17528         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
17529         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
17530         and define in terms of the other primitives.
17531         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17532         (SIZE_MAX): Define if not already defined.
17533         (array_size_overflow): New function.
17534         (xalloc_die): Abort instead of exiting if 'error' returns.
17535         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17536         (xmalloc, xrealloc): Use them.
17537         (xcalloc): Check for address arithmetic overflow.
17538         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17539         a bit faster than strcpy.
17540
17541 2003-10-10  Simon Josefsson  <jas@extundo.com>
17542
17543         * modules/argp (Depends-on): Add restrict and strcase.
17544
17545 2003-10-10  Simon Josefsson  <jas@extundo.com>
17546
17547         * m4/argp.m4: Add AC_C_INLINE.
17548
17549 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17550
17551         Merge getpass from libc, plus a few fixes.
17552
17553         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17554         Include <stdbool.h>.
17555         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17556         __fsetlocking to empty.
17557         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17558         do include <bits/libc-lock.h>.
17559         Do not include <fcntl.h>; not needed.
17560         [_LIBC]: Include <wchar.h>.
17561         (NOTCANCEL_MODE): New macro.
17562         (flockfile, funlockfile) [_LIBC]: New macros.
17563         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17564         [!_LIBC]: New macros.
17565         (call_fclose): New function.
17566         (getpass): Use it.  Save tty stream separately; this simplifies the
17567         code and makes it more reliable if stdin happens to equal stdout.
17568         Invoke __fsetlocking on tty.
17569         Handle thread cancellation if needed.
17570         Namespace cleanup (use __tcgetattr, __getline).
17571         Use bool for Booleans.
17572         [USE_IN_LIBIO]: Handle wide streams.
17573         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17574         stream might go where.
17575
17576         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17577         doesn't have to include <stdio.h> before us.
17578         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17579         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17580         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17581         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17582         if not declared, so that we can use getpass.c code from libc without
17583         rewriting it.
17584         (flockfile, ftrylockfile, funlockfile): New macros.
17585
17586 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17587
17588         * modules/getpass: Depend on stdbool.
17589
17590 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17591
17592         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17593
17594 2003-10-07  Karl Berry  <karl@gnu.org>
17595
17596         * config/config.{guess,sub}: update from config.
17597
17598 2003-10-06  Jim Meyering  <jim@meyering.net>
17599             Bruno Haible  <bruno@clisp.org>
17600
17601         This lets translators provide better translations for the
17602         "Written by ..." part of --version output.
17603         * lib/version-etc.h: Include stdarg.h.
17604         (version_etc_copyright): Declare as readonly.
17605         (version_etc): Make this function variadic with a NULL-terminated list
17606         of author name strings.
17607         (version_etc_va): New declaration.
17608         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17609         (version_etc_copyright): Declare as readonly.
17610         (version_etc_va): New function. Provide a different translatable string
17611         for each possible number of authors < 10. Abbreviate when there are 10
17612         authors or more.
17613         (version_etc): Make this function variadic. Call version_etc_va.
17614         Suggestion from Gary V. Vaughan.
17615
17616         * lib/long-options.h (parse_long_options): Change prototype: the
17617         authors string is moved to the end and becomes variadic.
17618         * lib/long-options.c: Include stdarg.h.
17619         (parse_long_options): Make this function variadic, too.
17620         Call version_etc_va, not version_etc.
17621
17622 2003-10-06  Bruno Haible  <bruno@clisp.org>
17623
17624         * modules/version-etc-2: Remove file.
17625         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17626
17627 2003-10-06  Bruno Haible  <bruno@clisp.org>
17628
17629         * modules/fatal-signal: New file.
17630         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17631
17632 2003-10-06  Bruno Haible  <bruno@clisp.org>
17633
17634         * m4/fatal-signal.m4: New file.
17635         * m4/signalblocking.m4: New file, from GNU gettext.
17636
17637 2003-10-06  Bruno Haible  <bruno@clisp.org>
17638
17639         * lib/version-etc-2.h: Remove file.
17640         * lib/version-etc-2.c: Remove file.
17641
17642 2003-10-06  Bruno Haible  <bruno@clisp.org>
17643
17644         * lib/fatal-signal.h: New file, from GNU gettext.
17645         * lib/fatal-signal.c: New file, from GNU gettext.
17646
17647 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17648
17649         * README: Rework advice for preventing empty .o files.
17650         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17651         not <sys/types.h>.
17652
17653 2003-10-04  Karl Berry  <karl@gnu.org>
17654
17655         * lib/argp*: update from libc.
17656
17657 2003-10-04  Karl Berry  <karl@gnu.org>
17658
17659         * config/config.{guess,sub}: update from config.
17660
17661 2003-10-02  Bruno Haible  <bruno@clisp.org>
17662
17663         * modules/lchown (Include): Add lchown.h.
17664         * modules/time_r (Include): Use "..." syntax.
17665         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17666
17667 2003-10-01  Simon Josefsson  <jas@extundo.com>
17668
17669         * MODULES.html.sh (func_all_modules): Move gethostname from section
17670         'based on' to section 'lacking' POSIX:2001.
17671
17672 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17673
17674         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17675         to output mode on the same stream.
17676
17677 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17678
17679         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17680         Fix arg typo in previous patch.
17681
17682 2003-09-28  Jim Meyering  <jim@meyering.net>
17683
17684         * lib/error.c: Correct cpp indentation.
17685
17686 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17687
17688         * modules/free: New file.
17689
17690 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17691
17692         * m4/free.m4: New file.
17693
17694 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17695
17696         * lib/minmax.h (MIN, MAX)
17697         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17698         Omit the special code that used __typeof__, since we worry that
17699         it could be more trouble than it's worth.  See:
17700         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17701         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17702
17703         * lib/free.c: New file.
17704
17705 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17706
17707         Trivial fixes to Makefile.am parts of module listings.
17708         * modules/strstr: Append strstr.h to lib_SOURCES.
17709         * modules/strcase: Likewise, for strcase.h.
17710
17711 2003-09-27  Karl Berry  <karl@gnu.org>
17712
17713         * config/mkinstalldirs: update from automake.
17714
17715 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17716
17717         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17718         (error_tail): Do not loop, reallocating temporary buffer, since
17719         the output cannot contain more wide characters than the input
17720         contains bytes, the size must be big enough already.  This avoids
17721         one potential size overflow calculation.  Check for size overflow
17722         when calculating temporary buffer size.  Free temporary buffer
17723         when done, if it was allocated with malloc; this plugs a memory
17724         leak.  Remove casts from void * to pointers, that are no longer
17725         needed now that we're assuming C89 or better.
17726
17727         Merge error changes from glibc.
17728
17729         * lib/error.c, error.h: Update copyright notice header to match glibc.
17730         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17731         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17732         Disable cancellation while printing error.
17733         * lib/error.h: Prepend __ to parameter names.
17734
17735 2003-09-26  Jim Meyering  <jim@meyering.net>
17736
17737         * lib/error.c (error_tail): Move some declarations
17738         into inner scope where the local variables are used.
17739
17740 2003-09-26  Bruno Haible  <bruno@clisp.org>
17741
17742         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17743         stpncpy().
17744         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17745
17746 2003-09-26  Bruno Haible  <bruno@clisp.org>
17747
17748         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17749         (stpncpy): Define as alias for gnu_stpncpy.
17750         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17751
17752 2003-09-25  Simon Josefsson  <jas@extundo.com>
17753
17754         * lib/xgetdomainname.h: New file.
17755         * lib/xgetdomainname.c: New file.
17756
17757 2003-09-25  Simon Josefsson  <jas@extundo.com>
17758             Bruno Haible  <bruno@clisp.org>
17759
17760         * modules/getdomainname: New file.
17761         * modules/xgetdomainname: New file.
17762         * MODULES.html.sh (func_all_modules): Add getdomainname,
17763         xgetdomainname.
17764
17765 2003-09-25  Simon Josefsson  <jas@extundo.com>
17766             Bruno Haible  <bruno@clisp.org>
17767
17768         * m4/getdomainname.m4: New file.
17769
17770 2003-09-25  Simon Josefsson  <jas@extundo.com>
17771             Bruno Haible  <bruno@clisp.org>
17772
17773         * lib/getdomainname.h: New file.
17774         * lib/getdomainname.c: New file.
17775
17776 2003-09-25  Karl Berry  <karl@gnu.org>
17777
17778         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17779
17780 2003-09-25  Karl Berry  <karl@gnu.org>
17781
17782         * config/install-sh: update from automake.
17783
17784 2003-09-25  Bruno Haible  <bruno@clisp.org>
17785
17786         * modules/version-etc-2: New file, from modules/version-etc with
17787         modifications.
17788         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17789
17790 2003-09-25  Bruno Haible  <bruno@clisp.org>
17791
17792         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17793         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17794
17795 2003-09-24  Simon Josefsson  <jas@extundo.com>
17796
17797         * modules/xgethostname: Add xgethostname.h.
17798
17799 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17800
17801         * lib/linebuffer.c (freebuffer): Don't free the argument, just
17802         the buffer associated with the argument.  Bug reported by
17803         Simon Josefsson.
17804
17805 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17806
17807         * README: Document assumptions that 'int' is at least 32 bits
17808         wide, that integer arithmetic is 2's complement without overflow,
17809         that there are no holes in integer values, that adding sizes of
17810         two nonoverlapping objects can't overflow, and that all-bits-zero
17811         yields scalar zero.  Fix spelling and capitalization typos.
17812
17813 2003-09-19  Karl Berry  <karl@gnu.org>
17814
17815         * lib/argp.h: update from libc.
17816
17817 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17818
17819         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
17820         to avoid spurious warnings like "AC_RUN_IFELSE was called before
17821         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
17822
17823 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17824
17825         * gnulib-tool: Use "test -h", not "test -L", for portability
17826         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
17827         (tags_regexp): Remove, since \| doesn't conform to POSIX.
17828         (sed_extract_prog): Issue s commands one-by-one, rather than
17829         using \| in one s command.
17830
17831 2003-09-16  Paul Eggert  <eggert@twinsun.com>
17832
17833         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
17834         input error, instead of returning NULL the next time we are called
17835         (and therefore losing track of errno).
17836
17837 2003-09-16  Bruno Haible  <bruno@clisp.org>
17838
17839         * gnulib-tool (func_create_testdir): Warn about duplicated
17840         dependencies.
17841
17842 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17843
17844         * modules/argmatch, modules/fatal, modules/obstack,
17845         modules/xalloc, modules/xgethostname: Sort dependencies by
17846         importance, not alphabetically.
17847
17848 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17849
17850         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
17851         fails, so that the caller gets the proper errno.
17852
17853         * lib/readutmp.c (read_utmp): Likewise.
17854         Check for fstat error.  Close stream and free storage
17855         when failing.
17856
17857 2003-09-14  Karl Berry  <karl@gnu.org>
17858
17859         * config/srclist.txt (strdup.c): disable for c89 changes.
17860
17861 2003-09-14  Jim Meyering  <jim@meyering.net>
17862
17863         * lib/getloadavg.c: Correct cpp indentation.
17864         * lib/strdup.c: Likewise.
17865         * lib/vasnprintf.c: Likewise.
17866
17867 2003-09-14  Bruno Haible  <bruno@clisp.org>
17868
17869         * modules/fwriteerror: New file.
17870         * MODULES.html.sh (func_all_modules): Add fwriteerror.
17871
17872 2003-09-14  Bruno Haible  <bruno@clisp.org>
17873
17874         * lib/fwriteerror.h: New file.
17875         * lib/fwriteerror.c: New file.
17876
17877 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17878
17879         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
17880         modules/xgethostname, modules/xalloc: Depend on exit.
17881
17882 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17883
17884         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
17885
17886         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
17887         and AC_MINIX, too, so that their extensions are available.
17888
17889         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
17890         This macro has been superseded by gl_BACKUPFILE.
17891
17892         More patches to assume C89 or better.
17893
17894         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
17895
17896         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
17897         unconditionally.
17898         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
17899         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
17900         Include <string.h>, <stdlib.h> unconditionally.
17901         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
17902         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
17903         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
17904         headers or for string.h.
17905         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
17906         or strtoul.
17907
17908         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
17909         headers.
17910         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
17911         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17912         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
17913         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
17914         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17915         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
17916         memcpy, memset.
17917         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
17918         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
17919         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
17920         strtol.
17921         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
17922         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
17923         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
17924         strtoul.
17925
17926 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17927
17928         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
17929         * lib/obstack.c [!defined _LIBC]: Likewise.
17930         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
17931         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
17932         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
17933
17934         More changes to assume C89 or better.
17935
17936         * lib/error.c (error_tail): Assume vprintf.
17937
17938         * lib/argmatch.c (getenv): Remove decl.
17939         * lib/progreloc.c (get_full_program_name): Define via prototype.
17940         * lib/setenv.c (clearenv): Likewise.
17941         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
17942         needed.
17943         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
17944         (malloc, memcpy): Remove decls.
17945         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
17946         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
17947         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17948         (memcpy): Remove macro.
17949         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
17950         (__P): Remove.  All uses removed.
17951         (PTR): Remove.  All uses changed to void *.
17952         (CHAR_BIT, NULL): Remove.
17953         (spaces, zeros, memset_space, memset_zero)
17954         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
17955         Remove.
17956         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
17957         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
17958         Define with prototype.
17959         Remove now-unnecessary prototype decl.
17960         (extra_args_spec): Assume ANSI C.  All uses changed.
17961         (extra_args_spec_iso): Remove.
17962         (my_strftime, emacs_strftimeu): Define via prototype.
17963         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
17964         unconditionally.
17965         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
17966         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
17967         (strtoul, strtol): Remove decls.
17968         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
17969         LONG_MAX): Remove.
17970         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17971         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
17972         (LOCALE_PARAM_PROTO): New macro.
17973         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
17974         (INTERNAL (strtol), strtol): Define with a prototype.
17975         (PARAMS): Remove.  All uses removed.
17976         * lib/tempname.c: Include <string.h> unconditionally.
17977         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
17978         * lib/xgethostname.c (main): Define with a prototype.
17979         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
17980         Include <stdlib.h> unconditionally.
17981         (calloc, malloc, realloc, free): Remove decls.
17982         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
17983         Include <stdlib.h> unconditionally.  Sort include file names.
17984         (strtod): Remove.
17985         (xstrtod): Define with a prototype.
17986         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
17987         (strtol, strtoul): Remove decls.
17988
17989 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17990
17991         More patches to assume C89 or better.
17992         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
17993         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
17994         string.h, memchr, STDC_HEADERS.
17995
17996 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17997
17998         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
17999         Include <stdlib.h>, <string.h> unconditionally.
18000         Remove now-unnecessary cast to char *.
18001         * lib/strnlen.c: Include <string.h> unconditionally.
18002         * lib/yesno.c (yesno): Define with a prototype.
18003
18004 2003-09-11  Bruno Haible  <bruno@clisp.org>
18005
18006         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
18007
18008 2003-09-10  Jim Meyering  <jim@meyering.net>
18009
18010         * lib/error.c: Correct indentation of cpp directives.
18011
18012 2003-09-10  Bruno Haible  <bruno@clisp.org>
18013
18014         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
18015         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
18016         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
18017         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
18018         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
18019         <stdlib.h> and <string.h> checks.
18020         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
18021         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
18022
18023 2003-09-10  Bruno Haible  <bruno@clisp.org>
18024
18025         * lib/strcspn.c: Include <string.h> unconditionally.
18026         * lib/strpbrk.c: Include <string.h> unconditionally.
18027         * lib/strstr.c: Include <string.h> unconditionally.
18028         * lib/unicodeio.c: Include <string.h> unconditionally.
18029         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
18030         * lib/unsetenv.c: Likewise.
18031         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
18032         * lib/yesno.c: Include <stdlib.h> unconditionally.
18033         (rpmatch): Add prototype.
18034
18035 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18036
18037         More patches to assume C89 or better.
18038         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
18039         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
18040         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
18041         or for string.h.
18042         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
18043         stdlib.h.
18044         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18045         C headers.
18046         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18047         string.h.
18048         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18049         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18050         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18051         or for string.h.
18052         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18053         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18054         C headers.
18055         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18056         memcpy.
18057         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18058         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18059         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18060         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18061         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18062         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18063         string.h, free.
18064         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18065         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18066         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18067         C headers, or for string.h.
18068         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18069         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18070         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18071         headers, memory.h, stdlib.h, string.h, strings.h.
18072         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18073         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18074         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18075         strchr.
18076         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18077         headers, memory.h, string.h.
18078         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18079         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18080         free.
18081         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18082         headers.
18083         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18084         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
18085         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
18086         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
18087         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
18088
18089 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18090
18091         More K&R removal.
18092
18093         * lib/acosl.c (main): Use a prototype.
18094         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
18095         tanl.c: Likewise.
18096
18097         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
18098
18099         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
18100         (getopt, etopt_long, getopt_long_only, _getopt_internal)
18101         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
18102         with a prototype.
18103         * lib/getopt.c (const): Remove macro.
18104         Include <string.h> unconditionally.
18105         (my_index): Remove; all uses changed to strchr.
18106         (strlen): Remove decl.
18107         (exchange): Remove forward decl; no longer needed.
18108         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
18109         Define with prototype.
18110         * lib/getopt1.c (const): Remove macro.
18111         (getopt_long, getopt_long_only, main): Define with prototype.
18112
18113         * lib/getugroups.c: Include <string.h> unconditionally.
18114
18115         * lib/getusershell.c: Include <stdlib.h> unconditionally.
18116         (getusershell, setusershell, endusershell, readname, main):
18117         Define with prototypes.
18118
18119         * lib/group-member.c: Include group-member.h first.
18120         Include <stdlib.h> unconditionally.
18121
18122         * lib/hard-locale.c: Include hard-locale.h first.
18123         Include <stdlib.h>, <string.h> unconditionally.
18124
18125         * lib/hash.c (free, malloc): Remove decls.
18126         Include <stdlib.h> unconditionally.
18127
18128         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
18129         (getenv): Do not declare.
18130
18131         * lib/idcache.c: Include <string.h> unconditionally.
18132
18133         * lib/long-options.c: Include long-options.h first, to test interface.
18134         Include <stdlib.h> unconditionally.
18135
18136         * lib/makepath.c: Include makepath.h first, to test interface.
18137         Include <stdlib.h> and <string.h> unconditionally.
18138
18139         * lib/linebuffer.c: Include <stdlib.h>.
18140         (free): Remove decl.
18141
18142         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
18143         stddef.h. rpl_malloc returns void *, not char *.
18144         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
18145         prototype.
18146
18147         * lib/md5.h: Include <limits.h> unconditionally.
18148         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
18149         (__P): Remove; all uses removed.
18150         * lib/md5.c: Include "md5.h" first.
18151         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
18152         md5_buffer, md5_process_bytes, md5_process_block):
18153         Define with prototypes.
18154         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
18155         * lib/sha.c: Include "sha.h" first.
18156         Include <stdlib.h>, <string.h> unconditionally.
18157
18158         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
18159         * lib/memcmp.c (__ptr_t): Likewise.
18160         * lib/memrchr.c (__ptr_t): Likewise.
18161         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
18162         Include <string.h> unconditionally.
18163         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
18164         * lib/memchr.c: Include <stdlib.h> unconditionally.
18165         * lib/memchr.c (LONG_MAX): Remove.
18166         * lib/memrchr.c (LONG_MAX): Likewise.
18167         * lib/memchr.c (__memchr): Define via a prototype.
18168         * lib/memrchr.c (__memrchr): Likewise.
18169         * lib/memcmp.c (__P): Remove, and remove all uses.
18170         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
18171         Remove forward decls; no longer needed.
18172         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
18173         Use types required by C89 in prototype.
18174
18175         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
18176         * lib/savedir.c: Likewise.
18177         * lib/mkdir.c (free): Remove decl.
18178         * lib/rmdir.c (rmdir): Define with a prototype.
18179         * lib/savedir.c: Include savedir.h first, to test interface.
18180
18181         * lib/mktime.c (STDC_HEADERS): Remove.
18182         Include <stdlib.h>, <string.h> unconditionally.
18183
18184         * lib/modechange.c: Include <stdlib.h> unconditionally.
18185         (malloc): Remove decl.
18186
18187         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
18188         (free): Remove decl.
18189
18190         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
18191         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
18192         (This type really should be intptr_t, but that's a C99ism.)
18193         (_obstack_memcpy): Remove: all uses changed to memcpy.
18194         Include <string.h> unconditionally.
18195         (struct obstack): Assume __STDC__ for types of members
18196         chunkfun, freefun, extra_arg.
18197         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
18198         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
18199         obstack_begin, obstack_specify_allocation,
18200         obstack_specify_allocation_with_arg, obstack_chunkfun,
18201         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
18202         Remove unprototyped decls and the macros that use them.
18203         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
18204         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
18205         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
18206         (defined __STDC__ && __STDC__)]:
18207         Remove nonprototyped code.
18208         Include <stdlib.h> unconditionally.
18209         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
18210         _obstack_allocated_p, _obstack_free, obstack_free,
18211         _obstack_memory_used, print_and_abort):
18212         Define using prototypes.
18213         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
18214         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
18215         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
18216         obstack_next_free, obstack_object_size, obstack_room) [0]:
18217         Remove unused, unprototyped code.
18218
18219         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
18220
18221         * lib/physmem.c (physmem_total, physmem_available, main): Define
18222         with prototypes.
18223
18224         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
18225         (main): Define with a prototype.
18226
18227         * lib/posixver.c (getenv): Remove decl.
18228
18229         * lib/putenv.c (malloc): Returns void *, not char *.
18230         Include <string.h> unconditionally.
18231         (strchr, memcpy, NULL): Do not define.
18232
18233         * lib/readtokens.c: Include readtokens.h first, to test interface.
18234         Include <stdlib.h>, <string.h> unconditionally.
18235         (init_tokenbuffer): Define with a prototype.
18236
18237         * lib/regex.c (PARAMS): Remove.  All uses removed.
18238         All uses of _RE_ARGS removed, too.
18239         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18240         unconditionally.
18241         (bzero): Assume memset exists.
18242         (memcmp, memcpy, NULL): Remove.
18243         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
18244         char, or assignments to local vars of type signed char.
18245         (init_syntax_once, PREFIX(extract_number_and_incr),
18246         PREFIX(print_partial_compiled_pattern),
18247         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
18248         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
18249         PREFIX(regex_grow_registers), PREFIX(regex_compile),
18250         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
18251         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
18252         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
18253         wcs_compile_range, byte_compile_range, truncate_wchar,
18254         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
18255         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
18256         count_mbs_length, wcs_re_match_2_internal,
18257         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
18258         PREFIX(alt_match_null_string_p),
18259         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
18260         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
18261         regfree, PREFIX(extract_number)): Define with prototype.  Remove
18262         now-unnecessary declaration, if any.
18263         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
18264         regcomp, regexec):
18265         Remove now-unnecessary casts among pointer types.
18266         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
18267
18268         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
18269         (free): Remove decl.
18270
18271         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
18272
18273         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
18274         (free): Remove decl.
18275
18276         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
18277         * lib/xgetcwd.c: Likewise.
18278
18279         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
18280         (free): Remove decl.
18281
18282         * lib/strchrnul.c (strchrnul): Define with a prototype.
18283         Fix bug: c_in was not converted to char before searching.
18284
18285         The following changes are not K&R related:
18286
18287         * lib/group-member.h: Include <sys/types.h>, so that this file is
18288         self-contained.
18289         * lib/makepath.h: Likewise.
18290
18291         * lib/getusershell.c (readname, default_index, line_size, readname):
18292         Use size_t, not int, for sizes.
18293         (readname): If the size overflows, report an error instead of
18294         looping forever.
18295
18296 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18297
18298         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
18299         libc.
18300
18301 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18302
18303         * README: New section: portability guidelines.
18304
18305 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18306
18307         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
18308         C89 spec.
18309
18310 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18311
18312         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
18313
18314 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18315
18316         Assume C89 or better; remove K&R cruft.
18317         A few of these changes were first proposed by Derek Robert Price
18318         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18319
18320         * lib/addext.c: Include <string.h> unconditionally.
18321         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18322         Don't declare getenv or malloc.
18323
18324         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18325         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18326         (NULL): Remove.
18327         (find_stack_direction, alloca): Use prototypes.
18328
18329         * lib/atexit.c (atexit): Define using a prototype.
18330
18331         * lib/basename.c, dirname.c, stripslash.c:
18332         Include <string.h> unconditionally.
18333
18334         * lib/bcopy.c: Include <stddef.h>.
18335         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18336
18337         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18338
18339         * lib/error.h (error, error_at_line, error_print_progname)
18340         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18341         * lib/error.c: Include error.h first, to check interface.
18342         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18343         (VA_START): Remove; all uses changeed to va_start.
18344         (exit, strerror): Remove decls.
18345         (error_print_progname): Prototype uncondionally.
18346         Don't include <errno.h>; no longer needed.
18347         (private_strerror): Remove.
18348         (error_tail): Always define.
18349         (error, error_at_line): Assume C89 or better; always use prototypes.
18350         * lib/fatal.c: Include "fatal.h" first, to test interface.
18351         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18352         (VA_START): Remove; all uses changed to va_start.
18353         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18354         this case.
18355         (exit): Remove decl.
18356         (fatal): Prototype unconditionally.  Assume va_start works.
18357         Abort at end, to pacify gcc.
18358
18359         * lib/euidaccess.c (main): Define with a prototype.
18360
18361         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18362
18363         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18364
18365         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18366         prototypes.
18367         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18368         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18369         (getenv): Remove decl.
18370         (fnmatch): Define using a prototype.
18371         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18372         (FCT): Define using a prototype.
18373
18374         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18375
18376         * lib/gethostname.c: Include <stddef.h>.
18377         (gethostname): Define with prototype.  Length is size_t, not int.
18378
18379 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18380
18381         Assume C89 or better; remove K&R cruft.
18382         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18383         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18384         string.h, getenv, malloc.
18385         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18386         headers.
18387         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18388         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18389         do not check for strerror.
18390         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18391         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18392         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18393         do not check for doprnt or vprintf.
18394         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18395         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18396
18397 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18398
18399         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18400         getversion.c should have been removed then, but was accidentally
18401         preserved.
18402
18403         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18404         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18405
18406 2003-09-08  Karl Berry  <karl@gnu.org>
18407
18408         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18409                 config, forget about prep.
18410
18411         * config/depcomp, missing: update from automake.
18412
18413 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18414
18415         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18416         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18417
18418 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18419
18420         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18421         copy_tm_result.  Bug reported by Simon Josefsson in
18422         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18423
18424 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18425
18426         * m4/time_r.m4: New file.
18427         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18428         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18429         is. Check for timegm declaration.
18430         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18431         Do not check for gmtime_r.
18432         Replace mktime if __mktime_internal does not exist and if mktime
18433         hasn't been replaced already.
18434
18435 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18436
18437         * lib/time_r.c, lib/time_r.h: New files.
18438
18439         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18440         __localtime_r.
18441         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18442         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18443
18444         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18445         __gmtime_r.
18446         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18447         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18448         Include <time_r.h>.
18449
18450         * lib/timegm.c: Switch to glibc implementation, with the following
18451         changes:
18452         [defined HAVE_CONFIG_H]: Include <config.h>.
18453         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18454         (__mktime_internal) [!defined _LIBC]: New decl.
18455         (__gmtime_r) [!defined _LIBC]: New macro and function.
18456         (timegm): Use a prototype, since gnulib assumes C89.
18457         Do not bother declaring tmp to be const, as it's not really usefu.
18458         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
18459         (timegm): Declare only if HAVE_DECL_TIMEGM.
18460
18461 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18462
18463         * MODULES.html.sh (func_all_modules): Add time_r.
18464         * modules/time_r: New file.
18465         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18466         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18467
18468 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18469
18470         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18471         Bug reported by Lute Kamstra in
18472         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18473
18474         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18475         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18476         course with correspondingly smaller numbers for tomorrow and
18477         yesterday.  From Tadayoshi Funaba.  Originally installed into
18478         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18479         coreutils merge?).
18480
18481 2003-08-31  Simon Josefsson  <jas@extundo.com>
18482
18483         * modules/timegm: New file.
18484         * MODULES.html.sh (func_all_modules): Add timegm.
18485
18486 2003-08-31  Simon Josefsson  <jas@extundo.com>
18487
18488         * m4/timegm.m4: New file.
18489
18490 2003-08-31  Simon Josefsson  <jas@extundo.com>
18491
18492         * lib/timegm.h: New file.
18493         * lib/timegm.c: New file.  Based on
18494         wget-1.8.2/src/http.c:mktime_from_utc.
18495
18496 2003-08-31  Karl Berry  <karl@gnu.org>
18497
18498         * lib/argp.h: update from libc.
18499
18500 2003-08-28  Bruno Haible  <bruno@clisp.org>
18501
18502         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
18503         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
18504         followed by '#define fnmatch fnmatch_posix' gives an error.
18505
18506 2003-08-28  Bruno Haible  <bruno@clisp.org>
18507
18508         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
18509         warning on QNX, which defines O_BINARY to 000000.
18510
18511 2003-08-27  Jim Meyering  <jim@meyering.net>
18512
18513         * m4/mkstemp.m4: Require that the system mkstemp be able to create
18514         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
18515         would fail after 32.  Reported by Danny Levinson.  Details here:
18516         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
18517
18518 2003-08-24  Bruno Haible  <bruno@clisp.org>
18519
18520         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
18521         MSVC7 <stdio.h> is included later.
18522
18523 2003-08-22  Simon Josefsson  <jas@extundo.com>
18524
18525         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
18526
18527 2003-08-20  Karl Berry  <karl@gnu.org>
18528
18529         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
18530
18531 2003-08-20  Bruno Haible  <bruno@clisp.org>
18532
18533         * modules/progname: New file.
18534         * MODULES.html.sh (func_all_modules): Add progname.
18535
18536 2003-08-20  Bruno Haible  <bruno@clisp.org>
18537
18538         * lib/progname.h: New file, from GNU gettext.
18539         * lib/progname.c: New file, from GNU gettext.
18540         * lib/progreloc.c: New file, from GNU gettext.
18541
18542 2003-08-19  Jim Meyering  <jim@meyering.net>
18543
18544         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18545         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18546
18547 2003-08-19  Bruno Haible  <bruno@clisp.org>
18548
18549         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18550         more.
18551
18552 2003-08-19  Bruno Haible  <bruno@clisp.org>
18553
18554         * lib/xstrdup.c: Assume <string.h> exists.
18555
18556 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18557
18558         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18559         in makefile rules.
18560
18561 2003-08-18  Jim Meyering  <jim@meyering.net>
18562
18563         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18564         * m4/lib-ld.m4: Likewise.
18565
18566 2003-08-18  Jim Meyering  <jim@meyering.net>
18567
18568         * lib/setenv.h: Indent nested cpp directive.
18569         * lib/vasnprintf.c: Remove trailing blanks.
18570
18571 2003-08-17  Simon Josefsson  <jas@extundo.com>
18572
18573         * modules/xstrndup: New file.
18574         * MODULES.html.sh (func_all_modules): Add xstrndup.
18575
18576 2003-08-17  Simon Josefsson  <jas@extundo.com>
18577
18578         * modules/argp: Fix autoconf macro name. Add more dependencies.
18579
18580 2003-08-17  Simon Josefsson  <jas@extundo.com>
18581
18582         * m4/xstrndup.m4: New file.
18583
18584 2003-08-17  Simon Josefsson  <jas@extundo.com>
18585
18586         * m4/argp.m4: New file.
18587
18588 2003-08-17  Simon Josefsson  <jas@extundo.com>
18589             Bruno Haible  <bruno@clisp.org>
18590
18591         * lib/xstrndup.h: New file.
18592         * lib/xstrndup.c: New file.
18593
18594 2003-08-17  Bruno Haible  <bruno@clisp.org>
18595
18596         * modules/strndup (Files, Include): Add lib/strndup.h.
18597
18598 2003-08-17  Bruno Haible  <bruno@clisp.org>
18599
18600         * modules/euidaccess (Files): Add lib/euidaccess.h.
18601
18602 2003-08-17  Bruno Haible  <bruno@clisp.org>
18603
18604         * lib/strndup.h: New file.
18605
18606 2003-08-17  Bruno Haible  <bruno@clisp.org>
18607
18608         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18609         like AC_GNU_SOURCE.
18610         * modules/extensions (configure.ac): Comment out the invocation of
18611         gl_USE_SYSTEM_EXTENSIONS.
18612
18613 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18614
18615         Merges from coreutils, etc.
18616         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18617         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18618         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18619         fixing a typo.
18620         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18621         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18622
18623 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18624
18625         Document merge from coreutils.
18626         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18627         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18628         * modules/utime: Add m4/utimes-null.m4.
18629
18630 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18631
18632         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18633         space, undoing this 2003-08-12 change:
18634         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18635
18636 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18637
18638         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18639         strtoul.c from libc, undoing this 2003-08-12 change:
18640         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18641
18642 2003-08-16  Jim Meyering  <jim@meyering.net>
18643
18644         Merges from coreutils.
18645         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18646         prefix.  Adjust cache variables similarly.  Create 500 rather than
18647         just 300 files, to exercise bug on Darwin6.5, too.
18648         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18649         $missing_dir.
18650         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18651         AM_SYS_POSIX_TERMIOS.
18652         Reported by mkc@mathdogs.com.
18653         Also change use of $am_cv_sys_posix_termios
18654         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18655         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18656         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18657         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18658         in /proc/mounts until it finds one with matching device number.  This
18659         is unnecessary when the FILE argument *is* a mount point.  No stat call
18660         is necessary in that case.  So, disable the statvfs-testing code on
18661         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18662         as RedHat bug# 84846.
18663         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18664         to 1MB, so as not to render systems with no stack size limit (e.g.,
18665         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18666         Include <unistd.h>.  On some systems,
18667         it is required for the definition of _SC_PAGESIZE.
18668
18669 2003-08-16  Jim Meyering  <jim@meyering.net>
18670
18671         Merge from coreutils.
18672         * lib/xstrtoimax.c: #else #if -> #elif.
18673         * lib/xstrtoumax.c: Likewise.
18674
18675 2003-08-16  Jim Meyering  <jim@meyering.net>
18676
18677         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18678         * m4/utimes.m4: Removed.
18679         * m4/utimes-null.m4: Renamed from utimes.m4.
18680
18681         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18682         to 1MB, so as not to render systems with no stack size limit (e.g.,
18683         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18684         Include <unistd.h>.  On some systems,
18685         it is required for the definition of _SC_PAGESIZE.
18686
18687 2003-08-16  Jim Meyering  <jim@meyering.net>
18688         and Paul Eggert  <eggert@cs.ucla.edu>
18689
18690         Merges from coreutils, etc.
18691
18692         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18693         using the latest version from cvs.  This avoids problems with #line
18694         directives using a vendor (Sun) compiler.
18695         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18696         Don't set GETGROUPS_LIB here; now it's
18697         done via getgroups.m4's wrapper function.
18698         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18699         rather than just in sh-util/configure.in, so that the
18700         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18701         same.
18702         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18703         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18704         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18705         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18706         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18707         Remove code that is now done by the newly-required macros.
18708         Append $(EXEEXT) to DF_PROG.
18709         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18710         Do not invoke or require the following here,
18711         since prereq.m4 or some gnulib .m4 now does this for us:
18712         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18713         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18714         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18715         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18716         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18717         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18718         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18719         AC_FUNC_OBSTACK.
18720         Do not replace the following functions, as this is now the job
18721         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18722         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18723         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18724         atexit getpass, strdup, getpagesize.
18725         Replace 'raise'.
18726         Do not check for the following functions, as this is now the job
18727         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18728         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18729         setregid.
18730         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18731         Check for sys/sysctl.h.
18732         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18733         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18734         of checking for ssize_t ourselves.
18735
18736         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18737         Require every macro that gnulib/modules/* suggests for us.
18738         (jm_PREREQ_ADDEXT): New macro.
18739         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18740         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18741
18742         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18743         (gl_PHYSMEM): Use it.
18744         Also check for `table' function.
18745         Check for new headers and functions.
18746         Add check for sys/sysmp.h.
18747         With suggestions from Kaveh Ghazi.
18748         Ignore headers that are present but cannot be compiled.  This
18749         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18750         C 5.4.
18751
18752 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18753
18754         Document merge from coreutils.
18755         * modules/userspec: Depend on posixver.
18756         * modules/strftime: Depend on tzset.
18757
18758 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18759
18760         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18761         rather than tab, after '#' in shell-script copyright notices.
18762         Suggested by Bruno Haible.
18763
18764 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18765
18766         * config/srclist-update: Use three spaces, rather than tab, after '#'
18767         in shell-script copyright notices.  Suggested by Bruno Haible.
18768         Remove unnecessary parenthesization in regular expression.
18769
18770 2003-08-15  Jim Meyering  <jim@meyering.net>
18771
18772         Merge from coreutils.
18773         * lib/xgethostname.c: Include <stdlib.h>.
18774         (xghostname): Don't exit for anything other than memory-related
18775         failure; just return NULL.
18776         * lib/userspec.c: Include "posixver.h".
18777         (parse_user_spec): Accept `.' as a separator only
18778         in pre-POSIX-200112 mode.
18779         * lib/strtoimax.c: Use #elif rather than #else #if.
18780         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18781         Remove function, now that we can rely on a working tzset function.
18782         [!_LIBC]: Ensure that the required autoconf test has been run.
18783         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18784         Use underlying_strftime for %r.
18785         * lib/sha.c: Merge in some clean-up and optimization changes from
18786         glibc.
18787         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18788         Ensure that it is a multiple of 64.
18789         Rearrange loop exit tests so as to avoid performing an
18790         additional fread after encountering an error or EOF.
18791         * lib/realloc.c: Update copyright date.
18792
18793 2003-08-15  Jim Meyering  <jim@meyering.net>
18794         and Paul Eggert  <eggert@twinsun.com>
18795
18796         Merge from coreutils.
18797         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
18798         member but strut utmpx does not.  Needed for AIX 4.3.3.
18799         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
18800
18801 2003-08-15  Jim Meyering  <jim@meyering.net>
18802         and Paul Eggert  <eggert@cs.ucla.edu>
18803
18804         Merges from coreutils, etc.
18805         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
18806         Require gl_FUNC_TZSET_CLOBBER.
18807         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
18808         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
18809         members.
18810
18811 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18812
18813         Help the merge from coreutils.
18814         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
18815         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
18816         * m4/tzset.m4: Use it too.
18817
18818 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18819
18820         * modules/tzset: New file.
18821
18822 2003-08-14  Jim Meyering  <jim@meyering.net>
18823
18824         Merges from coreutils.
18825         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
18826         variable names, rather than @FNMATCH_H@.
18827         * modules/alloca: Likewise for $(ALLOCA_H).
18828
18829         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
18830         the three copies of the literal target, `fnmatch.h'.
18831         * modules/alloca (alloca.h): Likewise.
18832
18833 2003-08-14  Jim Meyering  <jim@meyering.net>
18834
18835         Merge from coreutils.
18836         * m4/tzset.m4: New file.
18837         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
18838         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
18839         otherwise, AIX 5.1 systems would end up using the latter.
18840         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
18841         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
18842         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
18843         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
18844
18845 2003-08-14  Jim Meyering  <jim@meyering.net>
18846
18847         Merge from coreutils.
18848         * lib/obstack.h: Whitespace changes.
18849         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
18850         and xcalloc return values.
18851         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
18852         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
18853         hang on OSF/1 5.1 for DIR on both local and remote file systems.
18854         Reported by (and fix confirmed by) Nelson H. F. Beebe.
18855         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18856         error from mntctl.
18857         Use mntctl's return value to drive the entry-processing loop, since
18858         we can't rely on the value of the vmt_length member in the last
18859         entry.  On some systems doing so could result in exhausting
18860         virtual memory.  Based in part on a patch from Mike Jetzer.
18861
18862 2003-08-14  Jim Meyering  <jim@meyering.net>
18863         and Paul Eggert  <eggert@twinsun.com>
18864
18865         Merges from coreutils, plus other fixes.
18866         * lib/physmem.c: Merge in portability changes from gcc/libiberty
18867         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
18868         for credits and details.  Thanks to Kaveh Ghazi for helping
18869         to keep these files in sync.
18870         (ARRAY_SIZE): Define it.
18871         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
18872         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
18873         (memcasecmp): Don't assume size_t fits in unsigned int.
18874         Remove casts and duplicate code.
18875         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
18876         (memcpy): Remove definition.
18877         Merge in some clean-up and optimization changes from glibc.
18878         [BLOCKSIZE]: Move definition to top of file.
18879         Ensure that it is a multiple of 64.
18880         Rearrange loop exit tests so as to avoid performing an
18881         additional fread after encountering an error or EOF.
18882         * lib/md5.h (md5_uintptr): Define.
18883         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
18884         return to the initial working directory.  Preserve errno
18885         for caller.
18886         * lib/idcache.c: Include "xalloc.h".
18887         (xmalloc, xrealloc): Remove decls.
18888         (getuser): Remove casts no longer required in C89.
18889         * lib/human.c: Include stdio.h, for sprintf.
18890         * lib/group-member.c: Include "xalloc.h".
18891         (xmalloc, xrealloc): Remove decls.
18892         (get_group_info): Remove casts no longer required in C89.
18893         * lib/getusershell.c (readname): Remove casts no longer required in
18894         C89.
18895         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
18896         * lib/getline.c: Whitespace fix, from coreutils.
18897
18898 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18899
18900         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
18901         Check for isascii.
18902
18903         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18904         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18905         Undo previous (whitespace-only) change.
18906
18907 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18908
18909         * lib/exclude.c: Include <ctype.h>
18910         (IN_CTYPE_DOMAIN): New macro.
18911         (is_space): New fn.
18912         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
18913         and empty lines.
18914
18915         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18916         Undo previous (whitespace-only) change.
18917
18918 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18919
18920         * config/srclist-update: Change update back to the old behavior,
18921         leaving whitespace alone.  Use one 'sed' command rather than a
18922         pipeline.
18923         (fixlicense): Now a variable, not a function.
18924         (remove_trailing_blanks): Remove.
18925         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
18926         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18927         Undo previous (whitespace-only) change.
18928
18929 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18930
18931         Merge from coreutils.
18932         * modules/euidaccess: Add lib_SOURCES, include for new
18933         file euidaccess.h
18934
18935 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18936
18937         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18938         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18939         Normalize leading white space and remove trailing white space.
18940
18941         Merge from coreutils
18942         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
18943
18944         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
18945         0.12.1.  These files are now being upgraded automatically by
18946         ../config/srclist-update.
18947
18948 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18949
18950         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18951         Normalize leading white space and remove trailing white space.
18952         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
18953         notice, as per ../config/srclist-update.
18954
18955         Merge from coreutils.
18956         * lib/euidaccess.h: New file.
18957         * lib/euidaccess.c: Include it.
18958         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
18959         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
18960         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
18961
18962 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18963
18964         * config/srclist-update: Add copyright notice.
18965         (remove_id_lines, remove_trailing_blanks): New constants.
18966         (fixfile): Use them to normalize spacing a bit in copied files.
18967         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18968         Normalize leading white space and remove trailing white space.
18969
18970         * config/texinfo.tex: Sync with texinfo.
18971
18972         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
18973         strtoul.c from libc, to merge coreutils whitespace changes.
18974
18975         * config/srclist.txt: Get the following m4 files from gettext:
18976         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
18977         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
18978         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
18979         wint_t.m4.
18980
18981 2003-08-12  Karl Berry  <karl@gnu.org>
18982
18983         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
18984         been made.
18985
18986 2003-08-11  Paul Eggert  <eggert@twinsun.com>
18987
18988         * modules/gnu-source, m4/gnu-source.m4:
18989         Remove; we're assuming Autoconf 2.54 or later now.
18990         Suggested by Bruno Haible.
18991         * MODULES.html.sh (func_all_modules): Remove gnu-source.
18992
18993 2003-08-11  Bruno Haible  <bruno@clisp.org>
18994
18995         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
18996
18997 2003-08-11  Bruno Haible  <bruno@clisp.org>
18998
18999         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
19000         (vasnprintf): Use it instead of wcslen.
19001
19002 2003-08-11  Bruno Haible  <bruno@clisp.org>
19003
19004         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
19005         value to ensure that _Bool promotes to int. Use #define for _Bool when
19006         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
19007
19008 2003-08-10  Karl Berry  <karl@gnu.org>
19009
19010         * lib/regex.h: update from libc (whitespace fix).
19011
19012 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19013
19014         Merge some files from coreutils.  These changes were
19015         originally made by Jim Meyering.
19016         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
19017         many older Unixes require this.
19018         * lib/alloca.c (alloca): Remove cast to argument of free;
19019         no longer needed in C89.
19020         * lib/alloca_.h, regex.h: Fix white space to match
19021         what GNU indent does.
19022
19023 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19024
19025         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
19026         apparently Emacs's Unicode mode got confused before my 2003-08-05
19027         checkin.
19028
19029 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19030
19031         * m4/extensions.m4: New file.
19032         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
19033         Require gl_USE_SYSTEM_EXTENSIONS.
19034         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
19035         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
19036
19037 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19038
19039         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
19040         * modules/extensions, modules/gnu-source: New files.
19041         * modules/timespec, modules/unlocked-io: Depend on extensions.
19042
19043 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19044
19045         * modules/restrict: New file.
19046         * MODULES.html.sh (func_all_modules): Add restrict.
19047         * modules/regex: Depend on restrict.
19048
19049 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19050
19051         * m4/restrict.m4: New file.
19052         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19053
19054 2003-08-07  Bruno Haible  <bruno@clisp.org>
19055
19056         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19057         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19058
19059 2003-08-07  Bruno Haible  <bruno@clisp.org>
19060
19061         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19062         makes the module 'getndelim2' compatible with the module 'getline'.
19063
19064 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19065
19066         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19067         byte with "\201" to avoid glitches when editing that source file
19068         with multi-gnome-terminal.
19069
19070 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19071
19072         * lib/bumpalloc.h: Remove.
19073
19074 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19075
19076         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19077         * modules/bumpalloc: Remove.
19078
19079 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19080
19081         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19082         GNU coding style.
19083
19084         Merge from coreutils.
19085         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
19086         1. From glibc.
19087         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
19088         from Karl Berry, implemented by Jim Meyering.
19089         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
19090         from Dmitry V. Levin.
19091         Remove anachronistic cast of xrealloc.
19092         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
19093         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
19094         type. Otherwise, it wouldn't compile with at least /bin/cc on
19095         ymp-cray-unicos9.0.2.X.
19096         Combine two mostly-identical uses of alloca into one.
19097         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
19098
19099 2003-08-04  Dave Love  <d.love@dl.ac.uk>
19100
19101         [From Emacs.]
19102
19103         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
19104         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
19105         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
19106         obsolete NLIST_NAME_UNION.
19107         [__GNU__]: Undef BSD and FSCALE.
19108         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
19109
19110 2003-08-03  Paul Eggert  <eggert@twinsun.com>
19111
19112         * lib/stdbool_.h (_Bool): Make it signed char, instead of
19113         an enum type, so that it's guaranteed to promote to int.  See:
19114         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
19115
19116 2003-08-03  Karl Berry  <karl@gnu.org>
19117
19118         * config/depcomp: update from automake.
19119
19120 2003-07-31  Paul Eggert  <eggert@twinsun.com>
19121
19122         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
19123         (strerror): Don't assume that a printable int fits in 14 bytes.
19124
19125 2003-07-31  Bruno Haible  <bruno@clisp.org>
19126
19127         * modules/getpass-gnu: New file.
19128         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
19129
19130 2003-07-31  Bruno Haible  <bruno@clisp.org>
19131
19132         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
19133
19134 2003-07-24  Karl Berry  <karl@gnu.org>
19135
19136         * config/missing: update from automake.
19137
19138 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
19139             Bruno Haible  <bruno@clisp.org>
19140
19141         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
19142         * lib/getline.c (getline, getdelim): Likewise.
19143         Remove _GNU_SOURCE define; now it's defined in config.h through
19144         m4/getline.m4.
19145
19146 2003-07-23  Karl Berry  <karl@gnu.org>
19147
19148         * config/config.sub: update from prep.
19149
19150 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19151
19152         * modules/xalloc (Depends-on): Add exitfail.
19153         * modules/xmemcoll: Likewise.
19154
19155 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19156
19157         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
19158         over-parenthesization in macros.
19159
19160         Sync with coreutils.
19161
19162         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
19163         required by C99.
19164
19165         Use `exit_failure' for xalloc and xmemcoll instead of their own
19166         private exit-failure variables.
19167         * lib/xalloc.h (xalloc_exit_failure): Remove.
19168         * lib/xmalloc.c: Likewise.  Include exitfail.h.
19169         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
19170         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
19171         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
19172         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
19173
19174 2003-07-20  Jim Meyering  <jim@meyering.net>
19175
19176         * modules/closeout (Depends-on): Add exitfail.
19177         Suggestion from Bruno Haible.
19178
19179 2003-07-19  Karl Berry  <karl@gnu.org>
19180
19181         * config/config.sub: update from prep.
19182
19183 2003-07-18  Paul Eggert  <eggert@twinsun.com>
19184
19185         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
19186         Remove.
19187         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
19188         to test that it can stand by itself.  Include "exitfail.h".
19189         Clients should set exit_failure instead.
19190         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
19191
19192 2003-07-18  Bruno Haible  <bruno@clisp.org>
19193
19194         * modules/getndelim2: New file.
19195         * modules/getline: Share files with module getndelim2.
19196         * modules/getnline: Depend on getndelim2 instead of sharing files with
19197         it. Add getnline.c to lib_SOURCES.
19198         * MODULES.html.sh (func_all_modules): Add getndelim2.
19199
19200 2003-07-18  Bruno Haible  <bruno@clisp.org>
19201
19202         * m4/getndelim2.m4: New file.
19203         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
19204         invoke gl_PREREQ_GETNDELIM2.
19205         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
19206         gl_PREREQ_GETNDELIM2.
19207         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
19208         gl_GETNDELIM2.
19209
19210 2003-07-18  Bruno Haible  <bruno@clisp.org>
19211
19212         * lib/getndelim2.h: New file.
19213         * lib/getndelim2.c: Make into a module of its own. Include config.h,
19214         getndelim2.h.
19215         (getndelim2): Make non-static. Change return type to ssize_t.
19216         * lib/getline.h: Change argument names.
19217         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
19218         * lib/getnline.c: Include getndelim2.h.
19219
19220 2003-07-18  Andreas Schwab  <schwab@suse.de>
19221
19222         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
19223
19224 2003-07-17  Karl Berry  <karl@gnu.org>
19225
19226         * config/config.sub: update from prep.
19227
19228 2003-07-17  Bruno Haible  <bruno@clisp.org>
19229
19230         * modules/getnline: New file.
19231         * modules/getline: Add lib/getndelim2.c to source file list.
19232         * MODULES.html.sh (func_all_modules): Add getnline.
19233
19234 2003-07-17  Bruno Haible  <bruno@clisp.org>
19235
19236         * m4/getnline.m4: New file.
19237
19238 2003-07-17  Bruno Haible  <bruno@clisp.org>
19239
19240         * m4/Makefile.am.in: Remove file.
19241         * m4/Makefile.am: Remove file.
19242         * m4/Makefile.in: Remove file.
19243
19244 2003-07-17  Bruno Haible  <bruno@clisp.org>
19245
19246         * lib/getnline.h: New file.
19247         * lib/getnline.c: New file.
19248         * lib/getndelim2.c: New file, extracted from getline.c.
19249         (getndelim2): Renamed from getdelim2, with added nmax argument.
19250         * lib/getline.c: Include getndelim2.c.
19251         (getdelim2): Moved out to getndelim2.c.
19252         (getline, getdelim): Update.
19253
19254 2003-07-17  Bruno Haible  <bruno@clisp.org>
19255
19256         * lib/Makefile.am: Remove file.
19257         * lib/Makefile.in: Remove file.
19258
19259 2003-07-17  Bruno Haible  <bruno@clisp.org>
19260
19261         * configure.in: Remove file.
19262         * Makefile.in: Remove file.
19263
19264 2003-07-17  Bruno Haible  <bruno@clisp.org>
19265
19266         * MODULES.html.sh: Put the </BODY> right before </HTML>.
19267
19268 2003-07-16  Karl Berry  <karl@gnu.org>
19269
19270         * config/srclist-update: was running fixlicense twice, which caused
19271                 texinfo.tex to be nullified for some reason.  Simplify,
19272                 $gplsrc is no longer needed as far as I can see?
19273
19274 2003-07-16  Jim Meyering  <jim@meyering.net>
19275
19276         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
19277
19278 2003-07-15  Paul Eggert  <eggert@twinsun.com>
19279
19280         * config/srclist.txt: Get the following files from gettext-runtime/intl
19281         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
19282         ref-del.sin.  From Bruno Haible.
19283         * config/srclist-update (fixfile): Change grep pattern again, since the
19284         previous fix didn't work (there was another trailing $).  Use
19285         '[$]' to escape the $s.
19286
19287 2003-07-15  Karl Berry  <karl@gnu.org>
19288
19289         * lib/vasnprintf.c: update from gettext.
19290
19291 2003-07-15  Karl Berry  <karl@gnu.org>
19292
19293         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
19294         gets expanded when surrounded by '$'.
19295
19296 2003-07-15  Jim Meyering  <jim@meyering.net>
19297
19298         * modules/save-cwd: Don't depend on error.  From Derek Price.
19299
19300 2003-07-15  Jim Meyering  <jim@meyering.net>
19301
19302         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
19303
19304 2003-07-14  Simon Josefsson  <jas@extundo.com>
19305
19306         * modules/mempcpy: New file.
19307         * MODULES.html.sh (func_all_modules): Add mempcpy.
19308
19309 2003-07-14  Simon Josefsson  <jas@extundo.com>
19310
19311         * m4/mempcpy.m4: New file.
19312
19313 2003-07-14  Simon Josefsson  <jas@extundo.com>
19314
19315         * lib/mempcpy.h: New file.
19316         * lib/mempcpy.c: New file.
19317
19318 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19319
19320         * modules/getdate, modules/posixtm: Depend on mktime.
19321
19322 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19323
19324         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19325         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19326         unicodeio.c, unicodeio.h, unlocked-io.h:
19327         Switch from LGPL to GPL.
19328
19329 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19330
19331         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19332         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19333         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19334         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19335         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19336         updated automatically by ../config/srclist-update.  This changes
19337         their license from LPGL to GPL.
19338
19339 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19340
19341         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19342         assumed to refer to the root of the most recent stable gettext version.
19343         * config/srclistvars.sh: Add defaults for eggert.
19344         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19345         Match "This program" as well as "The program".  This is needed
19346         for gettext.
19347
19348 2003-07-14  Jim Meyering  <jim@meyering.net>
19349
19350         Don't emit diagnostics.  Let callers do that.
19351         * lib/save-cwd.c: Don't include "error.h".
19352         (save_cwd): Don't call error.  Ensure that errno is valid
19353         when returning nonzero.
19354
19355         * lib/save-cwd.h (restore_cwd): Update prototype.
19356         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19357         Simplify.  Don't call error upon failure.  Let callers do that.
19358         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19359         when auditing is enabled.  But don't bother updating the #if.
19360
19361 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19362
19363         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19364         it breaks C++ compilation.
19365         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19366
19367 2003-07-10  Simon Josefsson  <jas@extundo.com>
19368
19369         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19370
19371 2003-07-10  Jim Meyering  <jim@meyering.net>
19372
19373         * m4/clock_time.m4: Remove trailing blank.
19374         * m4/intmax_t.m4: Likewise.
19375
19376 2003-07-10  Jim Meyering  <jim@meyering.net>
19377
19378         * lib/vasnprintf.c: Remove trailing blanks.
19379         Make cpp indentation consistent.
19380
19381 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19382
19383         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19384         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19385         Switch from LGPL to GPL.
19386
19387 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19388
19389         * config/srclist.txt: Sort sublists.  Add
19390         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19391         that differ from gnulib for one reason or another; we'd like this list
19392         to be smaller but for now let's document what we have.
19393
19394 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19395
19396         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19397         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19398         and sweeter "eval x=$x".
19399         * config/srclist.txt: Get lib/argp* from glibc.
19400
19401 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19402
19403         * lib/mktime.c: Fix some boundary cases and remove need for floating
19404         point.
19405
19406         Issue a compile-time diagnostic if time_t is floating point, or if
19407         two's complement arithmetic is not in effect, or if arithmetic
19408         right shift does not propagate the sign.  These assumptions were
19409         all in the original code but they weren't checked.
19410
19411         (TIME_T_MIDPOINT, verify): New macros.
19412         (__isleap): Remove; it has integer overflow problems.
19413         (leapyear): New function, without those problems.
19414         (ydhms_tm_diff): Remove; splitting into two parts.
19415         (ydhms_diff): New function, containing the arithmetic part of
19416         the old ydhms_tm_diff function.  Issue a compile-time
19417         diagnostic if we are not using C99 integer division.
19418         Avoid casts when possible.
19419         (guess_time_tm): New function, containing the checking part of
19420         the old ydhms_tm_diff function.  Return the new value, rather than
19421         the difference between it and the old.  Accept a new argument T
19422         so that *T specifies the old value.  Check for overflow in the result.
19423
19424         (__mktime_internal): Use a time_t offset, not a long int offset.
19425         This undoes the 2003-06-04 change, which is no longer needed now
19426         that we have better overflow checking.
19427         (localtime_offset): Likewise.
19428
19429         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19430         and long are 64-bit but int is only 32-bit.
19431         (ydhms_diff): Use long int to store year1 and yday1.
19432         Issue a compile-time diagnostic if long int is not wide enough.
19433
19434         (__mktime_internal): Use long int to store adjusted year and yday.
19435         Use plain C rather than preprocessor commands, if that doesn't
19436         affect efficiency.
19437         Check for overflow (and try to repair) after each probe
19438         rather than checking only at the very end.  This avoids some bugs
19439         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19440         does not equal GMT offset at maximum time).
19441         Use integer to check for overflow rather than floating point; this
19442         is more portable to non-IEEE hosts, and is a tad faster.
19443         When we detect that we are oscillating between two values,
19444         don't check whether tm_isdst has the requested value, since
19445         we already know the answer.  When tm_isdst has the wrong value,
19446         use a different heuristic to find the right one, based on the
19447         extreme values actually observed in practice in tz2003a,
19448         rather than the (overly optimistic) "previous 3 calendar quarters".
19449
19450         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19451         "T const" to accommodate glibc style.
19452         (check_result): Use less-confusing report format.  "long" -> "long int.
19453         (main): Likewise.
19454         Don't loop if the iteration overflows time_t.
19455         Allow a negative step in the iteration.
19456
19457 2003-07-06  Karl Berry  <karl@gnu.org>
19458
19459         * config/depcomp: update from automake.
19460         * config/config.sub: update from prep.
19461
19462 2003-07-03  Karl Berry  <karl@gnu.org>
19463
19464         * config/config.guess: update from prep.
19465
19466 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19467
19468         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19469         xreadlink.c now includes it unconditionally.
19470
19471 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19472
19473         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19474         having it depend on HAVE_SYS_TYPES_H.
19475
19476 2003-07-01  Bruno Haible  <bruno@clisp.org>
19477
19478         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19479         <sys/types.h> should be sufficient.
19480         Reported by Paul Eggert.
19481
19482 2003-06-26  Karl Berry  <karl@gnu.org>
19483
19484         * config/depcomp: update from automake.
19485
19486 2003-06-26  Bruno Haible  <bruno@clisp.org>
19487
19488         * modules/human: Depend on module stdbool.
19489
19490 2003-06-25  Bruno Haible  <bruno@clisp.org>
19491
19492         * modules/readlink: New file.
19493         * modules/xreadlink: Depend on it.
19494         * MODULES.html.sh (func_all_modules): Add readlink.
19495
19496 2003-06-25  Bruno Haible  <bruno@clisp.org>
19497
19498         * m4/readlink.m4: New file.
19499
19500 2003-06-25  Bruno Haible  <bruno@clisp.org>
19501
19502         * lib/readlink.c: New file.
19503
19504 2003-06-22  Karl Berry  <karl@gnu.org>
19505
19506         * config/srclist.txt: update mkinstalldirs from automake.
19507         * config/mkinstalldirs: update.
19508
19509 2003-06-22  Bruno Haible  <bruno@clisp.org>
19510
19511         Portability to mingw32.
19512         * m4/ssize_t.m4: New file, from GNU gettext.
19513         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
19514         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
19515
19516 2003-06-22  Bruno Haible  <bruno@clisp.org>
19517
19518         * modules/safe-read: Add m4/ssize_t.m4.
19519         * modules/xreadlink: Add m4/ssize_t.m4.
19520
19521 2003-06-20  Bruno Haible  <bruno@clisp.org>
19522
19523         Assume C89, so PARAMS isn't needed.
19524         * lib/unicodeio.h (PARAMS): Remove.
19525         * lib/unicodeio.c: Don't use PARAMS.
19526
19527 2003-06-18  Karl Berry  <karl@gnu.org>
19528
19529         * config/config.{guess,sub}: update from prep.
19530
19531 2003-06-18  Jim Meyering  <jim@meyering.net>
19532
19533         Merge changes from coreutils.
19534         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19535         Remove explicit declarations of xmalloc and realloc.
19536         Include xalloc.h.
19537         (read_utmp): Remove anachronistic cast of xmalloc.
19538
19539 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19540
19541         Assume C89, so PARAMS isn't needed.
19542         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19543         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19544         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19545         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19546         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19547         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19548         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19549         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19550         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19551         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19552         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19553         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19554         no longer needed. Anyway, config.h should always be included before any
19555         other file.
19556
19557 2003-06-11  Simon Josefsson  <jas@extundo.com>
19558
19559         * modules/sysexits: New file.
19560         * MODULES.html.sh (func_all_modules): Add sysexits.
19561
19562 2003-06-11  Simon Josefsson  <jas@extundo.com>
19563
19564         * lib/sysexit_.h: New file.
19565
19566 2003-06-11  Derek Price  <derek@ximbiot.com>
19567
19568         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19569         necessary.
19570
19571 2003-06-11  Bruno Haible  <bruno@clisp.org>
19572
19573         * m4/sysexits.m4: New file.
19574
19575 2003-06-10  Simon Josefsson  <jas@extundo.com>
19576
19577         * lib/argp.h: New file, from glibc.
19578         * lib/argp-ba.c: New file, from glibc.
19579         * lib/argp-eexst.c: New file, from glibc.
19580         * lib/argp-fmtstream.c: New file, from glibc.
19581         * lib/argp-fmtstream.h: New file, from glibc.
19582         * lib/argp-fs-xinl.c: New file, from glibc.
19583         * lib/argp-help.c: New file, from glibc.
19584         * lib/argp-namefrob.h: New file, from glibc.
19585         * lib/argp-parse.c: New file, from glibc.
19586         * lib/argp-pv.c: New file, from glibc.
19587         * lib/argp-pvh.c: New file, from glibc.
19588         * lib/argp-xinl.c: New file, from glibc.
19589
19590 2003-06-10  Simon Josefsson  <jas@extundo.com>
19591
19592         * modules/strchrnul: New file.
19593
19594 2003-06-10  Simon Josefsson  <jas@extundo.com>
19595
19596         * modules/argp: New file.
19597
19598 2003-06-10  Simon Josefsson  <jas@extundo.com>
19599
19600         * m4/strchrnul.m4: New file.
19601
19602 2003-06-10  Simon Josefsson  <jas@extundo.com>
19603
19604         * lib/strchrnul.h: New file.
19605         * lib/strchrnul.c: New file.
19606
19607 2003-06-10  Bruno Haible  <bruno@clisp.org>
19608
19609         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19610
19611 2003-06-07  Karl Berry  <karl@gnu.org>
19612
19613         * config/config.{guess,sub}: update from prep.
19614
19615 2003-06-07  Jim Meyering  <jim@meyering.net>
19616
19617         * modules/strtod: Use $(...) notation, not @...@ for
19618         AC_REPLACE'd variables.
19619         * modules/localcharset: Likewise.
19620
19621 2003-06-07  Jim Meyering  <jim@meyering.net>
19622
19623         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19624         in place of my name in the copyright comment.
19625         Remove definition and uses of __P.
19626
19627         From coreutils.
19628         * lib/stat.c: Don't declare xmalloc explicitly.
19629         Instead, include "xalloc.h".
19630         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19631         xrealloc, and xcalloc return values.
19632         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19633         Improve comment.
19634         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19635
19636 2003-06-07  Bruno Haible  <bruno@clisp.org>
19637
19638         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19639         avoid AC_CONFIG_LINKS.
19640         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19641         fnmatch.h, to avoid AC_CONFIG_LINKS.
19642         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19643
19644 2003-06-07  Bruno Haible  <bruno@clisp.org>
19645
19646         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19647         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19648         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19649         directory.
19650         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19651         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19652         directory.
19653
19654 2003-06-06  Jim Meyering  <jim@meyering.net>
19655
19656         Merge from coreutils.
19657         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19658         Consolidate declarations and initializations of *_base* locals.
19659
19660         Merge from coreutils.
19661         This avoids a core dump on systems without GNU putenv,
19662         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19663         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19664         (unsetenv): New static function, from GNU libc.
19665         (rpl_putenv): Use it.
19666
19667         * lib/modechange.c: Remove trailing blanks.
19668
19669         Merge from coreutils.
19670         * lib/fsusage.c: Remove declaration of statfs.
19671         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19672
19673         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19674
19675 2003-06-06  Jim Meyering  <jim@meyering.net>
19676
19677         * lib/stdbool_.h: Renamed from stdbool.h.in.
19678
19679 2003-06-06  Jim Meyering  <jim@meyering.net>
19680             Bruno Haible  <bruno@clisp.org>
19681
19682         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19683         Adjust Makefile.am snippet not to redirect directly to target.
19684         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19685
19686 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19687
19688         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19689         mismatch, look in future quarters as well as past.  This fixes a
19690         bug when processing fall-backwards gaps immediately after a long
19691         period of daylight-saving time.
19692
19693         * lib/mktime.c: Assume freestanding C89 or better.
19694         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19695         (__P): Remove; not used.
19696         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19697         (mktime, not_equal_tm, print_tm, check_result,
19698         main): Use prototypes.  Use const * where appropriate.
19699         (main): Fix typo in testing code that uncovered by above changes.
19700         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19701
19702 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19703
19704         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19705         locale.h, localeconv.  This merges changes from coreutils.
19706
19707         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19708         It can be removed after the next Autoconf is released.
19709         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19710         needed.
19711
19712 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19713
19714         * lib/mktime.c: Fix Debian bug 177940
19715         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19716         (localtime_offset): Now long int, not time_t, because we want it
19717         to be guaranteed to be signed.  All uses changed.
19718         (__mktime_internal): If overflow would occur when adding offset,
19719         don't add it.
19720
19721         Merge 'human' changes from coreutils.  Rewrite to support
19722         locale-specific notations like thousands separators.
19723         * lib/human.c: Simplify authorship notice.
19724         Include human.h immediately after config.h.
19725         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19726         <limits.h>: Do not include, since human.h does.
19727         (SIZE_MAX, UINTMAX_MAX): New macros.
19728         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19729         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19730         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19731         (power_letter): Renamed from suffixes.
19732         (generate_suffix_backwards): Remove.
19733         (adjust_value): Now takes int style (because of human.h changes)
19734         and long double value (for greater precision on some platforms).
19735         (group_number): New function.
19736         (human_readable): Use it.  Use integer options, not enum.
19737         Put the options before the sizes in the arg list.
19738         Support all the new options.
19739         The old human_readable function has been removed;
19740         use inttostr.h instead.
19741         (human_readable, default_block_size, humblock):
19742         Use uintmax_t, not int, for block sizes.
19743         (human_readable_inexact, block_size_types): Remove.
19744         (block_size_opts): New constant.
19745         (human_options): Renamed from human_block_size, with new signature
19746         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19747         * lib/human.h: Add copyright and authorship notice.
19748         Include <limits.h> and <stdbool.h> unconditionally.
19749         (PARAMS): Remove.  All uses removed.
19750         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19751         (enum human_inexact_style): Remove tag; now a nameless enum.
19752         (human_floor, human_ceiling, human_round_to_even): Now have
19753         values 2, 0, 1 rather than -1, 1, 0.
19754         (human_group_digits, human_suppress_point_zero, human_autoscale,
19755         human_base_1024, human_SI, human_B): New constants.
19756         (human_readable_inexact, human_block_size): Remove.
19757         (human_readable): Size args are now uintmax_t, not int.
19758         (human_options): New decl.
19759
19760         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19761         unnecessary now that we assume C89 or better.  This change
19762         imported from coreutils.
19763
19764         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19765         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19766         in the 2003-05-30 sync from glibc.
19767
19768         .h files should stand alone, but we shouldn't include <sys/types.h>
19769         if we can get away with just <stddef.h>.
19770
19771         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19772         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19773         rather than <sys/types.h>, as we merely need size_t.
19774         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19775         to get size_t.
19776         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19777         Include <stdio.h>, to get FILE.
19778         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19779         memcasecmp.h has included <stddef.h> and all we need is size_t.
19780         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19781         our interface, instead of including <sys/types.h>
19782
19783 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19784
19785         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19786         now, as glibc mktime is buggy on non-glibc systems.
19787
19788 2003-06-03  Karl Berry  <karl@gnu.org>
19789
19790         * config/config.sub: update from prep.
19791
19792 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19793
19794         [from coreutils]
19795         Fix some minor time-related bugs with POSIX time arguments.
19796         Some valid time stamps were being rejected (notably -1, and
19797         time stamps before 1900 on 64-bit hosts).  And some invalid
19798         time stamps were being accepted, e.g. September 31.
19799
19800         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
19801         that we can return (time_t) -1 successfully.
19802         * lib/posixtm.c: Likewise.
19803         [HAVE_STDBOOL_H]: Include <stdbool.h>.
19804         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
19805         (t): Remove static var.
19806         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
19807         of static var.  All uses changed.
19808         (year): Do not reject years before 1900; they can occur with
19809         64-bit time_t.
19810         (posix_time_parse): Do not check for out-of-range components;
19811         that is now the caller's responsibility, since our checks were
19812         only approximations.
19813         (posixtime): Use mktime to check for out-of-range components,
19814         since it knows them exactly.
19815         If mktime returns (time_t) -1, check whether an error actually occurred
19816         by invoking localtime on -1.
19817         (main) [TEST_POSIXTIME]: Check for input data errors, and report
19818         posixtime failures better.
19819         Improve the test data (in comments only).
19820
19821 2003-06-02  Karl Berry  <karl@gnu.org>
19822
19823         * config/mkinstalldirs (version): new variable.
19824         (--version): new option.
19825         (usage): improve message.
19826
19827 2003-05-30  Karl Berry  <karl@gnu.org>
19828
19829         * lib/mktime.c: update from libc.
19830
19831 2003-05-30  Bruno Haible  <bruno@clisp.org>
19832
19833         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
19834         * config/config.rpath: Upgrade to gettext-0.12.1.
19835
19836 2003-05-30  Bruno Haible  <bruno@clisp.org>
19837
19838         * m4/gettext.m4: Upgrade to gettext-0.12.1.
19839         * m4/nls.m4: New file, from gettext-0.12.1.
19840         * m4/po.m4: New file, from gettext-0.12.1.
19841         * m4/progtest.m4: Upgrade to gettext-0.12.1.
19842
19843 2003-05-30  Bruno Haible  <bruno@clisp.org>
19844
19845         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
19846         * lib/localcharset.h: Likewise.
19847         * lib/localcharset.c: Likewise.
19848
19849 2003-05-29  Karl Berry  <karl@gnu.org>
19850
19851         * config/config.rpath: update from gettext.
19852
19853 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19854
19855         Assume the headers required for C89 freestanding compilers.
19856         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
19857         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
19858         * m4/human.m4 (gl_HUMAN): Likewise.
19859         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
19860         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
19861         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19862         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
19863         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19864         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
19865
19866 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19867
19868         Assume the headers required for C89 freestanding compilers.
19869         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
19870         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
19871         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
19872         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
19873         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
19874         define, since <limits.h> is guaranteed to do that.
19875         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
19876         * lib/exclude.c: Include <stdbool.h> unconditionally.
19877         * lib/tempname.c: Include <stddef.h> unconditionally.
19878         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
19879         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
19880         <stddef.h> does that.
19881         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
19882         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
19883         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
19884         needed.
19885         * lib/xstrtol.c: Likewise.
19886         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
19887         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
19888
19889         * lib/addext.c (addext): Use assignment rather than cast, to avoid
19890         warnings on some platforms.
19891
19892         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19893         arbitrarily.
19894
19895 2003-05-26  Jim Meyering  <jim@meyering.net>
19896
19897         Merge in a change from coreutils:
19898         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
19899         that is guaranteed to be `no'.  Use `no_such_member' to indicate
19900         that condition, rather than `-1' which is slightly misleading.
19901         Change the name of the cache variable to have the gl_ prefix.
19902         Prompted by a patch from Richard Dawe for DJGPP.
19903
19904 2003-05-24  Karl Berry  <karl@gnu.org>
19905
19906         * config/config.guess: update from prep.
19907
19908 2003-05-22  Karl Berry  <karl@gnu.org>
19909
19910         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
19911
19912 2003-05-20  Karl Berry  <karl@gnu.org>
19913
19914         * config/config.guess: update from prep.
19915
19916 2003-05-18  Karl Berry  <karl@gnu.org>
19917
19918         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
19919         might actually be set by the user.
19920
19921         * config/depcomp, install-sh, mdate-sh: update from automake.
19922
19923 2003-05-17  Bruno Haible  <bruno@clisp.org>
19924
19925         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
19926         invalid expansion for AC_EGREP_CPP.
19927         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
19928         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
19929         Suggested by Akim Demaille <akim@epita.fr> in
19930         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
19931
19932 2003-05-12  Jim Meyering  <jim@meyering.net>
19933
19934         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
19935         the space-padded-by-default conversion specifiers, %e, %k, %l.
19936
19937 2003-05-12  Bruno Haible  <bruno@clisp.org>
19938
19939         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
19940         the string is longer than 4 KB.
19941
19942 2003-05-11  Karl Berry  <karl@gnu.org>
19943
19944         * config/config.{guess,sub}: update from prep.
19945
19946 2003-05-09  Bruno Haible  <bruno@clisp.org>
19947
19948         * modules/error: Add m4/strerror_r.m4 to file list.
19949
19950 2003-05-03  Bruno Haible  <bruno@clisp.org>
19951
19952         Upgrade to Unicode-4.0.
19953         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
19954         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
19955         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
19956         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
19957         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
19958         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
19959         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
19960         Change width of U+E0100..U+E01EF from 1 to 0.
19961
19962 2003-04-25  Jim Meyering  <jim@meyering.net>
19963
19964         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
19965         of type size_t, not int.
19966
19967 2003-04-25  Bruno Haible  <bruno@clisp.org>
19968
19969         * lib/copy-file.c: Include <stddef.h>, for size_t.
19970
19971 2003-04-21  Paul Eggert  <eggert@twinsun.com>
19972
19973         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
19974         code which expansion is under static control.  Patch imported from
19975         Akim Demaille's patch to Bison; see
19976         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
19977
19978 2003-04-14  Bruno Haible  <bruno@clisp.org>
19979
19980         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
19981
19982 2003-04-11  Jim Meyering  <jim@meyering.net>
19983
19984         Merge changes from Coreutils.
19985
19986         2003-03-22  Jim Meyering  <jim@meyering.net>
19987
19988         * lib/strftime.c (widen): Cast alloca return value to proper type.
19989
19990         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
19991
19992         From GNU libc.
19993         * lib/strftime.c (my_strftime): Handle very large width
19994         specifications for numeric values correctly.  Improve checks for
19995         overflow.
19996
19997         2003-01-19  Jim Meyering  <jim@meyering.net>
19998
19999         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
20000         definitions.
20001         (nl_get_alt_digit) [! defined my_strftime]: Define.
20002         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
20003         _nl_get_alt_digit and _nl_get_walt_digit.
20004
20005         * lib/strftime.c (my_strftime): Merge in locale-related changes from
20006         libc. These changes have no effect outside of _LIBC.
20007
20008 2003-04-10  Bruno Haible  <bruno@clisp.org>
20009
20010         * modules/findprog: New file.
20011         * MODULES.html.sh (func_all_modules): Add it.
20012
20013 2003-04-10  Bruno Haible  <bruno@clisp.org>
20014
20015         * m4/findprog.m4: New file.
20016         * m4/eaccess.m4: New file.
20017
20018 2003-04-10  Bruno Haible  <bruno@clisp.org>
20019
20020         * lib/findprog.h: New file, from GNU gettext.
20021         * lib/findprog.c: New file, from GNU gettext.
20022
20023 2003-04-05  Jim Meyering  <jim@meyering.net>
20024
20025         Merge changes from Coreutils.
20026
20027         * lib/exclude.h (PARAMS): Remove definition and uses.
20028         * lib/exclude.c: Remove uses of `PARAMS'.
20029
20030         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
20031         Add test-cases for DOS filenames. Declare program_name.
20032         (main): Set up program_name.  Patch by Rich Dawe.
20033
20034         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20035         error from mntctl.
20036         Use mntctl's return value to drive the entry-processing loop, since
20037         we can't rely on the value of the vmt_length member in the last
20038         entry.  On some systems doing so could result in exhausting
20039         virtual memory.  Based in part on a patch from Mike Jetzer.
20040
20041 2003-04-04  Bruno Haible  <bruno@clisp.org>
20042
20043         * modules/linebreak: New file.
20044         * MODULES.html.sh (func_all_modules): Add it.
20045
20046 2003-04-04  Bruno Haible  <bruno@clisp.org>
20047
20048         * m4/linebreak.m4: New file.
20049
20050 2003-04-04  Bruno Haible  <bruno@clisp.org>
20051
20052         * lib/linebreak.h: New file, from GNU gettext.
20053         * lib/linebreak.c: New file, from GNU gettext with slight
20054         modifications.
20055         * lib/lbrkprop.h: New file, from GNU gettext.
20056
20057 2003-04-03  Bruno Haible  <bruno@clisp.org>
20058
20059         * modules/utf8-ucs4: New file.
20060         * modules/utf16-ucs4: New file.
20061         * modules/ucs4-utf8: New file.
20062         * modules/ucs4-utf16: New file.
20063         * MODULES.html.sh (func_all_modules): Add them.
20064
20065 2003-04-03  Bruno Haible  <bruno@clisp.org>
20066
20067         * m4/utf-ucs4.m4: New file.
20068         * m4/ucs4-utf.m4: New file.
20069
20070 2003-04-03  Bruno Haible  <bruno@clisp.org>
20071
20072         * lib/utf8-ucs4.h: New file, from GNU gettext.
20073         * lib/utf16-ucs4.h: New file, from GNU gettext.
20074         * lib/ucs4-utf8.h: New file, from GNU gettext.
20075         * lib/ucs4-utf16.h: New file, from GNU gettext.
20076
20077 2003-04-02  Bruno Haible  <bruno@clisp.org>
20078
20079         * modules/binary-io: New file.
20080         * MODULES.html.sh (func_all_modules): Add it.
20081
20082 2003-04-02  Bruno Haible  <bruno@clisp.org>
20083
20084         * lib/binary-io.h: New file, from GNU gettext.
20085
20086 2003-04-01  Bruno Haible  <bruno@clisp.org>
20087
20088         * modules/pathname: New file.
20089         * MODULES.html.sh (func_all_modules): Add it.
20090
20091 2003-04-01  Bruno Haible  <bruno@clisp.org>
20092
20093         * lib/pathname.h: New file, from GNU gettext.
20094         * lib/concatpath.c: New file, from GNU gettext.
20095
20096 2003-03-30  Bruno Haible  <bruno@clisp.org>
20097
20098         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
20099
20100 2003-03-30  Bruno Haible  <bruno@clisp.org>
20101
20102         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
20103         function chown() doesn't exist.
20104
20105 2003-03-28  Bruno Haible  <bruno@clisp.org>
20106
20107         * modules/copy-file: New file.
20108         * MODULES.html.sh (func_all_modules): Add it.
20109
20110 2003-03-28  Bruno Haible  <bruno@clisp.org>
20111
20112         * m4/copy-file.m4: New file.
20113
20114 2003-03-28  Bruno Haible  <bruno@clisp.org>
20115
20116         * lib/copy-file.h: New file, from GNU gettext.
20117         * lib/copy-file.c: New file, from GNU gettext.
20118
20119 2003-03-18  Jim Meyering  <jim@meyering.net>
20120
20121         * lib/quote.c (quote_n): Fix typo in comment.
20122
20123 2003-03-18  Bruno Haible  <bruno@clisp.org>
20124
20125         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
20126         checking.
20127         * m4/onceonly_2_57.m4: Likewise.
20128
20129 2003-03-17  Bruno Haible  <bruno@clisp.org>
20130
20131         * m4/onceonly.m4: Require autoconf 2.54 or newer.
20132         (m4_quote): Remove macro.
20133         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
20134
20135 2003-03-14  Jim Meyering  <jim@meyering.net>
20136
20137         Merge changes from Coreutils.
20138         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
20139         to be const, in order to avoid warnings.
20140         (obstack_room): Likewise.
20141         (obstack_empty_p): Likewise.
20142
20143 2003-03-14  Bruno Haible  <bruno@clisp.org>
20144
20145         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
20146         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
20147
20148 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20149
20150         Merge changes from Bison.
20151         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
20152         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
20153         when compiling Bison 1.875's `bitset bset = obstack_alloc
20154         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
20155         * lib/hash.c: Include <stdbool.h> unconditionally.
20156
20157 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20158
20159         * m4/onceonly.m4 (m4_quote): New macro.
20160         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
20161         Quote AC_FOREACH variable-expansions properly.
20162
20163 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20164
20165         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
20166
20167 2003-03-09  Paul Eggert  <eggert@twinsun.com>
20168
20169         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
20170         Reported by Bruce Becker; see:
20171         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
20172
20173 2003-03-03  Paul Eggert  <eggert@twinsun.com>
20174             Bruno Haible  <bruno@clisp.org>
20175
20176         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
20177         Reported by John Hughes, see
20178         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
20179
20180 2003-02-20  Bruno Haible  <bruno@clisp.org>
20181
20182         * MODULES.html.sh (func_all_modules): Add poll.
20183
20184 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20185
20186         * modules/poll: New file.
20187
20188 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20189
20190         * lib/poll_.h: New file.
20191         * lib/poll.c: New file.
20192
20193 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20194
20195         * m4/poll.m4: New file.
20196
20197 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20198
20199         * modules/mathl: New file.
20200
20201 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20202
20203         * lib/mathl.h: New file.
20204         * lib/acosl.c: New file.
20205         * lib/asinl.c: New file.
20206         * lib/atanl.c: New file.
20207         * lib/ceill.c: New file.
20208         * lib/cosl.c: New file.
20209         * lib/expl.c: New file.
20210         * lib/floorl.c: New file.
20211         * lib/frexpl.c: New file.
20212         * lib/ldexpl.c: New file.
20213         * lib/logl.c: New file.
20214         * lib/sincosl.c: New file.
20215         * lib/sinl.c: New file.
20216         * lib/sqrtl.c: New file.
20217         * lib/tanl.c: New file.
20218         * lib/trigl.c: New file.
20219         * lib/trigl.h: New file.
20220
20221 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20222
20223         * m4/mathl.m4: New file.
20224
20225 2003-02-18  Bruno Haible  <bruno@clisp.org>
20226
20227         * MODULES.html.sh (func_all_modules): Add mathl.
20228
20229 2003-02-17  Bruno Haible  <bruno@clisp.org>
20230
20231         * modules/mkdtemp: New module.
20232         * MODULES.html.sh (func_all_modules): Add it.
20233
20234 2003-02-17  Bruno Haible  <bruno@clisp.org>
20235
20236         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
20237
20238 2003-02-17  Bruno Haible  <bruno@clisp.org>
20239
20240         * lib/mkdtemp.h: New file, from GNU gettext.
20241         * lib/mkdtemp.c: New file, from GNU gettext.
20242
20243 2003-02-02  Jim Meyering  <jim@meyering.net>
20244
20245         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
20246         e.g. glibc-2.2.93.
20247
20248 2003-01-31  Bruno Haible  <bruno@clisp.org>
20249
20250         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
20251         'rpl_rename'.
20252         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
20253         'rpl_strnlen'.
20254         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
20255         'rpl_strtod'.
20256         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
20257         'rpl_utime'.
20258
20259 2003-01-31  Bruno Haible  <bruno@clisp.org>
20260
20261         * lib/rename.c: #undef rename before defining rpl_rename.
20262         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
20263
20264 2003-01-30  Bruno Haible  <bruno@clisp.org>
20265
20266         * modules/vasnprintf, modules/vasprintf: New modules.
20267         * MODULES.html.sh (func_all_modules): Add them.
20268
20269 2003-01-30  Bruno Haible  <bruno@clisp.org>
20270
20271         * m4/signed.m4: New file, from GNU gettext.
20272         * m4/longdouble.m4: New file, from GNU gettext.
20273         * m4/wchar_t.m4: New file, from GNU gettext.
20274         * m4/wint_t.m4: New file, from GNU gettext.
20275         * m4/vasnprintf.m4: New file.
20276         * m4/vasprintf.m4: New file.
20277
20278 2003-01-30  Bruno Haible  <bruno@clisp.org>
20279
20280         * lib/printf-args.h: New file, from GNU gettext.
20281         * lib/printf-args.c: New file, from GNU gettext.
20282         * lib/printf-parse.h: New file, from GNU gettext.
20283         * lib/printf-parse.c: New file, from GNU gettext.
20284         * lib/vasnprintf.h: New file, from GNU gettext.
20285         * lib/vasnprintf.c: New file, from GNU gettext.
20286         * lib/asnprintf.c: New file, from GNU gettext.
20287         * lib/vasprintf.h: New file, from GNU gettext with modifications.
20288         * lib/vasprintf.c: New file, from GNU gettext.
20289         * lib/asprintf.c: New file, from GNU gettext.
20290
20291 2003-01-29  Bruno Haible  <bruno@clisp.org>
20292
20293         * modules/stpncpy: New module.
20294         * MODULES.html.sh (func_all_modules): Add it.
20295
20296 2003-01-29  Bruno Haible  <bruno@clisp.org>
20297
20298         * m4/stpncpy.m4: New file.
20299
20300 2003-01-29  Bruno Haible  <bruno@clisp.org>
20301
20302         * lib/stpncpy.h: New file, from GNU gettext with modifications.
20303         * lib/stpncpy.c: New file, from GNU gettext with modifications.
20304
20305 2003-01-28  Bruno Haible  <bruno@clisp.org>
20306
20307         * modules/c-ctype: New module.
20308         * MODULES.html.sh (func_all_modules): Add it.
20309
20310 2003-01-28  Bruno Haible  <bruno@clisp.org>
20311
20312         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
20313         Paul Eggert.
20314         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
20315         Paul Eggert.
20316
20317 2003-01-27  Bruno Haible  <bruno@clisp.org>
20318
20319         * modules/xsetenv: New module.
20320         * MODULES.html.sh (func_all_modules): Add it.
20321
20322 2003-01-27  Bruno Haible  <bruno@clisp.org>
20323
20324         * lib/xsetenv.h: New file, from GNU gettext.
20325         * lib/xsetenv.c: New file, from GNU gettext.
20326
20327 2003-01-23  Jim Meyering  <jim@meyering.net>
20328
20329         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20330         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20331
20332 2003-01-23  Bruno Haible  <bruno@clisp.org>
20333
20334         * modules/minmax: New module.
20335         * MODULES.html.sh (func_all_modules): Add it.
20336
20337 2003-01-23  Bruno Haible  <bruno@clisp.org>
20338
20339         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20340         Eggert.
20341
20342 2003-01-22  Bruno Haible  <bruno@clisp.org>
20343
20344         * modules/exit: New module.
20345         * MODULES.html.sh (func_all_modules): Add it.
20346
20347 2003-01-22  Bruno Haible  <bruno@clisp.org>
20348
20349         * lib/exit.h: New file, from GNU gettext.
20350
20351 2003-01-19  Bruno Haible  <bruno@clisp.org>
20352
20353         * gnulib-tool: Recognize option --extract-maintainer.
20354         (func_get_maintainer): New function.
20355         * modules/*: Add Maintainer entry.
20356
20357 2003-01-16  Jim Meyering  <jim@meyering.net>
20358
20359         * m4/regex.m4: The `regex' struct is both input and output.
20360         Initialize it before each use.  Patch by Tim Waugh.
20361
20362 2003-01-16  Bruno Haible  <bruno@clisp.org>
20363
20364         * MODULES.html.sh: Add a table of contents. Add the module name as
20365         leftmost column. Add hyperlinks.
20366
20367 2003-01-15  Bruno Haible  <bruno@clisp.org>
20368
20369         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20370
20371 2003-01-15  Bruno Haible  <bruno@clisp.org>
20372
20373         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20374         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20375         suffix.
20376
20377 2003-01-15  Bruno Haible  <bruno@clisp.org>
20378
20379         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20380
20381 2003-01-15  Bruno Haible  <bruno@clisp.org>
20382
20383         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20384         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20385
20386 2003-01-14  Jim Meyering  <jim@meyering.net>
20387
20388         * lib/same.c (same_name): Tweak a comment.
20389
20390 2003-01-14  Bruno Haible  <bruno@clisp.org>
20391
20392         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20393         when a string comparison is sufficient.
20394
20395 2003-01-14  Bruno Haible  <bruno@clisp.org>
20396
20397         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20398         'unsigned int'.
20399
20400 2003-01-14  Bruno Haible  <bruno@clisp.org>
20401
20402         * lib/hash-pjw.c: Add comment about low quality of this function.
20403
20404 2003-01-13  Bruno Haible  <bruno@clisp.org>
20405
20406         * modules/stpcpy: Distribute lib/stpcpy.h.
20407         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20408
20409 2003-01-13  Bruno Haible  <bruno@clisp.org>
20410
20411         * modules/*: Add a description.
20412         * modules/strpbrk: Fix Makefile.am snippet.
20413         * modules/strtoimax: Fix dependencies.
20414         * modules/strtoumax: Likewise.
20415
20416 2003-01-13  Bruno Haible  <bruno@clisp.org>
20417
20418         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20419         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20420         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20421
20422 2003-01-13  Bruno Haible  <bruno@clisp.org>
20423
20424         * gnulib-tool (func_create_testdir): Store config/* files in the main
20425         directory.
20426         * config.rpath: Move to ...
20427         * config/config.rpath: ... here.
20428         * modules/gettext: Contains config/config.rpath, not config.rpath.
20429         * modules/iconv: Likewise.
20430
20431 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20432
20433         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20434         to avoid collisions with libcurses and libreadline.
20435
20436         * m4/getstr.m4: Remove.
20437         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20438
20439 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20440
20441         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20442         to avoid collisions with libcurses and libreadline.
20443
20444         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20445         * lib/getstr.h, getstr.c: Remove.
20446         * lib/getline.c: Include "getline.h", to check interface.
20447         Move body of old getstr.c here: this defines MIN_CHUNK and
20448         declares getdelim2, which is renamed from getstr.
20449         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20450
20451         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20452         All uses changed.
20453         * lib/linebuffer.h: Likewise.
20454         (readline): Remove backward-compatibility macro.
20455
20456 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20457
20458         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20459         to avoid collisions with libcurses and libreadline.
20460         * getstr: Remove.
20461         * MODULES.html.sh: Remove getstr.
20462         * modules/getline: Depend on unlocked-io, not getstr.
20463
20464 2003-01-12  Jim Meyering  <jim@meyering.net>
20465
20466         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20467
20468 2003-01-10  Bruno Haible  <bruno@clisp.org>
20469
20470         * modules/alloca: Change Makefile.am requirements. Simplify Include
20471         requirements. Add lib/alloca_.h to file list.
20472
20473 2003-01-10  Bruno Haible  <bruno@clisp.org>
20474
20475         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20476
20477 2003-01-10  Bruno Haible  <bruno@clisp.org>
20478
20479         * lib/alloca_.h: New file.
20480         * lib/getdate.y: Unconditionally include alloca.h.
20481         * lib/makepath.c: Likewise.
20482         * lib/setenv.c: Likewise.
20483         * lib/userspec.c: Likewise.
20484
20485 2003-01-09  Karl Berry  <karl@gnu.org>
20486
20487         * MODULES.html.sh: include `dirname $0` in PATH, to find
20488         gnulib-tool.
20489
20490 2003-01-09  Bruno Haible  <bruno@clisp.org>
20491
20492         * modules/stdbool: Change configure.ac, Makefile.am requirements.
20493         Simplify Include requirements. Add lib/stdbool.h.in to file list.
20494
20495 2003-01-09  Bruno Haible  <bruno@clisp.org>
20496
20497         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
20498
20499 2003-01-09  Bruno Haible  <bruno@clisp.org>
20500
20501         * lib/stdbool.h.in: New file.
20502
20503 2003-01-09  Bruno Haible  <bruno@clisp.org>
20504
20505         * gnulib-tool (func_all_modules): Ignore files ending in ~.
20506         * MODULES.html.sh: Likewise.
20507
20508 2003-01-08  Jim Meyering  <jim@meyering.net>
20509
20510         * lib/full-write.c: Undefine and define-away `const' after inclusion
20511         of errno.h, not before.  Suggestion from Bruno Haible.
20512
20513 2003-01-08  Bruno Haible  <bruno@clisp.org>
20514
20515         * modules/full-read: Depend on full-write.
20516
20517 2003-01-08  Bruno Haible  <bruno@clisp.org>
20518
20519         * lib/safe-read.c: Include specification header first, to ensure its
20520         selfcontainedness.
20521         * lib/full-write.c: Likewise.
20522
20523 2003-01-07  Jim Meyering  <jim@meyering.net>
20524
20525         * lib/full-write.c: Rework so that it may serve to define full_read,
20526         too.
20527         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
20528
20529 2003-01-07  Bruno Haible  <bruno@clisp.org>
20530
20531         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20532         <inttypes.h>.
20533         * lib/xstrtol.h: Likewise.
20534         * lib/xstrtoimax.c: Likewise.
20535         * lib/xstrtoumax.c: Likewise.
20536         * lib/human.h: Likewise.
20537
20538         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20539         on systems that have <inttypes.h> but not <stdint.h>.
20540
20541 2003-01-07  Bruno Haible  <bruno@clisp.org>
20542
20543         * MODULES.html.sh: Add copyright notice.
20544         (missed_files): Omit CVS directory entries.
20545         (func_module): Make it work with sed-3.02.
20546         * MODULES.txt: Remove file.
20547
20548 2003-01-06  Jim Meyering  <jim@meyering.net>
20549
20550         * lib/version-etc.c: Update year in translatable copyright string.
20551
20552 2003-01-03  Karl Berry  <karl@gnu.org>
20553
20554         * config/config.{guess,sub}: update from prep.
20555
20556 2003-01-02  Karl Berry  <karl@gnu.org>
20557
20558         * doc/COPYING.DOC: belatedly updated to 1.2.
20559
20560 2003-01-01  Karl Berry  <karl@gnu.org>
20561
20562         * gnulib-tool (func_verify_module): report module name $module in
20563         error message, not $1.
20564         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20565         be created, only if it doesn't exist.
20566         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20567
20568 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20569
20570         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20571
20572 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20573
20574         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20575         memcmp if strcoll doesn't work.
20576
20577 2002-12-31  Bruno Haible  <bruno@clisp.org>
20578
20579         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20580         nonempty.
20581
20582 2002-12-31  Bruno Haible  <bruno@clisp.org>
20583
20584         * lib/memcoll.c (STRCOLL): New macro.
20585         (memcoll): Use it.
20586
20587 2002-12-31  Bruno Haible  <bruno@clisp.org>
20588
20589         * lib/localcharset.h: New file.
20590         * lib/localcharset.c: Include it.
20591         * lib/unicodeio.c: Likewise.
20592
20593 2002-12-31  Bruno Haible  <bruno@clisp.org>
20594
20595         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20596         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20597
20598 2002-12-31  Bruno Haible  <bruno@clisp.org>
20599
20600         * lib/getline.h: Include <stddef.h>, for size_t.
20601
20602         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20603         * lib/unicodeio.c: Don't include <stddef.h>.
20604
20605 2002-12-31  Bruno Haible  <bruno@clisp.org>
20606
20607         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20608         HAVE_TM_ZONE.
20609
20610 2002-12-24  Karl Berry  <karl@gnu.org>
20611
20612         * config/config.guess: update from prep.
20613
20614 2002-12-24  Bruno Haible  <bruno@clisp.org>
20615
20616         General infrasructure.
20617         * m4/README: Rewritten.
20618         * m4/onceonly.m4: New file.
20619         * m4/onceonly_2_57.m4: New file.
20620
20621         Module atexit.
20622         * m4/atexit.m4: New file.
20623
20624         Module strtod.
20625         * m4/strtod.m4: New file.
20626
20627         Module strtol.
20628         * m4/strtol.m4: New file.
20629
20630         Module strtoul.
20631         * m4/strtoul.m4: New file.
20632
20633         Module memchr.
20634         * m4/memchr.m4: New file.
20635
20636         Module memcmp.
20637         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20638         (jm_FUNC_MEMCMP): Invoke it.
20639
20640         Module memcpy.
20641         * m4/memcpy.m4: New file.
20642
20643         Module memmove.
20644         * m4/memmove.m4: New file.
20645
20646         Module memset.
20647         * m4/memset.m4: New file.
20648
20649         Module strcspn.
20650         * m4/strcspn.m4: New file.
20651
20652         Module strpbrk.
20653         * m4/strpbrk.m4: New file.
20654
20655         Module strstr.
20656         * m4/strstr.m4: New file.
20657
20658         Module strerror.
20659         * m4/strerror.m4: New file.
20660
20661         Module mktime.
20662         * m4/mktime.m4: Renamed from jm-mktime.m4.
20663         (gl_PREREQ_MKTIME): New macro.
20664         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20665
20666         Module malloc.
20667         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20668         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20669         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20670
20671         Module realloc.
20672         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20673         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20674         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20675
20676         Module strftime.
20677         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20678         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20679         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20680         gl_TM_GMTOFF.
20681         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20682
20683         Module xalloc.
20684         * m4/xalloc.m4: New file.
20685
20686         Module alloca.
20687         * m4/alloca.m4: New file.
20688
20689         Module putenv.
20690         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20691         (jm_FUNC_PUTENV): Invoke it.
20692
20693         Module setenv.
20694         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20695         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20696         when invoked twice.
20697         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20698         gt_FUNC_SETENV.
20699
20700         Module memrchr.
20701         * m4/memrchr.m4: New file.
20702
20703         Module stpcpy.
20704         * m4/stpcpy.m4: New file.
20705
20706         Module strcase.
20707         * m4/strcase.m4: New file.
20708
20709         Module strdup.
20710         * m4/strdup.m4: New file.
20711
20712         Module strnlen.
20713         * m4/strnlen.m4: New file.
20714
20715         Module strndup.
20716         * m4/strndup.m4: New file.
20717
20718         Module xstrtod.
20719         * m4/xstrtod.m4: New file.
20720
20721         Module xstrtol.
20722         * m4/xstrtol.m4: New file.
20723
20724         Module getdate.
20725         * m4/getdate.m4: New file.
20726
20727         Module unlocked-io.
20728         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20729         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20730         * m4/jm-glibc-io.m4n: Remove file.
20731
20732         Module long-options.
20733         * m4/long-options.m4: New file.
20734
20735         Module md5.
20736         * m4/md5.m4: New file.
20737
20738         Module sha.
20739         * m4/sha.m4: New file.
20740
20741         Module getstr.
20742         * m4/getstr.m4: New file.
20743
20744         Module getline.
20745         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20746         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20747         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20748         simply getline. Infoke gl_PREREQ_GETLINE.
20749
20750         Module obstack.
20751         * m4/obstack.m4: New file.
20752
20753         Module hash.
20754         * m4/hash.m4: New file.
20755
20756         Module readtokens.
20757         * m4/readtokens.m4: New file.
20758
20759         Module strverscmp.
20760         * m4/strverscmp.m4: New file.
20761
20762         Module stdbool.
20763         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20764         OSF/1.
20765
20766         Module strtoll.
20767         * m4/strtoll.m4: New file.
20768
20769         Module strtoull.
20770         * m4/strtoull.m4: New file.
20771
20772         Module strtoimax.
20773         * m4/strtoimax.m4: New file.
20774
20775         Module strtoumax.
20776         * m4/strtoumax.m4: New file.
20777
20778         Module xstrtoimax.
20779         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20780         jm_AC_PREREQ_XSTRTOIMAX.
20781         Moved the strtol prerequisites to strtol.m4.
20782         Moved the strtoll prerequisites to strtoll.m4.
20783         Moved the strtoimax prerequisites to strtoimax.m4.
20784
20785         Module xstrtoumax.
20786         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20787         jm_AC_PREREQ_XSTRTOUMAX.
20788         Moved the strtoul prerequisites to strtoul.m4.
20789         Moved the strtoull prerequisites to strtoull.m4.
20790         Moved the strtoumax prerequisites to strtoumax.m4.
20791
20792         Module chown.
20793         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20794         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20795
20796         Module dup2.
20797         * m4/dup2.m4: New file.
20798
20799         Module ftruncate.
20800         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
20801         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
20802
20803         Module getgroups.
20804         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
20805         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
20806
20807         Module gettimeofday.
20808         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
20809         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
20810         gl_PREREQ_GETTIMEOFDAY.
20811
20812         Module mkdir.
20813         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
20814         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
20815
20816         Module mkstemp.
20817         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
20818         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
20819         jm_AC_TYPE_UINTMAX_T.
20820         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
20821
20822         Module stat.
20823         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
20824         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
20825
20826         Module lstat.
20827         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
20828         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
20829
20830         Module timespec.
20831         * m4/timespec.m4 (gl_TIMESPEC): New macro.
20832         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
20833         * m4/st_mtim.m4: Indentation.
20834
20835         Module nanosleep.
20836         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
20837         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
20838         gl_PREREQ_NANOSLEEP.
20839
20840         Module regex.
20841         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
20842         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
20843         (gl_REGEX): New macro.
20844
20845         Module rename.
20846         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
20847         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
20848
20849         Module rmdir.
20850         * m4/rmdir.m4: New file.
20851
20852         Module utime.
20853         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
20854         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
20855         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
20856
20857         Module dirname.
20858         * m4/dirname.m4: New file.
20859
20860         Module getopt.
20861         * m4/getopt.m4: New file.
20862
20863         Module unistd-safer.
20864         * m4/unistd-safer.m4: New file.
20865
20866         Module fnmatch.
20867         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
20868         declaration.
20869         (gl_PREREQ_FNMATCH_EXTRA): New macro.
20870         (gl_FUNC_FNMATCH_POSIX): New macro.
20871         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
20872         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
20873         simply fnmatch.
20874
20875         Module exclude.
20876         * m4/exclude.m4: New file.
20877
20878         Module human.
20879         * m4/human.m4: New file.
20880
20881         Module acl.
20882         * m4/acl.m4: Nop.
20883
20884         Module backupfile.
20885         * m4/backupfile.m4: New file.
20886         * m4/d-ino.m4: Indentation.
20887
20888         Module fsusage.
20889         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
20890         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
20891         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
20892
20893         Module dirfd.
20894         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
20895         requirements.
20896
20897         Module euidaccess.
20898         * m4/euidaccess.m4: New file.
20899
20900         Module file-type.
20901         * m4/file-type.m4: New file.
20902
20903         Module fileblocks.
20904         * m4/fileblocks.m4: New file.
20905
20906         Module filemode.
20907         * m4/filemode.m4: New file.
20908
20909         Module isdir.
20910         * m4/isdir.m4: New file.
20911
20912         Module lchown.
20913         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
20914         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
20915
20916         Module makepath.
20917         * m4/makepath.m4: New file.
20918
20919         Module modechange.
20920         * m4/modechange.m4: New file.
20921
20922         Module mountlist.
20923         * m4/mountlist.m4: New file.
20924         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
20925         Indentation.
20926
20927         Module path-concat.
20928         * m4/path-concat.m4: New file.
20929
20930         Module pathmax.
20931         * m4/pathmax.m4: New file.
20932
20933         Module same.
20934         * m4/same.m4: New file.
20935
20936         Module save-cwd.
20937         * m4/save-cwd.m4: New file.
20938
20939         Module savedir.
20940         * m4/savedir.m4: New file.
20941
20942         Module xgetcwd.
20943         * m4/xgetcwd.m4: New file.
20944         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
20945
20946         Module xreadlink.
20947         * m4/xreadlink.m4: New file.
20948
20949         Module safe-read.
20950         * m4/safe-read.m4: New file.
20951
20952         Module safe-write.
20953         * m4/safe-write.m4: New file.
20954
20955         Module closeout.
20956         * m4/closeout.m4: New file.
20957
20958         Module stdio-safer.
20959         * m4/stdio-safer.m4: New file.
20960
20961         Module getpass.
20962         * m4/getpass.m4: New file.
20963
20964         Module getugroups.
20965         * m4/getugroups.m4: New file.
20966
20967         Module group-member.
20968         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
20969         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
20970
20971         Module idcache.
20972         * m4/idcache.m4: New file.
20973
20974         Module userspec.
20975         * m4/userspec.m4: New file.
20976
20977         Module gettime.
20978         * m4/clock_time.m4: New file.
20979         * m4/gettime.m4: New file.
20980
20981         Module settime.
20982         * m4/settime.m4: New file.
20983
20984         Module posixtm.
20985         * m4/posixtm.m4: New file.
20986
20987         Module gethostname.
20988         * m4/gethostname.m4: New file.
20989
20990         Module canon-host.
20991         * m4/canon-host.m4: New file.
20992
20993         Module gettext.
20994         * m4/codeset.m4: New file, from gettext-0.11.5.
20995         * m4/gettext.m4: New file, from gettext-0.11.5.
20996         * m4/glibc21.m4: New file, from gettext-0.11.5.
20997         * m4/iconv.m4: New file, from gettext-0.11.5.
20998         * m4/intdiv0.m4: New file, from gettext-0.11.5.
20999         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
21000         * m4/inttypes.m4: New file, from gettext-0.11.5.
21001         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
21002         * m4/isc-posix.m4: New file, from gettext-0.11.5.
21003         * m4/lcmessage.m4: New file, from gettext-0.11.5.
21004         * m4/lib-ld.m4: New file, from gettext-0.11.5.
21005         * m4/lib-link.m4: New file, from gettext-0.11.5.
21006         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
21007         * m4/progtest.m4: New file, from gettext-0.11.5.
21008         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
21009         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
21010         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
21011
21012         Module localcharset.
21013         * m4/localcharset.m4: New file.
21014
21015         Module hard-locale.
21016         * m4/hard-locale.m4: New file.
21017
21018         Module mbswidth.
21019         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
21020         onceonly macros.
21021         * m4/mbrtowc.m4: Add comment.
21022
21023         Module memcasecmp.
21024         * m4/memcasecmp.m4: New file.
21025
21026         Module memcoll.
21027         * m4/memcoll.m4: New file.
21028
21029         Module unicodeio.
21030         * m4/unicodeio.m4: New file.
21031
21032         Module rpmatch.
21033         * m4/rpmatch.m4: New file.
21034
21035         Module yesno.
21036         * m4/yesno.m4: New file.
21037
21038         Module exitfail.
21039         * m4/exitfail.m4: New file.
21040
21041         Module c-stack.
21042         * m4/c-stack.m4 (gl_C_STACK): New macro.
21043         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
21044
21045         Module error.
21046         * m4/error.m4 (gl_ERROR): New macro.
21047         (jm_PREREQ_ERROR): Use onceonly macros.
21048
21049         Module fatal.
21050         * m4/fatal.m4: New file.
21051
21052         Module getloadavg.
21053         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21054         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21055
21056         Module getpagesize.
21057         * m4/getpagesize.m4: New file.
21058
21059         Module getusershell.
21060         * m4/getusershell.m4: New file.
21061
21062         Module physmem.
21063         * m4/physmem.m4: New file.
21064
21065         Module posixver.
21066         * m4/posixver.m4: New file.
21067
21068         Module quotearg.
21069         * m4/quotearg.m4: New file.
21070
21071         Module quote.
21072         * m4/quote.m4: New file.
21073
21074         Module readutmp.
21075         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21076
21077         Module sig2str.
21078         * m4/sig2str.m4: New file.
21079
21080         Other.
21081         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21082         ulonglong.m4.
21083         * m4/intmax_t.m4: New file.
21084         * m4/d-type.m4: Indentation.
21085         * m4/jm-macros.m4: Update.
21086         * m4/prereq.m4 (jm_PREREQ): Update.
21087         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
21088         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
21089         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
21090         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
21091         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
21092         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
21093         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
21094         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
21095         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
21096         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
21097         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
21098         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
21099         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
21100         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
21101         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
21102         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
21103         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
21104         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
21105         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
21106
21107 2002-12-24  Bruno Haible  <bruno@clisp.org>
21108
21109         * MODULES.txt: Update according to m4/ changes.
21110
21111         Module gettext.
21112         * config.rpath: New file, from gettext-0.11.5.
21113
21114         * modules/*: New module descriptions.
21115         * gnulib-tool: New file.
21116         * MODULES.html.sh: New file.
21117
21118 2002-12-21  Karl Berry  <karl@gnu.org>
21119
21120         * doc/fdl.texi: update to version 1.2.
21121
21122 2002-12-19  Karl Berry  <karl@gnu.org>
21123
21124         * config/config.guess: update from prep.
21125
21126 2002-12-18  Bruno Haible  <bruno@clisp.org>
21127
21128         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
21129         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
21130
21131 2002-12-17  Bruno Haible  <bruno@clisp.org>
21132
21133         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
21134         stdlib.h, string.h.
21135
21136 2002-12-17  Bruno Haible  <bruno@clisp.org>
21137
21138         * lib/canon-host.c (strdup): Remove unused declaration.
21139
21140         * lib/fsusage.c: Include full_read.h.
21141         (get_fs_usage): Use full_read instead of safe_read.
21142
21143         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
21144
21145 2002-12-12  Karl Berry  <karl@gnu.org>
21146
21147         * config/config.guess: update from prep.
21148
21149 2002-12-11  Bruno Haible  <bruno@clisp.org>
21150
21151         * m4/setenv.m4: New file, from gettext-0.11.5.
21152
21153 2002-12-11  Bruno Haible  <bruno@clisp.org>
21154
21155         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
21156         not unsetenv().
21157         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
21158         modifications:
21159
21160         2002-12-11  Bruno Haible  <bruno@clisp.org>
21161
21162                 * setenv.c (alloca): Fall back to malloc.
21163                 (freea): New macro.
21164                 (setenv): Use freea() to free memory allocated with alloca().
21165
21166         2002-11-13  Bruno Haible  <bruno@clisp.org>
21167
21168                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
21169                 function declarations.
21170                 * unsetenv.c (unsetenv): Likewise.
21171
21172         2002-03-04  Bruno Haible  <bruno@clisp.org>
21173
21174                 Portability to AIX 4.3.3.
21175                 * unsetenv.c: New file, extracted from setenv.c.
21176                 * setenv.c: Move the unsetenv() function to unsetenv.c.
21177
21178         2001-12-20  Bruno Haible  <bruno@clisp.org>
21179
21180                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
21181                 use malloc instead. For SunOS 4.
21182
21183         2001-12-11  Bruno Haible  <bruno@clisp.org>
21184
21185                 * setenv.c: Declare alloca.
21186                 (compar_fn_t): New typedef.
21187                 (KNOWN_VALUE, STORE_VALUE): Use it.
21188
21189         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
21190         setenv.h.
21191
21192 2002-12-10  Paul Eggert  <eggert@twinsun.com>
21193
21194         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
21195         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
21196         Choose values that are less likely to collide with system fnmatch
21197         options.
21198         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
21199         defined (e.g., a pure POSIX system).
21200         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
21201         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
21202
21203 2002-12-06  Paul Eggert  <eggert@twinsun.com>
21204
21205         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
21206         a pain in practice to deal with generated m4 files.  This change
21207         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
21208
21209         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
21210         and jm-glibc-io.m4, as they are no longer a special case.
21211         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
21212         kludge and the auto-generation stuff.  Check only whether the
21213         functions are declared, not whether they exist, since older hosts
21214         that don't declare the functions can't use the optimization anyway.
21215
21216 2002-12-06  Jim Meyering  <jim@meyering.net>
21217
21218         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
21219
21220         Merge in changes from libc's misc/error.c, in preparation
21221         for the merge of gnulib's changes back into libc.
21222
21223         * lib/error.c (_): Define only if not already defined.
21224         Move definition to follow all #include directives.
21225         Include unlocked-io.h only if !_LIBC.
21226         [_LIBC]: Include <libio/libioP.h>.
21227         [USE_IN_LIBIO]: Include <libio/iolibio.h>
21228         (fflush): Tweak definition to use INTUSE.
21229         (putc): Define.
21230
21231 2002-12-05  Paul Eggert  <eggert@twinsun.com>
21232
21233         * lib/alloca.c [defined emacs]: Include "lisp.h".
21234         (xalloc_die) [defined emacs]: New macro.
21235         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
21236         [! defined emacs]: Include <xalloc.h>.
21237         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
21238         (pointer): Typedef to POINTER_TYPE *.
21239         (malloc): Remove decl; we now always use xmalloc.
21240         (alloca): Use old-style definition, since Emacs needs this.
21241         Check for arithmetic overflow when computing combined size.
21242
21243 2002-12-04  Paul Eggert  <eggert@twinsun.com>
21244
21245         Do not generate unlocked-io.h automatically, since it's easier to
21246         maintain it by hand.
21247
21248         * lib/unlocked-io.h: New file, from GNU diffutils,
21249         but with proper copyright notice and attribution.
21250         * lib/gen-uio: Remove.
21251         * lib/Makefile.am: Add copyright notice.
21252         (libfetish_a_SOURCES): Add unlocked-io.h.
21253         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
21254         (DISTCLEANFILES, io_functions): Remove macros.
21255         (EXTRA_DIST): Remove gen_uio.
21256         (unlocked-io.h): Remove rule.
21257
21258 2002-12-04  Jim Meyering  <jim@meyering.net>
21259
21260         Reflect the fact that stat.c and lstat.c are no longer generated.
21261         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
21262         (DISTCLEANFILES): Likewise.
21263         (EXTRA_DIST): Likewise.
21264         (all_local): Don't depend on stat.c or lstat.c.
21265         (stat.c, lstat.c): Remove rules.
21266         (EXTRA_DIST): Remove xstat.in.
21267
21268         * lib/xstat.in: Remove file.  Contents moved into stat.c.
21269         * lib/stat.c: New file.  Contents mostly from xstat.in.
21270         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
21271         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
21272
21273         * lib/safe-read.c: Rework so that it may serve to define safe_write,
21274         too.
21275         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
21276
21277 2002-12-03  Jim Meyering  <jim@meyering.net>
21278
21279         * lib/safe-read.c, safe-write.c: Change variable names and comments,
21280         but not semantics, to minimize the differences between these two files.
21281         (safe_read): Change comment to mention SAFE_READ_ERROR.
21282
21283         * lib/safe-read.c (IS_EINTR): Define.
21284         (safe_read): Use IS_EINTR in place of in-function cpp directives.
21285
21286 2002-12-02  Jim Meyering  <jim@meyering.net>
21287
21288         * lib/safe-read.c (EINTR): Define.
21289         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21290         (INT_MAX): Provide fallback.
21291         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
21292
21293         * lib/safe-read.h (SAFE_READ_ERROR): Define.
21294
21295 2002-12-02  Bruno Haible  <bruno@clisp.org>
21296
21297         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
21298         Define, taken from safe-read.c.
21299         (INT_MAX): Provide fallback.
21300         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21301         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
21302
21303         * lib/safe-read.c (EINTR): Remove definition.
21304         (safe_read): Don't use EINTR if it is absent.
21305
21306 2002-12-01  Jim Meyering  <jim@meyering.net>
21307
21308         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
21309         zero.
21310         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
21311
21312 2002-11-27  Paul Eggert  <eggert@twinsun.com>
21313
21314         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
21315         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
21316         with `if (! (value < limit)) abort ();', for readability.
21317
21318 2002-11-26  Karl Berry  <karl@gnu.org>
21319
21320         * lib/strdup.c: copy from libc again, with jim's ok.
21321         * lib/.cppi-disable: re-add strdup.c
21322
21323 2002-11-25  Karl Berry  <karl@gnu.org>
21324
21325         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21326         instead of "strtol.c".
21327
21328 2002-11-25  Karl Berry  <karl@gnu.org>
21329
21330         * config/install-sh: update from automake for variable quoting, $0 in
21331         error msgs, etc.
21332
21333         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21334         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21335         entry.
21336
21337 2002-11-25  Jim Meyering  <jim@meyering.net>
21338
21339         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21340
21341 2002-11-24  Karl Berry  <karl@gnu.org>
21342
21343         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21344         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21345
21346 2002-11-24  Jim Meyering  <jim@meyering.net>
21347
21348         Update from coreutils:
21349
21350         * lib/mktime.c: Merge in changes from libc.
21351
21352         Avoid a link-time failure on some Linux systems.
21353         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21354         (otherwise).
21355         (__mon_yday): Declare with the STATIC attribute.
21356         (__mktime_internal): Likewise.
21357         Based on a report from Greg Schafer.
21358
21359 2002-11-23  Jim Meyering  <jim@meyering.net>
21360
21361         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21362         Use `unsigned', not `int', as type of index.
21363
21364         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21365
21366         * lib/fsusage.c: Remove unneeded parentheses around operands of
21367         `defined'.
21368
21369 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21370
21371         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21372         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21373         so that we can be included first.
21374         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21375         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21376         No need to include stddef.h or sys/types.h any more.
21377         Surround local include files with "", not "<>".
21378         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21379         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21380         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21381         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21382         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21383         (ISPRINT): Remove; no longer needed now that we assume C89.
21384
21385         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21386         Preserve errno.
21387
21388         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21389         quotearg_char): Use SIZE_MAX rather than
21390         (size_t) -1 when we are talking about "infinity".
21391
21392         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21393
21394 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21395
21396         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21397         hint that one should use `if (! x) abort ();' rather than `assert
21398         (x);', and anyway it's one less thing to worry about configuring.
21399         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21400         hash_rehash, hash_insert): Use abort rather than assert.
21401
21402 2002-11-22  Bruno Haible  <bruno@clisp.org>
21403
21404         * lib/safe-read.h: Assume C89. Add comments.
21405         (safe_read): Change return type to size_t.
21406         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21407         byte counts > SSIZE_MAX correctly.
21408         * lib/safe-write.h: New file.
21409         * lib/safe-write.c: New file.
21410         * lib/full-read.h: New file.
21411         * lib/full-read.c: New file.
21412         * lib/full-write.h: Assume C89. Add comments.
21413         * lib/full-write.c: Include safe-write.h.
21414         (full_write): Rewritten to use safe_write.
21415         Suggested by Jim Meyering and Paul Eggert.
21416
21417 2002-11-21  Jim Meyering  <jim@meyering.net>
21418
21419         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21420
21421         Merge in changes from the coreutils.
21422
21423         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21424         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21425         <stdint.h>.
21426         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21427         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21428         int.  Work more efficiently if X is the same width as uintmax_t.
21429         Do not compare X to -1, to avoid bogus compiler warning.
21430         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21431         Don't assume that f_frsize and f_bsize are the same type.
21432
21433         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21434         warning on FreeBSD.
21435
21436         * lib/makepath.c (make_path): Restore umask *before* creating the final
21437         component.
21438         (make_path): Minor reformatting.
21439
21440         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21441         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21442         HAVE_MALLOC/HAVE_REALLOC.
21443
21444         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21445         dummy ones.  At least on GNU/Linux systems, `auto' means something
21446         else.
21447         From Michael Stone.
21448
21449 2002-11-21  Bruno Haible  <bruno@clisp.org>
21450
21451         Remove case insensitive option matching.
21452         * lib/argmatch.h (argcasematch): Remove declaration.
21453         (ARGCASEMATCH): Remove macro.
21454         (__xargmatch_internal): Remove case_sensitive argument.
21455         (XARGMATCH): Update.
21456         (XARGCASEMATCH): Remove macro.
21457         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21458         case_sensitive argument.
21459         (argcasematch): Remove function.
21460         (__xargmatch_internal): Remove case_sensitive argument.
21461         (main): Use XARGMATCH instead of XARGCASEMATCH.
21462
21463         * lib/xmalloc.c: Change compile-time error message. Add comment about
21464         required autoconf version.
21465
21466 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21467
21468         Merge argmatch cleanups from Bison.  Assume C89.
21469
21470         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21471         Include stdlib.h, for EXIT_FAILURE.
21472         Always include <string.h>, since we assume C89.
21473         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21474         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21475         Include <stddef.h> instead, since it's all we need for size_t.
21476         (PARAMS): Remove.  All uses removed.
21477         (ARRAY_CARDINALITY): Do not bother to #undef.
21478         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21479         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21480         Remove unnecessary parentheses.
21481         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21482         Insert necessary parentheses.
21483         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
21484         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
21485
21486 2002-11-19  Bruno Haible  <bruno@clisp.org>
21487
21488         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
21489         * lib/mbswidth.h: Include <stddef.h>, for size_t.
21490
21491         * lib/mbswidth.h (PARAMS): Remove macro.
21492         (mbswidth, mbsnwidth): Use ANSI C function declarations.
21493         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
21494
21495         * lib/gcd.h (PARAMS): Remove macro.
21496         (gcd): Use ANSI C function declarations.
21497         * lib/gcd.c (gcd): Likewise.
21498
21499 2002-11-15  Bruno Haible  <bruno@clisp.org>
21500
21501         * lib/strcspn.c: Include <stddef.h>.
21502         (strcspn): Use ANSI C function declaration. Change return type to
21503         size_t. Use NULL.
21504         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
21505         (strpbrk): Use NULL.
21506         * lib/strpbrk.h (PARAMS): Remove macro.
21507         (strpbrk): Use ANSI C function declaration.
21508         * lib/strstr.c: Don't include <sys/types.h>.
21509         * lib/strstr.h (PARAMS): Remove macro.
21510         (strstr): Use ANSI C function declarations.
21511
21512 2002-11-14  Karl Berry  <karl@gnu.org>
21513
21514         * config/mkinstalldirs: `do' on separate line, instead of
21515         `for var; do'.
21516
21517 2002-11-06  Bruno Haible  <bruno@clisp.org>
21518
21519         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
21520         * lib/gcd.c (gcd): Likewise.
21521
21522 2002-11-05  Bruno Haible  <bruno@clisp.org>
21523
21524         * lib/gcd.h: New file, from gettext-0.11.5.
21525         * lib/gcd.c: New file, from gettext-0.11.5.
21526
21527 2002-11-05  Bruno Haible  <bruno@clisp.org>
21528
21529         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21530         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21531         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21532         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21533
21534         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21535         <libintl.h>.
21536         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21537         <libintl.h>.
21538
21539         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21540         * lib/human.c: Include gettext.h instead of <libintl.h>.
21541         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21542         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21543         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21544         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21545         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21546         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21547         (textdomain): Remove definition.
21548         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21549
21550         * lib/long-options.c: Remove include of <libintl.h> and definition of
21551         _.
21552         * lib/same.c: Remove include of <libintl.h> and definition of _.
21553
21554 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21555
21556         * lib/config.charset: A few additions for Solaris.
21557
21558 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21559
21560         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21561         * lib/localcharset.c (locale_charset): Declare as extern "C".
21562
21563 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21564
21565         * lib/config.charset: msdos in uk_UA uses CP1125.
21566
21567 2002-11-04  Bruno Haible  <bruno@clisp.org>
21568
21569         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21570         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21571         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21572         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21573         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21574
21575 2002-11-04  Bruno Haible  <bruno@clisp.org>
21576
21577         * lib/localcharset.c (locale_charset): Don't return an empty string.
21578
21579 2002-11-04  Bruno Haible  <bruno@clisp.org>
21580
21581         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21582         aliases.
21583
21584 2002-11-04  Bruno Haible  <bruno@clisp.org>
21585
21586         * lib/config.charset: Update for newest glibc. Add canonical names
21587         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21588
21589 2002-11-04  Bruno Haible  <bruno@clisp.org>
21590
21591         * lib/config.charset: Add support for NetBSD.
21592
21593 2002-11-04  Bruno Haible  <bruno@clisp.org>
21594
21595         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21596
21597 2002-11-01  Bruno Haible  <bruno@clisp.org>
21598
21599         * configure.in: Add AC_CONFIG_AUX_DIR call.
21600         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21601         test/Makefile.
21602         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21603
21604 2002-09-28  Karl Berry  <karl@gnu.org>
21605
21606         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21607         installed automake until the next release, since changes have been
21608         made.
21609
21610 2002-09-25  Karl Berry  <karl@gnu.org>
21611
21612         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21613         * lib/getopt*: copy from libc/posix.
21614         * lib/gettext.h: copy from gettext.
21615         * lib/.cppi-disable: add strdup.c, gettext.h.
21616
21617 2002-09-25  Karl Berry  <karl@gnu.org>
21618
21619         * config/srclist.txt: enable gettext.h check.
21620         * config/config.{guess,sub}: update from prep.
21621         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21622                 from automake 1.6.3.
21623         See srclist*.
21624
21625 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21626
21627         * regex.c (PATFETCH): Remove the translating fetch.
21628         (PATFETCH_RAW): Rename to PATFETCH.
21629         (set_image_of_range): New fun.
21630         (SET_RANGE_TABLE_WORK_AREA): Use it.
21631         (regex_compile): Don't translate the pattern chars so eagerly.
21632         Only do it when inserting an `exactn' bytecode or when handling
21633         a char-range.
21634         (mutually_exclusive_p): Avoid empty statement.
21635
21636 2002-07-06  Jim Meyering  <meyering@lucent.com>
21637
21638         * m4/README: Don't mention Makefile.am.in.
21639         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21640
21641 2002-07-01  Jim Meyering  <meyering@lucent.com>
21642
21643         * lib/c-stack.c: Include sys/time.h.
21644         From Volker Borchert.
21645
21646 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21647
21648         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21649
21650 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21651
21652         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21653         New macro.  Use it uniformly instead of
21654         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21655         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21656         reported by Vin Shelton.
21657
21658 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21659
21660         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21661         Do not assume SA_SIGINFO behavior.
21662         Bug reported by Jim Meyering on NetBSD 1.5.2.
21663
21664 2002-06-22  Jim Meyering  <meyering@lucent.com>
21665
21666         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21667         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21668
21669         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21670         now that configure.ac uses AC_GNU_SOURCE.
21671         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21672         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21673
21674         Update to latest tools.  Suggestions from Paul Eggert.
21675         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21676         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21677         * m4/fnmatch.m4: Likewise.
21678         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21679         to AC_HEADER_STDBOOL
21680
21681 2002-06-22  Jim Meyering  <meyering@lucent.com>
21682
21683         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21684         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21685
21686 2002-06-22  Jim Meyering  <meyering@lucent.com>
21687
21688         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21689
21690         * lib/exitfail.c, exitfail.h: Likewise.
21691         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21692
21693         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21694         of fnmatch.h.
21695         (EXTRA_DIST): Add fnmatch_loop.c.
21696         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21697
21698         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21699         * lib/fnmatch.c: Update from diffutils-2.8.2.
21700         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21701         * lib/fnmatch.h: Remove file.
21702
21703 2002-06-21  Jim Meyering  <meyering@lucent.com>
21704
21705         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21706         * m4/mbrtowc.m4: Likewise.
21707
21708         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21709         * m4/mbswidth.m4: Reflect name change:
21710         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21711         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21712
21713         * m4/lib-link.m4: Update from gettext-0.11.2.
21714         * m4/gettext.m4: Likewise.
21715
21716         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21717         From Alfred M. Szmidt.
21718
21719 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21720
21721         * lib/file-type.h: Report an error if neither S_ISREG nor
21722         S_IFREG is defined, instead of using a test specific to glibc
21723         2.2.  This should be safe, since POSIX requires S_ISREG and
21724         Unix Version 7 had S_IFREG.  We don't need to check for
21725         <sys/types.h> since we don't use any symbols that it defines.
21726
21727 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21728
21729         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21730         $@-t, so that each temporary file name is unique and valid in the first
21731         8 characters, for operation under DOS.
21732
21733 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21734
21735         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21736
21737 2002-06-15  Jim Meyering  <meyering@lucent.com>
21738
21739         Work even with DJGPP 2.03, which lacks support for symlinks.
21740         From Richard Dawe.
21741         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21742         is defined.
21743         * lib/lchown.c (S_ISLNK): Likewise.
21744
21745 2002-06-15  Jim Meyering  <meyering@lucent.com>
21746
21747         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21748         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21749         have been included before this file.
21750
21751 2002-06-14  Jim Meyering  <meyering@lucent.com>
21752
21753         * lib/file-type.h: Use the version from diffutils-2.8.2.
21754         * lib/file-type.c: Likewise.
21755
21756 2002-06-07  Jim Meyering  <meyering@lucent.com>
21757
21758         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21759         They're needed at least for NetBSD 1.5.2.
21760         ($statxfs_includes): Include those same headers.
21761         ($statxfs_includes): Include sys/vfs.h if available.
21762         ($statxfs_includes): Likewise for sys/statvfs.h.
21763         Check for the following members in both structs statfs and statvfs:
21764         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21765
21766 2002-06-01  Jim Meyering  <meyering@lucent.com>
21767
21768         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21769         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21770
21771 2002-05-28  Jim Meyering  <meyering@lucent.com>
21772
21773         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21774         Reported by Volker Borchert.
21775
21776 2002-05-27  Jim Meyering  <meyering@lucent.com>
21777
21778         Fix a problem seen only on nonconforming systems whereby ls.c's
21779         use of localtime, and then of gettimeofday would cause trouble:
21780         the localtime call used to initialize rpl_gettimeofday's save
21781         mechanism would clobber ls's current local time information so
21782         that in any long listing the first file would always be listed
21783         with date 1970-01-01.  Analysis by Volker Borchert.
21784
21785         * lib/gettimeofday.c (localtime): Undefine.
21786         (rpl_localtime): New function.
21787
21788 2002-05-27  Jim Meyering  <meyering@lucent.com>
21789
21790         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21791         localtime.
21792
21793         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21794         use the replacement function; it wouldn't resolve at link time.
21795         Reported by Volker Borchert.
21796
21797 2002-05-22  Jim Meyering  <meyering@lucent.com>
21798
21799         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
21800         file-type.h.
21801         * lib/file-type.h: New file.
21802         * lib/file-type.c (file_type): New file/function.  Extracted from
21803         diffutils.
21804
21805 2002-04-30  Jim Meyering  <meyering@lucent.com>
21806
21807         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
21808
21809 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21810
21811         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
21812
21813 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21814
21815         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
21816         Do not check for alloca.h (no longer used) or stdbool.h (was never
21817         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
21818
21819 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21820
21821         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
21822
21823 2002-04-29  Jim Meyering  <meyering@lucent.com>
21824
21825         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
21826         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
21827         Use AC_FUNC_STRNLEN here instead.
21828
21829         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
21830         With autoconf-2.53a, it's part of AC_PROG_CC.
21831
21832 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21833
21834         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
21835         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
21836
21837 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21838
21839         * lib/sig2str.h, lib/sig2str.c: New files.
21840         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
21841
21842 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21843
21844         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
21845         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
21846         of 127, since 64 is the largest conceivable number for ancient
21847         nonstandard hosts.
21848         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
21849
21850 2002-04-28  Jim Meyering  <meyering@lucent.com>
21851
21852         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
21853
21854 2002-04-24  Jim Meyering  <meyering@lucent.com>
21855
21856         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
21857         (jm_PREREQ): Use it.
21858
21859         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
21860         mach/mach.h fcntl.h.
21861         Check for this function: setlocale.
21862
21863 2002-04-24  Jim Meyering  <meyering@lucent.com>
21864
21865         * lib/gettext.h: New file, from Gettext.
21866         * lib/Makefile.am (INCLUDES): Remove -I../intl.
21867         (libfetish_a_SOURCES): Add gettext.h.
21868
21869 2002-04-16  Jim Meyering  <meyering@lucent.com>
21870
21871         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
21872         ut_pid, ut_id, ut_exit.
21873
21874 2002-04-16  Jim Meyering  <meyering@lucent.com>
21875
21876         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
21877         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
21878         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
21879
21880 2002-04-12  Jim Meyering  <meyering@lucent.com>
21881
21882         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
21883         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
21884         existence of the getmntinfo function.  Needed for Darwin 5.3.
21885
21886         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
21887         This is necessary at least on Darwin 5.3.
21888
21889         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
21890         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
21891         strnlen.o in the library, and that makes some versions of ranlib
21892         object.
21893
21894 2002-04-12  Jim Meyering  <meyering@lucent.com>
21895
21896         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
21897
21898 2002-04-09  Jim Meyering  <meyering@lucent.com>
21899
21900         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
21901         to be more precise.  Rather than saying we're checking whether the
21902         function `works', say what we're testing.
21903         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
21904         Reported by Bruno Haible.
21905
21906 2002-03-10  Jim Meyering  <meyering@lucent.com>
21907
21908         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
21909         Suggestion from Santiago Vila.
21910
21911 2002-03-08  Jim Meyering  <meyering@lucent.com>
21912
21913         * lib/rename.c: Mention that this wrapper is needed also on
21914         mips-dec-ultrix4.4 systems.
21915
21916 2002-03-02  Jim Meyering  <meyering@lucent.com>
21917
21918         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
21919         not HAVE_CLOCK_SETTIME.
21920
21921 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21922
21923         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
21924         Check for clock_settime.
21925
21926 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21927
21928         * lib/nanosleep.h: Rename to....
21929         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
21930
21931         * lib/gettime.c: New file.
21932         * lib/settime.c: New file.
21933         * lib/stime.c: Remove.
21934
21935         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
21936         timespec.h.  Remove nanosleep.h.
21937
21938 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21939
21940         * m4/acl.m4: New file.
21941         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
21942         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
21943
21944 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21945
21946         * lib/acl.c, lib/acl.h: New files.
21947         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
21948
21949 2002-02-24  Jim Meyering  <meyering@lucent.com>
21950
21951         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
21952         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
21953         cause trouble.  Reported by Nelson Beebe.
21954
21955 2002-02-23  Paul Eggert  <eggert@twinsun.com>
21956
21957         * lib/path-concat.c (xpath_concat): Reorder code to pacify
21958         compilers that don't know that xalloc_die never returns.
21959
21960 2002-02-20  Jim Meyering  <meyering@lucent.com>
21961
21962         * lib/getdate.c: Regenerate using bison-1.33.
21963
21964 2002-02-17  Jim Meyering  <meyering@lucent.com>
21965
21966         * config/config.guess (main): Don't use `head -1'; it's no longer
21967         portable. Use `sed 1q' instead.
21968
21969 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
21970
21971         * m4/codeset.m4: Upgrade to gettext-0.11.
21972         * m4/gettext.m4: Upgrade to gettext-0.11.
21973         * m4/glibc21.m4: Upgrade to gettext-0.11.
21974         * m4/iconv.m4: Upgrade to gettext-0.11.
21975         * m4/isc-posix.m4: Upgrade to gettext-0.11.
21976         * m4/lcmessage.m4: Upgrade to gettext-0.11.
21977         * m4/lib-ld.m4: New file, from gettext-0.11.
21978         * m4/lib-link.m4: New file, from gettext-0.11.
21979         * m4/lib-prefix.m4: New file, from gettext-0.11.
21980         * m4/progtest.m4: Upgrade to gettext-0.11.
21981
21982 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21983
21984         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
21985         (jm_PREREQ): Use it.
21986
21987 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21988
21989         * lib/posixver.c, lib/posixver.h: New files.
21990         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21991
21992 2002-02-02  Paul Eggert  <eggert@twinsun.com>
21993             Bruno Haible  <bruno@clisp.org>
21994
21995         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
21996         (fwrite_success_callback): New declaration.
21997         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
21998         print_unicode_char. Call failure callback instead of error.
21999         (fwrite_success_callback): New function.
22000         (exit_failure_callback): New function.
22001         (fallback_failure_callback): New function.
22002         (print_unicode_char): Call unicode_to_mb.
22003
22004 2002-01-26  Jim Meyering  <meyering@lucent.com>
22005
22006         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
22007         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
22008
22009 2002-01-26  Jim Meyering  <meyering@lucent.com>
22010
22011         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
22012
22013 2002-01-22  Paul Eggert  <eggert@twinsun.com>
22014
22015         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
22016
22017 2002-01-22  Jim Meyering  <meyering@lucent.com>
22018
22019         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
22020         Otherwise, some versions of automake would omit the rule that makes
22021         Makefile from Makefile.in.
22022
22023 2002-01-21  Paul Eggert  <eggert@twinsun.com>
22024
22025         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
22026         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22027         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
22028         (memcoll): Set errno to zero if there is no error.
22029
22030         * lib/quotearg.c (quotearg_buffer_restyled):
22031         Fix bug with quoting buffers containing NUL when backslashing escapes.
22032         This bug was exposed by the other changes in this patch.
22033         (quotearg_n_options): New arg ARGSIZE.
22034         All callers changed.
22035         (quoting_options_from_style): New function.
22036         (quotearg_n_style): Use it.
22037         (quotearg_n_style_mem): New function.
22038
22039         * lib/quotearg.h (quotearg_n_style_mem): New function.
22040
22041 2002-01-19  Jim Meyering  <meyering@lucent.com>
22042
22043         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
22044         Remove useless quotes: DF_PROG="df".
22045         * m4/strnlen.m4: New file.
22046
22047 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22048
22049         * lib/backupfile.c (ISDIGIT): Comment fix.
22050         * lib/getdate.y (ISDIGIT): Likewise.
22051         * lib/posixtm.c (ISDIGIT, year): Likewise.
22052         * lib/strverscmp.c (ISDIGIT): Likewise.
22053         * lib/userspec.c (ISDIGIT): Likewise.
22054
22055 2002-01-16  Jim Meyering  <meyering@lucent.com>
22056
22057         * lib/getdate.y: Add three semicolons, each just before a closing
22058         brace. Bison (as of version 1.31) no longer papers over that mistake.
22059
22060 2002-01-05  Jim Meyering  <meyering@lucent.com>
22061
22062         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22063
22064 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22065
22066         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22067         not silently exit merely because the output buffer happens to
22068         have nothing pending.
22069
22070 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22071
22072         See the big note in ../ChangeLog.
22073         * lib/human.c (suffixes): Prefer K to k for 1024.
22074         (generate_suffix_backwards): New function.
22075         (human_readable_inexact): Use it.
22076         * lib/xstrtol.c (__xstrtol): If there is no number but there
22077         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22078         Accept 'K' as well as 'k'.
22079
22080 2001-12-15  Jim Meyering  <meyering@lucent.com>
22081
22082         * lib/regex.h (__restrict_arr): Update from libc.
22083
22084         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
22085         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
22086         (STREQ): Define.
22087
22088 2001-12-14  Jim Meyering  <meyering@lucent.com>
22089
22090         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
22091         Suggestion from Bruno Haible.
22092
22093 2001-12-10  Jim Meyering  <meyering@lucent.com>
22094
22095         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
22096         xrealloc, Instead, include "xalloc.h".
22097         (initbuffer): Don't cast xmalloc return value to char*.
22098         (readline): Reword comment.
22099         Don't cast xrealloc return value to char*
22100         Return NULL, not 0.
22101
22102 2001-12-09  Jim Meyering  <meyering@lucent.com>
22103
22104         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
22105         about `signed and unsigned type in conditional expression'.
22106         * lib/posixtm.c (posix_time_parse): Likewise.
22107
22108         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
22109
22110         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
22111         to avoid a pedantic warning.
22112
22113         * lib/getstr.c: Don't include assert.h.
22114         (getstr): Remove warning-evoking assertions.
22115         Return -1 if offset parameter is out of bounds.
22116         Change the type of a local from int to size_t.
22117
22118         * lib/strftime.c (my_strftime_localtime_r): Include this function
22119         definition in the `#if ! HAVE_TM_GMTOFF' block.
22120
22121         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
22122         Include xalloc.h instead.
22123
22124 2001-12-02  Jim Meyering  <meyering@lucent.com>
22125
22126         * lib/tempname.c: Don't declare getenv, thus reverting the change of
22127         2001-11-18.  It's no longer necessary, now that stdlib.h is always
22128         included.
22129
22130         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
22131         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
22132
22133 2001-11-30  Akim Demaille  <akim@epita.fr>
22134
22135         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
22136         before being defined.
22137
22138 2001-11-27  Paul Eggert  <eggert@twinsun.com>
22139
22140         * lib/quotearg.h (quotearg_n, quotearg_n_style):
22141         First arg is int, not unsigned.
22142         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22143         (SIZE_MAX, UINT_MAX): New macros.
22144         (quotearg_n_options): Abort if N is negative.
22145         Avoid overflow check on hosts where size_t is 64 bits and int
22146         is 32 bits, as overflow is impossible there.
22147         Fix off-by-one typo that caused unnecessary reallocation.
22148
22149 2001-11-27  Jim Meyering  <meyering@lucent.com>
22150
22151         * lib/tempname.c: Merge with version from libc.
22152         * lib/regex.c: Likewise.
22153
22154         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
22155         systems for which STDC_HEADERS is 0, it was not included, resulting in
22156         a warning about an integer-to-pointer conversion problem with getenv.
22157         Reported by Volker Borchert.
22158
22159 2001-11-26  Jim Meyering  <meyering@lucent.com>
22160
22161         * lib/gtod.h: Remove file.
22162         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
22163         * lib/gettimeofday.c: Don't include gtod.h.
22164         (GTOD_init): Remove function.
22165         (rpl_gettimeofday): Do its job here instead, rather than aborting.
22166         Suggestion from Volker Borchert.
22167
22168 2001-11-23  Jim Meyering  <meyering@lucent.com>
22169
22170         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
22171         it.
22172         * lib/hash.c (struct hash_table): Define it here instead.
22173
22174 2001-11-22  Jim Meyering  <meyering@lucent.com>
22175
22176         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
22177
22178 2001-11-20  Jim Meyering  <meyering@lucent.com>
22179
22180         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
22181         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
22182
22183 2001-11-19  Jim Meyering  <meyering@lucent.com>
22184
22185         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
22186         directory.  Use "conftestXXXXXX" as the template.
22187         Suggestion from Paul Eggert.
22188
22189         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
22190         immediately, so the test doesn't mistakenly hit the max-open-files
22191         limit.
22192
22193 2001-11-18  Paul Eggert  <eggert@twinsun.com>
22194
22195         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
22196         (TEMPORARIES): New macro.
22197         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
22198         removes an artificial limitation (e.g. HP-UX 10.20, where
22199         TMP_MAX is 17576).
22200
22201 2001-11-18  Jim Meyering  <meyering@lucent.com>
22202
22203         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
22204
22205 2001-11-18  Jim Meyering  <meyering@lucent.com>
22206
22207         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
22208         on SunOS 4.
22209
22210         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
22211         files will be created before anything else.
22212
22213 2001-11-17  Paul Eggert  <eggert@twinsun.com>
22214
22215         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
22216         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
22217
22218 2001-11-17  Jim Meyering  <meyering@lucent.com>
22219
22220         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
22221         Prompted by a report from Bob Proulx.
22222
22223         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
22224         Instead, require UTILS_FUNC_MKSTEMP.
22225
22226 2001-11-17  Jim Meyering  <meyering@lucent.com>
22227
22228         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
22229         Now, that's done as part of AC_FUNC_STRTOD.
22230
22231 2001-11-17  Jim Meyering  <meyering@lucent.com>
22232
22233         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
22234         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
22235         rather than group writable.  Patch by Juan F. Codagnone.
22236
22237         * lib/readtokens.c: Remove explicit declarations of xmalloc and
22238         xrealloc, Instead, include "xalloc.h".
22239
22240         * lib/mountlist.c: Include unlocked-io.h after all system headers.
22241         Remove explicit declarations of xmalloc, xrealloc,
22242         and xstrdup.  Instead, include "xalloc.h".
22243
22244         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
22245         unlocked-io.h.
22246         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
22247         Likewise.
22248         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
22249
22250         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
22251         Reported by Padraig Brady.
22252
22253         * lib/mkstemp.c: #undef mkstemp.
22254         Include config.h.
22255         (rpl_mkstemp): Rename from mkstemp.
22256         Protoize.
22257
22258 2001-11-16  Jim Meyering  <meyering@lucent.com>
22259
22260         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
22261         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
22262         determine the amount of total physical memory, use pstat_getstatic.
22263         HPUX-11 doesn't define _SC_PHYS_PAGES.
22264         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
22265         If sysconf couldn't be used to determine the amount of available
22266         physical memory, use both pstat_getstatic and pstat_getdynamic.
22267         Based on a patch from Bob Proulx.
22268
22269 2001-11-10  Jim Meyering  <meyering@lucent.com>
22270
22271         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
22272         (jm_PREREQ): Use it.
22273
22274 2001-11-09  Jim Meyering  <meyering@lucent.com>
22275
22276         * m4/jm-macros.m4: Require autoconf-2.52f.
22277         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
22278         Use these AC_-prefixed names, not the AM_-prefixed ones.
22279
22280         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
22281
22282 2001-11-05  Jim Meyering  <meyering@lucent.com>
22283
22284         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
22285
22286 2001-11-04  Jim Meyering  <meyering@lucent.com>
22287
22288         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
22289         $DEFS.
22290
22291 2001-11-03  Jim Meyering  <meyering@lucent.com>
22292
22293         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
22294         of AC_DEFUN.
22295
22296         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
22297         know the name of the variable in the macro definition.
22298
22299 2001-11-03  Jim Meyering  <meyering@lucent.com>
22300
22301         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
22302         in argmatch_to_argument call.
22303
22304         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
22305         argument.
22306
22307         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
22308         e.g., a fault due to an attempt to free a NULL pointer.
22309
22310 2001-11-01  Jim Meyering  <meyering@lucent.com>
22311
22312         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
22313         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
22314
22315 2001-11-01  Jim Meyering  <meyering@lucent.com>
22316
22317         * lib/dirfd.c, lib/dirfd.h: New files.
22318         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22319
22320         * lib/hash.c (hash_print) [TESTING]: Clean up.
22321
22322 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22323
22324         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22325         to avoid a warning if -Wall.
22326
22327 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22328
22329         * README: New file
22330         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22331         (per RMS's instructions, this is now the canonical source)
22332         * lgpl/, gpl/: New directories.
22333
22334 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22335
22336         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22337
22338 2001-10-21  Jim Meyering  <meyering@lucent.com>
22339
22340         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22341         this code would end up calling gettext even in packages built
22342         with --disable-nls.
22343         * lib/getopt.c (_): Likewise.
22344         * lib/regex.c (_): Likewise.
22345
22346 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22347
22348         * m4/error.m4 (jm_PREREQ_ERROR):
22349         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22350         AC_FUNC_STRERROR_R does that.
22351         Check for strerror declaration.
22352
22353         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22354         are supposed to have them these days.
22355         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22356         Merge changes from latest Autoconf CVS.
22357         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22358         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22359         POSIX decided to standardize on the int flavor of strerror_r.
22360
22361 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22362
22363         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22364         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22365         Use strerror_r that is only a macro, even if it is not a function.
22366         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22367         (private_strerror): Use prototypes, not old-style function definition.
22368         (print_errno_message): New function.
22369         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22370         char*-flavored one.
22371         (error_tail, error, error_at_line): Use it.
22372
22373 2001-10-11  Jim Meyering  <meyering@lucent.com>
22374
22375         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22376         and quote_n (1, ... to avoid clobbering a buffer.
22377
22378 2001-10-05  Jim Meyering  <meyering@lucent.com>
22379
22380         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22381         hash-pjw.h.
22382         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22383         * lib/hash-pjw.h: New file.
22384
22385 2001-09-30  Jim Meyering  <meyering@lucent.com>
22386
22387         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22388         `struct fsstat' has the `f_fstypename' member.
22389         Use that to define FS_TYPE, which is now used to make
22390         the getfsstat link test tighter.
22391
22392 2001-09-30  Jim Meyering  <meyering@lucent.com>
22393
22394         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22395         Include <sys/ucred.h>, for Apple Darwin.
22396         Include sys/mount.h and sys/fs_types.h only if available.
22397         (FS_TYPE): Define.
22398         (read_filesystem_list): Use FS_TYPE.
22399
22400 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22401
22402         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22403         a boolean context.
22404
22405 2001-09-29  Jim Meyering  <meyering@lucent.com>
22406
22407         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22408         [one-argument getmntent function]): Include stdio.h before mntent.h.
22409         SunOS 4.1.x needs it for the declaration of `FILE'.
22410         Patch by Volker Borchert.
22411
22412         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22413         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22414         sys/fs_types.h, and make the link-test for getfsstat guard #include
22415         directives with appropriate #if HAVE_*_H tests so that we can
22416         detect getfsstat on Apple Darwin1.3.7 systems.
22417         Reported by Nelson Beebe.
22418         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22419
22420 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22421
22422         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22423         #defines strtoimax.  Also treat the other strto* functions
22424         like strtoimax.
22425
22426         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22427         Check for strtoul and strtoumax,
22428         as those declarations are made even in the signed case.
22429         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22430         Likewise, for strtol and strtoimax.
22431
22432 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22433
22434         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22435         #defines strtoimax.  Also treat the other strto* functions
22436         like strtoimax.
22437
22438         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22439         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22440         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22441
22442 2001-09-26  Jim Meyering  <meyering@lucent.com>
22443
22444         Most macros in unlocked-io.h had the wrong number of arguments.
22445         * lib/gen-uio: New script.
22446         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22447         * lib/unlocked-io.hin: Remove file.
22448         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22449         rather than trying to embed it here.
22450         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22451         Reported by Padraig Brady.
22452
22453 2001-09-25  Volker Borchert  <bt@teknon.de>
22454
22455         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22456         `result'.
22457
22458 2001-09-24  Jim Meyering  <meyering@lucent.com>
22459
22460         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
22461
22462 2001-09-23  Jim Meyering  <meyering@lucent.com>
22463
22464         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
22465         instead of the mere test for existence of mntent.h.  The latter
22466         would get a false-positive on AIX 3.4 systems.
22467         In the outer getmntent if-block, don't die if neither of the getmntent
22468         tests succeeds.  Instead, just fall through and continue with the
22469         remaining tests.
22470
22471 2001-09-23  Jim Meyering  <meyering@lucent.com>
22472
22473         * lib/mountlist.c: Remove useless parentheses in #if directives.
22474         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22475         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22476
22477 2001-09-22  Jim Meyering  <meyering@lucent.com>
22478
22479         * m4/gettext.m4: New file.  From gettext.
22480         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22481         * m4/progtest.m4: Likewise
22482         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
22483         * m4/glibc21.m4: Likewise.
22484
22485         * m4/libintl.m4: Remove.  No longer used.
22486
22487 2001-09-22  Jim Meyering  <meyering@lucent.com>
22488
22489         * lib/localcharset.c: Update from latest gettext.
22490         * lib/config.charset: Likewise.
22491
22492 2001-09-20  Jim Meyering  <meyering@lucent.com>
22493
22494         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
22495         strtoimax.
22496         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
22497         strtoumax.
22498
22499 2001-09-20  Jim Meyering  <meyering@lucent.com>
22500
22501         * lib/xstrtol.c (strtoimax): Guard declaration with
22502         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
22503         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
22504         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
22505         (strtoumax): Likewise, for completeness (it wasn't necessary).
22506
22507 2001-09-17  Paul Eggert  <eggert@twinsun.com>
22508
22509         * lib/strtoimax.c (HAVE_LONG_LONG):
22510         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
22511         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
22512         to work around bug in IBM C compiler.
22513
22514 2001-09-17  Jim Meyering  <meyering@lucent.com>
22515
22516         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
22517         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
22518         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
22519         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
22520         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
22521         whenever the right hand side need not be expanded by the shell.
22522
22523 2001-09-16  Paul Eggert  <eggert@twinsun.com>
22524
22525         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
22526         library.  It's not correct, as some older glibcs are buggy.
22527         fnmatch wasn't fixed until glibc 2.2.
22528
22529         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
22530         special shell magic here.
22531
22532 2001-09-16  Jim Meyering  <meyering@lucent.com>
22533
22534         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22535         * m4/jm-macros.m4: Require it.
22536
22537 2001-09-16  Jim Meyering  <meyering@lucent.com>
22538
22539         * lib/mkdir.c: New file.
22540
22541 2001-09-15  Jim Meyering  <meyering@lucent.com>
22542
22543         * m4/jm-macros.m4: Check for help2man.
22544
22545 2001-09-11  Jim Meyering  <meyering@lucent.com>
22546
22547         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22548         The body, by Paul Eggert, was moved here from configure.in.
22549         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22550
22551 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22552
22553         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22554         (jm_PREREQ): Use it.
22555
22556 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22557
22558         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22559         Use ssize_t, not int, to store result of readlink.
22560         Check for ssize_t overflow as well as size_t overflow,
22561         as POSIX says the result of readlink is implementation-defined
22562         when ssize_t overflows.
22563         Remove unnecessary cast to char*.
22564         Use free+malloc instead of realloc, as the storage doesn't need
22565         to be preserved and it's clearer and can be more efficient that way.
22566         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22567         * lib/xreadlink.h (xreadlink): Update prototype.
22568
22569 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22570
22571         * lib/xgetcwd.c: Revert some of the previous change; intead,
22572         fix the HAVE_GETCWD_NULL code to behave more like the
22573         !HAVE_GETCWD_NULL code used to.
22574
22575         Include "xalloc.h".
22576         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22577         invoke xalloc_die.
22578
22579 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22580
22581         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22582         sys/param.h, as pathmax.h includes them.
22583
22584 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22585
22586         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22587         (jm_PREREQ_XGETCWD): New macro.
22588
22589         * m4/getcwd.m4: New file.
22590
22591 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22592
22593         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22594         like the HAVE_GETCWD_NULL code.
22595         Include pathmax.h if not HAVE_GETCWD.
22596         Do not include xalloc.h.
22597         (INITIAL_BUFFER_SIZE): New symbol.
22598         Do not use xmalloc / xrealloc, since the caller is responsible for
22599         handling errors.  Preserve errno around `free' during failure.
22600         Do not overrun buffer when using getwd.
22601
22602 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22603
22604         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22605         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22606         getcwd (NULL, 0).
22607
22608 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22609
22610         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22611         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22612         spotted by Jim Meyering.
22613
22614 2001-09-03  Jim Meyering  <meyering@lucent.com>
22615
22616         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22617         failure.
22618
22619 2001-09-02  Jim Meyering  <meyering@lucent.com>
22620
22621         * lib/error.c: Update from GNU libc.
22622
22623 2001-09-01  Jim Meyering  <meyering@lucent.com>
22624
22625         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22626         Used by df.
22627
22628 2001-09-01  Jim Meyering  <meyering@lucent.com>
22629
22630         * lib/xreadlink.c: New file.
22631         * lib/xreadlink.h: New file.
22632         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22633         xreadlink.h.
22634
22635         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22636         doesn't conflict with sparc Solaris 7's definition in
22637         /usr/include/sys/int_types.h.
22638
22639         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22640         files.
22641         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22642         and strncasecmp as r-values.  Unixware didn't have declarations.
22643
22644 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22645
22646         * lib/xstrtol.h: Add copyright notice.
22647         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22648         LONGINT_INVALID_SUFFIX_CHAR.
22649
22650 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22651
22652         * lib/xstrtol.c (strtoimax): New decl.
22653
22654 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22655
22656         * lib/xgetcwd.c: Don't include pathmax.h.
22657         Include stdlib.h and unistd.h if available.
22658         Include xalloc.h.
22659         (xmalloc, xstrdup, free): Remove decls.
22660         (xgetcwd): Don't assume sizes fit in unsigned.
22661         Check for overflow when computing sizes.
22662         Simplify reallocation code.
22663
22664 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22665
22666         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22667         a directory's st_size can have an arbitrary value, so the old
22668         usage could waste an arbitrary amount of memory.  All uses
22669         changed.
22670         * lib/savedir.h: Update prototype.
22671
22672 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22673
22674         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22675
22676         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22677         old strtoimax.c.
22678
22679         Also, make the following further changes to make this file's
22680         configuration more similar to that of strtol.c:
22681         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22682         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22683         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22684         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22685         changed to signed values.
22686
22687         And make the following changes as well:
22688         Fix copyright notice, as 1999 was missing.
22689         (verify): New macro.
22690         (strtoimax): Check sizes at compile-time, not run-time.
22691         Prefer strtol to strtoll if both work.
22692         (main): Remove; it was not that useful and was a pain to maintain.
22693
22694         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22695
22696 2001-08-31  Jim Meyering  <meyering@lucent.com>
22697
22698         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22699         Use an initial, malloc'd, buffer of length 128 rather than
22700         a statically allocated one of length 1024.
22701
22702 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22703
22704         Simplify code, partly by assuming autoconf 2.52 semantics.
22705
22706         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22707
22708         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22709         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22710         All uses removed.
22711         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22712         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22713         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22714         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22715         jm_AC_HEADER_INTTYPES_H.
22716         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22717
22718         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22719
22720         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22721         Quote first arg of AC_DEFUN.
22722         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22723         since they are needed to parse the include file even if we need
22724         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22725         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22726         but with opposite signedness.
22727
22728 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22729
22730         Merge 'exclude' changes from tar 1.13.22.
22731         This fixes one or two unlikely storage allocation overflow bugs,
22732         but doesn't change user-visible behavior otherwise.
22733
22734 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22735
22736         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22737         (jm_PREREQ_EXCLUDE): New macro.
22738
22739 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22740
22741         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22742         tm to be declared.
22743
22744 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22745
22746         * lib/hash.c: Remove '2001' from copyright notice.
22747
22748 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22749
22750         * lib/full-write.h: New file.
22751         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22752         * lib/full-write.c: Correct credits, as cccp.c no longer
22753         exists and anyway it was so heavily changed from the old cccp
22754         code as to be unrecognizable.  Include full-write.h.
22755         (full_write) Return size_t, with short writes meaning failure.
22756         All callers changed.  This fixes a bug with large buffers
22757         on 64-bit hosts.
22758         * lib/utime.c: Include full-write.h.
22759
22760 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22761
22762         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22763         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22764         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22765         Include if available.
22766         (<xalloc.h>): Include
22767         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22768         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22769         collide with FNM macros.
22770         (struct patopts): New struct.
22771         (struct exclude): Use it, as exclude patterns now come with options.
22772         (new_exclude): Support above changes.
22773         (new_exclude, add_exclude_file):
22774         Initial size must now be a power of two to simplify overflow checking.
22775         (free_exclude, fnmatch_no_wildcards): New function.
22776         (excluded_filename): No longer requires options arg, as the options
22777         are determined by add_exclude.  Now returns bool, not int.
22778         (excluded_filename, add_exclude):
22779         Add support for the fancy new exclusion options.
22780         (add_exclude, add_exclude_file): Now takes int options arg.
22781         Check for arithmetic overflow when computing sizes.
22782         (add_exclude_file): xrealloc might modify errno, so don't
22783         realloc until after errno might be used.
22784
22785         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22786         New macros.
22787         (free_exclude): New decl.
22788         (add_exclude, add_exclude_file): Now takes int options arg.
22789         (excluded_filename): No longer requires options arg, as the options
22790         are determined by add_exclude.  Now returns bool, not int.
22791
22792 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22793
22794         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22795
22796 2001-08-27  Jim Meyering  <meyering@lucent.com>
22797
22798         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
22799
22800         * lib/version-etc.c (N_): Remove definition.
22801         Revert most of last change.
22802         Instead, simply don't mark the `Copyright...' string for translation.
22803         Based on advice from Paul Eggert.
22804
22805         * lib/strtoxmax.c: Tweak comment.
22806
22807 2001-08-26  Jim Meyering  <meyering@lucent.com>
22808
22809         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
22810
22811         * m4/xstrtoimax.m4: New file.
22812         * m4/xstrtoumax.m4: Add comments explaining why we
22813         AC_REPLACE_FUNCS(strtol).
22814
22815 2001-08-26  Jim Meyering  <meyering@lucent.com>
22816
22817         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
22818         of copyright with `%s' so translators don't get an untranslated
22819         message in 2002.
22820         (COPYRIGHT_YEAR): Define.
22821         (version_etc): Use fprintf rather than fputs.
22822         Suggestion from Ulrich Drepper.
22823
22824         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
22825
22826         * lib/strtoll.c: New file, from GNU libc.
22827         * lib/xstrtoimax.c: New file.
22828
22829         * lib/xstrtol.h: Add xstrtoimax.
22830         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
22831         * lib/strtoimax.c: New file.  Likewise, but first define
22832         STRTOUXMAX_SIGNED.
22833
22834         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
22835         ...
22836         * lib/strtoxmax.c: ... then renamed to this.
22837
22838 2001-08-18  Paul Eggert  <eggert@twinsun.com>
22839
22840         * m4/inttypes.m4: Add AC_PREREQ(2.13).
22841         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
22842         (jm_AC_TYPE_INTMAX_T): New macro.
22843         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
22844
22845         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
22846
22847         * m4/longlong.m4: Renamed from ulonglong.m4.
22848         * m4/inttypes.m4: Renamed from inttypes_h.m4.
22849         * m4/uintmax_t.m4: Removed.
22850
22851 2001-08-13  Paul Eggert  <eggert@twinsun.com>
22852
22853         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
22854         Port to Solaris 8, where 'sed' requires a space after the 'r'
22855         command, and where sh dislikes "$/".  Clean up the spacing a bit.
22856         Redirect output to $tmp just once.
22857
22858 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
22859
22860         * lib/addext.c (<errno.h>): Include.
22861         (errno): Declare if not defined.
22862         (addext): Work correctly when pathconf returns -1 and leaves
22863         errno alone because there is no limit.  Also, work even if
22864         pathconf returns a value greater than SIZE_MAX.
22865
22866 2001-08-12  Jim Meyering  <meyering@lucent.com>
22867
22868         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
22869         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
22870         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
22871         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
22872         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
22873         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
22874         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
22875         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
22876         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
22877         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
22878         utime.m4, utimes.m4, xstrtoumax.m4:
22879         Quote the first argument in each use of AC_DEFUN.
22880
22881 2001-08-12  Jim Meyering  <meyering@lucent.com>
22882
22883         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
22884         Simply `return getcwd (NULL, 0);'.
22885         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
22886         Use 1300 as initial value for length, not PATH_MAX.
22887
22888         * lib/pathmax.h: Clean up cpp syntax.
22889
22890 2001-08-12  Jim Meyering  <meyering@lucent.com>
22891
22892         * lib/gettimeofday.c: New file.
22893         * lib/gtod.h: New file.
22894         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
22895
22896 2001-08-05  Jim Meyering  <meyering@lucent.com>
22897
22898         * m4/jm-macros.m4: Require autoconf-2.52.
22899
22900 2001-08-04  Jim Meyering  <meyering@lucent.com>
22901
22902         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
22903         stmt, to get in sync with glibc.
22904
22905 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22906
22907         The following changes are from gettext 0.10.39 as maintained by
22908         Bruno Haible.
22909
22910         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
22911         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
22912         with inverted sense.  All uses changed.
22913
22914         * lib/mbswidth.c: Don't include <limits.h>.
22915         Include <stdlib.h> and <string.h> unconditionally.
22916         (iswcntrl, mbsinit, ISCNTRL): New macros.
22917         (mbsnwidth): Use K&R style function declarations.
22918         Don't bother checking for MB_LEN_MAX == 1, since the compiler
22919         can optimize it when MB_CUR_MAX == 1.
22920         The width of control characters is zero, not 1.
22921
22922 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22923
22924         The following changes are from gettext 0.10.39 as maintained by
22925         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
22926
22927         * m4/codeset.m4: Upgrade to serial AM1.
22928         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
22929         all uses changed.  Quote first arg of AC_DEFUN.
22930         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
22931
22932         * m4/iconv.m4: Upgrade to serial AM2.
22933         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
22934         Add --with-libconv-prefix.
22935         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
22936         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
22937         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
22938         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
22939         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
22940
22941         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
22942         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
22943         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
22944         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
22945         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
22946         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
22947         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
22948         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
22949         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
22950
22951         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
22952         string.h any more.
22953
22954         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
22955         not the default value.
22956
22957         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
22958         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
22959         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
22960         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
22961         Also check for iswcntrl, used for wcwidth fallback.
22962         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
22963         to Autoconf 2.13.
22964
22965 2001-08-03  Jim Meyering  <meyering@lucent.com>
22966
22967         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
22968         as it was in the original.  Reported by Paul Eggert.
22969
22970 2001-07-16  Jim Meyering  <meyering@lucent.com>
22971
22972         * m4/gettimeofday.m4: New file.
22973         Prompted by a report from Bernhard Baehr.
22974
22975 2001-07-15  Jim Meyering  <meyering@lucent.com>
22976
22977         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
22978         stuff. Now it's in ../Makefile.cfg.
22979
22980 2001-07-15  Jim Meyering  <meyering@lucent.com>
22981
22982         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
22983         (BUILT_SOURCES): Add unlocked-io.h.
22984         (io_functions): Define.
22985         (unlocked-io.h): New rule.
22986         (DISTCLEANFILES): Add unlocked-io.h.
22987         (all-local): Depend on unlocked-io.h, to ensure it is created.
22988
22989         * lib/unlocked-io.hin: New file
22990
22991         * lib/regex.c: Update from glibc.
22992
22993 2001-07-05  Jim Meyering  <meyering@lucent.com>
22994
22995         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
22996         recommendation.
22997         (libfetish_a_SOURCES): Put all .h files here instead.
22998         Remove a thus-exposed (better checks in automake) duplicate and
22999         two unnecessary .h files.
23000
23001 2001-07-04  Jim Meyering  <meyering@lucent.com>
23002
23003         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
23004         that generates jm-glibc-io.m4 so that it doesn't trigger any make
23005         distcheck failure.
23006
23007 2001-07-02  Jim Meyering  <meyering@lucent.com>
23008
23009         The following changes were prompted by suggestions from Bruno Haible.
23010
23011         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
23012         is now generated.
23013         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
23014         definition of EXTRA_DIST.
23015         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
23016         ensure that the generated file is created/updated whenever the list
23017         of $(unlocked_functions) is changed.
23018         (jm-glibc-io.m4): New rule.
23019         (unlocked-io.h): New rule -- currently unused.
23020
23021 2001-06-24  Jim Meyering  <meyering@lucent.com>
23022
23023         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
23024         unmatched right bracket, rather than kludging it with an extra,
23025         falsely-matching quote in a comment.  Patch by Akim Demaille.
23026
23027 2001-06-11  Jim Meyering  <meyering@lucent.com>
23028
23029         * lib/regex.c: Update from GNU libc.
23030
23031 2001-05-27  Jim Meyering  <meyering@lucent.com>
23032
23033         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
23034         Check for ut_type in struct utmp.
23035
23036 2001-05-27  Jim Meyering  <meyering@lucent.com>
23037
23038         * lib/readutmp.h (UT_TYPE): Define.
23039
23040 2001-05-24  Jim Meyering  <meyering@lucent.com>
23041
23042         * lib/argmatch.c: Include "quote.h".
23043         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
23044         quote function.  Reported by Göran Uddeborg.
23045
23046 2001-05-22  Jim Meyering  <meyering@lucent.com>
23047
23048         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23049         now that we use the package-supplied version unconditionally.
23050         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23051
23052 2001-05-21  Jim Meyering  <meyering@lucent.com>
23053
23054         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23055         shell syntax errors.
23056
23057 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23058
23059         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23060
23061 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23062
23063         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23064         Don't bother to check library strftime, since
23065         we'll be using our own my_strftime function anyway.
23066         Define my_strftime instead of strftime.
23067
23068 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23069
23070         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23071         which is not yet declared.
23072
23073 2001-05-15  Jim Meyering  <meyering@lucent.com>
23074
23075         * m4/regex.m4: Use proper quoting so brackets appear in the test
23076         program.
23077         Reported by, and with help from, Bruno Haible.
23078
23079 2001-05-13  Jim Meyering  <meyering@lucent.com>
23080
23081         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23082         undefined.
23083
23084 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23085
23086         dirname code cleanup.  base_name now behaves more compatibly
23087         with POSIX basename when given file names that have trailing
23088         slashes, and similarly for dir_name.  Add new primitives
23089         base_len and dir_len.  Put the directory-name-related decls
23090         into dirname.h.
23091
23092         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
23093         * lib/backupfile.c (base_name): Likewise.
23094         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
23095         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
23096         * lib/makepath.c (strip_trailing_slashes): Likewise.
23097         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
23098         ISSLASH): Likewise.
23099         * lib/rename.c (strip_trailing_slashes): Likewise.
23100         * lib/same.c (base_name): Likewise.
23101         * lib/stripslash.c (ISSLASH): Likewise.
23102
23103         * lib/addext.c: Include <dirname.h> after size_t is defined.
23104         * lib/backupfile.c: Likewise.
23105
23106         * lib/addext.c (addext): Use base_len to trim redundant
23107         trailing slashes instead of doing it ourselves.
23108         But do not trim the last slash if it is not redundant.
23109
23110         * lib/backupfile.c (find_backup_file_name,
23111         max_backup_version): Use base_len instead of rolling it ourselves.
23112         Handle the case of "" and (on DOS) "C:" correctly.
23113
23114         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
23115         needed. Include <string.h>, <dirname.h>.
23116         (base_name): Allow file names ending in slashes, other than names
23117         that are all slashes.  In this case, return the basename followed
23118         by the slashes.  This is more general, and can be used in places
23119         where the original base_name purposely had an assertion failure.
23120         (base_len): New function.
23121
23122         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
23123         Do not include <assert.h>; no longer needed.
23124         Include xalloc.h.
23125         (memrchr): Remove decl.
23126         (dir_name_r): Remove.
23127         (dir_len): Renamed from dirlen.  All callers changed.
23128         Rewrite in terms of base_name, for simplicity and consistency.
23129         (dir_name): Never return NULL.  All callers changed.
23130         Do not include <stdlib.h> in test program; no longer needed.
23131         return 0; is fine for test program.
23132
23133         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
23134         New macros.
23135         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
23136
23137         * lib/path-concat.c (path_concat): Use base_len to compute
23138         base length, not strlen; this means we cannot rely on memcpy
23139         to null-terminate.
23140
23141         * lib/same.c (STREQ): Remove.
23142         (same_name): Handle the case where the basename ends in trailing '/'.
23143
23144         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
23145         a slash was stripped.  Do not strip the last slash after a
23146         file system prefix.
23147
23148 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23149
23150         * lib/Makefile.am (libfetish_a_SOURCES):
23151         Add strftime.c, since we now compile it on all hosts.
23152
23153         * lib/strftime.c (my_strftime):
23154         Define to nstrftime if emacs, but only if my_strftime is not defined.
23155         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
23156         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
23157         Add one more extra argument: a nanoseconds value.
23158         All uses changed.
23159         (ns): New macro.
23160         (my_strftime function): Add %N format.
23161         (emacs_strftimeu): Renamed from emacs_strftime,
23162         with extra ut argument.
23163
23164 2001-05-09  Paul Eggert  <eggert@twinsun.com>
23165
23166         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
23167
23168 2001-04-21  Jim Meyering  <meyering@lucent.com>
23169
23170         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
23171         doesn't interfere.
23172
23173 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23174
23175         * m4/ftruncate.m4: Check for chsize.
23176         Link with ftruncate.o unconditionally if ftruncate is missing.
23177         This was required when cross-compiling to i586-mingw32msvc.
23178
23179 2001-04-08  Jim Meyering  <meyering@lucent.com>
23180
23181         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
23182         recomputed; that's necessary when the offset spans a DST transition.
23183         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
23184
23185 2001-04-02  Jim Meyering  <meyering@lucent.com>
23186
23187         * lib/regex.h, regex.c: Update from GNU libc.
23188
23189 2001-03-24  Jim Meyering  <meyering@lucent.com>
23190
23191         * m4/jm-macros.m4: Require autoconf-2.49d.
23192
23193 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
23194
23195         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
23196
23197 2001-03-19  Paul Eggert  <eggert@twinsun.com>
23198
23199         * lib/version-etc.c (version_etc_copyright): Update to 2001.
23200
23201 2001-03-17  Jim Meyering  <meyering@lucent.com>
23202
23203         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
23204         now that the version in autoconf is equivalent.
23205         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
23206
23207         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
23208         Suggestion from Akim Demaille.
23209
23210         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
23211         (jm_PREREQ_TEMPNAME): New function.
23212
23213 2001-03-16  Paul Eggert  <eggert@twinsun.com>
23214
23215         * lib/tempname.c (uint64_t): Define to uintmax_t if
23216         not defined, and if UINT64_MAX is not defined.
23217         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
23218         Reported by John David Anglin.
23219
23220 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
23221
23222         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
23223         resolve alias if codeset is empty.
23224         * lib/config.charset (BeOS): Use wildcard syntax.
23225
23226 2001-03-13  Jim Meyering  <meyering@lucent.com>
23227
23228         * lib/path-concat.c (path_concat)
23229         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
23230         concatenating e.g., `C:' and `foo'.
23231         From Bruno Haible.
23232
23233 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23234
23235         * lib/localcharset.c (locale_charset): Don't use
23236         setlocale(LC_CTYPE,NULL). Don't return NULL.
23237         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
23238
23239 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23240
23241         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
23242         support for DOS/DJGPP.
23243
23244 2001-03-01  Paul Eggert  <eggert@twinsun.com>
23245
23246         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
23247         lacks mkstemp.  Compile our own tempname.c if we compile our own
23248         mkstemp.c, as mkstemp relies on tempname.
23249
23250 2001-03-01  Jim Meyering  <meyering@lucent.com>
23251
23252         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
23253         AH_VERBATIM really does output its argument verbatim.
23254
23255 2001-02-28  Paul Eggert  <eggert@twinsun.com>
23256
23257         * lib/Makefile.am (libfetish_a_SOURCES):
23258         Add dup-safer.c, fopen-safer.c.
23259         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
23260
23261         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
23262         * lib/unistd-safer.h: New files.
23263
23264 2001-02-25  Paul Eggert  <eggert@twinsun.com>
23265
23266         The mkstemp replacement is taken from glibc 2.2.2, with some
23267         portability fixes for use outside glibc, as follows:
23268
23269         * lib/tempname.c (struct_stat64): New macro.
23270         (direxists, __gen_tempname): Use it.
23271         This avoids a portability problem with Solaris 8.
23272
23273         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
23274         (<stddef.h>, <stdint.h>, <string.h>):
23275         Include only if STDC_HEADERS || _LIBC.
23276         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
23277         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
23278         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
23279         (__set_errno): Define this macro if <errno.h> doesn't.
23280         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
23281         Define these macros if <stdio.h> doesn't.
23282         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
23283         Define these macros if <sys/stat.h>
23284         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
23285         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
23286         __xstat64): Define if not _LIBC.
23287         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
23288         (__gen_tempname): Invoke gettimeofday only if
23289         HAVE_GETTIMEOFDAY || _LIBC;
23290         otherwise, fall back on plain "time".
23291         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
23292
23293         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
23294
23295         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
23296
23297 2001-02-18  Paul Eggert  <eggert@twinsun.com>
23298
23299         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
23300
23301 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23302
23303         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
23304         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
23305         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
23306         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23307
23308 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23309
23310         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
23311         Remove workaround macros for hosts that have mbrtowc but not
23312         mbstate_t, as we now insist on proper declarations for both
23313         before using mbrtowc.
23314
23315 2001-02-17  Jim Meyering  <meyering@lucent.com>
23316
23317         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
23318         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23319         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23320         UnixWare 7.1.1.
23321
23322         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23323         rather than AC_CACHE_VAL.
23324
23325 2001-02-17  Jim Meyering  <meyering@lucent.com>
23326
23327         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23328         around included file name.
23329
23330         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23331
23332         * lib/strftime.c: Update from GNU libc (the only changes were to
23333         comments).
23334
23335 2001-02-17  Jim Meyering  <meyering@lucent.com>
23336
23337         * lib/regex.c: Update from libc.
23338
23339 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23340
23341         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23342         clash.
23343
23344 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23345
23346         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23347         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23348         Reported by Mark Hounschell via Paul Eggert.
23349
23350 2001-02-07  Jim Meyering  <meyering@lucent.com>
23351
23352         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23353
23354 2001-02-05  Jim Meyering  <meyering@lucent.com>
23355
23356         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23357         it includes the patch required for `large file' support with at least
23358         HP-UX's 10.20 /bin/cc.
23359
23360 2001-02-03  Jim Meyering  <meyering@lucent.com>
23361
23362         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23363         AS_IF, now that it works once again (mysteriously).
23364         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23365
23366 2001-01-30  Jim Meyering  <meyering@lucent.com>
23367
23368         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23369         * m4/chown.m4: Rename conftestchown to conftest.chown.
23370         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23371         s/conftestdir2/conftest.d2/.
23372         * m4/utimes.m4: s/conftestdata/conftest.data/
23373         Inspired by Pavel Roskin's change in autoconf.
23374
23375 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23376
23377         * lib/config.charset: Update for FreeBSD 4.2.
23378
23379 2001-01-27  Jim Meyering  <meyering@lucent.com>
23380
23381         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23382         a use of AS_IF.
23383         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23384
23385 2001-01-26  Jim Meyering  <meyering@lucent.com>
23386
23387         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23388         quotearg.c includes it.
23389
23390 2001-01-26  Jim Meyering  <meyering@lucent.com>
23391
23392         * lib/quotearg.c: Include stddef.h.
23393         * lib/quote.c: Include stddef.h.
23394         Reported by Axel Kittenberger.
23395
23396         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23397         line in double quotes so that it evokes a better diagnostic.
23398         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23399         Reported by Axel Kittenberger.
23400
23401 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23402
23403         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23404         as if it was a `charset'.
23405
23406 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23407
23408         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23409         has const.
23410
23411 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23412
23413         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23414         to avoid a warning.  Add back 'const' to inptr.
23415
23416 2001-01-20  Jim Meyering  <meyering@lucent.com>
23417
23418         Be sure that headers are checked before used in code compiled
23419         for the type checks.
23420         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23421         In place of that, invoke jm_CHECK_ALL_TYPES.
23422         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23423         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23424         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23425         The check for ssize_t was mistakenly run before the test for unistd.h.
23426
23427         The configure-time check for stdbool.h was missing.
23428         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23429         (jm_PREREQ_HASH): New function.
23430
23431 2001-01-17  Jim Meyering  <meyering@lucent.com>
23432
23433         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23434         for autoconf-2.49c.
23435         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23436
23437 2001-01-16  Jim Meyering  <meyering@lucent.com>
23438
23439         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23440         From Bruno Haible.
23441
23442 2001-01-14  Jim Meyering  <meyering@lucent.com>
23443
23444         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23445         foo and bar.  Create conftestdir/ in the script, not in the C code.
23446         Remove directories in the script, not in the C code.
23447         Remove conftestdir{,2} before trying to create the directory.
23448         Make the entire configure script fail if the mkdir fails.
23449
23450 2001-01-14  Jim Meyering  <meyering@lucent.com>
23451
23452         * lib/rename.c: New file.  From Volker Borchert.
23453         Include stdlib.h, string.h or strings.h, and xalloc.h.
23454         Use strip_trailing_slashes rather than open-coding it.
23455
23456 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23457
23458         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
23459
23460 2001-01-03  Jim Meyering  <meyering@lucent.com>
23461
23462         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
23463         of local `inptr' to avoid warning with some system declarations of
23464         iconv.
23465
23466 2001-01-02  Volker Borchert  <bt@teknon.de>
23467
23468         * m4/rename.m4: New file.
23469         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23470
23471 2001-01-01  Jim Meyering  <meyering@lucent.com>
23472
23473         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23474         even on systems with utmpx.h.  It's necessary for the declaration of
23475         utmp's ut_user member.  Reported by Andreas Jaeger.
23476
23477         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23478         available. They are required for the declarations of getgrgid and
23479         getpwuid resp.
23480         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23481         Reported by Andreas Jaeger.
23482
23483 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
23484
23485         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
23486         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
23487         so `make install' also works in VPATH builds.
23488
23489 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
23490
23491         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
23492         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
23493         can be used in subdirectories.
23494
23495 2000-12-29  Paul Eggert  <eggert@twinsun.com>
23496
23497         * lib/modechange.c: Do not assume that mode_t uses the
23498         traditional octal encoding.  E.g. "chmod 1 FOO" should set
23499         the other-execute bit of FOO even if S_IXOTH != 1.
23500
23501         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23502         WOTH, XOTH, ALLM): New macros.
23503         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
23504          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
23505         Use them.
23506         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
23507         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
23508         (mode_compile):
23509         No need to use uintmax_t; unsigned long is long enough.
23510         Don't bother to get suffix since we don't use it.
23511
23512 2000-12-26  Jim Meyering  <meyering@lucent.com>
23513
23514         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
23515         better with autoheader.
23516
23517 2000-12-24  Jim Meyering  <meyering@lucent.com>
23518
23519         * lib/hash.c (is_prime): Return explicit boolean values.
23520         (hash_get_first): Return NULL to appease Irix5.6's 89.
23521         Reported by Nelson Beebe.
23522
23523 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
23524
23525         * lib/localcharset.c (locale_charset): Add support for Win32.
23526
23527 2000-12-18  Paul Eggert  <eggert@twinsun.com>
23528
23529         * lib/physmem.h, lib/physmem.c: New files.
23530
23531         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23532         (noinst_HEADERS): Add physmem.h.
23533
23534         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23535         't' for compatibility with Solaris 8 sort.
23536
23537 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23538
23539         * lib/config.charset: Add support for BeOS.
23540
23541 2000-12-17  Jim Meyering  <meyering@lucent.com>
23542
23543         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23544         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23545
23546 2000-12-16  Jim Meyering  <meyering@lucent.com>
23547
23548         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23549         N and M) would have treated it like `chown N:N FILE'.
23550
23551         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23552
23553 2000-12-16  Jim Meyering  <meyering@lucent.com>
23554
23555         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23556         SHELLS_FILE to a file name that's useful on djgpp systems.
23557         Include stdlib.h.
23558         (ADDITIONAL_DEFAULT_SHELLS): Define.
23559         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23560         Based mostly on a patch from Prashant TR.
23561
23562 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23563
23564         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23565         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23566         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23567
23568 2000-12-08  Andreas Schwab  <schwab@suse.de>
23569
23570         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23571         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23572
23573 2000-12-07  Jim Meyering  <meyering@lucent.com>
23574
23575         * lib/stripslash.c (ISSLASH): Define.
23576         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23577         `/'.
23578         From Prashant TR.
23579
23580         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23581         (dir_name_r): Declare this function as static.
23582         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23583         manifest itself on a name containing a mix of slashes and
23584         backslashes.
23585         Make this function work with names starting with a DOS-style
23586         drive letter and colon prefix.
23587         (dir_name): Append `.' if necessary.
23588         Based mostly on patches from Prashant TR and Eli Zaretskii.
23589
23590         * lib/dirname.h (dir_name_r): Remove prototype.
23591
23592 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23593
23594         * m4/off_t-format.m4: Remove this file.
23595         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23596
23597 2000-12-06  Jim Meyering  <meyering@lucent.com>
23598
23599         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23600         replacement strtoull, we may well need the replacement strtoul, too.
23601         Check for declarations of strtoul and strtoull.
23602         Check for strtol.  Mainly as a cue to cause automake to include
23603         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23604         Check for limits.h -- strtol.c needs it.
23605
23606 2000-12-05  Jim Meyering  <meyering@lucent.com>
23607
23608         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23609
23610 2000-12-04  Jim Meyering  <meyering@lucent.com>
23611
23612         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23613         Also include memory.h, stdlib.h, unistd.h if appropriate.
23614         Reported by Andreas Jaeger (conflicting declaration of malloc).
23615
23616 2000-12-02  Jim Meyering  <meyering@lucent.com>
23617
23618         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23619         * m4/jm-macros.m4 (jm_MACROS): require it.
23620
23621 2000-12-02  Jim Meyering  <meyering@lucent.com>
23622
23623         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23624
23625 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23626
23627         * lib/memrchr.c: Include <config.h> before any system include file.
23628
23629 2000-11-30  Jim Meyering  <meyering@lucent.com>
23630
23631         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23632
23633 2000-11-30  Jim Meyering  <meyering@lucent.com>
23634
23635         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23636
23637 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23638
23639         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23640
23641 2000-11-26  Jim Meyering  <meyering@lucent.com>
23642
23643         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23644
23645 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23646
23647         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23648         size of (size_t) -1; it's not portable.
23649
23650 2000-11-17  Jim Meyering  <meyering@lucent.com>
23651
23652         * lib/strstr.c: Update from GNU libc.
23653
23654 2000-11-17  Akim Demaille  <akim@epita.fr>
23655
23656         * lib/obstack.h: Formatting changes.
23657         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23658         prevent type checking.
23659         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23660         cast the value to (void *): assigning a `foo *' to a `void *'
23661         variable is valid.
23662         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23663
23664 2000-11-16  Jim Meyering  <meyering@lucent.com>
23665
23666         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23667
23668 2000-11-11  Jim Meyering  <meyering@lucent.com>
23669
23670         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23671
23672 2000-11-10  Jim Meyering  <meyering@lucent.com>
23673
23674         * lib/obstack.h: Update from GNU libc.
23675         * lib/obstack.c: Likewise.
23676
23677 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23678
23679         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23680
23681 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23682
23683         * lib/getusershell.c (setusershell): Use rewind rather than
23684         fseek/fseeko, to avoid configuration hassles with fseeko.
23685         Don't bother opening SHELLS_FILE if shellstream is NULL;
23686         it's not necessary.
23687
23688 2000-11-05  Jim Meyering  <meyering@lucent.com>
23689
23690         * lib/makepath.h (make_dir): Declare.
23691         * lib/makepath.c (make_dir): Remove `static' attribute.
23692         Tweak a comment.
23693
23694 2000-11-04  Jim Meyering  <meyering@lucent.com>
23695
23696         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23697
23698 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23699
23700         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23701         last one in a bucket, advance to the next bucket.
23702
23703 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23704
23705         * lib/fnmatch.c: Do not comment out all the code if we are using
23706         the GNU C library, because in some cases we are replacing buggy
23707         code in the GNU C library itself.
23708
23709 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23710
23711         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23712         (regex_compile): Catch bogus \(\1\).
23713
23714 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23715
23716         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23717         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23718         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23719
23720 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23721
23722         * lib/error.h, getline.h, modechange.h:
23723         Remove "2000" from Copyright line, as the file hasn't been
23724         changed this year other than in the copyright notice.
23725
23726         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23727         was changed this year.
23728
23729 2000-10-29  Jim Meyering  <meyering@lucent.com>
23730
23731         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23732         renaming.
23733         * m4/ls-mntd-fs.m4: Likewise
23734
23735 2000-10-29  Jim Meyering  <meyering@lucent.com>
23736
23737         * lib/xstat.in: Fix grammar in comment.
23738
23739 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23740
23741         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23742         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23743         doesn't define __restrict_arr.
23744
23745 2000-10-28  Jim Meyering  <meyering@lucent.com>
23746
23747         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23748         (jm_PREREQ_MEMCHR): New function.
23749
23750 2000-10-28  Jim Meyering  <meyering@lucent.com>
23751
23752         * lib/memchr.c: Update from libc.
23753         Adjust for portability:
23754         [HAVE_STDLIB_H]: Include stdlib.h.
23755         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23756         Undef __memchr, too.
23757         [!weak_alias]: Define __memchr to memchr.
23758
23759         * lib/regex.c: Update from libc.
23760         * lib/regex.h: Likewise.
23761         * lib/getopt1.c: Likewise.
23762         * lib/memcmp.c: Likewise.
23763
23764         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23765         Avoid using fseek, when possible -- it's broken by design.
23766         Patch by Ulrich Drepper.
23767
23768 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23769
23770         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23771         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23772         Giving in to popular pressure to shut up the compiler with casts.
23773
23774 2000-10-26  Jim Meyering  <meyering@lucent.com>
23775
23776         * lib/strftime.c: Update from libc.
23777
23778 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23779
23780         * regex.c: More `unsigned char' -> `re_char' changes.
23781         Also change several `int' into `re_wchar_t'.
23782         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23783         (PUSH_FAILURE_POINTER): Don't cast any more.
23784         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23785         We want GCC to complain, since this piece of code makes
23786         re_match non-reentrant, which *should* be fixed.
23787         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23788         (EXTEND_BUFFER): Use RETALLOC.
23789         (SET_LIST_BIT): Don't cast.
23790         (re_wchar_t): New type.
23791         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23792         that those two functions will always properly return.
23793         (IMMEDIATE_QUIT_CHECK): Cast to void.
23794         (analyse_first): Use recursion rather than an explicit stack.
23795         (re_compile_fastmap): Can't fail anymore.
23796         (re_search_2): Don't check re_compile_fastmap for failure.
23797         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
23798         Now also sets the new value (passed in a new argument).
23799         (re_match_2_internal): Use it.
23800         Also, use a new var `reg' of type size_t when looping through regs
23801         rather than reuse the inappropriate `mcnt'.
23802
23803 2000-10-25  Jim Meyering  <meyering@lucent.com>
23804
23805         * lib/obstack.c: Update from libc.
23806
23807 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
23808
23809         * regex.c (regex_compile): Change the way of handling a range from
23810         a char less than 256 to a char not less than 256.
23811
23812 2000-10-24  Andrew Innes  <andrewi@gnu.org>
23813
23814         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
23815         NT-Emacs only.
23816         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
23817         so that re_search functions only quit when callers expect them to.
23818
23819 2000-10-23  Jim Meyering  <meyering@lucent.com>
23820
23821         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
23822         wrong.  That set_locale call must not have any side effects.
23823         From Paul Eggert.
23824
23825 2000-10-22  Jim Meyering  <meyering@lucent.com>
23826
23827         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
23828         [CYCLIC]: Remove now-unused definition.
23829
23830         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
23831         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
23832         Suggestion from Ulrich Drepper.
23833
23834 2000-10-21  Jim Meyering  <meyering@lucent.com>
23835
23836         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
23837         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
23838         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
23839
23840 2000-10-21  Jim Meyering  <meyering@lucent.com>
23841
23842         * lib/dirname.c (memrchr): Declare if necessary.
23843         (dir_name): Remove the restriction that there be no
23844         trailing slashes.  Now, this code skips past them, effectively
23845         ignoring them.
23846         [TEST_DIRNAME] (main): New unit tests.
23847
23848         * lib/memrchr.c: New file from GNU libc.
23849         Undef __memrchr, too.
23850         [!weak_alias]: Define __memrchr to memrchr.
23851         Guard weak_alias use with `#ifdef weak_alias'.
23852
23853 2000-10-21  Jim Meyering  <meyering@lucent.com>
23854
23855         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
23856         (dir_name): Use dir_name_r.
23857         * lib/dirname.h (dir_name_r): Declare it.
23858
23859 2000-10-17  Jim Meyering  <meyering@lucent.com>
23860
23861         * lib/quote.h (PARAMS): Define and use.
23862         Reported by Akim Demaille.
23863
23864         * lib/getopt.c: Update from libc.
23865
23866 2000-10-16  Jim Meyering  <meyering@lucent.com>
23867
23868         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
23869         setlocale.
23870         From Jan Fedak.
23871
23872 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
23873
23874         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
23875
23876 2000-09-25  Jim Meyering  <meyering@lucent.com>
23877
23878         * lib/md5.h (rol): Define (from GnuPG).
23879
23880         * lib/sha.c: Give credit (GnuPG) where due.
23881         (M): Use rol rather than open-coding it.
23882         Add a FIXME comment.
23883
23884 2000-09-21  Jim Meyering  <meyering@lucent.com>
23885
23886         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
23887         Reported by Michael Stone.
23888
23889 2000-09-20  Jim Meyering  <meyering@lucent.com>
23890
23891         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
23892         (noinst_HEADERS): Add sha.h.
23893         Based on code from Scott G. Miller and from GnuPG.
23894
23895 2000-09-18  Jim Meyering  <meyering@lucent.com>
23896
23897         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
23898         LIBS. Otherwise, everyone ends up linking with -lelf for some
23899         configurations.
23900         Reported by Mike Stone.
23901
23902 2000-09-15  Jim Meyering  <meyering@lucent.com>
23903
23904         * lib/regex.c: Update from libc.
23905
23906 2000-09-10  Jim Meyering  <meyering@lucent.com>
23907
23908         * lib/getopt.c (_getopt_internal): Update from glibc.
23909
23910 2000-09-09  Jim Meyering  <meyering@lucent.com>
23911
23912         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
23913         think it should be used as a general replacement for isascii.
23914         * lib/fnmatch.c: Likewise.
23915         * lib/mbswidth.c: Likewise
23916         * lib/regex.c: Likewise.
23917
23918         Don't use atoi.
23919         * lib/userspec.c: Include sys/param.h and limits.h.
23920         Include xstrtol.h.
23921         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23922         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
23923         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
23924         UID, GID.  Check range.
23925
23926 2000-09-06  Jim Meyering  <meyering@lucent.com>
23927
23928         * lib/getopt.c (_getopt_internal): Update from glibc.
23929
23930 2000-08-30  Jim Meyering  <meyering@lucent.com>
23931
23932         * lib/strftime.c: Merge in changes from GNU libc.
23933
23934 2000-08-26  Jim Meyering  <meyering@lucent.com>
23935
23936         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
23937         * m4/fpending.m4: New file.
23938
23939 2000-08-26  Jim Meyering  <meyering@lucent.com>
23940
23941         * lib/closeout.c: Include "__fpending.h".
23942         (close_stdout_status): Return right away if there's nothing to flush.
23943
23944         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
23945         * lib/__fpending.c: New file.
23946         * lib/__fpending.h: New file.
23947
23948 2000-08-20  Jim Meyering  <meyering@lucent.com>
23949
23950         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
23951         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
23952         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
23953
23954 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
23955
23956         Improve fileutils installation on systems where running
23957         programs (like install) can't be unlinked.
23958         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
23959         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
23960
23961 2000-08-07  Paul Eggert  <eggert@twinsun.com>
23962
23963         Standardize on "memory exhausted" instead of "Memory exhausted"
23964         or "virtual memory exhausted".
23965         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
23966         "virtual memory exhausted".
23967         * lib/same.c (same_name): Invoke xalloc_die instead of printing
23968         our own message.
23969         * lib/userspec.c (parse_user_spec): Likewise.
23970         * lib/bumpalloc.h: comment fix
23971         * lib/same.c, userspec.c: Include xalloc.h.
23972
23973         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
23974         not char *const and pointing to a constant array.
23975         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
23976         (xrealloc): Comment fix.
23977
23978         * lib/userspec.c (parse_user_spec):
23979         Don't translate a message until just before returning,
23980         to avoid unnecessary translation.
23981
23982 2000-08-07  Jim Meyering  <meyering@lucent.com>
23983
23984         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
23985         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
23986         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
23987         getgroups.c, gethostname.c, getopt.h, group-member.c,
23988         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
23989         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
23990         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
23991         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
23992         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
23993         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
23994         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
23995         yesno.c: Back out Copyright date changes for each file with no change
23996         this year.  This eases coordination with other programs using the same
23997         source code modules.  From Paul Eggert.
23998
23999 2000-08-06  Paul Eggert  <eggert@twinsun.com>
24000
24001         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
24002         not char, for compatibility with glibc 2.1.3 strftime.c.
24003
24004 2000-08-03  Greg McGary  <greg@mcgary.org>
24005
24006         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
24007         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
24008         (EXTEND_BUFFER): Use them.
24009
24010 2000-08-01  Jim Meyering  <meyering@lucent.com>
24011
24012         * lib/dirname.c (ISSLASH): Define.
24013         (BACKSLASH_IS_PATH_SEPARATOR): Define.
24014         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
24015         both `\' and `/' may be use as path separators.
24016         Based on a patch from Prashant TR.
24017
24018 2000-07-31  Paul Eggert  <eggert@twinsun.com>
24019
24020         * lib/quotearg.c (quotearg_n_options): Don't make the initial
24021         slot vector a constant, since it might get modified.
24022
24023 2000-07-31  Jim Meyering  <meyering@lucent.com>
24024
24025         * lib/xmalloc.c: Use `virtual memory exhausted', not
24026         `Memory exhausted'.
24027         * lib/obstack.c (print_and_abort): Likewise.
24028
24029 2000-07-30  Paul Eggert  <eggert@twinsun.com>
24030
24031         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
24032         buffer, so that the caller can always quote one small
24033         component of a "memory exhausted" message in slot 0.
24034         From a suggestion by Jim Meyering.
24035
24036 2000-07-30  Jim Meyering  <meyering@lucent.com>
24037
24038         * lib/makepath.c (make_path): Quote the other instance, too.
24039
24040         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
24041         (STATIC_BUF_SIZE): Define.
24042         (quotearg_n_options): Use only statically allocated storage when
24043         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
24044         than STATIC_BUF_SIZE.
24045
24046 2000-07-29  Jim Meyering  <meyering@lucent.com>
24047
24048         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24049         * lib/dirname.c (dir_name): Likewise.
24050
24051         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24052         `/'.
24053
24054         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24055         (dir_name): Assert that there are no trailing slashes.
24056
24057 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24058
24059         * lib/mbswidth.h (mbswidth): Add a flags argument.
24060         (mbswidth): New declaration.
24061         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24062         * lib/mbswidth.c (mbswidth): Add a flags argument.
24063         (mbsnwidth): New function.
24064
24065 2000-07-24  Jim Meyering  <meyering@lucent.com>
24066
24067         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24068
24069 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24070
24071         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24072
24073 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24074
24075         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24076         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24077         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24078         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24079         invoke multibyte primitives.
24080
24081 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24082
24083         * lib/quotearg.c:
24084         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
24085         so that mbstate_t is always defined.
24086
24087         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
24088         be 1 in at least one GCC installation, and this configuration
24089         error is likely to be common.  Ignoring MB_LEN_MAX hurts
24090         performance on hosts that have mbrtowc but have only unibyte
24091         locales, but I assume these hosts are rare.
24092
24093 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24094
24095         * lib/mbswidth.c (_XOPEN_SOURCE):
24096         Don't define; this causes problems on Solaris 7.
24097         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
24098
24099 2000-07-23  Jim Meyering  <meyering@lucent.com>
24100
24101         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
24102         too: getgrgid, getpwuid, getuid.
24103
24104 2000-07-23  Jim Meyering  <meyering@lucent.com>
24105
24106         * lib/basename.c (base_name): Add an assertion.
24107
24108 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
24109
24110         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
24111         shadow its mbsinit function.
24112
24113 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24114
24115         * lib/mbswidth.h: New file.
24116         * lib/mbswidth.c: New file.
24117         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
24118         (noinst_HEADERS): Add mbswidth.h.
24119
24120 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24121
24122         * lib/config.charset: Add support for FreeBSD. Improve support for
24123         HP-UX and IRIX 6.
24124
24125 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
24126
24127         * m4/mbswidth.m4: New file.
24128         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
24129
24130 2000-07-15  Jim Meyering  <meyering@lucent.com>
24131
24132         * lib/makepath.c: Include quote.h.
24133         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
24134         corresponding argument in a `quote (...)' call.
24135         Give better diagnostics.
24136
24137         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
24138         (noinst_HEADERS): Add quote.h.
24139
24140         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
24141         from tar's src/misc.c.
24142         * lib/quote.h: New file.  Prototypes for same.
24143
24144 2000-07-14  Paul Eggert  <eggert@twinsun.com>
24145
24146         From a suggestion by Bruno Haible.
24147         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
24148         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
24149         to decide whether to define the BeOS workaround macro;
24150         this adjusts to the change to AC_MBSTATE_T.
24151
24152 2000-07-14  Jim Meyering  <meyering@lucent.com>
24153
24154         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
24155         jm_AC_TYPE_UINTMAX_T.
24156
24157 2000-07-13  Paul Eggert  <eggert@twinsun.com>
24158
24159         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
24160
24161         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
24162         quotearg_buffer_restyled): Add support for
24163         clocale_quoting_style.  Undo previous change to
24164         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
24165         and "{RIGHT QUOTATION MARK}" msgids.
24166
24167 2000-07-10  Paul Eggert  <eggert@twinsun.com>
24168
24169         From a suggestion by Bruno Haible.
24170         * m4/mbstate_t.m4 (AC_MBSTATE_T):
24171         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
24172         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
24173         and mbstate_t, to a single-part test that simply defines mbstate_t.
24174         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
24175         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
24176
24177 2000-07-10  Jim Meyering  <meyering@lucent.com>
24178
24179         * m4/strerror_r.m4: Mirror the correction made in autoconf.
24180
24181         * m4/gnu-source.m4: Output to confdefs.h directly.
24182         Suggestion from Akim Demaille.
24183
24184 2000-07-09  Paul Eggert  <eggert@twinsun.com>
24185
24186         The old behavior of quoting `like this' doesn't look good with
24187         newer, ISO-style fonts.  See:
24188         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
24189
24190         Instead, quote "like this" by default.  Let the translator
24191         tailor the locale-specific quoting behavior by providing
24192         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
24193
24194         * lib/quotearg.c (N_): New macro.
24195         (gettext_default): New function.
24196         (quotearg_buffer_restyled): Use
24197         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
24198         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
24199
24200 2000-07-09  Jim Meyering  <meyering@lucent.com>
24201
24202         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
24203         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
24204
24205         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
24206         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
24207
24208 2000-07-09  Jim Meyering  <meyering@lucent.com>
24209
24210         * lib/Most files: Update copyright dates to include 2000.
24211
24212 2000-07-08  Jim Meyering  <meyering@lucent.com>
24213
24214         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
24215         if not defined.
24216         (xgethostname): Remove now-unnecessary #ifdef.
24217         Move declaration of `err' into loop where it's used.
24218
24219 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24220         and Bruno Haible  <haible@clisp.cons.org>
24221
24222         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
24223         only if the test for an object-type mbstate_t fails.  This
24224         prevents us from mistakenly reporting that mbstate_t is a
24225         system object type after we "#define mbstate_t int" to work
24226         around its lack.
24227
24228 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24229         and Bruno Haible  <haible@clisp.cons.org>
24230
24231         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
24232
24233 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24234
24235         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
24236         to strerror_r.
24237         Include <ctype.h> for use of isalpha.
24238
24239 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24240
24241         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
24242         by allocating a larger buffer. Test the gethostname return value for
24243         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
24244         returns an error and ENAMETOOLONG isn't defined.
24245
24246 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24247
24248         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
24249         dimension.
24250
24251 2000-07-04  Jim Meyering  <meyering@lucent.com>
24252
24253         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
24254         of the deprecated AC_CHECKING.
24255
24256 2000-07-04  Jim Meyering  <meyering@lucent.com>
24257
24258         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
24259         Reported by Bruno Haible.
24260
24261 2000-07-04  Jim Meyering  <meyering@lucent.com>
24262
24263         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
24264         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
24265         lacks mbrtowc.
24266
24267 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24268
24269         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
24270         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
24271
24272 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24273         and Bruno Haible  <haible@clisp.cons.org>
24274
24275         * lib/quotearg.c (mbrtowc):
24276         Assign to *pwc, and return 1 only if result is nonzero.
24277         (iswprint): Use ISPRINT when substituting our own mbrtowc.
24278
24279 2000-07-03  Jim Meyering  <meyering@lucent.com>
24280
24281         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
24282
24283 2000-07-03  Jim Meyering  <meyering@lucent.com>
24284
24285         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
24286         This is necessary to get a definition of e.g., UTMP_FILE on
24287         HP-UX 10.20.
24288         From Bob Proulx.
24289
24290 2000-07-02  Jim Meyering  <meyering@lucent.com>
24291
24292         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
24293
24294         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
24295         AC_LIBOBJ(function_name).
24296         * m4/chown.m4: Likewise.
24297         * m4/fnmatch.m4: Likewise.
24298         * m4/ftruncate.m4: Likewise.
24299         * m4/getgroups.m4: Likewise.
24300         * m4/getline.m4: Likewise.
24301         * m4/group-member.m4: Likewise.
24302         * m4/jm-macros.m4: Likewise.
24303         * m4/lstat.m4: Likewise.
24304         * m4/malloc.m4: Likewise.
24305         * m4/memcmp.m4: Likewise.
24306         * m4/nanosleep.m4: Likewise.
24307         * m4/putenv.m4: Likewise.
24308         * m4/realloc.m4: Likewise.
24309         * m4/regex.m4: Likewise.
24310         * m4/stat.m4: Likewise.
24311         * m4/strftime.m4: Likewise.
24312
24313 2000-07-02  Jim Meyering  <meyering@lucent.com>
24314
24315         * lib/quotearg.c (mbstate_t): Don't define here.
24316
24317 2000-07-02  Jim Meyering  <meyering@lucent.com>
24318
24319         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24320
24321 2000-07-01  Jim Meyering  <meyering@lucent.com>
24322
24323         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24324
24325 2000-07-01  Jim Meyering  <meyering@lucent.com>
24326
24327         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24328         problem.
24329
24330 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24331
24332         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24333         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24334
24335 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24336
24337         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24338         per change in ../m4/ls-mntd-fs.m4.
24339         (read_filesystem_list): Ignore symbolic links.
24340
24341 2000-06-29  Jim Meyering  <meyering@lucent.com>
24342
24343         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24344         for declaration of strcmp.
24345
24346         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24347
24348         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24349         Avoid warning by casting result to `char *' to remove `const'.
24350
24351 2000-06-28  Jim Meyering  <meyering@lucent.com>
24352
24353         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24354         included by quotearg.c, for which we perform this test.  From
24355         Bruno Haible.
24356
24357 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24358
24359         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24360         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24361         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24362
24363 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24364
24365         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24366
24367 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24368
24369         savedir now sets errno on failure and invokes xmalloc to get memory.
24370         Fix a couple of other minor bugs while we're at it.
24371
24372         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24373         (NAMLEN): Remove macro.
24374         (malloc, realloc): Remove decls.
24375         (stpcpy): Likewise.
24376         ("xalloc.h"): Include.
24377         (NAME_SIZE_DEFAULT): New macro.
24378         (savedir): Use xmalloc / xrealloc to allocate memory.
24379         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24380         Skip "" directory entries.
24381         Use strlen to calculate directory entry length, since the old method
24382         is rarely used these days and isn't worth supporting.
24383         Don't use a pointer after freeing it.
24384         Check for integer overflow when calculating allocation size.
24385         Use memcpy to copy entries, instead of stpcpy.
24386         Set errno properly when returning NULL.
24387         Check for readdir error.
24388
24389 2000-06-26  Jim Meyering  <meyering@lucent.com>
24390
24391         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24392
24393 2000-06-25  Jim Meyering  <meyering@lucent.com>
24394
24395         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24396         Linux header bug when _XOPEN_SOURCE is defined to 500.
24397
24398 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24399
24400         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24401         deficiency.
24402
24403 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24404
24405         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24406         Include xalloc.h.
24407         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24408
24409 2000-06-24  Jim Meyering  <meyering@lucent.com>
24410
24411         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24412         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24413         for which strerror does return char*, but which lacks a conveniently
24414         accessible declaration of the function.  If the compile-test says
24415         strerror_r doesn't work, then resort to a `run'-test that works on
24416         BeOS and segfaults on DEC Unix.
24417
24418 2000-06-24  Jim Meyering  <meyering@lucent.com>
24419
24420         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24421
24422 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24423
24424         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24425         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24426
24427 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24428
24429         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24430         (mbrtowc, mbstate_t): Define substitutes if
24431         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24432         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24433         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24434
24435 2000-06-23  Jim Meyering  <meyering@lucent.com>
24436
24437         * m4/afs.m4: Add missing AC_MSG_RESULT.
24438         Reported by Bruno Haible.
24439
24440         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24441         Suggestion from Bruno Haible.
24442
24443 2000-06-23  Jim Meyering  <meyering@lucent.com>
24444
24445         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24446
24447 2000-06-21  Jim Meyering  <meyering@lucent.com>
24448
24449         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24450
24451 2000-06-21  Jim Meyering  <meyering@lucent.com>
24452
24453         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24454         (noinst_HEADERS): Add getstr.h.
24455
24456         * lib/getline.c (getstr): Move into a separate file.
24457         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24458         the following changes: new parameter, delim2; both delim[12]
24459         parameters have type `int', not `char'.  The latter would lose
24460         with 8-bit delimiters.
24461         * lib/getstr.h: New file.
24462
24463 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24464
24465         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24466         than 1024, return a memory chunk of least possible size, instead
24467         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24468         Use free/xmalloc instead of xrealloc to avoid copying for very long
24469         paths.
24470
24471 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24472
24473         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24474         the empty string.
24475
24476 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24477
24478         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24479         address, not strdup.  Include <stdlib.h> and don't declare free().
24480
24481 2000-06-19  Jim Meyering  <meyering@lucent.com>
24482
24483         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
24484
24485 2000-06-18  Jim Meyering  <meyering@lucent.com>
24486
24487         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
24488
24489         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
24490         `checking whether...' message to be consistent with that of the
24491         lstat test.
24492
24493 2000-06-18  Jim Meyering  <meyering@lucent.com>
24494
24495         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
24496         Besides, these days every porting target provides a mkdir function.
24497
24498         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
24499         needed. (this snippet comes from src/system.h).
24500
24501 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
24502
24503         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
24504
24505 2000-06-15  Paul Eggert  <eggert@twinsun.com>
24506
24507         * lib/human.c (adjust_value): New function.
24508         (human_readable_inexact): Apply rounding style even when
24509         printing approximate values.
24510
24511 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24512
24513         * lib/human.c (human_readable_inexact): Allow an input block
24514         size that is not a multiple of the output block size, and vice versa.
24515         Reported by Piergiorgio Sartor.
24516
24517 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24518
24519         * lib/getdate.y (get_date): Apply relative times after time
24520         zone indicator, not before.  Reported by Todd A. Jacobs.
24521
24522 2000-06-13  Jim Meyering  <meyering@lucent.com>
24523
24524         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
24525
24526         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
24527
24528 2000-06-12  Paul Eggert  <eggert@twinsun.com>
24529
24530         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24531
24532 2000-06-12  Jim Meyering  <meyering@lucent.com>
24533
24534         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24535         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24536         optional argument.
24537         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24538         the optional argument, `lib'.
24539
24540 2000-06-08  Jim Meyering  <meyering@lucent.com>
24541
24542         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24543
24544 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24545
24546         Rewrite largefile configuration so that we don't need to run
24547         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24548         AC_CANONICAL_HOST in configure.in -- jmm]
24549
24550         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24551         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24552         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24553         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24554         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24555         All uses changed.
24556         Instead of inspecting the output of getconf, try to compile the
24557         test program without and with the macro definition.
24558         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24559         for getconf.  Instead, check for the needed flags by compiling
24560         test programs.
24561
24562 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24563
24564         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24565
24566 2000-06-04  Jim Meyering  <meyering@lucent.com>
24567
24568         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24569         SunOS 4.1.4 for which gid_t is an unsigned type.
24570
24571 2000-06-03  Jim Meyering  <meyering@lucent.com>
24572
24573         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24574         now that autoconf requires that.
24575
24576         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24577         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24578         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24579
24580 2000-06-03  Jim Meyering  <meyering@lucent.com>
24581
24582         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24583
24584 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24585
24586         * m4/glibc21.m4: New file.
24587         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24588
24589 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24590
24591         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24592         newer, don't install charset.alias.
24593         * lib/config.charset: Change the Linux/glibc rules so they become empty
24594         on glibc-2.1 or newer.
24595
24596 2000-06-02  Jim Meyering  <meyering@lucent.com>
24597
24598         * lib/mountlist.c: Back out last change.  Instead, do this...
24599         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24600         me_dummy member using the same `ignore'-testing code.
24601         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24602         fs_type strings.
24603         From Mark D. Roth.
24604
24605 2000-05-29  Jim Meyering  <meyering@lucent.com>
24606
24607         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24608         mounts with the `ignore' attribute.  Based on a patch from
24609         Mark D. Roth.
24610
24611 2000-05-28  Jim Meyering  <meyering@lucent.com>
24612
24613         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24614         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24615         * m4/stat.m4: Likewise.
24616         * m4/lstat.m4: Likewise.
24617         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24618
24619         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24620         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24621
24622 2000-05-26  Jim Meyering  <meyering@lucent.com>
24623
24624         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24625
24626 2000-05-24  Jim Meyering  <meyering@lucent.com>
24627
24628         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24629         autoconf requires that.
24630         * m4/lib-check.m4: Likewise.
24631         * m4/jm-macros.m4: Likewise.
24632         * m4/strftime.m4: Likewise.
24633
24634         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24635         AC_CHECK_DECLS, now that autoconf requires that.
24636
24637 2000-05-22  Jim Meyering  <meyering@lucent.com>
24638
24639         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24640         * m4/lstat.m4: Likewise.
24641
24642 2000-05-22  Jim Meyering  <meyering@lucent.com>
24643
24644         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24645
24646 2000-05-20  Jim Meyering  <meyering@lucent.com>
24647
24648         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24649         (jm_PREREQ): Use it.
24650
24651 2000-05-18  Jim Meyering  <meyering@lucent.com>
24652
24653         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24654         back, too, since it may have been modified by allocate_entry.
24655         (hash_delete): Rewrite to use neither the assignment operator
24656         nor the comma operator in an if-expression.
24657
24658 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24659
24660         * lib/closeout.c:
24661         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24662         Remove; no longer needed.
24663         "quotearg.h": Add include.
24664         (file_name): Do not bother to explicitly initialize to NULL; it's less
24665         efficient on some hosts.
24666         (close_stdout_status): Remove test as to whether stdout was already
24667         closed; it breaks for the case "echo x | sort >&-".
24668         Quote file name colons.
24669         Do not assume that _("write error") lacks format strings.
24670
24671 2000-05-15  Jim Meyering  <meyering@lucent.com>
24672
24673         * lib/version-etc.c (version_etc_copyright): Update the copyright
24674         string used in all --version output.
24675
24676 2000-05-14  Jim Meyering  <meyering@lucent.com>
24677
24678         * lib/closeout.c (close_stdout_set_file_name): New function.
24679         (close_stdout_status): Use new file-scoped global.
24680         Return right away if fstat says the stdout file descriptor is invalid.
24681         * lib/closeout.h (close_stdout_set_file_name): Declare.
24682
24683 2000-05-10  Jim Meyering  <meyering@lucent.com>
24684
24685         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24686         (close_stdout_set_status): New function.
24687         * lib/closeout.h (close_stdout_set_status): Declare.
24688
24689 2000-05-09  Jim Meyering  <meyering@lucent.com>
24690
24691         * m4/gettext.m4: Rename this...
24692         * m4/libintl.m4: ...to this.
24693
24694 2000-05-08  Jim Meyering  <meyering@lucent.com>
24695
24696         * lib/long-options.c: Don't include closeout.h.
24697         (parse_long_options): Don't call close_stdout for --version.
24698
24699 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24700
24701         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24702         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24703         2.1.3 bug.  This avoids a clash when files like regex.c define
24704         _GNU_SOURCE.
24705
24706 2000-05-06  Jim Meyering  <meyering@lucent.com>
24707
24708         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24709         (AC_REPLACE_FUNCS): Add strnlen.
24710
24711         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24712         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24713
24714         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24715         AC_SEARCH_LIBS call for nanosleep.
24716         (LIB_NANOSLEEP): Set and AC_SUBST.
24717
24718 2000-05-06  Jim Meyering  <meyering@lucent.com>
24719
24720         * lib/strnlen.c: Undefine __strnlen and strnlen.
24721         [!weak_alias]: Define __strnlen to strnlen.
24722
24723         * lib/atexit.c: New file, from libiberty.
24724
24725 2000-05-06  Jim Meyering  <meyering@lucent.com>
24726
24727         * lib/closeout.c (close_stdout_status): Also check for errors on the
24728         stderr stream.
24729
24730 2000-05-05  Jim Meyering  <meyering@lucent.com>
24731
24732         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24733         AC_SEARCH_LIBS call for clock_gettime.
24734         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24735
24736         * m4/search-libs.m4: Update from autoconf.
24737
24738         su doesn't work on Solaris 2.6.
24739         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24740         <shadow.h>.  Reported by Dragos Harabor.
24741
24742 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24743
24744         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24745         memcpy instead of xmalloc, xrealloc, path_concat.
24746         (locale_charset): Treat empty environment variables as absent.
24747         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24748
24749 2000-05-04  Jim Meyering  <meyering@lucent.com>
24750
24751         * lib/getopt.c: Update from glibc.
24752         * lib/obstack.c: Likewise.
24753         * lib/obstack.h: Likewise.
24754         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24755         file
24756
24757         * lib/regex.h: Likewise.
24758         * lib/strndup.c: Likewise.
24759         * lib/strnlen.c: New file, from glibc.
24760
24761 2000-05-03  Jim Meyering  <meyering@lucent.com>
24762
24763         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24764
24765 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24766
24767         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24768         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24769         compile-time test, rather than inspecting host and OS, to
24770         decide whether to define _LARGEFILE_SOURCE.
24771
24772 2000-05-01  Jim Meyering  <meyering@lucent.com>
24773
24774         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24775
24776         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24777         Based on a patch from Bruno Haible.
24778
24779 2000-05-01  Jim Meyering  <meyering@lucent.com>
24780
24781         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24782
24783 2000-04-29  Jim Meyering  <meyering@lucent.com>
24784
24785         * lib/path-concat.c: Declare strdup only if it's not defined.
24786         * lib/canon-host.c: Likewise.
24787
24788 2000-04-28  Jim Meyering  <meyering@lucent.com>
24789
24790         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24791         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24792         is included first, then limits.h is included by locale.h by libintl.h.
24793         From John David Anglin.
24794
24795 2000-04-25  Jim Meyering  <meyering@lucent.com>
24796
24797         * lib/makepath.c (S_IRWXUGO): Define.
24798         (make_path): Always perform explicit chmod if MODE specifies any
24799         of the `special' permission bits.  Prompted by a bug report against
24800         install from Mate Wierdl and Joost van Baal.
24801
24802 2000-04-18  Jim Meyering  <meyering@lucent.com>
24803
24804         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
24805         (jm_PREREQ): Use it.
24806
24807 2000-04-18  Jim Meyering  <meyering@lucent.com>
24808
24809         * lib/README: New file.
24810
24811         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
24812         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
24813
24814 2000-04-17  Jim Meyering  <meyering@lucent.com>
24815
24816         Get it right :-)
24817         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
24818         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
24819         Suggestion from Akim Demaille.
24820
24821 2000-04-17  Jim Meyering  <meyering@lucent.com>
24822
24823         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
24824         the definition of it to rpl_strftime also defined-away the system's
24825         declaration.
24826
24827 2000-04-15  Jim Meyering  <meyering@lucent.com>
24828
24829         Use `C' to denote so-called `contiguous' files, the same way
24830         that tar does.
24831         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
24832         (ftypelet): Use S_ISCTG.
24833         From Michael Deutschmann.
24834
24835 2000-04-14  Jim Meyering  <meyering@lucent.com>
24836
24837         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
24838         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
24839         clobbered.
24840
24841 2000-04-14  Jim Meyering  <meyering@lucent.com>
24842
24843         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
24844
24845 2000-04-13  Jim Meyering  <meyering@lucent.com>
24846
24847         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
24848         AH_VERBATIM to insert required #ifndef into config.h.in.
24849         Suggestion from Akim Demaille.
24850
24851 2000-04-12  Jim Meyering  <meyering@lucent.com>
24852
24853         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
24854         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
24855         Christian Krackowizer.
24856
24857         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
24858         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
24859         (AC_SYS_LARGEFILE): Require.
24860         (AM_C_PROTOTYPES): Require.
24861
24862 2000-04-08  Jim Meyering  <meyering@lucent.com>
24863
24864         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
24865         names don't conflict.  Reported by Eli Zaretskii.
24866
24867 2000-04-07  Jim Meyering  <meyering@lucent.com>
24868
24869         * lib/putenv.c: Move inclusion of errno.h so it follows that of
24870         sys/types.h, to work around system header problems on AIX 3.2.5.
24871         From Bruno Haible.
24872
24873 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
24874
24875         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
24876         bug.  Deal with the different error behavior of Irix iconv.
24877
24878 2000-04-05  Paul Eggert  <eggert@twinsun.com>
24879
24880         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
24881         IRIX if the installer said otherwise.
24882
24883 2000-04-05  Jim Meyering  <meyering@lucent.com>
24884
24885         Portability tweaks required for ultrix4.3.
24886         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
24887         (jm_CHECK_DECLS): Add getutent to the list of functions.
24888         (_jm_DECL_HEADERS): Add utmpx.h.
24889         From John David Anglin.
24890
24891         * m4/strftime.m4: Back out the 2000-04-02 change.
24892         Instead of that change, simply undefine putenv in the test program.
24893
24894 2000-04-05  Jim Meyering  <meyering@lucent.com>
24895
24896         Portability tweaks required for ultrix4.3.
24897         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
24898         getutent.
24899         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
24900         * lib/canon-host.c: Declare strdup.
24901         * lib/path-concat.c: Likewise.
24902         From John David Anglin.
24903
24904 2000-04-04  Jim Meyering  <meyering@lucent.com>
24905
24906         Be more DOS 8.3-friendly.
24907         * lib/ref-add.sin: Renamed from ref-add.sed.in.
24908         * lib/ref-del.sin: Renamed from ref-del.sed.in.
24909         * lib/Makefile.am: Reflect renaming.
24910         Reported by Eli Zaretskii.
24911
24912         Use a temporary file name that won't clash with `charset.alias'
24913         in the DOS 8.3 name space.
24914         * lib/Makefile.am (charset_tmp): Define.
24915         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
24916         (uninstall-local): Likewise.
24917         Reported by Eli Zaretskii.
24918
24919 2000-04-03  Jim Meyering  <meyering@lucent.com>
24920
24921         * m4/gettext.m4: Fix typo in comment.
24922
24923         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
24924         textutils/configure.in).  Suggestion from Paul Eggert.
24925         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
24926
24927 2000-04-02  Paul Eggert  <eggert@twinsun.com>
24928
24929         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
24930         variable in the shell rather than using putenv, which isn't
24931         portable.  This avoids the configure-time inter-test dependency
24932         on the potentially-renamed putenv function.
24933
24934 2000-03-30  Paul Eggert  <eggert@twinsun.com>
24935
24936         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
24937         before checking struct stat.st_blksize, so that
24938         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
24939
24940 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24941
24942         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
24943         since strftime.c uses HAVE_STRFTIME to decide whether to use
24944         the underlying strftime.
24945
24946 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24947
24948         * lib/time/strftime.c (my_strftime): Make sure we call the system
24949         strftime, not ourselves, when invoking the underlying strftime.
24950
24951 2000-03-24  Jim Meyering  <meyering@lucent.com>
24952
24953         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
24954         (charset_alias): Define.
24955         (install-exec-local): Factor out common code.
24956         (uninstall-local): Split lines longer than 80.
24957         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
24958         (SUFFIXES): Define.
24959         (.sed.in.sed): New rule.  Don't redirect directly to $@.
24960         (CLEANFILES): Add ref-add.sed and ref-del.sed.
24961
24962 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
24963
24964         * lib/config.charset: Output a line containing "Packages using this
24965         file".
24966         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
24967         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
24968         ref-del.sed): New rules.
24969
24970 2000-03-17  Jim Meyering  <meyering@lucent.com>
24971
24972         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
24973         Otherwise, include <strings.h>
24974
24975 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
24976
24977         * lib/unicodeio.c (utf8_wctomb): New function.
24978         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
24979         format instead of in UCS-4 with platform dependent endianness.
24980
24981 2000-03-10  Jim Meyering  <meyering@lucent.com>
24982
24983         * m4/lib-check.m4: Look for getspnam in -lgen, too.
24984         From Marco Franzen.
24985
24986 2000-03-07  Paul Eggert  <eggert@twinsun.com>
24987
24988         * lib/savedir.c (savedir): Work even if directory size is
24989         negative; this can happen with some screwy NFS configurations.
24990
24991 2000-03-06  Jim Meyering  <meyering@lucent.com>
24992
24993         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
24994         if it's NULL (because we ran out of memory).  From Bruno Haible.
24995
24996 2000-03-05  Jim Meyering  <meyering@lucent.com>
24997
24998         * lib/localcharset.c ("path-concat.h"): Include.
24999         (get_charset_aliases): Use path_concat instead of ANSI string
25000         concatenation.
25001
25002         * lib/unicodeio.h (PARAMS): Define.
25003         Use it to guard prototype.
25004
25005 2000-03-04  Jim Meyering  <meyering@lucent.com>
25006
25007         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
25008         for lib/localcharset.c.
25009
25010 2000-03-04  Jim Meyering  <meyering@lucent.com>
25011
25012         * lib/Makefile.am (install-exec-local): Create $(libdir) before
25013         installing into it.
25014         (uninstall-local): Uncomment this rule so `make distcheck' works
25015         once again.
25016
25017         * lib/unicodeio.c (<errno.h>): Include it.
25018         (errno): Declare if not defined.
25019
25020         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
25021
25022         * lib/config.charset: New version, incorporating remarks from a linux
25023         i18n mailing list.  From Bruno Haible.
25024
25025 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
25026
25027         * m4/codeset.m4: New file.
25028         * m4/iconv.m4: New file.
25029         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
25030
25031 2000-03-03  Jim Meyering  <meyering@lucent.com>
25032
25033         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
25034
25035 2000-03-02  Jim Meyering  <meyering@lucent.com>
25036
25037         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
25038         the messages come out on separate lines.
25039
25040         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
25041         rather than jm_CHECK_DECLARATIONS.
25042         * m4/decl.m4: Remove now-unused file.
25043
25044         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25045         geteuid.
25046
25047 2000-03-02  Jim Meyering  <meyering@lucent.com>
25048
25049         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25050
25051 2000-03-01  Jim Meyering  <meyering@lucent.com>
25052
25053         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25054         * lib/unicodeio.c: Likewise.
25055
25056 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25057
25058         * lib/config.charset: New file.
25059         * lib/localcharset.c: New file.
25060         * lib/unicodeio.h, lib/unicodeio.c: New files.
25061         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25062         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25063         (noinst_HEADERS): Add unicodeio.h.
25064         (all-local, install-exec-local, charset.alias): New targets.
25065
25066 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25067
25068         * lib/quotearg.c (ALERT_CHAR): New macro.
25069         (quotearg_buffer_restyled): Use it.
25070
25071 2000-02-27  Jim Meyering  <meyering@lucent.com>
25072
25073         * m4/check-decl.m4: Add getenv to the list.
25074
25075 2000-02-27  Jim Meyering  <meyering@lucent.com>
25076
25077         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25078         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25079
25080         * lib/backupfile.c: Guard inclusion of stdlib.h with
25081         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25082         Declare malloc if needed.
25083
25084         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
25085         `#ifndef HAVE_DECL..'
25086         now that autoconf always defines the HAVE_DECL_ symbols.
25087         * lib/human.c: Likewise.
25088         * lib/same.c: Likewise.
25089         * lib/strtoumax.c: Likewise.
25090
25091         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
25092         declaration check was not run.
25093         * lib/hash.c: Likewise.
25094         * lib/human.c: Likewise.
25095         * lib/same.c: Likewise.
25096         * lib/strtoumax.c: Likewise.
25097
25098         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
25099         `.', then first look up the entire `.'-containing string as a login
25100         name.
25101
25102 2000-02-23  Jim Meyering  <meyering@lucent.com>
25103
25104         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
25105         in place of my hack.
25106
25107 2000-02-18  Paul Eggert  <eggert@twinsun.com>
25108
25109         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
25110         (textint): New typedef.
25111         (parser_control): Member year changed from int to textint.
25112         All uses changed.
25113         (YYSTYPE): Removed; replaced by %union with int and textint members.
25114         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
25115         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
25116         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
25117         (tSNUMBER, tUNUMBER): Now of type <textintval>.
25118         (date, number, to_year): Use width of number in digits, not its value,
25119         to determine whether it's a 2-digit year, or a 2-digit time.
25120         (yylex): Store number of digits of numeric tokens.
25121         Reported by John Kendall.
25122
25123         (parser_control): Changed from struct parser_control to typedef (for
25124         consistency).  All uses changed.
25125
25126         (tID): Removed; not used.
25127         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
25128
25129 2000-02-14  Paul Eggert  <eggert@twinsun.com>
25130
25131         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
25132         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
25133
25134 2000-02-12  Jim Meyering  <meyering@lucent.com>
25135
25136         * lib/userspec.c (ISDIGIT): Define it.
25137         (isdigit): Remove definition.
25138         (is_number): Use ISDIGIT, not isdigit.
25139         <libintl.h>: Include.
25140         (_ and N_): Define.
25141         (parse_user_spec): Mark translatable strings.
25142
25143 2000-02-10  Jim Meyering  <meyering@lucent.com>
25144
25145         With these changes, nanosleep.[ch] are finally enough like the other
25146         lib/* replacement files to compile on a few more losing systems.
25147
25148         * lib/nanosleep.h: Don't include config.h.
25149         Remove prototype from declaration of nanosleep.
25150         (PARAMS): Remove now-unneeded definition.
25151         * lib/nanosleep.c: #undef nanosleep.
25152         (rpl_nanosleep): Rename from nanosleep.
25153
25154 2000-02-10  Jim Meyering  <meyering@lucent.com>
25155
25156         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
25157         gnu_nanosleep to rpl_nanosleep.
25158
25159 2000-02-09  Jim Meyering  <meyering@lucent.com>
25160
25161         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
25162         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
25163
25164 2000-02-08  Akim Demaille  <akim@epita.fr>
25165
25166         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
25167         `[' and `]' and remove uses of `changequote'.
25168         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
25169         (AC_SYS_LARGEFILE): Likewise.
25170         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
25171         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
25172         of changequote.
25173         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
25174         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
25175         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
25176         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
25177
25178 2000-02-05  Jim Meyering  <meyering@lucent.com>
25179
25180         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
25181         Remove explicit use of AC_HEADER_TIME.  It is required by
25182         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
25183         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
25184         in autoconf whereby the expansion of the latter ended up preceding
25185         the expansion of its prerequisite, AC_HEADER_TIME.
25186         Reported by Volker Borchert.
25187
25188 2000-02-03  Jim Meyering  <meyering@lucent.com>
25189
25190         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
25191
25192 2000-02-03  Jim Meyering  <meyering@lucent.com>
25193
25194         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
25195         rather than with `#if HAVE_UTMPNAME'.
25196
25197 2000-02-02  Jim Meyering  <meyering@lucent.com>
25198
25199         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
25200         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
25201         Reported by Eli Zaretskii.
25202
25203 2000-02-01  Jim Meyering  <meyering@lucent.com>
25204
25205         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
25206
25207 2000-01-31  Jim Meyering  <meyering@lucent.com>
25208
25209         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
25210         functions.  Add the time.h and sys/time.h headers along with the
25211         AC_REQUIRE'ment of AC_HEADER_TIME.
25212
25213 2000-01-31  Jim Meyering  <meyering@lucent.com>
25214
25215         * lib/nanosleep.h (nanosleep): Guard declaration with
25216         `#if ! HAVE_DECL_NANOSLEEP'.
25217         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
25218         the declaration in that vendor's sys/timers.h.
25219         Reported by Christian Krackowizer.
25220
25221         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
25222         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
25223         (ISPRINT): Likewise.
25224         Reported by Tom Tromey.
25225
25226 2000-01-30  Jim Meyering  <meyering@lucent.com>
25227
25228         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
25229
25230         * m4/prereq.m4 (utmp_includes): Define.
25231         Check for ut_user and ut_name members in both struct utmpx
25232         and struct utmp.
25233
25234 2000-01-30  Jim Meyering  <meyering@lucent.com>
25235
25236         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
25237         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
25238         header files where only utmpx.ut_user is declared.
25239
25240         * lib/readutmp.h (UT_USER): Define.
25241
25242 2000-01-29  Jim Meyering  <meyering@lucent.com>
25243
25244         * m4/lib-check.m4: New file containing library-related checks from
25245         fileutils and sh-utils (textutils had none).
25246
25247 2000-01-28  Jim Meyering  <meyering@lucent.com>
25248
25249         * m4/perl.m4: Change format of warning message to look more like that
25250         from the missing script.  Suggestion from François Pinard.
25251
25252 2000-01-25  Jim Meyering  <meyering@lucent.com>
25253
25254         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
25255         well as time.h in the compile check.
25256         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
25257         Fix typo in cross-compiling case: s/yes/no/.
25258
25259 2000-01-23  Jim Meyering  <meyering@lucent.com>
25260
25261         * m4/jm-macros.m4: Move df-related tests here from
25262         fileutils/configure.in
25263
25264         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
25265         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
25266
25267         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
25268         s/space/ac_fsusage_space/.
25269         (jm_FILE_SYSTEM_USAGE): Take two parameters.
25270
25271         * m4/ftruncate.m4: New file (derived from part of
25272         fileutils/configure.in).
25273         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
25274         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
25275
25276         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
25277         AC_SUBST these here, rather than just in sh-util/configure.in, so
25278         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
25279         all the same.
25280         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
25281         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
25282         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
25283         (AC_SUBST(POW_LIBM)): Likewise.
25284         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
25285
25286 2000-01-23  Jim Meyering  <meyering@lucent.com>
25287
25288         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
25289         obstack.c.
25290
25291 2000-01-22  Jim Meyering  <meyering@lucent.com>
25292
25293         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
25294
25295         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
25296
25297         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
25298         configure.in
25299         (AC_CHECK_HEADERS): Likewise for sh-utils.
25300         (AC_CHECK_HEADERS): Likewise for textutils.
25301         Merge the three lists of headers.
25302
25303         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
25304         from fileutils' configure.in.
25305
25306         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
25307         code. Moved tests into their own function (_jm_DECL_HEADERS) in
25308         check-decl.m4.
25309
25310         * m4/check-decl.m4: Use #if rather than #ifdef.
25311         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
25312         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
25313         (_jm_DECL_HEADERS): Define new function.
25314         (jm_CHECK_DECLARATIONS): Require it.
25315
25316 2000-01-22  Jim Meyering  <meyering@lucent.com>
25317
25318         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25319         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25320         Required for some AIX systems.  Reported by Christian Krackowizer.
25321         [TESTING] (main): New function.
25322
25323         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25324         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25325         letters.
25326
25327         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25328         iswprint.
25329
25330         * lib/strverscmp.c (ISDIGIT): Define.
25331         (strverscmp): Use ISDIGIT, not isdigit.
25332
25333 2000-01-19  Jim Meyering  <meyering@lucent.com>
25334
25335         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25336         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25337         defines `struct timespec' in <sys/time.h>
25338
25339         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25340         Thanks to Akim for explaining.
25341
25342 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25343
25344         * lib/nanosleep.c (nanosleep):
25345         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25346         POSIX.1 doesn't require SA_INTERRUPT and some systems
25347         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25348         it's been part of POSIX.1 since day 1 (in 1988).
25349
25350 2000-01-17  Jim Meyering  <meyering@lucent.com>
25351
25352         * lib/interlock: Remove unused file.  Reported by François Pinard.
25353
25354 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25355
25356         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25357         alert, backslash, formfeed, and vertical tab unnecessarily in
25358         shell quoting style.
25359
25360 2000-01-16  Jim Meyering  <meyering@lucent.com>
25361
25362         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25363         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25364         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25365         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25366
25367 2000-01-16  Jim Meyering  <meyering@lucent.com>
25368
25369         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25370         because the latter didn't work.
25371
25372 2000-01-15  Jim Meyering  <meyering@lucent.com>
25373
25374         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25375         (AC_REPLACE_FUNCS): Add memcpy and memset.
25376         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25377         Add strpbrk.
25378         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25379
25380 2000-01-12  Jim Meyering  <meyering@lucent.com>
25381
25382         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25383         (jm_PREREQ): Use it.
25384         (jm_PREREQ_READUTMP): New macro.
25385         (jm_PREREQ): Use it.
25386
25387 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25388
25389         Quote multibyte characters correctly.
25390         * m4/c-bs-a.m4: New file.
25391         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25392         (jm_PREREQ): Use it.
25393
25394 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25395
25396         * m4/uintmax_t.m4: Port to autoconf 2.13.
25397
25398 2000-01-08  Jim Meyering  <meyering@ascend.com>
25399
25400         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25401         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25402
25403 2000-01-04  Jim Meyering  <meyering@ascend.com>
25404
25405         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25406         jm_STRUCT_DIRENT_D_TYPE.
25407         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25408         jm_STRUCT_DIRENT_D_INO.
25409         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25410         jm_STRUCT_UTIMBUF.
25411         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25412         renamings.
25413         * m4/utime.m4: Likewise.
25414
25415         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25416         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25417
25418 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25419
25420         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25421         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25422
25423 2000-01-02  Jim Meyering  <meyering@ascend.com>
25424
25425         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25426         remember if this is necessary.
25427
25428 1999-12-26  Jim Meyering  <meyering@ascend.com>
25429
25430         * m4/jm-macros.m4: Use it here.
25431         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25432
25433 1999-12-23  Jim Meyering  <meyering@ascend.com>
25434
25435         * m4/jm-macros.m4: Check for clock_gettime (moved from
25436         fileutils/configure.in)
25437         Check for gettimeofday.
25438
25439 1999-12-20  Jim Meyering  <meyering@ascend.com>
25440
25441         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25442         autoconf-2.14a-1999-12-20.
25443
25444 1999-12-19  Jim Meyering  <meyering@ascend.com>
25445
25446         * m4/lstat-slash.m4: New file.
25447         * m4/jm-macros.m4: Use the new macro:
25448         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25449
25450 1999-12-07  Jim Meyering  <meyering@ascend.com>
25451
25452         * m4/perl.m4: Require that File::Compare be available, too.
25453         Too many systems seem to lack it.
25454
25455         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25456         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25457
25458 1999-11-18  Paul Eggert  <eggert@twinsun.com>
25459
25460         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
25461         problem with the QNX 4.25 shell, which doesn't propagate exit
25462         status of failed commands inside shell assignments.
25463
25464 1999-11-17  Jim Meyering  <meyering@ascend.com>
25465
25466         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25467
25468 1999-11-07  Jim Meyering  <meyering@ascend.com>
25469
25470         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25471
25472 1999-11-06  Jim Meyering  <meyering@ascend.com>
25473
25474         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25475         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25476
25477 1999-11-05  Jim Meyering  <meyering@ascend.com>
25478
25479         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25480         configure.in of textutils, fileutils, and sh-utils into this one
25481         (shared between those packages) file.
25482         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
25483         AC_STRUCT_ST_BLKSIZE.
25484
25485 1999-11-03  Jim Meyering  <meyering@ascend.com>
25486
25487         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
25488         of AC_CHECK_TYPE checks includes unistd.h.
25489         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
25490         Suggestion from Akim Demaille.
25491
25492 1999-10-30  Jim Meyering  <meyering@ascend.com>
25493
25494         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
25495         m4-quoted string.
25496         * m4/ls-mntd-fs.m4: Likewise.
25497         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
25498         * m4/jm-winsz1.m4: Likewise.
25499
25500         * m4/const.m4: Remove file, since the fix made it into the experimental
25501         version of autoconf.
25502         * m4/mktime.m4: Likewise.
25503
25504         * m4/check-type.m4: Remove file, now that the latest version of
25505         AC_CHECK_TYPE takes a third arg to specify additional #includes.
25506
25507         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
25508         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
25509         AC_CHECK_TYPE.
25510
25511 1999-10-04  Jim Meyering  <meyering@ascend.com>
25512
25513         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
25514
25515 1999-09-22  Paul Eggert  <eggert@twinsun.com>
25516
25517         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
25518         2.95.1 bug with HP-UX 10.20.
25519
25520 1999-09-17  Jim Meyering  <meyering@ascend.com>
25521
25522         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
25523         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
25524         due to missing strdup (against sh-utils-2.0).
25525
25526 1999-08-29  Jim Meyering  <meyering@ascend.com>
25527
25528         * m4/jm-macros.m4: Require jm_BISON.
25529         * m4/bison.m4: New file.
25530
25531 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25532
25533         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25534         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25535
25536 1999-08-05  Jim Meyering  <meyering@ascend.com>
25537
25538         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25539         to avoid conflicts with `conftest' on 8+3 filesystems.
25540         Suggestion from Eli Zaretskii.
25541
25542 1999-08-04  Jim Meyering  <meyering@ascend.com>
25543
25544         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25545         fileutils and sh-utils (textutils's getline test was inadequate).
25546         (AM_FUNC_GETLINE): Run this test.
25547         (AC_CHECK_FUNCS): Check for getdelim.
25548         Reported by Bob Proulx.
25549
25550 1999-08-02  Jim Meyering  <meyering@ascend.com>
25551
25552         * m4/jm-macros.m4: Add a comment.
25553
25554 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25555
25556         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25557         <inttypes.h> defines strtoumax as a macro (and not as a
25558         function).
25559
25560 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25561
25562         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25563         that we can shift, multiply and divide unsigned long long
25564         values; Ultrix cc can't do it.
25565
25566 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25567
25568         * m4/mktime.m4: New file, which is a preview of what should appear
25569         in the next public autoconf release.
25570
25571 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25572
25573         * m4/lfs.m4: Remove this file.
25574         * m4/largefile.m4: New file.  It contains the old contents of
25575         lfs.m4, except that all names with prefix AC_LFS have been
25576         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25577         compatible with future autoconf versions.  Also, some minor m4
25578         quoting problems have been fixed.
25579
25580 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25581
25582         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25583         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25584         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25585         and simplify the shell code.
25586
25587 1999-08-01  Jim Meyering  <meyering@ascend.com>
25588
25589         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25590         m4.
25591
25592 1999-07-20  Jim Meyering  <meyering@ascend.com>
25593
25594         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25595
25596 1999-07-15  Jim Meyering  <meyering@ascend.com>
25597
25598         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25599
25600 1999-05-22  Jim Meyering  <meyering@ascend.com>
25601
25602         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25603
25604 1999-05-20  Jim Meyering  <meyering@ascend.com>
25605
25606         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25607         Add a colon after each `then' in case $4 is empty.
25608
25609 1999-05-16  Jim Meyering  <meyering@ascend.com>
25610
25611         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25612
25613 1999-05-10  Jim Meyering  <meyering@ascend.com>
25614
25615         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25616
25617         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25618         AC_FUNC_MKTIME.
25619
25620 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25621
25622         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25623
25624 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25625
25626         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25627         not CPPFLAGS, so that linking works correctly in IRIX.
25628
25629 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25630
25631         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25632
25633 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25634
25635         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25636         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25637         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25638         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25639         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25640
25641         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25642
25643 1999-04-20  Jim Meyering  <meyering@ascend.com>
25644
25645         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25646         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25647         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25648
25649 1999-04-18  Jim Meyering  <meyering@ascend.com>
25650
25651         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25652         * m4/jm-macros.m4: Use it.
25653
25654 1999-04-06  Jim Meyering  <meyering@ascend.com>
25655
25656         * m4/strftime.m4: Remove test for %f.
25657
25658 1999-03-29  Jim Meyering  <meyering@ascend.com>
25659
25660         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25661         superset of the AC_TYPE_* checks in the textutils, fileutils,
25662         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25663         AC_TYPE_PID_T.
25664
25665 1999-03-28  Jim Meyering  <meyering@ascend.com>
25666
25667         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25668         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25669         replaced e.g., in the *.sh files of the sh-utils.
25670
25671 1999-03-20  Jim Meyering  <meyering@ascend.com>
25672
25673         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25674         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25675         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25676
25677 1999-03-19  Jim Meyering  <meyering@ascend.com>
25678
25679         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25680
25681 1999-03-12  Jim Meyering  <meyering@ascend.com>
25682
25683         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25684
25685 1999-03-07  Jim Meyering  <meyering@ascend.com>
25686
25687         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25688         declared.
25689
25690 1999-02-17  Jim Meyering  <meyering@ascend.com>
25691
25692         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25693         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25694
25695 1999-02-07  Jim Meyering  <meyering@ascend.com>
25696
25697         * m4/group-member.m4: New file -- extracted from sh-utils'
25698         configure.in.
25699
25700         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25701         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25702
25703 1999-02-06  Jim Meyering  <meyering@ascend.com>
25704
25705         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25706         * m4/fnmatch.m4: Likewise.
25707         * m4/getgroups.m4: Likewise.
25708         * m4/lstat.m4: Likewise.
25709         * m4/malloc.m4: Likewise.
25710         * m4/putenv.m4: Likewise.
25711         * m4/realloc.m4: Likewise.
25712         * m4/regex.m4: Likewise.
25713         * m4/stat.m4: Likewise.
25714         * m4/strftime.m4: Likewise.
25715         Suggestion from Alain Magloire.
25716
25717         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25718         * m4/fnmatch.m4: Likewise.
25719         * m4/getgroups.m4: Likewise.
25720         * m4/getline.m4: Likewise.
25721         * m4/lstat.m4: Likewise.
25722         * m4/malloc.m4: Likewise.
25723         * m4/memcmp.m4: Likewise.
25724         * m4/putenv.m4: Likewise.
25725         * m4/realloc.m4: Likewise.
25726         * m4/regex.m4: Likewise.
25727         * m4/stat.m4: Likewise.
25728         * m4/strftime.m4: Likewise.
25729         Suggestion from Alain Magloire.
25730
25731         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25732         an argument.
25733
25734         * m4/regex.m4: Add a run-time Test for proper operation of
25735         re_compile_pattern.
25736
25737 1999-01-31  Jim Meyering  <meyering@ascend.com>
25738
25739         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25740
25741 1999-01-30  Jim Meyering  <meyering@ascend.com>
25742
25743         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25744
25745         * m4/jm-mktime.m4: Make this a wrapper around the official
25746         AM_FUNC_MKTIME rather than my private copy, now that the official one
25747         is up to date.
25748         * m4/mktime.m4: Remove file.
25749
25750         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25751         * m4/uptime.m4: Likewise.
25752         * m4/uintmax_t.m4: Likewise.
25753
25754 1999-01-28  Jim Meyering  <meyering@ascend.com>
25755
25756         * m4/jm-macros.m4: Use jm_AFS.
25757         * m4/afs.m4: New file (from fileutils' configure.in).
25758
25759         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25760         * m4/chown.m4: Likewise.
25761         * m4/d-ino.m4: Likewise.
25762         * m4/d-type.m4: Likewise.
25763         * m4/fnmatch.m4: Likewise.
25764         * m4/getgroups.m4: Likewise.
25765         * m4/gettext.m4: Likewise.
25766         * m4/jm-mktime.m4: Likewise.
25767         * m4/jm-winsz2.m4: Likewise.
25768         * m4/lcmessage.m4: Likewise.
25769         * m4/ls-mntd-fs.m4: Likewise.
25770         * m4/malloc.m4: Likewise.
25771         * m4/memcmp.m4: Likewise.
25772         * m4/putenv.m4: Likewise.
25773         * m4/realloc.m4: Likewise.
25774         * m4/st_mtim.m4: Likewise.
25775         * m4/strftime.m4: Likewise.
25776
25777 1999-01-16  Jim Meyering  <meyering@ascend.com>
25778
25779         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25780         (ARGMATCH_DIE_DECL): Define.
25781
25782 1999-01-12  Jim Meyering  <meyering@ascend.com>
25783
25784         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25785         Reported by Lars Hecking.
25786
25787 1999-01-10  Jim Meyering  <meyering@ascend.com>
25788
25789         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25790         gross kludge.
25791         * m4/inttypes_h.m4: Likewise.
25792         * m4/lstat.m4: Likewise.
25793         * m4/malloc.m4: Likewise.
25794         * m4/readdir.m4: Likewise.
25795         * m4/realloc.m4: Likewise.
25796         * m4/st_dm_mode.m4: Likewise.
25797         * m4/stat.m4: Likewise.
25798         * m4/utimbuf.m4: Likewise.
25799         * m4/utimes.m4: Likewise.
25800
25801         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
25802         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
25803         comments in config.h.in are meaningful.
25804
25805         * m4/jm-macros.m4: Require autoconf-2.13 here.
25806
25807         * m4/regex.m4: By default, don't use the included regex.c on systems
25808         with glibc 2.  Suggestion from Uli Drepper.
25809
25810 1999-01-02  Jim Meyering  <meyering@ascend.com>
25811
25812         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
25813
25814 1998-12-18  Jim Meyering  <meyering@ascend.com>
25815
25816         * m4/Makefile.am.in (Makefile.am): Simplify rule.
25817         Based on a suggestion from Lars Hecking.
25818
25819 1998-11-16  Paul Eggert  <eggert@twinsun.com>
25820
25821         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
25822
25823 1998-11-16  Jim Meyering  <meyering@ascend.com>
25824
25825         * m4/lfs.m4: Double-quote the `uname...` expression.
25826
25827 1998-11-14  Jim Meyering  <meyering@ascend.com>
25828
25829         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
25830         * m4/stat.m4: Likewise.
25831
25832 1998-11-03  Jim Meyering  <meyering@ascend.com>
25833
25834         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
25835         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
25836
25837 1998-10-18  Jim Meyering  <meyering@ascend.com>
25838
25839         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
25840
25841 1998-10-17  Jim Meyering  <meyering@ascend.com>
25842
25843         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
25844         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
25845         calls for those previously hard-coded headers.  Instead, take a new
25846         parameter.
25847         (jm_CHECK_DECLARATIONS): Reflect interface change.
25848         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
25849         (jm_CHECK_DECL_LOCALTIME_R): New macro.
25850
25851         * m4/mktime.m4: Test for spring-forward gap before long-running test.
25852
25853 1998-10-14  Jim Meyering  <meyering@ascend.com>
25854
25855         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
25856         instead of "TZ=America/Vancouver".  From Paul Eggert.
25857
25858 1998-10-11  Jim Meyering  <meyering@ascend.com>
25859
25860         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
25861         This adds a test for a recently added compatibility fix for mktime.c.
25862         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
25863
25864 1998-09-27  Jim Meyering  <meyering@ascend.com>
25865
25866         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
25867
25868         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
25869         ../configure.in, including a change from Gordon Matzigkeit to allow
25870         cross-compiling for the Hurd.
25871
25872         * m4/glibc.m4: New file/macro to test for the GNU C Library
25873         versions 1 and 2.  From Gordon Matzigkeit.
25874         Indent.
25875
25876 1998-09-21  Jim Meyering  <meyering@ascend.com>
25877
25878         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
25879
25880 1998-08-18  Paul Eggert  <eggert@twinsun.com>
25881
25882         Port nanosecond-resolution times to UnixWare 2.1.2 and
25883         pedantic Solaris 2.6.
25884
25885         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
25886         AC_STRUCT_ST_MTIM.
25887         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
25888         Generate name of ns member, instead of just 1 or undef.
25889         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
25890
25891 1998-08-15  Jim Meyering  <meyering@ascend.com>
25892
25893         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
25894         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
25895         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
25896         instead of jm_TYPE_SSIZE_T.
25897
25898 1998-08-12  Jim Meyering  <meyering@ascend.com>
25899
25900         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
25901
25902 1998-08-02  Jim Meyering  <meyering@ascend.com>
25903
25904         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
25905         in acconfig.h manually.
25906
25907 1998-07-31  Paul Eggert  <eggert@twinsun.com>
25908
25909         * m4/st_mtim.m4: New file.
25910
25911 1998-07-28  Jim Meyering  <meyering@ascend.com>
25912
25913         * m4/utimes.m4: Undef stat.
25914
25915 1998-07-25  Jim Meyering  <meyering@ascend.com>
25916
25917         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
25918         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
25919
25920 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
25921
25922         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
25923         uid and gid actually remain unchanged.
25924
25925 1998-07-07  Jim Meyering  <meyering@ascend.com>
25926
25927         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
25928
25929 1998-07-04  Jim Meyering  <meyering@ascend.com>
25930
25931         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
25932         to prove that this macro can be used in packages without regex.c.
25933
25934 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
25935
25936         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
25937         is to be used.
25938
25939 1998-07-03  Jim Meyering  <meyering@ascend.com>
25940
25941         * m4/gettext.m4: Add -lintl if it's found to be necessary.
25942
25943         * m4/gettext.m4: New file -- from gettext-0.10.35.
25944         * m4/lcmessage.m4: Likewise.
25945         * m4/progtest.m4: Likewise.
25946
25947         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
25948         * m4/jm-macros.m4: Require the new macro.
25949
25950 1998-06-29  Jim Meyering  <meyering@ascend.com>
25951
25952         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
25953         for the definition of NGROUPS (used in a system header included
25954         by sys/mount.h).
25955
25956 1998-06-28  Jim Meyering  <meyering@ascend.com>
25957
25958         * m4/ls-mntd-fs.m4: New file.
25959         * m4/fstypename.m4: New file.
25960
25961         * m4/jm-macros.m4: Require the new macro.
25962         * m4/jm-glibc-io.m4: New file.
25963
25964 1998-05-19  Jim Meyering  <meyering@ascend.com>
25965
25966         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
25967         * m4/lchown.m4: New file.
25968
25969         * m4/Makefile.am.in: New file.
25970         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
25971
25972 1998-05-14  Jim Meyering  <meyering@ascend.com>
25973
25974         * m4/Makefile.am (EXTRA_DIST): Add them.
25975         * m4/jm-macros.m4: New file.
25976         * m4/utimbuf.m4: New file.
25977
25978 1998-05-12  Jim Meyering  <meyering@ascend.com>
25979
25980         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
25981
25982 1998-05-11  Jim Meyering  <meyering@ascend.com>
25983
25984         * m4/isc-posix.m4: New file.
25985
25986 1998-05-10  Jim Meyering  <meyering@ascend.com>
25987
25988         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
25989
25990 1998-05-09  Jim Meyering  <meyering@ascend.com>
25991
25992         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
25993         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
25994         with automake.
25995
25996         * m4/ssize_t.m4: New file.
25997         * m4/mktime.m4: Remove file -- the new automake has this now.
25998
25999 1998-04-26  Jim Meyering  <meyering@ascend.com>
26000
26001         * m4/assert.m4: New file.
26002         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
26003
26004 1998-04-05  Jim Meyering  <meyering@ascend.com>
26005
26006         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
26007         (jm_PREREQ): Use it here.
26008
26009 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
26010
26011         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
26012         in acconfig.h.
26013
26014 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
26015
26016         * m4/prereq.m4: New file.
26017         * m4/error.m4: New file.
26018         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
26019
26020 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
26021
26022         * m4/getline.m4: Don't set am_cv_func_working_getline before the
26023         cache-check for the same variable -- that defeated the purpose of
26024         the test; the test program was never run.  This was a problem only
26025         on systems with losing getline functions -- HP-UX 10.20 is one.
26026         Reported by Bjorn Helgaas.
26027
26028 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
26029
26030         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
26031
26032 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
26033
26034         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
26035
26036         * m4/const.m4: New file.  Use an initializer in this declaration
26037         typedef int charset[2]; const charset x;
26038         Reported by Bob Glickstein.
26039
26040 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
26041
26042         * m4/chown.m4: Fix reversed types on -1 args to chown.
26043         From Kaveh Ghazi.
26044
26045 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26046
26047         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26048         Add lseek and memchr.
26049
26050         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26051         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26052         have a 20-character limit on names.
26053
26054 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26055
26056         * m4/inttypes_h.m4: New file.
26057         * m4/uintmax_t.m4: New file.
26058         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26059
26060 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26061   Free Software Foundation, Inc.
26062 Copying and distribution of this file, with or without modification,
26063 are permitted provided the copyright notice and this notice are preserved.