78cdfc3cc950a53ce0d25609a5f27ffbbd987273
[gnulib.git] / ChangeLog
1 2007-01-27  Bruno Haible  <bruno@clisp.org>
2
3         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
4         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
5         * modules/unistr/u32-mbtouc-unsafe: Renamed from
6         modules/unistr/u32-mbtouc.
7         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
8         * lib/unistr.h: Update.
9         * lib/linebreak.c: Update.
10         * modules/unistr/u32-mbtouc: Renamed from
11         modules/unistr/u32-mbtouc-safe.
12         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
13         * lib/unistr.h: Update.
14         * lib/unistr/u32-to-u8.c: Update.
15         * lib/unistr/u32-to-u16.c: Update.
16
17 2007-01-27  Bruno Haible  <bruno@clisp.org>
18
19         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
20         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
21         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
22         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
23         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
24         * modules/unistr/u16-mbtouc-unsafe: Renamed from
25         modules/unistr/u16-mbtouc.
26         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
27         * lib/unistr.h: Update.
28         * lib/linebreak.c: Update.
29         * modules/linebreak: Update.
30         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
31         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
32         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
33         * modules/unistr/u16-mbtouc: Renamed from
34         modules/unistr/u16-mbtouc-safe.
35         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
36         * lib/unistr.h: Update.
37         * lib/unistr/u16-to-u8.c: Update.
38         * modules/unistr/u16-to-u8: Update.
39         * lib/unistr/u16-to-u32.c: Update.
40         * modules/unistr/u16-to-u32: Update.
41
42 2007-01-27  Bruno Haible  <bruno@clisp.org>
43
44         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
45         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
46         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
47         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
48         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
49         * modules/unistr/u8-mbtouc-unsafe: Renamed from
50         modules/unistr/u8-mbtouc.
51         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
52         * lib/unistr.h: Update.
53         * lib/striconveh.c: Update.
54         * modules/striconveh: Update.
55         * lib/linebreak.c: Update.
56         * modules/linebreak: Update.
57         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
58         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
59         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
60         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
61         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
62         * lib/unistr.h: Update.
63         * lib/striconveh.c: Update.
64         * modules/striconveh: Update.
65         * lib/unistr/u8-to-u16.c: Update.
66         * modules/unistr/u8-to-u16: Update.
67         * lib/unistr/u8-to-u32.c: Update.
68         * modules/unistr/u8-to-u32: Update.
69
70 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
71
72         Sync from Libtool.
73         * lib/argz.c: Do not include strings.h nor memory.h, include
74         string.h unconditionally.  Patch by Simon Josefsson.
75
76 2007-01-27  Bruno Haible  <bruno@clisp.org>
77
78         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
79         from gl_HEADER_STRING_H_BODY.
80         (gl_HEADER_STRING_H_BODY): Require it.
81         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
82         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
83         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
84         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
85         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
86         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
87         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
88         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
89         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
90         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
91         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
92         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
93         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
94         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
95         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
96
97 2007-01-27  Bruno Haible  <bruno@clisp.org>
98
99         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
100         check_PROGRAMS into noinst_PROGRAMS.
101         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
102         check_PROGRAMS in this case.
103         (func_import): Set for_test to false.
104         (func_create_testdir): Set for_test to true.
105
106 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
107             Bruno Haible  <bruno@clisp.org>
108
109         * modules/strcasestr (Files): Remove lib/strcasestr.h.
110         (Depends-on): Add string.
111         (Includes): Use <string.h> instead of strcasestr.h.
112         * modules/string (Makefile.am): Also substitute the value of
113         REPLACE_STRCASESTR.
114         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
115         assume strcasestr is declared in <string.h> not <strings.h>. Also
116         set REPLACE_STRCASESTR.
117         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
118         REPLACE_STRCASESTR.
119         * lib/strcasestr.h: Remove file.
120         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
121         * lib/string_.h (strcasestr): New declaration.
122
123 2007-01-27  Bruno Haible  <bruno@clisp.org>
124
125         * lib/string_.h: Use 'extern'.
126
127 2007-01-27  Jim Meyering  <jim@meyering.net>
128
129         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
130         of set-but-not-used local, "q".
131
132         * lib/mempcpy.c: Include <config.h> before <string.h>.
133         This fixes a compilation error on HP-UX, due to the system's
134         "restrict"-using mempcpy prototype.
135
136 2007-01-26  Bruno Haible  <bruno@clisp.org>
137
138         Small optimization.
139         * lib/javacomp.c: Include c-strstr.h.
140          (is_envjavac_gcj): Use c_strstr instead of strstr.
141         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
142
143 2007-01-26  Bruno Haible  <bruno@clisp.org>
144
145         * MODULES.html.sh (Unicode string functions): Add the new modules.
146
147         * modules/uniconv/u32-strconv-to-locale: New file.
148         * lib/uniconv/u32-strconv-to-locale.c: New file.
149
150         * modules/uniconv/u16-strconv-to-locale: New file.
151         * lib/uniconv/u16-strconv-to-locale.c: New file.
152
153         * modules/uniconv/u8-strconv-to-locale: New file.
154         * lib/uniconv/u8-strconv-to-locale.c: New file.
155
156         * modules/uniconv/u32-strconv-from-locale: New file.
157         * lib/uniconv/u32-strconv-from-locale.c: New file.
158
159         * modules/uniconv/u16-strconv-from-locale: New file.
160         * lib/uniconv/u16-strconv-from-locale.c: New file.
161
162         * modules/uniconv/u8-strconv-from-locale: New file.
163         * lib/uniconv/u8-strconv-from-locale.c: New file.
164
165         * modules/uniconv/u32-strconv-to-enc: New file.
166         * lib/uniconv/u32-strconv-to-enc.c: New file.
167         * modules/uniconv/u32-strconv-to-enc-tests: New file.
168         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
169
170         * modules/uniconv/u16-strconv-to-enc: New file.
171         * lib/uniconv/u16-strconv-to-enc.c: New file.
172         * lib/uniconv/u-strconv-to-enc.h: New file.
173         * modules/uniconv/u16-strconv-to-enc-tests: New file.
174         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
175
176         * modules/uniconv/u8-strconv-to-enc: New file.
177         * lib/uniconv/u8-strconv-to-enc.c: New file.
178         * modules/uniconv/u8-strconv-to-enc-tests: New file.
179         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
180
181         * modules/uniconv/u32-strconv-from-enc: New file.
182         * lib/uniconv/u32-strconv-from-enc.c: New file.
183         * modules/uniconv/u32-strconv-from-enc-tests: New file.
184         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
185
186         * modules/uniconv/u16-strconv-from-enc: New file.
187         * lib/uniconv/u16-strconv-from-enc.c: New file.
188         * modules/uniconv/u16-strconv-from-enc-tests: New file.
189         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
190
191         * modules/uniconv/u8-strconv-from-enc: New file.
192         * lib/uniconv/u8-strconv-from-enc.c: New file.
193         * lib/uniconv/u-strconv-from-enc.h: New file.
194         * modules/uniconv/u8-strconv-from-enc-tests: New file.
195         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
196
197         * modules/uniconv/u32-conv-from-enc: New file.
198         * lib/uniconv/u32-conv-from-enc.c: New file.
199         * modules/uniconv/u32-conv-from-enc-tests: New file.
200         * tests/uniconv/test-u32-conv-from-enc.c: New file.
201
202         * modules/uniconv/u16-conv-from-enc: New file.
203         * lib/uniconv/u16-conv-from-enc.c: New file.
204         * lib/uniconv/u-conv-from-enc.h: New file.
205         * modules/uniconv/u16-conv-from-enc-tests: New file.
206         * tests/uniconv/test-u16-conv-from-enc.c: New file.
207
208         * modules/uniconv/u8-conv-from-enc: New file.
209         * lib/uniconv/u8-conv-from-enc.c: New file.
210         * modules/uniconv/u8-conv-from-enc-tests: New file.
211         * tests/uniconv/test-u8-conv-from-enc.c: New file.
212
213         * modules/uniconv/base: New file.
214         * lib/uniconv.h: New file.
215
216 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
217
218         * doc/gnulib-tool.texi (Initial import): Update to match current
219         behavior with strdup module.
220         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
221         * lib/memmem.h: Remove; all uses removed.  This is now done
222         by <string.h>.
223         * lib/mempcpy.h: Likewise.
224         * lib/memrchr.h: Likewise.
225         * lib/stpcpy.h: Likewise.
226         * lib/stpncpy.h: Likewise.
227         * lib/strcase.h: Likewise.
228         * lib/strchrnul.h: Likewise.
229         * lib/strdup.h: Likewise.
230         * lib/strndup.h: Likewise.
231         * lib/strnlen.h: Likewise.
232         * lib/strpbrk.h: Likewise.
233         * lib/strsep.h: Likewise.
234         * lib/strstr.h: Likewise.
235         * lib/strtok_r.h: Likewise.
236         * lib/string_.h: New file.
237         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
238         Rely on <string.h> instead.
239         * lib/canon-host.c: Likewise.
240         * lib/chdir-long.c: Likewise.
241         * lib/concatpath.c: Likewise.
242         * lib/exclude.c: Likewise.
243         * lib/fchdir.c: Likewise.
244         * lib/getaddrinfo.c: Likewise.
245         * lib/getcwd.c: Likewise.
246         * lib/getsubopt.c: Likewise.
247         * lib/glob.c: Likewise.
248         * lib/hard-locale.c: Likewise.
249         * lib/iconvme.c: Likewise.
250         * lib/javacomp.c: Likewise.
251         * lib/mempcpy.c: Likewise.
252         * lib/memrchr.c: Likewise.
253         * lib/regex_internal.h: Likewise.
254         * lib/stpncpy.c: Likewise.
255         * lib/strcasecmp.c: Likewise.
256         * lib/strchrnul.c: Likewise.
257         * lib/strdup.c: Likewise.
258         * lib/striconv.c: Likewise.
259         * lib/striconveh.c: Likewise.
260         * lib/striconveha.c: Likewise.
261         * lib/strncasecmp.c: Likewise.
262         * lib/strndup.c: Likewise.
263         * lib/strnlen.c: Likewise.
264         * lib/strsep.c: Likewise.
265         * lib/strstr.c: Likewise.
266         * lib/strtok_r.c: Likewise.
267         * lib/userspec.c: Likewise.
268         * lib/w32spawn.h: Likewise.
269         * lib/xstrndup.c: Likewise.
270         * lib/mountlist.c (strstr): Remove decl.
271         * m4/string_h.m4: New file.
272         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
273         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
274         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
275         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
276         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
277         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
278         Set REPLACE_STRCASECMP if necessary.
279         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
280         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
281         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
282         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
283         HAVE_DECL_STRDUP if necessary.
284         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
285         since gl_FUNC_STRNDUP does that now.
286         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
287         Check for decl here...
288         (gl_PREREQ_STRNLEN): ... not here.
289         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
290         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
291         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
292         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
293         necessary.
294         * modules/string: New file.
295         * modules/memmem (Files): Remove special-purpose include file.
296         (Depends-on): Add string.
297         (Include): Include <string.h>, not the removed file.
298         * modules/mempcpy: Likewise.
299         * modules/memrchr: Likewise.
300         * modules/stpcpy: Likewise.
301         * modules/stpncpy: Likewise.
302         * modules/strcase: Likewise.
303         * modules/strchrnul: Likewise.
304         * modules/strdup: Likewise.
305         * modules/strndup: Likewise.
306         * modules/strnlen: Likewise.
307         * modules/strpbrk: Likewise.
308         * modules/strsep: Likewise.
309         * modules/strstr: Likewise.
310         * modules/strtok_r: Likewise.
311         * tests/test-dirname.c: Don't include "strdup.h", since
312         <string.h> now suffices.
313         * tests/test-memmem.c: Don't include "memmem.h", since
314         <string.h> now suffices.
315
316 2007-01-25  Bruno Haible  <bruno@clisp.org>
317
318         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
319         *resultp is 0.
320
321         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
322         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
323         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
324         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
325
326         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
327         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
328         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
329         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
330         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
331         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
332
333 2007-01-24  Bruno Haible  <bruno@clisp.org>
334
335         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
336         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
337         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
338         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
339         gl_FUNC_FTS_CORE.
340         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
341         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
342         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
343         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
344         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
345         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
346         gl_FUNC_FCHOWNAT.
347         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
348         gl_FUNC_STRFTIME.
349         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
350         Reported by Ralf Wildenhues.
351
352 2007-01-24  Bruno Haible  <bruno@clisp.org>
353
354         Drop AC_REQUIRE calls that are redundant with the module dependencies.
355         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
356         gl_GETADDRINFO.
357         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
358         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
359         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
360
361 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
362
363         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
364         Don't use 'exit'; just return from 'main'.
365         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
366
367         * lib/fnmatch_.h: Readjust white space and comments to match
368         glibc, to avoid spurious diffs.
369
370 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
371
372         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
373         2004-12-01 change by Jakub Jelinek, since this code won't compile
374         if !LIBC.  Problem reported by Bob Proulx.
375
376 2007-01-23  Bruno Haible  <bruno@clisp.org>
377
378         * lib/striconveh.c: Include c-strcaseeq.h.
379         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
380         * modules/striconveh (Depends-on): Add c-strcaseeq.
381
382 2007-01-23  Bruno Haible  <bruno@clisp.org>
383
384         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
385
386         * modules/c-strcaseeq: New file.
387         * lib/c-strcaseeq.h: New file.
388
389         * modules/streq: New file.
390         * lib/streq.h: New file.
391
392 2007-01-23  Bruno Haible  <bruno@clisp.org>
393
394         * modules/striconveha-tests: New file.
395         * tests/test-striconveha.c: New file.
396
397         * lib/striconveha.h: Include <stdbool.h>.
398         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
399         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
400         (mem_iconveha_notranslit): Renamed from mem_iconveha.
401         (mem_iconveha): New function.
402         (str_iconveha_notranslit): Renamed from str_iconveha.
403         (str_iconveha): New function.
404         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
405         c-strcase.
406
407 2007-01-23  Bruno Haible  <bruno@clisp.org>
408
409         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
410         encodings without forgiving before trying any encoding with handler.
411         (str_iconveha): Try all encodings without forgiving before trying any
412         encoding with handler.
413
414 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
415
416         Import the following changes from libc.
417
418         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
419
420         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
421
422         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
423
424         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
425         normal_bracket label.
426
427         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
428
429         [BZ #361]
430         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
431         to normal_bracket after fetching the next character.
432
433 2007-01-22  Bruno Haible  <bruno@clisp.org>
434
435         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
436         argument.
437         * lib/striconveh.c (iconv_carefully_1): New function.
438         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
439         argument.
440         (str_cd_iconveh): Update.
441         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
442         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
443         * tests/test-striconveh.c (MAGIC): New macro.
444         (new_offsets): New function.
445         (main): Test call with and without offsets.
446
447 2007-01-22  Bruno Haible  <bruno@clisp.org>
448
449         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
450         * modules/sys_select (Makefile.am): Likewise.
451         * modules/sys_socket (Makefile.am): Likewise.
452         * modules/sys_time (Makefile.am): Likewise.
453
454 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
455
456         * modules/gettimeofday (License): Change from GPL to LGPL, since
457         gettimeofday is a library function.
458
459 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
460
461         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
462
463 2007-01-21  Bruno Haible  <bruno@clisp.org>
464
465         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
466
467 2007-01-21  Bruno Haible  <bruno@clisp.org>
468
469         * modules/striconveha: New file.
470         * lib/striconveha.h: New file.
471         * lib/striconveha.c: New file.
472         * MODULES.html.sh (Internationalization functions): Add striconveha.
473         * lib/striconv.c (str_iconv): Optimize the case of an empty input
474         string.
475         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
476
477 2007-01-21  Bruno Haible  <bruno@clisp.org>
478
479         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
480         * lib/striconveh.c (str_iconveh): Likewise.
481
482 2007-01-21  Bruno Haible  <bruno@clisp.org>
483
484         * lib/striconveh.h (mem_iconveh): New declaration.
485         * lib/striconveh.c (mem_iconveh): New function.
486         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
487
488 2007-01-21  Bruno Haible  <bruno@clisp.org>
489
490         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
491
492         * lib/striconveh.h (mem_cd_iconveh): Change specification.
493         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
494         original result buffer.
495         (str_cd_iconveh): Update.
496         * tests/test-striconveh.c (main): Update.
497
498         * lib/striconv.h (mem_cd_iconv): Change specification.
499         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
500         result buffer.
501         (str_cd_iconv): Update.
502         * tests/test-striconv.c (main): Update.
503
504 2007-01-21  Bruno Haible  <bruno@clisp.org>
505
506         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
507
508 2007-01-20  Jim Meyering  <jim@meyering.net>
509
510         * lib/userspec.c (parse_with_separator): If a user or group string
511         starts with "+", skip the corresponding name-to-ID look-up, since
512         such a look-up must fail: user and group names may not include "+".
513
514 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
515
516         * lib/poll.c: Include sys/time.h and time.h unconditionally,
517         since we now assume the sys_time module.
518         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
519         check for sys/time.h; no longer needed.
520         * modules/poll (Depends-on): Depend on sys_time.
521
522 2007-01-18  Bruno Haible  <bruno@clisp.org>
523
524         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
525         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
526
527         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
528         gettimeofday.
529
530         * tests/test-gettimeofday.c: Include <time.h>.
531         (dummy): Remove variable.
532
533         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
534         gl_HEADER_SYS_TIME_H.
535         (gl_HEADER_SYS_TIME_H): New macro.
536
537         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
538         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
539         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
540         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
541         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
542         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
543         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
544         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
545         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
546         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
547         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
548
549         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
550         last change; it caused a compilation error when cross-compiling to
551         Cygwin.
552
553 2007-01-18  Jim Meyering  <jim@meyering.net>
554
555         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
556         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
557         than the race-prone "test -d sys || mkdir sys".
558         (configure.ac): Use AC_PROG_MKDIR_P.
559         * modules/sys_select: Likewise.
560         * modules/sys_socket: Likewise.
561         * modules/sys_time: Likewise.
562
563 2007-01-18  Eric Blake  <ebb9@byu.net>
564
565         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
566         replace gettimeofday.
567         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
568         name, to avoid infinite recursion.
569
570 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
571
572         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
573         module sys_time.
574         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
575         assume timespec.h defines struct timeval.
576         * lib/settime.c: Likewise.
577         * lib/utimens.c: Likewise.
578         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
579         since we now assume the gettimeofday module.
580         * lib/tempname.c (__gen_tempname): Likewise.
581         * lib/gettimeofday.h: Remove.
582         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
583         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
584         Include <time.h>, for 'time()'.
585         (localtime_buffer_addr): Also use this workaround if
586         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
587         to simplify the uses.  All uses changed.
588         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
589         that #undef is inside {}, and 'const' follows type name consistently.
590         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
591         (gettimeofday): Do not use the maximum possible value for
592         tv->tv_usec, since that might break usages other than ls.c.
593         Instead, we'll leave ls.c alone.  This undoes today's patch
594         by Bruno.  Add a compile-time warning for 1s-clock resolution;
595         we've never observed the problem but might as well keep the
596         canary.
597         * lib/nanosleep.c: Include timespec.h first, for interface check.
598         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
599         now assume the sys_time module.
600         * lib/tempname.c: Likewise.
601         * lib/timespec.h: Likewise.
602         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
603         needed.
604         * lib/strftime.c: Likewise.
605         * lib/timespec.h: Likewise.
606         * lib/posixtm.c: Include posixtm.h first, for interface check.
607         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
608         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
609         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
610         * lib/sys_time_.h: New file.
611         * lib/timespec.h (struct timespec): Use long int, not long.
612         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
613         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
614         Remove obsolescent call to AC_HEADER_TIME.
615         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
616         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
617         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
618         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
619         Likewise.
620         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
621         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
622         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
623         into the sys_time module.  Check for gettimeofday just once.
624         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
625         for gettimeofday signature to just check the signature.  Merely
626         compile it, since linking doesn't test signature.  Improve test for
627         whether gettimeofday.o is actually needed.
628         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
629         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
630         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
631         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
632         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
633         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
634         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
635         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
636         than worrying about sys/time.h.
637         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
638         Don't bother worrying about TIME_WITH_SYS_TIME.
639         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
640         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
641         * m4/sys_time_h.m4: New file.
642         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
643         Don't include sys/time.h.  Return from main rather than exiting.
644         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
645         all uses changed.
646         * modules/gethrxtime (Depends-on): Add sys_time.
647         * modules/gettime (Depends-on): Likewise.
648         * modules/gettimeofday (Depends-on): Likewise.
649         * modules/nanosleep (Depends-on): Likewise.
650         * modules/settime (Depends-on): Likewise.
651         * modules/tempname (Depends-on): Likewise.
652         * modules/utimens (Depends-on): Likewise.
653         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
654         (Include:) Change back to <sys/time.h>.
655         (Maintainer:) Add self.
656         * modules/sys_time: New file.
657         * modules/tempname (Depends-on): Add gettimeofday.
658         * tests/test-gettimeofday.c: Include <sys/time.h>
659         rather than gettimeofday.h.
660
661 2007-01-17  Bruno Haible  <bruno@clisp.org>
662
663         * gnulib-tool (func_get_license): Revert last patch. Instead, let
664         the license default to GPL.
665         (func_create_testdir): Don't complain if a module is LGPL and its
666         tests module depends on GPLed modules.
667
668 2007-01-17  Bruno Haible  <bruno@clisp.org>
669
670         * lib/gettimeofday.c (gettimeofday): Add code for the case
671         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
672         maximum possible value for tv->tv_usec, rather than the minimum one.
673
674 2005-10-08  Martin Lambers  <marlam@marlam.de>
675 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
676 2007-01-16  Bruno Haible  <bruno@clisp.org>
677
678         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
679         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
680         gl_FUNC_GETTIMEOFDAY.
681         (Include): Add gettimeofday.h.
682         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
683         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
684         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
685         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
686         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
687         * lib/gettimeofday.h: New file.
688         * lib/gettimeofday.c: Include <sys/timeb.h>.
689         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
690         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
691         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
692         fall back on time().
693
694         * tests/test-gettimeofday.c: New file.
695         * modules/gettimeofday-tests: New file.
696
697 2007-01-16  Eric Blake  <ebb9@byu.net>
698
699         * modules/fnmatch (Depends-on): Depend on wchar.
700         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
701         * m4/fnmatch.m4: Likewise.
702         * modules/mbchar (Makefile.am): Assume <wchar.h>.
703         * m4/mbchar.m4: Likewise.
704         * modules/mbswidth (Depends-on): Depend on wchar.
705         * lib/mbswidth.c: Assume <wchar.h>.
706         * m4/mbswidth.m4: Likewise.
707         * modules/quotearg (Depends-on): Depend on wchar.
708         * lib/quotearg.c: Assume <wchar.h>.
709         * m4/quotearg.m4: Likewise.
710         * modules/regex (Depends-on): Depend on wchar.
711         * lib/regex_internal.h: Assume <wchar.h>.
712         * m4/regex.m4: Likewise.
713         * modules/stdint (Depends-on): Depend on wchar.
714         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
715         * m4/stdint.m4: Likewise.
716         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
717         * modules/strftime (Depends-on): Depend on wchar.
718         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
719         * modules/strtol (Depends-on): Depend on wchar.
720         * lib/strtol.c: Assume <wchar.h>.
721         * modules/wcwidth (Depends-on): Depend on wchar.
722         * lib/wcwidth.h: Assume <wchar.h>.
723         * m4/wcwidth.m4: Likewise.
724
725 2007-01-16  Bruno Haible  <bruno@clisp.org>
726
727         * modules/csharpexec-script: New, created from...
728         * modules/csharpexec: ... this.
729
730 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
731
732         * modules/javaexec-script: New, created from...
733         * modules/javaexec: ... this.
734
735 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
736
737         * modules/poll (Dependencies): Add sys_select.
738
739 2007-01-15  Jim Meyering  <jim@meyering.net>
740
741         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
742         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
743         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
744         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
745
746 2007-01-15  Bruno Haible  <bruno@clisp.org>
747
748         * modules/striconveh: New file.
749         * lib/striconveh.h: New file.
750         * lib/striconveh.c: New file.
751         * MODULES.html.sh (Internationalization functions): Add striconveh.
752
753         * modules/striconveh-tests: New file.
754         * tests/test-striconveh.c: New file.
755
756 2007-01-15  Bruno Haible  <bruno@clisp.org>
757
758         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
759         not from GNU libiconv or GNU libc.
760
761 2007-01-15  Bruno Haible  <bruno@clisp.org>
762
763         * doc/gnulib-intro.texi (Copyright): Explain the different license
764         terms for module descriptions, autoconf macros, tests, documentation.
765
766 2007-01-14  Bruno Haible  <bruno@clisp.org>
767
768         * modules/striconv-tests: New file.
769         * tests/test-striconv.c: New file.
770
771 2007-01-14  Bruno Haible  <bruno@clisp.org>
772
773         * modules/iconv-tests: New file.
774         * tests/test-iconv.c: New file.
775
776 2007-01-14  Bruno Haible  <bruno@clisp.org>
777
778         * gnulib-tool (func_get_license): For test modules, use the license of
779         the main module.
780
781 2007-01-14  Bruno Haible  <bruno@clisp.org>
782
783         * modules/iconv (Include): Clarify that <iconv.h> can only be included
784         if iconv is found to exist.
785
786 2007-01-14  Bruno Haible  <bruno@clisp.org>
787
788         * modules/c-ctype-tests: New file.
789         * tests/test-c-ctype.c: New file.
790
791 2007-01-14  Bruno Haible  <bruno@clisp.org>
792
793         * modules/binary-io-tests: New file.
794         * tests/test-binary-io.sh: New file.
795         * tests/test-binary-io.c: New file.
796
797 2007-01-14  Bruno Haible  <bruno@clisp.org>
798
799         * modules/array-oset-tests: New file.
800         * tests/test-array_oset.c: New file.
801
802 2007-01-14  Bruno Haible  <bruno@clisp.org>
803
804         * modules/array-list-tests: New file.
805         * tests/test-array_list.c: New file.
806
807 2007-01-14  Bruno Haible  <bruno@clisp.org>
808
809         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
810         and make.
811         Reported by Simon Josefsson in
812         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
813
814 2007-01-14  Bruno Haible  <bruno@clisp.org>
815
816         * modules/allocsa-tests: New file.
817         * tests/test-allocsa.c: New file.
818
819 2007-01-14  Bruno Haible  <bruno@clisp.org>
820
821         * modules/fchdir (Depends-on): Add absolute-header.
822         * modules/unistd (Depends-on): Likewise.
823
824 2006-12-30  Bruno Haible  <bruno@clisp.org>
825
826         * modules/fchdir: New file.
827         * modules/unistd (Files): Add lib/unistd_.h.
828         (Makefile.am): Generate unistd.h from unistd_.h.
829         * lib/fchdir.c: New file.
830         * lib/dirent_.h: New file.
831         * lib/unistd_.h: New file.
832         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
833         * m4/fchdir.m4: New file.
834         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
835         (gl_HEADER_UNISTD): Invoke it.
836         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
837         function.
838         * lib/backupfile.c (opendir, closedir): Undefine.
839         * lib/chown.c (open, close): Undefine.
840         * lib/clean-temp.c (open, close): Undefine.
841         * lib/copy-file.c (open, close): Undefine.
842         * lib/execute.c (open, close): Undefine.
843         * lib/fsusage.c (open, close): Undefine.
844         * lib/gc-gnulib.c (open, close): Undefine.
845         * lib/getcwd.c (opendir, closedir): Undefine.
846         * lib/glob.c (opendir, closedir): Undefine.
847         * lib/javacomp.c (open, close): Undefine.
848         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
849         * lib/openat-proc.c (open, close): Undefine.
850         * lib/pagealign_alloc.c (open, close): Undefine.
851         * lib/pipe.c (open, close): Undefine.
852         * lib/progreloc.c (open, close): Undefine.
853         * lib/savedir.c (opendir, closedir): Undefine.
854         * lib/utime.c (open, close): Undefine.
855         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
856
857 2007-01-10  Bruno Haible  <bruno@clisp.org>
858
859         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
860
861 2007-01-12  Eric Blake  <ebb9@byu.net>
862
863         Provide a robust <wchar.h>.  Further simplifications are now
864         possible in other modules, but not included here.
865         * modules/wchar: New module.
866         * m4/wchar.m4: New file.
867         * lib/wchar_.h: Likewise.
868         * modules/mbchar (Depends-on): Depend on wchar, as the first use
869         of the new module.
870         * MODULES.html.sh (Extended multibyte and wide character utilities):
871         New section.
872
873 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
874
875         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
876         to a reasonable default for memory allocation.
877         (xreadlink): Don't allocate a huge buffer, to work around a buggy
878         file system that reports garbage st_size values for symlinks.
879         Problem reported by Liyang Hu.
880
881 2007-01-11  Simon Josefsson  <simon@josefsson.org>
882
883         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
884         Emacs .#* auto-save files).
885
886 2007-01-11  Bruno Haible  <bruno@clisp.org>
887
888         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
889         directory.
890
891 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
892
893         Use @...@ consistently in lib/wctype_.h.
894         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
895         on it being set to 1 or 0.
896         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
897         go back to AC_SUBSTing it.
898         * modules/wctype (Makefile.am): Undo previous change.
899
900 2007-01-10  Eric Blake  <ebb9@byu.net>
901
902         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
903         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
904         * modules/wctype (Makefile.am): Likewise.
905         Reported by Chris McGuire.
906
907 2007-01-10  Jim Meyering  <jim@meyering.net>
908
909         fts.c: a small readability/maintainability improvement
910         * lib/fts.c (fts_read): Make this code slightly more readable and
911         maintainable by hoisting the "sp->fts_cur = p" assignments to
912         immediately follow the statements that set P.  Derived from
913         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
914
915 2007-01-10  Eric Blake  <ebb9@byu.net>
916
917         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
918         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
919         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
920         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
921         Reported by Chris McGuire.
922
923 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
924
925         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
926         in sed script.
927
928 2007-01-09  Bruno Haible  <bruno@clisp.org>
929
930         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
931         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
932         variables.
933         (func_module): Use them.
934
935 2007-01-09  Bruno Haible  <bruno@clisp.org>
936
937         * modules/unistr/base: New file.
938         * lib/unistr.h: New file.
939
940         * modules/unistr/u8-to-u16: New file.
941         * lib/unistr/u8-to-u16.c: New file.
942
943         * modules/unistr/u8-to-u32: New file.
944         * lib/unistr/u8-to-u32.c: New file.
945
946         * modules/unistr/u16-to-u8: New file.
947         * lib/unistr/u16-to-u8.c: New file.
948
949         * modules/unistr/u16-to-u32: New file.
950         * lib/unistr/u16-to-u32.c: New file.
951
952         * modules/unistr/u32-to-u8: New file.
953         * lib/unistr/u32-to-u8.c: New file.
954
955         * modules/unistr/u32-to-u16: New file.
956         * lib/unistr/u32-to-u16.c: New file.
957
958         * modules/unistr/u8-check: New file.
959         * modules/unistr/u16-check: New file.
960         * modules/unistr/u32-check: New file.
961         * lib/unistr/u8-check.c: New file.
962         * lib/unistr/u16-check.c: New file.
963         * lib/unistr/u32-check.c: New file.
964
965         * modules/unistr/u8-chr: New file.
966         * modules/unistr/u16-chr: New file.
967         * modules/unistr/u32-chr: New file.
968         * lib/unistr/u8-chr.c: New file.
969         * lib/unistr/u16-chr.c: New file.
970         * lib/unistr/u32-chr.c: New file.
971
972         * modules/unistr/u8-cmp: New file.
973         * modules/unistr/u16-cmp: New file.
974         * modules/unistr/u32-cmp: New file.
975         * lib/unistr/u8-cmp.c: New file.
976         * lib/unistr/u16-cmp.c: New file.
977         * lib/unistr/u32-cmp.c: New file.
978
979         * modules/unistr/u8-cpy: New file.
980         * modules/unistr/u16-cpy: New file.
981         * modules/unistr/u32-cpy: New file.
982         * lib/unistr/u8-cpy.c: New file.
983         * lib/unistr/u16-cpy.c: New file.
984         * lib/unistr/u32-cpy.c: New file.
985         * lib/unistr/u-cpy.h: New file.
986
987         * modules/unistr/u8-cpy-alloc: New file.
988         * modules/unistr/u16-cpy-alloc: New file.
989         * modules/unistr/u32-cpy-alloc: New file.
990         * lib/unistr/u8-cpy-alloc.c: New file.
991         * lib/unistr/u16-cpy-alloc.c: New file.
992         * lib/unistr/u32-cpy-alloc.c: New file.
993         * lib/unistr/u-cpy-alloc.h: New file.
994
995         * modules/unistr/u8-endswith: New file.
996         * modules/unistr/u16-endswith: New file.
997         * modules/unistr/u32-endswith: New file.
998         * lib/unistr/u8-endswith.c: New file.
999         * lib/unistr/u16-endswith.c: New file.
1000         * lib/unistr/u32-endswith.c: New file.
1001         * lib/unistr/u-endswith.h: New file.
1002
1003         * modules/unistr/u8-mblen: New file.
1004         * modules/unistr/u16-mblen: New file.
1005         * modules/unistr/u32-mblen: New file.
1006         * lib/unistr/u8-mblen.c: New file.
1007         * lib/unistr/u16-mblen.c: New file.
1008         * lib/unistr/u32-mblen.c: New file.
1009
1010         * modules/unistr/u8-mbtouc: New file.
1011         * modules/unistr/u16-mbtouc: New file.
1012         * modules/unistr/u32-mbtouc: New file.
1013         * lib/unistr/u8-mbtouc.c: New file.
1014         * lib/unistr/u16-mbtouc.c: New file.
1015         * lib/unistr/u32-mbtouc.c: New file.
1016
1017         * modules/unistr/u8-mbtouc-safe: New file.
1018         * modules/unistr/u16-mbtouc-safe: New file.
1019         * modules/unistr/u32-mbtouc-safe: New file.
1020         * lib/unistr/u8-mbtouc-safe.c: New file.
1021         * lib/unistr/u16-mbtouc-safe.c: New file.
1022         * lib/unistr/u32-mbtouc-safe.c: New file.
1023
1024         * modules/unistr/u8-move: New file.
1025         * modules/unistr/u16-move: New file.
1026         * modules/unistr/u32-move: New file.
1027         * lib/unistr/u8-move.c: New file.
1028         * lib/unistr/u16-move.c: New file.
1029         * lib/unistr/u32-move.c: New file.
1030         * lib/unistr/u-move.h: New file.
1031
1032         * modules/unistr/u8-next: New file.
1033         * modules/unistr/u16-next: New file.
1034         * modules/unistr/u32-next: New file.
1035         * lib/unistr/u8-next.c: New file.
1036         * lib/unistr/u16-next.c: New file.
1037         * lib/unistr/u32-next.c: New file.
1038
1039         * modules/unistr/u8-prev: New file.
1040         * modules/unistr/u16-prev: New file.
1041         * modules/unistr/u32-prev: New file.
1042         * lib/unistr/u8-prev.c: New file.
1043         * lib/unistr/u16-prev.c: New file.
1044         * lib/unistr/u32-prev.c: New file.
1045
1046         * modules/unistr/u8-set: New file.
1047         * modules/unistr/u16-set: New file.
1048         * modules/unistr/u32-set: New file.
1049         * lib/unistr/u8-set.c: New file.
1050         * lib/unistr/u16-set.c: New file.
1051         * lib/unistr/u32-set.c: New file.
1052         * lib/unistr/u-set.h: New file.
1053
1054         * modules/unistr/u8-startswith: New file.
1055         * modules/unistr/u16-startswith: New file.
1056         * modules/unistr/u32-startswith: New file.
1057         * lib/unistr/u8-startswith.c: New file.
1058         * lib/unistr/u16-startswith.c: New file.
1059         * lib/unistr/u32-startswith.c: New file.
1060         * lib/unistr/u-startswith.h: New file.
1061
1062         * modules/unistr/u8-stpcpy: New file.
1063         * modules/unistr/u16-stpcpy: New file.
1064         * modules/unistr/u32-stpcpy: New file.
1065         * lib/unistr/u8-stpcpy.c: New file.
1066         * lib/unistr/u16-stpcpy.c: New file.
1067         * lib/unistr/u32-stpcpy.c: New file.
1068         * lib/unistr/u-stpcpy.h: New file.
1069
1070         * modules/unistr/u8-stpncpy: New file.
1071         * modules/unistr/u16-stpncpy: New file.
1072         * modules/unistr/u32-stpncpy: New file.
1073         * lib/unistr/u8-stpncpy.c: New file.
1074         * lib/unistr/u16-stpncpy.c: New file.
1075         * lib/unistr/u32-stpncpy.c: New file.
1076         * lib/unistr/u-stpncpy.h: New file.
1077
1078         * modules/unistr/u8-strcat: New file.
1079         * modules/unistr/u16-strcat: New file.
1080         * modules/unistr/u32-strcat: New file.
1081         * lib/unistr/u8-strcat.c: New file.
1082         * lib/unistr/u16-strcat.c: New file.
1083         * lib/unistr/u32-strcat.c: New file.
1084         * lib/unistr/u-strcat.h: New file.
1085
1086         * modules/unistr/u8-strchr: New file.
1087         * modules/unistr/u16-strchr: New file.
1088         * modules/unistr/u32-strchr: New file.
1089         * lib/unistr/u8-strchr.c: New file.
1090         * lib/unistr/u16-strchr.c: New file.
1091         * lib/unistr/u32-strchr.c: New file.
1092
1093         * modules/unistr/u8-strcmp: New file.
1094         * modules/unistr/u16-strcmp: New file.
1095         * modules/unistr/u32-strcmp: New file.
1096         * lib/unistr/u8-strcmp.c: New file.
1097         * lib/unistr/u16-strcmp.c: New file.
1098         * lib/unistr/u32-strcmp.c: New file.
1099
1100         * modules/unistr/u8-strcpy: New file.
1101         * modules/unistr/u16-strcpy: New file.
1102         * modules/unistr/u32-strcpy: New file.
1103         * lib/unistr/u8-strcpy.c: New file.
1104         * lib/unistr/u16-strcpy.c: New file.
1105         * lib/unistr/u32-strcpy.c: New file.
1106         * lib/unistr/u-strcpy.h: New file.
1107
1108         * modules/unistr/u8-strcspn: New file.
1109         * modules/unistr/u16-strcspn: New file.
1110         * modules/unistr/u32-strcspn: New file.
1111         * lib/unistr/u8-strcspn.c: New file.
1112         * lib/unistr/u16-strcspn.c: New file.
1113         * lib/unistr/u32-strcspn.c: New file.
1114         * lib/unistr/u-strcspn.h: New file.
1115
1116         * modules/unistr/u8-strdup: New file.
1117         * modules/unistr/u16-strdup: New file.
1118         * modules/unistr/u32-strdup: New file.
1119         * lib/unistr/u8-strdup.c: New file.
1120         * lib/unistr/u16-strdup.c: New file.
1121         * lib/unistr/u32-strdup.c: New file.
1122         * lib/unistr/u-strdup.h: New file.
1123
1124         * modules/unistr/u8-strlen: New file.
1125         * modules/unistr/u16-strlen: New file.
1126         * modules/unistr/u32-strlen: New file.
1127         * lib/unistr/u8-strlen.c: New file.
1128         * lib/unistr/u16-strlen.c: New file.
1129         * lib/unistr/u32-strlen.c: New file.
1130         * lib/unistr/u-strlen.h: New file.
1131
1132         * modules/unistr/u8-strmblen: New file.
1133         * modules/unistr/u16-strmblen: New file.
1134         * modules/unistr/u32-strmblen: New file.
1135         * lib/unistr/u8-strmblen.c: New file.
1136         * lib/unistr/u16-strmblen.c: New file.
1137         * lib/unistr/u32-strmblen.c: New file.
1138
1139         * modules/unistr/u8-strmbtouc: New file.
1140         * modules/unistr/u16-strmbtouc: New file.
1141         * modules/unistr/u32-strmbtouc: New file.
1142         * lib/unistr/u8-strmbtouc.c: New file.
1143         * lib/unistr/u16-strmbtouc.c: New file.
1144         * lib/unistr/u32-strmbtouc.c: New file.
1145
1146         * modules/unistr/u8-strncat: New file.
1147         * modules/unistr/u16-strncat: New file.
1148         * modules/unistr/u32-strncat: New file.
1149         * lib/unistr/u8-strncat.c: New file.
1150         * lib/unistr/u16-strncat.c: New file.
1151         * lib/unistr/u32-strncat.c: New file.
1152         * lib/unistr/u-strncat.h: New file.
1153
1154         * modules/unistr/u8-strncmp: New file.
1155         * modules/unistr/u16-strncmp: New file.
1156         * modules/unistr/u32-strncmp: New file.
1157         * lib/unistr/u8-strncmp.c: New file.
1158         * lib/unistr/u16-strncmp.c: New file.
1159         * lib/unistr/u32-strncmp.c: New file.
1160
1161         * modules/unistr/u8-strncpy: New file.
1162         * modules/unistr/u16-strncpy: New file.
1163         * modules/unistr/u32-strncpy: New file.
1164         * lib/unistr/u8-strncpy.c: New file.
1165         * lib/unistr/u16-strncpy.c: New file.
1166         * lib/unistr/u32-strncpy.c: New file.
1167         * lib/unistr/u-strncpy.h: New file.
1168
1169         * modules/unistr/u8-strnlen: New file.
1170         * modules/unistr/u16-strnlen: New file.
1171         * modules/unistr/u32-strnlen: New file.
1172         * lib/unistr/u8-strnlen.c: New file.
1173         * lib/unistr/u16-strnlen.c: New file.
1174         * lib/unistr/u32-strnlen.c: New file.
1175         * lib/unistr/u-strnlen.h: New file.
1176
1177         * modules/unistr/u8-strpbrk: New file.
1178         * modules/unistr/u16-strpbrk: New file.
1179         * modules/unistr/u32-strpbrk: New file.
1180         * lib/unistr/u8-strpbrk.c: New file.
1181         * lib/unistr/u16-strpbrk.c: New file.
1182         * lib/unistr/u32-strpbrk.c: New file.
1183         * lib/unistr/u-strpbrk.h: New file.
1184
1185         * modules/unistr/u8-strrchr: New file.
1186         * modules/unistr/u16-strrchr: New file.
1187         * modules/unistr/u32-strrchr: New file.
1188         * lib/unistr/u8-strrchr.c: New file.
1189         * lib/unistr/u16-strrchr.c: New file.
1190         * lib/unistr/u32-strrchr.c: New file.
1191
1192         * modules/unistr/u8-strspn: New file.
1193         * modules/unistr/u16-strspn: New file.
1194         * modules/unistr/u32-strspn: New file.
1195         * lib/unistr/u8-strspn.c: New file.
1196         * lib/unistr/u16-strspn.c: New file.
1197         * lib/unistr/u32-strspn.c: New file.
1198         * lib/unistr/u-strspn.h: New file.
1199
1200         * modules/unistr/u8-strstr: New file.
1201         * modules/unistr/u16-strstr: New file.
1202         * modules/unistr/u32-strstr: New file.
1203         * lib/unistr/u8-strstr.c: New file.
1204         * lib/unistr/u16-strstr.c: New file.
1205         * lib/unistr/u32-strstr.c: New file.
1206         * lib/unistr/u-strstr.h: New file.
1207
1208         * modules/unistr/u8-strtok: New file.
1209         * modules/unistr/u16-strtok: New file.
1210         * modules/unistr/u32-strtok: New file.
1211         * lib/unistr/u8-strtok.c: New file.
1212         * lib/unistr/u16-strtok.c: New file.
1213         * lib/unistr/u32-strtok.c: New file.
1214         * lib/unistr/u-strtok.h: New file.
1215
1216         * modules/unistr/u8-uctomb: New file.
1217         * modules/unistr/u16-uctomb: New file.
1218         * modules/unistr/u32-uctomb: New file.
1219         * lib/unistr/u8-uctomb.c: New file.
1220         * lib/unistr/u16-uctomb.c: New file.
1221         * lib/unistr/u32-uctomb.c: New file.
1222
1223         * MODULES.html.sh (Unicode string functions): Add the new modules.
1224
1225 2007-01-08  Bruno Haible  <bruno@clisp.org>
1226
1227         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
1228         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
1229         subdirectories.
1230
1231 2007-01-08  Karl Berry  <karl@gnu.org>
1232
1233         * doc/error.texi: mention that main() fns must set program_name
1234         when progname is used.
1235
1236 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
1237
1238         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
1239         WCTYPE_H is empty, for the benefit of builds from non-distclean
1240         directories.  Problem reported by Eric Blake in
1241         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
1242
1243 2007-01-08  Bruno Haible  <bruno@clisp.org>
1244
1245         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
1246         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
1247         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
1248         PROVIDE_CANONICALIZE_FILENAME_MODE.
1249         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
1250
1251 2007-01-08  Bruno Haible  <bruno@clisp.org>
1252
1253         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
1254         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
1255         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
1256         * lib/fts.c: Likewise.
1257         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
1258
1259 2006-12-25  Bruno Haible  <bruno@clisp.org>
1260
1261         * modules/utf8-ucs4-safe: New file.
1262         * lib/utf8-ucs4-safe.h: New file.
1263         * lib/unistr/utf8-ucs4-safe.c: New file.
1264
1265         * modules/utf16-ucs4-safe: New file.
1266         * lib/utf16-ucs4-safe.h: New file.
1267         * lib/unistr/utf16-ucs4-safe.c: New file.
1268
1269         * MODULES.html.sh (Unicode string functions): Add the new modules.
1270
1271 2007-01-08  Bruno Haible  <bruno@clisp.org>
1272
1273         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
1274         (Depends-on): Add unitypes.
1275         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1276         (u8_mbtouc_aux): Move out to separate file.
1277         (u8_mbtouc): Use ucs4_t, uint8_t types.
1278         * lib/unistr/utf8-ucs4.c: New file.
1279
1280         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
1281         (Depends-on): Add unitypes.
1282         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1283         (u16_mbtouc_aux): Move out to separate file.
1284         (u16_mbtouc): Use ucs4_t, uint16_t types.
1285         * lib/unistr/utf16-ucs4.c: New file.
1286
1287         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
1288         (Depends-on): Add unitypes.
1289         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
1290         (u8_uctomb_aux): Move out to separate file.
1291         (u8_uctomb): Use ucs4_t, uint8_t types.
1292         * lib/unistr/ucs4-utf8.c: New file.
1293
1294         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
1295         (Depends-on): Add unitypes.
1296         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
1297         (u16_uctomb_aux): Move out to separate file.
1298         (u16_uctomb): Use ucs4_t, uint16_t types.
1299         * lib/unistr/ucs4-utf16.c: New file.
1300
1301 2006-12-25  Bruno Haible  <bruno@clisp.org>
1302
1303         * modules/unitypes: New file.
1304         * lib/unitypes.h: New file.
1305         * MODULES.html.sh (func_all_modules): New section "Unicode string
1306         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
1307         this section. Add unitypes.
1308
1309 2007-01-08  Bruno Haible  <bruno@clisp.org>
1310
1311         Avoid variable names that conflict with those from libtool.
1312         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
1313         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
1314         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1315         library_names_spec to acl_library_names_spec, hardcode_* to
1316         acl_hardcode_*.
1317         Reported by Ralf Wildenhues.
1318
1319 2007-01-08  Bruno Haible  <bruno@clisp.org>
1320
1321         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1322         definition.
1323         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1324         definition.
1325         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1326         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1327         definition.
1328         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1329         definition.
1330         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1331         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1332         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1333         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1334         definition.
1335         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1336         definition.
1337         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1338         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1339         GC_USE_<algorithm>.
1340         * lib/gc-libgcrypt.c: Likewise.
1341         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1342         * modules/gc-arctwo (configure.ac): Likewise.
1343         * modules/gc-des (configure.ac): Likewise.
1344         * modules/gc-hmac-md5 (configure.ac): Likewise.
1345         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1346         * modules/gc-md2 (configure.ac): Likewise.
1347         * modules/gc-md4 (configure.ac): Likewise.
1348         * modules/gc-md5 (configure.ac): Likewise.
1349         * modules/gc-random (configure.ac): Likewise.
1350         * modules/gc-rijndael (configure.ac): Likewise.
1351         * modules/gc-sha1 (configure.ac): Likewise.
1352
1353 2007-01-08  Bruno Haible  <bruno@clisp.org>
1354
1355         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1356         macro definition.
1357         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1358         definition.
1359         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1360         definition.
1361         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1362         * modules/fcntl-safer (configure.ac): Likewise.
1363         * modules/fopen-safer (configure.ac): Likewise.
1364         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1365         GNULIB_FWRITEERROR macro definition.
1366
1367 2007-01-08  Bruno Haible  <bruno@clisp.org>
1368
1369         * m4/gnulib-common.m4: New file.
1370         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1371         (func_get_filelist): Add m4/gnulib-common.m4.
1372
1373 2007-01-08  Bruno Haible  <bruno@clisp.org>
1374
1375         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1376         command.
1377
1378 2007-01-08  Jim Meyering  <jim@meyering.net>
1379
1380         Use a more robust test for a "can't happen" condition.
1381         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1382         narrowed the st_size value.  Presuming the "can't happen" condition
1383         is true, that narrowing could conceivably convert an invalid st_size
1384         value into a valid one.  Instead, use a change based on Matthew
1385         Woehlke's original patch.
1386
1387         Slight readability improvement: use an assert-like macro
1388         in place of literal "abort ()" uses.
1389         * lib/fts.c (fts_assert): Define.
1390         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1391         Use this macro instead of a bare 'abort'.
1392
1393 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1394
1395         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1396         simply work around them.
1397         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1398         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1399         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1400         Don't bother to define as macros, since the standard doesn't require it.
1401         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1402         longer worry about IRIX 5.3.
1403         (HAVE_WCTYPE_CTMP_BUG): Remove.
1404
1405 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1406
1407         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1408         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1409         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1410         Problems reported by Georg Schwarz for IRIX 5.3.
1411
1412         * gnulib-tool (autoconf_minversion): Take the maximum version number
1413         found, not the minimum.  Problem reported by James Youngman.
1414
1415 2007-01-03  Karl Berry  <karl@gnu.org>
1416
1417         * doc/error.texi: new file, explaining interaction with progname.
1418         * doc/gnulib.texi: include it.  Update copyright.
1419
1420 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1421
1422         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1423         AC_CANONICAL_HOST, to improve autobuild outputs.
1424
1425 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1426             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1427
1428         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1429         sockets, server sockets, and other file descriptors.  Count errors
1430         to compute the return value.  Reorder the code a bit to be easier
1431         to follow.  Don't set event bits that were not requested (except
1432         POLLERR and POLLHUP).
1433
1434 2007-01-01  Bruno Haible  <bruno@clisp.org>
1435
1436         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1437
1438 2007-01-03  Jim Meyering  <jim@meyering.net>
1439
1440         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1441
1442 2007-01-02  Bruno Haible  <bruno@clisp.org>
1443
1444         * modules/settime (Include): Require timespec.h.
1445         * modules/nanosleep (Include): Likewise.
1446
1447 2007-01-01  Bruno Haible  <bruno@clisp.org>
1448
1449         * gnulib-tool (func_emit_copyright_notice): Bump year.
1450         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1451
1452 2007-01-01  Bruno Haible  <bruno@clisp.org>
1453
1454         Improve support for OpenBSD.
1455         * build-aux/config.rpath (libname_spec): Export.
1456         (library_names_spec): New variable. Export.
1457         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
1458         library_names_spec from the config.rpath output. Locate shared library
1459         through the name pattern in library_names_spec.
1460
1461 2007-01-01  Eric Blake  <ebb9@byu.net>
1462
1463         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1464
1465 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1466
1467         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1468         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1469         assume the C locale, and avoid an "eval" that could cause trouble.
1470         Problem with SORT reported by Bob Proulx.
1471
1472         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1473         Define.  Trivial patch from Henning Nielsen Lund, originally
1474         sent to bug-grep@gnu.org today.
1475
1476 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1477
1478         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
1479         struct stat.  Problem reported by Henning Nielsen Lund.
1480         * lib/acl.c: Include acl.h first, to check interface.  Don't
1481         bother to include sys/types.h and sys/stat.h again.
1482
1483 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1484
1485         Import the following change from libc; problem reported by
1486         Sven Verdoolaege.
1487
1488         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
1489
1490         [BZ #1373]
1491         * lib/argp.h: Remove __NTH for __argp_usage inline function.
1492
1493 2006-12-28  Jim Meyering  <jim@meyering.net>
1494
1495         * build-aux/announce-gen: Do not assume that the package
1496         builds any of tar.gz, tar.bz2, and .xdelta files.
1497         Suggestion from Simon Josefsson.
1498
1499 2006-12-28  Simon Josefsson  <simon@josefsson.org>
1500
1501         * modules/announce-gen: New file.
1502
1503 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
1504
1505         * lib/mbchar.h: Just include <wctype.h>; the wctype module
1506         handles its gotchas now.
1507         * lib/mbswidth.c: Likewise.
1508         * lib/wcwidth.h: Likewise.
1509         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
1510         and iswcntrl; the wctype module does this stuff now.
1511         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1512         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1513         * modules/mbchar (Depends-on): Add wctype.
1514         * modules/mbswidth (Depends-on): Likewise.
1515         * modules/wcwidth (Depends-on): Likewise.
1516
1517 2006-12-27  Eric Blake  <ebb9@byu.net>
1518
1519         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
1520         module uses more than what <wctype.h> is required to provide.
1521
1522 2006-12-26  Eric Blake  <ebb9@byu.net>
1523
1524         * gnulib-tool (sed_extract_prog): Avoid space-tab.
1525
1526 2006-12-26  Eric Blake  <ebb9@byu.net>
1527
1528         * modules/absolute-header: New module.
1529         * modules/fcntl (Depends-on): Depend on it.
1530         * modules/inttypes (Depends-on): Likewise.
1531         * modules/stdint (Depends-on): Likewise.
1532         * modules/sys_stat (Depends-on): Likewise.
1533         * modules/wctype (Depends-on): Likewise.
1534         * MODULES.html.sh (Support for building libraries and
1535         executables): Document it.
1536
1537 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1538
1539         * gnulib-tool (SED): Remove, undoing previous change.
1540         The problem was that it broke coreutils on Solaris, because
1541         "sed --posix" leaked into a makefile.
1542         (sed): New alias, if 'alias' and GNU sed.
1543
1544 2006-12-24  Jim Meyering  <jim@meyering.net>
1545
1546         Work around an fchownat bug in glibc-2.4:
1547         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1548         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1549         in spite of the -P option.
1550         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1551         New macros.
1552         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1553         * modules/openat (Files): Add lib/fchownat.c.
1554         * lib/openat.c (fchownat): Don't define here.  Move to...
1555         * lib/fchownat.c: ...this new file.
1556
1557 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1558
1559         Fix bug reported by Bruno Haible in
1560         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1561         where quotearg.c didn't compile on Mac OS X 10.2 because it
1562         lacks <wchar.h> and wint_t.
1563         * lib/wctype_.h (__wctype_wint_t): New type.
1564         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1565         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1566         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1567         Arg is now of type __wctype_wint_t, not wint_t.
1568         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1569         substitute HAVE_WINT_T.
1570         * modules/wctype (Files): Add m4/wint_t.m4.
1571         (wctype.h): Substitute HAVE_WINT_T.
1572
1573 2006-12-23  Bruno Haible  <bruno@clisp.org>
1574
1575         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1576
1577 2006-12-23  Bruno Haible  <bruno@clisp.org>
1578
1579         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1580         S_ISLNK.
1581         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1582         mingw.
1583
1584 2006-12-22  Bruno Haible  <bruno@clisp.org>
1585
1586         * lib/copy-file.c: Include acl.h.
1587         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1588         Close the file descriptors only after being done with copy_acl.
1589         * modules/copy-file (Depends-on): Add acl.
1590
1591 2006-12-22  Bruno Haible  <bruno@clisp.org>
1592
1593         * gnulib-tool (SED): New variable.
1594         Use $SED instead of sed everywhere.
1595
1596 2006-12-22  Bruno Haible  <bruno@clisp.org>
1597
1598         * modules/no-c++: New file.
1599         * m4/no-c++.m4: New file.
1600         * MODULES.html.sh (Support for building libraries and executables):
1601         Add no-c++.
1602
1603 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1604
1605         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1606         Include <limits.h>, and use its INT_MAX to rewrite the
1607         j loop so that it does not overflow 'int'.  Problem reported by
1608         Ralf Wildenhues in
1609         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1610         Play it safe by shifting left by 1 rather than multiplying by 2,
1611         as GCC is less likely to optimize this away when the value
1612         is signed (when it assumes overflow leads to undefined behavior).
1613         Also, don't assume time_t uses two's complement.
1614
1615 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1616
1617         * MODULES.html.sh: New module wctype.
1618         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1619         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1620         <wctype.h>, since the new wctype module should fix this.
1621         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1622         the wctype module should arrange for it.
1623         * lib/regex_internal.h: Likewise.
1624         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1625         since the wctype module should handle this now.
1626         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1627         * modules/fnmatch (Depends-on): Add wctype.
1628         * modules/quotearg (Depends-on): Likewise.
1629         * modules/regex (Depends-on): Likewise.
1630
1631 2006-12-19  Bruno Haible  <bruno@clisp.org>
1632
1633         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1634         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1635
1636 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1637
1638         * modules/savewd (Depends-on): Fix dependency on fcntl.
1639
1640 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1641
1642         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1643         conforms to C99, rather than relying on the user's environment
1644         setting of STDINT_H.
1645
1646 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1647         and Eric Blake  <ebb9@byu.net>
1648
1649         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1650         This is more consistent with the other defines here.
1651         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1652         Port to z/OS.  Problem reported by Paul Gilmartin.
1653         Change local vars to use gl_ prefix rather than ac_.
1654         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1655         with other defines.
1656         * modules/double-slash-root: New module.
1657         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1658         (Depends-on): Add double-slash-root.
1659         * MODULES.html.sh (File system functions): Mention new module.
1660
1661 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1662
1663         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1664         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1665         This is for the benefit of gzip, which doesn't do i18n.
1666
1667 2006-12-12  Jim Meyering  <jim@meyering.net>
1668
1669         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1670         Reported by Andreas Schwab <schwab@suse.de>.
1671
1672 2006-12-12  Bruno Haible  <bruno@clisp.org>
1673
1674         Merge these changes.
1675         2006-09-05  Bruno Haible  <bruno@clisp.org>
1676         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1677         iconv_alloc succeeded.
1678         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1679         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1680         test for " && dest " at the end - dest is always != NULL there. Call
1681         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1682         with 2xNULL arguments, also to flush the state storage. Handle the
1683         IRIX iconv behaviour. Realloc the final result, to throw away unused
1684         memory.
1685
1686 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1687
1688         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1689         and fchmodat unconditionally, since glibc 2.4 has them.
1690         Problem reported by Arkadiusz Miskiewicz.
1691
1692 2006-12-10  Bruno Haible  <bruno@clisp.org>
1693
1694         * gnulib-tool (func_import): Show the include files only for those
1695         modules that are copied and specified.
1696         Reported by Karl Berry.
1697
1698 2006-12-08  Jim Meyering  <jim@meyering.net>
1699
1700         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1701         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1702
1703         * build-aux/announce-gen: Add two new options, both optional:
1704         --bootstrap-tools=TOOL_LIST
1705               a comma-separated list of tools, e.g.,
1706               autoconf,automake,bison,gnulib
1707         --gnulib-snapshot-date=DATE
1708               if gnulib is in the bootstrap tool list,
1709               then report this as the snapshot date.
1710               If not specified, use the current date/time.
1711               If you specify a date here, be sure it's UTC.
1712
1713 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1714
1715         * tests/test-argp-2.sh: Fix test to match actual output.
1716         (func_compare): Fix sed script to be portable.
1717
1718 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1719
1720         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1721         workaround for this case.  It is not autoconfigured now; offhand
1722         it's hard to see how to autoconfigure it.
1723
1724 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1725
1726         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1727         a directory that is about to be chowned.  Such a directory's
1728         initial file permissions should permit the owner only and this
1729         should not be changed until after the chown, since the group and
1730         other bits would be incorrect if they granted permission before
1731         the chown.
1732
1733         Fix porting problem for iswctype reported by Georg Schwarz in:
1734         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1735         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1736         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1737         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1738         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1739
1740 2006-12-03  Jim Meyering  <jim@meyering.net>
1741
1742         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1743         p->fts_statp may not yet be defined.
1744         (fts_read): Instead, set it in the caller, once p->fts_statp is
1745         sure to be defined, and corresponds to a top-level directory.
1746         This bug made du -x fail.  Here's the coreutils test case:
1747         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1748         Reported by Mike Frysinger.
1749
1750 2006-12-01  Jim Meyering  <jim@meyering.net>
1751
1752         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1753         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1754         Reported by Simon Josefsson.
1755
1756 2006-11-30  Jim Meyering  <jim@meyering.net>
1757
1758         * m4/warning.m4: Use the all-permissive copyright notice
1759         recommended by RMS (rather than LGPL).
1760         * m4/vararrays.m4: Likewise.
1761         * m4/flexmember.m4: Likewise.
1762
1763 2006-11-29  Bruno Haible  <bruno@clisp.org>
1764
1765         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1766         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1767         using +=.
1768         Reported by Simon Josefsson <simon@josefsson.org>.
1769
1770 2006-11-28  James Youngman <jay@gnu.org>
1771
1772         * README: Advise users that they might find the bug-gnulib@gnu.org
1773         and autotools-announce@gnu.org mailing lists useful.
1774
1775 2006-11-28  Bruno Haible  <bruno@clisp.org>
1776
1777         * m4/ptrdiff_max.m4: Remove file.
1778
1779 2006-11-21  Bruno Haible  <bruno@clisp.org>
1780
1781         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1782         _AC_COMPUTE_INT.
1783         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1784         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1785         _AC_COMPUTE_INT.
1786         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1787         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1788         _AC_COMPUTE_INT.
1789         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1790
1791 2006-11-28  Jim Meyering  <jim@meyering.net>
1792
1793         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
1794         warning from "gcc -Wshadow" about shadowing the builtin.
1795
1796 2006-11-27  Bruno Haible  <bruno@clisp.org>
1797
1798         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
1799         _AC_COMPUTE_INT.
1800         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1801
1802 2006-11-27  Bruno Haible  <bruno@clisp.org>
1803             Paul Eggert  <eggert@cs.ucla.edu>
1804
1805         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
1806
1807 2006-11-26  Bruno Haible  <bruno@clisp.org>
1808
1809         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1810         noinst_LTLIBRARIES.
1811
1812 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
1813             Bruno Haible  <bruno@clisp.org>
1814
1815         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
1816         if compiling with "gcc -ansi".
1817
1818 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1819
1820         Fix some incompatibilities with gcc -ansi -pedantic.
1821         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
1822         if compiling pedantically with GCC, unless it's C99 or later.
1823         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
1824         it mishandles gcc -ansi -pedantic as well.
1825         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
1826         if gcc -pedantic.
1827         * lib/regexec.c (check_node_accept_bytes): Don't use auto
1828         initializers for struct if -pedantic, unless it's C99 or later.
1829
1830 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
1831
1832         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
1833         Don't close an fd more than once. Identical atimes indicate
1834         success, not failure.
1835
1836 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
1837
1838         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
1839
1840 2006-11-23  Jim Meyering  <jim@meyering.net>
1841
1842         * build-aux/announce-gen: New file.  From coreutils.
1843
1844 2006-11-22  Jim Meyering  <jim@meyering.net>
1845
1846         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
1847         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
1848         (fts_read): Use a temporary to narrow the overused st_size member
1849         before using it in a switch statement.  Reported by Matthew Woehlke.
1850
1851         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
1852         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
1853
1854 2006-11-20  Bruno Haible  <bruno@clisp.org>
1855
1856         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
1857         changequote instead of pairs of brackets.
1858         Reported by Andreas Schwab <schwab@suse.de>.
1859
1860 2006-11-21  Jim Meyering  <jim@meyering.net>
1861
1862         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
1863         so as to remain compatible with older compilers.
1864         Patch from Michael Deutschmann.
1865
1866 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1867
1868         * MODULES.html.sh (File system functions): Add openat.
1869
1870         * lib/openat.h (rpl_fstatat): New macro, if
1871         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
1872         (fstatat): Define to rpl_fstatat under the same conditions,
1873         unless COMPILING_FSTATAT.
1874         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
1875         seems to have the bug.
1876         * lib/fstatat.c: New file.
1877         * modules/openat (Files): Add it.
1878
1879 2006-11-20  Bruno Haible  <bruno@clisp.org>
1880
1881         * Makefile: New file.
1882
1883 2006-11-20  Jim Meyering  <jim@meyering.net>
1884
1885         The beginnings of syntax-related checks for gnulib.
1886         * lib/Makefile: New file.
1887         * lib/t-idcache: New script.  Ensure that the two halves of
1888         idcache.c stay in sync.
1889
1890         * lib/idcache.c: Adjust comments in user- and group- portions to
1891         be more accurate, and to be consistent with one another.
1892
1893 2006-11-20  Jim Meyering  <jim@meyering.net>
1894
1895         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
1896         continue using the flexible array member (thus, this module performs
1897         half as many malloc calls), with the addition that...
1898         (getgroup, getuser): Consistently record a non-match via an empty
1899         "name" string, and map an empty string match to a NULL return value.
1900         * modules/idcache (Depends-on): Re-add flexmember.
1901
1902         * lib/idcache.c (getuser): Remove all uses of the register keyword.
1903         (getuidbyname, getgroup, getgidbyname): Likewise.
1904
1905         Use cleaner syntax: NULL rather than 0.
1906         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
1907
1908 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1909
1910         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
1911         It mishandled the case where the group was missing.
1912         Problem reported by Greg Schafer.
1913         * modules/idcache: Likewise.
1914
1915 2006-11-18  Jim Meyering  <jim@meyering.net>
1916
1917         * check-module (%exempt_header): Add exception for some
1918         conditionally-included headers.
1919
1920         * modules/i-ring (Depends-on): Add verify.
1921         (License): Change to LGPL.
1922
1923 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1924
1925         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
1926         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
1927         and inttostr.h.  Use snprintf rather than uinttostr, so that
1928         LGPLed code doesn't depend on GPLed.
1929
1930 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
1931
1932         * modules/inline (License): Change from GPL to LGPL.
1933
1934 2006-11-17  Jim Meyering  <jim@meyering.net>
1935
1936         * modules/d-type (License): Switch to LGPL.
1937
1938 2006-11-15  Bruno Haible  <bruno@clisp.org>
1939
1940         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
1941
1942 2006-11-15  Eric Blake  <ebb9@byu.net>
1943
1944         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
1945         the module dependency.
1946
1947 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1948             Bruno Haible  <bruno@clisp.org>
1949
1950         * gnulib-tool (func_create_testdir): Add license consistency check.
1951
1952 2006-11-15  Eric Blake  <ebb9@byu.net>
1953
1954         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
1955         random "(cached)" in configure output.
1956
1957 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1958
1959         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
1960         test for conforming inttypes.h is both announced and cached.
1961
1962         * MODULES.html.sh (seen_modules, seen_files): New variables.
1963         (func_module): Rewrite to use a few less gnulib-tool and sed
1964         invocations.  Avoid a couple of quadratic algorithms for ...
1965         (missed_modules, missed_files): ... these, with ...
1966         (func_append, func_tmpdir): ... these new functions, from
1967         gnulib-tool.  Analogously, install traps for cleanup.
1968
1969         * tests/test-gc.c (main): Remove unused variables.
1970         * tests/test-read-file.c: Include stdlib.h, for 'free'.
1971
1972 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
1973
1974         * modules/inttostr (License): Change to LGPL.
1975
1976 2006-11-14  Eric Blake  <ebb9@byu.net>
1977
1978         * modules/tempname (License): Change to LGPL.
1979
1980 2006-11-14  Eric Blake  <ebb9@byu.net>
1981
1982         * doc/functions.texi (Function Portability): *printf functions on
1983         Cygwin now understand all POSIX size specifiers.
1984
1985 2006-11-14  Bruno Haible  <bruno@clisp.org>
1986
1987         * modules/c-ctype (License): Change to LGPL.
1988
1989 2006-11-12  Bruno Haible  <bruno@clisp.org>
1990
1991         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
1992         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
1993         for GNOME libraries, for which the include files are installed in
1994         subdirectories of $prefix/include.
1995
1996 2006-11-12  Bruno Haible  <bruno@clisp.org>
1997
1998         * m4/lib-link.m4: Require at least autoconf-2.54.
1999         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
2000         name to underscores for the --with option.
2001
2002 2006-11-13  Bruno Haible  <bruno@clisp.org>
2003
2004         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
2005         the tests directory.
2006         Reported by Ralf Wildenhues.
2007
2008 2006-11-13  Bruno Haible  <bruno@clisp.org>
2009
2010         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
2011         (func_emit_initmacro_end): Undo the override here.
2012         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
2013         Works around the famous automake error in coreutils.
2014
2015 2006-11-13  Eric Blake  <ebb9@byu.net>
2016
2017         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
2018         element, not its node.
2019
2020 2006-11-12  Bruno Haible  <bruno@clisp.org>
2021
2022         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
2023         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
2024
2025 2006-11-12  Bruno Haible  <bruno@clisp.org>
2026
2027         * gnulib-tool: New option --local-symlink.
2028         (func_usage): Document it.
2029         (lsymbolic): New variable.
2030         (func_import, func_create_testdir): If --symlink was not specified,
2031         test whether --local-symlink was specified and the file comes from
2032         the local_gnulib_dir.
2033
2034 2006-11-12  Bruno Haible  <bruno@clisp.org>
2035
2036         * gnulib-tool (func_ln): New function.
2037         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
2038
2039 2006-11-12  Bruno Haible  <bruno@clisp.org>
2040
2041         Finish support for source files in subdirectories.
2042         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2043         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2044         AUTOMAKE_OPTIONS.
2045         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2046
2047 2006-11-12  Bruno Haible  <bruno@clisp.org>
2048
2049         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2050         EXTRA_lib_SOURCES augmentation.
2051         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2052
2053 2006-11-12  Jim Meyering  <jim@meyering.net>
2054
2055         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2056         file descriptors.  This also averts a failure on systems with
2057         native openat support when a traversed directory lacks "x" access.
2058         * lib/fts_.h: Include "i-ring.h"
2059         (struct FTS) [fts_fd_ring]: New member.
2060         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2061         (FCHDIR): Add parentheses.
2062         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2063         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2064         When descending, rather than simply closing the previous
2065         fts_cwd_fd value, push that file descriptor onto the ring.
2066         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2067         (fts_open): Initialize the new fd_ring member.
2068         (fts_close): Clear the ring.
2069         (fts_safe_changedir): When possible, use our new fd_ring to skip
2070         the diropen and fstat and dev/ino comparison that would normally
2071         accompany a virtual `chdir ("..")'.
2072
2073         * modules/fts (Depends-on): Add i-ring.
2074         * modules/i-ring: New module.
2075         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2076         * m4/i-ring.m4: New file.
2077
2078 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2079
2080         * gnulib-tool (func_create_testdir): Fix replacement of
2081         `build-aux' in configure.ac.  Run autotools in gltests
2082         subdirectory.
2083         (func_create_testdir, func_create_megatestdir, test): There is
2084         no need for '--force' in most autotool invocations in a new
2085         tree.  Actually fail the whole test if any of the tools, or the
2086         configure or make stages fail.
2087
2088         Sync from Automake.
2089         * build-aux/gnupload: Revert last change.  Add pointer to upload
2090         instructions of the GNU Maintenance Instructions.
2091         Suggestion by Karl Berry.
2092
2093 2006-11-10  Jim Meyering  <jim@meyering.net>
2094
2095         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
2096
2097 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2098
2099         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
2100         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
2101         (bind_textdomain_codeset) [! ENABLE_NLS]:
2102         Evaluate all the arguments.  That way, callers get compatible behavior
2103         if the arguments have side effects.  Also, it avoids some GCC
2104         diagnostics in some cases; Joel E. Denny reported problems when Bison
2105         was configured with --enable-gcc-warnigs.
2106
2107 2006-11-10  Jim Meyering  <jim@meyering.net>
2108
2109         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
2110         relevant options in CFLAGS (like -O, -fno-inline) are taken into
2111         account.
2112
2113 2006-11-10  Jim Meyering  <jim@meyering.net>
2114
2115         * modules/inline: New file/module.
2116         * modules/xalloc (Files): Remove m4/inline.m4.
2117         (Depends-on): Add inline, instead.
2118         * modules/oset: Likewise.
2119         * modules/list: Likewise.
2120
2121 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2122
2123         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
2124         Problem reported by Matthew Woehlke.
2125
2126 2006-11-09  Bruno Haible  <bruno@clisp.org>
2127
2128         * lib/tempname.c (gen_tempname): Remove variant that invokes
2129         __gen_tempname.
2130         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
2131         __gen_tempname.
2132
2133 2006-11-08  Bruno Haible  <bruno@clisp.org>
2134
2135         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
2136         to 'yes' instead of 'cross-compiling'.
2137
2138 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
2139
2140         * lib/quotearg.h (quotearg_free): New decl.
2141         * lib/quotearg.c (quotearg_free): New function.
2142         (slot0, nslots, slotvec0, slotvec):
2143         Now file-scope so that quotearg_free can get at them.
2144
2145 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2146
2147         Sync from Automake.
2148         * build-aux/gnupload: Add missing 'gnu' to example URL.
2149         Report by Karl Berry.
2150
2151 2006-11-08  Bruno Haible  <bruno@clisp.org>
2152
2153         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
2154         Suggested by Paul Eggert.
2155
2156 2006-11-08  Jim Meyering  <jim@meyering.net>
2157
2158         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
2159         It's already included if !_LIBC.
2160         (fts_safe_changedir): Add a comment.
2161
2162 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2163
2164         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
2165         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
2166         Matthew Woehlke.
2167
2168         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
2169         definitions up, to avoid colliding with change below.
2170         (static_inline) [HAVE_INLINE]: New macro.
2171         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
2172         Provide extern decls when !HAVE_INLINE.  Do not define unless
2173         static_inline is defined, either by us or by xmalloc.c.  Use
2174         static_inline rather than static inline.
2175         (XCALLOC): Optimize sizeof(T) = 1 case.
2176         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2177
2178 2006-11-07  Bruno Haible  <bruno@clisp.org>
2179
2180         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
2181         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
2182         AC_C_INLINE.
2183         * modules/xalloc (Files): Add m4/inline.m4.
2184
2185 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2186
2187         * README: Fix typo.
2188         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
2189         (Miscellanous Notes): ...from this.
2190
2191 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2192
2193         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
2194         Mention that offsetof should be used instead of sizeof.
2195         From Bruno Haible.
2196
2197 2006-11-07  Bruno Haible  <bruno@clisp.org>
2198
2199         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
2200
2201 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2202
2203         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2204         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
2205         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2206         (gl_tree_add_before, gl_tree_add_after):
2207         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
2208         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
2209         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2210         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
2211         (gl_linked_add_after, gl_linked_add_at): Likewise.
2212         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
2213         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2214         (gl_tree_add_before, gl_tree_add_after): Likewise.
2215         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
2216         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
2217         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
2218
2219 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2220
2221         * lib/gl_oset.h: Use C comment style, not C++ comment style.
2222
2223 2006-11-06  Bruno Haible  <bruno@clisp.org>
2224
2225         * m4/inline.m4: New file.
2226         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
2227         * modules/list (Files): Add m4/inline.m4.
2228         * modules/oset (Files): Likewise.
2229
2230 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2231
2232         * lib/idcache.c: Include <stddef.h>, for offsetof.
2233         (struct userid.name): Change from char * to a flexible array member.
2234         All uses changed.
2235         * modules/idcache (Depends-on): Add flexmember.
2236
2237         * MODULES.html.sh (Core language properties): New module flexmember.
2238         * modules/flexmember, m4/flexmember.m4: New files.
2239
2240         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
2241         inline functions that are identical with the old xnmalloc_inline,
2242         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
2243         that we can avoid some unnecessary integer multiplications and
2244         divisions in the common case where the element size is known at
2245         compile time.
2246         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
2247         needed.
2248         (xnboundedmalloc): Remove.
2249         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
2250         arguments, for consistency with rest of this header.
2251         (xcharalloc): Rewrite using XNMALLOC.
2252         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
2253         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
2254         versions have been moved to lib/xalloc.h and renamed to be the
2255         non-*_inline versions.
2256         (xmalloc, xrealloc): Implement without reference to the xnmalloc
2257         and xnrealloc functions, since those functions are now inline and
2258         now call us.
2259         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
2260         renaming described above.
2261         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
2262         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
2263         captures the dependency in AC_C_INLINE.
2264
2265         New module canonicalize-lgpl, proposed by Charles Wilson in
2266         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
2267         with a few small changes afterwards.
2268         * MODULES.html.sh (File system functions): New module
2269         canonicalize-lgpl.
2270         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
2271         and canonicalize_file_name.
2272         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
2273         * modules/canonicalize-lgpl: New files.
2274
2275 2006-11-05  Bruno Haible  <bruno@clisp.org>
2276
2277         * gnulib-tool (func_import, func_create_testdir): Create directories
2278         also for files in subdirectories of lib/.
2279
2280 2006-11-05  Bruno Haible  <bruno@clisp.org>
2281
2282         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
2283         ANSI C compliant.
2284
2285 2006-11-03  Bruno Haible  <bruno@clisp.org>
2286
2287         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2288         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
2289         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
2290         (xnboundedmalloc): New inline function.
2291         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
2292         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
2293         xmalloc.
2294         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
2295         xmalloc.
2296         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
2297         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
2298         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
2299         xmalloc.
2300         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2301         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
2302         xmalloc.
2303         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
2304         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2305         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
2306         xmalloc.
2307         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2308         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
2309         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2310         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
2311         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
2312         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
2313         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
2314
2315 2006-11-03  Bruno Haible  <bruno@clisp.org>
2316
2317         * lib/c-ctype.h [C++]: Define functions without name mangling.
2318         * lib/fwriteerror.h [C++]: Likewise.
2319         * lib/gcd.h [C++]: Likewise.
2320         * lib/linebreak.h [C++]: Likewise.
2321
2322 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2323
2324         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2325         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2326         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2327         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2328         Check for functions and headers just once.
2329         Check for declaration of canonicalize_file_name.
2330         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2331
2332 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2333
2334         * gnulib-tool (func_import): Fix typo in actioncmd.
2335
2336 2006-11-02  Bruno Haible  <bruno@clisp.org>
2337
2338         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2339         newline sequence in the Makefile.am snippet as a space, like "make"
2340         does.
2341         Reported by Roger Persson <perrog@gmail.com>.
2342
2343 2006-11-01  Bruno Haible  <bruno@clisp.org>
2344
2345         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2346         already declared in <string.h>.
2347         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2348
2349 2006-11-01  Bruno Haible  <bruno@clisp.org>
2350
2351         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2352         * lib/strcase.h: Include <string.h>.
2353         (strcasecmp): Define to rpl_strcasecmp here.
2354
2355 2006-11-01  Bruno Haible  <bruno@clisp.org>
2356
2357         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2358
2359 2006-11-01  Eric Blake  <ebb9@byu.net>
2360
2361         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2362
2363         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2364
2365 2006-10-29  Bruno Haible  <bruno@clisp.org>
2366
2367         Make it compile in C++ mode.
2368         * lib/full-write.c (full_rw): Add a cast.
2369
2370 2006-11-01  Bruno Haible  <bruno@clisp.org>
2371
2372         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2373         be POSIX compliant.
2374         Reported by Roger Persson <perrog@gmail.com>.
2375
2376 2006-11-01  Eric Blake  <ebb9@byu.net>
2377
2378         * lib/getopt_.h: Fix comments.
2379
2380 2006-10-31  Eric Blake  <ebb9@byu.net>
2381
2382         * modules/tmpdir (Depends-on): Add sys_stat.
2383         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2384         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2385         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2386         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2387         tempname.
2388
2389 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2390
2391         Avoid some C++ diagnostics reported by Bruno Haible.
2392         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2393         xmalloc.
2394         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2395         (struct slotvec): Move to top level.
2396         (quotearg_n_options): Rewrite to avoid xmalloc.
2397         * lib/xalloc.h (xcharalloc): New function.
2398         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2399         [defined __cplusplus]: Add function template that provides result
2400         type propagation.  This part of the change is from Bruno Haible.
2401
2402 2006-10-29  Bruno Haible  <bruno@clisp.org>
2403
2404         Make it compile in C++ mode.
2405         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2406         * lib/strnlen1.c (strnlen1): Cast memchr result.
2407         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2408         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2409         (create_temp_dir): Rename local variable 'template'.
2410         (compile_csharp_using_sscli): Add cast.
2411         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2412         * lib/findprog.c (find_in_path): Likewise.
2413         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2414         * lib/wait-process.c (register_slave_subprocess): Likewise.
2415
2416 2006-10-22  Bruno Haible  <bruno@clisp.org>
2417
2418         * modules/tsearch: New file.
2419         * lib/tsearch.h: New file.
2420         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2421         * m4/tsearch.m4: New file.
2422         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2423
2424 2006-10-29  Eric Blake  <ebb9@byu.net>
2425
2426         * lib/arcfour.c: Assume config.h.
2427         * lib/arctwo.c: Likewise.
2428         * lib/base64.c: Likewise.
2429         * lib/check-version.c: Likewise.
2430         * lib/crc.c: Likewise.
2431         * lib/des.c: Likewise.
2432         * lib/gc-gnulib.c: Likewise.
2433         * lib/gc-libgcrypt.c: Likewise.
2434         * lib/gc-pbkdf2-sha1.c: Likewise.
2435         * lib/getaddrinfo.c: Likewise.
2436         * lib/getdelim.c: Likewise.
2437         * lib/getline.c: Likewise.
2438         * lib/hmac-md5.c: Likewise.
2439         * lib/hmac-sha1.c: Likewise.
2440         * lib/iconvme.c: Likewise.
2441         * lib/md2.c: Likewise.
2442         * lib/md4.c: Likewise.
2443         * lib/memxor.c: Likewise.
2444         * lib/read-file.c: Likewise.
2445         * lib/readline.c: Likewise.
2446         * lib/rijndael-alg-fst.c: Likewise.
2447         * lib/rijndael-api-fst.c: Likewise.
2448         * lib/xgetdomainname.c: Likewise.
2449
2450 2006-10-28  Eric Blake  <ebb9@byu.net>
2451
2452         * lib/xstrndup.c: Assume config.h.
2453
2454 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
2455
2456         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
2457         stat-macros.h is now for our own macros, whereas stat_h is for
2458         macros in the <sys/stat.h> name space.
2459         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
2460         (STAT_MACROS_H): Remove.
2461         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2462         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2463         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2464         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2465         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2466         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2467         Move these macros to ...
2468         * lib/stat_.h: here.  Don't include stat-macros.h.
2469         * lib/canonicalize.c: Don't include stat-macros.h.
2470         * lib/chown.c: Likewise.
2471         * lib/euidaccess.c: Likewise.
2472         * lib/file-type.c: Likewise.
2473         * lib/filemode.c: Likewise.
2474         * lib/glob.c: Likewise.
2475         * lib/isapipe.c: Likewise.
2476         * lib/lchown.c: Likewise.
2477         * lib/lstat.c: Likewise.
2478         * lib/mkdir-p.c: Likewise.
2479         * lib/rmdir.c: Likewise.
2480         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
2481         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
2482         unless mkdir isn't declared, to speed up 'configure'.
2483         Always create sys/stat.h, since it's unlikely any real sys/stat.h
2484         would define all the S_* symbols.
2485         * modules/canonicalize (Depends-on):
2486         Depend on sys_stat, not stat-macros.
2487         * modules/chown: Likewise.
2488         * modules/euidaccess: Likewise.
2489         * modules/filemode: Likewise.
2490         * modules/file-type: Likewise.
2491         * modules/glob: Likewise.
2492         * modules/isapipe: Likewise.
2493         * modules/lchown: Likewise.
2494         * modules/lstat: Likewise.
2495         * modules/mkancesdirs: Likewise.
2496         * modules/rmdir: Likewise.
2497         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
2498         * modules/modechange: Likewise.
2499         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
2500         (configure.ac): Remove gl_STAT_MACROS.
2501         * modules/sys_stat (Depends-on): Remove stat-macros.
2502
2503 2006-10-27  Bruno Haible  <bruno@clisp.org>
2504
2505         * m4/signed.m4: Remove file.
2506         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
2507         invocation.
2508         * modules/vasnprintf (Files): Remove m4/signed.m4.
2509
2510 2006-10-27  Bruno Haible  <bruno@clisp.org>
2511
2512         Update to GNU gettext 0.16.
2513         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
2514         m4/inttypes-h.m4, m4/signed.m4.
2515         * m4/gettext.m4: Update to GNU gettext 0.16.
2516         * m4/intl.m4: New file, from GNU gettext.
2517         * m4/intldir.m4: New file, from GNU gettext.
2518         * config/srclist.txt: Update
2519
2520 2006-10-27  Eric Blake  <ebb9@byu.net>
2521
2522         * MODULES.html.sh: Document tempname.
2523         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
2524         dependencies.
2525         (Files): Move lib/tempname.c...
2526         * modules/tempname: ...to this new module.
2527         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2528         (gl_PREREQ_TEMPNAME): Move...
2529         * m4/tempname.m4: ...to this new file.
2530         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2531         * modules/sys_stat (Depends-on): Add stat-macros.
2532         * lib/stat_.h (includes): Pick up stat macros.
2533         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2534         if stat macros are broken.
2535         * lib/tempname.c (includes): No need to include "stat-macros.h".
2536         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2537         (direxists, __path_search) [!_LIBC]: Don't compile these in
2538         gnulib; the tmpdir module covers that.
2539         * lib/tempname.h: New file.
2540
2541 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2542
2543         * COPYING: Explain how gnulib-tool converts licence headers.
2544         Almost all wording by Eric Blake.
2545
2546 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2547
2548         * lib/mbchar.h (is_basic_table): Make read-only.
2549         * lib/mbchar.c (is_basic_table): Likewise.
2550         Reported by John Darrington.
2551
2552 2006-10-25  Bruno Haible  <bruno@clisp.org>
2553
2554         * lib/progname.h (set_program_name): Undefine before defining.
2555
2556 2006-10-25  Bruno Haible  <bruno@clisp.org>
2557
2558         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2559         false for non-gcc C++ compilers.
2560         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2561
2562 2006-10-24  Bruno Haible  <bruno@clisp.org>
2563
2564         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2565         iconv implementations like Irix iconv.
2566
2567 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2568
2569         * modules/vararrays: New file.
2570         * m4/vararrays.m4: New file, taken from diffutils.
2571         * MODULES.html.sh: New module vararrays.
2572
2573 2006-10-24  Karl Berry  <karl@gnu.org>
2574
2575         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2576         Don't call GNU Unix.
2577
2578 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2579
2580         * users.txt: Add Libtool.
2581
2582         Sync from Libtool:
2583
2584         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2585
2586         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2587         to gnulib's policy of including config.h unconditionally.
2588
2589 2006-10-24  Bruno Haible  <bruno@clisp.org>
2590
2591         * modules/wcwidth (Files): Add m4/wint_t.m4.
2592         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2593         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2594
2595 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2596
2597         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2598         to pacify GCC with some -W flags enabled.  Problem reported by
2599         Bruno Haible.
2600
2601 2006-10-24  Jim Meyering  <jim@meyering.net>
2602
2603         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2604         Reported by Karl Berry.
2605
2606 2006-10-23  Bruno Haible  <bruno@clisp.org>
2607
2608         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2609
2610 2006-10-24  Bruno Haible  <bruno@clisp.org>
2611
2612         * lib/gl_list.h: Use C comment style, not C++ comment style.
2613
2614 2006-10-23  Eric Blake  <ebb9@byu.net>
2615
2616         * lib/getaddrinfo.c (includes): Add missing include.
2617
2618 2006-10-23  Bruno Haible  <bruno@clisp.org>
2619             Paul Eggert  <eggert@cs.ucla.edu>
2620
2621         Ability to rename obstack_free.
2622         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2623         obstack_free.
2624         (obstack_free): Invoke the __obstack_free macro.
2625         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2626
2627 2006-10-23  Bruno Haible  <bruno@clisp.org>
2628             Paul Eggert  <eggert@cs.ucla.edu>
2629
2630         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2631         __argc, __argv from the declaration. (They are defined as macros on
2632         mingw.)
2633
2634 2006-10-22  Bruno Haible  <bruno@clisp.org>
2635
2636         * doc/gnulib-intro.texi: New file.
2637         * doc/gnulib.texi: Include it.
2638
2639 2006-10-21  Bruno Haible  <bruno@clisp.org>
2640
2641         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2642         "Introduction", "Miscellanous Notes", "Particular Modules".
2643
2644 2006-10-21  Bruno Haible  <bruno@clisp.org>
2645
2646         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2647         Change mostlyclean-local rule to avoid sh syntax error from bash
2648         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2649
2650 2006-10-23  Jim Meyering  <jim@meyering.net>
2651
2652         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2653         in place of snprintf.
2654
2655         * modules/inttostr (Files): Add lib/uinttostr.c.
2656         * lib/uinttostr.c (inttostr): New file/function.
2657         * lib/inttostr.h (uinttostr): Declare.
2658         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2659         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2660         Add uinttostr.
2661         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2662
2663 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2664
2665         * lib/canonicalize.c (ELOOP): Define if not already defined.
2666         Problem reported by Bruno Haible in
2667         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2668
2669 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2670
2671         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2672         Problem reported by Perry Smith and Ville Laurikari.
2673
2674         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2675         uses.
2676
2677 2006-10-19  Bruno Haible  <bruno@clisp.org>
2678
2679         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2680         for mingw.
2681
2682 2006-10-19  Bruno Haible  <bruno@clisp.org>
2683
2684         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2685         Needed for mingw.
2686
2687 2006-10-19  Bruno Haible  <bruno@clisp.org>
2688
2689         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2690
2691 2006-10-19  Bruno Haible  <bruno@clisp.org>
2692
2693         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2694         it.
2695
2696 2006-10-19  Bruno Haible  <bruno@clisp.org>
2697
2698         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2699         invocation.
2700
2701 2006-10-19  Bruno Haible  <bruno@clisp.org>
2702
2703         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2704         mountlist by default.
2705
2706 2006-10-16  Bruno Haible  <bruno@clisp.org>
2707
2708         * lib/c-strstr.c: Include c-strstr.h.
2709
2710 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2711
2712         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2713         in a slash.
2714
2715 2006-10-18  Bruno Haible  <bruno@clisp.org>
2716
2717         * lib/lock.h [C++]: Wrap definitions in extern "C".
2718
2719 2006-10-18  Bruno Haible  <bruno@clisp.org>
2720
2721         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2722         gl_LIBOBJS list.
2723
2724 2006-10-18  Bruno Haible  <bruno@clisp.org>
2725
2726         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2727
2728 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2729
2730         * lib/xstrtol.h: Include gettext.h.
2731         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2732         Problem reported by Eric Blake.
2733         * modules/xstrtol (Depends-on): Add gettext-h.
2734
2735 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2736
2737         * lib/strftime.c (advance): New macro.
2738         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2739         incomplete type, so you can't add 0 to it.  Problem and patch
2740         reported by Eelco Dolstra for dietlibc.
2741
2742 2006-10-18  Jim Meyering  <jim@meyering.net>
2743
2744         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2745         type for a local, and rename it: s/up/user_proc/.
2746
2747 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2748
2749         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2750         READ_UTMP_USER_PROCESS.
2751         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2752
2753 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2754
2755         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2756         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2757
2758 2006-10-17  Eric Blake  <ebb9@byu.net>
2759
2760         * lib/sigprocmask.c (sigprocmask): Fix typo.
2761
2762         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2763
2764         * modules/clean-temp (Makefile.am): Don't add to make output...
2765         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2766         config.h.
2767
2768 2006-10-17  Bruno Haible  <bruno@clisp.org>
2769
2770         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2771         differently if DEFAULT_TEXT_DOMAIN is set.
2772
2773 2006-10-16  Bruno Haible  <bruno@clisp.org>
2774
2775         * lib/clean-temp.c: Include fwriteerror.h.
2776
2777 2006-10-16  Bruno Haible  <bruno@clisp.org>
2778
2779         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2780
2781 2006-10-16  Bruno Haible  <bruno@clisp.org>
2782
2783         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2784         * lib/sigprocmask.h: Include <sys/types.h>.
2785         (sigset_t): Use the system's definition if present.
2786
2787 2006-10-17  Eric Blake  <ebb9@byu.net>
2788
2789         * lib/xvasprintf.c (includes): Assume config.h.
2790         * lib/xasprintf.c (includes): Likewise.
2791
2792 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2793
2794         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
2795         at least as wide as intmax_t.
2796
2797 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
2798
2799         (Imported from Automake.)
2800         * build-aux/gnupload: Update to version 1.1 of directive file.
2801
2802 2006-10-16  Eric Blake  <ebb9@byu.net>
2803
2804         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
2805         match Automake 1.10a.
2806
2807 2006-10-14  Bruno Haible  <bruno@clisp.org>
2808
2809         * modules/sigprocmask: New file.
2810         * lib/sigprocmask.h: New file.
2811         * lib/sigprocmask.c: New file.
2812         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
2813         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
2814         request sigprocmask.o.
2815         (gl_PREREQ_SIGPROCMASK): New macro.
2816         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
2817         (Depends-on): Add sigprocmask.
2818         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
2819         gt_SIGNALBLOCKING. Test for 'raise' only once.
2820         * lib/fatal-signal.c: Include sigprocmask.h.
2821         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
2822         unblock_fatal_signals): Define always.
2823         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2824         sigprocmask.
2825
2826 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
2827
2828         Sync from Automake.
2829         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
2830         which incorrectly sets the mode of an existing destination
2831         directory.  In some cases the unpatched install-sh could do the
2832         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
2833         system.  We hope this is rare in practice, but it's clearly worth
2834         fixing.  Problem reported by Alex Unleashed in
2835         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
2836         Also, don't bother to check for -m bugs unless we're using -m;
2837         suggested by Stepan Kasal.
2838
2839 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2840
2841         Sync from Automake.
2842         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
2843         `-c' flag, so they appear at the same position as in %FASTDEP%
2844         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
2845         which ignores unknown options only after the first non-option.
2846         Bug report against M4 by Nelson H. F. Beebe.
2847
2848 2006-10-13  Jim Meyering  <jim@meyering.net>
2849
2850         Fix a bug in yesterday's change.
2851         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
2852         p->fts_statp->st_dev would be used uninitialized.
2853         Ensures that we always call fts_stat on the very first entry.
2854         Miklos Szeredi reported that find -xdev stopped working.
2855
2856 2006-10-12  Bruno Haible  <bruno@clisp.org>
2857
2858         * gnulib-tool (func_get_automake_snippet): Append an automatically
2859         computed EXTRA_DIST augmentation.
2860         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
2861         * modules/alloca-opt (Makefile.am): Likewise.
2862         * modules/allocsa (Makefile.am): Likewise.
2863         * modules/arcfour (Makefile.am): Likewise.
2864         * modules/arctwo (Makefile.am): Likewise.
2865         * modules/argmatch (Makefile.am): Likewise.
2866         * modules/argz (Makefile.am): Likewise.
2867         * modules/atexit (Makefile.am): Likewise.
2868         * modules/backupfile (Makefile.am): Likewise.
2869         * modules/byteswap (Makefile.am): Likewise.
2870         * modules/c-strtod (Makefile.am): Likewise.
2871         * modules/c-strtold (Makefile.am): Likewise.
2872         * modules/calloc (Makefile.am): Likewise.
2873         * modules/canon-host (Makefile.am): Likewise.
2874         * modules/canonicalize (Makefile.am): Likewise.
2875         * modules/chdir-long (Makefile.am): Likewise.
2876         * modules/chdir-safer (Makefile.am): Likewise.
2877         * modules/check-version (Makefile.am): Likewise.
2878         * modules/chown (Makefile.am): Likewise.
2879         * modules/cloexec (Makefile.am): Likewise.
2880         * modules/close-stream (Makefile.am): Likewise.
2881         * modules/closeout (Makefile.am): Likewise.
2882         * modules/crc (Makefile.am): Likewise.
2883         * modules/csharpexec (Makefile.am): Likewise.
2884         * modules/cycle-check (Makefile.am): Likewise.
2885         * modules/des (Makefile.am): Likewise.
2886         * modules/dev-ino (Makefile.am): Likewise.
2887         * modules/dirfd (Makefile.am): Likewise.
2888         * modules/dirname (Makefile.am): Likewise.
2889         * modules/dup2 (Makefile.am): Likewise.
2890         * modules/eealloc (Makefile.am): Likewise.
2891         * modules/error (Makefile.am): Likewise.
2892         * modules/euidaccess (Makefile.am): Likewise.
2893         * modules/exclude (Makefile.am): Likewise.
2894         * modules/exitfail (Makefile.am): Likewise.
2895         * modules/fcntl-safer (Makefile.am): Likewise.
2896         * modules/fcntl (Makefile.am): Likewise.
2897         * modules/file-type (Makefile.am): Likewise.
2898         * modules/fileblocks (Makefile.am): Likewise.
2899         * modules/filemode (Makefile.am): Likewise.
2900         * modules/filenamecat (Makefile.am): Likewise.
2901         * modules/fnmatch (Makefile.am): Likewise.
2902         * modules/fopen-safer (Makefile.am): Likewise.
2903         * modules/fpending (Makefile.am): Likewise.
2904         * modules/fprintftime (Makefile.am): Likewise.
2905         * modules/free (Makefile.am): Likewise.
2906         * modules/fsusage (Makefile.am): Likewise.
2907         * modules/ftruncate (Makefile.am): Likewise.
2908         * modules/fts (Makefile.am): Likewise.
2909         * modules/gc-arcfour (Makefile.am): Likewise.
2910         * modules/gc-des (Makefile.am): Likewise.
2911         * modules/gc-hmac-md5 (Makefile.am): Likewise.
2912         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
2913         * modules/gc-md4 (Makefile.am): Likewise.
2914         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2915         * modules/gc-sha1 (Makefile.am): Likewise.
2916         * modules/gc (Makefile.am): Likewise.
2917         * modules/getaddrinfo (Makefile.am): Likewise.
2918         * modules/getcwd (Makefile.am): Likewise.
2919         * modules/getdelim (Makefile.am): Likewise.
2920         * modules/getdomainname (Makefile.am): Likewise.
2921         * modules/getgroups (Makefile.am): Likewise.
2922         * modules/gethostname (Makefile.am): Likewise.
2923         * modules/gethrxtime (Makefile.am): Likewise.
2924         * modules/getline (Makefile.am): Likewise.
2925         * modules/getloadavg (Makefile.am): Likewise.
2926         * modules/getlogin_r (Makefile.am): Likewise.
2927         * modules/getndelim2 (Makefile.am): Likewise.
2928         * modules/getopt (Makefile.am): Likewise.
2929         * modules/getpagesize (Makefile.am): Likewise.
2930         * modules/getpass-gnu (Makefile.am): Likewise.
2931         * modules/getpass (Makefile.am): Likewise.
2932         * modules/getsubopt (Makefile.am): Likewise.
2933         * modules/gettime (Makefile.am): Likewise.
2934         * modules/gettimeofday (Makefile.am): Likewise.
2935         * modules/getugroups (Makefile.am): Likewise.
2936         * modules/getusershell (Makefile.am): Likewise.
2937         * modules/glob (Makefile.am): Likewise.
2938         * modules/group-member (Makefile.am): Likewise.
2939         * modules/hard-locale (Makefile.am): Likewise.
2940         * modules/hash (Makefile.am): Likewise.
2941         * modules/hmac-md5 (Makefile.am): Likewise.
2942         * modules/hmac-sha1 (Makefile.am): Likewise.
2943         * modules/human (Makefile.am): Likewise.
2944         * modules/idcache (Makefile.am): Likewise.
2945         * modules/imaxabs (Makefile.am): Likewise.
2946         * modules/imaxdiv (Makefile.am): Likewise.
2947         * modules/inet_ntop (Makefile.am): Likewise.
2948         * modules/inet_pton (Makefile.am): Likewise.
2949         * modules/intprops (Makefile.am): Likewise.
2950         * modules/inttostr (Makefile.am): Likewise.
2951         * modules/inttypes (Makefile.am): Likewise.
2952         * modules/isapipe (Makefile.am): Likewise.
2953         * modules/javaversion (Makefile.am): Likewise.
2954         * modules/lchmod (Makefile.am): Likewise.
2955         * modules/lchown (Makefile.am): Likewise.
2956         * modules/localcharset (Makefile.am): Likewise.
2957         * modules/long-options (Makefile.am): Likewise.
2958         * modules/lstat (Makefile.am): Likewise.
2959         * modules/malloc (Makefile.am): Likewise.
2960         * modules/mathl (Makefile.am): Likewise.
2961         * modules/mbchar (Makefile.am): Likewise.
2962         * modules/md2 (Makefile.am): Likewise.
2963         * modules/md4 (Makefile.am): Likewise.
2964         * modules/md5 (Makefile.am): Likewise.
2965         * modules/memcasecmp (Makefile.am): Likewise.
2966         * modules/memchr (Makefile.am): Likewise.
2967         * modules/memcmp (Makefile.am): Likewise.
2968         * modules/memcoll (Makefile.am): Likewise.
2969         * modules/memcpy (Makefile.am): Likewise.
2970         * modules/memmem (Makefile.am): Likewise.
2971         * modules/memmove (Makefile.am): Likewise.
2972         * modules/mempcpy (Makefile.am): Likewise.
2973         * modules/memrchr (Makefile.am): Likewise.
2974         * modules/memset (Makefile.am): Likewise.
2975         * modules/memxor (Makefile.am): Likewise.
2976         * modules/mkancesdirs (Makefile.am): Likewise.
2977         * modules/mkdir-p (Makefile.am): Likewise.
2978         * modules/mkdir (Makefile.am): Likewise.
2979         * modules/mkdtemp (Makefile.am): Likewise.
2980         * modules/mkstemp (Makefile.am): Likewise.
2981         * modules/mktime (Makefile.am): Likewise.
2982         * modules/modechange (Makefile.am): Likewise.
2983         * modules/mountlist (Makefile.am): Likewise.
2984         * modules/nanosleep (Makefile.am): Likewise.
2985         * modules/obstack (Makefile.am): Likewise.
2986         * modules/openat (Makefile.am): Likewise.
2987         * modules/pagealign_alloc (Makefile.am): Likewise.
2988         * modules/pathmax (Makefile.am): Likewise.
2989         * modules/physmem (Makefile.am): Likewise.
2990         * modules/poll (Makefile.am): Likewise.
2991         * modules/posixtm (Makefile.am): Likewise.
2992         * modules/posixver (Makefile.am): Likewise.
2993         * modules/putenv (Makefile.am): Likewise.
2994         * modules/quote (Makefile.am): Likewise.
2995         * modules/quotearg (Makefile.am): Likewise.
2996         * modules/raise (Makefile.am): Likewise.
2997         * modules/read-file (Makefile.am): Likewise.
2998         * modules/readline (Makefile.am): Likewise.
2999         * modules/readlink (Makefile.am): Likewise.
3000         * modules/readtokens (Makefile.am): Likewise.
3001         * modules/readutmp (Makefile.am): Likewise.
3002         * modules/realloc (Makefile.am): Likewise.
3003         * modules/regex (Makefile.am): Likewise.
3004         * modules/rename-dest-slash (Makefile.am): Likewise.
3005         * modules/rename (Makefile.am): Likewise.
3006         * modules/rijndael (Makefile.am): Likewise.
3007         * modules/rmdir (Makefile.am): Likewise.
3008         * modules/rpmatch (Makefile.am): Likewise.
3009         * modules/safe-read (Makefile.am): Likewise.
3010         * modules/safe-write (Makefile.am): Likewise.
3011         * modules/same-inode (Makefile.am): Likewise.
3012         * modules/same (Makefile.am): Likewise.
3013         * modules/save-cwd (Makefile.am): Likewise.
3014         * modules/savedir (Makefile.am): Likewise.
3015         * modules/setenv (Makefile.am): Likewise.
3016         * modules/settime (Makefile.am): Likewise.
3017         * modules/sha1 (Makefile.am): Likewise.
3018         * modules/sig2str (Makefile.am): Likewise.
3019         * modules/snprintf (Makefile.am): Likewise.
3020         * modules/stat-macros (Makefile.am): Likewise.
3021         * modules/stat-time (Makefile.am): Likewise.
3022         * modules/stdbool (Makefile.am): Likewise.
3023         * modules/stdint (Makefile.am): Likewise.
3024         * modules/stdlib-safer (Makefile.am): Likewise.
3025         * modules/stpcpy (Makefile.am): Likewise.
3026         * modules/stpncpy (Makefile.am): Likewise.
3027         * modules/strcase (Makefile.am): Likewise.
3028         * modules/strcasestr (Makefile.am): Likewise.
3029         * modules/strchrnul (Makefile.am): Likewise.
3030         * modules/strcspn (Makefile.am): Likewise.
3031         * modules/strdup (Makefile.am): Likewise.
3032         * modules/strerror (Makefile.am): Likewise.
3033         * modules/strftime (Makefile.am): Likewise.
3034         * modules/strndup (Makefile.am): Likewise.
3035         * modules/strnlen (Makefile.am): Likewise.
3036         * modules/strpbrk (Makefile.am): Likewise.
3037         * modules/strsep (Makefile.am): Likewise.
3038         * modules/strstr (Makefile.am): Likewise.
3039         * modules/strtod (Makefile.am): Likewise.
3040         * modules/strtoimax (Makefile.am): Likewise.
3041         * modules/strtok_r (Makefile.am): Likewise.
3042         * modules/strtol (Makefile.am): Likewise.
3043         * modules/strtoll (Makefile.am): Likewise.
3044         * modules/strtoul (Makefile.am): Likewise.
3045         * modules/strtoull (Makefile.am): Likewise.
3046         * modules/strtoumax (Makefile.am): Likewise.
3047         * modules/strverscmp (Makefile.am): Likewise.
3048         * modules/sys_socket (Makefile.am): Likewise.
3049         * modules/sys_stat (Makefile.am): Likewise.
3050         * modules/sysexits (Makefile.am): Likewise.
3051         * modules/time_r (Makefile.am): Likewise.
3052         * modules/timegm (Makefile.am): Likewise.
3053         * modules/timespec (Makefile.am): Likewise.
3054         * modules/tmpfile-safer (Makefile.am): Likewise.
3055         * modules/trim (Makefile.am): Likewise.
3056         * modules/unistd-safer (Makefile.am): Likewise.
3057         * modules/unlinkdir (Makefile.am): Likewise.
3058         * modules/unlocked-io (Makefile.am): Likewise.
3059         * modules/userspec (Makefile.am): Likewise.
3060         * modules/utime (Makefile.am): Likewise.
3061         * modules/utimecmp (Makefile.am): Likewise.
3062         * modules/utimens (Makefile.am): Likewise.
3063         * modules/vasnprintf (Makefile.am): Likewise.
3064         * modules/vasprintf (Makefile.am): Likewise.
3065         * modules/vsnprintf (Makefile.am): Likewise.
3066         * modules/xalloc (Makefile.am): Likewise.
3067         * modules/xgetcwd (Makefile.am): Likewise.
3068         * modules/xnanosleep (Makefile.am): Likewise.
3069         * modules/xreadlink (Makefile.am): Likewise.
3070         * modules/xstrtod (Makefile.am): Likewise.
3071         * modules/xstrtol (Makefile.am): Likewise.
3072         * modules/xstrtold (Makefile.am): Likewise.
3073         * modules/yesno (Makefile.am): Likewise.
3074         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3075
3076 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3077
3078         * modules/error (Makefile.am): Distribute files through
3079         EXTRA_DIST, not lib_SOURCES.
3080
3081 2006-10-12  Eric Blake  <ebb9@byu.net>
3082
3083         * modules/error (Makefile.am): Distribute files in /lib.
3084         * modules/obstack (Makefile.am): Likewise.
3085
3086 2006-10-12  Bruno Haible  <bruno@clisp.org>
3087
3088         * modules/acl (Makefile.am): Distribute all files in lib/ through
3089         EXTRA_DIST.
3090         * modules/arcfour (Makefile.am): Likewise.
3091         * modules/arctwo (Makefile.am): Likewise.
3092         * modules/argmatch (Makefile.am): Likewise.
3093         * modules/argz (Makefile.am): Likewise.
3094         * modules/atexit (Makefile.am): Likewise.
3095         * modules/backupfile (Makefile.am): Likewise.
3096         * modules/c-strtod (Makefile.am): Likewise.
3097         * modules/c-strtold (Makefile.am): Likewise.
3098         * modules/calloc (Makefile.am): Likewise.
3099         * modules/canon-host (Makefile.am): Likewise.
3100         * modules/canonicalize (Makefile.am): Likewise.
3101         * modules/chdir-long (Makefile.am): Likewise.
3102         * modules/chdir-safer (Makefile.am): Likewise.
3103         * modules/check-version (Makefile.am): Likewise.
3104         * modules/chown (Makefile.am): Likewise.
3105         * modules/cloexec (Makefile.am): Likewise.
3106         * modules/close-stream (Makefile.am): Likewise.
3107         * modules/closeout (Makefile.am): Likewise.
3108         * modules/crc (Makefile.am): Likewise.
3109         * modules/cycle-check (Makefile.am): Likewise.
3110         * modules/des (Makefile.am): Likewise.
3111         * modules/dirfd (Makefile.am): Likewise.
3112         * modules/dirname (Makefile.am): Likewise.
3113         * modules/dup2 (Makefile.am): Likewise.
3114         * modules/euidaccess (Makefile.am): Likewise.
3115         * modules/exclude (Makefile.am): Likewise.
3116         * modules/exitfail (Makefile.am): Likewise.
3117         * modules/fcntl-safer (Makefile.am): Likewise.
3118         * modules/file-type (Makefile.am): Likewise.
3119         * modules/fileblocks (Makefile.am): Likewise.
3120         * modules/filemode (Makefile.am): Likewise.
3121         * modules/filenamecat (Makefile.am): Likewise.
3122         * modules/fnmatch (Makefile.am): Likewise.
3123         * modules/fopen-safer (Makefile.am): Likewise.
3124         * modules/fpending (Makefile.am): Likewise.
3125         * modules/fprintftime (Makefile.am): Likewise.
3126         * modules/free (Makefile.am): Likewise.
3127         * modules/fsusage (Makefile.am): Likewise.
3128         * modules/ftruncate (Makefile.am): Likewise.
3129         * modules/fts (Makefile.am): Likewise.
3130         * modules/gc (Makefile.am): Likewise.
3131         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3132         * modules/getaddrinfo (Makefile.am): Likewise.
3133         * modules/getcwd (Makefile.am): Likewise.
3134         * modules/getdelim (Makefile.am): Likewise.
3135         * modules/getdomainname (Makefile.am): Likewise.
3136         * modules/getgroups (Makefile.am): Likewise.
3137         * modules/gethostname (Makefile.am): Likewise.
3138         * modules/gethrxtime (Makefile.am): Likewise.
3139         * modules/getline (Makefile.am): Likewise.
3140         * modules/getloadavg (Makefile.am): Likewise.
3141         * modules/getlogin_r (Makefile.am): Likewise.
3142         * modules/getopt (Makefile.am): Likewise.
3143         * modules/getpass (Makefile.am): Likewise.
3144         * modules/getpass-gnu (Makefile.am): Likewise.
3145         * modules/getsubopt (Makefile.am): Likewise.
3146         * modules/gettime (Makefile.am): Likewise.
3147         * modules/gettimeofday (Makefile.am): Likewise.
3148         * modules/getugroups (Makefile.am): Likewise.
3149         * modules/getusershell (Makefile.am): Likewise.
3150         * modules/glob (Makefile.am): Likewise.
3151         * modules/group-member (Makefile.am): Likewise.
3152         * modules/hard-locale (Makefile.am): Likewise.
3153         * modules/hash (Makefile.am): Likewise.
3154         * modules/hmac-md5 (Makefile.am): Likewise.
3155         * modules/hmac-sha1 (Makefile.am): Likewise.
3156         * modules/human (Makefile.am): Likewise.
3157         * modules/idcache (Makefile.am): Likewise.
3158         * modules/imaxabs (Makefile.am): Likewise.
3159         * modules/imaxdiv (Makefile.am): Likewise.
3160         * modules/inet_ntop (Makefile.am): Likewise.
3161         * modules/inet_pton (Makefile.am): Likewise.
3162         * modules/inttostr (Makefile.am): Likewise.
3163         * modules/isapipe (Makefile.am): Likewise.
3164         * modules/lchown (Makefile.am): Likewise.
3165         * modules/long-options (Makefile.am): Likewise.
3166         * modules/lstat (Makefile.am): Likewise.
3167         * modules/malloc (Makefile.am): Likewise.
3168         * modules/mathl (Makefile.am): Likewise.
3169         * modules/mbchar (Makefile.am): Likewise.
3170         * modules/md2 (Makefile.am): Likewise.
3171         * modules/md4 (Makefile.am): Likewise.
3172         * modules/md5 (Makefile.am): Likewise.
3173         * modules/memcasecmp (Makefile.am): Likewise.
3174         * modules/memchr (Makefile.am): Likewise.
3175         * modules/memcmp (Makefile.am): Likewise.
3176         * modules/memcoll (Makefile.am): Likewise.
3177         * modules/memcpy (Makefile.am): Likewise.
3178         * modules/memmem (Makefile.am): Likewise.
3179         * modules/memmove (Makefile.am): Likewise.
3180         * modules/mempcpy (Makefile.am): Likewise.
3181         * modules/memrchr (Makefile.am): Likewise.
3182         * modules/memset (Makefile.am): Likewise.
3183         * modules/memxor (Makefile.am): Likewise.
3184         * modules/mkancesdirs (Makefile.am): Likewise.
3185         * modules/mkdir (Makefile.am): Likewise.
3186         * modules/mkdir-p (Makefile.am): Likewise.
3187         * modules/mkdtemp (Makefile.am): Likewise.
3188         * modules/mkstemp (Makefile.am): Likewise.
3189         * modules/mktime (Makefile.am): Likewise.
3190         * modules/modechange (Makefile.am): Likewise.
3191         * modules/mountlist (Makefile.am): Likewise.
3192         * modules/nanosleep (Makefile.am): Likewise.
3193         * modules/openat (Makefile.am): Likewise.
3194         * modules/pagealign_alloc (Makefile.am): Likewise.
3195         * modules/physmem (Makefile.am): Likewise.
3196         * modules/poll (Makefile.am): Likewise.
3197         * modules/posixtm (Makefile.am): Likewise.
3198         * modules/posixver (Makefile.am): Likewise.
3199         * modules/putenv (Makefile.am): Likewise.
3200         * modules/quote (Makefile.am): Likewise.
3201         * modules/quotearg (Makefile.am): Likewise.
3202         * modules/raise (Makefile.am): Likewise.
3203         * modules/read-file (Makefile.am): Likewise.
3204         * modules/readline (Makefile.am): Likewise.
3205         * modules/readlink (Makefile.am): Likewise.
3206         * modules/readtokens (Makefile.am): Likewise.
3207         * modules/readutmp (Makefile.am): Likewise.
3208         * modules/realloc (Makefile.am): Likewise.
3209         * modules/regex (Makefile.am): Likewise.
3210         * modules/rename (Makefile.am): Likewise.
3211         * modules/rename-dest-slash (Makefile.am): Likewise.
3212         * modules/rijndael (Makefile.am): Likewise.
3213         * modules/rmdir (Makefile.am): Likewise.
3214         * modules/rpmatch (Makefile.am): Likewise.
3215         * modules/safe-read (Makefile.am): Likewise.
3216         * modules/safe-write (Makefile.am): Likewise.
3217         * modules/same (Makefile.am): Likewise.
3218         * modules/save-cwd (Makefile.am): Likewise.
3219         * modules/savedir (Makefile.am): Likewise.
3220         * modules/setenv (Makefile.am): Likewise.
3221         * modules/settime (Makefile.am): Likewise.
3222         * modules/sha1 (Makefile.am): Likewise.
3223         * modules/sig2str (Makefile.am): Likewise.
3224         * modules/snprintf (Makefile.am): Likewise.
3225         * modules/stdlib-safer (Makefile.am): Likewise.
3226         * modules/stpcpy (Makefile.am): Likewise.
3227         * modules/stpncpy (Makefile.am): Likewise.
3228         * modules/strcase (Makefile.am): Likewise.
3229         * modules/strcasestr (Makefile.am): Likewise.
3230         * modules/strchrnul (Makefile.am): Likewise.
3231         * modules/strcspn (Makefile.am): Likewise.
3232         * modules/strdup (Makefile.am): Likewise.
3233         * modules/strerror (Makefile.am): Likewise.
3234         * modules/strftime (Makefile.am): Likewise.
3235         * modules/strndup (Makefile.am): Likewise.
3236         * modules/strnlen (Makefile.am): Likewise.
3237         * modules/strpbrk (Makefile.am): Likewise.
3238         * modules/strsep (Makefile.am): Likewise.
3239         * modules/strstr (Makefile.am): Likewise.
3240         * modules/strtod (Makefile.am): Likewise.
3241         * modules/strtoimax (Makefile.am): Likewise.
3242         * modules/strtok_r (Makefile.am): Likewise.
3243         * modules/strtol (Makefile.am): Likewise.
3244         * modules/strtoll (Makefile.am): Likewise.
3245         * modules/strtoul (Makefile.am): Likewise.
3246         * modules/strtoull (Makefile.am): Likewise.
3247         * modules/strtoumax (Makefile.am): Likewise.
3248         * modules/strverscmp (Makefile.am): Likewise.
3249         * modules/time_r (Makefile.am): Likewise.
3250         * modules/timegm (Makefile.am): Likewise.
3251         * modules/tmpfile-safer (Makefile.am): Likewise.
3252         * modules/unistd-safer (Makefile.am): Likewise.
3253         * modules/unlinkdir (Makefile.am): Likewise.
3254         * modules/userspec (Makefile.am): Likewise.
3255         * modules/utime (Makefile.am): Likewise.
3256         * modules/utimecmp (Makefile.am): Likewise.
3257         * modules/utimens (Makefile.am): Likewise.
3258         * modules/vasnprintf (Makefile.am): Likewise.
3259         * modules/vasprintf (Makefile.am): Likewise.
3260         * modules/vsnprintf (Makefile.am): Likewise.
3261         * modules/xalloc (Makefile.am): Likewise.
3262         * modules/xgetcwd (Makefile.am): Likewise.
3263         * modules/xnanosleep (Makefile.am): Likewise.
3264         * modules/xreadlink (Makefile.am): Likewise.
3265         * modules/xstrtod (Makefile.am): Likewise.
3266         * modules/xstrtol (Makefile.am): Likewise.
3267         * modules/xstrtold (Makefile.am): Likewise.
3268         * modules/yesno (Makefile.am): Likewise.
3269
3270 2006-10-12  Jim Meyering  <jim@meyering.net>
3271
3272         * m4/getloadavg.m4: Revert the change below.
3273
3274         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
3275         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
3276         fail with a symlink, which is what coreutils' ./bootstrap now
3277         creates by default.
3278
3279 2006-10-12  Bruno Haible  <bruno@clisp.org>
3280
3281         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
3282         mingw.
3283         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
3284         MSVC and mingw explicitly.
3285
3286 2006-10-11  Simon Josefsson  <jas@extundo.com>
3287             Bruno Haible  <bruno@clisp.org>
3288
3289         Add support for multiple gnulib-tool invocations in the scope of a
3290         single configure.ac file.
3291         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
3292         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
3293         with the same contents as the _LIBADD variable.
3294         (func_emit_initmacro_start, func_emit_initmacro_end,
3295         func_emit_initmacro_done): New functions.
3296         (func_import, func_create_testdir): Invoke them. Allow the identifiers
3297         gl_LIBOBJS and gl_LTLIBOBJS.
3298
3299 2006-10-11  Bruno Haible  <bruno@clisp.org>
3300
3301         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
3302         (func_create_testdir): Don't create po/Makefile.am, don't invoke
3303         autoreconf. Instead, invoke autopoint explicitly but move back the
3304         *.m4 files from gnulib.
3305
3306 2006-10-11  Bruno Haible  <bruno@clisp.org>
3307
3308         * gnulib-tool (func_usage): Make module names after --create-testdir
3309         optional.
3310         (func_create_testdir): If no module was specified, use nearly all
3311         modules.
3312
3313 2006-10-12  Jim Meyering  <jim@meyering.net>
3314
3315         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3316         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3317         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3318         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3319         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3320         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3321         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3322         (fts_set_stat_required): New function.
3323         (fts_open): Defer the calls to fts_stat, if possible or requested.
3324         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3325         into fts_stat itself.
3326         (fts_read): Perform any required (deferred) fts_stat call.
3327         (fts_build): Likewise, for the directory we're about to open and read.
3328         In the readdir loop, carefully decide whether each entry will require
3329         an eventual call to fts_stat, using dirent.d_type info if available.
3330         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3331         a command line argument into this function.  Update all callers.
3332         Map a return value of FTS_DOT to FTS_D for a command line argument.
3333         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3334         Thanks to Miklos Szeredi for his tenacity and for the initial
3335         bug report about "find" failing on a FUSE-based file system.
3336
3337         * lib/fts.c (fts_open): Use consistent indentation.
3338
3339 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3340
3341         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3342         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3343         reported by Jim Meyering.  All uses of cache variables renamed
3344         to match Autoconf's.
3345         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3346         the other one.
3347
3348         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3349         Fix misspelling in diagnostic.
3350
3351 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3352
3353         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3354         defined.  Problem reported by Matthew Woehlke.
3355
3356         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3357         Add support for Tandem NonStop R series.
3358         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3359         Use new macro.
3360
3361         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3362         (has_trailing_slash): Omit size arg; all callers changed.
3363         Omit 'inline', since it doesn't help performance and we'd
3364         need to configure it.
3365         Don't count //, ///, etc. as having a trailing slash.
3366         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3367         (rpl_rename_dest_slash): On failure, use rename's errno rather
3368         than (in some cases) an incorrect or junk errno.
3369         Simplify code by removing need to compute length; this does
3370         cause it to make two passes instead of one over the file name,
3371         but it's worth it.
3372
3373         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3374         change, since Autoconf's version may no longer be appropriate now
3375         that we are using CVS Autoconf's version.  Add support for Tandem.
3376
3377 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3378             Bruno Haible  <bruno@clisp.org>
3379
3380         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3381         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3382         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3383         gl_AC_TYPE_LONG_LONG.
3384
3385         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3386         instead of HAVE_LONG_LONG.
3387         * lib/printf-args.c (printf_fetchargs): Likewise.
3388         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3389         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3390         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3391         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3392         gl_AC_TYPE_LONG_LONG.
3393
3394 2006-10-11  Bruno Haible  <bruno@clisp.org>
3395
3396         * m4/longlong.m4: Add comments.
3397         * m4/ulonglong.m4: Likewise.
3398
3399 2006-10-10  Bruno Haible  <bruno@clisp.org>
3400
3401         Make it possible to #define stpcpy, strdup to aliases.
3402         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3403         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3404
3405 2006-10-10  Bruno Haible  <bruno@clisp.org>
3406
3407         Make it possible to #define gcd to an alias.
3408         * lib/gcd.c: Include config.h.
3409
3410 2006-10-10  Bruno Haible  <bruno@clisp.org>
3411
3412         Make it possible to #define c_isascii to an alias.
3413         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3414         defined. Undefine the macros before defining them, to avoid gcc
3415         warnings.
3416         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3417         define NO_C_CTYPE_MACROS early.
3418
3419 2006-10-10  Bruno Haible  <bruno@clisp.org>
3420
3421         Make it possible to #define set_program_name to an alias.
3422         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3423         ENABLE_RELOCATABLE early.
3424
3425 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3426
3427         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3428         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3429         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3430         More generally, don't assume that 64-bit signed int is available
3431         if unsigned int is, and vice versa.
3432         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3433         unsigned symbols, not on their signed counterparts.
3434         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3435         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3436         (UINT64_C, UINTMAX_C):
3437         Likewise.
3438         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3439         unsigned counterparts.
3440         (Have_long_long, Unsigned): New macros.
3441         (Int): Renamed from INT.
3442         (strtoimax): Use the new macros.
3443         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3444         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3445         * modules/inttypes (inttypes.h): Substitute
3446         HAVE_UNSIGNED_LONG_LONG_INT.
3447         * modules/stdint (stdint.h): Likewise.
3448         (Files): Add m4/ulonglong.m4.
3449
3450 2006-10-10  Bruno Haible  <bruno@clisp.org>
3451
3452         Fix a gcc -Wshadow warning.
3453         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3454         to 'bucket'.
3455         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
3456         gl_linked_indexof_from_to): Likewise.
3457         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
3458         Likewise.
3459         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
3460         Likewise.
3461         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3462         Reported by Eric Blake.
3463
3464 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3465
3466         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3467         for NetBSD.  Problem reported by Bruno Haible.
3468
3469 2006-10-09  Jim Meyering  <jim@meyering.net>
3470
3471         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3472         Patch from Bruno Haible.
3473
3474 2006-10-09  Jim Meyering  <jim@meyering.net>
3475
3476         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3477         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3478         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
3479
3480 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3481
3482         Don't include <config.h> twice; this doesn't work in some cases,
3483         e.g., when config.h has "#define intmax_t long long int" and
3484         we include <config.h>, <inttypes.h>, <config.h> in that order.
3485         Problem reported by Matthew Woehlke in:
3486         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
3487         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
3488         * lib/fts-cycle.c: Don't include config.h.
3489         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
3490         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
3491         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
3492         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
3493         inttypes.h.
3494         * lib/xstrtoumax.c: Likewise.
3495         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
3496         __strtol and the like, so that this module is more like its siblings.
3497         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
3498         Remove; no longer needed now that we assume gnulib inttypes.h.
3499
3500 2006-10-08  Bruno Haible  <bruno@clisp.org>
3501
3502         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
3503         option.
3504
3505 2006-10-07  Jim Meyering  <jim@meyering.net>
3506
3507         * modules/inttypes (inttypes.h): Revert what seems to have been
3508         an inadvertent part of today's change: use "|", not "/" in the
3509         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
3510
3511 2006-10-07  Bruno Haible  <bruno@clisp.org>
3512
3513         * modules/sublist: New file.
3514
3515 2006-10-07  Bruno Haible  <bruno@clisp.org>
3516
3517         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
3518         * modules/argz (argz.h): Likewise.
3519         * modules/arpa_inet (arpa/inet.h): Likewise.
3520         * modules/byteswap (byteswap.h): Likewise.
3521         * modules/configmake (configmake.h): Likewise.
3522         * modules/fcntl (fcntl.h): Likewise.
3523         * modules/fnmatch (fnmatch.h): Likewise.
3524         * modules/getopt (getopt.h): Likewise.
3525         * modules/glob (glob.h): Likewise.
3526         * modules/inttypes (inttypes.h): Likewise.
3527         * modules/netinet_in (netinet/in.h): Likewise.
3528         * modules/poll (poll.h): Likewise.
3529         * modules/stdbool (stdbool.h): Likewise.
3530         * modules/stdint (stdint.h): Likewise.
3531         * modules/sys_select (sys/select.h): Likewise.
3532         * modules/sys_socket (sys/socket.h): Likewise.
3533         * modules/sys_stat (sys/stat.h): Likewise.
3534         * modules/sysexits (sysexits.h): Likewise.
3535         * modules/unistd (unistd.h): Likewise.
3536         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3537         Add a "DO NOT EDIT" comment to the generated file.
3538         (func_import): Likewise for gnulib-comp.m4.
3539
3540 2006-10-07  Bruno Haible  <bruno@clisp.org>
3541
3542         * lib/gl_sublist.h: New file.
3543         * lib/gl_sublist.c: New file.
3544
3545 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3546
3547         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3548         name (relative to the original working directory) and the file
3549         name component (relative to the temporary working directory).  All
3550         callers changed.
3551         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3552         * lib/mkdir-p.c (make_dir_parents): Likewise.
3553         * lib/mkdir-p.h (make_dir_parents): Likewise.
3554
3555 2006-10-06  Eric Blake  <ebb9@byu.net>
3556
3557         Define several macros for use by the clean-temp module.
3558         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3559         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3560         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3561
3562         * lib/clean-temp.h (close_stream_temp): New declaration.
3563         * lib/clean-temp.c (includes): Pull in headers according to what
3564         other modules are in use.
3565         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3566
3567 2006-10-06  Bruno Haible  <bruno@clisp.org>
3568
3569         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3570         instead of fopen, fwriteerror.
3571
3572 2006-10-06  Bruno Haible  <bruno@clisp.org>
3573
3574         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3575         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3576         int.
3577         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3578         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3579         Return an error indicator.
3580         Suggested by Eric Blake.
3581
3582 2006-10-06  Bruno Haible  <bruno@clisp.org>
3583
3584         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3585         Reported by Eric Blake.
3586
3587 2006-10-06  Bruno Haible  <bruno@clisp.org>
3588
3589         * modules/closeout (Description): Mention stderr too.
3590
3591 2006-10-06  Bruno Haible  <bruno@clisp.org>
3592         and Paul Eggert  <eggert@cs.ucla.edu>
3593
3594         * lib/closeout.c (close_stdout): Also close stderr.
3595         * lib/closeout.h: Update comment.
3596
3597 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3598
3599         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3600         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3601         * lib/dirchownmod.c: Include lchown.h.
3602         * lib/lchown.c: Don't include files that lchown.h now includes.
3603         Don't declare chown, since lchown.h now does that.
3604         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3605         (lchown): Define to rpl_chown if lchown is declared but
3606         does not exist.  Declare using a prototype if lchown is not
3607         declared.  Add a copyright notice.
3608         * lib/mkstemp.h: Include <unistd.h>.
3609         * lib/openat.c: Include lchown.h.
3610
3611         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3612         we now test for that separately.
3613         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3614         rather than O_NOFOLLOW, when testing whether it's possible to
3615         avoid a race condition reliably.
3616         * lib/savewd.c (savewd_chdir): Likewise.
3617
3618         Remove macros that are no longer needed now that stdint.h is
3619         reliable.
3620         * lib/fsusage.c (UINTMAX_MAX): Remove.
3621         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3622         * lib/utimecmp.c (SIZE_MAX): Remove.
3623
3624         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3625
3626         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3627         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3628         O_NOATIME works.
3629
3630 2006-10-05  Bruno Haible  <bruno@clisp.org>
3631
3632         * lib/gl_list.h (gl_sortedlist_search_from_to,
3633         gl_sortedlist_indexof_from_to): New declarations.
3634         (gl_list_implementation): New fields sortedlist_search_from_to,
3635         sortedlist_indexof_from_to.
3636         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3637         inline functions.
3638         * lib/gl_list.c (gl_sortedlist_search_from_to,
3639         gl_sortedlist_indexof_from_to): New functions.
3640         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3641         function.
3642         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3643         (gl_array_sortedlist_search_from_to): New function.
3644         (gl_array_list_implementation): Update.
3645         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3646         function.
3647         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3648         (gl_carray_sortedlist_search_from_to): New function.
3649         (gl_carray_list_implementation): Update.
3650         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3651         gl_linked_sortedlist_indexof_from_to): New functions.
3652         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3653         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3654         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3655         gl_tree_sortedlist_indexof_from_to): New functions.
3656         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3657         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3658         Update.
3659         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3660         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3661         Update.
3662
3663 2006-10-05  Bruno Haible  <bruno@clisp.org>
3664
3665         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3666         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3667         (struct gl_list_implementation): Add fields search_from_to,
3668         indexof_from_to. Remove fields search, indexof.
3669         (gl_list_search): Use the search_from_to method.
3670         (gl_list_search_from, gl_list_search_from_to): New functions.
3671         (gl_list_indexof): Use the indexof_from_to method.
3672         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3673         * lib/gl_list.c (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_array_list.c (gl_array_indexof_from_to): Renamed from
3678         gl_array_indexof. Add start_index, end_index arguments.
3679         (gl_array_search_from_to): Renamed from gl_array_search. Add
3680         start_index, end_index arguments.
3681         (gl_array_remove, gl_array_list_implementation): Update.
3682         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3683         gl_carray_indexof. Add start_index, end_index arguments.
3684         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3685         start_index, end_index arguments.
3686         (gl_carray_remove, gl_carray_list_implementation): Update.
3687         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3688         gl_linked_search. Add start_index, end_index arguments.
3689         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3690         start_index, end_index arguments.
3691         (gl_linked_remove): Update.
3692         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3693         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3694         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3695         field to 'size_t'.
3696         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3697         gl_tree_search. Add start_index, end_index arguments.
3698         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3699         start_index, end_index arguments.
3700         (gl_tree_remove): Update.
3701         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3702         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3703         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3704         function.
3705         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3706         gl_tree_search. Add start_index, end_index arguments.
3707         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3708         start_index, end_index arguments.
3709         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3710         Update.
3711         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3712
3713 2006-10-05  Bruno Haible  <bruno@clisp.org>
3714
3715         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3716
3717         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3718         fwriteerror_temp): New declarations.
3719         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3720         (descriptors): New variable.
3721         (cleanup): First, close the descriptors.
3722         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3723         fclose_temp, fwriteerror_temp): New functions.
3724
3725 2006-10-04  Jim Meyering  <jim@meyering.net>
3726
3727         * lib/fts.c (fts_open): Tiny comment change.
3728
3729 2006-10-04  Bruno Haible  <bruno@clisp.org>
3730
3731         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3732         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3733         gl_LOCK_BODY.
3734         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3735         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3736         gl_LOCK_EARLY_BODY.
3737         (gl_LOCK): Require gl_LOCK_BODY.
3738
3739 2006-10-04  Bruno Haible  <bruno@clisp.org>
3740
3741         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3742         (gl_oset_search_atleast): New declaration.
3743         (struct gl_oset_implementation): Add field 'search_atleast'.
3744         (gl_oset_search_atleast): New inline function.
3745         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3746         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3747         (gl_array_oset_implementation): Update.
3748         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3749         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3750         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3751
3752 2006-10-04  Bruno Haible  <bruno@clisp.org>
3753
3754         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3755
3756 2006-10-03  Bruno Haible  <bruno@clisp.org>
3757
3758         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3759         from gl_avltreehash_list_implementation.
3760
3761 2006-10-03  Bruno Haible  <bruno@clisp.org>
3762
3763         * lib/gl_oset.c (gl_oset_add): Fix return type.
3764
3765 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3766
3767         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3768
3769 2006-10-02  Eric Blake  <ebb9@byu.net>
3770
3771         * modules/strnlen (Depends-on): Add extensions.
3772
3773 2006-10-02  Eric Blake  <ebb9@byu.net>
3774
3775         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3776         definition in 2.60+.
3777
3778 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3779
3780         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3781         checks.
3782
3783 2006-10-02  Bruno Haible  <bruno@clisp.org>
3784
3785         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3786         to the AUTOMAKE_OPTIONS.
3787         Reported by Jim Meyering.
3788
3789 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3790
3791         Work around bug in Solaris 10 /proc file system:
3792         /proc/self/fd/NNN/.. isn't the parent directory of
3793         the directory whose file descriptor is NNN.  This needs to
3794         be worked around at run time, not compile time, since a
3795         program might be built on Solaris 8, where things work, and
3796         run on Solaris 10.
3797         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
3798         to use the following interface instead:
3799         (OPENAT_BUFFER_SIZE): New macro.
3800         (openat_proc_name): New function.
3801         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
3802         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
3803         Likewise.
3804         * lib/openat-proc.c: New file.
3805         * modules/openat (Files): Add lib/openat-proc.c.
3806         (Depends-on): Add same-inode, stdbool.
3807         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
3808
3809 2006-09-29  Bruno Haible  <bruno@clisp.org>
3810
3811         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
3812         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
3813         argument. Set stdout_closed before testing for ferror, not after.
3814         (fwriteerror, fwriteerror_no_ebadf): New functions.
3815
3816 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3817
3818         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
3819
3820 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
3821
3822         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
3823         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
3824
3825 2006-09-28  Jim Meyering  <jim@meyering.net>
3826
3827         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
3828         Include <unistd.h>.
3829
3830 2006-09-28  Bruno Haible  <bruno@clisp.org>
3831
3832         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
3833         * modules/linkedhash-list (Depends-on): Likewise.
3834         * modules/rbtreehash-list (Depends-on): Likewise.
3835
3836 2006-09-28  Bruno Haible  <bruno@clisp.org>
3837
3838         * lib/strndup.h: Simplify the redefinition of strndup.
3839         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
3840         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
3841
3842 2006-09-28  Bruno Haible  <bruno@clisp.org>
3843
3844         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
3845         * lib/gl_linkedhash_list.c: Likewise.
3846         * lib/gl_rbtreehash_list.c: Likewise.
3847
3848 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
3849
3850         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
3851         getaddrinfo.
3852
3853         * lib/__fpending.h: Don't include <stdio_ext.h> unless
3854         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
3855         it causes <stdio_ext.h> to cause a compile-time error.
3856         Problem reported by Nelson H. F. Beebe.
3857         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
3858         of HAVE_DECL___PENDING.
3859
3860         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
3861         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
3862         declaration.
3863
3864 2006-09-27  Jim Meyering  <jim@meyering.net>
3865
3866         This file could end up with a definition for a function
3867         named __strndup, rather than rpl_strndup on a system with
3868         incomplete weak_alias support.
3869         * lib/strndup.c (strndup): Rename from __strndup.
3870         Remove #defines that used to map __strndup to strndup.
3871         Don't use K&R prototypes.
3872         Remove LIBC-related code, since this file is not sync'd with glibc.
3873         * lib/strndup.h: Revamp, accordingly.
3874         * m4/strndup.m4: Modernize.
3875
3876 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3877
3878         * modules/savewd (Depends-on): Add 'raise'.
3879         * lib/savewd.c: Include <signal.h>, for 'raise'.
3880
3881 2006-09-26  Jim Meyering  <jim@meyering.net>
3882
3883         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
3884         when we detect Darwin 8.7.0's acl_get_file bug.
3885         Rearrange to perform the new (below) run-test while $LIBS
3886         contains any acl-related library.  Set USE_ACL at the end.
3887         (gl_ACL_GET_FILE): New function.
3888
3889 2006-09-26  Eric Blake  <ebb9@byu.net>
3890
3891         * lib/verror.c: Include <config.h> unconditionally.
3892
3893 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3894
3895         * modules/clock-time (Maintainer): Add self.
3896         * modules/getlogin_r (Depends-on): Add extensions.
3897
3898 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3899
3900         * modules/clock-time: New module.
3901         * modules/nanosleep (Depends-on): Add clock-time.
3902         * modules/gethrxtime (Depends-on): Likewise.
3903         * modules/gettime (Depends-on): Likewise.
3904         * modules/settime (Depends-on): Likewise.
3905
3906         * modules/fts-lgpl: Depend on openat.
3907         * modules/mkancesdirs: Depend on savewd.
3908         * modules/mkdir-p: Likewise.
3909
3910 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3911
3912         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
3913
3914         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
3915         `gl_have_arbitrary_file_name_length_limit' to
3916         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
3917         actually works between configure runs.
3918
3919 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3920             Bruno Haible  <bruno@clisp.org>
3921
3922         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
3923
3924 2006-09-25  Jim Meyering  <jim@meyering.net>
3925
3926         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
3927         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
3928
3929 2006-09-25  Eric Blake  <ebb9@byu.net>
3930
3931         * gnulib-tool (func_import, func_create_testdir): Fix typos in
3932         exec's in 2006-09-18 patch when shuffling fds.
3933
3934 2006-09-25  Bruno Haible  <bruno@clisp.org>
3935
3936         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
3937         Reported by Jim Meyering.
3938
3939 2006-09-24  Jim Meyering  <jim@meyering.net>
3940
3941         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
3942         compare a pointer against a literal "0".  That caused failures with
3943         at least HP-UX's hpcc.
3944
3945 2006-09-22  Simon Josefsson  <jas@extundo.com>
3946
3947         * modules/gc-sha1:
3948         * modules/gc-md4:
3949         * modules/gc-hmac-sha1:
3950         * modules/gc-hmac-md5:
3951         * modules/gc-des:
3952         * modules/gc-arcfour: Distribute more files.
3953
3954 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3955
3956         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
3957         (gl_linked_iterator_from_to): Initialize struct completely.
3958         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
3959         (gl_tree_iterator_from_to): Likewise
3960         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
3961         * lib/gl_array_list.c [lint] (gl_array_iterator)
3962         (gl_array_iterator_from_to): Likewise.
3963         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
3964         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
3965         (gl_carray_iterator_from_to): Likewise.
3966
3967         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
3968         * lib/md4.c (md4_process_block): Remove unused variable.
3969         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
3970         parentheses for clarity.
3971
3972 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3973
3974         * modules/bison-i18n (Depends-on): Add gettext.
3975
3976 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3977
3978         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
3979         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
3980         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
3981         also add missing comma that caused broken test.
3982         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
3983         stdlib.h, for `abort'.
3984         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
3985         variables.
3986         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
3987         include unistd.h if present, for `rmdir'.
3988         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
3989         variables.
3990         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
3991         in the process include standard headers for prototypes.
3992         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
3993         gets declared on GNU/Linux.
3994         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
3995         unistd.h, for `rmdir'.
3996         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
3997
3998         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
3999         always true.
4000         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
4001
4002         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
4003
4004 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4005
4006         * gnulib-tool (func_version): Create output all at once.  This
4007         may help avoid triggering unnecessary SIGPIPEs, and at any
4008         rate it doesn't hurt.
4009
4010 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4011             Bruno Haible  <bruno@clisp.org>
4012
4013         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
4014         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4015         * m4/signed.m4 (bh_C_SIGNED): Likewise.
4016
4017         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
4018         (gl_FUNC_VASPRINTF): Invoke it.
4019
4020 2006-09-22  Bruno Haible  <bruno@clisp.org>
4021
4022         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
4023         getloadavg.c as first argument.
4024
4025 2006-09-22  Bruno Haible  <bruno@clisp.org>
4026
4027         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
4028         at the beginning of the gl_INIT macro.
4029         * modules/getloadavg (configure.ac): Pass $gl_source_base to
4030         gl_GETLOADAVG.
4031
4032 2006-09-22  Bruno Haible  <bruno@clisp.org>
4033
4034         * gnulib-tool (func_create_megatestdir): Don't include the config-h
4035         module.
4036         Suggested by Ralf Wildenhues.
4037
4038 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
4039
4040         Import this patch from libc:
4041
4042         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4043
4044         * lib/regex_internal.c (re_string_reconstruct): Handle
4045         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4046         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4047         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4048         re_string_context_at.
4049
4050         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4051         now requires it.
4052         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4053         gl_REGEX now does it for us.
4054         (gl_REGEX): Add test taken from
4055         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4056
4057         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4058         Check that large offsets work.  Modernize Autoconf usages.
4059         Prefer "yes" to mean a good thing rather than a bad.
4060         Don't put "#define mkstemp" in config.h, as this might interfere
4061         with standard system headers that "#define mkstemp mkstemp64".
4062
4063         * modules/mkstemp (Depends-on): Add extensions, so that
4064         mkstemp is visible on some platforms.
4065         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4066         (Include): Change to "mkstemp.h" from <stdlib.h>.
4067         (Files): Add mkstemp.h.
4068
4069         * lib/mkstemp.h: New file, since some standard headers
4070         #define mkstemp.
4071         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4072         Include "mkstemp.h".
4073         Make the _LIBC code resemble glibc original more,
4074         e.g., use K&R style.
4075         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4076         (mkstemp): Remove, since mkstemp.h does this for us.
4077         * lib/stdlib--.h: Include mkstemp.h.
4078
4079         Import this patch from libc:
4080
4081         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4082
4083         * lib/tempname.c (__gen_tempname): Change attempts_min
4084         into a macro.  Use preprocessor to decide how to initialize
4085         attempts [Coverity CID 67].
4086
4087 2006-09-20  Bruno Haible  <bruno@clisp.org>
4088
4089         * lib/mkdtemp.c: Import from libc.
4090         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4091                 * sysdeps/posix/tempname.c (__gen_tempname): Change
4092                 attempts_min into a macro.  Use preprocessor to decide how to
4093                 initialize attempts [Coverity CID 67].
4094         2001-11-27  Paul Eggert  <eggert@twinsun.com>
4095                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
4096                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
4097
4098 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4099
4100         * gnulib-tool (func_exit): New function, to allow to pass the
4101         exit status portably through the trap.  Use everywhere.
4102         (--help, --version): Signal a write error.
4103         (trap): catch SIGPIPE, for write errors.
4104         Exit at the end of the trap, with the correct exit status.
4105
4106 2006-09-19  Karl Berry  <karl@gnu.org>
4107
4108         * doc/gnulib.texi: note about the license texinfo files.
4109
4110 2006-09-19  Eric Blake  <ebb9@byu.net>
4111
4112         * gnulib-tool: Avoid space-tab.
4113
4114 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4115
4116         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
4117         that prevented coreutils 6.1 from building.  Problem reported
4118         by Petter Reinholdtsen.
4119
4120 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4121
4122         * gnulib-tool (avoidlist): Fix typo that broke options like
4123         --avoid=lock that are used by coreutils bootstrap.
4124
4125 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
4126
4127         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
4128         more systematically.
4129
4130 2006-09-18  Jim Meyering  <jim@meyering.net>
4131
4132         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
4133
4134 2006-09-18  Bruno Haible  <bruno@clisp.org>
4135
4136         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
4137
4138 2006-09-18  Bruno Haible  <bruno@clisp.org>
4139
4140         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
4141         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
4142         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
4143         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
4144         * m4/gettext.m4: Require autoconf >= 2.52.
4145         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
4146         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
4147         of gl_cv_header_inttypes_h.
4148
4149 2006-09-18  Bruno Haible  <bruno@clisp.org>
4150
4151         * lib/javaversion.c: Include configmake.h.
4152
4153 2006-09-18  Bruno Haible  <bruno@clisp.org>
4154
4155         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
4156         avoid that the while loops be executed in a subshell.
4157
4158 2006-09-18  Bruno Haible  <bruno@clisp.org>
4159
4160         * MODULES.html.sh (func_module): Break long lines.
4161         Suggested by Bruce Korb <bkorb@gnu.org>.
4162
4163 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4164
4165         Speed up by a factor of 1.12.
4166         * gnulib-tool (nl): New variable.
4167         (func_import): Rewrite include directive extraction to only read each
4168         directive once.
4169
4170 2006-09-17  Bruno Haible  <bruno@clisp.org>
4171
4172         * modules/javaversion (Makefile.am): Remove DEFS setting.
4173         (Depends-on): Add configmake, for PKGDATADIR definition.
4174
4175 2006-09-17  Bruno Haible  <bruno@clisp.org>
4176
4177         * gnulib-tool (func_create_testdir): Rewrite all files at once.
4178
4179 2006-09-17  Bruno Haible  <bruno@clisp.org>
4180
4181         * gnulib-tool (func_append): New function, stolen from libtool.m4.
4182         (func_modules_transitive_closure, func_modules_add_dummy,
4183         func_modules_to_filelist, func_import, func_create_testdir,
4184         func_create_megatestdir, ...): Use it wherever possible.
4185         Suggested by Ralf Wildenhues.
4186
4187 2006-09-16  Karl Berry  <karl@gnu.org>
4188
4189         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
4190         to avoid sectioning errors.
4191         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
4192         [ifinfo]: blank line after @center-ed titles.
4193         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
4194         Spell FSF address consistently with others.
4195         (These changes approved by rms.)
4196
4197 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4198
4199         Speed up by a factor of 1.61.
4200         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
4201         already checked module names again.
4202
4203 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4204
4205         Speed up by a factor of 1.13.
4206         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
4207         for new_files, and the input to func_add_or_update.
4208
4209 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4210
4211         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
4212         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
4213
4214 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4215
4216         * modules/mkancesdirs (Depends-on): Add fcntl.
4217         * modules/savewd: New file.
4218         * MODULES.html.sh (File system functions): Add savewd.
4219
4220         * modules/configmake (Makefile.am): Add support for the
4221         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
4222
4223 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4224
4225         * m4/savewd.m4: New file.
4226
4227 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4228
4229         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
4230         (dirchownmod): New arg FD.  All callers changed.
4231         Use FD rather than opening the directory ourself, as opening is
4232         now the caller's responsibility.
4233         * lib/dirchownmod.h: Likewise.
4234         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
4235         hosts that require <sys/types.h> before <sys/stat.h>.  Include
4236         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
4237         (test_dir): Remove.
4238         (mkancesdirs): Return length of prefix of FILE that has already
4239         been made, or -2 if there is a child doing the work.  Redo
4240         algorithm so that it is O(N) rather than O(N**2).  Optimize away
4241         ".", and treat ".." specially since it might stray back into
4242         already-created areas.  Use a subprocess if necessary.  New arg
4243         WD; all users changed.  MAKE_DIR function should now return 1
4244         if it creates a directory that is not readable.  Return -2 if
4245         a child process is spun off.
4246         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
4247         Adjust signature to match code.
4248         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
4249         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
4250         all users changed.
4251         * lib/savewd.c, lib/savewd.h: New files.
4252
4253 2006-09-15  Jim Meyering  <jim@meyering.net>
4254
4255         * modules/rename-dest-slash: New module.
4256         * MODULES.html.sh (posix_compat): Add it here.
4257
4258         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
4259
4260 2006-09-15  Jim Meyering  <jim@meyering.net>
4261
4262         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
4263         file.
4264
4265         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
4266
4267 2006-09-15  Jim Meyering  <jim@meyering.net>
4268
4269         * lib/rename-dest-slash.c (has_trailing_slash): Use
4270         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
4271         (rpl_rename_dest_slash): Perform the cheaper trailing slash
4272         test before testing whether SRC is a directory.
4273         Suggestions from Bruno Haible.
4274
4275         Avoid a warning about an unused variable.
4276         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
4277         into the #ifdef block where it's used.
4278
4279         * lib/rename-dest-slash.c: New file.
4280
4281 2006-09-14  Bruno Haible  <bruno@clisp.org>
4282
4283         * lib/allocsa.c: Include <config.h> unconditionally.
4284         * lib/asnprintf.c: Likewise.
4285         * lib/asprintf.c: Likewise.
4286         * lib/c-strcasecmp.c: Likewise.
4287         * lib/c-strcasestr.c: Likewise.
4288         * lib/c-strncasecmp.c: Likewise.
4289         * lib/c-strstr.c: Likewise.
4290         * lib/classpath.c: Likewise.
4291         * lib/clean-temp.c: Likewise.
4292         * lib/concatpath.c: Likewise.
4293         * lib/copy-file.c: Likewise.
4294         * lib/csharpcomp.c: Likewise.
4295         * lib/csharpexec.c: Likewise.
4296         * lib/execute.c: Likewise.
4297         * lib/fatal-signal.c: Likewise.
4298         * lib/findprog.c: Likewise.
4299         * lib/fwriteerror.c: Likewise.
4300         * lib/gl_array_list.c: Likewise.
4301         * lib/gl_array_oset.c: Likewise.
4302         * lib/gl_avltree_list.c: Likewise.
4303         * lib/gl_avltree_oset.c: Likewise.
4304         * lib/gl_avltreehash_list.c: Likewise.
4305         * lib/gl_carray_list.c: Likewise.
4306         * lib/gl_linked_list.c: Likewise.
4307         * lib/gl_linkedhash_list.c: Likewise.
4308         * lib/gl_list.c: Likewise.
4309         * lib/gl_oset.c: Likewise.
4310         * lib/gl_rbtree_list.c: Likewise.
4311         * lib/gl_rbtree_oset.c: Likewise.
4312         * lib/gl_rbtreehash_list.c: Likewise.
4313         * lib/imaxabs.c: Likewise.
4314         * lib/imaxdiv.c: Likewise.
4315         * lib/javacomp.c: Likewise.
4316         * lib/javaexec.c: Likewise.
4317         * lib/javaversion.c: Likewise.
4318         * lib/linebreak.c: Likewise.
4319         * lib/localcharset.c: Likewise.
4320         * lib/lock.c: Likewise.
4321         * lib/mbchar.c: Likewise.
4322         * lib/mbswidth.c: Likewise.
4323         * lib/mkdtemp.c: Likewise.
4324         * lib/pipe.c: Likewise.
4325         * lib/printf-args.c: Likewise.
4326         * lib/printf-parse.c: Likewise.
4327         * lib/progname.c: Likewise.
4328         * lib/progreloc.c: Likewise.
4329         * lib/readlink.c: Likewise.
4330         * lib/sh-quote.c: Likewise.
4331         * lib/stpcpy.c: Likewise.
4332         * lib/stpncpy.c: Likewise.
4333         * lib/strcasecmp.c: Likewise.
4334         * lib/strcasestr.c: Likewise.
4335         * lib/strcspn.c: Likewise.
4336         * lib/striconv.c: Likewise.
4337         * lib/strncasecmp.c: Likewise.
4338         * lib/strnlen1.c: Likewise.
4339         * lib/strstr.c: Likewise.
4340         * lib/strtok_r.c: Likewise.
4341         * lib/tls.c: Likewise.
4342         * lib/tmpdir.c: Likewise.
4343         * lib/unicodeio.c: Likewise.
4344         * lib/unsetenv.c: Likewise.
4345         * lib/vasnprintf.c: Likewise.
4346         * lib/vasprintf.c: Likewise.
4347         * lib/wait-process.c: Likewise.
4348         * lib/xallocsa.c: Likewise.
4349         * lib/xsetenv.c: Likewise.
4350         * lib/xstriconv.c: Likewise.
4351
4352 2006-09-13  Simon Josefsson  <jas@extundo.com>
4353
4354         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4355         that internally, suggested by Ralf Wildenhues
4356         <Ralf.Wildenhues@gmx.de>.
4357
4358 2006-09-13  Simon Josefsson  <jas@extundo.com>
4359
4360         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4361         @LIBOBJS@.
4362         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4363
4364 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4365
4366         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4367         longer worry about uses that don't define HAVE_CONFIG_H.
4368         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4369         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4370         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4371         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4372         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4373         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4374         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4375         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4376         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4377         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4378         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4379         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4380         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4381         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4382         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4383         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4384         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4385         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4386         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4387         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4388         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4389         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4390         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4391         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4392         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4393         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4394         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4395         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4396         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4397         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4398         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4399         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4400         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4401         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4402         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4403         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4404         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4405         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4406         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4407         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4408         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4409         Likewise.
4410
4411 2006-09-13  Eric Blake  <ebb9@byu.net>
4412
4413         * lib/getopt.c: Fix typo in last commit.
4414
4415 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4416
4417         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4418         dgettext.
4419
4420 2006-09-12  Jim Meyering  <jim@meyering.net>
4421
4422         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4423         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4424         Reported by Nelson H. F. Beebe.
4425
4426 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4427
4428         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4429         program_invocation_name and program_invocation_short_name are
4430         initialized.
4431         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4432         and program_invocation_short_name to argp.h, so they are visible
4433         to user programs.
4434         * lib/argp.h: Likewise
4435
4436 2006-09-10  Bruno Haible  <bruno@clisp.org>
4437
4438         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4439         m4/inttypes_h.m4, m4/uintmax_t.m4.
4440
4441 2006-09-10  Bruno Haible  <bruno@clisp.org>
4442
4443         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4444         gl_AC_TYPE_UINTMAX_T.
4445
4446 2006-09-10  Bruno Haible  <bruno@clisp.org>
4447
4448         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4449
4450 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4451
4452         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4453         convention.  Text proposed by Bruno Haible.
4454         (struct argp_option): Document the use of N_() wrappers.
4455
4456         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
4457         '\v', and translate the two parts separately, instead of feeding
4458         the whole string to gettext.  This allows to exclude
4459         '\v' from the strings visible to the translator by writing doc
4460         strings as N_("..") "\v" N_("..").
4461
4462 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4463
4464         * config/srclist.txt: Undo latest change; the bug was fixed.
4465
4466 2006-09-09  Bruno Haible  <bruno@clisp.org>
4467
4468         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4469         assignments if building a library without libtool.
4470         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4471         in func_emit_lib_Makefile_am.
4472         (func_import): When building a static library libfoo.a, arrange to
4473         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4474         (func_create_testdir): Likewise.
4475         * modules/gc (configure.ac, Makefile.am): If building statically,
4476         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4477         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4478         * modules/striconv (configure.ac, Makefile.am): Likewise.
4479         Based on a suggestion by Ralf Wildenhues.
4480
4481 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4482
4483         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4484         Check for unistd.h too, since Autoconf doesn't assume POSIX.
4485         Also:
4486
4487         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4488         Add year_2050_test to catch glibc bug 2821
4489         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4490
4491         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4492         Prefer #ifdef to #if.
4493
4494         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
4495         Return from 'main' instead of calling 'exit'.
4496
4497 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4498
4499         * lib/mktime.c (guess_time_tm): Fix bug where mktime
4500         returned the maximum time_t value rather than (time_t) -1.
4501         Problem originally reported by William Bardwell
4502         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4503
4504         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4505         Moved to here ...
4506         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4507         ... from here.
4508
4509 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4510
4511         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
4512         2821 is fixed.
4513
4514 2006-09-08  Jim Meyering  <jim@meyering.net>
4515
4516         Don't make generated files read-only.  That would bother too many
4517         people.  However, do retain the ability to work when targets are
4518         read-only: remove the destination and temporary files before writing
4519         them (when generated via sed or echo), or by using the -f option for
4520         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
4521         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4522         * modules/byteswap, modules/configmake, modules/fcntl:
4523         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4524         * modules/localcharset, modules/netinet_in, modules/poll:
4525         * modules/stdbool, modules/stdint, modules/sys_select:
4526         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4527
4528 2006-09-08  Jim Meyering  <jim@meyering.net>
4529
4530         Avoid new build failure on FreeBSD 6.0.
4531         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4532         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4533         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4534
4535 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4536
4537         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4538
4539 2006-09-07  Jim Meyering  <jim@meyering.net>
4540
4541         Fix global typo in last change: use chmod u-w, not chmod u-x.
4542         Spotted by Paul Eggert and Bruce Korb.
4543         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4544         * modules/byteswap, modules/configmake, modules/fcntl:
4545         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4546         * modules/localcharset, modules/netinet_in, modules/poll:
4547         * modules/stdbool, modules/stdint, modules/sys_select:
4548         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4549
4550 2006-09-06  Jim Meyering  <jim@meyering.net>
4551
4552         Make generated files be read-only.
4553         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4554         Ensure that each generated file is now read-only.
4555         * modules/argz: Likewise.
4556         * modules/arpa_inet: Likewise.
4557         * modules/byteswap: Likewise.
4558         * modules/configmake: Likewise.
4559         * modules/fcntl: Likewise.
4560         * modules/fnmatch: Likewise.
4561         * modules/getopt: Likewise.
4562         * modules/glob: Likewise.
4563         * modules/inttypes: Likewise.
4564         * modules/netinet_in: Likewise.
4565         * modules/poll: Likewise.
4566         * modules/stdbool: Likewise.
4567         * modules/stdint: Likewise.
4568         * modules/sys_select: Likewise.
4569         * modules/sys_socket: Likewise.
4570         * modules/sys_stat: Likewise.
4571         * modules/sysexits: Likewise.
4572         * modules/localcharset: Same as above, but continue using temporary
4573         file named "t-$@" (why different?) rather than the "$@-t" used
4574         everywhere else.
4575
4576         * modules/sysexits (Makefile.am): Replace literal occurrences
4577         of "sysexit.h" more readable, and more consistent, "$@".
4578
4579 2006-09-06  Bruno Haible  <bruno@clisp.org>
4580
4581         * modules/striconv: New file.
4582         * modules/xstriconv: New file.
4583         * MODULES.html.sh (Internationalization functions): Add striconv,
4584         xstriconv.
4585
4586 2006-09-06  Bruno Haible  <bruno@clisp.org>
4587
4588         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4589         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4590         not using libtool correctly.
4591
4592 2006-09-06  Bruno Haible  <bruno@clisp.org>
4593
4594         * lib/striconv.h: New file.
4595         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4596         iconvstring.c.
4597         * lib/xstriconv.h: New file.
4598         * lib/xstriconv.c: New file.
4599
4600 2006-09-06  Bruno Haible  <bruno@clisp.org>
4601
4602         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4603         lib_..._LDFLAGS.
4604
4605 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4606
4607         * lib/argz_.h: Sync from Libtool.
4608
4609         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4610                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4611
4612         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4613
4614 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4615
4616         * modules/trim: New file.
4617
4618 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4619
4620         * lib/trim.h: New file.
4621         * lib/trim.c: New file.
4622
4623 2006-09-05  Bruno Haible  <bruno@clisp.org>
4624
4625         * MODULES.html.sh (String handling): Add trim.
4626
4627 2006-09-04  Karl Berry  <karl@gnu.org>
4628
4629         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4630         until next release.
4631
4632 2006-09-03  Bruno Haible  <bruno@clisp.org>
4633
4634         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4635         correctly.
4636
4637 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4638
4639         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4640         not gl_GETLOADAVG.  Omit unneeded semicolons.
4641         Problems reported by Ralf Wildenhues in
4642         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4643         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4644         at the end, which is the usual gnulib style.
4645
4646         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4647         of doing all the work ourselves.
4648         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4649         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4650
4651 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4652
4653         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4654         Problem reported by Ralf Wildenhues in
4655         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4656
4657         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4658         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4659
4660 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4661
4662         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4663         yesterday's patch by changing test -n to test -z.
4664
4665 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4666
4667         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4668         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4669         the former is now obsolescent.
4670
4671         * modules/chdir-long (Depends-on): Add fcntl.
4672
4673 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4674
4675         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4676         obsolescent, and programs should use gnulib instead.
4677         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4678         but with prefixes changed.
4679
4680 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4681
4682         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4683         or stdbool.h, because they might not exist while configuring.
4684
4685         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4686         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4687         does that for us.
4688         (O_DIRECTORY): Remove.
4689
4690 2006-08-31  Eric Blake  <ebb9@byu.net>
4691
4692         * gnulib-tool: Don't let emacs change spaces to TAB.
4693
4694 2006-08-31  Bruno Haible  <bruno@clisp.org>
4695
4696         * gnulib-tool: When calling func_import more than once, do it in a
4697         subshell.
4698         Reported by Eric Blake <ebb9@byu.net>.
4699
4700 2006-08-31  Bruno Haible  <bruno@clisp.org>
4701
4702         * gnulib-tool (nl): Remove variable.
4703         (sed_transform_lib_file): Use more robust test for config-h module.
4704         (func_import): Fix typo in 2006-08-25 patch.
4705
4706 2006-08-31  Bruno Haible  <bruno@clisp.org>
4707
4708         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4709         specified, augment Makefile.am variables instead of assigning them.
4710
4711 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4712
4713         Work around a bug in both the Linux and SunOS 64-bit kernels:
4714         nanosleep mishandles sleeps for longer than 2**31 seconds.
4715         Problem reported by Frank v Waveren in
4716         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4717         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4718         Check for nanosleep bug.
4719         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4720
4721 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4722
4723         Work around a bug in both the Linux and SunOS 64-bit kernels:
4724         nanosleep mishandles sleeps for longer than 2**31 seconds.
4725         Problem reported by Frank v Waveren in
4726         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4727         * lib/nanosleep.c (BILLION): New constant.
4728         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4729         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4730         implementation.
4731
4732 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4733
4734         * modules/nanosleep (Depends-on): Add gettime.
4735
4736 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4737         and Simon Josefsson  <jas@extundo.com>
4738         and Oskar Liljeblad  <oskar@osk.mine.nu>
4739
4740         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4741         * gnulib-tool (func_import): New license type 'unmodifiable license
4742         text'.
4743         * modules/fdl: Use it.  Longer description.
4744         * module/gpl, module/lgpl: New files.
4745
4746 2006-08-30  Jim Meyering  <jim@meyering.net>
4747
4748         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4749         shadowing the parameter.
4750
4751 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4752
4753         Sync from Libtool:
4754
4755         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4756
4757         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4758         sharing with gnulib.  Report by Eric Blake.
4759
4760 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4761
4762         * modules/isapipe: New file.
4763         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4764
4765 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4766
4767         * modules/configmake (Makefile.am): Add a comment, and omit
4768         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4769         by Bruno Haible.
4770
4771 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4772
4773         * m4/isapipe.m4: New file.
4774
4775 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4776
4777         * lib/isapipe.c, lib/isapipe.h: New files.
4778
4779 2006-08-29  Jim Meyering  <jim@meyering.net>
4780
4781         * modules/configmake (Makefile.am): Make configmake.h depend on
4782         Makefile.  Otherwise, a stale configmake.h could hang around.
4783
4784 2006-08-29  Eric Blake  <ebb9@byu.net>
4785
4786         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4787         resolution of upstream bug 3044.
4788
4789 2006-08-29  Bruno Haible  <bruno@clisp.org>
4790
4791         * modules/localcharset (Depends-on): Add configmake.
4792         (Makefile.am): Remove setting of LIBDIR through DEFS.
4793
4794 2006-08-29  Bruno Haible  <bruno@clisp.org>
4795
4796         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
4797         defined.
4798
4799 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4800
4801         * modules/fcntl: New file.
4802         * modules/chdir-safer (Depends-on): Add fcntl.
4803         * modules/fts: Likewise.
4804         * modules/mkdir-p: Likewise.
4805
4806         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
4807         This undoes the most recent change, since we're now addressing the
4808         problem in a different way.
4809
4810         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
4811         into output, since the output might be called Makefile.am even
4812         if $makefile_name is something different.
4813         (func_import): Use $makefile_am rather than
4814         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
4815         empty.
4816
4817         * modules/inttypes (Files): Add m4/inttypes-h.m4.
4818
4819 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4820
4821         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
4822         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
4823         recent change to stdint.m4, since we're now addressing the problem in a
4824         different way.
4825
4826 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4827
4828         * m4/fcntl_h.m4: New file.
4829
4830 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4831
4832         * lib/fcntl_.h: New file.
4833         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
4834         the fcntl module.
4835         * lib/dirchownmod.c: Likewise.
4836         * lib/fts.c: Likewise.
4837
4838         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
4839         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
4840         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
4841         just before including <inttypes.h>, to avoid circular inclusion.
4842
4843 2006-08-28  Jim Meyering  <jim@meyering.net>
4844
4845         * doc/visibility.texi: Actually read and correct the grammar of the
4846         sentence affected by yesterday's change.
4847
4848 2006-08-28  Eric Blake  <ebb9@byu.net>
4849
4850         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
4851         needs wrapper.
4852
4853 2006-08-28  Eric Blake  <ebb9@byu.net>
4854
4855         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
4856
4857 2006-08-28  Eric Blake  <ebb9@byu.net>
4858
4859         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
4860
4861 2006-08-28  Bruno Haible  <bruno@clisp.org>
4862
4863         * modules/c-strstr: New file, from GNU gettext.
4864         * MODULES.html.sh (String handling): Add c-strstr.
4865
4866 2006-08-28  Bruno Haible  <bruno@clisp.org>
4867
4868         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
4869         macros.
4870         Reported by Eric Blake.
4871
4872 2006-08-28  Bruno Haible  <bruno@clisp.org>
4873
4874         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
4875         (VASNPRINTF): Return a string of length > INT_MAX without failing.
4876         * lib/vasprintf.c: Include errno.h, limits.h.
4877         (EOVERFLOW): New fallback definition.
4878         (vasprintf): Test here whether the string length is > INT_MAX.
4879         * lib/vsnprintf.c: Include errno.h, limits.h.
4880         (EOVERFLOW): New fallback definition.
4881         (vsnprintf): Fix bug when generated string was too long for the buffer.
4882         Test here whether the string length is > INT_MAX.
4883
4884 2006-08-28  Bruno Haible  <bruno@clisp.org>
4885
4886         * lib/inttypes_.h (SCNX*): Remove definitions.
4887         Reported by Eric Blake.
4888
4889 2006-08-28  Bruno Haible  <bruno@clisp.org>
4890
4891         * lib/c-strstr.h: New file, from GNU gettext.
4892         * lib/c-strstr.c: New file, from GNU gettext.
4893
4894 2006-08-28  Bruno Haible  <bruno@clisp.org>
4895
4896         * gnulib-tool: Reorder some statements.
4897
4898 2006-08-28  Bruno Haible  <bruno@clisp.org>
4899
4900         * gnulib-tool: New option --makefile-name.
4901         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
4902         $makefile_name.
4903         (func_import): Write $makefile_name to the cache file, and read it from
4904         there unless explicitly specified. Use $makefile_name as file name
4905         instead of Makefile.am. Adjust the recommendations accordingly.
4906
4907 2006-08-28  Bruno Haible  <bruno@clisp.org>
4908
4909         * gnulib-tool (func_verify_module): Check against misapplying patch.
4910
4911 2006-08-28  Bruno Haible  <bruno@clisp.org>
4912
4913         * gnulib-tool (func_relativize, func_relconcat): New functions.
4914         Give an error if --local-dir is given with --update.
4915         Remove trailing slashes from $local_gnulib_dir.
4916         (func_import): Store the relativized $local_gnulib_dir in
4917         gnulib-cache.m4, and read it from there if not specified explicitly.
4918
4919 2006-08-28  Bruno Haible  <bruno@clisp.org>
4920
4921         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
4922         is the current directory. Respect also $local_gnulib_dir.
4923
4924 2006-08-28  Bruno Haible  <bruno@clisp.org>
4925             Simon Josefsson  <jas@extundo.com>
4926
4927         BeOS portability.
4928         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
4929
4930 2006-08-27  Jim Meyering  <jim@meyering.net>
4931
4932         * doc/visibility.texi: Remove duplicate word: "pointer".
4933
4934 2006-08-26  Bruno Haible  <bruno@clisp.org>
4935
4936         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
4937         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
4938         (Makefile.am): Create inttypes.h from inttypes_.h.
4939         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
4940
4941         * modules/imaxabs: New file.
4942
4943         * modules/imaxdiv: New file.
4944
4945 2006-08-26  Bruno Haible  <bruno@clisp.org>
4946
4947         * m4/inttypes.m4: New file.
4948         * m4/_inttypes_h.m4: Remove file.
4949         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
4950         PRI_MACROS_BROKEN.
4951         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
4952
4953         * m4/imaxabs.m4: New file.
4954
4955         * m4/imaxdiv.m4: New file.
4956
4957 2006-08-26  Bruno Haible  <bruno@clisp.org>
4958
4959         * lib/inttypes_.h: New file.
4960         * lib/inttypes.h: Remove file.
4961         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
4962
4963         * lib/imaxabs.c: New file.
4964
4965         * lib/imaxdiv.c: New file.
4966
4967 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4968
4969         New config-h module, so that "make" output needn't be cluttered
4970         by -DHAVE_CONFIG_H.
4971         * MODULES.html.sh (Support for building libraries and executables):
4972         Add config-h.
4973         * modules/config-h: New file.
4974         * gnulib-tool (nl, sed_transform_lib_file): New vars.
4975         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
4976         the config-h module is used.
4977
4978         New configmake module, so that "make" output needn't be cluttered
4979         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
4980         * MODULES.html.sh (Support for building libraries and executables):
4981         Add configmake.
4982         * modules/configmake: New file.
4983
4984 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4985
4986         * m4/config-h.m4: New file.
4987
4988 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4989
4990         * config/srclist.txt: Add elisp-comp.
4991
4992 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4993
4994         * MODULES.html.sh (Support for building libraries and executables):
4995         Add elisp-comp.
4996         * build-aux/elisp-comp: New file.
4997         * modules/elisp-comp: New file.
4998
4999 2006-08-24  Bruno Haible  <bruno@clisp.org>
5000
5001         * gnulib-tool (func_create_testdir): Use non-default values of
5002         sourcebase and m4base.
5003
5004 2006-08-24  Bruno Haible  <bruno@clisp.org>
5005
5006         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
5007         HTML structure.
5008
5009 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
5010
5011         * modules/openat (Depends-on): Add lchown.
5012
5013 2006-08-23  Bruno Haible  <bruno@clisp.org>
5014
5015         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
5016         of gl_LOCK_EARLY instead of gl_LOCK.
5017
5018 2006-08-23  Bruno Haible  <bruno@clisp.org>
5019
5020         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
5021         on OSF/1 to no.
5022         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
5023
5024 2006-08-23  Bruno Haible  <bruno@clisp.org>
5025
5026         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
5027         as unusable.
5028
5029         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
5030         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
5031         (gl_LOCK): New macro.
5032
5033 2006-08-22  Simon Josefsson  <jas@extundo.com>
5034
5035         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
5036         to md5 module.
5037
5038 2006-08-22  Simon Josefsson  <jas@extundo.com>
5039
5040         * MODULES.html.sh: Add "Support for maintaining and release
5041         projects".
5042
5043         * build-aux/gnupload: New file, from coreutils.
5044
5045 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5046
5047         Avoid the need for AC_LIBSOURCES in m4 macros.
5048         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5049         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5050         * modules/check-version (EXTRA_DIST): Add check-version.h.
5051         * modules/crc (EXTRA_DIST): Add crc.h.
5052         * modules/des (EXTRA_DIST): Add des.h.
5053         * modules/gc (EXTRA_DIST): Add gc.h.
5054         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5055         * modules/getline (EXTRA_DIST): Add getline.h.
5056         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5057         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5058         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5059         * modules/md2 (EXTRA_DIST): Add md2.h.
5060         * modules/md4 (EXTRA_DIST): Add md4.h.
5061         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5062         * modules/read-file (EXTRA_DIST): Add read-file.h.
5063         * modules/readline (EXTRA_DIST): Add readline.h.
5064         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5065         rijndael-api-fst.h.
5066
5067 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5068
5069         * m4/rijndael.m4 (gl_ARCFOUR):
5070         * m4/arctwo.m4 (gl_ARCTWO):
5071         * m4/check-version.m4 (gl_CHECK_VERSION):
5072         * m4/crc.m4 (gl_CRC):
5073         * m4/des.m4 (gl_DES):
5074         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5075         * m4/gc.m4 (gl_GC):
5076         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5077         * m4/getline.m4 (gl_FUNC_GETLINE):
5078         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5079         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5080         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
5081         * m4/md2.m4 (gl_MD2):
5082         * m4/md4.m4 (gl_MD4):
5083         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
5084         * m4/read-file.m4 (gl_FUNC_READ_FILE):
5085         * m4/readline.m4 (gl_FUNC_READLINE):
5086         * m4/rijndael.m4 (gl_RIJNDAEL):
5087         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5088         to get the necessary .h files and whatnot.
5089
5090 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5091
5092         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
5093         gnulib rather than the other way around.
5094         * config/srclistvars.sh (COREUTILS): Remove.
5095
5096 2006-08-22  Jim Meyering  <jim@meyering.net>
5097
5098         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
5099
5100         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
5101
5102 2006-08-22  Eric Blake  <ebb9@byu.net>
5103
5104         * modules/regexprops-generic: New file.
5105         * MODULES.html.sh (Support for building documentation): List it.
5106
5107 2006-08-22  Eric Blake  <ebb9@byu.net>
5108
5109         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
5110         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
5111         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
5112         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
5113
5114 2006-08-22  Bruno Haible  <bruno@clisp.org>
5115
5116         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
5117         and lib_LTLIBRARIES like the other lib_* variables.
5118
5119 2006-08-22  Bruno Haible  <bruno@clisp.org>
5120
5121         * build-aux/x-to-1.in: New file, from GNU gettext.
5122
5123 2006-08-22  Bruno Haible  <bruno@clisp.org>
5124
5125         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
5126         <utmpx.h> exists.
5127
5128 2006-08-22  Bruno Haible  <bruno@clisp.org>
5129
5130         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
5131         <utmpx.h> exists.
5132
5133 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5134
5135         BeOS portability.
5136         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
5137         exist.
5138         Problem reported by Bruno Haible.
5139
5140 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5141
5142         Avoid the need for AC_LIBSOURCES in m4 macros.
5143         * modules/acl (EXTRA_DIST): Add acl.h.
5144         * modules/argmatch (Files): Add m4/argmatch.m4.
5145         (configure.ac): Add gl_ARGMATCH.
5146         (EXTRA_DIST): Renamed from lib_SOURCES, for
5147         consistency with the other modules.  Remove argmatch.c.
5148         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
5149         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
5150         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
5151         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
5152         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
5153         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
5154         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
5155         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
5156         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
5157         * modules/closeout (EXTRA_DIST): Add closeout.h.
5158         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
5159         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
5160         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
5161         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
5162         dirname.h; remove basename.c and stripslash.c.
5163         * modules/exclude (EXTRA_DIST): Add exclude.h.
5164         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
5165         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
5166         * modules/file-type (EXTRA_DIST): Add file-type.h.
5167         * modules/filemode (EXTRA_DIST): Add filemode.h.
5168         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
5169         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5170         * modules/fpending (EXTRA_DIST): Add __fpending.h.
5171         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
5172         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
5173         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
5174         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
5175         * modules/getdate (EXTRA_DIST): Add getdate.c.
5176         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
5177         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
5178         * modules/getpass (EXTRA_DIST): Add getpass.h.
5179         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
5180         * modules/group-member (EXTRA_DIST): Add group-member.h.
5181         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
5182         * modules/hash (EXTRA_DIST): Add hash.h.
5183         * modules/human (EXTRA_DIST): Add human.h.
5184         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
5185         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
5186         * modules/lchown (EXTRA_DIST): Add lchown.h.
5187         * modules/long-options (EXTRA_DIST): Add long-options.h.
5188         * modules/lstat (EXTRA_DIST): Add lstat.h.
5189         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
5190         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
5191         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
5192         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
5193         * modules/memxor (EXTRA_DIST): Add memxor.h.
5194         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
5195         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
5196         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
5197         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
5198         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
5199         * modules/physmem (EXTRA_DIST): Add physmem.h.
5200         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
5201         * modules/posixver (EXTRA_DIST): Add posixver.h.
5202         * modules/quote (EXTRA_DIST): Add quote.h.
5203         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
5204         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
5205         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
5206         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
5207         regex_internal.h regexec.c.
5208         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
5209         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
5210         * modules/same (EXTRA_DIST): Add same.h.
5211         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
5212         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
5213         * modules/savedir (EXTRA_DIST): Add savedir.h.
5214         * modules/sha1 (EXTRA_DIST): Add sha1.h.
5215         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
5216         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
5217         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
5218         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
5219         * modules/strdup (EXTRA_DIST): Add strdup.h.
5220         * modules/strftime (EXTRA_DIST): Add strftime.h.
5221         * modules/strndup (EXTRA_DIST): Add strndup.h.
5222         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
5223         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
5224         * modules/time_r (EXTRA_DIST): Add time_r.h.
5225         * modules/timespec (EXTRA_DIST): Add timespec.h.
5226         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5227         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
5228         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
5229         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
5230         * modules/userspec (EXTRA_DIST): Add userspec.h.
5231         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
5232         * modules/utimens (EXTRA_DIST): Add utimens.h.
5233         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
5234         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
5235         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
5236         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
5237         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
5238         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
5239         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
5240         * modules/yesno (EXTRA_DIST): Add yesno.h.
5241
5242 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5243
5244         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
5245
5246         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
5247         * m4/dev-ino.m4, same-inode.m4: Remove.
5248
5249         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
5250         * m4/acl.m4 (AC_FUNC_ACL):
5251         * m4/backupfile.m4 (gl_BACKUPFILE):
5252         * m4/c-strtod.m4 (gl_C99_STRTOLD):
5253         * m4/canon-host.m4 (gl_CANON_HOST):
5254         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5255         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
5256         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
5257         * m4/cloexec.m4 (gl_CLOEXEC):
5258         * m4/close-stream.m4 (gl_CLOSE_STREAM):
5259         * m4/closeout.m4 (gl_CLOSEOUT):
5260         * m4/dirfd.m4 (gl_FUNC_DIRFD):
5261         * m4/dirname.m4 (gl_DIRNAME):
5262         * m4/exclude.m4 (gl_EXCLUDE):
5263         * m4/exitfail.m4 (gl_EXITFAIL):
5264         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
5265         * m4/file-type.m4 (gl_FILE_TYPE):
5266         * m4/filemode.m4 (gl_FILEMODE):
5267         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
5268         * m4/fpending.m4 (gl_FUNC_FPENDING):
5269         * m4/fprintftime.m4 (gl_FPRINTFTIME):
5270         * m4/fts.m4 (gl_FUNC_FTS):
5271         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
5272         * m4/getdate.m4 (gl_GETDATE):
5273         * m4/gethrxtime.m4 (gl_GETHRXTIME):
5274         * m4/getpagesize.m4 (gl_GETPAGESIZE):
5275         * m4/getpass.m4 (gl_FUNC_GETPASS):
5276         * m4/gettime.m4 (gl_GETTIME):
5277         * m4/getugroups.m4 (gl_GETUGROUPS):
5278         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
5279         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
5280         * m4/hard-locale.m4 (gl_HARD_LOCALE):
5281         * m4/hash.m4 (gl_HASH):
5282         * m4/idcache.m4 (gl_IDCACHE):
5283         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
5284         * m4/lchown.m4 (gl_FUNC_LCHOWN):
5285         * m4/long-options.m4 (gl_LONG_OPTIONS):
5286         * m4/lstat.m4 (gl_FUNC_LSTAT):
5287         * m4/md5.m4 (gl_MD5):
5288         * m4/memcasecmp.m4 (gl_MEMCASECMP):
5289         * m4/memcoll.m4 (gl_MEMCOLL):
5290         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
5291         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
5292         * m4/memxor.m4 (gl_MEMXOR):
5293         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
5294         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
5295         * m4/modechange.m4 (gl_MODECHANGE):
5296         * m4/mountlist.m4 (gl_MOUNTLIST):
5297         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5298         * m4/openat.m4 (gl_FUNC_OPENAT):
5299         * m4/pathmax.m4 (gl_PATHMAX):
5300         * m4/physmem.m4 (gl_PHYSMEM):
5301         * m4/posixtm.m4 (gl_POSIXTM):
5302         * m4/posixver.m4 (gl_POSIXVER):
5303         * m4/quote.m4 (gl_QUOTE):
5304         * m4/quotearg.m4 (gl_QUOTEARG):
5305         * m4/readtokens.m4 (gl_READTOKENS):
5306         * m4/readutmp.m4 (gl_READUTMP):
5307         * m4/regex.m4 (gl_REGEX):
5308         * m4/safe-read.m4 (gl_SAFE_READ):
5309         * m4/safe-write.m4 (gl_SAFE_WRITE):
5310         * m4/same.m4 (gl_SAME):
5311         * m4/save-cwd.m4 (gl_SAVE_CWD):
5312         * m4/savedir.m4 (gl_SAVEDIR):
5313         * m4/settime.m4 (gl_SETTIME):
5314         * m4/sha1.m4 (gl_SHA1):
5315         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5316         * m4/stat-macros.m4 (gl_STAT_MACROS):
5317         * m4/stat-time.m4 (gl_STAT_TIME):
5318         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5319         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5320         * m4/strdup.m4 (gl_FUNC_STRDUP):
5321         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5322         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5323         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5324         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5325         * m4/time_r.m4 (gl_TIME_R):
5326         * m4/timespec.m4 (gl_TIMESPEC):
5327         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5328         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5329         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5330         * m4/userspec.m4 (gl_USERSPEC):
5331         * m4/utimecmp.m4 (gl_UTIMECMP):
5332         * m4/utimens.m4 (gl_UTIMENS):
5333         * m4/xalloc.m4 (gl_XALLOC):
5334         * m4/xgetcwd.m4 (gl_XGETCWD):
5335         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5336         * m4/xreadlink.m4 (gl_XREADLINK):
5337         * m4/xstrtod.m4 (gl_XSTRTOD):
5338         * m4/yesno.m4 (gl_YESNO):
5339         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5340         to get the necessary .h files and whatnot.
5341
5342 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5343             Bruno Haible  <bruno@clisp.org>
5344
5345         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5346         /bin/sh understanding of '!' conditional negation.
5347
5348 2006-08-21  Jim Meyering  <jim@meyering.net>
5349
5350         * modules/openat (Depends-on): Really alphabetize.
5351
5352         * modules/acl (Depends-on): Add error and quote.
5353
5354         * check-module (find_included_lib_files): Add at-func.c to the
5355         ok-to-include-more-than-once white list.
5356
5357         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5358
5359 2006-08-21  Bruno Haible  <bruno@clisp.org>
5360
5361         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5362         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5363         Reported by Martin Lambers <marlam@marlam.de>.
5364
5365 2006-08-21  Bruno Haible  <bruno@clisp.org>
5366
5367         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5368         specify an installation location, don't emit a noinst_LIBRARIES or
5369         noinst_LTLIBRARIES assignment.
5370
5371 2006-08-21  Bruno Haible  <bruno@clisp.org>
5372
5373         BeOS portability.
5374         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5375         BeOS has mbrtowc() but no <wctype.h>.
5376
5377 2006-08-21  Bruno Haible  <bruno@clisp.org>
5378
5379         BeOS portability.
5380         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5381         exist.
5382
5383 2006-08-21  Bruno Haible  <bruno@clisp.org>
5384
5385         BeOS portability.
5386         * lib/mbchar.h: Include <wctype.h> only if it exists.
5387
5388 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5389
5390         Remove files that are no longer needed by their respective modules.
5391         * m4/obstack.m4: Remove.
5392         * m4/strerror_r.m4: Remove.
5393         * m4/uint32_t.m4: Remove.
5394         * m4/uintptr_t.m4: Remove.
5395         * m4/ullong_max.m4: Remove.
5396         * m4/xstrtoimax.m4: Remove.
5397         * m4/xstrtoumax.m4: Remove.
5398
5399         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5400         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5401         dependencies now capture this.
5402
5403         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5404         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5405         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5406         * m4/human.m4 (gl_HUMAN): Likewise.
5407         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5408         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5409
5410         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5411
5412         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5413         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5414         stdint.
5415         * m4/human.m4 (gl_HUMAN): Likewise.
5416         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5417         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5418         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5419         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5420         * m4/xstrtol (gl_XSTRTOL): Likewise.
5421
5422         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5423         AC_TYPE_LONG_LONG_INT.
5424         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5425         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5426         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5427         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5428
5429         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5430         on stdbool.
5431
5432         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5433         (gl_PREREQ_XSTRTOUL): Remove.
5434
5435         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5436
5437         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5438         mode.
5439
5440 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5441
5442         Add and change modules to make it easier for coreutils to use
5443         gnulib-tool.
5444         * modules/backupfile (Files): Remove m4/d-ino.m4.
5445         (Depends-on): Add d-ino.
5446         * modules/cycle-check (Depends-on): Add stdint.
5447         (lib_SOURCES): Add cycle-check.h.
5448         * modules/d-ino: New module.
5449         * modules/d-type: New module.
5450         * modules/error (Files): Remove m4/strerror_r.m4.
5451         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5452         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5453         m4/inttypes_h.m4, m4/uintmax_t.m4.
5454         (Depends-on): Add stdint.
5455         (lib_SOURCES): Add fsusage.h.
5456         * modules/getcwd (Files): Remove d-ino.m4.
5457         (Depends-on): Add d-ino.
5458         * modules/getndelim2 (Depends-on): Add stdint.
5459         * modules/glob (Files): Remove m4/d-type.m4.
5460         (Depends-on): Add d-type.
5461         * modules/host-os: New module.
5462         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5463         m4/inttypes_h.m4, m4/uintmax_t.m4.
5464         * Depends-on: Add stdint.
5465         (lib_SOURCES): Add human.h.
5466         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5467         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5468         m4/uintmax_t.m4, m4/ulonglong.m4.
5469         (Depends-on): Add stdint.
5470         (EXTRA_DIST): Add inttostr.h.
5471         * modules/lchmod: New module.
5472         * modules/link-follow: New module.
5473         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5474         (Depends-on): Add lchmod.
5475         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5476         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5477         (Depends-on): Add stdint.
5478         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
5479         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5480         (Depends-on): Add stdint.
5481         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
5482         * modules/perl: New module.
5483         * modules/regex (Depends-on): Add stdint.
5484         * modules/rmdir-errno: New module.
5485         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5486         m4/intmax_t.m4.
5487         (Depends-on): Add stdint.
5488         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5489         m4/uintmax_t.m4.
5490         (Depends-on): Add stdint.
5491         * modules/unlink-busy: New module.
5492         * modules/utimecmp (Depends-on): Add stdint.
5493         * modules/uptime: New module.
5494         * modules/winsz-ioctl: New module.
5495         * modules/winsz-termios: New module.
5496         * modules/xnanosleep (Depends-on): Add nanosleep.
5497         * modules/ullong_max: Remove.
5498         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
5499         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
5500         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
5501         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
5502         (Depends-on): Add inttypes.
5503         (lib_SOURCES): Add xstrtol.h.
5504         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
5505         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
5506         * MODULES.html.sh: Move 'assert' into the assert section.
5507         Move 'dummy' into the linking section.
5508         Remove ullong_max.
5509         Add section for compatibility checks for POSIX:2001 functions,
5510         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
5511         winsz-ioctl, and winsz-termios into it.
5512         Add lchmod.
5513         Add top-level Misc section and put host-os, perl, and uptime
5514         into it.
5515
5516 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5517
5518         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
5519         now assume the stdint module.  Do not include inttypes.h.
5520         * lib/fsusage.h: Likewise.
5521         * lib/getndelim2.c: Likewise.
5522         * lib/human.h: Likewise.
5523         * lib/inttostr.h: Likewise.
5524         * lib/obstack.c: Likewise.
5525         * lib/regex_internal.h: Likewise.
5526         * lib/tempname.c: Likewise.
5527         * lib/utimecmp.c: Likewise.
5528         * lib/xstrtol.h: Likewise.
5529
5530         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5531
5532         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5533         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5534         * lib/xtime.h: Likewise.
5535
5536 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5537
5538         * modules/openat (Files): Add lib/fchmodat.c.
5539         Fixes problem reported by Jay Youngman.
5540
5541 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5542
5543         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5544         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5545
5546 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5547             Bruno Haible  <bruno@clisp.org>
5548
5549         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5550         and is a script that invokes bison. Tighten the code. Add comments.
5551
5552 2006-08-18  Jim Meyering  <jim@meyering.net>
5553
5554         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5555         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5556         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5557         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5558
5559 2006-08-18  Bruno Haible  <bruno@clisp.org>
5560
5561         * modules/bison-i18n: New file.
5562         * MODULES.html.sh (Internationalization functions): Add it.
5563
5564 2006-08-18  Bruno Haible  <bruno@clisp.org>
5565
5566         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5567         sys/statvfs.h. When getmntinfo was found, check its declaration and
5568         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5569
5570 2006-08-18  Bruno Haible  <bruno@clisp.org>
5571
5572         * m4/bison-i18n.m4: New file, from bison.
5573
5574 2006-08-18  Bruno Haible  <bruno@clisp.org>
5575
5576         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5577         (ME_DUMMY): Treat "kernfs" as a dummy.
5578         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5579
5580 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5581
5582         Update from coreutils.
5583
5584         2006-08-15  Jim Meyering  <jim@meyering.net>
5585
5586         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5587
5588         2006-01-17  Jim Meyering  <jim@meyering.net>
5589
5590         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5591
5592         2006-01-11  Jim Meyering  <jim@meyering.net>
5593
5594         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5595         Check for the lchmod function.
5596
5597 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5598
5599         Update from coreutils.
5600
5601         * lib/__fpending.h: Add copyright notice.
5602         * lib/fprintftime.h: Likewise.
5603         * lib/savedir.c: Use (C) in copyright notice.
5604         * lib/savedir.h: Likewise.
5605
5606         2006-08-15  Jim Meyering  <jim@meyering.net>
5607
5608         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5609         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5610         in support of the EXPECTED_ERRNO macro.
5611         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5612         definitions.  Instead, define the appropriate symbols and include
5613         "at-func.c".
5614         * lib/mkdirat.c (mkdirat): Likewise.
5615         * lib/fchmodat.c (fchmodat): Likewise.
5616         (ENOSYS): Remove definition.
5617         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5618         it.  Don't include "unistd--.h" -- it wasn't ever used.
5619
5620         2006-01-17  Jim Meyering  <jim@meyering.net>
5621
5622         Rewrite fts.c not to change the current working directory,
5623         by using openat, fstatat, fdopendir, etc..
5624
5625         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5626         (HAVE_OPENAT_SUPPORT): Define.
5627         [_LIBC] (fchdir): Don't undef or define; no longer used.
5628         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5629         Now, this `function' always succeeds, and consumes its file descriptor
5630         parameter -- so callers must not close such FDs.  Update callers.
5631         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5632         (diropen): Add parameter, SP.  Adjust all callers.
5633         Implement using diropen_fd, rather than open.
5634         (fts_open): Initialize new member, fts_cwd_fd.
5635         Remove fts_rft-setting code.
5636         (fts_close): Close fts_cwd_fd, if necessary.
5637         (__opendir2): Define in terms of opendir or opendirat,
5638         depending on whether the FST_NOCHDIR flag is set.
5639         (fts_build): Since fts_safe_changedir consumes its FD, and since
5640         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5641         and close the dup'd file descriptor upon failure.
5642         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5643         (fts_safe_changedir): Tweak semantics to reflect that this function
5644         now calls cwd_advance_fd and hence consumes its FD argument.
5645         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5646         [struct FTS] (fts_rft): Remove now-unused member.
5647         [struct FTS] (fts_cycle.state): Improve comment.
5648
5649         * lib/openat.c (openat_needs_fchdir): New function.
5650         * lib/openat.h (openat_needs_fchdir): Declare it.
5651
5652 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5653
5654         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5655         Problem and fix reported by Pádraig Brady in
5656         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5657
5658 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5659
5660         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5661
5662 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5663
5664         * lib/memcoll.c (memcoll): Optimize for the common case where the
5665         arguments are bytewise equal.
5666
5667 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5668
5669         * doc/regexprops-generic.texi: Add a copyright notice.
5670
5671 2006-08-15  Bruno Haible  <bruno@clisp.org>
5672
5673         * modules/tmpdir (License): Change to LGPL.
5674
5675 2006-08-15  Bruno Haible  <bruno@clisp.org>
5676
5677         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5678         module.
5679
5680 2006-08-14  Simon Josefsson  <jas@extundo.com>
5681
5682         * config/srclist.txt: Add gnupload.
5683
5684 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5685
5686         Change copyright notice from LGPL 2 to GPL 2, since that's the
5687         standard form used in the gnulib repository.
5688         * tests/test-lock.c: Likewise.
5689         * tests/test-stdint.c: Likewise.
5690         * tests/test-tls.c: Likewise.
5691
5692         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5693         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5694         Add copyright notice.
5695
5696         * check-module: Add copyright notice.  Output a copyright
5697         notice if "--version" is specified.
5698         * modules/COPYING: New file.
5699         * tests/test-getaddrinfo.c: Add copyright notice.
5700         * tests/test-verify.c: Likewise.
5701
5702 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5703
5704         Change copyright notice from LGPL 2 to GPL 2, since that's the
5705         standard form used in the gnulib repository.
5706         * lib/lock.c: LGPL -> GPL.
5707         * lib/lock.h: Likewise.
5708         * lib/strnlen1.c: Likewise.
5709         * lib/strnlen1.h: Likewise.
5710         * lib/tls.c: Likewise.
5711         * lib/tls.h: Likewise.
5712         * lib/tmpdir.c: Likewise.
5713
5714         * lib/TODO: Remove; this belongs only in coreutils.
5715
5716 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5717
5718         Add copyright notices to long-enough files that lack them, since
5719         otherwise the files aren't clearly free.  Use the same notice that
5720         getdate.texi already uses.
5721         * doc/alloca-opt.texi: Add copyright notice.
5722         * doc/alloca.texi: Likewise.
5723         * doc/ctime.texi: Likewise.
5724         * doc/functions.texi: Likewise.
5725         * doc/gcd.texi: Likewise.
5726         * doc/gnulib-tool.texi: Likewise.
5727         * doc/inet_ntoa.texi: Likewise.
5728         * doc/visibility.texi: Likewise.
5729
5730         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5731         * doc/quote.texi: Add copyright notice.
5732
5733         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5734         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5735         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5736         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5737         is now obsolete, and give a pointer to the Sun list.
5738         Add copyright notice.
5739
5740 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5741
5742         * config/srclistvars.sh: Add copyright notice.
5743
5744 2006-08-14  Eric Blake  <ebb9@byu.net>
5745
5746         Import the following change from libc:
5747
5748         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5749
5750         Upstream bug 2997.
5751         * lib/misc/error.c: Add space between program name and message if file
5752         name is missing.
5753
5754 2006-08-12  Karl Berry  <karl@gnu.org>
5755
5756         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5757         remove, these originate in gnulib now.
5758
5759 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5760
5761         * doc/Makefile (standards.info standards.html standards.dvi):
5762         Also depend on make-stds.texi.
5763
5764 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5765
5766         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5767         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5768
5769         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5770         in wchar_t.  Problem reported by Eric Blake.
5771
5772         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5773         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5774         Also, help the compiler to keep LEN in a register.
5775
5776 2006-08-11  Eric Blake  <ebb9@byu.net>
5777
5778         * users.txt: Sort.  Add tar.
5779
5780 2006-08-11  Bruno Haible  <bruno@clisp.org>
5781
5782         * users.txt: New file.
5783
5784 2006-08-11  Bruno Haible  <bruno@clisp.org>
5785
5786         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5787         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5788
5789 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5790
5791         * modules/snprintf (Depends-on): Remove minmax.
5792         (Maintainer): Add self and Bruno.
5793
5794 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5795
5796         * lib/.cppi-disable: Add snprintf.h, socket_.h.
5797         * lib/snprintf.c: Include <errno.h> and <limits.h>.
5798         (EOVERFLOW): Define if the system does not.
5799         Do not include "minmax.h"; it wasn't used.
5800         (snprintf): Don't assume size_t promotes to an unsigned type.
5801         Fix bug when generated string was too long for the buffer: the
5802         buffer's contents are supposed to be the initial prefix of the
5803         output.  Don't assume vasnprintf returns EOVERFLOW if the size
5804         exceeds INT_MAX; do the check ourselves.
5805
5806         Import the following changes from libc:
5807
5808         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
5809
5810         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
5811         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
5812         set wc to the byte which couldn't be converted.
5813         (re_string_reconstruct): Don't clear valid_raw_len before calling
5814         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
5815         tip_context using re_string_context_at.
5816
5817         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
5818
5819         * lib/posix/regex.h: g++ still cannot handled [restrict].
5820
5821         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
5822
5823         * lib/posix/regex.h: Remove special handling for VMS.
5824
5825 2006-08-10  Jim Meyering  <jim@meyering.net>
5826
5827         * modules/same-inode: New module.
5828         * modules/dev-ino: New module.
5829         * modules/cycle-check: Depend on these modules, rather than simply
5830         including their .h files.
5831         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
5832         required via m4/cycle-check.m4.
5833         * modules/same: Depend on new same-inode module, rather than
5834         including same-inode.h.
5835         * modules/chdir-safer: New file.
5836
5837         * modules/chown (Depends-on): Add stat-macros.
5838
5839 2006-08-10  Jim Meyering  <jim@meyering.net>
5840
5841         * m4/cycle-check.m4: New file.
5842         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
5843         * m4/dev-ino.m4, m4/same-inode.m4: New files.
5844
5845 2006-08-10  Eric Blake  <ebb9@byu.net>
5846
5847         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
5848         in from original proposal.
5849
5850 2006-08-10  Eric Blake  <ebb9@byu.net>
5851         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5852
5853         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
5854         namespace.
5855
5856 2006-08-10  Bruno Haible  <bruno@clisp.org>
5857
5858         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
5859         as well.
5860
5861 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5862
5863         Sync from coreutils.
5864
5865         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
5866
5867         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
5868         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
5869
5870 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5871
5872         * modules/restrict: Remove; no longer needed now that we assume
5873         Autoconf 2.59 or later.
5874         * MODULES.html.sh: Remove 'restrict'.
5875         * modules/argp (Depends-on): Remove 'restrict'.
5876         * modules/base64 (Depends-on): Likewise.
5877         * modules/gc (Depends-on): Likewise.
5878         * modules/getaddrinfo (Depends-on): Likewise.
5879         * modules/glob (Depends-on): Likewise.
5880         * modules/inet_ntop (Depends-on): Likewise.
5881         * modules/inet_pton (Depends-on): Likewise.
5882         * modules/memxor (Depends-on): Likewise.
5883         * modules/regex (Depends-on): Likewise.
5884         * modules/strtok_r (Depends-on): Likewise.
5885         * modules/time_r (Depends-on): Likewise.
5886
5887 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5888
5889         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
5890         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
5891         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5892         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
5893         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
5894         * m4/memxor.m4 (gl_MEMXOR): Likewise.
5895         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
5896         gl_C_RESTRICT replaced by AC_C_RESTRICT.
5897
5898         Merge from coreutils.
5899         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
5900         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
5901         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5902         * m4/time_r.m4 (gl_TIME_R): Likewise.
5903
5904 2006-08-09  Karl Berry  <karl@gnu.org>
5905
5906         * config/srclist.txt: no more gettext-tools, per Bruno.
5907
5908 2006-08-08  Eric Blake  <ebb9@byu.net>
5909
5910         * modules/verror: New module.
5911         * MODULES.html.sh: Document it.
5912
5913 2006-08-08  Eric Blake  <ebb9@byu.net>
5914
5915         * lib/verror.h, lib/verror.c: New files.
5916
5917 2006-08-08  Eric Blake  <ebb9@byu.net>
5918
5919         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
5920         verror_at_line output complies with GNU Coding Standards even when
5921         file is NULL.
5922
5923 2006-08-07  Bruno Haible  <bruno@clisp.org>
5924
5925         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
5926         versions of AIX.
5927         Reported by Ralf Wildenhues.
5928
5929 2006-08-07  Bruno Haible  <bruno@clisp.org>
5930
5931         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
5932         in an AC_DEFUN. Needed so that the autoconf snippets can use
5933         AC_REQUIRE.
5934
5935 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5936
5937         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5938         Initialize pkgdata_DATA.
5939         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
5940         overriding it.
5941
5942 2006-08-06  Eric Blake  <ebb9@byu.net>
5943
5944         * lib/error.h: Fold in some upstream changes from glibc.
5945         * lib/error.c: Likewise.
5946
5947 2006-08-04  Bruno Haible  <bruno@clisp.org>
5948
5949         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5950         Make the mostlyclean-local rule depend on mostlyclean-generic.
5951         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
5952
5953 2006-07-31  Bruno Haible  <bruno@clisp.org>
5954
5955         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
5956         <stdlib.h>, <string.h>.
5957
5958 2006-07-30  Bruno Haible  <bruno@clisp.org>
5959
5960         * modules/readlink (License): Change to LGPL.
5961
5962 2006-07-30  Bruno Haible  <bruno@clisp.org>
5963
5964         * modules/javaversion (Makefile.am): Distribute javaversion.java and
5965         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
5966         set PKGDATADIR to point to it.
5967
5968 2006-07-30  Bruno Haible  <bruno@clisp.org>
5969
5970         * modules/csharpexec (configure.ac): Comment out macro invocation.
5971         * modules/javaexec (configure.ac): Likewise.
5972         * modules/javacomp-script (configure.ac): Likewise.
5973
5974         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
5975
5976 2006-07-30  Bruno Haible  <bruno@clisp.org>
5977
5978         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
5979         linked-list.
5980
5981 2006-07-30  Bruno Haible  <bruno@clisp.org>
5982
5983         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
5984
5985 2006-07-30  Bruno Haible  <bruno@clisp.org>
5986
5987         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5988         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
5989         get removed.
5990
5991 2006-07-29  Bruno Haible  <bruno@clisp.org>
5992
5993         Make it possible for gnulib-tool to work with locally modified or
5994         augmented gnulib repositories.
5995         * gnulib-tool (func_usage): Document --local-dir option.
5996         (local_gnulib_dir): New variable.
5997         Handle --local-dir option.
5998         (func_lookup_file): New function.
5999         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
6000         (func_get_description, func_get_filelist, func_get_description,
6001         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
6002         func_get_automake_snippet, func_get_include_directive,
6003         func_get_license, func_get_maintainer): Use func_lookup_file.
6004         (func_import, func_create_testdir): Use func_lookup_file.
6005
6006 2006-07-29  Bruno Haible  <bruno@clisp.org>
6007
6008         * modules/setenv (Depends-on): Add unistd.
6009
6010 2006-07-29  Bruno Haible  <bruno@clisp.org>
6011
6012         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
6013
6014 2006-07-29  Bruno Haible  <bruno@clisp.org>
6015
6016         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
6017
6018 2006-07-29  Bruno Haible  <bruno@clisp.org>
6019
6020         * gnulib-tool (import, update): If there is no Makefile.am, look at
6021         aclocal.m4, instead of bailing out.
6022
6023 2006-07-29  Bruno Haible  <bruno@clisp.org>
6024
6025         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
6026         Categorize the options by when they are useful.
6027
6028 2006-07-29  Bruno Haible  <bruno@clisp.org>
6029
6030         * gnulib-tool (func_usage): Document option --no-libtool.
6031         Handle option --no-libtool.
6032         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
6033         for changed semantics of $libtool variable.
6034         (func_import): Likewise. If libtool is not used, show this through
6035         an option --no-libtool.
6036         (func_create_testdir): Update.
6037
6038 2006-07-29  Bruno Haible  <bruno@clisp.org>
6039
6040         * gnulib-tool (func_import): Extend error message about missing
6041         --doc-base.
6042
6043 2006-07-29  Bruno Haible  <bruno@clisp.org>
6044
6045         * gnulib-tool (func_import): Don't create the $docbase directory if
6046         there is no file to store there.
6047
6048 2006-07-29  Bruno Haible  <bruno@clisp.org>
6049
6050         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6051         relevant, look for configure.ac there, not in the current directory.
6052         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6053
6054 2006-07-29  Bruno Haible  <bruno@clisp.org>
6055
6056         * gnulib-tool (SORT): New variable.
6057         (func_usage): Undocument --assume-autoconf option.
6058         Remove --assume-autoconf option handling.
6059         (autoconf_minversion): Determine from the contents of configure.ac.
6060         (func_import): Remove autoconf_minversion handling.
6061         Suggested by Eric Blake.
6062
6063 2006-07-29  Bruno Haible  <bruno@clisp.org>
6064
6065         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6066
6067 2006-07-29  Bruno Haible  <bruno@clisp.org>
6068
6069         * config/srclist.txt (*setenv.[ch]): Remove rules.
6070
6071 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6072
6073         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6074
6075 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6076
6077         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6078         arpa/inet.h.
6079
6080 2006-07-28  Simon Josefsson  <jas@extundo.com>
6081
6082         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
6083         * modules/inet_pton (Depends-on): Likewise.
6084
6085 2006-07-28  Simon Josefsson  <jas@extundo.com>
6086
6087         * m4/netinet_in_h.m4: New file.
6088
6089 2006-07-28  Simon Josefsson  <jas@extundo.com>
6090
6091         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
6092         #include's.
6093
6094 2006-07-28  Simon Josefsson  <jas@extundo.com>
6095
6096         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
6097         #include's.
6098
6099 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
6100
6101         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
6102         setgid on directories only if they set these bits.
6103         * lib/modechange.h: Remove obsolete comment about masks.
6104
6105 2006-07-28  Eric Blake  <ebb9@byu.net>
6106
6107         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6108         macro expansion.
6109
6110 2006-07-28  Bruno Haible  <bruno@clisp.org>
6111
6112         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
6113
6114 2006-07-28  Bruno Haible  <bruno@clisp.org>
6115
6116         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
6117
6118 2006-07-28  Bruno Haible  <bruno@clisp.org>
6119
6120         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
6121         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
6122         Define fallbacks.
6123         Avoids link error on FreeBSD 4.x.
6124         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
6125
6126         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
6127         encoding.
6128         * lib/mbswidth.c (iswcntrl): Likewise.
6129
6130 2006-07-27  Bruno Haible  <bruno@clisp.org>
6131
6132         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
6133         test.
6134
6135 2006-07-27  Bruno Haible  <bruno@clisp.org>
6136
6137         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
6138         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
6139         defined.
6140
6141 2006-07-26  Eric Blake  <ebb9@byu.net>
6142
6143         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
6144
6145 2006-07-26  Eric Blake  <ebb9@byu.net>
6146
6147         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
6148         like mingw that lack mkstemp.
6149         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
6150         avoid compilation warning on mingw.
6151
6152 2006-07-26  Bruno Haible  <bruno@clisp.org>
6153
6154         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
6155         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
6156         INT_FAST*_MIN, INTPTR_MIN.
6157
6158 2006-07-25  Bruno Haible  <bruno@clisp.org>
6159
6160         * modules/version-etc (Depends-on): Add stdarg.
6161
6162 2006-07-25  Bruno Haible  <bruno@clisp.org>
6163
6164         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
6165         complex commands.
6166
6167 2006-07-25  Bruno Haible  <bruno@clisp.org>
6168
6169         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
6170         defined in <stdarg.h> or config.h.
6171
6172 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6173
6174         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
6175         (gl_STDIO_SAFER): Remove.
6176
6177 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6178
6179         * MODULES.html.sh (File stream based Input/Output):
6180         Add fopen-safer, tmpfile-safer; remove stdio-safer.
6181         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
6182         * modules/fopen-safer, modules/tmpfile-safer: New files.
6183         * modules/stdio-safer: Remove.
6184
6185 2006-07-24  Bruno Haible  <bruno@clisp.org>
6186
6187         * modules/tmpdir: New file.
6188         * MODULES.html.sh (File system functions): Add it.
6189
6190 2006-07-24  Bruno Haible  <bruno@clisp.org>
6191
6192         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
6193         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
6194
6195 2006-07-24  Bruno Haible  <bruno@clisp.org>
6196
6197         * modules/clean-temp: New file.
6198
6199 2006-07-24  Bruno Haible  <bruno@clisp.org>
6200
6201         * m4/tmpdir.m4: New file, from GNU gettext.
6202
6203 2006-07-24  Bruno Haible  <bruno@clisp.org>
6204
6205         * lib/tmpdir.h: New file, from GNU gettext.
6206         * lib/tmpdir.c: New file, from GNU gettext.
6207
6208 2006-07-24  Bruno Haible  <bruno@clisp.org>
6209
6210         * lib/clean-temp.h: New file, from GNU gettext.
6211         * lib/clean-temp.c: New file, from GNU gettext.
6212
6213 2006-07-23  Eric Blake  <ebb9@byu.net>
6214
6215         * modules/stdio-safer (Files): Add tmpfile-safer.c.
6216         (Depends-on): Add binary-io.
6217
6218 2006-07-23  Eric Blake  <ebb9@byu.net>
6219
6220         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
6221
6222 2006-07-23  Eric Blake  <ebb9@byu.net>
6223
6224         * lib/tmpfile-safer.c: New file.
6225         * lib/stdio-safer.h (fopen_safer): Add prototype.
6226         * lib/stdio--.h (tmpfile): Make safer.
6227
6228 2006-07-23  Bruno Haible  <bruno@clisp.org>
6229
6230         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
6231         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
6232         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
6233         gl_linked_remove_at): Use it.
6234
6235 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6236         and Simon Josefsson <jas@extundo.com>
6237
6238         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
6239
6240         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
6241
6242 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6243
6244         * modules/close-stream: New file.
6245         * modules/closeout (Description): Make it clear that it exits
6246         with a diagnostic on error.
6247         (Depends-on): Add close-stream.  Remove fpending, stdbool.
6248         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
6249
6250 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6251
6252         * m4/close-stream.m4: New file.
6253
6254 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6255
6256         * lib/close-stream.c, lib/close-stream.h: New files.
6257
6258 2006-07-22  Bruno Haible  <bruno@clisp.org>
6259
6260         Merge from GNU gettext 0.15.
6261
6262         2006-05-01  Bruno Haible  <bruno@clisp.org>
6263
6264                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
6265
6266         2006-07-22  Bruno Haible  <bruno@clisp.org>
6267
6268                 * modules/javaversion: New file.
6269                 * MODULES.html.sh (Java): Add javaversion.
6270
6271         2006-03-12  Bruno Haible  <bruno@clisp.org>
6272
6273                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
6274
6275         2005-12-04  Bruno Haible  <bruno@clisp.org>
6276
6277                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
6278                 (untested).
6279
6280         2006-06-21  Bruno Haible  <bruno@clisp.org>
6281
6282                 Avoid warnings from recent versions of mcs.
6283                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
6284                 -o, -L, -r any more. Use options documented since mcs-1.0
6285                 instead. Similarly for -g.
6286
6287         2005-12-04  Bruno Haible  <bruno@clisp.org>
6288
6289                 * build-aux/csharpcomp.sh.in: Suffix for resources is
6290                 .resources, not .resource.
6291
6292         2005-07-09  Bruno Haible  <bruno@clisp.org>
6293
6294                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
6295                 add a .dll suffix.
6296                 Reported by Mark Junker <mjscod@gmx.de>.
6297
6298         2006-07-22  Bruno Haible  <bruno@clisp.org>
6299
6300                 * modules/gettext: Upgrade to gettext-0.15.
6301                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
6302                 m4/visibility.m4.
6303                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
6304
6305 2006-07-22  Bruno Haible  <bruno@clisp.org>
6306
6307         Merge from GNU gettext 0.15.
6308
6309         2006-03-25  Bruno Haible  <bruno@clisp.org>
6310
6311                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
6312
6313         2006-07-21  Bruno Haible  <bruno@clisp.org>
6314
6315                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6316                 "1.1".
6317
6318         2006-05-09  Bruno Haible  <bruno@clisp.org>
6319
6320                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6321                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6322                 for the conftestver execution.
6323
6324         2006-05-01  Bruno Haible  <bruno@clisp.org>
6325
6326                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6327                 optional target-version argument. Verify that the compiler
6328                 groks source of the specified source-version, or add -source
6329                 option as necessary. Verify that the compiler produces
6330                 bytecode in the specified target-version, or add -target and
6331                 -source options as necessary. Make the result of the test
6332                 available as variable CONF_JAVAC. Also log error output in
6333                 config.log.
6334
6335         2006-03-11  Bruno Haible  <bruno@clisp.org>
6336
6337                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6338
6339         2006-05-09  Bruno Haible  <bruno@clisp.org>
6340
6341                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6342                 CLASSPATH_SEPARATOR to a semicolon.
6343
6344         2006-03-12  Bruno Haible  <bruno@clisp.org>
6345
6346                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6347                 available as variable CONF_JAVA, for subsequent autoconf
6348                 tests. Also log error output in config.log.
6349
6350         2006-07-19  Bruno Haible  <bruno@clisp.org>
6351
6352                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6353                 that getline works on glibc2 systems. Needed to avoid trouble
6354                 in relocatable.c.
6355                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6356
6357         2005-12-04  Bruno Haible  <bruno@clisp.org>
6358
6359                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6360                 launcher (untested).
6361
6362         2005-12-04  Bruno Haible  <bruno@clisp.org>
6363
6364                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6365
6366         2006-07-22  Bruno Haible  <bruno@clisp.org>
6367
6368                 * gettext.m4: Update from GNU gettext-0.15.
6369                 * nls.m4: Likewise.
6370                 * po.m4: Likewise.
6371                 * inttypes-pri.m4: Likewise.
6372                 * inttypes-h.m4: Renamed from inttypes.m4.
6373                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6374
6375 2006-07-22  Bruno Haible  <bruno@clisp.org>
6376
6377         Merge from GNU gettext 0.15.
6378
6379         2005-07-05  Bruno Haible  <bruno@clisp.org>
6380
6381                 * printf-args.c (printf_fetchargs): Work around broken
6382                 definition of wint_t on mingw.
6383
6384         2005-02-12  Bruno Haible  <bruno@clisp.org>
6385
6386                 * xallocsa.h: Add extern "C" for C++.
6387
6388         2006-05-17  Bruno Haible  <bruno@clisp.org>
6389
6390                 Cygwin portability.
6391                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6392
6393         2006-04-30  Bruno Haible  <bruno@clisp.org>
6394
6395                 * progreloc.c: Include <mach-o/dyld.h> if available.
6396                 (find_executable): Use _NSGetExecutablePath when possible.
6397
6398         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6399
6400                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6401                 function.
6402
6403         2005-12-29  Bruno Haible  <bruno@clisp.org>
6404
6405                 * progreloc.c (set_program_name_and_installdir): Fix
6406                 compilation error.
6407
6408         2005-12-04  Bruno Haible  <bruno@clisp.org>
6409
6410                 Cygwin portability.
6411                 * progreloc.c: Include <windows.h> also on Cygwin.
6412                 (find_executable): Add support for Cygwin.
6413                 (set_program_name_and_installdir): Handle also platforms with
6414                 nonempty EXEEXT.
6415
6416         2006-07-11  Bruno Haible  <bruno@clisp.org>
6417
6418                 * javacomp.c: Fix a comment.
6419                 Reported by Jim Meyering.
6420
6421         2006-04-30  Bruno Haible  <bruno@clisp.org>
6422
6423                 * javacomp.h (compile_java_class): Add source_version,
6424                 target_version arguments.
6425                 * javacomp.c: Rewritten to choose only a compiler that
6426                 respects the specified source_version and target_version.
6427
6428         2006-06-27  Bruno Haible  <bruno@clisp.org>
6429
6430                 Assume correct S_ISDIR macro.
6431                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6432
6433         2006-07-22  Bruno Haible  <bruno@clisp.org>
6434
6435                 * javaversion.h: New file, from GNU gettext.
6436                 * javaversion.c: New file, from GNU gettext.
6437                 * javaversion.java: New file, from GNU gettext.
6438                 * javaversion.class: New file, from GNU gettext.
6439
6440         2006-05-17  Bruno Haible  <bruno@clisp.org>
6441
6442                 Cygwin portability.
6443                 * javaexec.c (execute_java_class): Test for jview program
6444                 also on Cygwin.
6445
6446         2006-04-09  Bruno Haible  <bruno@clisp.org>
6447
6448                 * fatal-signal.c: Don't include string.h.
6449                 (at_fatal_signal): Use a copying loop instead of memcpy.
6450
6451         2005-12-04  Bruno Haible  <bruno@clisp.org>
6452
6453                 * csharpexec.c: Add support for 'clix' launcher (untested).
6454                 (execute_csharp_using_sscli): New function.
6455                 (execute_csharp_program): Call it.
6456
6457         2006-06-21  Bruno Haible  <bruno@clisp.org>
6458
6459                 Avoid warnings from recent versions of mcs.
6460                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
6461                 -o, -L, -r any more. Use options documented since mcs-1.0
6462                 instead. Similarly for -g.
6463
6464         2005-07-09  Bruno Haible  <bruno@clisp.org>
6465
6466                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6467                 add a .dll suffix.
6468                 Reported by Mark Junker <mjscod@gmx.de>.
6469
6470         2006-06-17  Bruno Haible  <bruno@clisp.org>
6471
6472                 * config.charset: Update for NetBSD 3.0.
6473
6474         2006-05-17  Bruno Haible  <bruno@clisp.org>
6475
6476                 Cygwin portability.
6477                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6478
6479         2006-05-16  Bruno Haible  <bruno@clisp.org>
6480
6481                 * localcharset.c [CYGWIN]: Include <windows.h>.
6482                 (get_charset_aliases): For Cygwin, return the same CPxxx
6483                 aliases list as under WIN32.
6484                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
6485                 the environment variables. Fall back to GetACP().
6486
6487         2006-04-05  Bruno Haible  <bruno@clisp.org>
6488
6489                 * config.charset: Update Juan Manuel Guerrero's address.
6490
6491         2005-02-12  Bruno Haible  <bruno@clisp.org>
6492
6493                 * allocsa.h: Add extern "C" for C++.
6494
6495         2005-02-10  Bruno Haible  <bruno@clisp.org>
6496
6497                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
6498                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
6499
6500         2006-07-22  Bruno Haible  <bruno@clisp.org>
6501
6502                 * gettext.h: Update to GNU gettext-0.15.
6503
6504 2006-07-22  Bruno Haible  <bruno@clisp.org>
6505
6506         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
6507         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
6508         lib-prefix.m4, longdouble.m4, ssize_t.m4.
6509
6510 2006-07-21  Eric Blake  <ebb9@byu.net>
6511
6512         * modules/stdlib-safer: New file.
6513         * MODULES.html.sh (File stream based Input/Output): Add
6514         stdlib-safer.
6515
6516 2006-07-21  Eric Blake  <ebb9@byu.net>
6517
6518         * lib/stdlib-safer.h: New file from coreutils, required by
6519         stdlib--.h.
6520
6521 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6522
6523         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
6524
6525 2006-07-20  Bruno Haible  <bruno@clisp.org>
6526
6527         * gnulib-tool: Recognize new option --assume-autoconf.
6528         (autoconf_minversion): New variable.
6529         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6530
6531 2006-07-20  Bruno Haible  <bruno@clisp.org>
6532
6533         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6534
6535 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6536
6537         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6538         Reindent and repaginate.
6539
6540 2006-07-19  Derek Price  <derek@ximbiot.com>
6541
6542         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6543         Correct grammar.
6544
6545 2006-07-17  Bruno Haible  <bruno@clisp.org>
6546
6547         * modules/list: New file.
6548         * modules/array-list: New file.
6549         * modules/carray-list, modules/carray-list-tests: New files.
6550         * modules/linked-list, modules/linked-list-tests: New files.
6551         * modules/avltree-list, modules/avltree-list-tests: New files.
6552         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6553         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6554         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6555         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6556         * modules/oset: New file.
6557         * modules/array-oset: New file.
6558         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6559         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6560         * tests/test-carray_list.c: New file.
6561         * tests/test-linked_list.c: New file.
6562         * tests/test-avltree_list.c: New file.
6563         * tests/test-rbtree_list.c: New file.
6564         * tests/test-linkedhash_list.c: New file.
6565         * tests/test-avltreehash_list.c: New file.
6566         * tests/test-rbtreehash_list.c: New file.
6567         * tests/test-avltree_oset.c: New file.
6568         * tests/test-rbtree_oset.c: New file.
6569         * MODULES.html.sh (Container data structures): New section.
6570
6571 2006-07-17  Bruno Haible  <bruno@clisp.org>
6572
6573         * m4/gl_list.m4: New file.
6574
6575 2006-07-17  Bruno Haible  <bruno@clisp.org>
6576
6577         * lib/gl_list.h: New file.
6578         * lib/gl_list.c: New file.
6579         * lib/gl_array_list.h: New file.
6580         * lib/gl_array_list.c: New file.
6581         * lib/gl_carray_list.h: New file.
6582         * lib/gl_carray_list.c: New file.
6583         * lib/gl_linked_list.h: New file.
6584         * lib/gl_linked_list.c: New file.
6585         * lib/gl_anylinked_list1.h: New file.
6586         * lib/gl_anylinked_list2.h: New file.
6587         * lib/gl_avltree_list.h: New file.
6588         * lib/gl_avltree_list.c: New file.
6589         * lib/gl_anyavltree_list1.h: New file.
6590         * lib/gl_anyavltree_list2.h: New file.
6591         * lib/gl_rbtree_list.h: New file.
6592         * lib/gl_rbtree_list.c: New file.
6593         * lib/gl_anyrbtree_list1.h: New file.
6594         * lib/gl_anyrbtree_list2.h: New file.
6595         * lib/gl_anytree_list1.h: New file.
6596         * lib/gl_anytree_list2.h: New file.
6597         * lib/gl_linkedhash_list.h: New file.
6598         * lib/gl_linkedhash_list.c: New file.
6599         * lib/gl_anyhash_list1.h: New file.
6600         * lib/gl_anyhash_list2.h: New file.
6601         * lib/gl_avltreehash_list.h: New file.
6602         * lib/gl_avltreehash_list.c: New file.
6603         * lib/gl_rbtreehash_list.h: New file.
6604         * lib/gl_rbtreehash_list.c: New file.
6605         * lib/gl_anytreehash_list1.h: New file.
6606         * lib/gl_anytreehash_list2.h: New file.
6607
6608         * lib/gl_oset.h: New file.
6609         * lib/gl_oset.c: New file.
6610         * lib/gl_array_oset.h: New file.
6611         * lib/gl_array_oset.c: New file.
6612         * lib/gl_avltree_oset.h: New file.
6613         * lib/gl_avltree_oset.c: New file.
6614         * lib/gl_rbtree_oset.h: New file.
6615         * lib/gl_rbtree_oset.c: New file.
6616         * lib/gl_anytree_oset.h: New file.
6617
6618 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6619
6620         * m4/mkancesdirs.m4: New file.
6621         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6622         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6623         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6624         it.
6625
6626 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6627
6628         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6629         * lib/mkancesdirs.h: New files.
6630         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6631         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6632         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6633         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6634         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6635         callers changed.  Revamp internals significantly, by not
6636         attempting to create directories that are temporarily more
6637         permissive than the final results.  Do not attempt to use
6638         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6639         This removes some race conditions, fixes some bugs, and simplifies
6640         things.  Use new dirchownmod function to do owner and mode changes.
6641         * lib/mkdir-p.h: Likewise.
6642         * lib/modechange.c (octal_to_mode): New function.
6643         (struct mode_change): New member mentioned.
6644         (make_node_op_equals): New arg mentioned.  All callers changed.
6645         (mode_compile): Keep track of which mode bits the user has explicitly
6646         mentioned.
6647         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6648         New arg PMODE_BITS, to keep track of which mode bits the user
6649         mentioned; it treats S_ISUID and S_ISGID speciall.
6650         All callers changed.
6651         * lib/modechange.h: Likewise.
6652
6653 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6654
6655         * MODULES.html.sh: Add mkancestors.
6656         * modules/mkancesdirs: New module.
6657         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6658         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6659         The chdir-safer and afs files are now orphans; I'll remove them
6660         unless someone speaks up.
6661         Add lib/dirchownmod.c, lib/dirchownmod.h.
6662         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6663         Add lchown, mkancesdirs.
6664         (Maintainer): Add self.
6665
6666 2006-07-15  Karl Berry  <karl@gnu.org>
6667
6668         * gnulib-tool: help message wording/arrangement.
6669
6670 2006-07-14  Simon Josefsson  <jas@extundo.com>
6671
6672         * doc/gnulib.texi (Libtool and Windows): New section.
6673
6674 2006-07-12  Simon Josefsson  <jas@extundo.com>
6675
6676         * modules/gendocs (License): Fix license, approved by Karl.
6677
6678 2006-07-12  Eric Blake  <ebb9@byu.net>
6679
6680         * MODULES.html.sh: Add gendocs.
6681
6682 2006-07-11  Eric Blake  <ebb9@byu.net>
6683
6684         * modules/fdl: New module, to install doc/fdl.texi.
6685         * MODULES.html.sh: Add new section for documentation modules.
6686         * gnulib-tool: Avoid space-tab.
6687         (--doc-base): New option, to manage files from doc.
6688
6689 2006-07-11  Eric Blake  <ebb9@byu.net>
6690
6691         * m4/absolute-header.m4: Fix comments to match recent change.
6692
6693 2006-07-11  Eric Blake  <ebb9@byu.net>
6694
6695         * gnulib-tool: List --doc-base before --tests-base.
6696
6697 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6698
6699         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6700
6701 2006-07-11  Bruno Haible  <bruno@clisp.org>
6702
6703         * README: Mention where to put documentation.
6704
6705 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6706
6707         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6708
6709 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6710
6711         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6712         to stdint.m4.
6713
6714 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6715
6716         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6717         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6718         "no/such/file/stdint.h" when there is no such file, so that
6719         the resulting C code can be parsed by dodgy compilers.
6720         Problems reported by Bob Proulx.
6721
6722 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6723
6724         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6725         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6726         macros into the GNU _D_EXACT_NAMLEN.
6727         * lib/savedir.c:  Likewise.
6728         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6729
6730 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6731         and Paul Eggert  <eggert@cs.ucla.edu>
6732
6733         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6734         * m4/savedir.m4:
6735         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6736         macros into the GNU _D_EXACT_NAMLEN.
6737
6738 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6739
6740         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6741         around the absolute name, to work around a problem with the HP-UX
6742         11.23 native C compiler, reported by Bob Proulx.
6743
6744 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6745
6746         * doc/maintain.texi, make-stds.texi: Sync from
6747         <http://savannah.gnu.org/projects/gnustandards>.
6748
6749 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6750
6751         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6752
6753 2006-07-09  Jim Meyering  <jim@meyering.net>
6754
6755         * m4/glob.m4: Remove a doubled word in a comment.
6756
6757 2006-07-09  Jim Meyering  <jim@meyering.net>
6758
6759         * lib/argp-pv.c: Remove a doubled word in a comment.
6760         * lib/check-version.c (check_version): Likewise.
6761         * lib/javacomp.c (compile_java_class): Likewise.
6762
6763 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6764
6765         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6766         for the benefit of people using Autoconf 2.60.  If you want to
6767         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6768         (or m4/onceonly.m4, if pre-2.57) manually.
6769
6770 2006-07-08  Jim Meyering  <jim@meyering.net>
6771
6772         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6773         comment.
6774         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6775         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6776         comment.
6777
6778 2006-07-08  Jim Meyering  <jim@meyering.net>
6779
6780         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6781
6782 2006-07-07  Simon Josefsson  <jas@extundo.com>
6783
6784         * tests/test-crc.c: Change expected crc value, the test vector
6785         were probably computed using the old broken crc.c?
6786
6787 2006-07-06  Simon Josefsson  <jas@extundo.com>
6788
6789         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6790         now the canonical place for the M4 file).
6791
6792         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
6793         from the sys_socket dependency now.
6794
6795         * modules/inet_pton (Files): Ditto.
6796
6797         * modules/inet_ntop (Files): Ditto.
6798
6799 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6800
6801         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
6802         not gl_PREREQ_GETUSERSHELL.
6803
6804 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6805
6806         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
6807         with only one argument, for Autoconf 2.60.
6808         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
6809         expand to nothing, so add a shell command to avoid syntax error.
6810         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6811
6812 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6813
6814         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
6815
6816 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6817
6818         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
6819         no longer needed.  Check for isblank decl.
6820         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
6821         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
6822         of existence.
6823
6824 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6825
6826         * lib/getloadavg.c: Use __VMS, not VMS.
6827         * lib/getopt.c: Likewise.
6828         * lib/getpagesize.h: Likewise.
6829         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
6830         and probably does not work.
6831
6832 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6833
6834         * lib/.cppi-disable: Add wcwidth.
6835         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
6836         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
6837         (ISGRAPH): Remove.  All uses changed to isgraph.
6838         (FOLD) [!defined _LIBC]: Remove special case.
6839         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
6840         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
6841         HAVE_ISBLANK.
6842         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
6843         case.
6844
6845 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6846
6847         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
6848         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
6849         brackets.  Other minor changes to suppress some compiler
6850         warnings.
6851
6852 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6853         and Paul Eggert  <eggert@cs.ucla.edu>
6854
6855         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
6856         of invoking obsolescent AC_HEADER_DIRENT macro.
6857         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
6858         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
6859         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
6860         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
6861         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
6862         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6863         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
6864         * m4/readdir.m4: Remove; no longer needed.
6865
6866 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6867         and Paul Eggert  <eggert@cs.ucla.edu>
6868
6869         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
6870         Don't worry about this obsolete case any more.
6871         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
6872         directories.
6873         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
6874         worry about this obsolete case any more.
6875         * lib/fts.c: Likewise.
6876         * lib/getcwd.c: Likewise.
6877         * lib/glob.h: Likewise.
6878         * lib/savedir.c: Likewise.
6879
6880 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6881
6882         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
6883         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
6884         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
6885         needed.
6886         All uses removed.
6887         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6888         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6889         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
6890         needed.
6891         * m4/getdate.m4 (gl_GETDATE): Likewise.
6892         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6893         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6894         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6895         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6896         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6897         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6898         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
6899         needed.
6900
6901 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6902
6903         * lib/memcasecmp.c: Include <limits.h>.
6904         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
6905         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
6906         Don't assume isdigit succeeds only on '0' through '9'.
6907
6908 2006-07-05  Eric Blake  <ebb9@byu.net>
6909
6910         * modules/getaddrinfo (Depends-on): Add snprintf.
6911
6912 2006-07-05  Eric Blake  <ebb9@byu.net>
6913
6914         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
6915         to avoid 'header present but could not be compiled' on cygwin.
6916
6917 2006-07-05  Eric Blake  <ebb9@byu.net>
6918
6919         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
6920         missing from netdb.h.
6921         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
6922
6923 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6924
6925         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
6926         no longer needed.
6927         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
6928         * m4/getdate.m4 (gl_GETDATE): Likewise.
6929         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6930         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6931         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6932         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6933         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6934
6935 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6936
6937         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
6938         All uses of is_space replaced by isspace.
6939         * lib/exit.h: Don't talk about STDC_HEADERS.
6940         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
6941         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
6942         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
6943         replaced by isprint etc.
6944         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
6945         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6946         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
6947         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
6948         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
6949         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6950
6951 2006-07-05  Bruno Haible  <bruno@clisp.org>
6952
6953         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
6954         the function exists, before testing against AIX.
6955         Reported by Martin Lambers <marlam@marlam.de>.
6956
6957 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6958
6959         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
6960         From Mark D. Baushke.
6961
6962 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6963
6964         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
6965         to the absolute name, not just one, to bypass Sun C 5.8's
6966         "warning: #include of /usr/include/... may be non-portable".
6967
6968 2006-07-04  Eric Blake  <ebb9@byu.net>
6969
6970         * modules/dirname-tests: New test module.
6971         * tests/test-dirname.c: New file, replacing dirname.c
6972         TEST_DIRNAME section that was recently deleted.
6973
6974 2006-07-04  Bruno Haible  <bruno@clisp.org>
6975
6976         Assume ANSI C header files and <ctype.h> functions.
6977         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
6978         (mbsnwidth): Use isprint, iscntrl instead.
6979
6980 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6981
6982         Merge from coreutils.
6983         * MODULES.html.sh: Add xstrtold.
6984         * modules/xstrtold: New file.
6985         * modules/cycle-check (Files): Add lib/same-inode.h.
6986         * modules/dirname (Files): Add m4/double-slash-root.m4.
6987         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
6988         * modules/mkdir-p (Files): Add lib/same-inode.h.
6989         * modules/same (Files): Add lib/same-inode.h.
6990
6991 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6992
6993         * m4/absolute-header.m4: Renamed from full-header-path.m4.
6994         This is to keep the terminology clean; POSIX talks about
6995         "absolute pathnames", not "full pathnames", but the GNU
6996         Coding Standards say to use "path" for something else;
6997         so use "absolute" to keep both sides happy.
6998         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
6999         Set gl_absolute_header, not gl_full_header_path.
7000         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
7001         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
7002         All uses changed.
7003
7004         Merge from coreutils.
7005
7006         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7007
7008         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
7009         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
7010         want to require the building of c-strtod.o.
7011         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
7012         needs -lm directly.
7013         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
7014
7015         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7016
7017         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
7018         --as-needed option if available.  Problem reported by Albert Chin in
7019         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
7020         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
7021         cc merely issues a bunch of annoying warnings for --as-needed
7022         (this problem was reported by Bob Proulx).  Also, try linking with
7023         -lm to detect a bug in binutils 2.16 (this problem was reported
7024         by Ralf Wildenhues).
7025
7026         2006-06-18  Jim Meyering  <jim@meyering.net>
7027
7028         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
7029         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
7030         macro.
7031         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
7032         also check for glibc-2.4's abort-inducing bug.
7033
7034         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
7035         Low-probability clean-up should be to use rmdir to get rid of
7036         the just-created directory, not unlink.
7037
7038         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
7039         configure fail, and request a bug report to inform us about it.
7040         Add a comment that, barring reports to the contrary, in 2007 we'll
7041         assume ftruncate is universally available.
7042
7043         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7044
7045         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7046
7047         2006-03-12  Jim Meyering  <jim@meyering.net>
7048
7049         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7050         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7051         * m4/same.m4 (gl_SAME): Likewise.
7052         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7053
7054         2006-03-11  Eric Blake  <ebb9@byu.net>
7055
7056         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7057         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7058         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7059         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7060
7061 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7062
7063         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7064         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7065         reported by Mark D. Baushke, one in
7066         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7067
7068         Merge from coreutils.
7069
7070         * lib/.cppi-disable: Add stdint_.h.
7071         * lib/.cvsignore: Add stdint.h.
7072
7073         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7074
7075         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7076         both double and long double versions.
7077         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7078         * lib/xstrtold.c: New file.
7079         * lib/xstrtod.h (xstrtold): New decl.
7080
7081         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7082
7083         * lib/filemode.c (setst): Remove.
7084         (strmode): Rewrite to avoid setst.  This makes the code shorter,
7085         (arguably) clearer, and the generated code is a bit smaller on my
7086         Debian GNU/Linux stable x86 host.
7087
7088         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7089
7090         * lib/filemode.c: Include "filemode.h" first, to test the interface.
7091         Assume that filemode.h includes sys/types.h and sys/stat.h.
7092         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
7093         (ftypelet): Reorder to put common cases first, for efficiency.
7094         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
7095         to do 'M'.
7096         (strmode): Renamed from mode_string, and now stores 12 bytes instead
7097         of 10, for compatibility with FreeBSD.  All callers changed.
7098         (filemodestring): Now stores 12 bytes instead of 10, and sets file
7099         types that can't be deduced solely from st_mode.  First arg is now a
7100         const pointer.
7101         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
7102         (strmode): Renamed from mode_string.
7103         (filemodestring): New decl.
7104         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
7105         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
7106         needed.
7107         (S_ISPORT, S_ISWHT): New macros, if not already defined.
7108
7109         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7110
7111         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
7112         fsusage.h now does that.  Include fsusage.h first, to test interface.
7113         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
7114         at most one method (the old code could have generated decls that
7115         didn't conform to C89, not that this was ever exercised).
7116         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
7117
7118         2006-03-19  Jim Meyering  <jim@meyering.net>
7119
7120         Work even in a chroot where d_ino values for entries in "/"
7121         don't match the stat.st_ino values for the same names.
7122         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
7123         number, iterate through all entries again, using lstat instead.
7124         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
7125         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
7126
7127         * lib/getcwd.c (__getcwd): Clarify a comment.
7128         Use memcpy in place of a call to strcpy.
7129
7130         2006-03-12  Jim Meyering  <jim@meyering.net>
7131
7132         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
7133         matches that of the current directory (which we're about to chdir ".."
7134         out of), then save the dev-ino of the parent, instead.
7135
7136         * lib/same-inode.h (SAME_INODE): New file/macro.
7137         * lib/chdir-safer.c (SAME_INODE): Remove definition.
7138         Include "same-inode.h", instead.
7139         * lib/same.c: Likewise.
7140         * lib/cycle-check.h: Include "same-inode.h".
7141         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
7142         * lib/cycle-check.c (SAME_INODE): Remove definition.
7143         * lib/root-dev-ino.h: Include "same-inode.h".
7144
7145         2006-03-11  Eric Blake  <ebb9@byu.net>
7146
7147         * lib/same.c (same_name): s/base_name/last_component/
7148         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
7149         * lib/filenamecat.c (file_name_concat): Likewise.
7150
7151         2006-03-11  Eric Blake  <ebb9@byu.net>,
7152                     Paul Eggert  <eggert@cs.ucla.edu>
7153
7154         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
7155         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
7156         drive prefix.
7157         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
7158         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
7159         (last_component): New method.
7160         * lib/dirname.c (dir_len): Determine when drive letters need a
7161         subsequent slash.  Preserve // when it is special.
7162         (dir_name): Don't append dot when drive letter is absolute.
7163         [TEST_DIRNAME]: Move into a full-blown gnulib test.
7164         * lib/basename.c (base_name): New semantics - malloc the result.
7165         Preserve // when it is special.  Preserve relative files that look
7166         like drive letters.
7167         (base_len): Preserve // when it is special.
7168         (last_component): New method, similar to old base_name semantics.
7169         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
7170         base_name.  Strip redundant slashes from ///.
7171
7172 2006-07-03  Jim Meyering  <jim@meyering.net>
7173
7174         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
7175         macro is used before the first cycle_check call.
7176
7177 2006-07-03  Eric Blake  <ebb9@byu.net>
7178
7179         * modules/dirname (Depends-on): Add xstrndup.
7180
7181 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7182
7183         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
7184         test cases, so that config.log is a bit easier to follow.
7185
7186 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7187
7188         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
7189         both are 64 bits, since this seems to be the tradition, and this
7190         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
7191         we ever run into a host that prefers long long to long in this
7192         case, we'll need another configure-time test.  Problem reported by
7193         Jim Meyering.
7194
7195 2006-07-02  Eric Blake  <ebb9@byu.net>
7196
7197         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
7198
7199 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7200
7201         * modules/inttypes (Depends-on): No longer depends on stdint.
7202         * modules/stdint (Description): Say more about assumptions.
7203         Say that the fast types might differ.  Say macros are used.
7204         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
7205         (Makefile.am): Revise list of substituted symbols to match
7206         new stdint.m4.
7207         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
7208         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
7209         * tests/test-stdint.c (verify_same_types)
7210         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
7211         the code conforms to C99/C89.
7212         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
7213         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
7214
7215 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7216
7217         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
7218         but fix a bug, by requiring at least 64 bits.
7219         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
7220         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
7221         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
7222         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
7223
7224         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
7225         changes.  Make 2.59 a prerequisite.  Check and substitute for
7226         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
7227         inttypes.h.  Do not use special include files; just use the
7228         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
7229         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
7230         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
7231         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
7232         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
7233         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
7234         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
7235         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
7236         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
7237         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
7238         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
7239         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
7240         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
7241         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
7242         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
7243         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
7244         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
7245         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
7246         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
7247         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
7248         WINT_MAX.  Check for C99 conformance more strictly, by detecting
7249         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
7250         not check for things that C99 does not require, e.g., int8_t.  If
7251         a test isn't needed unless <stdint.h> isn't working, and is
7252         unlikely to be needed for any other reason, then don't do it
7253         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
7254         size_t, since we assume C89 freestanding at least.  Do not check
7255         for sig_atomic_t, wchar_t, or wint_t, since the code now does
7256         the right thing even if the types are not defined.  Instead use:
7257         (gl_STDINT_TYPE_PROPERTIES): New macro.
7258         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
7259         testing whether <sys/types.h> clashes, as Autoconf does this for
7260         us now.  All uses removed.
7261         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
7262         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
7263         (gl_CHECK_TYPE_SAME):
7264         Remove; no longer needed.
7265         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
7266         exists, since we'll return 0 anyway in that case.
7267         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
7268
7269 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7270
7271         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
7272         possible collision with system files.
7273         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
7274         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
7275         WCHAR_MIN and WCHAR_MAX in this case.
7276         (<stddef.h>): Do not include; no longer needed.
7277         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
7278         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
7279         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
7280         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
7281         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
7282         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
7283         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
7284         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
7285         !defined(__c99))]: Include in this case too, since it's harmless
7286         now.
7287         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
7288         dangerous to do so.
7289         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
7290         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
7291         (_STDINT_MIN, _STDINT_MAX): New macros.
7292         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
7293         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
7294         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
7295         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
7296         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
7297         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
7298         macros, not typedefs; this simplifies things quite a bit.
7299         Use long int for all types narrower than int64_t.
7300         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
7301         Define in terms of long long int or int64_t or long int,
7302         not int64_t or int32_t.  This saves some compile-time testing.
7303         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
7304         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
7305         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
7306         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
7307         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
7308         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
7309         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
7310         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
7311         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
7312         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
7313         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7314         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7315         undef any previous version and define our own version, for
7316         simplicity and consistency with the new macros for types.
7317         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7318         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7319         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7320         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7321         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7322         @WINT_T_SUFFIX@ to keep things simple here.
7323         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7324         Simplify by assuming typical 8/16/32/64 host, since we're
7325         already doing that elsewhere anyway.
7326         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7327         and assume long long int is 64 bits if available.  This
7328         speeds up 'configure'.
7329
7330 2006-07-01  Eric Blake  <ebb9@byu.net>
7331
7332         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7333         Reported by Andreas Buening.
7334
7335 2006-07-01  Eric Blake  <ebb9@byu.net>
7336
7337         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7338
7339 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7340
7341         * lib/getaddrinfo.c: fixed typo
7342
7343 2006-06-29  Jim Meyering  <jim@meyering.net>
7344
7345         * modules/strftime (Maintainer): Add my name, since with the
7346         FPRINTFTIME changes strftime.c has forked from glibc.
7347
7348 2006-06-29  Eric Blake  <ebb9@byu.net>
7349
7350         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7351
7352 2006-06-29  Eric Blake  <ebb9@byu.net>
7353
7354         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7355
7356 2006-06-29  Eric Blake  <ebb9@byu.net>
7357
7358         * lib/stat_.h: New file.
7359
7360 2006-06-29  Eric Blake  <ebb9@byu.net>
7361
7362         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7363         unused static function.
7364
7365 2006-06-29  Eric Blake  <ebb9@byu.net>
7366
7367         * doc/functions.texi (Function Portability): Document missing lstat
7368         on mingw.
7369
7370 2006-06-29  Eric Blake  <ebb9@byu.net>
7371
7372         * MODULES.html.sh: Add sys_stat.
7373         * modules/sys_stat: New module.
7374         * modules/mkstemp (Depends-on): Add sys_stat.
7375
7376 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7377
7378         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7379
7380 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7381
7382         * m4/c-bs-a.m4: Removed.
7383
7384 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7385
7386         * lib/strftime.c: Assume strftime() exists.
7387
7388 2006-06-29  Derek Price  <derek@ximbiot.com>
7389
7390         * modules/c-bs-a: Removed - \a is C89.
7391         * MODULES.html.sh: Remove c-bs-a.
7392
7393 2006-06-29  Bruno Haible  <bruno@clisp.org>
7394
7395         * modules/wcwidth (License): Change to LGPL.
7396
7397 2006-06-28  Simon Josefsson  <jas@extundo.com>
7398
7399         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7400         on _WIN32.
7401
7402         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7403         getnameinfo.
7404
7405 2006-06-28  Simon Josefsson  <jas@extundo.com>
7406
7407         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7408
7409 2006-06-28  Simon Josefsson  <jas@extundo.com>
7410
7411         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7412         functions there.  It will succeed on Windows XP, but on Windows
7413         2000 and (presumably) earlier, it will fail, and use the internal
7414         re-implementation.
7415         (use_win32_p): New function.
7416         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7417         Support AI_NUMERICSERV to disable getservbyname.
7418         (getnameinfo): New function, only supports
7419         NI_NUMERICHOST|NI_NUMERICSERV for now.
7420
7421         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7422         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7423         getnameinfo.
7424
7425 2006-06-28  Eric Blake  <ebb9@byu.net>
7426
7427         * modules/wcwidth: New file.
7428         * modules/mbchar (Depends-on): Add wcwidth.
7429         * modules/mbswidth (Depends-on): Add wcwidth.
7430         * MODULES.html.sh: Add wcwidth.
7431
7432 2006-06-28  Eric Blake  <ebb9@byu.net>
7433
7434         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7435         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7436
7437 2006-06-28  Eric Blake  <ebb9@byu.net>
7438
7439         * lib/xvasprintf.h: Fix comments.
7440
7441 2006-06-28  Eric Blake  <ebb9@byu.net>
7442
7443         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7444         * lib/mbswidth.c (wcwidth): Move from here...
7445         * lib/wcwidth.h: ...to this new file.
7446
7447 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7448
7449         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7450
7451         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7452         it's obsolete.
7453         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7454
7455 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7456
7457         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
7458         Autoconf 2.60 says this stuff was obsolete.
7459
7460 2006-06-28  Bruno Haible  <bruno@clisp.org>
7461
7462         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7463
7464 2006-06-28  Bruno Haible  <bruno@clisp.org>
7465
7466         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7467         gt_TYPE_WCHAR_T.
7468
7469 2006-06-28  Bruno Haible  <bruno@clisp.org>
7470
7471         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7472         declaration for wcwidth.
7473         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7474
7475 2006-06-28  Bruno Haible  <bruno@clisp.org>
7476
7477         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7478         (mkdir): Define using _mkdir.
7479
7480 2006-06-28  Bruno Haible  <bruno@clisp.org>
7481
7482         * lib/getaddrinfo.h: Fix POSIX URL.
7483         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
7484         _WIN32.
7485         (use_win32_p): Make static.
7486         (getaddrinfo): Reject service name if it is empty or does not consist
7487         solely of decimal digits, or if its value is > 65535.
7488         (getnameinfo): Remove useless casts.
7489
7490 2006-06-27  Simon Josefsson  <jas@extundo.com>
7491
7492         * modules/sys_select: New file, suggested by Bruno Haible, Paul
7493         Eggert and Martin Lambers.
7494
7495 2006-06-27  Simon Josefsson  <jas@extundo.com>
7496
7497         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
7498         Eggert and Martin Lambers.
7499
7500 2006-06-27  Bruno Haible  <bruno@clisp.org>
7501
7502         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
7503         result to 0, not to empty.
7504         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
7505
7506 2006-06-27  Bruno Haible  <bruno@clisp.org>
7507
7508         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
7509
7510 2006-06-26  Simon Josefsson  <jas@extundo.com>
7511
7512         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
7513         present.
7514
7515 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
7516
7517         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
7518         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
7519         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
7520
7521 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
7522
7523         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
7524
7525 2006-06-26  Bruno Haible  <bruno@clisp.org>
7526
7527         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7528
7529 2006-06-26  Bruno Haible  <bruno@clisp.org>
7530
7531         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7532
7533 2006-06-26  Bruno Haible  <bruno@clisp.org>
7534
7535         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7536         SGI C compiler in pre-C99 mode.
7537         Suggested by Mark D. Baushke and Larry Jones.
7538
7539 2006-06-26  Bruno Haible  <bruno@clisp.org>
7540
7541         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7542         WCHAR_MAX.
7543         Reported by Mark D. Baushke and Larry Jones.
7544
7545 2006-06-26  Bruno Haible  <bruno@clisp.org>
7546
7547         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7548         in pre-C99 mode.
7549         Suggested by Mark D. Baushke and Larry Jones.
7550
7551 2006-06-23  Simon Josefsson  <jas@extundo.com>
7552             Bruno Haible  <bruno@clisp.org>
7553
7554         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7555         Emit mostlyclean-local rule.
7556         (func_emit_tests_Makefile_am): Likewise.
7557         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7558
7559 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7560
7561         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7562
7563 2006-06-23  Bruno Haible  <bruno@clisp.org>
7564
7565         * tests/test-stdint.c: Update to match ISO C 99 Technical
7566         Corrigendum 1.
7567
7568 2006-06-23  Bruno Haible  <bruno@clisp.org>
7569
7570         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7571
7572 2006-06-23  Bruno Haible  <bruno@clisp.org>
7573
7574         * lib/stdint_.h: Treat IRIX like OpenBSD.
7575
7576 2006-06-23  Bruno Haible  <bruno@clisp.org>
7577
7578         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7579         ISO C 99 Technical Corrigendum 1.
7580
7581 2006-06-22  Simon Josefsson  <jas@extundo.com>
7582
7583         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7584         MinGW.
7585
7586 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7587
7588         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7589         needed.  Some compiler complained about some of them.  Problem reported
7590         by Larry Jones in
7591         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7592
7593 2006-06-21  Simon Josefsson  <jas@extundo.com>
7594
7595         * tests/test-getaddrinfo.c: New file.
7596
7597         * modules/getaddrinfo-tests: New file.
7598
7599         * MODULES.html.sh: Add inet_pton.
7600
7601         * modules/inet_pton: New file.
7602
7603 2006-06-21  Simon Josefsson  <jas@extundo.com>
7604
7605         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7606         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7607         of using the (limited) gnulib implementation on Windows XP.
7608
7609         * m4/inet_pton.m4: New file.
7610
7611 2006-06-21  Simon Josefsson  <jas@extundo.com>
7612
7613         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7614         variable.
7615
7616         * lib/socket_.h: Don't define WINVER.
7617
7618         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7619         slightly modified to work in gnulib.
7620
7621 2006-06-21  Simon Josefsson  <jas@extundo.com>
7622
7623         * doc/gnulib.texi (Windows sockets): Add.
7624
7625 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7626
7627         * lib/read-file.c (fread_file): Start with buffer allocation of
7628         0 bytes rather than 1 byte; this simplifies the code.
7629         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7630         code to free buffer and save/restore errno.
7631         (internal_read_file): Remove unused local.
7632
7633 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7634
7635         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7636         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7637         Problem reported by Denis Excoffier in
7638         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7639
7640 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7641
7642         * modules/sys_socket, modules/socklen: Include sys/types since
7643         FreeBSD 4.x's sys/socket.h needs it.
7644
7645 2006-06-19  Simon Josefsson  <jas@extundo.com>
7646
7647         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7648
7649 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7650
7651         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7652
7653 2006-06-19  Bruno Haible  <bruno@clisp.org>
7654
7655         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7656         and FULL_PATH_INTTYPES_H in angle brackets.
7657         Reported by Mark D. Baushke <mdb@gnu.org>.
7658
7659 2006-06-17  Eric Blake  <ebb9@byu.net>
7660
7661         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7662         errno.
7663
7664 2006-06-17  Bruno Haible  <bruno@clisp.org>
7665
7666         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7667         <sys/inttypes.h>.
7668
7669 2006-06-17  Bruno Haible  <bruno@clisp.org>
7670
7671         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7672         whether errno is declared. Assume <errno.h> declares errno.
7673
7674 2006-06-17  Bruno Haible  <bruno@clisp.org>
7675
7676         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7677
7678 2006-06-17  Bruno Haible  <bruno@clisp.org>
7679
7680         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7681         problem on Solaris 2.5.1.
7682
7683 2006-06-16  Eric Blake  <ebb9@byu.net>
7684
7685         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7686         * lib/unicodeio.c [!defined errno]: Likewise.
7687         * lib/strtol.c [!defined errno]: Likewise.
7688         * lib/strtod.c [!defined errno]: Likewise.
7689
7690 2006-06-15  Eric Blake  <ebb9@byu.net>
7691
7692         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7693
7694 2006-06-15  Eric Blake  <ebb9@byu.net>
7695
7696         * config/srclist.txt (ssize_t.m4): Lose sync.
7697
7698 2006-06-15  Bruno Haible  <bruno@clisp.org>
7699
7700         * modules/stdint (Files): Include m4/full-header-path.m4,
7701         m4/size_max.m4, m4/wchar_t.m4.
7702         (Makefile.am): Many more substitutions.
7703         * modules/stdint-tests: New file.
7704         * tests/test-stdint.c: New file.
7705
7706 2006-06-15  Bruno Haible  <bruno@clisp.org>
7707
7708         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7709         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7710         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7711         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7712         gl_CHECK_TYPE_SAME): New macros.
7713
7714 2006-06-15  Bruno Haible  <bruno@clisp.org>
7715
7716         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7717
7718 2006-06-15  Bruno Haible  <bruno@clisp.org>
7719
7720         * lib/stdint_.h: Rewritten to be fully auto-configured.
7721         Fixes bug on HP-UX/IA64.
7722
7723 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7724
7725         * lib/getdate.y (__attribute__): Don't define if already defined.
7726         Problem reported by Larry Jones.
7727         * lib/utimens.c (__attribute__): Likewise.
7728
7729 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7730
7731         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7732         reported by Andreas Schwab.
7733
7734 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7735             Bruno Haible  <bruno@clisp.org>
7736
7737         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7738         check for the declaration of strnlen and a run test that exposes the
7739         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7740         rpl_strndup.
7741
7742 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7743             Bruno Haible  <bruno@clisp.org>
7744
7745         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7746
7747 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7748
7749         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7750         compile test, for Tru64 4.0D.
7751
7752 2006-05-28  Karl Berry  <karl@gnu.org>
7753
7754         * config/srclist.txt (printf-args.c): lose sync.
7755
7756 2006-05-26  Martin Lambers  <marlam@marlam.de>
7757
7758         * lib/getpass.c: Updates the test for the native W32 API, and adds
7759         missing includes, thus fixing compilation warnings.
7760
7761 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7762
7763         * lib/exclude.c (exclude_fnmatch): New function.
7764         (excluded_file_name): Call exclude_fnmatch.
7765         * lib/exclude.h (excluded_file_name): New prototype
7766
7767 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7768
7769         * lib/tempname.c (small_open, large_open): New macros.
7770         (__open, __open64) [!_LIBC]: Remove.
7771         (__gen_tempname): Use small_open and large_open instead of __open
7772         and __open64.  This fixes a portability bug on HP-UX 11.11i
7773         reported by Simon Wing-Tang in
7774         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7775
7776 2006-05-24  Bruno Haible  <bruno@clisp.org>
7777
7778         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7779         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7780         Reported by Thorsten Maerz <torte@netztorte.de> via
7781         Aaron Stone <aaron@serendipity.cx>.
7782
7783 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7784
7785         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7786         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7787         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7788         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7789         not really conditional on the cache.
7790         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7791
7792 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7793
7794         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
7795         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
7796         (my_usleep): Don't mishandle maximum value.
7797
7798 2006-05-19  Jim Meyering  <jim@meyering.net>
7799
7800         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
7801
7802 2006-05-17  Bruno Haible  <bruno@clisp.org>
7803
7804         Cygwin portability.
7805         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
7806
7807 2006-05-17  Bruno Haible  <bruno@clisp.org>
7808
7809         * lib/stdint_.h: Fix recognition of Cygwin.
7810
7811 2006-05-15  Bruno Haible  <bruno@clisp.org>
7812
7813         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
7814         on libtool patch by Ralf Wildenhues.
7815
7816 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7817
7818         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
7819         test for C99 conformance; (bool) 0.5 is an integer constant
7820         expression, but (bool) -0.5 is not.  Problem reported by Fedor
7821         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
7822
7823 2006-05-11  Simon Josefsson  <jas@extundo.com>
7824
7825         * m4/xvasprintf.m4: Fix obvious typo.
7826
7827 2006-05-11  Jim Meyering  <jim@meyering.net>
7828
7829         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
7830         James Lemley.
7831
7832 2006-05-10  Simon Josefsson  <jas@extundo.com>
7833
7834         * lib/md4.c: Typo fix, update copyright years.
7835         (K1, K2): Don't use L because it turn computations into 64-bit on
7836         64-bit platforms.
7837
7838 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
7839
7840         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
7841         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
7842         unwanted sign propagation, e.g., on hosts with 64-bit int.
7843         There still are some problems with reeelly weird theoretical hosts
7844         (e.g., 33-bit int) but it's not worth worrying about now.
7845         * lib/sha1.c (rol): Likewise.
7846         (K1, K2, K3, K4): Remove unnecessary L suffix.
7847
7848 2006-05-10  Bruno Haible  <bruno@clisp.org>
7849
7850         * lib/des.c: Cast to avoid warnings.
7851
7852 2006-05-09  Bruno Haible  <bruno@clisp.org>
7853
7854         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
7855         (Depends-on): Depend also on xsize, stdarg.
7856         (configure.ac): Add gl_XVASPRINTF.
7857
7858 2006-05-09  Bruno Haible  <bruno@clisp.org>
7859
7860         * m4/xvasprintf.m4: New file.
7861
7862 2006-05-09  Bruno Haible  <bruno@clisp.org>
7863
7864         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
7865         (EOVERFLOW): Define fallback value.
7866         (xstrcat): New function.
7867         (xvasprintf): Recognize the special case of a string concatenation.
7868
7869 2006-05-08  Eric Blake  <ebb9@byu.net>
7870
7871         * gnulib-tool (func_version): Base copyright year on CVS date.
7872         (func_emit_copyright_notice): New function.
7873         (func_emit_lib_Makefile_am): Use it.
7874         (func_emit_tests_Makefile_am): Likewise.
7875         (func_import): Likewise.
7876
7877 2006-05-08  Bruno Haible  <bruno@clisp.org>
7878
7879         * modules/stdarg: New file.
7880         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
7881
7882 2006-05-08  Bruno Haible  <bruno@clisp.org>
7883
7884         * m4/stdarg.m4: New file, from GNU gettext.
7885
7886 2006-05-08  Bruno Haible  <bruno@clisp.org>
7887
7888         * config/srclist.txt (build-aux/config.rpath): different from latest
7889         release.
7890
7891 2006-05-08  Bruno Haible  <bruno@clisp.org>
7892
7893         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
7894
7895 2006-05-05  Jim Meyering  <jim@meyering.net>
7896
7897         * m4/warning.m4: New file, derived from bison's file by the same name.
7898
7899 2006-05-03  Bruno Haible  <bruno@clisp.org>
7900
7901         * lib/stdint_.h: Shorter URL.
7902         * lib/inttypes.h: Likewise.
7903
7904 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7905
7906         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
7907
7908 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7909
7910         * lib/verify.h: Document the internals better.  Most of this change
7911         was written by Bruno Haible.
7912
7913 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7914
7915         * doc/verify.texi: New file, partly based on a proposal by
7916         Bruno Haible.
7917
7918 2006-05-02  Bruno Haible  <bruno@clisp.org>
7919
7920         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
7921         test from here...
7922         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
7923
7924 2006-04-29  Bruno Haible  <bruno@clisp.org>
7925
7926         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
7927         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
7928
7929 2006-04-29  Bruno Haible  <bruno@clisp.org>
7930
7931         * gnulib-tool: Make --update option actually work.
7932
7933 2006-04-29  Bruno Haible  <bruno@clisp.org>
7934
7935         * doc/gcd.texi: New file.
7936         * doc/gnulib.texi: Include it.
7937
7938 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7939
7940         * lib/getdate.y (get_date): When adding relative date, start with the
7941         initial time, not with the result of the first mktime call.
7942
7943 2006-04-25  Bruno Haible  <bruno@clisp.org>
7944
7945         * gnulib-tool (func_import): Output the include directives in three
7946         blocks, sorted separately.
7947         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7948
7949 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7950
7951         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
7952         to define main with arguments, for C++.  Reported by Eric Blake.
7953         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
7954         Prefer 'int main ()' to 'int main (void)', for C++.
7955         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
7956         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
7957         for 'main', for C99 and C++.
7958
7959 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7960
7961         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
7962         Don't assume that exit status -1 is valid.
7963         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7964         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
7965         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
7966         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
7967         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
7968         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
7969         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
7970         functions can be used without declaring them, or that you can
7971         exit with status -1.
7972         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
7973
7974 2006-04-24  Karl Berry  <karl@gnu.org>
7975
7976         * config/srclist.txt (longdouble.m4): sync lost.
7977
7978 2006-04-24  Eric Blake  <ebb9@byu.net>
7979
7980         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
7981
7982 2006-04-24  Bruno Haible  <bruno@clisp.org>
7983
7984         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
7985         poll() implementation in AIX.
7986         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7987
7988 2006-04-24  Bruno Haible  <bruno@clisp.org>
7989
7990         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
7991         assigned exactly once.
7992
7993 2006-04-23  Claudio Fontana  <claudio@gnu.org>
7994             Bruno Haible  <bruno@clisp.org>
7995
7996         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
7997         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
7998         for AM_CPPFLAGS.
7999
8000 2006-04-23  Bruno Haible  <bruno@clisp.org>
8001
8002         * modules/copy-file: Depend on unistd.
8003         * modules/execute: Likewise.
8004         * modules/fatal-signal: Likewise.
8005         * modules/findprog: Likewise.
8006         * modules/mkdtemp : Likewise.
8007         * modules/pipe: Likewise.
8008         * modules/wait-process: Likewise.
8009
8010 2006-04-23  Bruno Haible  <bruno@clisp.org>
8011
8012         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
8013         condition was already detected.
8014         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8015
8016 2006-04-23  Bruno Haible  <bruno@clisp.org>
8017
8018         * lib/copy-file.c: Include <unistd.h> unconditionally.
8019         * lib/execute.c: Likewise.
8020         * lib/fatal-signal.c: Likewise.
8021         * lib/findprog.c: Likewise.
8022         * lib/mkdtemp.c: Likewise.
8023         * lib/pipe.h: Likewise.
8024         * lib/pipe.c: Likewise.
8025         * lib/wait-process.h: Likewise.
8026
8027 2006-04-23  Bruno Haible  <bruno@clisp.org>
8028
8029         * gnulib-tool (func_usage): Fix --import description. Document
8030         --update.
8031         (func_import): Create temporary file in a temporary directory, if
8032         --dry-run is specified. Silence errors from 'grep' when there are no
8033         m4 files in $m4dir.
8034         (func_create_testdir): Silence errors from 'grep' when there are no
8035         m4 files in $m4dir.
8036         Reported by Karl Berry <karl@freefriends.org>.
8037
8038 2006-04-20  Bruno Haible  <bruno@clisp.org>
8039
8040         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8041         one argument, so that the code will be portable to Autoconf 2.60.
8042         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8043         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8044         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8045
8046 2006-04-19  Derek Price  <derek@ximbiot.com>
8047             Eric Blake  <ebb9@byu.net>
8048
8049         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8050         rather than "/full/path.h".  Update comment to match.  Shorten &
8051         generalize m4_translit call via AS_TR_CPP.
8052
8053 2006-04-19  Derek Price  <derek@ximbiot.com>
8054             Eric Blake  <ebb9@byu.net>
8055
8056         * lib/inttypes.h: Correct grammar in comment.
8057
8058 2006-04-18  Derek Price  <derek@ximbiot.com>
8059             Paul Eggert  <eggert@cs.ucla.edu>
8060
8061         * modules/inttypes: New file.
8062         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8063
8064 2006-04-18  Derek Price  <derek@ximbiot.com>
8065             Paul Eggert  <eggert@cs.ucla.edu>
8066
8067         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8068         New files.
8069
8070 2006-04-18  Derek Price  <derek@ximbiot.com>
8071             Paul Eggert  <eggert@cs.ucla.edu>
8072
8073         * lib/inttypes.h: New file.
8074         * lib/strtoimax.c: Assume <inttypes.h>.
8075
8076 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8077
8078         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8079         isn't mounted.  Problem reported by Kir Kolyshkin.
8080
8081 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
8082
8083         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
8084         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
8085         Derek R. Price.
8086         * lib/regex.h (RE_DUP_MAX): Update comment to match current
8087         implementation.
8088
8089 2006-04-12  Eric Blake  <ebb9@byu.net>
8090
8091         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
8092         is now done automatically by the corresponding Autoconf macro.
8093
8094 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
8095
8096         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
8097         time_r.h.
8098
8099 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8100
8101         Merge regex changes from libc, removing some of our
8102         POSIX-conformance changes that were rejected and redoing them in a
8103         less-intrusive way.
8104
8105         * lib/regcomp.c (re_compile_internal, init_dfa):
8106         Length arg is now size_t, not Idx.  All uses changed.
8107         (peek_token): Forward decl now says internal_function.
8108         (__re_error_msgid, __re_error_msgid_idx):
8109         Now static rather than extern with attribute_hidden.
8110         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
8111         For some reason libc prefers K&R style defns for external functions.
8112         (regerror) [!defined _LIBC]: Likewise.
8113         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
8114         (seek_collating_symbol_entry, lookup_collation_sequence_value):
8115         (build_range_exp, build_collating_symbol):
8116         Use K&R-style defn.
8117         (re_compile_fastmap): Use '\0' to memset, not 0.
8118         (utf8_sb_map): Make the calculations more obvious.
8119         (init_dfa, parse_bracket_exp, build_charclass_op):
8120         Call calloc and cast result, as glibc does.
8121         (init_word_char, fetch_token, peek_token, peek_token_bracket):
8122         (build_range_exp, build_collating_symbol):
8123         Now internal functions.
8124
8125         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
8126
8127         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
8128         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
8129         Don't depend on VMS; depend on __VMS instead, for POSIX
8130         namespace cleanness.
8131         (regoff_t): Define to ssize_t, not long int.
8132
8133         Remove the REG_ macros named below.  Instead, make the old names
8134         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
8135         __USE_GNU_REGEX.
8136         (REG_BACKSLASH_ESCAPE_IN_LISTS):
8137         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
8138         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
8139         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
8140         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
8141         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
8142         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
8143         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
8144         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
8145         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
8146         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
8147         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
8148         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
8149         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
8150         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
8151         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
8152         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
8153         (REG_NREGS):
8154         Remove.  All uses replaced by the old RE_* names.
8155         (RE_BACKSLASH_ESCAPE_IN_LISTS):
8156         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
8157         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
8158         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
8159         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
8160         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
8161         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
8162         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
8163         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
8164         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
8165         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
8166         Don't bother having these macros be independent of each others'
8167         values, since they no longer exist in the POSIX name space.
8168
8169         Rename the following member names back to their old names,
8170         unless !__USE_GNU_REGEX.  All uses changed back.
8171         (buffer): Renamed from re_buffer.
8172         (allocated): Renamed from re_allocated.
8173         (used): Renamed from re_used.
8174         (syntax): Renamed from re_syntax.
8175         (fastmap): Renamed from re_fastmap.
8176         (translate): Renamed from re_translate.
8177         (can_be_null): Renamed from re_can_be_null.
8178         (regs_allocated): Renamed from re_regs_allocated.
8179         (fastmap_accurate): Renamed from re_fastmap_accurate.
8180         (no_sub): Renamed from re_no_sub.
8181         (not_bol): Renamed from re_not_bol.
8182         (not_eol): Renamed from re_not_eol.
8183         (newline_anchor): Renamed from re_newline_anchor.
8184         (num_regs): Renamed from rm_num_regs.
8185         (start): Renamed from rm_start.
8186         (end): Renamed from rm_end.
8187
8188         (free_state): Move up a bit.
8189
8190         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
8191         #define to be empty.
8192         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
8193         when that is what is intended.
8194         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
8195         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
8196         (MAX): New macro.
8197         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
8198         All uses changed back to re_malloc, etc.  It's now the caller's
8199         responsibility to check for overflow; all callers changed.
8200         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
8201         (re_x2nrealloc): Remove.
8202         (free_state): Remove decl.
8203
8204         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
8205         (re_set_registers, re_exec):
8206         Use K&R-style defn.
8207
8208         2006-01-31  Roland McGrath  <roland@redhat.com>
8209
8210         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
8211         Reported by Mike Frysinger <vapier@gentoo.org>.
8212
8213         2006-01-15  Andreas Jaeger  <aj@suse.de>
8214
8215         [BZ #1950]
8216         * lib/regex_internal.c (re_string_reconstruct): Adjust for
8217         build_wcs_upper_buffer change.
8218         (build_wcs_upper_buffer): Change return type.
8219
8220         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
8221
8222         * lib/regex_internal.h: Include <stdint.h> if available.
8223
8224         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
8225
8226         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
8227
8228         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
8229
8230         * lib/regcomp.c: Adjust for changed secondary hash function.
8231
8232         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
8233
8234         * lib/regex.h: Pretty printing.
8235         Clean up namespace a bit.
8236
8237         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
8238
8239         * lib/regexec.c (update_cur_sifted_state, check_arrival,
8240         check_arrival_add_next_nodes): Avoid using uninitialized variable.
8241
8242         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8243                     Ulrich Drepper  <drepper@redhat.com>
8244
8245         [BZ #1302]
8246         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
8247         changed.
8248         (bitset_word_t): Renamed from bitset_word.  All uses changed.
8249
8250         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
8251
8252         [BZ #281]
8253         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
8254         * lib/regcomp.c: Remove unnecessary uses of
8255         unsigned RE_TRANSLATE_TYPE.
8256         * lib/regex_internal.h: Likewise.
8257         * lib/regex_internal.c: Likewise.
8258         * lib/regexec.c: Likewise.
8259         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
8260
8261         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
8262
8263         * lib/regexec.c (find_recover_state): Remove unnecessary
8264         initialization.
8265         (transit_state_bkref): Make DFA a const pointer.
8266         (get_subexp): Likewise.
8267         (check_arrival): Likewise.
8268         (update_cur_sifted_state): Likewise.
8269         (re_search_internal): Likewise.
8270         (prune_impossible_nodes): Likewise.
8271         (acquire_init_state_context): Likewise.
8272         (proceed_next_node): Likewise.
8273         (set_regs): Likewise.
8274         (free_fail_stack_return): Likewise.
8275         (check_arrival_expand_ecl): Mark DFA parameter as const.
8276         (check_arrival_expand_ecl_sub): Likewise.
8277         (check_subexp_limits): Likewise.
8278         (sub_epsilon_src_nodes):  Likewise.
8279         (add_epsilon_src_nodes):  Likewise.
8280         (merge_state_array): Likewise.
8281         (update_regs): Likewise.
8282         (build_trtable): Likewise.
8283         (sift_states_backward): Mark MCTX parameter as const.
8284         (build_sifted_states): Likewise.
8285         (update_cur_sifted_state): Likewise.
8286         (sift_states_mkref): Likewise.
8287         (check_arrival_expand_ecl): Mark eclosure as const.
8288         (check_dst_limits_calc_pos_1): Likewise.
8289         * lib/regex_internal.h (re_match_context_t): Make dfa a const
8290         pointer.
8291
8292         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
8293
8294         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
8295         (transit_state_sb): Likewise.
8296         (transit_state_mb): Likewise.
8297         (sift_states_iter_mb): Likewise.
8298         (check_arrival_add_next_nodes): Likewise.
8299         (check_node_accept_bytes): Change first parameter to pointer-to-const.
8300         [_LIBC] (re_search_2_stub): Use mempcpy.
8301
8302         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
8303         mbrtowc for very simple UTF-8 case.
8304
8305         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
8306         a pointer-to-const.
8307         (re_acquire_state_context): Likewise.
8308         * lib/regex_internal.h: Adjust prototypes.
8309
8310         * lib/regex.c: Prevent using C++ compilers.
8311
8312         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
8313         (re_acquire_state_context): Likewise.
8314
8315 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8316
8317         * modules/regex (Depends-on): Add ssize_t.
8318
8319 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8320
8321         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8322         translation table.
8323
8324 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8325
8326         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8327
8328 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8329             Bruno Haible  <bruno@clisp.org>
8330
8331         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8332         <sys/types.h> and <inttypes.h>.
8333
8334 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8335
8336         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8337         `__error_t_defined', so argp.h will not typedef the former.
8338
8339 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8340
8341         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8342         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8343         glibc names.  Even if glibc is changed to conform to POSIX, the
8344         traditional names will be available anyway, since regex depends on
8345         the extensions module.  Also, fix a longstanding typo in the
8346         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8347         reported by Emanuele Giaquinta.  Also, change sense of cached
8348         variable, so that the message makes sense.
8349
8350 2006-03-24  Simon Josefsson  <jas@extundo.com>
8351
8352         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8353         including some doc fixes.
8354         (base64_encode_alloc): Fix +1 bug on allocation failures.
8355
8356 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8357
8358         * lib/base64.c (base64_encode): Do not read past end of array with
8359         unsanitized input on systems with CHAR_BIT > 8.
8360
8361 2006-03-24  Eric Blake  <ebb9@byu.net>
8362
8363         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8364
8365 2006-03-22  Karl Berry  <karl@gnu.org>
8366
8367         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8368         * config/srclistvars.sh (COREUTILS): new var.
8369
8370 2006-03-17  Jim Meyering  <jim@meyering.net>
8371
8372         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8373         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8374
8375 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8376
8377         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8378         no longer needs it.  Instead, check that regoff_t is as least
8379         as wide as ptrdiff_t.
8380
8381         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8382         so that our regex.h stays compatible with the installed regex.
8383         This is helpful for installers who configure --without-included-regex.
8384         Problem reported by Emanuele Giaquinta.
8385
8386 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8387
8388         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8389         Typedef to long int, not to off_, as POSIX will likely change
8390         in that direction.
8391
8392 2006-03-15  Eric Blake  <ebb9@byu.net>
8393
8394         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8395
8396 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8397
8398         * lib/argp-help.c (validate_uparams): Fix typo
8399         * lib/argp-parse.c (argp_default_options): Consistently begin help
8400         messages with a lowercase letter.
8401
8402 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8403
8404         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8405         overrun buffers and shouldn't be used (much as gets shouldn't be
8406         used).
8407         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8408
8409 2006-03-08  Simon Josefsson  <jas@extundo.com>
8410
8411         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8412         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8413
8414 2006-03-08  Simon Josefsson  <jas@extundo.com>
8415
8416         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8417         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8418
8419 2006-03-08  Simon Josefsson  <jas@extundo.com>
8420
8421         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8422         signal that configure disabled the device.
8423
8424 2006-03-08  Simon Josefsson  <jas@extundo.com>
8425
8426         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8427         languages.
8428
8429 2006-03-07  Simon Josefsson  <jas@extundo.com>
8430
8431         * modules/getopt (Depends-on): Add unistd.
8432
8433         * modules/unistd: New file.
8434
8435 2006-03-07  Simon Josefsson  <jas@extundo.com>
8436
8437         * modules/gc-random: New file.
8438
8439 2006-03-07  Simon Josefsson  <jas@extundo.com>
8440
8441         * m4/unistd_h.m4: New file.
8442
8443 2006-03-07  Simon Josefsson  <jas@extundo.com>
8444
8445         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8446         test to be side-effect free by storing the result in the cache
8447         variable gl_cv_lib_readline, and moving the assignment of
8448         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8449         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8450
8451 2006-03-07  Simon Josefsson  <jas@extundo.com>
8452
8453         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8454         error on missing devices (the functions will return an error).
8455
8456         * m4/gc.m4: Move random stuff to gc-random.m4
8457
8458 2006-03-07  Simon Josefsson  <jas@extundo.com>
8459
8460         * lib/unistd_.h: New file.
8461
8462 2006-03-07  Simon Josefsson  <jas@extundo.com>
8463
8464         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8465
8466 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8467
8468         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8469         Problem reported by Juan Manuel Guerrero.
8470
8471 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8472
8473         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8474         the unistd module.
8475         * lib/getlogin_r.c: Likewise.
8476         * lib/getlogin_r.h: Likewise.
8477         * lib/glob.c: Likewise.
8478         * lib/pagealign_alloc.c: Likewise.
8479         * lib/unistd_.h: Remove; no longer needed.
8480
8481 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8482
8483         * MODULES.html.sh (Support for systems lacking POSIX:2001):
8484         Add unistd.
8485         * modules/c-stack (Depends-on): Add unistd.
8486         * modules/getlogin_r: Likewise.
8487         * modules/glob: Likewise.
8488         * modules/pagealign_alloc: Likewise.
8489         * modules/unistd (Files): Remove lib/unistd_.h.
8490         (EXTRA_DIST): Remove.
8491         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
8492         need unistd_.h.
8493         (MOSTLYCLEANFILES): Remove unistd.h-t.
8494
8495 2006-03-03  Simon Josefsson  <jas@extundo.com>
8496
8497         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
8498
8499 2006-03-03  Simon Josefsson  <jas@extundo.com>
8500
8501         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
8502         libidn and bison.
8503
8504 2006-03-03  Simon Josefsson  <jas@extundo.com>
8505
8506         * build-aux/maint.mk: Add indent target.
8507
8508 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
8509
8510         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
8511         our replacement poll.h in any case, to avoid a differing
8512         declaration from a system header.  Seen on AIX.
8513
8514 2006-03-01  Simon Josefsson  <jas@extundo.com>
8515
8516         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
8517         <kasal@ucw.cz>.
8518
8519 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8520
8521         * modules/gettime (Depends-on): Add extensions module.
8522         * modules/nanosleep (Depends-on): Likewise.
8523         * modules/settime (Depends-on): Likewise.
8524
8525 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8526
8527         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8528         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8529         pedantically.
8530         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8531         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8532
8533         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8534         not "==".  Reported by Ralf Wildenhues.
8535
8536 2006-03-01  Karl Berry  <karl@gnu.org>
8537
8538         * doc/Copyright/request-*: new files, synced from gnuorg.
8539
8540 2006-03-01  Karl Berry  <karl@gnu.org>
8541
8542         * config/srclist.txt (Copyright/*): new entries.
8543
8544 2006-02-28  Simon Josefsson  <jas@extundo.com>
8545
8546         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8547
8548 2006-02-27  Simon Josefsson  <jas@extundo.com>
8549
8550         * lib/base64.h: Indent #define's.  From Jim Meyering
8551         <jim@meyering.net>.
8552
8553 2006-02-27  Jim Meyering  <jim@meyering.net>
8554
8555         Revert the change of 2006-02-24, so these files can continue
8556         to be sync'd from gettext.
8557         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8558         of `config.h'.
8559
8560 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8561
8562         * modules/intprops: New file.
8563         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8564         Add intprops.
8565         * modules/getloadavg (Files): Remove lib/intprops.h.
8566         (Depends-on): Add intprops.
8567         * modules/human: Likewise.
8568         * modules/inttostr: Likewise.
8569         * modules/openat: Likewise.
8570         * modules/sig2str: Likewise.
8571         * modules/userspec: Likewise.
8572         * modules/utimecmp: Likewise.
8573         * modules/xnanosleep: Likewise.
8574         * modules/xstrtol: Likewise.
8575
8576 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8577
8578         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8579         * modules/lock-tests (TESTS): Use $(EXEEXT).
8580         * modules/tls-tests: Likewise.
8581         * modules/argp-tests: Likewise.
8582         (check_PROGRAMS): New var, replacing...
8583         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8584
8585 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8586
8587         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8588         `config.h'.
8589
8590 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8591
8592         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8593
8594 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8595
8596         Sync from coreutils.
8597         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8598         gl_CHDIR_SAFER.
8599
8600 2006-02-22  Jim Meyering  <jim@meyering.net>
8601
8602         Sync from coreutils.
8603         * m4/chdir-safer.m4: New file.
8604
8605 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8606
8607         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8608         AT_FDCWD exceeds INT_MAX.
8609         * lib/openat.h (AT_FDCWD): Likewise.
8610
8611 2006-02-17  Eric Blake  <address@hidden>
8612
8613         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8614
8615 2006-02-16  Simon Josefsson  <jas@extundo.com>
8616
8617         * modules/getaddrinfo (Depends-on): Add sys_socket.
8618
8619 2006-02-15  Simon Josefsson  <jas@extundo.com>
8620
8621         * build-aux/maint.mk: Add dsyntax-check rule.
8622
8623 2006-02-15  Eric Blake  <ebb9@byu.net>
8624
8625         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8626         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8627         'present but cannot compile' warnings on cygwin.
8628         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8629         use ws2tcpip.h if sys/socket.h works.
8630         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8631         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8632
8633 2006-02-14  Simon Josefsson  <jas@extundo.com>
8634
8635         * modules/maintainer-makefile (Files): Rename.
8636
8637         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8638         and (the local) Makefile.cfg to maint-cfg.mk.
8639
8640         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8641         to the latter.
8642
8643         * modules/maintainer-makefile: New module.
8644
8645         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8646         severaly stripped to make it possible to build it up from scratch
8647         with reliable tests.
8648
8649         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8650         fixes to permit overriding the default actions when configure and
8651         makefile are not available.
8652
8653 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8654
8655         Sync from coreutils.
8656         * modules/lstat (Depends-on): Don't depend on xalloc.
8657         (License): Change from GPL to LGPL, since this is now simply a
8658         replacement for a libc function.
8659
8660 2006-02-14  Jim Meyering  <jim@meyering.net>
8661
8662         Sync from coreutils.
8663
8664         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8665         failure on deficient systems, and simplify gnulib lgpl dependencies.
8666         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8667         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8668
8669         * lib/xalloc-die.c: Remove unused definition of N_.
8670
8671 2006-02-14  Jim Meyering  <jim@meyering.net>
8672
8673         Sync from coreutils.
8674         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8675         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8676         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8677         double-quote uses of that variable, to accommodate the rare case in
8678         which getmntent is available in none of the libraries checked.  This
8679         happens at least on FreeBSD 5.0.
8680
8681 2006-02-13  Simon Josefsson  <jas@extundo.com>
8682
8683         * gnulib-tool (Usage): Fix --import, from
8684         karl@freefriends.org (Karl Berry).
8685
8686 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8687
8688         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8689
8690 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8691
8692         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8693         "autoupdate" on 2005-12-12.
8694
8695 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8696
8697         * modules/closeout (Depends-on): Remove atexit.
8698
8699 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8700
8701         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8702         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8703
8704 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8705
8706         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8707         __EXTENSIONS__ if this causes compilation to fail.  Problem
8708         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8709         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8710
8711 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8712
8713         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8714         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8715         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8716         All uses changed.
8717
8718 2006-01-26  Simon Josefsson  <jas@extundo.com>
8719
8720         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8721         prototype is visible on mingw32.
8722
8723         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8724         for mingw32.
8725
8726         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8727         mingw32).
8728
8729 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8730
8731         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8732         attempt to open for write; this always fails, at least on POSIX
8733         hosts.  This reinstates the 2006-01-09 change, which was
8734         inadvertently removed.
8735
8736 2006-01-26  Bruno Haible  <bruno@clisp.org>
8737
8738         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8739         Reported by Paul Eggert.
8740
8741 2006-01-26  Bruno Haible  <bruno@clisp.org>
8742             Paul Eggert  <eggert@cs.ucla.edu>
8743
8744         * lib/stdbool_.h (_Bool)
8745         [(! (defined __cplusplus || defined __BEOS__)
8746           && !defined __GNUC__
8747           && !(defined __HP_cc || defined __xlc__
8748                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8749                || defined __sgi))]:
8750         #define to signed char in these cases too; this simplifies
8751         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8752         etc., separately) and makes it more conservative.
8753
8754 2006-01-25  Simon Josefsson  <jas@extundo.com>
8755
8756         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8757         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8758         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8759
8760 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8761
8762         * lib/argp-namefrob.h: Bugfix. Remove stray #
8763
8764 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8765
8766         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8767         so that we test the test.
8768         Check for yet another HP-UX cc bug involving *bool |= bool.
8769
8770 2006-01-25  Karl Berry  <karl@gnu.org>
8771
8772         * config/srclist.txt (vasnprintf.c): sync lost.
8773
8774 2006-01-25  Jim Meyering  <jim@meyering.net>
8775
8776         Sync from the stable (b5) branch of coreutils:
8777
8778         * lib/fts.c (fts_children): Don't let close() clobber errno from
8779         failed fchdir().
8780
8781         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8782         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8783         a dangling symlink.  That can also happen at least for ELOOP.
8784         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8785         FYI, this bug predates the inclusion of fts.c in coreutils.
8786
8787         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8788         in their own block, so pre-c99 compilers don't object.
8789
8790         Avoid the double-free (first in fts_read, second in fts_close) that
8791         would occur when an `active' directory is made inaccessible (e.g.,
8792         via chmod a-x) during a traversal.
8793         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8794         before returning.  Reproduce this failure by
8795         mkdir -p a/b; cd a; chmod a-x . b
8796         Reported by Stavros Passas.
8797
8798 2006-01-25  Jim Meyering  <jim@meyering.net>
8799
8800         * lib/fileblocks.c: Remove more useless parentheses.
8801         * lib/readutmp.h: Likewise.
8802
8803 2006-01-25  Bruno Haible  <bruno@clisp.org>
8804
8805         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
8806         warnings.
8807         Reported by Paul Eggert.
8808
8809 2006-01-25  Bruno Haible  <bruno@clisp.org>
8810
8811         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
8812         rid of a trap command. For Solaris sh.
8813         Reported by Mark D. Baushke <mdb@gnu.org>.
8814
8815 2006-01-24  Simon Josefsson  <jas@extundo.com>
8816
8817         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
8818         Bruno.
8819
8820 2006-01-24  Karl Berry  <karl@gnu.org>
8821
8822         * config/srclist.txt (argp-namefrob.h): sync lost.
8823
8824 2006-01-24  Jim Meyering  <jim@meyering.net>
8825
8826         * modules/openat (Files): Add lib/intprops.h.
8827         From Mark D. Baushke.
8828
8829 2006-01-24  Jim Meyering  <jim@meyering.net>
8830
8831         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
8832         Reported by Mark D. Baushke.
8833
8834 2006-01-24  Jim Meyering  <jim@meyering.net>
8835
8836         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
8837
8838 2006-01-24  Bruno Haible  <bruno@clisp.org>
8839
8840         * modules/strnlen (Maintainer): Change from glibc to all.
8841
8842 2006-01-24  Bruno Haible  <bruno@clisp.org>
8843
8844         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
8845         Patch by Paul Eggert.
8846
8847 2006-01-24  Bruno Haible  <bruno@clisp.org>
8848
8849         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
8850         already has it.
8851         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
8852         2005-11-26.
8853
8854         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
8855         'signed char' to avoid problems with the built-in _Bool type.
8856         Reported by Paul Eggert on 2005-11-26.
8857
8858 2006-01-24  Bruno Haible  <bruno@clisp.org>
8859
8860         * gnulib-tool (func_import): Avoid constructing complicated sed
8861         expressions inside backquote.
8862         Report and solution by Mark D. Baushke <mdb@gnu.org>.
8863
8864 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
8865
8866         These changes imported from libc.
8867         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
8868         test and two separate function calls.
8869         * lib/strndup.c (__strndup): Add libc_hidden_def.
8870
8871 2006-01-23  Simon Josefsson  <jas@extundo.com>
8872
8873         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
8874         Remove the test_*_SOURCES variable: automake infers it by default.
8875         * modules/tls-tests: Likewise.
8876
8877 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8878
8879         Work around porting bugs reported by Dieter in
8880         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
8881         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
8882         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
8883         Include "getopt.h" first, to check interface.
8884         (getenv): Declare only if defined HAVE_DECL_GETENV &&
8885         !HAVE_DECL_GETENV.
8886         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
8887         (__strndup): Revert to K&R-style function dfns, the glibc style.
8888         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
8889         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
8890         Include strnlen.h first, to get prototype properly.
8891         (strnlen): Renamed from __strnlen.
8892         Remove weak alias.
8893
8894 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8895
8896         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
8897
8898 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8899
8900         * config/srclist.txt: Adjust to reflect glibc reorganization.
8901         This affects only comments.
8902
8903 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8904
8905          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
8906          Reported by Bruce Korb <bkorb@gnu.org>.
8907
8908 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
8909
8910         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
8911         to pacify gcc -Wswitch-default.
8912
8913 2006-01-22  Bruno Haible  <bruno@clisp.org>
8914
8915         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
8916         temporary buffer for sprintf, take into account the precision also
8917         for 'd', 'i', 'u', 'o', 'x', 'X'.
8918
8919 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8920
8921         * modules/argp-tests: New module
8922         * tests/test-argp.c: New file
8923         * tests/test-argp-2.sh: New file
8924
8925 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8926
8927         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
8928         (__argp_base_name): Removed
8929         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
8930         typo.
8931         (__argp_base_name): Provide macro definition or extern declaration
8932         depending on the configuration
8933
8934 2006-01-20  Simon Josefsson  <jas@extundo.com>
8935
8936         * modules/inet_ntop (Depends-on): Depend on sys_socket.
8937
8938 2006-01-20  Simon Josefsson  <jas@extundo.com>
8939
8940         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
8941
8942 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
8943
8944         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
8945         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
8946         Suggested by Bruno Haible.
8947
8948 2006-01-20  Karl Berry  <karl@gnu.org>
8949
8950         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
8951         until changes propagate, I guess.
8952
8953 2006-01-19  Simon Josefsson  <jas@extundo.com>
8954
8955         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
8956
8957 2006-01-19  Simon Josefsson  <jas@extundo.com>
8958
8959         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
8960
8961 2006-01-19  Simon Josefsson  <jas@extundo.com>
8962
8963         * gnulib-tool: Set check_PROGRAMS.
8964
8965         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8966         modules/des-tests, modules/gc-arcfour-tests,
8967         modules/gc-arctwo-tests, modules/gc-des-tests,
8968         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8969         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8970         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8971         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8972         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8973         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
8974         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
8975         test_*_SOURCES.
8976
8977 2006-01-18  Simon Josefsson  <jas@extundo.com>
8978
8979         * modules/socklen (Depends-on): Depend on sys_socket.
8980
8981 2006-01-18  Simon Josefsson  <jas@extundo.com>
8982
8983         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8984         modules/des-tests, modules/gc-arcfour-tests,
8985         modules/gc-arctwo-tests, modules/gc-des-tests,
8986         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8987         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8988         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8989         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8990         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8991         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
8992         $(EXEEXT) to automake TESTS variable, for mingw32.
8993
8994 2006-01-17  Simon Josefsson  <jas@extundo.com>
8995
8996         * modules/socklen (Include): Need sys/socket.h.
8997
8998 2006-01-17  Bruno Haible  <bruno@clisp.org>
8999
9000         * modules/ssize_t (Include): Add <sys/types.h>.
9001
9002 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
9003
9004         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
9005         it's not portable and it doesn't work with cross-compiles.
9006         Problem reported by Bruno Haible.  Fix missing-$ typo in
9007         'test "gl_cv_ignore_unused_libraries" ...' that prevented
9008         -zignore from being used with Sun's C compiler.
9009
9010 2006-01-12  Simon Josefsson  <jas@extundo.com>
9011
9012         * lib/base64.c: Fix warning, reported by Bruno Haible
9013         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
9014
9015 2006-01-12  Bruno Haible  <bruno@clisp.org>
9016
9017         * modules/ldd: New file.
9018         * build-aux/ldd.sh.in: New file.
9019         * MODULES.html.sh (Support for building libraries and executables): Add
9020         ldd.
9021
9022 2006-01-12  Bruno Haible  <bruno@clisp.org>
9023
9024         * m4/ldd.m4: New file.
9025
9026 2006-01-12  Bruno Haible  <bruno@clisp.org>
9027
9028         * gnulib-tool (func_import, func_create_testdir): Don't go into an
9029         endless loop while replacing $auxdir with build-aux.
9030
9031 2006-01-11  Simon Josefsson  <jas@extundo.com>
9032
9033         * lib/stdint_.h (SIZE_MAX): Add missing (.
9034
9035 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
9036
9037         Sync from coreutils.
9038         * lib/md5.c: Fix commentary typos.
9039         (alignof, UNALIGNED_P): No need for a GCC-specific version.
9040         * lib/md5.h (__attribute__): Remove; unused.
9041         * lib/sha1.c: Fix commentary to match md5 better.
9042         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9043         so that we don't need to worry about alignment.  All uses changed.
9044         This merges the 2005-10-28 md5 change into sha1.
9045
9046 2006-01-11  Jim Meyering  <jim@meyering.net>
9047
9048         Sync from coreutils.
9049         * lib/md5.c (OP): Fix spacing.
9050
9051 2006-01-11  Bruno Haible  <bruno@clisp.org>
9052
9053         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9054         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9055         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9056
9057 2006-01-11  Bruno Haible  <bruno@clisp.org>
9058
9059         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9060         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9061         the "early" section as well.
9062
9063 2006-01-11  Bruno Haible  <bruno@clisp.org>
9064
9065         Avoid "ar: no archive members specified" error on MacOS X.
9066         * gnulib-tool (func_modules_add_dummy): New function.
9067         (func_import, func_create_testdir): Invoke it.
9068
9069 2006-01-11  Bruno Haible  <bruno@clisp.org>
9070
9071         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9072         with $auxdir in AC_CONFIG_FILES statements.
9073
9074 2006-01-11  Bruno Haible  <bruno@clisp.org>
9075
9076         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9077         Initialize also noinst_HEADERS to empty.
9078
9079 2006-01-11  Bruno Haible  <bruno@clisp.org>
9080
9081         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
9082         variables.
9083         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
9084         autoreconf.
9085
9086 2006-01-11  Bruno Haible  <bruno@clisp.org>
9087
9088         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
9089         overridable by the user.
9090         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9091
9092 2006-01-10  Simon Josefsson  <jas@extundo.com>
9093
9094         * modules/sys_socket: New file.
9095
9096 2006-01-10  Simon Josefsson  <jas@extundo.com>
9097
9098         * m4/sys_socket_h.m4: New file.
9099
9100 2006-01-10  Simon Josefsson  <jas@extundo.com>
9101
9102         * lib/socket_.h: New file.
9103
9104 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9105
9106         * modules/readutmp (Maintainer): Add myself.
9107
9108 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9109
9110         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
9111         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
9112         People who are still concerned with buggy memcmp implementations
9113         can invoke gl_FUNC_MEMCMP themselves.
9114
9115 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9116
9117         * lib/regex_internal.h (BITSET_WORD_BITS):
9118         Work around a bug in 64-bit PGC (before version 6.1-2), where the
9119         preprocessor mishandles large unsigned values as if they were signed.
9120         Problem reported by Claudio Fontana in
9121         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
9122
9123 2006-01-10  Jim Meyering  <jim@meyering.net>
9124
9125         Avoid the double-free (first in fts_read, second in fts_close) that
9126         would occur when an `active' directory is made inaccessible (e.g.,
9127         via chmod a-x) during a traversal.
9128         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9129         before returning.  Reproduce this failure by
9130         mkdir -p a/b; cd a; chmod a-x . b
9131         Reported by Stavros Passas.
9132
9133         Sync from coreutils.
9134         * lib/sha1.c: Tweak grammar in a comment.
9135
9136 2006-01-10  Jim Meyering  <jim@meyering.net>
9137
9138         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
9139         Patch by Joerg Sonnenberger.
9140
9141 2006-01-10  Bruno Haible  <bruno@clisp.org>
9142
9143         * modules/readutmp: Depend on module free.
9144         * modules/strtok_r: Depend on module restrict.
9145
9146 2006-01-10  Bruno Haible  <bruno@clisp.org>
9147
9148         * modules/gettext (configure.ac): Add an invocation of
9149         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
9150
9151 2006-01-10  Bruno Haible  <bruno@clisp.org>
9152
9153         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
9154         Reported by Werner Lemberg <wl@gnu.org>.
9155
9156 2006-01-10  Bruno Haible  <bruno@clisp.org>
9157
9158         * lib/localcharset.c: Update from GNU gettext.
9159
9160 2006-01-10  Bruno Haible  <bruno@clisp.org>
9161
9162         * lib/argp.h (__const): Remove macro. Use const instead.
9163         * lib/argp-fmtstream.h (__const): Likewise.
9164         * lib/glob_.h (__const): Remove macro.
9165         * lib/glob-libc.h: Use const instead of __const.
9166
9167 2006-01-10  Bruno Haible  <bruno@clisp.org>
9168
9169         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
9170         variable.
9171         Needed to avoid an automake error regarding the 'gettext' module.
9172
9173 2006-01-09  Simon Josefsson  <jas@extundo.com>
9174
9175         * modules/inet_ntop (Depends-on): Add restrict.
9176
9177 2006-01-09  Simon Josefsson  <jas@extundo.com>
9178
9179         * modules/gc-rijndael-tests (License): Put under LGPL.
9180
9181         * modules/gc-des-tests (License): Likewise.
9182
9183         * modules/gc-arcfour-tests (License): Likewise.
9184
9185         * modules/gc-arctwo-tests (License): Likewise.
9186
9187         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
9188
9189         * modules/gc-hmac-sha1-tests (Files): Likewise.
9190
9191         * modules/gc-hmac-md5-tests (License): Likewise.
9192
9193         * modules/gc-sha1-tests (License): Likewise.
9194
9195         * modules/gc-md5-tests (License): Likewise.
9196
9197         * modules/gc-md4-tests (License): Likewise.
9198
9199         * modules/gc-md2-tests (License): Likewise.
9200
9201         * modules/gc-tests (License): Likewise.
9202
9203         * modules/des-tests (License): Likewise.
9204
9205         * modules/md4-tests (License): Likewise.
9206
9207         * modules/md2-tests (License): Likewise.
9208
9209 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9210
9211         Sync from coreutils:
9212
9213         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
9214         * modules/lib-ignore: New file.
9215         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
9216         chdir-safer.m4, lchmod.m4.
9217         * modules/openat: Add mkdirat.c, openat-priv.h.
9218
9219 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9220
9221         Sync from coreutils.
9222         * m4/lib-ignore.m4: New file.
9223         * m4/lchmod.m4: New file.
9224
9225 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9226
9227         Sync from coreutils.
9228         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
9229         for write access: POSIX says that must fail.
9230         * lib/fts.c (diropen): Likewise.
9231         * lib/save-cwd.c (save_cwd): Likewise.
9232         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
9233         well, for minor improvements on hosts that lack O_DIRECTORY.
9234         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
9235         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
9236         Fall back on chown if open failed with EACCES.
9237
9238         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
9239         Report an error at compile-time if only a 1-second nominal clock
9240         resolution is found.
9241
9242         * lib/lchmod.h: New file.
9243         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
9244         (make_dir_parents): Use lchown rather than chown, and
9245         lchmod rather than chmod.
9246
9247         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
9248         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
9249         "proc" reported by n0dalus.
9250
9251         * lib/mountlist.c: Include <limits.h>.
9252         (dev_from_mount_options)
9253         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
9254         New function.  It no longer assumes "dev=" has the System V meaning
9255         on Linux (since it doesn't).  It also parses "dev=" more carefully.
9256         (read_file_system_list)
9257         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
9258         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
9259         dev= in that case.
9260
9261         * lib/posixtm.h (PDS_PRE_2000): New macro.
9262         * lib/posixtm.c (year): Arg is now syntax_bits rather than
9263         allow_century.  All usages changed.  Reject dates outside the range
9264         1969-1999 if PDS_PRE_2000 is used.
9265
9266 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9267
9268         Sync from coreutils.
9269         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
9270         (Time of day items): Mention the possibility of leap seconds.
9271         Problem reported by Dr. David Alan Gilbert.
9272
9273 2006-01-09  Jim Meyering  <jim@meyering.net>
9274
9275         Sync from coreutils.
9276
9277         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
9278
9279         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
9280
9281         * lib/modechange.c (mode_compile): Reject an invalid mode string
9282         that starts with an octal digit.  From Andreas Gruenbacher.
9283
9284         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
9285         and dup to open_safer and dup_safer, respectively.
9286         (openat_permissive): Fix typo in comment.
9287
9288         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
9289         "gettext.h"; either no longer needed or are guaranteed by openat.h.
9290         (_): Remove; no longer needed.
9291         (openat): Renamed from rpl_openat; no need for rpl_openat
9292         since openat.h renames openat for us.
9293         Replace most of the body with a call to openat_permissive,
9294         to avoid duplicate code.
9295         Port to (probably hypothetical) environments were mode_t is
9296         wider than int.
9297         (openat_permissive): Require mode arg, so that we can check
9298         types better.  Put it just after flags.  Change cwd failure
9299         indicator from pointer-to-bool to pointer-to-errno-value.
9300         All callers changed.
9301         Invoke openat_save_fail and/or openat_restore_fail if
9302         cwd_errno is null, so that openat can call us.
9303         (openat_permissive, fdopendir, fstatat, unlinkat):
9304         Simplify errno handling to avoid some duplicate code,
9305         as it's OK to set errno on success.
9306         * lib/openat.h: Revamp code so that function macros depend on
9307         __OPENAT_PREFIX only, not also on AT_FDCWD.
9308         (openat_ro): Remove.  Caller changed to use openat_permissive.
9309         (openat_permissive): Now a macro, if not a function.
9310         (openat_restore_fail, openat_save_fail): Now always functions,
9311         since mkdirat needs them even if __OPENAT_PREFIX is defined.
9312
9313         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
9314         and openat.c.
9315         * lib/mkdirat.c: Include openat-priv.h.
9316         Remove definitions of macros defined therein.
9317         * lib/openat.c: Likewise.
9318
9319         * lib/mkdirat.c (mkdirat): New file and function.
9320         * lib/openat.h (mkdirat): Declare.
9321
9322         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9323
9324         * lib/openat.h (openat_permissive): Declare.
9325         (openat_ro): Define.
9326
9327         * lib/openat.c (EXPECTED_ERRNO): New macro.
9328         (openat_permissive): New function -- used in remove.c rewrite.
9329         (all functions): Set errno just before returning, only if there
9330         was an actual failure.
9331         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9332
9333         Emulate openat-family functions using Linux's procfs, if possible.
9334         Idea and some code based on Ulrich Drepper's glibc changes.
9335
9336         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9337         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9338         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9339         before falling back on save_cwd and restore_cwd.
9340         (fdopendir, fstatat, unlinkat): Likewise.
9341
9342         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9343         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9344
9345         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9346         as second argument to va_arg.  Otherwise, some versions of gcc
9347         warn that `if this code is reached, the program will abort'.
9348
9349 2006-01-09  Jim Meyering  <jim@meyering.net>
9350
9351         Sync from coreutils.
9352         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9353         Require openat-priv.h.
9354
9355 2006-01-09  Bruno Haible  <bruno@clisp.org>
9356
9357         * modules/strnlen (Include): Use strnlen.h.
9358
9359 2006-01-09  Bruno Haible  <bruno@clisp.org>
9360
9361         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9362
9363 2006-01-09  Bruno Haible  <bruno@clisp.org>
9364
9365         * lib/sysexit_.h (EX_OK): New macro.
9366         Suggested by Martin Lambers <marlam@marlam.de>.
9367
9368 2006-01-09  Bruno Haible  <bruno@clisp.org>
9369
9370         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9371         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9372
9373 2006-01-09  Bruno Haible  <bruno@clisp.org>
9374
9375         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9376         numbers.
9377
9378 2006-01-09  Bruno Haible  <bruno@clisp.org>
9379
9380         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9381         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9382         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9383         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9384
9385 2006-01-09  Bruno Haible  <bruno@clisp.org>
9386
9387         * build-aux/javacomp.sh.in: New file, moved from lib/.
9388         * modules/javacomp-script (Files): Update.
9389         (configure.ac): Add AC_CONFIG_FILES invocation.
9390         (EXTRA_DIST): Remove variable.
9391
9392         * build-aux/javaexec.sh.in: New file, moved from lib/.
9393         * modules/javaexec (Files): Update.
9394         (configure.ac): Add AC_CONFIG_FILES invocation.
9395         (EXTRA_DIST): Remove javaexec.sh.in.
9396
9397         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9398         * modules/csharpcomp-script (Files): Update.
9399         (configure.ac): Add AC_CONFIG_FILES invocation.
9400         (EXTRA_DIST): Remove variable.
9401
9402         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9403         * modules/csharpexec (Files): Update.
9404         (configure.ac): Add AC_CONFIG_FILES invocation.
9405         (EXTRA_DIST): Remove csharpexec.sh.in.
9406
9407 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9408
9409         Sync from coreutils.
9410
9411         Add POSIX ACL support
9412         * lib/acl.h (copy_acl, set_acl): Add declarations.
9413         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9414         systems other than Linux.
9415         (chmod_or_fchmod): New function: use fchmod when possible,
9416         and chmod otherwise.
9417         (file_has_acl): Add a POSIX ACL implementation, with a
9418         Linux-specific subcase.
9419         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9420         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9421         acls are unsupported.
9422         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9423         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9424         are unsupported.
9425
9426 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9427
9428         Sync from coreutils.
9429         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9430
9431 2006-01-07  Bruno Haible  <bruno@clisp.org>
9432
9433         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9434         gl_EARLY.
9435
9436 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9437
9438         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9439         Problem reported for Mingw by Mark Junker.
9440
9441 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9442
9443         * README: Gnulib normally doesn't generate a tarball.
9444
9445 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9446
9447         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9448         long int, not int, for nanosecond counts, so that people who are
9449         used to POSIX struct timespec won't be surprised.  Reported by Jim
9450         Meyering.
9451
9452 2005-12-28  Bruno Haible  <bruno@clisp.org>
9453
9454         * build-aux/config.rpath: Update from GNU gettext.
9455
9456 2005-12-16  Jim Meyering  <jim@meyering.net>
9457
9458         * modules/fprintftime: New module.
9459         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
9460
9461 2005-12-16  Jim Meyering  <jim@meyering.net>
9462
9463         * m4/fprintftime.m4: New file.
9464
9465 2005-12-16  Jim Meyering  <jim@meyering.net>
9466
9467         * lib/fprintftime.c, lib/fprintftime.h: New files.
9468
9469 2005-12-15  Simon Josefsson  <jas@extundo.com>
9470
9471         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9472         new m4/socklen.m4.
9473
9474 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9475
9476         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9477         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9478
9479 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9480
9481         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
9482         * lib/argp-help.c (fill_in_uparams): Check if the constructed
9483         struct uparams is valid. Fall back to the default values if it is
9484         not.
9485
9486 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9487
9488         * modules/argp (Files): Add argp-pin.c
9489         (Depends-on): dirname
9490         (lib_SOURCES): Add argp-pin.c
9491
9492 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9493
9494         * m4/argp.m4:  Check if program_invocation_name and
9495         program_invocation_short_name are declared and define appropriate
9496         macros if they are not.
9497
9498 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9499
9500         * lib/argp-help.c (__argp_base_name): New function
9501         (__argp_short_program_name): Rewrite using __argp_base_name
9502         * lib/argp-namefrob.h: Define program_invocation_name and
9503         program_invocation_short_name if requested
9504         (__argp_base_name): Add prototype
9505         * lib/argp-parse.c (argp_def): Use gettext wrappers
9506         (argp_default_parser): Use __argp_base_name
9507         * lib/argp-pin.c: New file. Defines program_invocation_name and
9508         program_invocation_short_name on systems that lack them.
9509
9510 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9511
9512         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
9513         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9514         porting problem reported by Georg Schwarz in
9515         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9516
9517 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9518
9519         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
9520         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9521         porting problem reported by Georg Schwarz in
9522         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9523
9524 2005-12-05  Bruno Haible  <bruno@clisp.org>
9525
9526         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9527         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9528         Reported by Mark Junker <mjscod@gmx.de>.
9529
9530 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9531
9532         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9533         Use implementation from Albert Chin, with some
9534         comments/corrections by Stepan Kasal and myself.
9535
9536 2005-12-02  Bruno Haible  <bruno@clisp.org>
9537
9538         * gnulib-tool (func_import): Accept GPLed build tool modules when
9539         --lgpl is given.
9540         * modules/csharpcomp-script: New file.
9541         * modules/csharpcomp: Depend on it.
9542         * modules/javacomp-script: New file.
9543         * modules/javacomp: Depend on it.
9544         Suggested by Simon Josefsson.
9545
9546 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9547
9548         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9549         statement, to work around an HP-UX 10.20 compiler bug reported by
9550         Peter O'Gorman.
9551
9552 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9553
9554         * modules/savedir (Depends-on): Add openat.
9555
9556 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9557
9558         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9559         (uintmax_t) [defined uintmax_t]: Do not declare.
9560         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9561         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9562         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9563         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9564         sake of portability to weird hosts that C allows (though we don't
9565         know of any practical examples).
9566
9567         * lib/savedir.h (fdsavedir): New decl.
9568         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9569         contains most of the former guts of savedir.
9570         (savedir): Use savedirstream.
9571         Include "openat.h".
9572
9573 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9574
9575         * modules/obstack (Files): Add m4/ulonglong.m4.
9576         Problem reported by Davide Angelocola.
9577
9578 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9579
9580         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9581         coreutils no longer futzes with rounding modes.
9582
9583 2005-11-14  Jim Meyering  <jim@meyering.net>
9584
9585         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9586         replacement of mkstemp.
9587
9588 2005-11-10  Simon Josefsson  <jas@extundo.com>
9589
9590         * lib/readline.c: Remove EOL.
9591
9592 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9593
9594         * modules/gethrxtime (Depends-on): Add gettime.
9595
9596 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9597
9598         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9599         or gettimeofday; no longer needed.
9600
9601 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9602
9603         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9604         time business.
9605         (gethrxtime) [! (HAVE_NANOUPTIME
9606         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9607         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9608         our own approximation.
9609
9610 2005-11-08  Eric Blake  <ebb9@byu.net>
9611
9612         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9613
9614 2005-11-08  Eric Blake  <ebb9@byu.net>
9615
9616         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9617
9618 2005-11-04  Bruno Haible  <bruno@clisp.org>
9619
9620         * gnulib-tool: Implement --update mode.
9621
9622 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9623
9624         Fix porting problem reported by Theodoros V. Kalamatianos.
9625         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9626         Don't assume that futimes failing means we must fail.
9627
9628 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9629
9630         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9631         variables to suggest the intended function of the PATH_MAX check.
9632
9633 2005-10-30  Kean Johnston  <jkj@sco.com>
9634
9635         Trivial changes to support SCO systems.
9636         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9637         as PATH_MAX.
9638         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9639         where __ptr is null when no I/O is pending.
9640
9641 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9642
9643         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9644         leave errno alone.  Problem reported by Dmitry V. Levin.
9645
9646 2005-10-28  Simon Josefsson  <jas@extundo.com>
9647
9648         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9649         Test more.
9650
9651         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9652
9653         * modules/md2, modules/md2-tests: New files.
9654
9655 2005-10-28  Simon Josefsson  <jas@extundo.com>
9656
9657         * m4/inet_ntop.m4: More tests.
9658
9659         * m4/gc-md2.m4, md2.m4: New file.
9660
9661 2005-10-28  Simon Josefsson  <jas@extundo.com>
9662
9663         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9664         "restrict" keywords, as per POSIX.  Protect the function
9665         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9666         Don't use K&R prototypes.  Check the sprintf return values.
9667         Re-define EAFNOSUPPORT if not present.  Indent.
9668
9669         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9670         suggested by Bruno Haible <bruno@clisp.org>.
9671
9672         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9673
9674         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9675
9676         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9677         libgcrypt).
9678
9679         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9680
9681         * lib/md2.h, lib/md2.c: New files.
9682
9683 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9684
9685         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9686         errno alone.  Problem reported by Frederic Jolliton.
9687
9688 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9689
9690         * modules/verify (License): Change from GPL to LGPL.  This is a
9691         tiny module and there are apparently near-equivalents that are
9692         under the BSD license.
9693
9694 2005-10-24  Simon Josefsson  <jas@extundo.com>
9695
9696         * modules/sha1: Relicense to LGPL.
9697
9698 2005-10-24  Simon Josefsson  <jas@extundo.com>
9699
9700         * lib/md4.h: Shrink buffer size, now that we changed the type.
9701
9702 2005-10-23  Simon Josefsson  <jas@extundo.com>
9703
9704         * gnulib-tool (func_import): Fix --tests-base.
9705
9706 2005-10-22  Simon Josefsson  <jas@extundo.com>
9707
9708         * modules/arcfour (Depends-on): Need stdint.
9709
9710 2005-10-22  Simon Josefsson  <jas@extundo.com>
9711
9712         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9713         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9714
9715 2005-10-22  Simon Josefsson  <jas@extundo.com>
9716
9717         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9718         suggested by Bruno Haible <bruno@clisp.org>.
9719
9720 2005-10-22  Simon Josefsson  <jas@extundo.com>
9721
9722         * lib/crc.h: Include stddef.h, for size_t.
9723
9724 2005-10-22  Simon Josefsson  <jas@extundo.com>
9725
9726         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9727         arcfour_context struct (simplify test vector testing in GNU
9728         Shishi).
9729
9730 2005-10-21  Simon Josefsson  <jas@extundo.com>
9731
9732         * modules/des, modules/des-tests: New files.
9733
9734         * modules/gc-des, modules/gc-des-tests: New files.
9735
9736         * tests/test-des.c, tests/test-gc-des.c: New file.
9737
9738 2005-10-21  Simon Josefsson  <jas@extundo.com>
9739
9740         * modules/arctwo, modules/arctwo-tests: New files.
9741
9742         * tests/test-arctwo.c: New file.
9743
9744         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9745
9746         * tests/test-gc-arctwo.c: New file.
9747
9748 2005-10-21  Simon Josefsson  <jas@extundo.com>
9749
9750         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9751         Bruno Haible <bruno@clisp.org>.
9752
9753         * m4/gc-des.m4: New file.
9754
9755 2005-10-21  Simon Josefsson  <jas@extundo.com>
9756
9757         * m4/arctwo.m4: New file.
9758
9759         * m4/gc-arctwo.m4: New file.
9760
9761 2005-10-21  Simon Josefsson  <jas@extundo.com>
9762
9763         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9764         block.
9765
9766 2005-10-21  Simon Josefsson  <jas@extundo.com>
9767
9768         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9769         <bruno@clisp.org>.
9770
9771         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9772
9773         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9774         Bruno Haible <bruno@clisp.org>.
9775
9776         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9777         <bruno@clisp.org>.
9778
9779 2005-10-21  Simon Josefsson  <jas@extundo.com>
9780
9781         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9782
9783 2005-10-21  Simon Josefsson  <jas@extundo.com>
9784
9785         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9786
9787 2005-10-21  Simon Josefsson  <jas@extundo.com>
9788
9789         * lib/des.h, lib/des.c: New files.
9790
9791         * lib/gc-gnulib.c: Support DES.c
9792
9793 2005-10-21  Simon Josefsson  <jas@extundo.com>
9794
9795         * lib/arctwo.h, lib/arctwo.c: New files.
9796
9797         * lib/gc-gnulib.c: Support ARCTWO.
9798
9799 2005-10-21  Simon Josefsson  <jas@extundo.com>
9800
9801         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
9802         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9803
9804 2005-10-21  Simon Josefsson  <jas@extundo.com>
9805
9806         * gnulib-tool (func_import, func_create_testdir): Define automake
9807         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
9808         Makefile.am snippet),
9809         suggested by Bruno Haible <bruno@clisp.org>.
9810
9811         * modules/gc (Makefile.am): Use it.
9812
9813 2005-10-21  Bruno Haible  <bruno@clisp.org>
9814
9815         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
9816         patch.
9817
9818 2005-10-19  Simon Josefsson  <jas@extundo.com>
9819
9820         * tests/test-gc-rijndael.c: New file.
9821
9822         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
9823
9824 2005-10-19  Simon Josefsson  <jas@extundo.com>
9825
9826         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
9827         interface too.
9828
9829 2005-10-19  Simon Josefsson  <jas@extundo.com>
9830
9831         * tests/test-gc-arcfour.c: New file.
9832
9833         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
9834
9835 2005-10-19  Simon Josefsson  <jas@extundo.com>
9836
9837         * modules/gc-md4, modules/gc-md4-tests: New file.
9838
9839         * tests/test-gc-md4.c: New file.
9840
9841 2005-10-19  Simon Josefsson  <jas@extundo.com>
9842
9843         * m4/gc-md4.m4: New file.
9844
9845 2005-10-19  Simon Josefsson  <jas@extundo.com>
9846
9847         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
9848         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
9849         <kasal@ucw.cz>.
9850
9851 2005-10-19  Simon Josefsson  <jas@extundo.com>
9852
9853         * m4/gc-arcfour.m4: New file.
9854
9855         * m4/gc-rijndael.m4: New file.
9856
9857 2005-10-19  Simon Josefsson  <jas@extundo.com>
9858
9859         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
9860
9861 2005-10-19  Simon Josefsson  <jas@extundo.com>
9862
9863         * lib/gc-gnulib.c: Support ARCFOUR.
9864
9865 2005-10-19  Simon Josefsson  <jas@extundo.com>
9866
9867         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
9868         support.
9869
9870         * lib/gc.h: Add ECB enum type.
9871
9872         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
9873
9874 2005-10-18  Simon Josefsson  <jas@extundo.com>
9875
9876         * tests/test-md5.c: New file.
9877
9878         * modules/md5-tests: New file.
9879
9880 2005-10-18  Simon Josefsson  <jas@extundo.com>
9881
9882         * tests/test-md4.c: New file.
9883
9884         * modules/md4, modules/md4-tests: New files.
9885
9886 2005-10-18  Simon Josefsson  <jas@extundo.com>
9887
9888         * m4/md4.m4: New file.
9889
9890 2005-10-18  Simon Josefsson  <jas@extundo.com>
9891
9892         * lib/md4.h, lib/md4.c: New files, based on md5.?.
9893
9894 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
9895
9896         * gnulib-tool (func_create_testdir): Omit the second check whether
9897         BUILT_SOURCES in nonempty.
9898
9899 2005-10-17  Simon Josefsson  <jas@extundo.com>
9900
9901         * tests/test-rijndael.c: New file.
9902
9903 2005-10-17  Simon Josefsson  <jas@extundo.com>
9904
9905         * modules/sha1: Depend on stdint instead of md5.
9906
9907         * modules/md5: Depend on stdint, remove uint32_t.
9908
9909 2005-10-17  Simon Josefsson  <jas@extundo.com>
9910
9911         * modules/gc-sha1-tests: New file.
9912
9913         * tests/test-gc-sha1.c: New file.
9914
9915 2005-10-17  Simon Josefsson  <jas@extundo.com>
9916
9917         * m4/md5.m4: Remove call to uint32_t.m4.
9918
9919 2005-10-17  Simon Josefsson  <jas@extundo.com>
9920
9921         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
9922
9923         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
9924         md5.h.
9925
9926         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
9927
9928         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
9929
9930 2005-10-17  Simon Josefsson  <jas@extundo.com>
9931
9932         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
9933
9934 2005-10-17  Simon Josefsson  <jas@extundo.com>
9935
9936         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
9937
9938 2005-10-17  Simon Josefsson  <jas@extundo.com>
9939
9940         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
9941
9942         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
9943
9944 2005-10-17  Bruno Haible  <bruno@clisp.org>
9945
9946         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
9947         that it can also be used in a test.
9948
9949 2005-10-16  Bruno Haible  <bruno@clisp.org>
9950
9951         * gnulib-tool (func_emit_tests_Makefile_am): Also define
9952         TESTS_ENVIRONMENT, so that individual tests can augment it.
9953
9954         * gnulib-tool (func_create_testdir): Use an intermediate target for
9955         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
9956         macros, like $(ALLOCA_H), which cannot be passed through the command
9957         line.
9958
9959 2005-10-15  Simon Josefsson  <jas@extundo.com>
9960
9961         * modules/rijndael-tests: New file.
9962
9963         * modules/rijndael: New file.
9964
9965 2005-10-15  Simon Josefsson  <jas@extundo.com>
9966
9967         * m4/rijndael.m4: New file.
9968
9969 2005-10-15  Simon Josefsson  <jas@extundo.com>
9970
9971         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
9972
9973         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
9974
9975 2005-10-14  Simon Josefsson  <jas@extundo.com>
9976
9977         * tests/test-arcfour.c: New file.
9978
9979         * modules/arcfour, modules/arcfour-tests: New files.
9980
9981 2005-10-14  Simon Josefsson  <jas@extundo.com>
9982
9983         * m4/arcfour.m4: New file.
9984
9985 2005-10-14  Simon Josefsson  <jas@extundo.com>
9986
9987         * lib/arcfour.h, lib/arcfour.c: New files.
9988
9989 2005-10-14  Roland McGrath  <roland@redhat.com>
9990
9991         Import from libc.  [BZ #1331]
9992         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
9993         macro argument.
9994         Reported by Matej Vela <vela@debian.org>.
9995
9996 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9997
9998         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
9999         include <wchar.h>; no longer needed.
10000
10001 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10002
10003         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
10004
10005 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
10006         and  Ulrich Drepper  <drepper@redhat.com>
10007
10008         Import from libc.
10009         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
10010         instead of inline stream orientation test and two separate
10011         function calls.  Pay no attention to USE_IN_LIBIO.
10012
10013 2005-10-13  Simon Josefsson  <jas@extundo.com>
10014
10015         * modules/gc-hmac-md5-tests: New file.
10016
10017         * tests/test-gc-hmac-sha1.c: New file.
10018
10019         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
10020
10021         * modules/gc-hmac-md5-tests: New file.
10022
10023         * tests/test-gc-md5.c: New file.
10024
10025         * modules/gc-md5-tests: New file.
10026
10027 2005-10-13  Simon Josefsson  <jas@extundo.com>
10028
10029         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
10030         Move memory allocation outside of loop.
10031
10032 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
10033
10034         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
10035         intermediate directory is in a read-only file system.  Problem
10036         reported by Eric Blake.
10037
10038 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
10039
10040         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10041
10042 2005-10-12  Simon Josefsson  <jas@extundo.com>
10043
10044         * tests/test-hmac-sha1.c: New file.
10045
10046         * modules/hmac-sha1-tests: New file.
10047
10048         * modules/hmac-sha1: New file.
10049
10050 2005-10-12  Simon Josefsson  <jas@extundo.com>
10051
10052         * modules/gc-sha1: New file.
10053
10054 2005-10-12  Simon Josefsson  <jas@extundo.com>
10055
10056         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10057
10058         * tests/test-gc-pbkdf2-sha1.c: New file.
10059
10060 2005-10-12  Simon Josefsson  <jas@extundo.com>
10061
10062         * modules/gc-md5, modules/gc-hmac-md5: New files.
10063
10064         * modules/gc (Files): Remove md5, memxor and hmac files.
10065
10066 2005-10-12  Simon Josefsson  <jas@extundo.com>
10067
10068         * m4/gc-pbkdf2-sha1.m4: New file.
10069
10070         * m4/gc-hmac-sha1.m4: New file.
10071
10072         * m4/gc-sha1: New file.
10073
10074         * m4/hmac-sha1.m4: New file.
10075
10076 2005-10-12  Simon Josefsson  <jas@extundo.com>
10077
10078         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10079
10080         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
10081
10082 2005-10-12  Simon Josefsson  <jas@extundo.com>
10083
10084         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
10085         suggested by Bruno Haible <bruno@clisp.org>.
10086
10087 2005-10-12  Simon Josefsson  <jas@extundo.com>
10088
10089         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
10090
10091 2005-10-12  Simon Josefsson  <jas@extundo.com>
10092
10093         * lib/gc-pbkdf2-sha1.c: New file.
10094
10095         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
10096
10097 2005-10-12  Simon Josefsson  <jas@extundo.com>
10098
10099         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
10100
10101         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
10102
10103 2005-10-12  Simon Josefsson  <jas@extundo.com>
10104
10105         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
10106         GC_USE_HMAC_MD5, respectively.
10107
10108         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
10109         (gc_md5): Fix typo.
10110
10111         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
10112
10113         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
10114
10115         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
10116
10117 2005-10-12  Bruno Haible  <bruno@clisp.org>
10118
10119         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
10120         Reported by Stepan Kasal <kasal@ucw.cz>.
10121
10122 2005-10-11  Simon Josefsson  <jas@extundo.com>
10123
10124         * tests/test-crc.c: New file.
10125
10126         * modules/crc, modules/crc-tests: New files.
10127
10128 2005-10-11  Simon Josefsson  <jas@extundo.com>
10129
10130         * m4/crc.m4: New file.
10131
10132 2005-10-11  Simon Josefsson  <jas@extundo.com>
10133
10134         * lib/gc.h: Add gc_hash and gc_hash_buffer.
10135
10136         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
10137
10138         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
10139
10140 2005-10-11  Simon Josefsson  <jas@extundo.com>
10141
10142         * lib/crc.h, lib/crc.c: New files.
10143
10144         * lib/gc.h (gc_hash_buffer): Add doc.
10145
10146 2005-10-11  Bruno Haible  <bruno@clisp.org>
10147
10148         * modules/c-strcasestr: New file.
10149         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
10150
10151 2005-10-11  Bruno Haible  <bruno@clisp.org>
10152
10153         * modules/c-strcase: New file.
10154         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
10155
10156 2005-10-11  Bruno Haible  <bruno@clisp.org>
10157
10158         * lib/strcasecmp.c: Include limits.h.
10159         (strcasecmp): Avoid integer overflow on exotic platforms.
10160         * lib/strncasecmp.c: Include limits.h.
10161         (strncasecmp): Avoid integer overflow on exotic platforms.
10162         Reported by Paul Eggert.
10163
10164 2005-10-11  Bruno Haible  <bruno@clisp.org>
10165
10166         * lib/c-strcasestr.h: New file, from GNU gettext.
10167         * lib/c-strcasestr.c: New file, from GNU gettext.
10168
10169 2005-10-11  Bruno Haible  <bruno@clisp.org>
10170
10171         * lib/c-strcase.h: New file, from GNU gettext.
10172         * lib/c-strcasecmp.c: New file, from GNU gettext.
10173         * lib/c-strncasecmp.c: New file, from GNU gettext.
10174
10175 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10176
10177         * modules/mempcpy (License): GPL -> LGPL.
10178         * modules/strchrnul (License): Likewise.
10179         * modules/sysexits (License): Likewise.
10180
10181 2005-10-08  Simon Josefsson  <jas@extundo.com>
10182
10183         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
10184
10185 2005-10-07  Simon Josefsson  <jas@extundo.com>
10186
10187         * m4/memxor.m4: Remove gl_C_RESTRICT call.
10188
10189 2005-10-06  Simon Josefsson  <jas@extundo.com>
10190
10191         * tests/test-hmac-md5.c: New file.
10192
10193         * modules/hmac-md5-tests: New file.
10194
10195         * modules/hmac-md5: New file.
10196
10197 2005-10-06  Simon Josefsson  <jas@extundo.com>
10198
10199         * m4/hmac-md5.m4: New file.
10200
10201         * m4/memxor.m4: Require gl_C_RESTRICT.
10202
10203 2005-10-06  Simon Josefsson  <jas@extundo.com>
10204
10205         * lib/memxor.c (memxor): Avoid casts and warnings.
10206
10207 2005-10-06  Simon Josefsson  <jas@extundo.com>
10208
10209         * lib/hmac-md5.c: New file.
10210
10211         * lib/hmac.h: New file.
10212
10213 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10214
10215         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
10216         promotes to int, not unsigned int, to catch the AIX 5.3
10217         compiler bug.
10218
10219 2005-10-05  Simon Josefsson  <jas@extundo.com>
10220
10221         * modules/memxor: New file.
10222
10223         * modules/iconv (Files): Move config.rpath to havelib, it is used
10224         there.
10225
10226         * modules/havelib (Files): Add config.rpath.
10227
10228 2005-10-05  Simon Josefsson  <jas@extundo.com>
10229
10230         * m4/memxor.m4: New file.
10231
10232 2005-10-05  Simon Josefsson  <jas@extundo.com>
10233
10234         * lib/memxor.c (memxor): Fix compiler error.
10235
10236         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
10237         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
10238
10239         * lib/memxor.h, lib/memxor.c: New files.
10240
10241         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
10242         we assume all systems have it, suggested by Jim Meyering
10243         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
10244         any systems lack sys/socket.h; mingw32 is known to lack it, but we
10245         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
10246         same reasons.
10247
10248 2005-10-05  Simon Josefsson  <jas@extundo.com>
10249
10250         * config/srclist.txt: Add glibc bug 1423 for md5.h.
10251
10252 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10253
10254         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
10255         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
10256         needed, since the source code now assumes these .h files.
10257
10258 2005-10-05  Derek Price  <derek@ximbiot.com>
10259
10260         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
10261
10262 2005-10-05  Bruno Haible  <bruno@clisp.org>
10263
10264         * modules/stdint (License): Change to LGPL.
10265
10266 2005-10-04  Simon Josefsson  <jas@extundo.com>
10267
10268         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
10269         D. Baushke" <mdb@gnu.org>.
10270
10271 2005-10-04  Bruno Haible  <bruno@clisp.org>
10272
10273         * lib/verify.h (verify_true): Provide alternative definition for C++.
10274
10275 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
10276
10277         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
10278         (SSIZE_MAX): New macro, if not already defined.
10279         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
10280         than 2 GiB.
10281
10282 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10283
10284         Sync from coreutils.
10285         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
10286         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
10287         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
10288         ULLONG_MAX doesn't work with 2.7.2.1.
10289
10290 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10291
10292         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
10293         From Ben Pfaff.
10294
10295         * modules/exclude (Depends-on): Depend on verify.
10296         * modules/strtoimax (Depends-on): Likewise.
10297         * modules/utimecmp (Depends-on): Likewise.
10298
10299 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10300
10301         * lib/exclude.c: Include verify.h.
10302         (verify): Remove.  All callers changed to use verify.h's version.
10303         * lib/strtoimax.c: Likewise.
10304         * lib/utimecmp.c: Likewis.e
10305
10306         Sync from coreutils.
10307         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
10308         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
10309         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
10310         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
10311         bother returning ENOSYS if settimeofday or stime fails; just let
10312         them return whatever errno they want to return.
10313         * lib/utimens.c: Include unistd.h, for dup2.
10314         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10315         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10316
10317 2005-10-02  Jim Meyering  <jim@meyering.net>
10318
10319         Sync from coreutils.
10320         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10321         from glibc-2.2.5 that fails for read-only files.
10322
10323 2005-10-02  Jim Meyering  <jim@meyering.net>
10324
10325         Sync from coreutils.
10326         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10327         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10328         `#if HAVE_CONFIG_H'.
10329         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10330         Remove AT_FDCWD test.
10331         Do not consume the fd unless successful.
10332         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10333         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10334         block, so that we don't even try to compile it if settimeofday is
10335         available.  This works around a compilation failure on OSF1 V5.1,
10336         due to stime requiring a `long int*' while tv_sec is `int'.
10337
10338 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10339
10340         Sync from coreutils.
10341         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10342         against `yes', rather than just testing for nonempty.
10343
10344 2005-10-01  Simon Josefsson  <jas@extundo.com>
10345
10346         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10347         and Darwin.
10348
10349         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10350         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10351         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10352         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10353         Check if struct addrinfo is declared.
10354
10355 2005-10-01  Simon Josefsson  <jas@extundo.com>
10356
10357         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10358         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10359         AI_* and EAI_* definitions.  Protect function declarations.
10360
10361 2005-10-01  Jim Meyering  <jim@meyering.net>
10362
10363         Sync from coreutils.
10364
10365         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10366         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10367         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10368         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10369         in the inet and nsl libraries.  Required on Solaris 5.7.
10370
10371 2005-10-01  Jim Meyering  <jim@meyering.net>
10372
10373         Sync from coreutils.
10374         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10375         in the inet and nsl libraries.  Required on Solaris 5.7.
10376
10377 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10378
10379         * lib/getdelim.c (getdelim): Remove unused variables.
10380
10381 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10382
10383         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10384         so that the code works even with ancient cpp.  Portability problem
10385         with GCC 2.7.2.1 reported by Thomas M.Ott.
10386
10387 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10388
10389         * modules/regex (Depends-on): Add strcase.
10390
10391         * modules/gethostname (Licence): Change from GPL to LGPL, since
10392         gethostname.c is a trivial implementation of a standard library
10393         function.
10394         * modules/poll (License): Change from GPL to LGPL, since it's
10395         derived from LGPL code.
10396
10397 2005-09-27  Jim Meyering  <jim@meyering.net>
10398
10399         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10400         HAVE_CONFIG_H.
10401
10402         * lib/intprops.h (signed_type_or_expr__): Define.
10403         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10404         for unsigned types.
10405
10406 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10407
10408         * lib/verify.h (verify_expr): Remove, replacing with:
10409         (verify_true): New macro that returns true instead of void.
10410         (verify_type__): Remove.
10411         (verify): Use verify_true rather than verify_type__.
10412
10413 2005-09-26  Bruno Haible  <bruno@clisp.org>
10414
10415         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10416         is necessary.
10417         (lib_SOURCES): Remove mbchar.c.
10418         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10419         (Files): Add m4/mbrtowc.m4.
10420         * modules/mbiter: Likewise.
10421         * modules/mbuiter: Likewise.
10422
10423 2005-09-26  Bruno Haible  <bruno@clisp.org>
10424
10425         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10426         compile mbchar.c if they are not both present.
10427         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10428         * m4/mbiter.m4 (gl_MBITER): Likewise.
10429         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10430         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10431         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10432
10433 2005-09-25  Jim Meyering  <jim@meyering.net>
10434
10435         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10436         also uses socklen_t.
10437
10438 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10439
10440         * lib/utimens.c (ENOSYS): Define if not already defined.
10441         (futimens): Support having a null PATH if the file descriptor
10442         is nonnegative.
10443
10444         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10445         Remove.
10446         (__attribute): Define to empty unless GCC 3.1 or later.
10447         This works around a core dump on OpenBSD 3.4, which has GCC
10448         2.95.3, which dumps core when given __attribute__(()).  It also
10449         simplifies other tests, since we really don't want to bother with
10450         worrying about which ancient version of GCC supported what.
10451         Original problem reported by Yoann Vandoorselaere, with part of
10452         the fix suggested by Derek Price.
10453
10454 2005-09-24  Jim Meyering  <jim@meyering.net>
10455
10456         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
10457         so we can once again use a positive bitfield width of 1 -- now we
10458         don't have to explain why we were using a bitfield width of 2.
10459
10460 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10461
10462         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10463         and similarly for the other external symbols.  Problem reported
10464         by James Gallager.
10465
10466         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10467         bug reported by Jim Meyering.
10468
10469         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10470         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10471         not needed, since socklen is a prerequisite module.
10472
10473 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10474
10475         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10476         Problem reported by Eric Blake.
10477         (getaddrinfo): Initialize se so that it's not garbage.
10478         Redo internal storage allocation so that it doesn't make unportable
10479         assumptions about alignment.
10480         Fix a memory leak.
10481
10482         * lib/utimens.c (futimens): Use futimesat if available.
10483         Prefer it to futimes since it doesn't have the futimes bug.
10484
10485         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
10486         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
10487         Instead, declare a function that returns a pointer to an array,
10488         and use verify_type__ to declare the size of the array.
10489         Problem and germ of a solution reported by Bruno Haible.
10490         (verify_type__): Use 2, not 1, for bitfield size, to avoid
10491         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
10492
10493 2005-09-23  Jim Meyering  <jim@meyering.net>
10494
10495         Sync from coreutils.
10496         Correct build failure (socklen_t not defined) on at least
10497         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
10498         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
10499
10500 2005-09-23  Jim Meyering  <jim@meyering.net>
10501
10502         * modules/getaddrinfo (Depends-on): Add socklen.
10503
10504 2005-09-23  Bruno Haible  <bruno@clisp.org>
10505
10506         * tests/test-verify.c: New file.
10507
10508 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10509
10510         Sync from coreutils.
10511
10512         * modules/argmatch (Depends-on): Add verify.
10513         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
10514         unistd-safer.
10515         * modules/save-cwd (Depends-on): Likewise.
10516
10517         * modules/openat (Files): Add lib/openat-die.c.
10518         (Depends-on): Remove error, exitfail.
10519         Add dirname.
10520
10521         * modules/verify: New file.
10522         * MODULES.html.sh (Diagnostics <assert.h>): New section,
10523         with "verify" module.
10524
10525 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10526
10527         Sync from coreutils.
10528
10529         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10530         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10531         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10532         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10533         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10534         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10535         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10536         Don't bother checking for string.h, stdlib.h, unistd.h.
10537         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10538         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10539         module's job.
10540         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10541         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10542
10543         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10544         (gl_GETDATE): Use it.
10545
10546         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10547
10548 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10549
10550         Sync from coreutils.
10551
10552         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10553         stat-time.h.
10554         * lib/argmatch.h: Include verify.h
10555         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10556         (ARGMATCH_ASSERT): Remove; unused.
10557         * lib/canonicalize.c: Assume STDC_HEADERS.
10558         * lib/exclude.c: Include "strcase.h".
10559         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10560         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10561         and stdio-safer.h.
10562         (getusershell): Call fopen, not fopen_safer.
10563         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10564         Do not include unistd-safer.h.
10565         (save_cwd): Don't call fd_safer; no longer needed
10566         now that we include fcntl--.h.
10567
10568         * lib/getdate.y (relative_time): New type.
10569         (RELATIVE_TIME_0): New constant.
10570         (parser_control): Use relative_time instead of doing it ourselves.
10571         (%union): Add new relative_time rel member.
10572         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10573         Now typeless.
10574         (relunit, relunit_snumber): Now of type rel.
10575         (zone, rel, relunit, get_date): Adjust to above changes.
10576
10577         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10578         Do not include unistd-safer.h.
10579         (getloadavg): Don't call fd_safer; no longer needed
10580         now that we include fcntl--.h.
10581
10582         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10583         (make_dir_parents): Treat ENOSYS like EEXIST.
10584
10585         Improve quality of diagnostics on restore_cwd failure.
10586         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10587         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10588         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10589         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10590         each time through the loop.  Do not diagnose restore_cwd failure;
10591         that is the caller's job (and perhaps the caller does not care).
10592
10593         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10594         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10595         If the file already exists but is not a directory, don't bother
10596         to try to make its parents.
10597         Close potential file descriptor leak if we can't chdir("/") (!).
10598         Don't always return true if chdir($PWD) fails; return true only
10599         if the requested action was done successfully (except for the
10600         chdir($PWD)).
10601         Don't log final directory unless we actually made it.
10602         Refactor to avoid duplicate code to fix up permissions.
10603         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10604
10605         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10606         to make it a bit faster and (I hope) clearer.
10607         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10608         Fix bug in formats like %2N.
10609
10610         * lib/verify.h: New file.
10611
10612 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10613
10614         Sync from coreutils.
10615         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10616
10617 2005-09-22  Jim Meyering  <jim@meyering.net>
10618
10619         Sync from coreutils.
10620
10621         * m4/lstat.m4 (gl_FUNC_LSTAT):
10622         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10623         Remove obsolete comment.
10624         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10625         * m4/xstrtod.m4: Likewise.
10626
10627         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10628
10629 2005-09-22  Jim Meyering  <jim@meyering.net>
10630
10631         Sync from coreutils.
10632
10633         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10634
10635         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10636         the .tm_year member, since otherwise gcc-4.0 would now warn about
10637         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10638
10639         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10640         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10641
10642         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10643         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10644         when run in a time zone for which daylight savings time is in effect
10645         for the starting date.
10646
10647         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10648         stop us from restricting permissions of just-created absolute-named
10649         directories.
10650         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10651         to restore initial working directory.
10652         * lib/mkdir-p.c (make_dir_parents): New parameter:
10653         different_working_dir, to tell caller if/when we change the working
10654         directory and are unable to return to the initial one.
10655         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10656         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10657         `return false'.  This fixes a bug introduced on 2004-07-30.
10658
10659         * lib/openat.c (fdopendir): Be sure to close the supplied
10660         file descriptor before returning.  This makes our replacement
10661         implementation a little closer to Solaris's, where fdopendir
10662         ties the file descriptor to the returned DIR* pointer.
10663         * lib/openat.c (unlinkat): New function.
10664         * lib/openat.h (unlinkat): Add prototype.
10665         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10666         (openat_restore_fail): Rename from openat_restore_die.
10667         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10668
10669         Provide an alternative to exiting immediately upon save_cwd or
10670         restore_cwd failure.  Now, an application can arrange e.g.,
10671         to perform a longjump in that case.
10672         * lib/openat.c: Include dirname.h.
10673         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10674         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10675         and openat_restore_die rather than calling error directly.
10676         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10677
10678         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10679         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10680         define.
10681
10682         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10683         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10684                             int utc, int nanoseconds);
10685         Background:
10686         date should not have to allocate a megabyte of virtual memory to
10687         handle a format argument like +%1048575T.  When implemented with
10688         strftime, it must allocate such a buffer, use strftime to fill it
10689         in, print it, then free it.
10690         With fprintftime, it simply prints everything and exits.
10691         With no need for memory allocation, that's one fewer way to fail.
10692         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10693         optional field width, not before, so we accept %9:z, not %:9z.
10694         (my_strftime): Be sure to use L_('x') for literals.
10695
10696         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10697         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10698         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10699         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10700         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10701         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10702         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10703         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10704         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10705         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10706         * lib/xgethostname.c, lib/xreadlink.c:
10707         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10708
10709         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10710         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10711         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10712         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10713         and don't include <sys/file.h>).
10714
10715 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10716
10717         Sync from coreutils.
10718
10719         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10720         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10721         [!LDAV_DONE]: Avoid unused variable warning.
10722
10723 2005-09-21  Bruno Haible  <bruno@clisp.org>
10724
10725         * lib/unicodeio.h (unicode_to_mb): New declaration.
10726
10727 2005-09-20  Derek Price  <derek@ximbiot.com>
10728
10729         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10730         getaddrinfo.h.
10731
10732 2005-09-20  Bruno Haible  <bruno@clisp.org>
10733
10734         * gnulib-tool: Remove trailing slashes from the values specified for
10735         --source-base, --m4-base, --tests-base, --aux-dir.
10736         Suggested by Simon Josefsson <jas@extundo.com>.
10737
10738 2005-09-20  Bruno Haible  <bruno@clisp.org>
10739
10740         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10741         func_modules_to_filelist, func_import, func_create_testdir): Make all
10742         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10743         change when gnulib-tool is invoked in a different locale.
10744
10745 2005-09-19  Simon Josefsson  <jas@extundo.com>
10746
10747         * m4/socklen.m4: Fix typo.
10748
10749 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10750
10751         Use a consistent style for including <config.h>.
10752         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10753         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10754         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10755         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10756         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10757         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10758         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10759         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10760         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10761         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10762         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10763         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10764         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10765         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10766         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10767         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10768         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10769         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10770         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10771         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10772         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10773         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10774         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10775         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10776         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10777         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10778         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10779         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10780         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10781         lib/xstrtoumax.c, lib/yesno.c:
10782         Standardize inclusion of config.h.
10783         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10784         lib/inttostr.h:  Removed inclusion of config.h from header files.
10785         * lib/inttostr.c:  Adjusted in-tree users.
10786         * lib/timespec.h: Remove superfluous warning to include config.h.
10787         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10788         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10789         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10790         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10791         config.h with HAVE_CONFIG_H.
10792
10793 2005-09-19  Jim Meyering  <jim@meyering.net>
10794
10795         * modules/pathmax (License): Change to LGPL.
10796
10797 2005-09-19  Derek Price  <derek@ximbiot.com>
10798
10799         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
10800
10801 2005-09-19  Bruno Haible  <bruno@clisp.org>
10802
10803         * gnulib-tool (import): Provide default for --tests-base.
10804
10805 2005-09-19  Bruno Haible  <bruno@clisp.org>
10806
10807         * doc/quote.texi: New file, extracted from gnulib.texi.
10808         * doc/ctime.texi: New file, extracted from gnulib.texi.
10809         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
10810         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
10811         * doc/gnulib.texi: Include them.
10812
10813 2005-09-18  Bruno Haible  <bruno@clisp.org>
10814
10815         Portability fix.
10816         * gnulib-tool (func_readlink): New function.
10817         (func_ln_if_changed): Use it.
10818
10819 2005-09-18  Bruno Haible  <bruno@clisp.org>
10820
10821         * gnulib-tool: Support --with-tests also with --import.
10822         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
10823         (func_import): Use variables $testsbase and $inctests. Emit a
10824         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
10825         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
10826         SUBDIRS += $testsdir.
10827         (func_create_testdir): Update.
10828
10829 2005-09-18  Bruno Haible  <bruno@clisp.org>
10830
10831         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
10832         instead of $dry_run.
10833         (func_cp_if_changed, func_mv_if_changed): Remove functions.
10834         (func_ln_if_changed): Don't handle dry-run here.
10835         (func_import): In dry-run mode, detect more precisely which actions
10836         would be performed, and don't use "...ing" verbs.
10837
10838 2005-09-18  Bruno Haible  <bruno@clisp.org>
10839
10840         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
10841         (func_import): Use join on two temporary files instead of three nested
10842         loops, in order to determine which files are new or old.
10843
10844 2005-09-18  Bruno Haible  <bruno@clisp.org>
10845
10846         * gnulib-tool (func_import): Comment out code that spits out the
10847         new files with --dry-run.
10848
10849 2005-09-18  Bruno Haible  <bruno@clisp.org>
10850
10851         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
10852
10853 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10854
10855         * lib/stat-time.h: New file.
10856         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
10857         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
10858         in a different way.
10859         (timespec_cmp): New function.
10860         * lib/utimecmp.c: Include stat-time.h.
10861         (SYSCALL_RESOLUTION): Depend on whether various struct stat
10862         members exist, not on the obsolescent ST_MTIM_NSEC.
10863         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
10864
10865 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10866
10867         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
10868
10869 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10870
10871         * MODULES.html.sh (File system functions): Add stat-time.
10872         * modules/stat-time: New file.
10873         * modules/timespec (Files): Remove m4/st_mtim.m4; this
10874         is now done in a different way, by the stat-time module.
10875         * modules/utimecmp (Depends-on): Add stat-time.
10876
10877 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10878
10879         * m4/st_mtim.m4: Remove.  Superseded by...
10880         * m4/stat-time.m4: New file.
10881         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
10882         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
10883
10884 2005-09-15  Derek Price  <derek@ximbiot.com>
10885
10886         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
10887
10888 2005-09-15  Derek Price  <derek@ximbiot.com>
10889
10890         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
10891         * lib/regex_internal.c: Ditto, using this...
10892         (__GNUC_PREREQ): ...new macro.
10893         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
10894         using...
10895         (__GNUC_PREREQ): ...this new macro.
10896
10897         * lib/strstr.h: Include string.h. Define strstr as a macro here.
10898
10899 2005-09-15  Derek Price  <derek@ximbiot.com>
10900             Paul Eggert  <eggert@cs.ucla.edu>
10901
10902         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
10903         changes, consolidating in...
10904         * lib/regex_internal.h: ...this file.
10905
10906 2005-09-13  Jim Meyering  <jim@meyering.net>
10907
10908         * lib/canon-host.c: Filter through gnu indent and reword comments
10909         slightly.
10910         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
10911
10912 2005-09-13  Derek Price  <derek@ximbiot.com>
10913
10914         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
10915         failure.
10916         Reported by Jim Meyering  <jim@meyering.net>.
10917
10918 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10919
10920         * lib/base64.c: Typo.
10921         (base64_encode): Put b64str in initialized data section.
10922
10923 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
10924
10925         Merge glibc and coreutils changes into gnulib, plus a few
10926         extra fixes.
10927         * lib/md5.c: Use #error rather than a string.
10928         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
10929         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
10930         (__attribute__): Define to empty for non recent-GCC.
10931         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
10932         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
10933         Renamed from their non-__ counterparts, with new macros replacing
10934         them if not _LIBC.  Add __THROW attribute.
10935         (rol): Remove.
10936         (struct md5_ctx): Align buffer if using GCC.
10937         * lib/sha1.h (struct sha1_ctx): Likewise.
10938         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
10939         The old name was backwards.
10940         (NOTSWAP): Remove; not used.
10941         (rol): New macro, moved here from md5.h.
10942         (sha1_process_block): Remove a FIXME that doesn't make sense.
10943
10944 2005-09-12  Derek Price  <derek@ximbiot.com>
10945
10946         Return usable errors from canon-host.
10947         * lib/canon-host.h: New file.
10948         * lib/canon-host.c (canon_host): Wrap...
10949         (canon_host_r): ...this new function, which now relies exclusively on
10950         getaddrinfo.
10951         (ch_strerror): New function.
10952         (last_cherror): New global.
10953         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
10954         interface.
10955         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
10956         void *.
10957         (freeaddrinfo): Free ai->ai_canonname when set.
10958
10959 2005-09-12  Derek Price  <derek@ximbiot.com>
10960
10961         Make canon-host require getaddrinfo.
10962         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
10963         AC_LIBSOURCE canon-host.h.  Call...
10964         (gl_PREREQ_CANON_HOST): ...this new function, which requires
10965         gl_GETADDRINFO.
10966         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
10967
10968 2005-09-12  Derek Price  <derek@ximbiot.com>
10969
10970         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
10971         LGPL.
10972         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
10973
10974 2005-09-12  Derek Price  <derek@ximbiot.com>
10975
10976         * lib/gai_strerror.c: Include config.h when available.  Include
10977         getaddrinfo.h before other headers to test interface.
10978         Reported by Larry Jones <lawrence.jones@ugs.com>.
10979
10980 2005-09-12  Derek Price  <derek@ximbiot.com>
10981             Paul Eggert  <eggert@cs.ucla.edu>
10982
10983         * modules/glob (Files): Add glob-libc.h.
10984
10985 2005-09-12  Derek Price  <derek@ximbiot.com>
10986             Paul Eggert  <eggert@cs.ucla.edu>
10987
10988         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
10989         glob_.h, glob-libc.h.
10990         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
10991
10992 2005-09-12  Derek Price  <derek@ximbiot.com>
10993             Paul Eggert  <eggert@cs.ucla.edu>
10994
10995         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
10996         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
10997         protecting things that should be done only in gnulib contexts.
10998         * lib/glob_.h: New file, containing only the glob things needed for
10999         gnulib.
11000         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
11001         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
11002         (glob, globfree, glob_pattern_p): Now defined simply in terms of
11003         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
11004         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
11005         and to respect the namespace rules better.
11006
11007 2005-09-08  Simon Josefsson  <jas@extundo.com>
11008
11009         * modules/socklen: New file.
11010
11011 2005-09-08  Simon Josefsson  <jas@extundo.com>
11012
11013         * m4/socklen.m4: New file.
11014
11015 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11016
11017         * modules/utimens (Files): Add m4/utimbuf.m4, since
11018         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
11019         Reported by Sergey Poznyakoff.
11020
11021 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11022
11023         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
11024         definitions, since that's the preferred style in glibc.
11025         Fix a minor spacing issue, and update copyright notice to match
11026         glibc's.
11027
11028 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11029
11030         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
11031
11032 2005-09-06  Simon Josefsson  <jas@extundo.com>
11033
11034         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
11035         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
11036
11037 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11038
11039         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
11040         warning.
11041
11042 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11043
11044         * config/srclist.txt: Add glibc bug 1302.
11045
11046 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11047
11048         Change bitset word type from unsigned int to unsigned long int,
11049         as this has better performance on typical 64-bit hosts.
11050         Port bitset code to hosts with unusual word sizes.
11051         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11052         (build_collating_symbol):
11053         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11054         argument is a bitset.  This is merely a style issue, but it makes
11055         it clearer that an entire array is expected.
11056         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11057         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11058         Port to the case where bitset_word is not the same as unsigned int.
11059         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11060         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11061         Likewise.
11062         * lib/regexec.c (check_dst_limits_calc_pos_1,
11063         check_subexp_matching_top):
11064         (build_trtable, group_nodes_into_DFAstates):
11065         Likewise.
11066         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11067         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11068         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11069         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11070         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11071         * lib/regcomp.c (optimize_subexps, lower_subexp):
11072         Work even if bitset_word has holes in its bitwise representation.
11073         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11074         * lib/regexec.c (check_dst_limits_calc_pos_1,
11075         check_subexp_matching_top):
11076         Likewise.
11077         * lib/regex_internal.c (re_string_reconstruct):
11078         Don't assume UCHAR_MAX == 255.
11079         * lib/regex_internal.h (bitset_set_all): Likewise.
11080         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
11081         All uses changed.
11082         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
11083         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
11084         All uses changed.
11085         (BITSET_WORD_MAX): New macro.
11086         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
11087         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
11088         (bitset_empty, bitset_copy):
11089         Prefer sizeof (bitset) to multiplying it out ourselves.
11090         (bitset_not_merge): Remove; unused.
11091         (bitset_contain): Return bool, not unsigned int with one bit on.
11092         All callers changed.
11093         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
11094         alignment than re_node_set; do this by defining a new internal
11095         type struct dests_alloc and using it to allocate memory.
11096
11097 2005-09-05  Bruno Haible  <bruno@clisp.org>
11098
11099         * gnulib-tool (func_import): Fix comparison in handling of symbolic
11100         links.
11101
11102 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
11103
11104         * modules/size_max (Makefile.am): Add size_max.h
11105
11106 2005-09-04  Derek Price  <derek@ximbiot.com>
11107
11108         * gnulib-tool (func_import): Fix reversed $symbolic logic.
11109
11110 2005-09-03  Simon Josefsson  <jas@extundo.com>
11111
11112         * gnulib-tool: Fix typo.
11113
11114 2005-09-03  Simon Josefsson  <jas@extundo.com>
11115
11116         * config/srclist.txt: Add glibc bug 1293.
11117
11118 2005-09-03  Derek Price  <derek@ximbiot.com>
11119
11120         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
11121         From Larry Jones <lawrence.jones@ugs.com>.
11122
11123 2005-09-02  Simon Josefsson  <jas@extundo.com>
11124
11125         * modules/socklen: New file.
11126
11127 2005-09-02  Simon Josefsson  <jas@extundo.com>
11128
11129         * modules/havelib: New module.
11130
11131         * modules/gettext, modules/iconv, modules/lock, modules/readline:
11132         Use havelib.
11133
11134 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11135
11136         Check for arithmetic overflow when calculating sizes, to prevent
11137         some buffer-overflow issues.  These patches are conservative, in the
11138         sense that when I couldn't determine whether an overflow was possible,
11139         I inserted a run-time check.
11140         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
11141         macros.
11142         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
11143         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
11144         (re_xnrealloc, re_x2nrealloc): New inline functions.
11145         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
11146         parse_bracket_exp):
11147         (build_equiv_class, build_charclass): Check for arithmetic overflow
11148         in size expression calculations.
11149         * lib/regex_internal.c (re_string_realloc_buffers):
11150         (build_wcs_upper_buffer, re_node_set_add_intersect):
11151         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
11152         (re_dfa_add_node, register_state): Likewise.
11153         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
11154         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
11155         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
11156         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
11157
11158 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11159
11160         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
11161         m4/ulonglong.m4.  Problem reported by Martin Lambers.
11162
11163 2005-09-02  Bruno Haible  <bruno@clisp.org>
11164
11165         Support for lib vs. lib64 distinction on biarch platforms.
11166         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
11167         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
11168         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
11169
11170 2005-09-02  Bruno Haible  <bruno@clisp.org>
11171
11172         * gnulib-tool (import): In the other first-use case, provide defaults
11173         as well.
11174
11175 2005-09-02  Bruno Haible  <bruno@clisp.org>
11176
11177         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
11178         patches not yet found in the latest gettext release.
11179
11180 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11181
11182         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
11183         to avoid a collision with bits/local_lim.h in glibc.
11184         All uses changed.  Problem reported by Dmitry V. Levin in
11185         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
11186
11187         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
11188         bugs in int versus size_t comparisons.
11189         (re_string_context_at): Fix bug where the code assumed that
11190         Idx is signed.
11191
11192         Use bool where appropriate.
11193         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
11194         All callers changed.
11195         (calc_eclosure_iter): Likewise, for ROOT arg.
11196         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
11197         (build_charclass_op): Likewise, for NON_MATCH arg.
11198         * lib/regex_internal.c (re_string_allocate, re_string_construct):
11199         (re_string_construct_common): Likewise, for ICASE arg.
11200         * lib/regexec.c (re_search_2_stub, re_search_stub):
11201         Likewise, for RET_LEN arg.
11202         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
11203         (set_regs): Likewise, for FL_BACKTRACK arg.
11204         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
11205         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
11206         (calc_eclosure_iter, parse_bracket_exp):
11207         Use bool for internal variables that are booleans.
11208         * lib/regexec.c (re_search_internal, check_matching,
11209         proceed_next_node):
11210         (set_regs, build_sifted_states, sift_states_bkref):
11211         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
11212         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11213         (find_collation_sequence_value):
11214         Likewise.
11215         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
11216         (re_node_set_compare):
11217         Return bool, not int. All callers changed.
11218         * lib/regexec.c (check_halt_node_context, check_dst_limits):
11219         (build_trtable, check_node_accept): Likewise.
11220         * lib/regex_internal.h: Include stdbool.h.
11221
11222         Fix bugs uncovered when converting to bool.
11223         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
11224         failure instead of charging ahead blindly.
11225         * lib/regex_internal.c (register_state): Likewise.
11226         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
11227         for freeing internal storage.
11228         (group_nodes_into_DFA_states): Use unsigned int, not int, for
11229         bitset pieces used as boolean, to avoid undefined behavior
11230         on hosts that do int overflow checking.
11231
11232 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11233
11234         * config/srclist.txt: Add glibc bugs 1285-1287.
11235
11236 2005-09-01  Jim Meyering  <jim@meyering.net>
11237
11238         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
11239         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
11240         Require gl_STAT_MACROS, too.
11241
11242 2005-09-01  Bruno Haible  <bruno@clisp.org>
11243
11244         * gnulib-tool (import): In the first-use case, provide defaults.
11245
11246 2005-09-01  Bruno Haible  <bruno@clisp.org>
11247
11248         * gnulib-tool (func_import): Remove the .tmp files.
11249
11250 2005-09-01  Bruno Haible  <bruno@clisp.org>
11251
11252         * gnulib-tool (func_import): Fix handling of symbolic links.
11253
11254 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11255
11256         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
11257         old glibc regex code mishandles strings longer than 2**31 bytes.
11258         This patch fixes this when the regex code is used in gnulib
11259         (i.e., outside glibc).
11260
11261         This patch should not affect the use of the regex code inside
11262         glibc.  No doubt this problem also needs to be handled for glibc
11263         as well, but the result will be an incompatible change to the
11264         glibc ABI, and the old ABI will have to be supported too.  That
11265         can be the the subject for another patch.
11266
11267         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
11268         governing whether the rest of this patch is active.  By default,
11269         the macro is disabled and the patch has no effect.
11270         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
11271         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
11272         (struct re_pattern_buffer, re_search, re_search_2, re_match):
11273         (re_match_2, re_set_registers): Use the new types.
11274         * lib/regex_internal.h (Idx, re_hashval_t): New types.
11275         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
11276         New macros.
11277         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
11278         (re_string_context_at, bin_tree_t, re_dfastate_t):
11279         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
11280         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
11281         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
11282         (re_string_char_size_at, re_string_wchar_at):
11283         (re_string_elem_size_at):
11284         Use the new types and macros to port to 64-bit hosts.
11285         Use unsigned types for internal values, so that the code
11286         mostly works even for arrays larger than SSIZE_MAX.
11287         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
11288         (search_duplicated_node, calc_eclosure_iter, fetch_number):
11289         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
11290         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
11291         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
11292         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
11293         (calc_inveclosure, parse_dup_op, build_range_exp):
11294         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
11295         (fetch_number, create_token_tree, mark_opt_subexp):
11296         Likewise.
11297         * lib/regex_internal.c (re_string_construct_common,
11298         create_ci_newstate):
11299         (create_cd_newstate, re_string_allocate, re_string_construct):
11300         (re_string_realloc_buffers, build_wcs_upper_buffer):
11301         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11302         (re_string_reconstruct, re_string_peek_byte_case):
11303         (re_string_fetch_byte_case, re_string_context_at):
11304         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11305         (re_node_set_init_copy, re_node_set_add_intersect):
11306         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11307         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11308         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11309         (re_acquire_state, re_acquire_state_context, register_state):
11310         Likewise.
11311         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
11312         search_cur_bkref_entry):
11313         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
11314         (re_search_internal, re_search_2_stub, re_search_stub)
11315         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11316         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11317         (update_cur_sifted_state, check_dst_limits):
11318         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11319         (check_subexp_limits, sift_states_bkref, merge_state_array):
11320         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11321         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11322         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11323         (expand_bkref_cache, check_node_accept_bytes):
11324         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11325         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11326         (acquire_init_state_context, check_halt_node_context):
11327         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11328         (sift_states_backward, clean_state_log_if_needed):
11329         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11330         (find_recover_state, transit_state_sb, transit_state_mb):
11331         (transit_state_bkref, build_trtable, match_ctx_clean):
11332         Likewise.
11333         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11334         to work around an assumption that REG_MISSING is negative.
11335
11336         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11337         (seek_collating_symbol_entry) [defined _LIBC]:
11338         (lookup_collation_sequence_value) [defined _LIBC]:
11339         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11340         Use prototypes rather than old-style function definitions.
11341         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11342         (transit_state_sb) [0]:
11343         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11344
11345         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11346         rm_eo.
11347
11348         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11349         (optimize_subexps, lower_subexp):
11350         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11351         since the signed shift might overflow.  Use 1u<<31 instead.
11352         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11353         Likewise.
11354         * lib/regexec.c (check_dst_limits_calc_pos_1,
11355         check_subexp_matching_top): Likewise.
11356
11357         * lib/regcomp.c (optimize_subexps, lower_subexp):
11358         Use CHAR_BIT rather than 8, for clarity.
11359         * lib/regexec.c (check_dst_limits_calc_pos_1):
11360         (check_subexp_matching_top): Likewise.
11361         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11362         have to worry about portability issues when shifting it left.
11363         Remove no-longer-needed test for table_size > 0.
11364         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11365         in a word, as the resulting behavior is undefined.
11366         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11367         in one case, a <= should have been an <, and in another case the
11368         whole test was missing.
11369         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11370         the standard name CHAR_BIT.
11371         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11372         this is not true on one's complement and signed-magnitude hosts.
11373
11374         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11375         next_last_offset.
11376         (struct re_dfa_t): Remove unused member states_alloc.
11377         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11378
11379 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11380
11381         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11382         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11383         and large-file glibc and in 32-bit large-file Solaris.
11384
11385 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11386
11387         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11388         lengths fit in regoff_t; this isn't true if regoff_t is the same
11389         width as size_t.
11390         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11391         (= START + RANGE) instead of RANGE.  This avoids overflow
11392         problems when regoff_t is the same width as size_t.
11393         All callers changed.
11394         (re_search_2_stub): Check for overflow when adding the
11395         sizes of the two strings.
11396         (re_search_stub): Check for overflow when adding START
11397         to RANGE; if it occurs, substitute the extreme value.
11398
11399 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11400
11401         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11402
11403 2005-08-31  Jim Meyering  <jim@meyering.net>
11404
11405         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11406         a pointer-to-const.
11407         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11408         (register_state): Likewise.
11409         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11410         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11411         (group_nodes_into_DFAstates): Likewise.
11412
11413 2005-08-31  Jim Meyering  <jim@meyering.net>
11414
11415         * check-module: Add a FIXME comment.
11416
11417 2005-08-31  Eric Blake  <ebb9@byu.net>
11418
11419         * modules/unistd-safer (Files): Add unistd--.h.
11420         * modules/stdio-safer (Files): Add stdio--.h.
11421
11422 2005-08-31  Derek Price  <derek@ximbiot.com>
11423
11424         * lib/getdelim.c (getdelim): Return EOF on EOF.
11425         Reported by Larry Jones <lawrence.jones@ugs.com>.
11426
11427 2005-08-31  Bruno Haible  <bruno@clisp.org>
11428
11429         Avoid unnecessary diffs in the generated lib/Makefile.am.
11430         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11431         the generated files.
11432         (func_import): Don't set cmd.
11433
11434 2005-08-31  Bruno Haible  <bruno@clisp.org>
11435
11436         * lib/strstr.c: Include <stddef.h>, for NULL.
11437         * lib/strcasestr.c: Likewise.
11438         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11439
11440 2005-08-31  Bruno Haible  <bruno@clisp.org>
11441
11442         * gnulib-tool: New option --macro-prefix.
11443         (func_import): Use macro_prefix.
11444         (import): Handle option --macro-prefix.
11445
11446 2005-08-31  Bruno Haible  <bruno@clisp.org>
11447
11448         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11449         Also use new variables cached_lgpl, cached_libtool.
11450
11451 2005-08-31  Bruno Haible  <bruno@clisp.org>
11452
11453         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11454         always instantiating them.
11455
11456 2005-08-31  Bruno Haible  <bruno@clisp.org>
11457
11458         * gnulib-tool (func_import): Read the previous cached settings
11459         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
11460         earlier added by gnulib but are now dropped. Warn when a gnulib file
11461         overwrites a non-gnulib file.
11462
11463 2005-08-31  Bruno Haible  <bruno@clisp.org>
11464
11465         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11466         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11467         projects that don't keep autogenerated files in CVS. Put into
11468         actioncmd only the specified modules, not the transitive closure.
11469
11470 2005-08-31  Bruno Haible  <bruno@clisp.org>
11471
11472         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11473         Create directories that shall be filled.
11474         (import): Don't look for gl_* macros in configure.ac. Recurse across
11475         all directories containing a gnulib-cache.m4 files, if meaningful.
11476
11477 2005-08-31  Bruno Haible  <bruno@clisp.org>
11478
11479         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
11480         (import): Set seen_libtool when we see gl_LIBTOOL.
11481
11482 2005-08-31  Bruno Haible  <bruno@clisp.org>
11483
11484         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
11485         declaration macro definitions from generated gnulib.m4.
11486
11487 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
11488
11489         * lib/iconvme.h: Add prototype for iconv_alloc.
11490
11491 2005-08-29  Simon Josefsson  <jas@extundo.com>
11492
11493         * lib/iconvme.c: Fix errno.
11494
11495 2005-08-29  Bruno Haible  <bruno@clisp.org>
11496
11497         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
11498         that it works when the directory contains spaces.
11499
11500 2005-08-29  Bruno Haible  <bruno@clisp.org>
11501
11502         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
11503
11504 2005-08-29  Bruno Haible  <bruno@clisp.org>
11505
11506         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
11507         Emit more advice.
11508
11509 2005-08-29  Bruno Haible  <bruno@clisp.org>
11510         and Stepan Kasal  <kasal@ucw.cz>
11511
11512         * check-module: If more parameters are given, check each of them
11513         separately; add more exceptions, as noted by Jim Meyering.
11514         (check_module): New procedure.
11515         (%exempt_header): Now contains all exceptions.
11516
11517 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
11518
11519         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
11520
11521 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
11522
11523         * lib/iconvme.c: Split iconv_string into iconv_alloc.
11524
11525 2005-08-28  Bruno Haible  <bruno@clisp.org>
11526
11527         * m4/gnulib-tool.m4: New file.
11528
11529 2005-08-27  Jim Meyering  <jim@meyering.net>
11530
11531         * modules/unistd-safer (Files): Add pipe-safer.c.
11532         * modules/fcntl-safer (Files): Add creat-safer.c.
11533
11534 2005-08-27  Jim Meyering  <jim@meyering.net>
11535
11536         * m4/stdlib-safer.m4: New file.  From coreutils.
11537         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11538         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11539         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11540         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11541         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11542
11543 2005-08-27  Jim Meyering  <jim@meyering.net>
11544
11545         * lib/fopen-safer.c: Merge minor changes from coreutils.
11546         * lib/dup-safer.c: Likewise.
11547         * lib/fd-safer.c: Likewise.
11548
11549         Merge from coreutils.
11550         * lib/stdio--.h: New file.
11551         * lib/stdlib--.h: New file.
11552         * lib/mkstemp-safer.c: New file.
11553
11554         GNU tar needs these.
11555         * lib/pipe-safer.c: New file.
11556         * lib/creat-safer.c: New file.
11557         * lib/fcntl--.h (creat): Define to creat_safer.
11558         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11559         * lib/unistd--.h (pipe): Define to pipe_safer.
11560         * lib/unistd-safer.h: Declare pipe_safer.
11561
11562 2005-08-26  Simon Josefsson  <jas@extundo.com>
11563
11564         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11565         Haible <bruno@clisp.org>.
11566
11567 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11568
11569         * lib/regex_internal.h: Remove all references to
11570         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11571         or better.
11572         (bitset_not, bitset_merge, bitset_not_merge):
11573         (bitset_mask, re_string_allocate, re_string_construct):
11574         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11575         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11576         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11577         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11578         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11579         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11580         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11581         (re_acquire_state_context):
11582         Remove unnecessary forward decls.
11583         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11584         Put __attribute at function definition,
11585         now that the function decl has been removed.
11586         * lib/regex_internal.c (re_string_peek_byte_case):
11587         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11588         Likewise.
11589
11590 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11591
11592         * m4/regex.m4: Add AC_PREREQ(2.50).
11593         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11594
11595 2005-08-25  Simon Josefsson  <jas@extundo.com>
11596
11597         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11598         __fsetlocking.
11599
11600 2005-08-25  Simon Josefsson  <jas@extundo.com>
11601
11602         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11603         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11604         GLIBC specific code.
11605
11606 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11607
11608         Make regex safe for g++.  This fixes one real bug (an "err"
11609         that should have been "*err").  g++ problem reported by
11610         Sam Steingold.
11611         * lib/regex_internal.h (re_calloc): New macro, consistent with
11612         re_malloc etc.  All callers of calloc changed to use re_calloc.
11613         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11614         not int.  All callers changed.
11615         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11616         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11617         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11618         (find_recover_state): Change "err" to "*err"; this fixes what
11619         appears to be a real bug.
11620         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11621         versus int.
11622
11623 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11624
11625         * modules/regex (Depends-on): Add malloc, since the code
11626         assumes that !malloc(0) means failure.
11627
11628 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11629
11630         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11631
11632         alloca modernization/simplification for regex.
11633         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11634         needs to be at the start of the file, and can be moved into
11635         regex_internal.h and simplified.
11636         * lib/regex_internal.h: Include <alloca.h>.
11637         (__libc_use_alloca) [!defined _LIBC]: New macro.
11638         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11639         now works outside glibc.
11640
11641 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11642
11643         * config/srclist.txt: Add glibc bugs 1241, 1245.
11644
11645 2005-08-25  Jim Meyering  <jim@meyering.net>
11646
11647         * lib/open-safer.c: Include <config.h>.
11648         Otherwise, we'd lose LARGEFILE support in any file using
11649         e.g. "fcntl--.h"
11650
11651 2005-08-25  Bruno Haible  <bruno@clisp.org>
11652
11653         * m4/minmax.m4: Require autoconf 2.52.
11654         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11655         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11656         alternatives of translit over the alphabet.
11657         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11658
11659 2005-08-24  Simon Josefsson  <jas@extundo.com>
11660
11661         * tests/test-getpass.c: New file.
11662
11663 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11664
11665         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11666         for GNU regex features.
11667
11668 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11669
11670         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11671         * lib/regex.h (regerror): Likewise.
11672
11673         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11674         requires this.  (The code never needed it.)
11675
11676         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11677         All uses of recently-renamed identifiers changed to use the new,
11678         POSIX-compliant names.  The code will build and run just fine
11679         without these changes, but it's better to eat our own dog food
11680         and use the standard-conforming names.
11681
11682         * lib/regex.h: Fix a multitude of POSIX name space violations.
11683         These changes have an effect only for programs that define
11684         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11685         do not change anything for programs compiled in the normal way.
11686         Also, there is no effect on the ABI.
11687
11688         (_REGEX_SOURCE): New macro.
11689         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11690         defined and _GNU_SOURCE is not; this fixes a name space violation.
11691
11692         Rename the following macros to obey POSIX requirements.
11693         The old names are still visible as macros if _REGEX_SOURCE is defined.
11694         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11695         RE_BACKSLASH_ESCAPE_IN_LISTS.
11696         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11697         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11698         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11699         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11700         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11701         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11702         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11703         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11704         (REG_INTERVALS): renamed from RE_INTERVALS.
11705         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11706         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11707         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11708         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11709         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11710         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11711         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11712         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11713         RE_UNMATCHED_RIGHT_PAREN_ORD.
11714         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11715         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11716         (REG_DEBUG): renamed from RE_DEBUG.
11717         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11718         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11719         unusual, since we can't clash with the POSIX REG_ICASE.
11720         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11721         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11722         (REG_NO_SUB): renamed from RE_NO_SUB.
11723         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11724         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11725         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11726         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11727         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11728         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11729         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11730         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11731         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11732         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11733         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11734         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11735         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11736         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11737         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11738         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11739         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11740         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11741         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11742         (REG_FIXED): Renamed from REGS_FIXED.
11743         (REG_NREGS): Renamed from RE_NREGS.
11744
11745         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11746         of other REG_* macros, since POSIX says the user is allowed to
11747         #undef these macros selectively.
11748
11749         (reg_errcode_t): Update comment stating what other tables need
11750         to be consistent.
11751
11752         Rename the following enum values to obey POSIX requirements.
11753         The old names are still visible as macros.
11754         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11755         is not defined, since GNU is supposed to be a superset of POSIX as
11756         much as possible, and since we want reg_errcode_t to be a signed
11757         type for implementation consistency.
11758         (_REG_NOERROR): Renamed from REG_NOERROR.
11759         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11760         (_REG_BADPAT): Renamed from REG_BADPAT.
11761         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11762         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11763         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11764         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11765         (_REG_EBRACK): Renamed from REG_EBRACK.
11766         (_REG_EPAREN): Renamed from REG_EPAREN.
11767         (_REG_EBRACE): Renamed from REG_EBRACE.
11768         (_REG_BADBR): Renamed from REG_BADBR.
11769         (_REG_ERANGE): Renamed from REG_ERANGE.
11770         (_REG_ESPACE): Renamed from REG_ESPACE.
11771         (_REG_BADRPT): Renamed from REG_BADRPT.
11772         (_REG_EEND): Renamed from REG_EEND.
11773         (_REG_ESIZE): Renamed from REG_ESIZE.
11774         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11775         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11776         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11777         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11778         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11779
11780         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11781         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11782         changed.  But support the old name if the new one is not defined
11783         and if _REGEX_SOURCE.
11784
11785         Change the following member names in struct re_pattern_buffer.
11786         The old names are still supported if !_REGEX_SOURCE.
11787         The new names are always supported, regardless of _REGEX_SOURCE.
11788         (re_buffer): Renamed from buffer.
11789         (re_allocated): Renamed from allocated.
11790         (re_used): Renamed from used.
11791         (re_syntax): Renamed from syntax.
11792         (re_fastmap): Renamed from fastmap.
11793         (re_translate): Renamed from translate.
11794         (re_can_be_null): Renamed from can_be_null.
11795         (re_regs_allocated): Renamed from regs_allocated.
11796         (re_fastmap_accurate): Renamed from fastmap_accurate.
11797         (re_no_sub): Renamed from no_sub.
11798         (re_not_bol): Renamed from not_bol.
11799         (re_not_eol): Renamed from not_eol.
11800         (re_newline_anchor): Renamed from newline_anchor.
11801
11802         Change the following member names in struct re_registers.
11803         The old names are still supported if !_REGEX_SOURCE.
11804         The new names are always supported, regardless of _REGEX_SOURCE.
11805         (rm_num_regs): Renamed from num_regs.
11806         (rm_start): Renamed from start.
11807         (rm_end): Renamed from end.
11808
11809         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
11810         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
11811         Prepend __ to parameter names.
11812
11813         Undo yesterday's changes.
11814
11815 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11816
11817         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
11818         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
11819         lib/regex.c.
11820
11821 2005-08-24  Jim Meyering  <jim@meyering.net>
11822
11823         Sync from coreutils.
11824         * m4/fcntl-safer.m4: New file.
11825
11826         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
11827         and object files for this module.
11828
11829 2005-08-24  Jim Meyering  <jim@meyering.net>
11830
11831         Sync from coreutils.
11832         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
11833
11834 2005-08-24  Jim Meyering  <jim@meyering.net>
11835
11836         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
11837         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
11838
11839 2005-08-24  Jim Meyering  <jim@meyering.net>
11840
11841         * modules/fcntl-safer: New module.
11842         * modules/fts (Depends-on): Add fcntl-safer.
11843         * MODULES.html.sh (File descriptor based Input/Output):
11844         Add fcntl-safer.
11845
11846 2005-08-24  Bruno Haible  <bruno@clisp.org>
11847
11848         Support for unit test modules.
11849         * modules/README: Mention tests modules.
11850         * modules/TEMPLATE-TESTS: New file.
11851         * gnulib-tool: New options --extract-tests-module, --with-tests and
11852         --tests-base (unused for the moment).
11853         (testsbase, inctests): New variables.
11854         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
11855         (func_verify_module): Exclude TEMPLATE-TESTS.
11856         (func_verify_nontests_module, func_verify_tests_module): New functions.
11857         (func_get_dependencies): Add implicit dependency for tests modules.
11858         (func_get_tests_module): New function.
11859         (func_modules_transitive_closure): When --with-tests was specified,
11860         include the unit tests as well, unless explicitly avoided.
11861         (func_emit_lib_Makefile_am): Ignore the tests modules here.
11862         (func_emit_tests_Makefile_am): New function.
11863         (func_create_testdir): When --with-tests was specified, emit a
11864         tests/ directory.
11865         * MODULES.html.sh (Future developments): Update.
11866
11867 2005-08-24  Bruno Haible  <bruno@clisp.org>
11868
11869         * modules/tls-tests: New file.
11870         * tests/test-tls.c: New file, from GNU gettext.
11871
11872 2005-08-24  Bruno Haible  <bruno@clisp.org>
11873
11874         * modules/lock-tests: New file.
11875         * tests/test-lock.c: New file, from GNU gettext.
11876
11877 2005-08-24  Bruno Haible  <bruno@clisp.org>
11878
11879         * lib/lock.h: Add multiple inclusion guard.
11880         * lib/tls.h: Add multiple inclusion guard.
11881
11882 2005-08-24  Bruno Haible  <bruno@clisp.org>
11883
11884         * gnulib-tool: Add support for the --aux-dir option to
11885         --create-testdir, --create-megatestdir, --test, --megatest.
11886         (func_create_testdir, func_create_megatestdir): Optionally emit a
11887         AC_CONFIG_AUX_DIR directive.
11888         (create-testdir, create-megatestdir, test, megatest): Provide a
11889         default value for $auxdir.
11890
11891 2005-08-24  Bruno Haible  <bruno@clisp.org>
11892
11893         * gnulib-tool (import): Use compound statement instead of subshell
11894         where possible.
11895
11896 2005-08-24  Bruno Haible  <bruno@clisp.org>
11897
11898         * gnulib-tool (import): Change --aux-dir default to "build-aux".
11899
11900 2005-08-24  Bruno Haible  <bruno@clisp.org>
11901
11902         * gnulib-tool (func_version): Update.
11903
11904 2005-08-24  Bruno Haible  <bruno@clisp.org>
11905
11906         * gnulib-tool (func_import, func_create_testdir,
11907         func_create_megatestdir): Quote all autoconf macro arguments.
11908
11909 2005-08-24  Bruno Haible  <bruno@clisp.org>
11910
11911         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
11912         option --force, because --force causes the aclocal.m4 of each
11913         subdirectory to be newer than the corresponding config.h.in.
11914
11915 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11916
11917         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
11918         All contents moved to gl_REGEX.
11919         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
11920         assume that it does.
11921
11922 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11923
11924         * lib/regex.h (REG_NOSYS)
11925         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
11926         Define, since POSIX requires it as of 2001.
11927         (_REG_ENOSYS)
11928         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
11929         New private symbol, used to keep the enum signed in all cases.
11930         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
11931         Youngman in
11932         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
11933
11934         * lib/regex_internal.c (re_string_skip_chars, register_state):
11935         (calc_state_hash):
11936         Remove forward decls; no longer needed now that we use prototypes.
11937         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
11938         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
11939         (clean_state_log_if_needed): Likewise.
11940
11941 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11942
11943         * config/srclist.txt: Add glibc bugs 1231-1233.
11944
11945 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11946
11947         Fix problems reported by Sam Steingold in
11948         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
11949         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
11950         assumed that reg_errcode_t is a signed type, which is not
11951         necessarily true if _XOPEN_SOURCE is not defined.
11952         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
11953         since some compilers warn about it otherwise.
11954
11955 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11956
11957         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
11958         (init_word_char, create_initial_state, duplicate_node_closure):
11959         (fetch_token, peek_token_bracket, build_range_exp):
11960         (build_collating_symbol): Remove forward decls; no longer needed
11961         now that we use prototypes.
11962
11963         * lib/regcomp.c:
11964         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
11965         (re_compile_fastmap_iter, regcomp, regerror, regfree):
11966         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
11967         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
11968         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
11969         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
11970         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
11971         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
11972         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
11973         (build_range_exp, build_collating_symbol, parse_bracket_exp):
11974         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
11975         (build_charclass, build_charclass_op, fetch_number, create_tree):
11976         (create_token_tree, mark_opt_subexp, duplicate_tree):
11977         Use prototypes rather than old-style definitions.
11978
11979         * lib/regex_internal.c:
11980         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
11981         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
11982         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11983         (re_string_reconstruct, re_string_peek_byte_case):
11984         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
11985         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11986         (re_node_set_init_copy, re_node_set_add_intersect):
11987         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11988         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11989         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11990         (re_acquire_state, re_acquire_state_context, register_state):
11991         (create_ci_newstate, create_cd_newstate, free_state):
11992         Likewise.
11993         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
11994         re_search_2):
11995         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
11996         (re_search_internal, prune_impossible_nodes):
11997         (acquire_init_state_context, check_matching, static):
11998         (check_halt_node_context, check_halt_state_context, proceed_next_node):
11999         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
12000         (update_regs, sift_states_backward, build_sifted_states):
12001         (clean_state_log_if_needed, merge_state_array):
12002         (update_cur_sifted_state, add_epsilon_src_nodes):
12003         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
12004         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
12005         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
12006         (find_recover_state, check_subexp_matching_top, transit_state_mb):
12007         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
12008         (check_arrival, check_arrival_add_next_nodes):
12009         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12010         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12011         (check_node_accept_bytes, check_node_accept, extend_buffers):
12012         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
12013         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
12014         (sift_ctx_init):
12015         Likewise.
12016
12017         * lib/regex_internal.h:
12018         (re_string_allocate, re_string_construct, re_string_reconstruct):
12019         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
12020         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
12021         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
12022         (re_string_context_at, re_string_peek_byte_case):
12023         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
12024         is defined, since we now use prototypes always.
12025
12026         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
12027         C89 or better.  All uses removed.
12028
12029 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12030
12031         * config/srclist.txt: Add glibc bugs 1220-1227.
12032
12033 2005-08-20  Jim Meyering  <jim@meyering.net>
12034
12035         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
12036         of unused local, dfa.
12037
12038 2005-08-20  Bruno Haible  <bruno@clisp.org>
12039
12040         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12041
12042 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12043
12044         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12045         (re_node_set_insert_last, re_dfa_add_node):
12046         Rename local variables to avoid GCC shadowing warnings.
12047
12048 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12049
12050         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12051         [defined lint]: Suppress bogus uninitialized-variable warnings.
12052
12053         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12054         and let the caller return REG_ESPACE if out of space.  This
12055         removes an uninitialied-variable warning with GCC 4.0.1, and also
12056         avoids taking the address of a local variable.  All callers
12057         changed.
12058
12059 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12060
12061         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12062         $LIBCSRC/posix/regexec.c.
12063         Add glibc bug 1217 for regcomp.c.
12064
12065 2005-08-19  Jim Meyering  <jim@meyering.net>
12066
12067         * lib/regexec.c (proceed_next_node): Redo local variables to
12068         avoid GCC shadowing warnings.
12069
12070 2005-08-18  Bruno Haible  <bruno@clisp.org>
12071
12072         * lib/strstr.c (strstr): Fix return value in multibyte case.
12073         * lib/strcasestr.c (strcasestr): Likewise.
12074
12075 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12076
12077         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12078
12079 2005-08-17  Jim Meyering  <jim@meyering.net>
12080
12081         Make the %s format (seconds since the epoch) work for a negative
12082         number and when used with a zero-padded field width, e.g. %015s.
12083
12084         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
12085         label so that it precedes the code to set `digits'.  Otherwise,
12086         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
12087         print `00-22'.  Now, it prints `-0022', as it should.
12088
12089 2005-08-17  Bruno Haible  <bruno@clisp.org>
12090
12091         * modules/strstr (Files): Add m4/mbrtowc.m4.
12092         (Depends-on): Add mbuiter.
12093
12094 2005-08-17  Bruno Haible  <bruno@clisp.org>
12095
12096         * modules/strcasestr: New file.
12097         * MODULES.html.sh (String handling, based on ANSI C 89): Add
12098         strcasestr.
12099
12100 2005-08-17  Bruno Haible  <bruno@clisp.org>
12101
12102         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
12103
12104 2005-08-17  Bruno Haible  <bruno@clisp.org>
12105
12106         * modules/mbuiter: New file.
12107         * MODULES.html.sh (Extended multibyte and wide character utilities):
12108         Add mbuiter.
12109
12110 2005-08-17  Bruno Haible  <bruno@clisp.org>
12111
12112         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
12113         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
12114
12115 2005-08-17  Bruno Haible  <bruno@clisp.org>
12116
12117         * m4/strcasestr.m4: New file.
12118
12119 2005-08-17  Bruno Haible  <bruno@clisp.org>
12120
12121         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
12122         * lib/strstr.c: Completely rewritten, with multibyte locale support.
12123
12124 2005-08-17  Bruno Haible  <bruno@clisp.org>
12125
12126         * lib/strcasestr.h: New file.
12127         * lib/strcasestr.c: New file.
12128
12129 2005-08-17  Bruno Haible  <bruno@clisp.org>
12130
12131         * lib/strcasecmp.c: Use mbuiter.h.
12132
12133 2005-08-17  Bruno Haible  <bruno@clisp.org>
12134
12135         * lib/mbuiter.h: New file.
12136
12137 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12138
12139         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
12140         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
12141         and gl_GETOPT are both invoked via different paths (as happens
12142         with GNU tar CVS because it uses both argp and getopt), the former
12143         wins.
12144
12145 2005-08-16  Bruno Haible  <bruno@clisp.org>
12146
12147         * modules/tls: New file.
12148         * MODULES.html.sh (Multithreading): Add tls.
12149
12150 2005-08-16  Bruno Haible  <bruno@clisp.org>
12151
12152         * modules/strnlen1: New file.
12153         * MODULES.html.sh (String handling): Add strnlen1.
12154
12155 2005-08-16  Bruno Haible  <bruno@clisp.org>
12156
12157         * modules/strcase (Files): Add m4/mbrtowc.m4.
12158         (Depends-on): Add strnlen1, mbchar.
12159
12160 2005-08-16  Bruno Haible  <bruno@clisp.org>
12161
12162         * modules/mbiter: New file.
12163         * MODULES.html.sh (Extended multibyte and wide character utilities):
12164         Add mbiter.
12165
12166 2005-08-16  Bruno Haible  <bruno@clisp.org>
12167
12168         * modules/mbfile: New file.
12169         * MODULES.html.sh (Extended multibyte and wide character utilities):
12170         Add mbfile.
12171
12172 2005-08-16  Bruno Haible  <bruno@clisp.org>
12173
12174         * modules/mbchar: New file.
12175         * MODULES.html.sh (Extended multibyte and wide character utilities):
12176         New section.
12177
12178 2005-08-16  Bruno Haible  <bruno@clisp.org>
12179
12180         * m4/tls.m4: New file, from GNU gettext.
12181
12182 2005-08-16  Bruno Haible  <bruno@clisp.org>
12183
12184         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
12185         always.
12186         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
12187
12188 2005-08-16  Bruno Haible  <bruno@clisp.org>
12189
12190         * m4/mbiter.m4: New file.
12191
12192 2005-08-16  Bruno Haible  <bruno@clisp.org>
12193
12194         * m4/mbfile.m4: New file.
12195
12196 2005-08-16  Bruno Haible  <bruno@clisp.org>
12197
12198         * m4/mbchar.m4: New file.
12199
12200 2005-08-16  Bruno Haible  <bruno@clisp.org>
12201
12202         * lib/tls.h: New file, from GNU gettext.
12203         * lib/tls.c: New file, from GNU gettext.
12204
12205 2005-08-16  Bruno Haible  <bruno@clisp.org>
12206
12207         * lib/strnlen1.h: New file.
12208         * lib/strnlen1.c: New file.
12209
12210 2005-08-16  Bruno Haible  <bruno@clisp.org>
12211
12212         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
12213         (mbi_init): Update.
12214         (mbi_avail, mbi_advance): Let the iteration end before the terminating
12215         NUL byte, not after it.
12216
12217 2005-08-16  Bruno Haible  <bruno@clisp.org>
12218
12219         * lib/strcase.h (strcasecmp): Add note in comments.
12220         * lib/strncasecmp.c: Use code from strcasecmp.c.
12221         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
12222         (strcasecmp): Work correctly in multibyte locales.
12223
12224 2005-08-16  Bruno Haible  <bruno@clisp.org>
12225
12226         * lib/mbiter.h: New file.
12227
12228 2005-08-16  Bruno Haible  <bruno@clisp.org>
12229
12230         * lib/mbfile.h: New file.
12231
12232 2005-08-16  Bruno Haible  <bruno@clisp.org>
12233
12234         * lib/mbchar.h: New file.
12235         * lib/mbchar.c: New file.
12236
12237 2005-08-16  Bruno Haible  <bruno@clisp.org>
12238
12239         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
12240         the valid ones. Makes the comparison operations transitive:
12241         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
12242         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
12243
12244 2005-08-15  Simon Josefsson  <jas@extundo.com>
12245
12246         * modules/ssize_t (License): Change to 'unlimited'.
12247
12248         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
12249
12250 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12251
12252         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
12253         Add comments for each pending glibc patch.
12254
12255 2005-08-15  Bruno Haible  <bruno@clisp.org>
12256
12257         * lib/regex.h (__restrict_arr): Don't define to __restrict if
12258         __cplusplus is defined.
12259
12260 2005-08-14  Jim Meyering  <jim@meyering.net>
12261
12262         Sync from coreutils.
12263
12264         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
12265         Use the hash-table-based cycle-detection code not just when
12266         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
12267         Reported by James Youngman in
12268         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
12269         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
12270         FTS_TIGHT_CYCLE_CHECK.
12271         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
12272         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
12273         once again.
12274         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
12275         * lib/fts.c (fd_safer): Remove decl.
12276         Include fcntl--.h rather than unistd-safer.h
12277         (fts_safe_changedir): Don't call fd_safer; no longer needed
12278         now that we include fcntl--.h.
12279
12280 2005-08-12  Simon Josefsson  <jas@extundo.com>
12281
12282         * modules/getndelim2: Use ssize_t module.
12283         * modules/getnline: Likewise.
12284         * modules/safe-read: Likewise.
12285         * modules/xreadlink: Likewise.
12286
12287         * modules/ssize_t: New file.
12288
12289 2005-08-12  Simon Josefsson  <jas@extundo.com>
12290
12291         * m4/readline.m4: Look for termcap, curses or ncurses if required.
12292
12293 2005-08-12  Simon Josefsson  <jas@extundo.com>
12294
12295         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12296         ssize_t.
12297
12298 2005-08-12  Simon Josefsson  <jas@extundo.com>
12299
12300         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
12301         readline, getdelim and check_version.
12302         (Support for systems lacking ISO C 99: Sizes of integer types):
12303         Add size_max.
12304
12305 2005-08-12  Bruno Haible  <bruno@clisp.org>
12306
12307         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
12308
12309 2005-08-11  Simon Josefsson  <jas@extundo.com>
12310
12311         * modules/readline: New file.
12312
12313         * modules/strnlen (Files): Add strnlen.h.
12314
12315 2005-08-11  Simon Josefsson  <jas@extundo.com>
12316
12317         * m4/readline.m4: New file.
12318
12319 2005-08-11  Simon Josefsson  <jas@extundo.com>
12320
12321         * lib/readline.h, readline.c: New file.
12322
12323 2005-08-11  Simon Josefsson  <jas@extundo.com>
12324
12325         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12326         gl_AVOID.
12327
12328 2005-08-11  Bruno Haible  <bruno@clisp.org>
12329
12330         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12331
12332 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12333
12334         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12335
12336 2005-08-10  Simon Josefsson  <jas@extundo.com>
12337
12338         * tests/test-iconvme.c: New file.
12339
12340 2005-08-10  Simon Josefsson  <jas@extundo.com>
12341
12342         * m4/strnlen.m4: New file.
12343
12344         * m4/strndup.m4: Don't check for strnlen declaration, done in
12345         strnlen.m4.
12346
12347 2005-08-10  Simon Josefsson  <jas@extundo.com>
12348
12349         * lib/strndup.c: Use strnlen.h.
12350
12351         * lib/strnlen.h: New file.
12352
12353 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12354
12355         * README: Typos.
12356
12357 2005-08-02  Simon Josefsson  <jas@extundo.com>
12358
12359         * modules/readline: New file.
12360
12361 2005-08-02  Simon Josefsson  <jas@extundo.com>
12362
12363         * modules/getdelim: New file.
12364
12365         * modules/getline: Rewrite, don't use getndelim2.
12366
12367 2005-08-02  Simon Josefsson  <jas@extundo.com>
12368
12369         * m4/getline.m4: Separate out getdelim stuff into separate module.
12370
12371         * m4/getdelim.m4: New file.
12372
12373 2005-08-02  Simon Josefsson  <jas@extundo.com>
12374
12375         * lib/getline.h, getline.c: Rewrite.
12376
12377         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12378
12379 2005-07-31  Bruno Haible  <bruno@clisp.org>
12380
12381         * lib/lock.h (gl_lock_initializer): New macro.
12382         (gl_lock_define_initialized): Use it.
12383         (gl_rwlock_initializer): New macro.
12384         (gl_rwlock_define_initialized): Use it.
12385         (gl_recursive_lock_initializer): New macro.
12386         (gl_recursive_lock_define_initialized): Use it.
12387
12388 2005-07-30  Karl Berry  <karl@gnu.org>
12389
12390         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12391         Report from Ben Pfaff, regarding getopt.
12392
12393 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12394
12395         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12396         normal way.
12397         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12398         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12399         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12400         (gl_GETOPT): Use the new macros.  Most of the implementation
12401         is moved to the new macros.  This is for programs like Emacs
12402         that don't want all the functionality of gl_GETOPT.
12403
12404 2005-07-26  Bruno Haible  <bruno@clisp.org>
12405
12406         * m4/lock.m4: Update from GNU gettext.
12407
12408 2005-07-26  Bruno Haible  <bruno@clisp.org>
12409
12410         * lib/lock.h: Update from GNU gettext.
12411         * lib/lock.c: Update from GNU gettext.
12412
12413 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12414
12415         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12416         obsolescent AC_TRY_RUN.  Include the default includes files, for
12417         'exit'.
12418
12419 2005-07-24  Bruno Haible  <bruno@clisp.org>
12420
12421         * modules/visibility: New file.
12422         * MODULES.html.sh (Misc): Add visibility.
12423
12424 2005-07-24  Bruno Haible  <bruno@clisp.org>
12425
12426         * m4/visibility.m4: New file.
12427
12428 2005-07-24  Bruno Haible  <bruno@clisp.org>
12429
12430         * doc/visibility.texi: New file.
12431
12432 2005-07-22  Bruno Haible  <bruno@clisp.org>
12433
12434         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12435         $(ALLOCA_H), redundant through BUILT_SOURCES.
12436         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12437         redundant through BUILT_SOURCES.
12438         * modules/byteswap (Makefile.am): Remove explicit dependency on
12439         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12440         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12441         $(FNMATCH_H), redundant through BUILT_SOURCES.
12442         * modules/getopt (Makefile.am): Remove explicit dependency on
12443         $(GETOPT_H), redundant through BUILT_SOURCES.
12444         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12445         redundant through BUILT_SOURCES.
12446         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12447         redundant through BUILT_SOURCES.
12448         * modules/stdbool (Makefile.am): Remove explicit dependency on
12449         $(STDBOOL_H), redundant through BUILT_SOURCES.
12450         * modules/stdint (Makefile.am): Remove explicit dependency on
12451         $(STDINT_H), redundant through BUILT_SOURCES.
12452         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12453         Remove explicit dependency on $(SYSEXITS_H).
12454         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
12455
12456 2005-07-18  Simon Josefsson  <jas@extundo.com>
12457
12458         * lib/check-version.c (check_version): Accept identical versions too.
12459
12460 2005-07-18  Bruno Haible  <bruno@clisp.org>
12461
12462         * modules/lock: New file.
12463         * MODULES.html.sh (Multithreading): New section.
12464
12465 2005-07-18  Bruno Haible  <bruno@clisp.org>
12466
12467         * m4/lock.m4: New file, from GNU gettext.
12468
12469 2005-07-18  Bruno Haible  <bruno@clisp.org>
12470
12471         * lib/lock.h: New file, from GNU gettext.
12472         * lib/lock.c: New file, from GNU gettext.
12473
12474 2005-07-18  Bruno Haible  <bruno@clisp.org>
12475
12476         * lib/lock.h (gl_once_t): New type.
12477         (gl_once_define, gl_once): New macros.
12478         * lib/lock.c (fresh_once): New variable.
12479         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
12480         functions.
12481
12482 2005-07-16  Simon Josefsson  <jas@extundo.com>
12483
12484         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
12485         workaround, suggested by Bruno.
12486
12487 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12488
12489         * modules/xalloc (Depends-on): Add xalloc-die.
12490         * modules/xvasprintf (Depends-on): Add xalloc-die.
12491
12492 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12493
12494         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
12495         with a minor change.
12496
12497 2005-07-15  Bruno Haible  <bruno@clisp.org>
12498
12499         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
12500         When using lib/poll.c, define poll as rpl_poll.
12501
12502 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
12503
12504         * modules/argp (Depends-on): Remove unlocked-io.
12505
12506 2005-07-14  Derek Price  <derek@ximbiot.com>
12507
12508         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
12509         for glob symlink bug.
12510
12511 2005-07-14  Bruno Haible  <bruno@clisp.org>
12512
12513         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
12514         Instead, test for *_unlocked function declarations directly.
12515
12516 2005-07-11  Simon Josefsson  <jas@extundo.com>
12517
12518         * modules/size_max: New file.
12519
12520         * modules/xsize: Depend on size_max module for size_max.m4.
12521
12522 2005-07-11  Simon Josefsson  <jas@extundo.com>
12523
12524         * lib/size_max.h: New file.
12525
12526 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12527
12528         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12529         copyright symbol and the year.
12530         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12531         (version_etc_va): Use parameterized copyright notice.
12532         Reword to conform to the current GNU coding standards.
12533
12534 2005-07-11  Karl Berry  <karl@gnu.org>
12535
12536         * doc/gnulib.texi (Quoting): new node.
12537         (Initial import): more info, from Patrice.
12538
12539 2005-07-11  Bruno Haible  <bruno@clisp.org>
12540
12541         * gnulib-tool (func_usage): Document option --avoid.
12542         (Command line options): Handle --avoid.
12543         (func_acceptable): New function.
12544         (func_modules_transitive_closure): Use it.
12545
12546 2005-07-11  Bruno Haible  <bruno@clisp.org>
12547
12548         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12549         Reported by Jim Meyering.
12550
12551 2005-07-10  Bruno Haible  <bruno@clisp.org>
12552
12553         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12554         Needed when size_t is smaller than 'unsigned int'.
12555         Reported by Paul Eggert.
12556
12557 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12558
12559         * modules/argp (Depends-on): Add unlocked-io
12560
12561 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12562
12563         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12564         block of defines.
12565
12566 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12567
12568         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12569         fix now.
12570
12571 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12572         and Paul Eggert  <eggert@cs.ucla.edu>
12573
12574         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12575         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12576
12577 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12578
12579         * modules/regex (Files): Add lib/regex_internal.c,
12580         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12581         (Depends-on): Add extensions.
12582         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12583
12584 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12585
12586         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12587         pathconf.
12588         * m4/same.m4 (gl_SAME): Likewise.
12589         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12590
12591         * m4/regex.m4: Adjust to new libc regex implementation.
12592         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12593         all the .c and .h parts of (the new) regex.
12594         Quote the m4 stuff better.
12595         Check for RE_ICASE bug of old gnulib.
12596         Check for REG_STARTEND of recent libc.
12597         Rename local variables from jm_* to gl_*.
12598         Quote operand of "test -f".
12599         Say "recent enough" version of libc, not "version 2".
12600         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12601         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12602         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12603         Remove check for btowc, isascii.
12604         Require AM_LANGINFO_CODESET.
12605
12606 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12607
12608         * lib/regex.c, regex.h: Sync from libc.
12609         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12610         * lib/regexec.c:
12611         New files, synced from libc, except that regex_internal.h
12612         currently has a small porting fix.
12613
12614 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12615
12616         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12617         regex_internal.c, regexec.c.
12618         Add regex_internal.h too, but as a comment, since the libc version
12619         is currently broken in gnulib mode.
12620
12621 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12622
12623         Support programs like Emacs that use gnulib but not gettext.
12624         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12625         * modules/gettext-h: New file.
12626         * modules/gettext (Files): Remove lib/gettext.h.
12627         (Depends-on): Add gettext-h.
12628         (Makefile.am): Remove lib_SOURCES.
12629         * modules/argmatch, modules/c-stack, modules/closeout:
12630         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12631         * modules/execute, modules/file-type, modules/getaddrinfo:
12632         * modules/getopt, modules/human, modules/javacomp:
12633         * modules/javaexec, modules/mkdir-p, modules/obstack:
12634         * modules/openat, modules/pagealign_alloc, modules/pipe:
12635         * modules/quotearg, modules/regex, modules/rpmatch:
12636         * modules/unicodeio, modules/userspec, modules/version-etc:
12637         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12638         * modules/xsetenv:
12639         Depend on gettext-h, not gettext.
12640
12641 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12642
12643         * gnulib-tool (func_import): Add support for 'public domain' license.
12644         * modules/alloca, modules/atexit, modules/memmove:
12645         Now public domain, not GPL.
12646         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12647         * modules/realloc, modules/strerror, modules/strtod:
12648         Now LGPL, not GPL.
12649
12650 2005-07-05  Bruno Haible  <bruno@clisp.org>
12651
12652         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12653         autoconf CVS. Needed for mingw.
12654
12655 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12656
12657         Remove the dependency of the strftime module on the tzset module.
12658         * modules/strftime (Depends-on): Remove dependency on tzset.
12659
12660 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12661
12662         Remove the dependency of the strftime module on the tzset module.
12663         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12664         gl_FUNC_TZSET_CLOBBER.
12665
12666 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12667
12668         Remove the dependency of the strftime module on the tzset module.
12669         * lib/strftime.c (my_strftime)
12670         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12671         Copy the input structure, to work around some of the bug with
12672         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12673         Solaris releases, you should also use the tzset module, but we won't
12674         require it as a dependency any more since we don't want LGPLed code
12675         to depend on GPLed code.
12676
12677 2005-07-02  Jim Meyering  <jim@meyering.net>
12678
12679         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12680         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12681         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12682         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12683
12684 2005-07-02  Jim Meyering  <jim@meyering.net>
12685
12686         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12687
12688 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12689
12690         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12691         declares only 'struct timespec;' (!).
12692
12693 2005-07-01  Jim Meyering  <jim@meyering.net>
12694
12695         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12696         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12697         * lib/save-cwd.c, tempname.c:
12698         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12699         and don't include <sys/file.h>).
12700
12701 2005-06-29  Jim Meyering  <jim@meyering.net>
12702
12703         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12704         type name.  Use the variable name instead.
12705         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12706         Likewise.
12707
12708 2005-06-28  Simon Josefsson  <jas@extundo.com>
12709
12710         * modules/check-version (Files): Add check-version.m4.
12711
12712 2005-06-28  Simon Josefsson  <jas@extundo.com>
12713
12714         * m4/check-version.m4: New file, suggested by Jim Meyering
12715         <jim@meyering.net>.
12716
12717 2005-06-28  Simon Josefsson  <jas@extundo.com>
12718
12719         * lib/check-version.h, lib/check-version.c: New files.
12720
12721 2005-06-28  Simon Josefsson  <jas@extundo.com>
12722
12723         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12724         collision with global variable.  Better indentation.  Don't
12725         increment buffer pointer beyond buffer end.  Based on comments
12726         from Paul Eggert <eggert@cs.ucla.edu>.
12727
12728         * lib/base64.h: Indent.
12729
12730 2005-06-28  Simon Josefsson  <jas@extundo.com>
12731
12732         * doc/gnulib.texi (Library version handling): New section.
12733
12734 2005-06-28  Jim Meyering  <jim@meyering.net>
12735
12736         * check-module (find_included_lib_files): Hard-code another
12737         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12738         but modules/fts-lgpl (correctly) does not list those files.
12739
12740         * modules/canonicalize (Files): Add lib/pathmax.h.
12741
12742 2005-06-25  Simon Josefsson  <jas@extundo.com>
12743
12744         * modules/check-version: New file.
12745
12746 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12747
12748         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12749         initializer of struct addrinfo, as an indication that we don't
12750         care how many members the structure has.
12751
12752 2005-06-24  Derek Price  <derek@ximbiot.com>
12753         and Bruno Haible  <bruno@clisp.org>
12754
12755         Remove stat module & update lstat.
12756         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12757         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12758         * m4/stat.m4: Remove this file.
12759
12760 2005-06-24  Derek Price  <derek@ximbiot.com>
12761         and Bruno Haible  <bruno@clisp.org>
12762
12763         Remove stat module & update lstat.
12764         * lib/stat.c: Remove this file...
12765         (slash_aware_lstat): ...moving this content and its support...
12766         * lib/lstat.c (rpl_lstat): ...into here.
12767         * lib/lstat.h: New file.
12768
12769 2005-06-24  Derek Price  <derek@ximbiot.com>
12770         and Bruno Haible  <bruno@clisp.org>
12771
12772         Remove stat module & update lstat.
12773         * config/srclist.txt (libc sources): Remove stat.
12774
12775 2005-06-24  Derek Price  <derek@ximbiot.com>
12776         and Bruno Haible  <bruno@clisp.org>
12777
12778         Remove stat module & update lstat.
12779         * MODULES.html.sh (stat): Remove.
12780         * MODULES.html: Regenerated.
12781         * modules/lstat (Description): Correct function name.
12782         (Files): Add "lstat.h".
12783         (Depends-on): Remove stat, add xalloc, stat-macros.
12784         * modules/stat: Remove this file.
12785         (Include): Add "lstat.h", remove <sys/stat.h>.
12786
12787 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12788
12789         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12790         (ranged_convert): Don't save conversion in a temporary struct.
12791         This causes a warning with GCC 4.0.0, and anyway in the typical
12792         case it's not worth the extra 100 bytes or so of code.
12793         (ranged_convert, __mktime_internal): When calling a function via a
12794         pointer P, use P () rather than (*P) (), as we now assume C89 or
12795         better.
12796
12797 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12798
12799         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
12800         "who -r" failed to give output.  Problem reported by Tim Waugh.
12801
12802         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
12803         (xcalloc): Use it to avoid needless tests.
12804         Problem reported by Jim Meyering.
12805
12806 2005-06-20  Derek Price  <derek@ximbiot.com>
12807
12808         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
12809         unnecessary for Autoconfs > 2.59c.
12810
12811 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12812
12813         * lib/argp.h (__option_is_short): Check upper limit of
12814         __key. Isprint() requires its argument to have the value
12815         of an unsigned char or EOF.
12816
12817 2005-06-16  Jim Meyering  <jim@meyering.net>
12818
12819         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
12820         when either N or S is zero.
12821
12822 2005-06-16  Derek Price  <derek@ximbiot.com>
12823
12824         * m4/bison.m4: Declare YACC & YFLAGS precious.
12825
12826 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
12827
12828         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
12829         multibyte string or pattern, fall back on unibyte matching.
12830         Problem reported by James Youngman.
12831
12832 2005-06-08  Bruno Haible  <bruno@clisp.org>
12833
12834         * modules/csharpcomp: New file.
12835         * MODULES.html.sh (C#): Add csharpcomp.
12836
12837 2005-06-08  Bruno Haible  <bruno@clisp.org>
12838
12839         * m4/csharpcomp.m4: New file, from GNU gettext.
12840
12841 2005-06-08  Bruno Haible  <bruno@clisp.org>
12842
12843         * lib/csharpcomp.h: New file, from GNU gettext.
12844         * lib/csharpcomp.c: New file, from GNU gettext.
12845         * lib/csharpcomp.sh.in: New file, from GNU gettext.
12846
12847 2005-06-08  Bruno Haible  <bruno@clisp.org>
12848
12849         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
12850         warning on mingw.
12851
12852 2005-06-07  Derek Price  <derek@ximbiot.com>
12853
12854         Sync from CVS.
12855         * lib/glob_.h: Indent nested #ifdef.
12856
12857 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12858
12859         Sync from coreutils.
12860         Use "file name" when talking about file names, instead of "filename"
12861         or "path", as per the GNU coding standards.
12862         * lib/mkdir-p.c: Renamed from makepath.c.
12863         (make_dir_parents): Renamed from make_path.  All callers changed.
12864         * lib/mkdir-p.h: Likewise.  All includers changed.
12865         * lib/filenamecat.c: Renamed from path-concat.c.
12866         (file_name_concat): Renamed from path_concat.  All callers changed.
12867         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
12868         * lib/filenamecat.h: Likewise.  All includers changed.
12869         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
12870         in comments or local variable names.
12871         * lib/basename.c: Likewise.
12872         * lib/canonicalize.c, canonicalize.h: Likewise.
12873         * lib/dirname.c, dirname.h: Likewise.
12874         * lib/euidaccess.c: Likewise.
12875         * lib/exclude.c: Likewise
12876         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
12877         * lib/fsusage.c, fsuage.h: Likewise.
12878         * lib/fts.c, fts_.h: Likewise.
12879         * lib/getcwd.c: Likewise.
12880         * lib/getloadavg.c: Likewise.
12881         * lib/mkstemp.c: Likewise.
12882         * lib/mountlist.c, mountlist.h: Likewise.
12883         * lib/openat.c, openat.h: Likewise.
12884         * lib/readlink-stub.c: Likewise.
12885         * lib/readutmp.c, readutmp.h: Likewise.
12886         * lib/rename.c: Likewise.
12887         * lib/rmdir.c: Likewise.
12888         * lib/same.c: Likewise.
12889         * lib/savedir.c: Likewise.
12890         * lib/stripslash.c: Likewise.
12891         * lib/tempname.c: Likewise.
12892         * lib/xreadlink.c: Likewise.
12893         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
12894         All uses changed.
12895         * lib/exclude.h: Likewise.
12896
12897         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
12898         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12899         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
12900         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12901         * lib/pathmax.h: Include <limits.h> unconditionally, since other
12902         files have been getting away with it for years (MORE/BSD 4.3
12903         is extinct now).
12904         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
12905         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12906
12907         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
12908         Define to 256, not 255, as per modern POSIX.
12909
12910 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12911
12912         Sync from coreutils.
12913         Use "file name" when talking about file names, instead of "filename"
12914         or "path", as per the GNU coding standards.
12915         * MODULES.html.sh: mkdir-p renamed from makepath.
12916         filenamecat renamed from path-concat.
12917         * modules/filenamecat: Renamed from modules/path-concat.
12918         (Files): filenamecat.h and filenamecat.c renamed from
12919         path-concat.h and path-concat.c.
12920         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
12921         (Include): filenamecat.h, not path-concat.h.
12922         * modules/mkdir-p: Renamed from modules/makepath.
12923         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
12924         makepath.c.
12925         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
12926         (Include): mkdir-p.h, not makepath.h.
12927
12928 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12929
12930         Sync from coreutils.
12931         * m4/mkdir-p.m4: Renamed from makepath.m4.
12932         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
12933         Rename files from makepath.c to mkdir-p.c, and from
12934         makepath.h to mkdir-p.h.
12935         * m4/filenamecat.m4: Renamed from path-concat.m4.
12936         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
12937         Rename files from path-concat.c to filenamecat.c,
12938         and from path-concat.h to filenamecat.h.
12939         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
12940         "file name" in local variables or comments.
12941         * m4/rename.m4: Likewise.
12942
12943 2005-06-01  Bruno Haible  <bruno@clisp.org>
12944
12945         * modules/csharpexec: New file.
12946         * MODULES.html.sh (C#): New section.
12947
12948 2005-06-01  Bruno Haible  <bruno@clisp.org>
12949
12950         * m4/csharp.m4: New file, from GNU gettext.
12951         * m4/csharpexec.m4: New file, from GNU gettext.
12952
12953 2005-06-01  Bruno Haible  <bruno@clisp.org>
12954
12955         * lib/csharpexec.h: New file, from GNU gettext.
12956         * lib/csharpexec.c: New file, from GNU gettext.
12957         * lib/csharpexec.sh.in: New file, from GNU gettext.
12958
12959 2005-05-31  Derek Price  <derek@ximbiot.com>
12960             Paul Eggert  <eggert@cs.ucla.edu>
12961
12962         Sync from cvs.
12963         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12964
12965 2005-05-31  Derek Price  <derek@ximbiot.com>
12966             Paul Eggert  <eggert@cs.ucla.edu>
12967
12968         Sync from cvs.
12969         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12970
12971 2005-05-29  Derek Price  <derek@ximbiot.com>
12972
12973         * config/srclist.txt (glob_.h, glob.c): Add these files.
12974
12975 2005-05-29  Derek Price  <derek@ximbiot.com>
12976
12977         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
12978         * modules/glob: New file.
12979         * modules/getlogin_r: Add link to POSIX spec in description.
12980
12981 2005-05-29  Derek Price  <derek@ximbiot.com>
12982             Paul Eggert  <eggert@cs.ucla.edu>
12983
12984         * m4/glob.m4: New file.
12985
12986 2005-05-29  Derek Price  <derek@ximbiot.com>
12987             Paul Eggert  <eggert@cs.ucla.edu>
12988
12989         * lib/glob_.h, lib/glob.c: New files.
12990
12991 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12992
12993         * modules/fts (Files): Remove m4/inttypes-pri.m4.
12994         * modules/fts-lgpl (Depends-on): Remove gettext.
12995
12996 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12997
12998         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
12999         and don't require gt_INTTYPES_PRI.
13000
13001 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13002
13003         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
13004
13005         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
13006         the configuration hassle isn't worth it.
13007         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
13008         (LONGEST_MODIFIER, PRIuMAX): Remove.
13009
13010 2005-05-27  Bruno Haible  <bruno@clisp.org>
13011
13012         * lib/getlogin_r.h: Remove second include of <stddef.h>.
13013
13014 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
13015
13016         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
13017         _POSIX_PTHREAD_SEMANTICS for Solaris.
13018
13019 2005-05-25  Derek Price  <derek@ximbiot.com>
13020
13021         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
13022
13023 2005-05-25  Derek Price  <derek@ximbiot.com>
13024             Paul Eggert  <eggert@cs.ucla.edu>
13025
13026         * modules/getlogin_r, m4/getlogin_r.m4: New files.
13027         * lib/getlogin_r.c, getlogin_r.h: New files.
13028
13029 2005-05-25  Bruno Haible  <bruno@clisp.org>
13030             Derek Price  <derek@ximbiot.com>
13031
13032         * lib/getlogin_r.h: Simplify API documentation.
13033
13034 2005-05-23  Derek Price  <derek@ximbiot.com>
13035
13036         * modules/minmax (Files): Add m4/minmax.m4.
13037         (configure.ac): Add gl_MINMAX.
13038
13039 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13040
13041         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13042         so that unistd-safer.h (GPL'ed code) need not be included.
13043
13044 2005-05-22  Bruno Haible  <bruno@clisp.org>
13045
13046         * m4/minmax.m4: New file.
13047         Based on a patch by Derek Price <derek@ximbiot.com>.
13048
13049 2005-05-22  Bruno Haible  <bruno@clisp.org>
13050
13051         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13052         (INT64_MIN): Fix definition.
13053         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13054
13055         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13056         NEED_SIGNED_INT_TYPES.
13057
13058         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13059         HAVE_SYSTEM_INTTYPES.
13060
13061 2005-05-22  Bruno Haible  <bruno@clisp.org>
13062
13063         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13064         Also include <sys/param.h> if it defines MIN, MAX.
13065         Based on a patch by Derek Price <derek@ximbiot.com>.
13066
13067 2005-05-21  Jim Meyering  <jim@meyering.net>
13068
13069         * modules/fts (Files): Add m4/inttypes-pri.m4.
13070         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13071
13072 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13073
13074         New fts module.
13075         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13076         (setup_dir, free_dir): New functions.
13077         (enter_dir, leave_dir): Define trivial
13078         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13079         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13080         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
13081         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
13082         Move to fts-cycle.c.
13083         (fts_open): Use setup_dir.
13084         (fts_close): Use free_dir.
13085         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
13086         This adds a label and some gotos, but the alternatives were messier.
13087         Check for memory allocation failure when entering a dir.
13088         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
13089         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
13090         (FTS): New member fts_cycle, that is a union that contains the
13091         old active_dir_ht and cycle_state.  All uses changed to mention
13092         fts_cycle.ht and fts_cycle.state.
13093         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
13094         fts.c, with the following changes:
13095         (setup_dir, free_dir): New functions.
13096         (enter_dir): Now returns bool.  Return true if successful, false
13097         if memory exhausted.  All callers changed.
13098         Do not bother partly cleaning up on
13099         memory allocation failure; that is free_dir's job.
13100         However, free ad if hash_insert fails, to avoid memory leak.
13101         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
13102         fts->fts_options to see which union member to use.
13103
13104 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13105
13106         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
13107         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
13108
13109 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13110
13111         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
13112
13113 2005-05-20  Jim Meyering  <jim@meyering.net>
13114
13115         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
13116         Now a macro, to pacify GCC.
13117
13118 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13119
13120         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
13121         of -1.
13122
13123 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13124
13125         * lib/chown.c (rpl_chown): Return -1 on failure.
13126
13127 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13128
13129         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
13130         Don't check for stddef.h.
13131         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
13132         don't use its results.
13133         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
13134         since we include them unconditionally.  Don't require
13135         AM_STDBOOL_H, since stdbool is a prerequisite.
13136         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
13137         since we assume C89 or better.
13138         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
13139         as we don't use their results.
13140         Don't check for fchdir, memmove, memset, strrchr, as we use
13141         them unconditionally.
13142         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
13143         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
13144
13145 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13146
13147         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
13148         Include <stddef.h> unconditionally, since we assume C89 now.
13149         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
13150         * lib/fts.c: Include fts_.h first, to check interface.
13151         Do not include intprops.h; no longer needed.
13152         Include cycle-check.h and hash.h, since fts_.h no longer does.
13153         Remove unnecessary casts of closedir to void.
13154         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
13155         decide whether to decrement nlinks.
13156         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
13157         (FTS): Use struct hash_table * instead of Hash_table, so that
13158         we no longer need to include hash.h here.
13159
13160 2005-05-18  Jim Meyering  <jim@meyering.net>
13161
13162         * modules/dirfd (License): Change to LGPL.  Most of the code
13163         is already in the public domain.
13164
13165 2005-05-18  Jim Meyering  <jim@meyering.net>
13166
13167         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
13168         Reported by Yoann Vandoorselaere.
13169
13170 2005-05-17  Jim Meyering  <jim@meyering.net>
13171
13172         * m4/fts.m4: New file, from coreutils.
13173
13174 2005-05-17  Jim Meyering  <jim@meyering.net>
13175
13176         * lib/fts.c, lib/fts_.h: New files, from coreutils.
13177
13178 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13179
13180         Sync from coreutils.
13181         * m4/unlinkdir.m4: New file.
13182
13183 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13184
13185         Sync from coreutils.
13186         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
13187         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
13188         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
13189         White space changes only.
13190         * lib/makepath.c (make_path): Port to hosts where leading "//" is
13191         special.
13192         * lib/yesno.c: Include getline.h, not ctype.h.
13193         (yesno): Don't remove leading white space; POSIX doesn't allow it.
13194         Use getline to remove arbitrary restriction on response length.
13195
13196 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13197
13198         * config/srclist-update: Spell out "Street" in FSF postal
13199         mail address; this is the style the FSF seems to prefer.
13200
13201         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
13202         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
13203         this updates FSF postal mail address.
13204
13205         Sync from coreutils.
13206         * modules/unlinkdir: New file.
13207         * modules/yesno (Depends-on): Add getline.
13208         * MODULES.html.sh (File system functions): Add unlinkdir.
13209
13210 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13211
13212         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
13213         lib/strsep.h:
13214         Change the initial comment to refer to GPL, not LGPL.
13215         gnulib-tool will change it to LGPL as needed.
13216
13217         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
13218         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
13219         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
13220         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
13221         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
13222         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
13223         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
13224         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
13225         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
13226         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
13227         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
13228         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
13229         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
13230         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
13231         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
13232         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
13233         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
13234         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
13235         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
13236         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
13237         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
13238         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
13239         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
13240         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
13241         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
13242         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
13243         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
13244         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
13245         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
13246         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
13247         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
13248         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
13249         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
13250         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
13251         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
13252         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
13253         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
13254         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
13255         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
13256         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
13257         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
13258         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
13259         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
13260         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
13261         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
13262         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
13263         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
13264         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
13265         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
13266         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
13267         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13268         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
13269         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
13270         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
13271         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
13272         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
13273         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
13274         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
13275         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
13276         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
13277         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
13278         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
13279         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
13280         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
13281         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
13282         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
13283         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
13284         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
13285         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
13286         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
13287         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
13288         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
13289         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
13290         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
13291         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
13292         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
13293         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
13294         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
13295         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
13296         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
13297         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
13298         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
13299         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
13300         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
13301         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
13302         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
13303         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
13304         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
13305         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
13306         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
13307         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
13308         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
13309         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
13310         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
13311         lib/yesno.c, lib/yesno.h:
13312         Update FSF postal mail address.
13313
13314 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13315
13316         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13317         tests/test-memmem.c, tests/test-stpncpy.c:
13318         Update FSF postal mail address.
13319
13320 2005-05-13  Bruno Haible  <bruno@clisp.org>
13321
13322         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13323         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13324         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13325         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13326         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13327         Add support for 64-bit integers in the MSVC compiler.
13328
13329 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13330
13331         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13332
13333 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13334
13335         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13336
13337 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13338
13339         * doc/getdate.texi (General date syntax): Don't say that date
13340         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13341         Problem reported by Nic Ferrier.
13342
13343 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13344
13345         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13346         specified in ai_socktype. Fix invalid ai_protocol
13347         check. ai_protocol is usually set to 0 or depending on
13348         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13349         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13350         ai_socktype / ai_protocol in the returned addrinfo structure.
13351
13352 2005-05-10  Simon Josefsson  <jas@extundo.com>
13353
13354         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13355         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13356
13357 2005-05-10  Karl Berry  <karl@gnu.org>
13358
13359         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13360         (from http://www.gnu.org/licenses).
13361         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13362         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13363         fdl.texi suffices.
13364
13365 2005-05-10  Karl Berry  <karl@gnu.org>
13366
13367         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13368         (COPYING.DOC): remove.
13369
13370         * config/srclist-update: new FSF address.
13371
13372 2005-05-10  Derek Price  <derek@ximbiot.com>
13373
13374         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13375         possible.
13376
13377 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13378             Bruno Haible  <bruno@clisp.org>
13379
13380         * modules/inet_ntop: New file.
13381         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13382         inet_ntop.
13383
13384 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13385             Bruno Haible  <bruno@clisp.org>
13386
13387         * m4/inet_ntop.m4: New file.
13388
13389 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13390             Bruno Haible  <bruno@clisp.org>
13391
13392         * lib/inet_ntop.h: New file.
13393         * lib/inet_ntop.c: New file, from glibc with modifications.
13394
13395 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13396
13397         * modules/time_r (License): Change to LGPL.
13398         * modules/extensions (License): Change to LGPL.  Actually,
13399         the license is more permissive than that, but currently gnulib-tool
13400         doesn't know how to handle more-permissive licenses.
13401
13402         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13403         Problem reported by Dave Love.
13404
13405 2005-05-08  Jim Meyering  <jim@meyering.net>
13406
13407         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13408         blank.
13409
13410 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13411
13412         * modules/argmatch (Depends-on): Add stdbool.
13413         * modules/backupfile (Depends-on): Likewise.
13414         * modules/chdir-long (Depends-on): Likewise.
13415         * modules/closeout (Depends-on): Likewise.
13416         * modules/cycle-check (Depends-on): Likewise.
13417         * modules/dirname (Depends-on): Likewise.
13418         * modules/fnmatch (Depends-on): Likewise.
13419         * modules/fsusage (Depends-on): Likewise.
13420         * modules/fwriteerror (Depends-on): Likewise.
13421         * modules/getcwd (Depends-on): Likewise.
13422         * modules/getloadavg (Depends-on): Likewise.
13423         * modules/hard-locale (Depends-on): Likewise.
13424         * modules/makepath (Depends-on): Likewise.
13425         * modules/mountlist (Depends-on): Likewise.
13426         * modules/nanosleep (Depends-on): Likewise.
13427         * modules/posixtm (Depends-on): Likewise.
13428         * modules/quotearg (Depends-on): Likewise.
13429         * modules/readtokens (Depends-on): Likewise.
13430         * modules/readtokens0 (Depends-on): Likewise.
13431         * modules/readutmp (Depends-on): Likewise.
13432         * modules/save-cwd (Depends-on): Likewise.
13433         * modules/strftime (Depends-on): Likewise.
13434         * modules/userspec (Depends-on): Likewise.
13435         * modules/utimecmp (Depends-on): Likewise.
13436         * modules/xgetcwd (Depends-on): Likewise.
13437         * modules/xnanosleep (Depends-on): Likewise.
13438         * modules/xstrtod (Depends-on): Likewise.
13439         * modules/yesno (Depends-on): Likewise.
13440
13441 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13442
13443         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13444         needless checks.
13445
13446 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13447
13448         Merge from coreutils.  Among other things,
13449         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13450         * lib/fd-safer.c: New file.
13451         * lib/fcntl-safer.h, open-safer.c: Remove.
13452         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13453         * lib/dup-safer.c: Include unistd-safer.h first.
13454         Don't include errno.h.
13455         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
13456         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
13457         * lib/file-type.c: Rely on file-type.h change.
13458         * lib/getloadavg.c: Include unistd-safer.h.
13459         (getloadavg): Use safer open.
13460         * lib/getusershell.c: Include "stdio-safer.h".
13461         (getusershell): Use safer fopen.
13462         * lib/long-options.c (long_options): Use NULL rather than 0.
13463         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13464         'free'.
13465         * lib/modechange.c: Likewise.
13466         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13467         (MODE_DONE): New constant.
13468         (struct mode_change): Remove 'next' member.
13469         (make_node_op_equals): New function; like the old one of the
13470         same name, except it allocates an array.
13471         (mode_compile, mode_create_from_ref): Use it.
13472         (mode_compile): Allocate result as an array, not a linked list.
13473         Parse octal string ourself, so that we catch mistakes like "+0".
13474         (mode_adjust): Arg is an array, not a linked list.
13475         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13476         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13477         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13478         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
13479         Remove.  This is now stat-macros.h's job.
13480         (talloc): Remove.  All callers replaced by xalloc, so that
13481         our invokers don't have to worry about reporting memory failures.
13482         (make_node_op_equals): Remove.
13483         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13484         New constants.
13485         (struct mode_change): Moved here from modechange.h.
13486         (mode_append_entry): Remove.
13487         (mode_compile): Remove MASKED_OPS arg, since it encouraged
13488         apps to have incorrect behavior.  Use simpler algorithm for head
13489         and tail.  Don't futz with umask; that's now the job of mode_adjust.
13490         Detect more invalid usages rather than having somewhat-random behavior.
13491         Don't insert an "a=" action, as that leads to incorrect behavior.
13492         (mode_compile, mode_create_from_ref): Return NULL on error instead
13493         of an enum, since now there's only one way to have an error.  All
13494         callers changed.
13495         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
13496         at the correct time.  Simplify calculation of "+u" and its ilk.
13497         Don't mishandle "+X".
13498         (mode_free): Remove "register" and localize decls.
13499         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13500         (struct mode_change): Move to modechange.c; callers don't
13501         need to see this stuff.
13502         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
13503         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
13504         (mode_change, mode_adjust): Reflect the new signatures noted above.
13505         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
13506         that might redefine system include files.
13507         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
13508         (my_usleep): Use NULL rather than (void *) 0.
13509         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
13510         Use siginterrupt to specify that system calls should be interrupted.
13511         (rpl_nanosleep): Move initialization of suspended closer to call of
13512         my_usleep.
13513         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
13514         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
13515         (desirable_utmp_entry): New function.
13516         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
13517         using x2nrealloc, to simplify logic.
13518         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
13519         size calculation.  Do not assume utmp file is a regular file.
13520         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
13521         (READ_UTMP_CHECK_PIDS): New constant.
13522         * lib/save-cwd.c: Include unistd-safer.h.
13523         (save_cwd): Use fd_safer.
13524         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
13525         [!_LIBC] Include "stat-macros.h" instead.
13526         * lib/unistd-safer.h (fd_safer): New decl.
13527
13528 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13529
13530         * modules/getloadavg (Depends-on): Add unistd-safer.
13531         * modules/getusershell (Depends-on): Add stdio-safer.
13532         * modules/lstat (Depends-on): Remove xalloc.
13533         * modules/mkstemp (Depends-on): Add stat-macros.
13534         * modules/modechange (Depends-on): Remove xstrtol.
13535         Add stat-macros, xalloc.
13536         * modules/save-cwd (Depends-on): Add unistd-safer.
13537         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13538         * modules/unistd-safer (Files): Add lib/fd-safer.c
13539         (Makefile.am): Remove lib_SOURCES.
13540
13541         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13542         Remove fcntl-safer; unistd-safer supersedes it.
13543
13544 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13545
13546         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13547         AC_HEADER_STAT.
13548         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13549         (gl_PREREQ_CHOWN): Remove.
13550         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13551         it.  Don't require AC_HEADER_STAT.
13552         (gl_PREREQ_LSTAT): Remove.
13553         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13554         Don't require AC_HEADER_STAT.
13555         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13556         (gl_PREREQ_RMDIR): Remove.
13557         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13558         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13559         the stat-macros module a prerequisite.
13560         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13561         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13562         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13563         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13564         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13565         variable names.
13566         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13567         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13568         variable prefixes.
13569         * m4/fcntl-safer.m4: Remove.
13570         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13571         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13572         Invoke gl_PREREQ_FD_SAFER.
13573         (gl_PREREQ_FD_SAFER): New macro.
13574         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13575         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13576         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13577         Remove duplicate call to AC_LIBOBJ(readutmp).
13578         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13579
13580         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13581         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13582
13583 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13584
13585         * MODULES.html.sh (Misc): Add byteswap.
13586
13587 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13588
13589         * modules/getcwd (Depends-on): Add extensions.
13590         * modules/openat (Depends-on): Likewise.
13591
13592 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13593
13594         * modules/byteswap: New file.
13595
13596 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13597
13598         * m4/byteswap.m4: New file.
13599
13600 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13601
13602         * lib/byteswap_.h: New file.
13603
13604 2005-04-25  Karl Berry  <karl@gnu.org>
13605
13606         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13607
13608 2005-04-25  Albert Chin  <china@thewrittenword.com>
13609
13610         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13611         Toolkit C bug.
13612
13613 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13614
13615         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13616         (func_ln_if_changed) Remove forcibly for no error message
13617         in case file does not exist.
13618
13619 2005-04-19  Simon Josefsson  <jas@extundo.com>
13620
13621         * gnulib-tool (Options): Make --symlink mean --symbolic.
13622
13623 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13624
13625         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13626
13627 2005-04-16  Simon Josefsson  <jas@extundo.com>
13628
13629         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13630
13631 2005-04-15  Simon Josefsson  <jas@extundo.com>
13632
13633         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13634
13635 2005-04-15  Simon Josefsson  <jas@extundo.com>
13636
13637         * gnulib-tool: Rename --symlink to --symbolic.
13638
13639 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13640
13641         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13642         symbolic links to files instead of copying/moving.  Add --aux-dir,
13643         specifying directory relative --dir where auxiliary build tools
13644         are placed.
13645
13646 2005-04-14  Bruno Haible  <bruno@clisp.org>
13647
13648         * modules/allocsa (License): Change to LGPL.
13649         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13650
13651 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13652
13653         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13654         that "UTC +1 second" continues to work.  Problem reported
13655         by Dmitry V. Levin.
13656         (relunit_snumber): New rule.
13657         (relunit): Use it.
13658
13659 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13660
13661         * lib/getdate.y (universal_time_zone_table): New constant.
13662         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13663         universal_time_zone_table.
13664         (lookup_zone): Prefer universal_time_zone_table to
13665         local_time_zone_table, so that "GMT" time stamps are allowed in
13666         London during the summer.  Problem reported by Ian Abbott.
13667
13668 2005-04-12  Jim Meyering  <jim@meyering.net>
13669
13670         * lib/human.c (humblock): Set *options even when returning due to
13671         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13672         warning from gcc-4.
13673
13674 2005-04-09  Jim Meyering  <jim@meyering.net>
13675
13676         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13677         -Wuninitialized: initialize tm0.tm_year.
13678
13679 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13680
13681         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13682         count, since there's no maximum.  All uses changed.
13683         Add member dsts_seen.
13684         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13685         not being INT_MAX.
13686         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13687         Use pc_rels_seen to decide whther a date is absolute.
13688
13689         * lib/getdate.y (number): Don't overwrite year.
13690         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13691         check.
13692
13693 2005-04-02  Simon Josefsson  <jas@extundo.com>
13694
13695         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13696         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13697
13698 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13699
13700         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13701         where no absolute path name can be longer than PATH_MAX.
13702
13703 2005-03-27  Jim Meyering  <jim@meyering.net>
13704
13705         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13706
13707 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13708
13709         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13710         "one's complement" -> "ones' complement" in comment, as per Knuth.
13711         "value of type" -> "type or expression" in comment.
13712         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13713
13714 2005-03-26  Jim Meyering  <jim@meyering.net>
13715
13716         Comment nits.
13717         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13718         Correct typos: s/or/of/.
13719
13720 2005-03-26  Jim Meyering  <jim@meyering.net>
13721
13722         * modules/check-include-files: Move to ../ and rename to...
13723         * check-module: ...this.
13724
13725 2005-03-25  Jim Meyering  <jim@meyering.net>
13726
13727         * modules/xvasprintf (Files): Add xalloc.h.
13728
13729 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13730
13731         * modules/gettext (Files): config/config.rpath ->
13732         build-aux/config.rpath
13733         * modules/iconv (Files): Likewise.
13734         Problem reported by Oskar Liljeblad.
13735
13736 2005-03-23  Jim Meyering  <jim@meyering.net>
13737
13738         * modules/check-include-files: New script to check for
13739         missing dependencies, multiple includes, etc.
13740
13741         * modules/c-strtold (Depends-on): Add xalloc.
13742         * modules/c-strtod (Depends-on): Add xalloc.
13743         * modules/hash (Depends-on): Add xalloc.
13744         (Files): Remove lib/xalloc.h.
13745
13746         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13747         * modules/userspec (Files): Add lib/inttostr.h.
13748
13749 2005-03-23  Jim Meyering  <jim@meyering.net>
13750
13751         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13752
13753 2005-03-22  Jim Meyering  <jim@meyering.net>
13754
13755         * modules/stat-macros: New module.
13756         * modules/canonicalize, modules/euidaccess, modules/file-type,
13757         * modules/filemode, modules/lchown, modules/makepath,
13758         * modules/rmdir, modules/stat: Depend on new stat-macros module
13759         rather than listing lib/stat-macros.h manually.
13760         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13761
13762 2005-03-22  Jim Meyering  <jim@meyering.net>
13763
13764         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13765
13766 2005-03-22  Bruno Haible  <bruno@clisp.org>
13767
13768         * config/srclist.txt: Replace target directory 'config' with
13769         'build-aux'.
13770         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13771         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13772         ../build-aux/.
13773
13774 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13775
13776         * modules/chdir-long (Depends-on): Add mempcpy.
13777
13778         * modules/acl, modules/backupfile, modules/c-strtod,
13779         modules/c-strtold, modules/canon-host, modules/canonicalize,
13780         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13781         modules/exclude, modules/exitfail, modules/file-type,
13782         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13783         modules/getdate, modules/getline, modules/getpagesize,
13784         modules/getpass, modules/getugroups, modules/group-member,
13785         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13786         modules/inttostr, modules/long-options, modules/makepath,
13787         modules/md5, modules/memcasecmp, modules/memcoll,
13788         modules/modechange, modules/mountlist, modules/path-concat,
13789         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13790         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13791         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
13792         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
13793         modules/strftime, modules/strndup, modules/strverscmp,
13794         modules/timespec, modules/unlocked-io, modules/userspec,
13795         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
13796         modules/yesno:
13797         Remove lib_SOURCES line from Makefile.am section, as this is now
13798         done automatically by the corresponding Autoconf macro.
13799
13800 2005-03-21  Jim Meyering  <jim@meyering.net>
13801
13802         Changes imported from coreutils.
13803
13804         * lib/cycle-check.c: Don't include xalloc.h.
13805
13806         * lib/path-concat.c: Don't include assert.h.
13807         (path_concat): Remove assertion that would have triggered
13808         for ABASE starting with more than one slash.
13809         Reported by Andreas Schwab.
13810
13811         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
13812         properly when ABASE is an absolute file name.
13813         Correct the description of this function.
13814         Include <assert.h>.
13815         Add an assertion and a test driver.
13816         This fixes a bug introduced on 2004-07-02.
13817         Andreas Schwab reported the resulting failure of cp --parents:
13818         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
13819
13820 2005-03-21  Jim Meyering  <jim@meyering.net>
13821
13822         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
13823         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
13824
13825 2005-03-21  Jim Meyering  <jim@meyering.net>
13826         and  Paul Eggert  <eggert@cs.ucla.edu>
13827
13828         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
13829         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
13830         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
13831         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
13832         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
13833         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
13834         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
13835         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
13836         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
13837         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
13838         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
13839         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
13840         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
13841         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
13842         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
13843         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
13844         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
13845         for these modules.
13846
13847 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
13848
13849         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
13850         (which shouldn't happen), generate nothing instead of returning 0
13851         immediately, so that nstrftime (NULL, ...) doesn't return 0.
13852
13853 2005-03-16  Bruno Haible  <bruno@clisp.org>
13854
13855         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
13856         HAVE_LONGLONG_64BIT.
13857
13858 2005-03-16  Bruno Haible  <bruno@clisp.org>
13859
13860         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
13861         HAVE_LONGLONG_64BIT.
13862
13863 2005-03-16  Bruno Haible  <bruno@clisp.org>
13864
13865         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
13866         HAVE_LONGLONG_64BIT.
13867
13868 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13869
13870         * lib/strftime.c (my_strftime): Prepend space to format so that we can
13871         reliably distinguish strftime failure from empty output on POSIX
13872         hosts.
13873
13874 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13875
13876         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
13877         (iconv_string): Don't guess a size-zero buffer, as that might cause
13878         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
13879         result would be 'too large', where 'too large' is (heuristically)
13880         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
13881         overflow concerns.  This will prevent some unwanted malloc failures
13882         when the inputs are very large.
13883
13884 2005-03-15  Karl Berry  <karl@gnu.org>
13885
13886         * config/srclist.txt (config.rpath): from gettext.
13887         * config/config.rpath: update.
13888
13889 2005-03-15  Bruno Haible  <bruno@clisp.org>
13890
13891         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
13892         to 'negate'.
13893
13894         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
13895         variable.
13896
13897         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
13898         results.
13899
13900 2005-03-14  Simon Josefsson  <jas@extundo.com>
13901
13902         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
13903         <fx@gnu.org>.
13904
13905 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
13906
13907         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
13908         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
13909         intprops.h.
13910         * lib/strtol.c: Likewise.
13911
13912 2005-03-14  Jim Meyering  <jim@meyering.net>
13913
13914         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
13915         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
13916         to be nonzero so that we (and caller) can detect the difference
13917         between a valid zero-length expansion and an error return, even
13918         when the underlying strftime fails before writing anything into
13919         that location.
13920
13921 2005-03-14  Bruno Haible  <bruno@clisp.org>
13922
13923         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
13924         Update from GNU gettext 0.14.3.
13925
13926 2005-03-10  Jim Meyering  <jim@meyering.net>
13927
13928         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
13929
13930 2005-03-10  Jim Meyering  <jim@meyering.net>
13931
13932         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
13933         so that this module works on systems without fchdir.
13934
13935 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
13936
13937         Factor int-properties macros into a single file, except for
13938         glibc-related files.
13939         * lib/intprops.h: New file.
13940         * lib/getloadavg.c: Include it instead of limits.h.
13941         (INT_STRLEN_BOUND): Remove.
13942         * lib/human.c: Include intprops.h.
13943         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
13944         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
13945         302/1000.
13946         * lib/inttostr.h: Include intprops.h instead of limits.h.
13947         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
13948         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
13949         for consistency with intprops.h.
13950         (time_t_is_integer, twos_complement_arithmetic): Use them.
13951         * lib/sig2str.h: Include <signal.h>, intprops.h.
13952         (INT_STRLEN_BOUND): Remove.
13953         * lib/strftime.c (TYPE_SIGNED): Remove.
13954         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
13955         * lib/strtol.c: Adjust comments to match intprops.h.
13956         * lib/userspec.c: Include intprops.h.
13957         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
13958         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
13959         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
13960         instead of rolling our own expressions.
13961         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
13962
13963         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
13964         instead of int.
13965         (my_strftime): Do not mishandle years close to INT_MAX, by doing
13966         the right thing even if adding 1900 would overflow.  Similarly
13967         for tm_mon + 1 and tm_yday + 1.
13968         Make %Y always equivalent to %C%y, and similarly for %G and %g.
13969         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
13970         (DO_SIGNED_NUMBER): New macro.
13971         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
13972
13973 2005-03-07  Bruno Haible  <bruno@clisp.org>
13974
13975         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
13976
13977 2005-03-07  Bruno Haible  <bruno@clisp.org>
13978
13979         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
13980
13981 2005-03-04  Derek R. Price  <derek@ximbiot.com>
13982
13983         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
13984         (func_import): Only replace files via --import when they have actually
13985         changed.
13986
13987 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13988
13989         * m4/mmap-anon.m4: New file.
13990         * m4/pagealign_alloc.m4: New file.
13991
13992 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13993             Bruno Haible  <bruno@clisp.org>
13994
13995         * modules/pagealign_alloc: New file.
13996         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
13997
13998 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13999             Bruno Haible  <bruno@clisp.org>
14000
14001         * lib/pagealign_alloc.h: New file.
14002         * lib/pagealign_alloc.c: New file.
14003
14004 2005-03-03  Bruno Haible  <bruno@clisp.org>
14005
14006         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
14007         Use an all-permissive copyright notice, recommended by RMS.
14008
14009 2005-03-02  Bruno Haible  <bruno@clisp.org>
14010
14011         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
14012         of AIX, the replacement has to be done only after <string.h> is
14013         included, therefore not in config.h. stpncpy.h does the replacement,
14014         and stpncpy.c uses it.
14015
14016 2005-03-02  Bruno Haible  <bruno@clisp.org>
14017
14018         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
14019         stpncpy.c uses it.
14020
14021 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14022
14023         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
14024         The workaround isn't strictly needed for POSIX conformance, and
14025         it's too much of a pain to configure and maintain.  We'll ask
14026         people to fix their kernels instead.
14027         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
14028         (NANOSLEEP_BUG_WORKAROUND): Remove.
14029         (xnanosleep): Remove the workaround.
14030
14031 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14032
14033         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
14034         Reported by Derek Price.
14035         (Include): Add "timespec.h".
14036
14037         * modules/xnanosleep (Depends-on): Remove gethrxtime.
14038
14039 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14040
14041         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14042         to detect nanosleep bug.
14043
14044 2005-03-01  Bruno Haible  <bruno@clisp.org>
14045
14046         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14047
14048 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14049
14050         * modules/gethrxtime: New file.
14051         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14052         (Depends-on): Add gethrxtime.
14053         (configure.ac): Add gl_XNANOSLEEP.
14054         (Makefile.am): Remove lib_SOURCES line.
14055
14056 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14057
14058         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14059         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14060
14061 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14062
14063         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14064         * lib/timespec.h (gettime): Return void, since it always
14065         succeeds now.  All uses changed.
14066         * lib/gettime.c (gettime) Likewise.
14067         [HAVE_NANOTIME]: Prefer nanotime.
14068         Assume gettimeofday succeeds, as POSIX requires.
14069         Assime time () succeeds, since other code already does.
14070         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14071         (timespec_subtract): Remove.
14072         (NANOSLEEP_BUG_WORKAROUND): New constant.
14073         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14074         things considerably.  Use it only on GNU/Linux hosts, since the
14075         workaround shouldn't be needed elsewhere.
14076
14077 2005-02-24  Bruno Haible  <bruno@clisp.org>
14078
14079         * modules/gettext (Files): Add m4/glibc2.m4.
14080
14081 2005-02-24  Bruno Haible  <bruno@clisp.org>
14082
14083         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
14084         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
14085         * m4/progtest.m4:
14086         Update from GNU gettext 0.14.2.
14087         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
14088
14089 2005-02-24  Bruno Haible  <bruno@clisp.org>
14090
14091         * lib/localcharset.c: Update from GNU gettext 0.14.2.
14092         * lib/config.charset: Update from GNU gettext 0.14.2.
14093
14094 2005-02-24  Bruno Haible  <bruno@clisp.org>
14095
14096         * lib/gettext.h: Update from GNU gettext 0.14.2.
14097
14098 2005-02-23  Simon Josefsson  <jas@extundo.com>
14099
14100         * m4/iconvme.m4: New file.
14101
14102 2005-02-23  Jim Meyering  <jim@meyering.net>
14103
14104         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
14105         change.
14106         Thanks to Bruno Haible for catching it.
14107
14108 2005-02-22  Simon Josefsson  <jas@extundo.com>
14109
14110         * modules/iconvme: New file.
14111
14112         * MODULES.html.sh: Add iconvme.
14113
14114 2005-02-22  Simon Josefsson  <jas@extundo.com>
14115
14116         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
14117
14118 2005-02-22  Simon Josefsson  <jas@extundo.com>
14119
14120         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
14121
14122 2005-02-22  Jim Meyering  <jim@meyering.net>
14123
14124         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
14125         s/ifndef/ifdef/.
14126
14127 2005-02-20  Neil Conway  <neilc@samurai.com>
14128
14129         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
14130         returned by OSX/Darwin if the specified buffer is not large
14131         enough for the hostname.
14132
14133 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14134
14135         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
14136         pass it to _help, otherwise the latter coredumps trying to
14137         dereference state.root_argp.
14138
14139 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14140
14141         * modules/chdir-long (Depends-on): Add memrchr.
14142         * modules/memrchr (Files): Add lib/memrchr.h.
14143         (Include): "memrchr.h".
14144
14145 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14146
14147         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
14148
14149 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14150
14151         * lib/memrchr.h: New file.
14152         * lib/chdir-long.c: Include it.
14153         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
14154         Don't bother including stddef.h.
14155
14156 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
14157
14158         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
14159         inclusion.
14160         Include <sys/types.h>, for dev_t.
14161         (ME_DUMMY, ME_REMOTE): Move from here....
14162         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
14163         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
14164         Dmitry V. Levin.
14165         Include mountlist.h first, to test the interface.
14166
14167 2005-01-29  Bruno Haible  <bruno@clisp.org>
14168
14169         * lib/progname.c (program_name): Initialize.
14170         Needed when linking statically on MacOS X.
14171
14172 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14173
14174         Sync from coreutils.
14175         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
14176         (Depends-on): Add c-strtod.
14177         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
14178
14179 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14180
14181         Sync from coreutils.
14182         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
14183
14184         Remove files that are specific to coreutils.
14185         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
14186
14187 2005-01-28  Bruno Haible  <bruno@clisp.org>
14188
14189         * modules/javacomp: New file.
14190         * MODULES.html.sh (Java): Add javacomp.
14191
14192 2005-01-28  Bruno Haible  <bruno@clisp.org>
14193
14194         * m4/javacomp.m4: New file, from GNU gettext.
14195
14196 2005-01-28  Bruno Haible  <bruno@clisp.org>
14197
14198         * lib/javacomp.sh.in: New file, from GNU gettext.
14199         * lib/javacomp.h: New file, from GNU gettext.
14200         * lib/javacomp.c: New file, from GNU gettext.
14201
14202 2005-01-26  Simon Josefsson  <jas@extundo.com>
14203
14204         * lib/gai_strerror.c: Use GPL in header.
14205
14206 2005-01-26  Bruno Haible  <bruno@clisp.org>
14207
14208         * modules/javaexec: New file.
14209         * MODULES.html.sh (Java): Add javaexec.
14210
14211 2005-01-26  Bruno Haible  <bruno@clisp.org>
14212
14213         * m4/javaexec.m4: New file, from GNU gettext.
14214
14215 2005-01-26  Bruno Haible  <bruno@clisp.org>
14216
14217         * lib/javaexec.sh.in: New file, from GNU gettext.
14218         * lib/javaexec.h: New file, from GNU gettext.
14219         * lib/javaexec.c: New file, from GNU gettext.
14220
14221 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14222
14223         * modules/lchown (Depends-on): Remove lchown.h
14224
14225 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14226
14227         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
14228         must be defined if the header file was not found, in order
14229         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
14230
14231 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14232
14233         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
14234         initializers for struct pentry_state.
14235         (__argp_error): Check return value of __asprintf
14236         (__argp_failure): Translate error message
14237
14238         * lib/argp-parse.c: Removed braces around the expansion of N_()
14239
14240 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14241
14242         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
14243         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
14244         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
14245         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
14246         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
14247         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
14248         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
14249         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
14250         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
14251         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
14252         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
14253         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
14254         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
14255         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
14256         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
14257         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
14258         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
14259         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
14260         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
14261         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
14262         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
14263         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
14264         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
14265         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
14266         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
14267         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
14268         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
14269         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
14270         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
14271         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
14272         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
14273         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
14274         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
14275         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
14276         xstrtol.m4, xstrtoumax.m4, yesno.m4:
14277         Use an all-permissive copyright notice, recommended by RMS.
14278
14279 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
14280
14281         * modules/chdir-long (Depends-on): Remove mempcpy.
14282
14283 2005-01-21  Jim Meyering  <jim@meyering.net>
14284
14285         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
14286         same value as for Solaris 9.
14287
14288         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
14289         component length.  This included changing the parameter to be
14290         of type `char *' rather than `char const *'.
14291         * lib/chdir-long.h (chdir_long): Update prototype.
14292
14293         * lib/openat.c (fdopendir, fstatat): New functions.
14294         * lib/openat.h: Include headers required for use of DIR and struct
14295         stat.
14296         [AT_SYMLINK_NOFOLLOW]: Define.
14297         (fdopendir, fstatat): Add prototypes.
14298
14299 2005-01-21  Bruno Haible  <bruno@clisp.org>
14300
14301         * modules/classpath: New file.
14302         * MODULES.html.sh (Java): Add classpath.
14303
14304 2005-01-21  Bruno Haible  <bruno@clisp.org>
14305
14306         * lib/classpath.h: New file, from GNU gettext.
14307         * lib/classpath.c: New file, from GNU gettext.
14308
14309 2005-01-20  Simon Josefsson  <jas@extundo.com>
14310
14311         * modules/version-etc-fsf: New file.
14312
14313 2005-01-20  Simon Josefsson  <jas@extundo.com>
14314
14315         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14316         * lib/version-etc.c: Remove version_etc_copyright.
14317         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14318         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14319
14320 2005-01-20  Simon Josefsson  <jas@extundo.com>
14321
14322         * lib/base64.h (isbase64): Add.
14323
14324         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14325         using a unsigned prototype, don't inline.
14326         (base64_decode): Use it.
14327
14328 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14329
14330         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14331         it.
14332
14333 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14334
14335         * lib/save-cwd.c (save_cwd): Remove code to support the case
14336         where fchdir is missing or flaky.
14337
14338 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14339
14340         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14341
14342 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14343
14344         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14345         AC_LIBSOURCES now does this.
14346         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14347         with new ullong_max module.
14348
14349 2005-01-19  Bruno Haible  <bruno@clisp.org>
14350
14351         * modules/sh-quote: New file.
14352         * MODULES.html.sh (Executing programs): Add sh-quote.
14353
14354 2005-01-19  Bruno Haible  <bruno@clisp.org>
14355
14356         * lib/sh-quote.h: New file, from GNU gettext.
14357         * lib/sh-quote.c: New file, from GNU gettext.
14358
14359 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14360
14361         Merge from coreutils.
14362         * m4/ullong_max.m4: New file.
14363         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14364         (gl_MACROS): Assume localeconv exists.
14365
14366 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14367
14368         Merge changes from coreutils, as described below in several
14369         changelogs dated today.
14370
14371         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14372         (O_DIRECTORY): Remove; not needed here, since "." must be
14373         a directory.  All uses removed.
14374         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14375         universal on Suns, and we also need to test for IRIX.
14376         Revamp code to use 'if' rather than '#if'.
14377         Avoid unnecessary comparison of cwd->desc to 0.
14378
14379         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14380         for known valid error numbers rather than observed invalid ones.
14381
14382 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14383
14384         * modules/ullong_max: New file.
14385
14386         * modules/chdir-long, modules/openat: New files.
14387         * modules/save-cwd (Depends-on): Depend on chdir-long.
14388         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14389
14390 2005-01-18  Jim Meyering  <jim@meyering.net>
14391
14392         Merge from coreutils.
14393         * m4/chdir-long.m4, m4/openat.m4: New files.
14394         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14395         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14396         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14397         is sane and DOES follow symlinks.  Besides, testing 20 different
14398         systems found no broken chown implementations.
14399         Prompted by a change in rsync's copy of this macro.
14400         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14401
14402         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14403
14404         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14405         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14406         NULL-means-set-to-current-time semantics.
14407         Remove temporary file immediately, rather than waiting
14408         for configure's at-exit trap code to do it.
14409
14410 2005-01-18  Jim Meyering  <jim@meyering.net>
14411
14412         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14413
14414         * lib/utimens.c (futimens): Account for the fact that futimes
14415         can also fail with errno == ENOSYS or errno == ENOENT.
14416         Patch from Dmitry V. Levin.
14417
14418         Change the name of the robust chdir function from chdir to chdir_long.
14419         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14420         (restore_cwd): Use chdir_long, not chdir.
14421         * lib/chdir-long.c: Renamed from chdir.c.
14422         * lib/chdir-long.h: Renamed from chdir.h.
14423         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14424         Hurd.
14425
14426 2005-01-18  Bruno Haible  <bruno@clisp.org>
14427
14428         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14429         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14430         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14431         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14432         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14433         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14434         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14435         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14436         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14437         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14438         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14439         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14440         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14441         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14442         Use an all-permissive copyright notice, recommended by RMS.
14443
14444 2005-01-18  Bob Proulx  <bob@proulx.com>
14445
14446         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14447         simplify offsetof() macro construct to avoid compile failure with
14448         native HP-UX 11.0 ANSI C compiler.
14449
14450 2005-01-17  Bruno Haible  <bruno@clisp.org>
14451
14452         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14453         redundant because stpncpy.m4 takes care of it.
14454
14455 2005-01-17  Bruno Haible  <bruno@clisp.org>
14456
14457         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
14458
14459 2005-01-17  Bruno Haible  <bruno@clisp.org>
14460
14461         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14462         used.
14463
14464 2005-01-17  Bruno Haible  <bruno@clisp.org>
14465
14466         * lib/fwriteerror.h (fwriteerror): Change specification to include
14467         fclose.
14468         * lib/fwriteerror.c: Include <stdbool.h>.
14469         (fwriteerror): At the end, close the file stream. Record whether
14470         stdout was already closed.
14471
14472 2005-01-17  Bruno Haible  <bruno@clisp.org>
14473
14474         * lib/execute.c (environ): Declare if needed.
14475         * lib/pipe.c (environ): Likewise.
14476         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14477
14478 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14479
14480         * modules/argp: Depend on vsnprintf
14481
14482 2005-01-10  Jim Meyering  <jim@meyering.net>
14483
14484         * modules/closeout (Depends-on): Add atexit.
14485
14486 2005-01-06  Bruno Haible  <bruno@clisp.org>
14487
14488         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
14489
14490 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14491
14492         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
14493         definitions to be after all include files, to avoid collisions.
14494         Problem reported by Bob Proulx.
14495
14496 2005-01-04  Jim Meyering  <jim@meyering.net>
14497
14498         Changes imported from coreutils.
14499         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
14500         as the mkstemp template, use a temporary directory and an
14501         8.3-friendly template to avoid trouble on systems like DJGPP.
14502         Reported by Juan M. Guerrero via Stepan Kasal.
14503         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
14504         close. Remove the temporary directory right away, rather than waiting
14505         for configure's at-exit trap code to do it.
14506         Suggestion from Stepan Kasal.
14507
14508 2005-01-01  Simon Josefsson  <jas@extundo.com>
14509
14510         * gnulib-tool: Print #include directives when --import'ing.
14511
14512 2004-12-28  Simon Josefsson  <jas@extundo.com>
14513
14514         * tests/test-base64.c: Include required header files.  Remove
14515         unused variables.
14516
14517 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14518
14519         * modules/error (Depends-on): Remove gettext.
14520
14521 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14522
14523         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
14524         not needed.  This removes a dependency on the gettext module.
14525         [defined _LIBC]: Do not include <libintl.h>; not needed.
14526
14527 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14528
14529         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14530         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14531
14532 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14533
14534         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14535         HAVE_DECL_STRTOLD.
14536
14537 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14538
14539         * modules/getdate (Depends-on): Remove alloca-opt.
14540
14541 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14542
14543         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14544
14545 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14546
14547         * lib/argp-parse.c: Include <stddef.h>.
14548         (alignof, alignto): New macros.
14549         (parser_init): Don't assume that void * is aligned sufficiently
14550         for struct option.
14551
14552         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14553         need to extend the stack.
14554         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14555         large.
14556
14557 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14558
14559         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14560
14561 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14562
14563         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14564         (2004-10-24) change.  Apparently this was a false alarm.
14565
14566         * modules/getdate: Depend on alloca-opt, not alloca.
14567
14568 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14569
14570         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14571         Remove now-obsolete comment about AIX.
14572         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14573         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14574         (YYMAXDEPTH): New macro.
14575
14576 2004-12-18  Simon Josefsson  <jas@extundo.com>
14577
14578         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14579
14580 2004-12-18  Bruno Haible  <bruno@clisp.org>
14581
14582         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14583
14584 2004-12-18  Bruno Haible  <bruno@clisp.org>
14585
14586         * lib/fatal-signal.c (fatal_signals): Make non-const.
14587         (init_fatal_signals): New function.
14588         (uninstall_handlers, install_handlers): Ignore signals that were set to
14589         SIG_IGN.
14590         (at_fatal_signal): Call init_fatal_signals.
14591         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14592         SIG_IGN.
14593         Reported by Paul Eggert.
14594
14595 2004-12-18  Bruno Haible  <bruno@clisp.org>
14596
14597         * doc/alloca.texi: New file.
14598         * doc/alloca-opt.texi: New file.
14599
14600 2004-12-17  Jim Meyering  <jim@meyering.net>
14601
14602         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14603         Otherwise, install-sh could exit with improper exit status when
14604         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14605
14606 2004-12-16  Simon Josefsson  <jas@extundo.com>
14607
14608         * tests/test-base64.c: Add license.
14609
14610 2004-12-15  Stepan Kasal  <address@hidden>
14611
14612         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14613
14614 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14615
14616         * modules/getcwd (Files): Add m4/d-ino.m4.
14617         Suggested by Mark D. Baushke.
14618
14619 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14620
14621         * lib/getdate.y (textint): New member "negative".
14622         (time_zone_hhmm): New function.
14623         Expect 14 shift-reduce conflicts, not 13.
14624         (o_colon_minutes): New rule.
14625         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14626         (yylex): Set the "negative" member of signed numbers.
14627
14628 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14629
14630         * doc/getdate.texi (Time of day items, Time zone items):
14631         Describe new formats +00:00, UTC+00:00.
14632
14633 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14634
14635         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14636         spurious "-l"s.  Problem reported by Stepan Kasal.
14637
14638 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14639
14640         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14641         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14642
14643 2004-12-04  Simon Josefsson  <jas@extundo.com>
14644
14645         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14646         Vandoorselaere <yoann@prelude-ids.org>.
14647
14648 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14649
14650         Changes imported from coreutils.
14651         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14652         exist.
14653         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14654
14655 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14656
14657         Changes imported from coreutils.
14658         * lib/hard-locale.c: Assume <locale.h> exists.
14659         Include "strdup.h".
14660         (GLIBC_VERSION): New macro.
14661         (hard_locale): Assume setlocale exists.
14662         Rewrite to avoid #ifdef.
14663         Use strdup rather than malloc + strcpy.
14664         * lib/human.c: Assume <locale.h> exists.
14665         (human_readable): Assume localeconv exists.
14666
14667 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14668
14669         * modules/hard-locale (Depends-on): Add strdup.
14670
14671 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14672
14673         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14674         convert T2, not T.  (Imported from libc.)
14675
14676 2004-11-30  Simon Josefsson  <jas@extundo.com>
14677
14678         * modules/restrict (License): Change to LGPL.
14679
14680 2004-11-30  Simon Josefsson  <jas@extundo.com>
14681
14682         * m4/restrict.m4: Add copyright and copying conditions.
14683
14684 2004-11-30  Simon Josefsson  <jas@extundo.com>
14685
14686         * m4/base64.m4: New file.
14687
14688 2004-11-30  Simon Josefsson  <jas@extundo.com>
14689
14690         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14691         base64.
14692
14693         * tests/test-base64.c: New file.
14694
14695         * modules/base64: New file.
14696
14697 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14698
14699         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14700         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14701
14702         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14703
14704 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14705
14706         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14707         (__getcwd.c): Don't restore errno; glibc doesn't.
14708         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14709         first, falling back to our code only if its results look suspicious.
14710         Ensure that the resulting buffer is only as large as necessary.
14711
14712         * lib/readutmp.c: Include readutmp.h first.
14713         Include <errno.h>, since readutmp.h no longer does that.
14714         * lib/readutmp.h: Don't include <errno.h>,
14715         <sys/param.h>, <time.h>; not needed to establish interface.
14716         (errno): Remove decl.
14717         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14718         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14719         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14720
14721 2004-11-28  Simon Josefsson  <jas@extundo.com>
14722
14723         * lib/base64.h, base64.c: New file.
14724
14725 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14726
14727         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14728
14729 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14730
14731         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14732         (Depends-on): Remove pathmax, same.  Add mempcpy.
14733         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14734         (Makefile.am): Append getcwd.h to lib_SOURCES.
14735         (Include): Add getcwd.h.
14736         (Maintainer): Change from Jim Meyering to "all, glibc",
14737         since getdate now uses intended-for-glibc code.
14738         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14739         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14740
14741 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14742
14743         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14744         HP's ANSI C compiler.
14745         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14746         Declaring int functions causes warnings on some modern systems and
14747         shouldn't be needed to compile on ancient ones.
14748         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14749         defined.
14750
14751         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14752         with the following changes.
14753         (__set_errno): Parenthesize properly.
14754         Include <stdbool.h>.
14755         (MIN, MAX, MATCHING_INO): New macros.
14756         (__getcwd): Define with prototype, not K&R form.
14757         Use heuristics to allocate default buffer on stack if possible.
14758         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14759         behavior, and to avoid the PATH_MAX limit when computing
14760         ../../../../...
14761         Use MATCHING_INO to compare inode number to file.
14762         Check for arithmetic overflow in size calculations.
14763         Fix bug in reallocation of dot array that caused getcwd to fail
14764         on directories nested deeper than 75.
14765         Be more careful about saving errno on error.
14766         Do not use realloc; use only free+malloc, as this is a bit
14767         more flexible and avoids a needless copy operation.
14768         Do not inspect st_dev and st_ino for symbolic links; POSIX
14769         doesn't specify the latter.
14770         Check for closedir errors.
14771         Avoid needless casts.
14772         Use "#ifdef weak_alias" around weak_alias, to be like other
14773         glibc code.
14774         The following changes to getcwd.c have effect only when used in
14775         gnulib; they have no effect inside glibc proper.
14776         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14777         as alloca isn't used.
14778         (alloca, __alloca): Likewise.
14779         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14780         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14781         unconditionally, as gnulib assumes C89 or better.
14782         Do not include <sys/param.h>.
14783         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14784         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14785         better.
14786         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14787         Include <dirent.h> in a way that is compatible with modern Autoconf.
14788         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14789         New macros, if not already defined.
14790         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14791         Use "_LIBC", not "defined _LIBC", for consistency.
14792         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
14793         a mempcpy module.
14794         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
14795         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
14796         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
14797         credit only to Jim Meyering and adjust the copyright dates.
14798         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
14799         <stdlib.h>, <unistd.h>, "pathmax.h".
14800         Instead, include "xgetcwd.h" (first) and "getcwd.h".
14801         (INITIAL_BUFFER_SIZE): Remove.
14802         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
14803
14804 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14805
14806         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
14807         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
14808         Use the _ONCE methods, for efficiency.
14809         Check for fcntl.h.  In test program, include <errno.h>
14810         and <fcntl.h> if available.  Remove old K&R cruft from
14811         test program.  Check for common errors in GNU/Linux,
14812         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
14813         don't do AC_LIBOBJ, as that's getcwd.m4's job.
14814         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
14815         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
14816         name accordingly.
14817         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
14818         accommodate new getcwd.c.
14819         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
14820         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
14821         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
14822         that's all we need now.
14823
14824 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14825
14826         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
14827         argp-parse.c depends on getopt internals, that means we should
14828         always use our getopt, to be on the safe side.
14829         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
14830         order not to spoil the result of an eventual previous invocation
14831         of gl_GETOPT_SUBSTITUTE.
14832
14833 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14834
14835         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
14836         redefinition warnings. To avoid them, include the defines
14837         in `#if !defined __need_getopt ... #endif'. The only place
14838         where __getopt_argv_const is used is in definitions
14839         of getopt_long and getopt_long_only below, which are as well
14840         protected by `#ifndef __need_getopt'.
14841         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
14842         __need_getopt after including <stdio.h> and <unistd.h> These
14843         headers might have defined it.
14844
14845 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14846
14847         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
14848
14849 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14850
14851         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
14852         (futimens): New function, which uses futimes if available.
14853         (futimens, utimens): Support timespec==NULL, with same semantics
14854         as utime and utimens.
14855         * lib/utimens.h (futimens): New decl.
14856
14857 2004-11-23  Jim Meyering  <jim@meyering.net>
14858
14859         * lib/getopt_.h: Remove trailing blanks.
14860
14861 2004-11-23  Jim Meyering  <jim@meyering.net>
14862
14863         * lib/__fpending.c: Add comment.
14864
14865 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
14866
14867         * modules/canonicalize (Depends-on): Add xreadlink.
14868         Problem reported by James Youngman.
14869
14870 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
14871
14872         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
14873         New macros.
14874         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
14875         optopt): Use them instead of invoking ## directly; otherwise, the
14876         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
14877
14878 2004-11-19  Bruno Haible  <bruno@clisp.org>
14879
14880         * lib/strtok_r.c: Move comments from here...
14881         * lib/strtok_r.h: ... to here.
14882
14883 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14884
14885         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
14886         implementations that mishandle size_t overflow.
14887
14888 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14889
14890         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
14891         might fail.  Problem reported by Yoann Vandoorselaere.
14892         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
14893         implementations that mishandle size_t overflow.
14894
14895 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14896
14897         * modules/canon-host (Depends-on): Add strdup.
14898
14899 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14900
14901         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
14902
14903 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14904
14905         * lib/canon-host.c: Include "strdup.h".
14906         (canon_host): Use getaddrinfo if available, so that IPv6 works.
14907         Use strdup instead of malloc/strcpy to duplicate strings.
14908
14909         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
14910         (human_space_before_unit): New constant.
14911         * lib/human.c (human_readable): Support it.
14912
14913         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
14914         (xgetcwd): Set errno correctly when failing.
14915         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
14916         the failure is actually due to a PATH_MAX problem.
14917
14918         Further getopt changes to make it more likely that glibc will
14919         buy the changes back.
14920         * lib/getopt.c (POSIXLY_CORRECT): New constant.
14921         (getopt): Use it, so to preserve glibc semantic
14922         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
14923         when compiling for libc.
14924         * lib/getopt_.h (__getopt_argv_const): Bring it back.
14925         (getopt_long, getopt_long_only): Use it.
14926
14927         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14928         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
14929         (getopt): Argv is now char * const *, as per standard.
14930         (_getopt_internal_r, _getopt_internal): Argv is now char **,
14931         not char *__getopt_argv_const *.
14932         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14933         _getopt_long_only_r): Likewise.
14934         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
14935         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14936         _getopt_long_r, _getopt_long_only_r): Likewise.
14937         * lib/getopt_.h (__getopt_argv_const): Remove.
14938         (getopt): Argv is now char * const *, as per standard.
14939
14940         * lib/getdate.y (tORDINAL): New token.
14941         (day, relunit): Allow it for relative times.
14942         (relative_time_table): Use tORDINAL for ordinals.
14943
14944 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14945
14946         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
14947         Document that "second" isn't allowed as an ordinal number.
14948
14949 2004-11-16  Jim Meyering  <jim@meyering.net>
14950
14951         * modules/closeout (Depends-on): Add fpending.
14952
14953 2004-11-15  Jim Meyering  <jim@meyering.net>
14954
14955         * lib/closeout.c: Include "__fpending.h" once again.
14956         Include <stdbool.h>.
14957         (close_stdout): Don't fail just because stdout was closed initially,
14958         since some programs don't write to stdout in the normal course of
14959         operation (other than --version and --help), and we don't want this
14960         function to make e.g. `touch file >&-' fail.
14961         But do fail if it was closed and someone has tried to write to it.
14962         E.g., `printf foo >&-' must fail.
14963
14964 2004-11-13  Jim Meyering  <jim@meyering.net>
14965
14966         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
14967
14968 2004-11-12  Simon Josefsson  <jas@extundo.com>
14969
14970         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
14971         small doc fix is still pending.
14972
14973 2004-11-11  Simon Josefsson  <jas@extundo.com>
14974
14975         * modules/strtok_r: New file.
14976
14977         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14978         strtok_r.
14979
14980 2004-11-11  Simon Josefsson  <jas@extundo.com>
14981
14982         * m4/strtok_r.m4: New file.
14983
14984         * m4/getopt.m4: Replace opterr.
14985
14986 2004-11-11  Simon Josefsson  <jas@extundo.com>
14987
14988         * lib/strtok_r.h, strtok_r.c: New file.
14989
14990 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14991
14992         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
14993         of replacing opterr, getopt, etc.  This should handle the
14994         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
14995
14996 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14997
14998         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
14999         we can stop lying to compilers about the constness of argv when we
15000         are compiled outside glibc.
15001         (getopt, getopt_long, getopt_long_only): Use it.
15002         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15003         _getopt_internal, getopt): Likewise.
15004         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15005         _getopt_long_only_r): Likewise.
15006         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15007         _getopt_long_r, _getopt_long_only_r): Likewise.
15008
15009         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
15010         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
15011         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
15012         the other external symbols.
15013         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
15014         declaration, since the above renaming now works around collisions.
15015
15016 2004-11-11  Jim Meyering  <jim@meyering.net>
15017
15018         * lib/linebreak.c: Remove trailing blanks.
15019         * lib/alloca_.h: Likewise.
15020         * lib/acosl.c: Likewise.
15021         * lib/euidaccess.c: Likewise.
15022         * lib/allocsa.h: Likewise.
15023
15024 2004-11-10  Simon Josefsson  <jas@extundo.com>
15025
15026         * m4/getaddrinfo.m4: New file.
15027
15028 2004-11-10  Simon Josefsson  <jas@extundo.com>
15029
15030         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
15031
15032 2004-11-10  Simon Josefsson  <jas@extundo.com>
15033
15034         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15035         getaddrinfo.
15036
15037         * modules/getaddrinfo: New file.
15038
15039 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15040
15041         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15042
15043 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15044
15045         * lib/mktime.c (SHR): New macro, which is a portable
15046         substitute for >> that should work even on Crays.
15047         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15048         Problem reported by Mark D. Baushke in
15049         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15050         * lib/getdate.y (SHR): Likewise.
15051         (tm_diff): Use it.
15052         * lib/strftime.c (SHR): Likewise.
15053         (tm_diff): Use it.
15054         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15055         quote_these_too, so that right shifts are well defined.  All uses
15056         changed.
15057
15058 2004-11-10  Jim Meyering  <jim@meyering.net>
15059
15060         Ensure that no close failure goes unreported.
15061         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15062         return early when it seems there's nothing to flush.
15063         Don't include __fpending.h.
15064
15065 2004-11-10  Jim Meyering  <jim@meyering.net>
15066
15067         * modules/closeout (Depends-on): Remove fpending.
15068
15069 2004-11-10  Jim Meyering  <jim@meyering.net>
15070
15071         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15072
15073 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15074
15075         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15076         gl_FUNC_STRFTIME.
15077         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15078         and AC_REQUIRE when possible, to avoid duplicate checks.
15079         Check for <wchar.h>.
15080
15081 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15082
15083         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
15084
15085 2004-11-09  Bruno Haible  <bruno@clisp.org>
15086
15087         * m4/sockpfaf.m4: New file.
15088
15089 2004-11-05  Bruno Haible  <bruno@clisp.org>
15090
15091         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
15092         Reported by Mark D. Baushke <mdb@cvshome.org>.
15093
15094 2004-11-04  Bruno Haible  <bruno@clisp.org>
15095
15096         2004-09-11  Bruno Haible  <bruno@clisp.org>
15097                 * allocsa.valgrind: New file.
15098         2004-02-06  Bruno Haible  <bruno@clisp.org>
15099                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
15100                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
15101                 Reported by Christopher Seip <chris.seip@hp.com>.
15102
15103 2004-11-04  Bruno Haible  <bruno@clisp.org>
15104
15105         * modules/allocsa (Files): Add lib/allocsa.valgrind.
15106         (Makefile.am): Distribute it.
15107
15108 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
15109
15110         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
15111         with errno == ERANGE if the buffer is too small.
15112         Problem reported by Mark D. Baushke.
15113
15114 2004-11-03  Albert Chin  <china@thewrittenword.com>
15115             Paul Eggert  <eggert@cs.ucla.edu>
15116
15117         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
15118         equivalent, substitute $ac_type for equivalent type rather than
15119         blindly using uint32_t *always* which won't work if uint32_t is not
15120         available.  Define _UINT32_T to work around typedef of uint32_t if
15121         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
15122         2.5.1.
15123
15124 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15125
15126         * m4/jm-macros.m4: Sync from coreutils.
15127         (gl_MACROS): Check for mbrlen, for pathchk.
15128         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
15129
15130 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15131
15132         * lib/xreadlink.c (MAXSIZE): New macro.
15133         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
15134         size does not exceed MAXSIZE.  Avoid cast.
15135         As suggested by Mark D. Baushke in
15136         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
15137         if readlink fails with buffer size just under MAXSIZE, try again
15138         with MAXSIZE.
15139
15140 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15141
15142         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
15143
15144 2004-11-02  Derek R. Price  <derek@ximbiot.com>
15145         and  Paul Eggert  <eggert@cs.ucla.edu>
15146
15147         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
15148         (get_date): Overparenthesize to avoid GCC warning.
15149
15150 2004-11-02  Bruno Haible  <bruno@clisp.org>
15151
15152         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
15153         returns void.
15154
15155 2004-11-02  Bruno Haible  <bruno@clisp.org>
15156
15157         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
15158         function returns void.
15159
15160 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15161
15162         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
15163         fflush_unlocked, flockfile, funlockfile, funlockfile,
15164         fputs_unlocked, putc_unlocked.
15165
15166 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15167
15168         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15169         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
15170         already declared.
15171
15172 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15173
15174         * modules/getdate (Files): Add doc/getdate.texi.
15175         (Depends-on): Add setenv, xalloc.
15176
15177 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15178
15179         * lib/getdate.y: Add support for TZ="foo" within a date string.
15180         Fix some bugs near time_t boundaries.  Reject dates with
15181         out-of-range components, e.g., "Sept 31".
15182         Include <stdlib.h>, "setenv.h", "xalloc.h".
15183         (ISDIGIT_LOCALE): Remove; unused.
15184         Note that the TZ and time functions used here are not reentrant.
15185         (mktime_ok, get_tz): New functions.
15186         (TZBUFSIZE): New constant.
15187         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
15188         This requires that we sometimes generate our own TZ="XXX..." setting.
15189
15190 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15191
15192         * doc/getdate.texi: New file, from coreutils with modifications for
15193         the new TZ parsing.
15194
15195 2004-10-27  Derek R. Price  <derek@ximbiot.com>
15196
15197         * lib/mktime.c (not_equal_tm): Remove redundant check.
15198
15199 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15200
15201         * modules/regex (lib_SOURCES): Add regex.c.
15202         Reported by James Youngman in
15203         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
15204
15205 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15206
15207         * lib/getdate.y: Use Bison 1.875 features, and some minor
15208         code cleanups.  This change does not affect semantics.
15209         Don't include <stdlib.h>; no longer needed.
15210         Don't include unlocked-io.h; only the "#if TEST" code uses
15211         stdio, and performance isn't crucial there.
15212         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
15213         Bison 1.875 features as described below.
15214         All uses of "PC." replaced by "pc->".
15215         (YYSTYPE): Add a forward declaration.
15216         (yylex, yyerror): Use full prototypes in forward decls.
15217         Use "%pure-parser" rather than obsolescent "%pure_parser".
15218         Use %parse-param and %lex-param instead of obsolescent
15219         YYPARSE_PARAM and YYLEX_PARAM.
15220         (meridian_table, month_and_day_table, time_units_table,
15221         relative_time_table, time_zone_table, military_table,
15222         lookup_zone, lookup_word, get_date):
15223         Use NULL instead of 0 where appropriate.
15224         (to_hour): Avoid abort (), to avoid a dependency on
15225         stdlib.h.
15226         (yyerror, yylex): Now accepts parser_control * arg.
15227         (main) [TEST]: Use '\0' rather than 0 for char.
15228
15229 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15230
15231         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
15232
15233 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15234
15235         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
15236         It's now the caller's responsibility to handle the case where
15237         !HAVE_GETPAGESIZE && !defined getpagesize.
15238
15239         * lib/mktime.c (leapyear): Arg is long int, not int.
15240
15241 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
15242
15243         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
15244
15245 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
15246
15247         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
15248         missing.  Problem reported by James Youngman.
15249
15250 2004-10-16  Simon Josefsson  <jas@extundo.com>
15251
15252         * gnulib-tool: Fix comments.  Fix parse problem.
15253         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
15254
15255 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
15256
15257         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
15258         implementation of getopt_long.  Problem reported by Alexander Taler in:
15259         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
15260
15261 2004-10-15  Bruno Haible  <bruno@clisp.org>
15262
15263         * gnulib-tool: Untabify. Initialize supplied_libname.
15264         (func_usage): More homogenous output.
15265         (func_modules_transitive_closure, func_modules_to_filelist,
15266         func_emit_lib_Makefile_am): New functions.
15267         (func_import): New function, extracted from big case statement. Use
15268         func_get_license, func_modules_transitive_closure,
15269         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
15270         opt_lgpl. Don't use test -a, as it's not portable.
15271         (func_create_testdir): Use func_modules_transitive_closure,
15272         func_modules_to_filelist, func_emit_lib_Makefile_am.
15273
15274 2004-10-15  Bruno Haible  <bruno@clisp.org>
15275
15276         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
15277
15278 2004-10-15  Bruno Haible  <bruno@clisp.org>
15279
15280         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
15281         the portions belonging to each module.
15282         Suggested by Derek Robert Price <derek@ximbiot.com>.
15283
15284 2004-10-12  Simon Josefsson  <jas@extundo.com>
15285
15286         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15287         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
15288         to real functions.
15289
15290 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15291
15292         * modules/vsnprintf: New file.
15293
15294 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15295
15296         * m4/vsnprintf.m4: New file.
15297
15298 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15299
15300         * lib/vsnprintf.h: New file.
15301         * lib/vsnprintf.c: New file.
15302
15303 2004-10-11  Bruno Haible  <bruno@clisp.org>
15304
15305         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
15306         vsnprintf.
15307
15308 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15309
15310         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
15311
15312 2004-10-07  Bruno Haible  <bruno@clisp.org>
15313
15314         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15315         fits into the provided buffer.
15316
15317 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15318
15319         * lib/diacrit.c, diacrit.h: Add GPL notice.
15320
15321         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15322         notice.
15323         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15324         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15325         This avoids a potential constant-folding bug.
15326
15327 2004-10-05  Bruno Haible  <bruno@clisp.org>
15328
15329         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15330         for the declaration of strsep.
15331
15332 2004-10-05  Bruno Haible  <bruno@clisp.org>
15333
15334         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15335
15336 2004-10-04  Simon Josefsson  <jas@extundo.com>
15337
15338         * modules/memmem: New file.
15339         * tests/test-memmem.c: New file.
15340         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15341
15342 2004-10-04  Simon Josefsson  <jas@extundo.com>
15343
15344         * m4/memmem.m4: New file.
15345
15346 2004-10-04  Simon Josefsson  <jas@extundo.com>
15347
15348         * lib/memmem.h: New file.
15349         * lib/memmem.c: New file, taken from glibc.
15350
15351 2004-10-04  Simon Josefsson  <jas@extundo.com>
15352
15353         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15354         '#ifdef USE_UNLOCKED_IO'.
15355
15356 2004-10-04  Simon Josefsson  <jas@extundo.com>
15357
15358         * config/srclist.txt: Add memmem from glibc.
15359
15360 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15361
15362         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15363
15364         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15365         modules/exclude, modules/getdate, modules/getline,
15366         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15367         modules/getusershell, modules/linebuffer, modules/md5,
15368         modules/mountlist, modules/posixtm, modules/readtokens,
15369         modules/readutmp, modules/regex, modules/sha1,
15370         modules/version-etc, modules/yesno:
15371         Remove dependency on unlocked-io.
15372
15373 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15374
15375         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15376
15377         * m4/unlocked-io.m4: Add copyright notice.
15378         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15379
15380 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15381
15382         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15383         * lib/xmalloc.c (xmemdup): Likewise.
15384         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15385         XFREE): Remove these long-obsolescent macros.
15386         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15387         * lib/xstrdup.c: Remove.
15388
15389         * lib/regex.c (re_comp): Cast gettext return value to char *,
15390         Problem reported by Martin Neitzel via Mark D. Baushke.
15391
15392 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15393
15394         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15395         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15396         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15397         regex.c, sha1.c, version-etc.c, yesno.c:
15398         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15399         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15400         the includer's responsibility.
15401
15402         Sync from coreutils.
15403
15404         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15405         points to the start of a string, as the C Standard says the
15406         resulting behavior is undefined.
15407
15408         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15409         simple -> simple_backups, numbered_existing ->
15410         numbered_existing_backups, numbered -> numbered_backups
15411         to avoid shadowing problems.  All uses changed.
15412         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15413         * lib/backupfile.c (check_extension, numbered_backup):
15414         Rename locals to avoid shadowing 'basename'.
15415         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15416         once.
15417
15418         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15419         * lib/.cvsignore: Add getopt.h.
15420
15421 2004-10-04  Bruno Haible  <bruno@clisp.org>
15422
15423         * modules/README: New file.
15424         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15425         not a module.
15426
15427 2004-10-02  Jim Meyering  <jim@meyering.net>
15428
15429         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15430
15431 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15432
15433         * modules/strsep: New file.
15434
15435 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15436
15437         * m4/strsep.m4: New file.
15438
15439 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15440
15441         * lib/strsep.h: New file.
15442         * lib/strsep.c: New file.
15443
15444 2004-10-01  Simon Josefsson  <jas@extundo.com>
15445
15446         * lib/snprintf.c (snprintf): Handle size==0.
15447
15448 2004-10-01  Simon Josefsson  <jas@extundo.com>
15449             Bruno Haible  <bruno@clisp.org>
15450
15451         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15452         (snprintf): Declare 'args'.
15453
15454 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
15455
15456         * lib/snprintf.c: Remove comments as to why each header is needed.
15457
15458 2004-10-01  Bruno Haible  <bruno@clisp.org>
15459
15460         * MODULES.html.sh: Add strsep.
15461
15462 2004-09-30  Simon Josefsson  <jas@extundo.com>
15463
15464         * modules/snprintf: New file.
15465
15466 2004-09-30  Simon Josefsson  <jas@extundo.com>
15467
15468         * m4/snprintf.m4: New file.
15469
15470 2004-09-30  Simon Josefsson  <jas@extundo.com>
15471
15472         * lib/snprintf.h, lib/snprintf.c: New files.
15473
15474 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15475
15476         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15477         (hol_entry_help): Never translate an empty string.
15478         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
15479         * lib/argp.h (OPTION_NO_TRANS): New option.
15480
15481 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15482
15483         * modules/argp (Maintainer): Replace Simon Josefsson
15484         by Sergey Poznyakoff.
15485
15486 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15487
15488         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
15489         changes merged back into glibc.
15490
15491 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15492
15493         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
15494
15495 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15496
15497         * lib/xvasprintf.c: Include xalloc.h.
15498         (xvasprintf): Use xalloc_die, not xmalloc_die.
15499
15500 2004-09-29  Bruno Haible  <bruno@clisp.org>
15501
15502         * modules/alloca-opt: New file, derived from modules/alloca.
15503         * modules/allocsa: Depend on alloca-opt instead of alloca.
15504         * modules/setenv: Likewise.
15505         * modules/vasnprintf: Likewise.
15506         * MODULES.html.sh: Add alloca-opt.
15507
15508 2004-09-28  Simon Josefsson  <jas@extundo.com>
15509
15510         * gnulib-tool: New parameter --lgpl, to asseert that modules are
15511         LGPL, and to replace license template from GPL to LGPL.
15512
15513 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15514
15515         * modules/dummy: Change license to LGPL.
15516
15517 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15518
15519         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
15520
15521 2004-09-24  Simon Josefsson  <jas@extundo.com>
15522
15523         * modules/minmax (License): Change from GPL to LGPL.
15524
15525 2004-09-23  Simon Josefsson  <jas@extundo.com>
15526
15527         * gnulib-tool (--import): Typo.
15528
15529 2004-09-23  Simon Josefsson  <jas@extundo.com>
15530
15531         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15532
15533 2004-09-22  Bruno Haible  <bruno@clisp.org>
15534
15535         * modules/*: Add 'License' field.
15536         * gnulib-tool: Accept --extract-license option.
15537         (func_get_license): New function.
15538
15539 2004-09-21  Bruno Haible  <bruno@clisp.org>
15540
15541         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15542         Reported by Simon Josefsson.
15543
15544 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15545
15546         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15547         gl_AC_TYPE_LONG_LONG.
15548
15549 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15550
15551         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15552
15553 2004-09-18  Simon Josefsson  <jas@extundo.com>
15554         and  Paul Eggert  <eggert@cs.ucla.edu>
15555
15556         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15557         calls with autoreconf.  Define GL_LIB.
15558
15559 2004-09-14  Karl Berry  <karl@gnu.org>
15560
15561         * config/srclist.txt: unsync setenv.c, sigh.
15562
15563 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15564
15565         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15566         Problem reported by Bruno Haible in:
15567         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15568
15569 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15570
15571         * config/srclist.txt: Comment out argp-pvh.c.
15572
15573 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15574
15575         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15576         in case some system header has #define'd it.  Problem reported by
15577         Soeren D. Schulze in
15578         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15579
15580 2004-09-09  Karl Berry  <karl@gnu.org>
15581
15582         * regex.[ch]: delete from the root.  These were supposed to be
15583                 synced with emacs cvs, but this has not happened for about
15584                 a year, and anyway nothing else uses emacs regex.[ch].
15585                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15586                 lib/regex[.ch] is untouched.
15587
15588 2004-09-09  Bruno Haible  <bruno@clisp.org>
15589
15590         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15591
15592 2004-09-09  Bruno Haible  <bruno@clisp.org>
15593
15594         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15595         modifications.
15596         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15597
15598 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15599
15600         * modules/xvasprintf: New file.
15601         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15602
15603 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15604
15605         * lib/xvasprintf.h: New file.
15606         * lib/xvasprintf.c: New file.
15607         * lib/xasprintf.c: New file.
15608
15609 2004-09-08  Bruno Haible  <bruno@clisp.org>
15610
15611         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15612
15613 2004-09-08  Bruno Haible  <bruno@clisp.org>
15614
15615         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15616         length is > INT_MAX.
15617         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15618         more.
15619
15620 2004-09-08  Bruno Haible  <bruno@clisp.org>
15621
15622         * lib/stdint_.h: New file, taken from GNU clisp.
15623
15624 2004-09-08  Bruno Haible  <bruno@clisp.org>
15625             Oskar Liljeblad  <oskar@osk.mine.nu>
15626
15627         * modules/stdint: New file.
15628         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15629
15630 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15631
15632         Import from coreutils.
15633         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15634         strings on unbounded length.  alloca's performance benefits aren't
15635         that important here.
15636         (V_STRDUP): Remove.
15637         (parse_with_separator): New function, with most of the internals
15638         of the old parse_user_spec.  Allow user to omit both user and group,
15639         for compatibility with FreeBSD.
15640         Clone only the user name, not the entire spec.
15641         Do not set *uid, *gid unless entirely successful.
15642         Avoid memory leak in some failing cases.
15643         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15644         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15645         (parse_user_spec): Rewrite to use parse_with_separator.
15646
15647 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15648
15649         * modules/userspec: Don't depend on alloca.
15650
15651 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15652
15653         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15654
15655 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15656
15657         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15658         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15659         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15660
15661 2004-08-16  Simon Josefsson  <jas@extundo.com>
15662
15663         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15664         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15665         Add --dry-run for --import.
15666         Let user provided command line parameters override configure.ac
15667         settings.
15668
15669 2004-08-12  Simon Josefsson  <jas@extundo.com>
15670
15671         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15672         as discussed with Paul Eggert in threads rooted at
15673         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15674         and
15675         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15676         Before, the test was empty, and relied on ELIDE_CODE in source
15677         code.)
15678         (gl_PREREQ_GETOPT): New macro.
15679         (gl_GETOPT): Use them.
15680
15681 2004-08-12  Simon Josefsson  <jas@extundo.com>
15682
15683         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15684         * lib/getopt_.h: Renamed from getopt.h.
15685
15686 2004-08-12  Simon Josefsson  <jas@extundo.com>
15687
15688         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15689         Change default library name from libfoo to libgnu.
15690         Now, if you have a configure.ac that says:
15691                 gl_SOURCE_BASE(gl)
15692                 gl_M4_BASE(gl/m4)
15693                 gl_MODULES(error getopt etcetera)
15694                 gl_INIT
15695         you can import all you need by running:
15696                 ../gnulib/gnulib-tool --import
15697
15698         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15699         (Makefile.am): Rewrite, use logic from argz.
15700         (Include): Use <getopt.h> instead of "getopt.h".
15701
15702 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15703
15704         * modules/argp (Files): Add m4/unlocked-io.m4.
15705         (Depends-on): Add extensions.
15706
15707 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15708
15709         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15710         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15711         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15712         Check for program_invocation_name, program_invocation_short_name,
15713         flockfile, funlockfile, features.h, _getopt_long_only_r.
15714
15715 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15716
15717         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15718         its complicated substitute.
15719         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15720         and program_invocation_name.
15721         (__argp_basename) [!_LIBC]: Remove; the only use was
15722         replaced by its body.
15723         (__argp_short_program_name): Change condition from
15724         !defined __argp_short_program_name to
15725         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15726         to match argp-namefrob.h.
15727         (__argp_failure): Don't assume strerror_r returns char *.
15728         * lib/argp-parse.c (N_): Define unconditionally.
15729         (argp_default_options): Fill out initializers with 0 to avoid
15730         gcc warnings.
15731
15732 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15733
15734         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15735         getopt1.c.
15736
15737 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15738
15739         Merge from coreutils.
15740
15741         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15742
15743         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15744         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15745
15746 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15747
15748         Merge from coreutils.
15749
15750         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15751         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15752         for Reliant Unix 5.43.
15753
15754         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15755         (union fooround): Use uintmax_t, not long int.
15756         The rest is a merge from libc:
15757         [defined _LIBC]: Include <shlib-compat.h>.
15758         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15759
15760         * lib/settime.c (settime): Recode to avoid warning with
15761         Sun Forte C 6U2.
15762
15763         * lib/strverscmp.c: Convert to UTF-8.
15764
15765 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15766
15767         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15768         m4/uintmax_t.m4.
15769
15770 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15771
15772         * modules/xalloc-die: New file.
15773         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15774
15775         * modules/md5 (Files): Add m4/uint32_t.m4.
15776         * modules/sha1: Renamed from modules/sha.
15777         (Files):
15778         Rename lib/sha.h to lib/sha1.h.
15779         Rename lib/sha.c to lib/sha1.c.
15780         Rename m4/sha.m4 to m4/sha1.m4.
15781         (lib_SOURCES): Likewise.
15782         (configure.ac): Rename gl_SHA to gl_SHA1.
15783         (Include): sha.h -> sha1.h.
15784
15785 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15786
15787         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15788         * m4/sha1.m4: Renamed from sha.m4.
15789         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15790
15791 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15792
15793         * lib/obstack.h (obstack_empty_p):
15794         Don't assume that chunk->contents is suitably aligned.
15795         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
15796         Likewise. Problem reported by Benno in
15797         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
15798
15799         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
15800         readable.  This could be improved further but it'd take some work.
15801
15802 2004-08-08  Simon Josefsson  <jas@extundo.com>
15803
15804         * modules/xgethostname (Depends-on): Remove exit and error (not
15805         used).
15806
15807         * modules/getpass-gnu: Add getpass.h.
15808         (Depends-on): Add stdbool.
15809         * modules/getpass: Add getpass.h.
15810
15811 2004-08-08  Simon Josefsson  <jas@extundo.com>
15812
15813         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
15814         Check getpass declaration.
15815
15816 2004-08-08  Simon Josefsson  <jas@extundo.com>
15817
15818         * lib/xgethostname.c: Don't include error.h (not used).
15819
15820         * lib/getpass.h: Add.
15821         * lib/getpass.c: Include getpass.h first.
15822
15823 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
15824
15825         * lib/xalloc-die.c: New file.
15826         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
15827         All uses removed.
15828         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
15829         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
15830         xalloc-die.c.
15831         (_, N_, xalloc_die): Move to xalloc-die.c.
15832         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
15833         so that we needn't mess with xalloc_msg_memory_exhausted.
15834
15835         * lib/sha1.h: Renamed from sha.h.
15836         (SHA1_H): Renamed from _SHA_H.
15837         (sha1_ctx): Renamed from sha_ctx.
15838         (sha1_init_ctx): Renamed from sha_init_ctx.
15839         (sha1_process_block): Renamed from sha_process_block.
15840         (sha1_process_bytes): Renamed from sha_process_bytes.
15841         (sha1_finish_ctx): Renamed from sha_finish_ctx.
15842         (sha1_read_ctx): Renamed from sha_read_ctx.
15843         (sha1_stream): Renamed from sha_stream.
15844         (sha1_buffer): Renamed from sha_buffer.
15845         * lib/sha1.c: Likewise; renamed from sha.c.
15846         Do not include <sys/types.h>.
15847         Include <stddef.h> rather than <stdlib.h>.
15848
15849 2004-08-08  Bruno Haible  <bruno@clisp.org>
15850
15851         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
15852         FILESYSTEM_PREFIX_LEN.
15853         * lib/progreloc.c: Likewise.
15854         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
15855
15856 2004-08-06  Simon Josefsson  <jas@extundo.com>
15857
15858         * modules/progname (Depends-on): Don't depend on stdbool.
15859
15860 2004-08-06  Simon Josefsson  <jas@extundo.com>
15861
15862         * modules/getsubopt: New file.
15863         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15864         getsubopt.
15865
15866 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15867
15868         More merge from coreutils.
15869
15870         * m4/utimens.m4, m4/utimecmp.m4: New files.
15871         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
15872         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
15873         prereq.m4, sha.m4: Import changes from coreutils.
15874
15875 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15876
15877         More merge from coreutils.
15878         * modules/raise, modules/readtokens0, modules/utimens:
15879         * modules/utimecmp, module/xnanosleep: New files.
15880         * modules/strftime: Add lib/strftime.h.
15881         Change include from <time.h> to "strftime.h".
15882         * modules/yesno: Add lib/yesno.h.
15883         * modules/backupfile: Remove lib/addext.c.
15884         * modules/euidaccess: Add stat-macros.h.
15885         * modules/canonicalize, modules/euidaccess,
15886         modules/filemode, modules/lchown, modules/makepath,
15887         modules/rmdir, modules/stat: Likewise.
15888
15889 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15890
15891         Merge from tar.
15892         * lib/argp-help.c (make_hol, hol_append): Don't assume that
15893         SIZE_MAX is a valid preprocessor constant.
15894         (__argp_basename): Change from "#ifndef _LIBC"
15895         to "#ifndef __argp_short_program_name", so that
15896         we don't compile these functions for tar.
15897
15898         More merges from coreutils.
15899         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
15900         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
15901         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
15902         * lib/addext.c: Remove; no longer needed.
15903         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
15904         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
15905         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
15906         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
15907         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
15908         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
15909         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
15910         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
15911         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
15912         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15913         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
15914         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
15915         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
15916         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
15917         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
15918         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
15919         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
15920         Import changes from coreutils.
15921
15922 2004-08-05  Simon Josefsson  <jas@extundo.com>
15923
15924         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
15925
15926 2004-08-05  Simon Josefsson  <jas@extundo.com>
15927
15928         * m4/getsubopt.m4: New file.
15929
15930 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15931
15932         Merge from coreutils.
15933
15934         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
15935         * m4/getcwd-path-max.m4: New files.
15936
15937         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
15938         FILESYSTEM_PREFIX_LEN ->
15939         FILE_SYSTEM_PREFIX_LEN.
15940         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
15941         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
15942         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
15943         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
15944
15945         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
15946         prerequisite modules now handle the DOS stuff.
15947         Don't check for unistd.h.
15948
15949 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15950
15951         Merge from coreutils.
15952
15953         * lib/.gdb-history: Remove; this doesn't belong here.
15954
15955         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
15956         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
15957         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
15958         * lib/getcwd.c: New files.
15959
15960         * lib/dirname.h: Include <stdbool.h>.
15961         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
15962         for consistency with POSIX terminology.  All uses changed.
15963         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
15964         (strip_trailing_slashes): Use bool for booleans.
15965         * lib/stripslash.c (strip_trailing_slashes): Likewise.
15966
15967         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
15968         sometimes returns a positive errno value even when it succeeds.
15969         (print_errno_message) [!LIBC]: Fall back on strerror if
15970         __strerror_r fails.
15971
15972         * lib/path-concat.c (mempcpy): Don't define if a system header defines
15973         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
15974         (longest_relative_suffix): New function.
15975         (path_concat): Use it.  Assume first argument is not NULL.
15976         Port to DOS.  Omit redundant separators.
15977         Report an error instead of returning NULL.
15978         Use mempcpy instead of memcpy.
15979         (xpath_concat): Remove: not declared or used.
15980
15981         * lib/same.h: Include <stdbool.h>
15982         (same_name): Return bool, not int.
15983         * lib/same.c (same_name): Likewise.
15984         (errno): Don't declare; we assume C89 or better now.
15985
15986         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
15987         if not already defined.
15988
15989         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
15990         * lib/dup-safer.c (errno): Likewise.
15991
15992 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15993
15994         Merge from coreutils.
15995         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
15996         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
15997         * modules/path-concat: Don't depend on strdup.
15998
15999 2004-08-03  Simon Josefsson  <jas@extundo.com>
16000
16001         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
16002         * lib/progname.h: Don't include stdbool.h.
16003
16004 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16005
16006         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
16007         * MODULES.html.sh (func_all_modules): Remove fatal.
16008
16009 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16010
16011         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
16012
16013 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16014
16015         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
16016         working.
16017
16018 2004-08-02  Simon Josefsson  <jas@extundo.com>
16019
16020         * lib/getsubopt.h: New file, with comments from Bruno Haible.
16021         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
16022         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
16023
16024 2004-08-01  Simon Josefsson  <jas@extundo.com>
16025
16026         * lib/xgetdomainname.c: Include stdlib.h, for free().
16027
16028 2004-07-19  Bruno Haible  <bruno@clisp.org>
16029
16030         * MODULES.html.sh (func_all_modules): Add dummy.
16031
16032 2004-07-16  Simon Josefsson  <jas@extundo.com>
16033
16034         * modules/dummy: New file.
16035
16036 2004-07-16  Simon Josefsson  <jas@extundo.com>
16037
16038         * lib/dummy.c: New file.
16039
16040 2004-07-16  Bruno Haible  <bruno@clisp.org>
16041
16042         * lib/backupfile.h: Add extern "C" for C++.
16043         * lib/closeout.h: Likewise.
16044         * lib/copy-file.h: Likewise.
16045         * lib/findprog.h: Likewise.
16046         * lib/full-write.h: Likewise.
16047         * lib/pathname.h: Likewise.
16048         * lib/progname.h: Likewise.
16049         * lib/stpcpy.h: Likewise.
16050         * lib/stpncpy.h: Likewise.
16051         * lib/strcase.h: Likewise.
16052         * lib/strstr.h: Likewise.
16053         * lib/xalloc.h: Likewise.
16054
16055         * lib/mbswidth.h: Add extern "C" for C++.
16056         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16057
16058 2004-07-13  Robert Millan  <robertmh@gnu.org>
16059
16060         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16061
16062 2004-07-09  Simon Josefsson  <jas@extundo.com>
16063
16064         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16065         failed without this.)
16066
16067 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16068
16069         * modules/chown (Files): Add lib/fchown-stub.c, since
16070         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16071
16072 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16073
16074         * lib/fchown-stub.c: New file.
16075
16076 2004-06-24  Jim Meyering  <jim@meyering.net>
16077
16078         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16079
16080 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16081
16082         * modules/argz: Omit "#include".
16083
16084         * MODULES.html.sh (func_all_modules): Add calloc, to match
16085         2004-06-01 addition of calloc module.
16086
16087 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16088
16089         * m4/argz.m4: New file, which is autoupdated from libtool.
16090
16091 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16092
16093         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
16094         libtool.
16095
16096 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16097
16098         * config/srclist-update: Don't insist on "USA." before the
16099         close-comment, as libtool omits the period and puts the */ on a
16100         separate line.
16101         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
16102         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
16103
16104 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
16105
16106         * modules/argz: New file.
16107         * MODULES.html.sh (func_all_modules): Add argz.
16108
16109 2004-06-12  Jim Meyering  <jim@meyering.net>
16110         and  Paul Eggert  <eggert@cs.ucla.edu>
16111
16112         * modules/hash (Files): Add lib/xalloc.h.
16113         * modules/pipe (Depends-on): Add wait-process.
16114         * modules/stat (Depends-on): Add xalloc.
16115         * modules/userspec (Files): Add lib/userspec.h.
16116         * modules/xstrto
16117
16118         Upgrade from gettext-0.13.
16119         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
16120         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
16121         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
16122
16123 2004-06-10  Jim Meyering  <jim@meyering.net>
16124
16125         * lib/calloc.c: New file.
16126
16127 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
16128
16129         * lib/getdate.y (yylex): Allow space between sign and number.
16130         Problem reported by Dan Jacobson.
16131
16132 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16133
16134         Merge from coreutils CVS.
16135
16136         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
16137         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
16138         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
16139         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
16140         xstrtol.m4: Fix copyright date and/or serial number.
16141
16142         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
16143         See if we need an fchown replacement.
16144         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
16145         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
16146         and use the replacement function if we detect either defect.
16147
16148         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
16149         gl_UTIMECMP.
16150
16151 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16152         and  Jim Meyering  <jim@meyering.net>
16153
16154         Merge from coreutils CVS.
16155
16156         * lib/stat-macros.h: New file, with contents from file-type.h
16157         and coreutils' system.h.
16158         * lib/file-type.c: Include "stat-macros.h".
16159         * lib/file-type.h (file_type): Move all macro definitions to new file,
16160         stat-macros.h.
16161
16162         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
16163         Wrap old code with this conditional.
16164         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
16165         function that does not dereference symlinks.
16166         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
16167
16168         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
16169         dependency problems.
16170         (xreadlink): Accept new arg SIZE, for efficiency.
16171         All decls and uses changed.
16172         * lib/xreadlink.h: Include <stddef.h>, for size_t.
16173
16174         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
16175         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
16176
16177         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
16178         sysexits.h.
16179
16180 2004-06-01  Jim Meyering  <jim@meyering.net>
16181
16182         * m4/calloc.m4: New file.
16183
16184 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
16185
16186         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
16187         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
16188         Also, fix a typo in a diagnostic.
16189
16190 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16191
16192         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
16193         or AC_FUNC_REALLOC.
16194
16195 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16196
16197         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
16198         macros to be defined.
16199         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
16200         the allocator returns NULL because the requested size is zero.
16201
16202 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16203
16204         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
16205         var.  Add comment explaining why libc still defines it.  This
16206         merges the following patch from glibc:
16207         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
16208
16209 2004-05-20  Andreas Schwab  <schwab@suse.de>
16210
16211         * m4/free.m4: Replace free if it not known to work, not the other
16212         way round.
16213
16214 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
16215
16216         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
16217         present in glibc since revision 1.1 of this file.
16218         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
16219         obstack_alignment_mask, obstack_alloc, obstack_base,
16220         obstack_blank, obstack_blank_fast, obstack_chunk_size,
16221         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
16222         obstack_grow0, obstack_init, obstack_int_grow,
16223         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
16224         obstack_next_free, obstack_object_size, obstack_ptr_grow,
16225         obstack_ptr_grow_fast, obstack_room): Remove declarations of
16226         nonexistent functions.
16227
16228 2004-05-18  Karl Berry  <karl@gnu.org>
16229
16230         * config/srclist.txt: break link for vasnprintf.c.
16231
16232 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16233
16234         Port obstack to the AS/400, where pointers are 16 bytes wide and
16235         you cannot cast an integer to a valid pointer.  This patch is
16236         currently waiting to be integrated into glibc; see
16237         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
16238
16239         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
16240         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
16241         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
16242         (struct obstack): temp member is now a union of a pointer and
16243         an integer, instead of an integer.  All integer uses changed.
16244         This does not affect the physical layout of struct obstack,
16245         except on hosts (like the AS/400) where the size or alignment of
16246         void * is greater than that of ptrdiff_t.
16247         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
16248         __STDC__)]: Store temporary in pointer member of union, not
16249         integer member.
16250         * lib/obstack.c: Include <stddef.h>, for offsetof.
16251         (struct fooalign): Remove; it doesn't need a name.
16252         (union fooround): Change double to long double, and add void *.
16253         (DEFAULT_ALIGNMENT): Use offsetof to compute.
16254         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
16255         not a macro.  Hence the values are always int; so remove all
16256         casts-to-int in uses.
16257
16258 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16259
16260         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
16261         we can get this patch merged into glibc.
16262
16263 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16264             Paul Eggert  <eggert@cs.ucla.edu>
16265
16266         * m4/argp: Depend on alloca.
16267
16268 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16269             Paul Eggert  <eggert@cs.ucla.edu>
16270
16271         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
16272         freecoding.
16273
16274 2004-05-17  Bruno Haible  <bruno@clisp.org>
16275
16276         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
16277         precision that consists of a '.' followed by an empty digit string.
16278         Patch by Tor Lillqvist <tml@iki.fi>.
16279
16280 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16281
16282         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
16283         for backward compatibility with older code.  We need our own
16284         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
16285         it under some other name, and our alloca.h will define it.
16286
16287 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16288             Derek Price  <derek@ximbiot.com>
16289
16290         * lib/alloca.c: Include <alloca.h>, to get our interface.
16291         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
16292         include <alloca.h> first.  Use C89 prototype for alloca; this
16293         requires including <stddef.h> for size_t.  Use extern "C" if C++.
16294         Use #elif for simplicity, since we can assume C89 now.
16295         Don't try to source the system alloca.h since it will not be found
16296         and to prevent recursively including its replacement.
16297         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
16298         * lib/regex.c: Likewise.
16299
16300 2004-05-16  Derek Price  <derek@ximbiot.com>
16301             Paul Eggert  <eggert@cs.ucla.edu>
16302
16303         getline cleanup.  This changes the getndelim2 API: both order of
16304         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
16305         no delimiter).
16306
16307         * lib/getline.c: Don't include stddef.h or stdio.h, since our
16308         interface does that.
16309         (getline): Always use getdelim, so that we don't have two
16310         copies of this code.
16311         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
16312         if available.
16313         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
16314         (GETNDELIM2_MAXIMUM): New macro.
16315         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16316         instead of the old practice of delim2==0.  All callers changed.
16317         Return -1 on overflow, instead of returning junk.
16318         Do not set *linesize unless allocation succeeds.
16319         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16320         that we include sys/types.h.
16321         * lib/getnline.h: Likewise.
16322         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16323         (getndelim2): Reorder arguments.
16324         * lib/getnline.c (getnline, getndelim):
16325         Don't discard the NMAX argument.
16326         (getnline): Invoke getndelim, to avoid code duplication.
16327         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16328         of (size_t) -1 by callers of the getnline family.
16329
16330 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16331
16332         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16333         Check for gettimeofday.
16334         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16335         Check for settimeofday, stime.
16336
16337 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16338
16339         * lib/nanosleep.c (suspended): Change its type from int to
16340         sig_atomic_t volatile.
16341         (first_call): Make it private to rpl_nanosleep, and have it
16342         be zero initially as that's a bit faster.
16343         (my_usleep): Round up fractional times instead of truncating them,
16344         as this is the usual meaning for 'sleep'.
16345
16346         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16347         doesn't work.
16348         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16349         (ENOSYS): Define if not defined.
16350         (settime): Fall back on stime if it exists and settimeofday fails.
16351         But don't bother with fallbacks if a method fails with errno == EPERM.
16352
16353 2004-05-11  Jim Meyering  <jim@meyering.net>
16354
16355         Prior to this change, the save_cwd caller required read access to the
16356         current directory on most systems (ones with the fchdir function).
16357
16358         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16359         fails, try write-only, and finally, resort to using xgetcwd.
16360
16361 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16362
16363         * lib/obstack.c, obstack.h: Import changes from libc.
16364
16365 2004-04-28  Bruno Haible  <bruno@clisp.org>
16366
16367         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16368         also implicitly appends .exe to executables.
16369         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16370         accepts Windows pathnames.
16371         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16372         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16373         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16374         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16375         Reported by Derek Robert Price <derek@ximbiot.com>.
16376
16377 2004-04-21  Karl Berry  <karl@gnu.org>
16378
16379         * config/srclist.txt (localcharset.c): break sync.
16380
16381 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16382
16383         * m4/host-os.m4: Add a copyright notice.
16384
16385 2004-04-20  Jim Meyering  <jim@meyering.net>
16386
16387         Change UTILS_ to gl_ in AC_DEFINE'd names.
16388         Change utils_- and jm_-prefixed variables, too.
16389         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16390         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16391         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16392
16393         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16394         Don't emit trailing blanks.
16395         Also rename jm_-prefixed variables to have gl_ prefix.
16396
16397         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16398         Also rename jm_-prefixed variables to have gl_ prefix.
16399
16400         * m4/jm-macros.m4: Reflect the renamings.
16401         * m4/prereq.m4: Likewise.
16402
16403 2004-04-20  Jim Meyering  <jim@meyering.net>
16404
16405         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16406         memory.
16407
16408 2004-04-20  Jim Meyering  <jim@meyering.net>
16409             Bruno Haible  <bruno@clisp.org>
16410
16411         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16412         memory when realloc fails.
16413
16414 2004-04-19  Jim Meyering  <jim@meyering.net>
16415
16416         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16417         now that readutmp.c may call `free (0)'.
16418
16419 2004-04-19  Bruno Haible  <bruno@clisp.org>
16420
16421         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16422         * m4/inttypes_h.m4: Likewise.
16423         * m4/stdint_h.m4: Likewise.
16424         * m4/intmax_t.m4: Likewise.
16425         * m4/uintmax_t.m4: Likewise.
16426
16427 2004-04-18  Jim Meyering  <jim@meyering.net>
16428
16429         * m4/prereq.m4: Don't forbid jm_ prefix.
16430
16431         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16432         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16433         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16434         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16435         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16436         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16437         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16438         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16439         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16440         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16441         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16442         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16443         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16444         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16445         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16446         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16447         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16448         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16449         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16450
16451 2004-04-18  Jim Meyering  <jim@meyering.net>
16452
16453         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16454         failure, don't leak memory and do call END_UTMP_ENT.
16455
16456 2004-04-16  Jim Meyering  <jim@meyering.net>
16457
16458         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
16459         coreutils' stat program.
16460         (gl_PREREQ): Don't require jm_PREREQ_STAT.
16461
16462 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16463
16464         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16465         C89.
16466         (CHAR_BIT): Remove, since we assume C89.
16467         Include <stdint.h> if available, as per current Autoconf CVS advice.
16468
16469 2004-03-31  Jim Meyering  <jim@meyering.net>
16470
16471         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16472         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16473         * m4/xalloc.m4: Likewise.
16474
16475 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16476
16477         Merge from coreutils.
16478
16479         * m4/inttostr.m4: New file.
16480         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
16481         Require AM_STDBOOL_H and gl_TIMESPEC instead.
16482         Require gl_CLOCK_TIME.
16483         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
16484
16485 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16486
16487         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
16488         not bool, to be more consistent with Unix conventions.
16489         Suggested by Bruno Haible.
16490
16491         Merge from coreutils.
16492
16493         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
16494         * lib/umaxtostr.c: New files.
16495
16496         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
16497         the usual <time.h> dance.
16498         (get_date): Change signature to support fractional time stamps.
16499         All callers changed.
16500         * lib/getdate.y: Include "getdate.h" first, as we can now
16501         assume C89 and don't need to worry about 'const'.
16502         Similarly, include "unlocked-io.h" near start, not in middle.
16503         Include <limits.h>.
16504         (textint.value): Use long int rather than int.
16505         (textint.digits): Use size_t rather than int.
16506         (BILLION, LOG10_BILLION): New constants.
16507         (parser_control): New member rel_ns.  Members day_ordinal,
16508         time_zone, month, day, hour, minutes, rel_year, rel_month,
16509         rel_day, rel_hour, rel_minutes, rel_seconds
16510         are now long int, not int.  Member seconds is now struct timespec,
16511         not int.  New member timespec_seen.  Members dates_seen, days_seen,
16512         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
16513         not int.
16514         (%union.intval): Now long int, not int.
16515         New member timespec.
16516         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
16517         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
16518         (spec): Now is a timespec or an item list.
16519         (timespec, items): New nonterminals.
16520         (time, rel, relunit, number, get_date):
16521         Add support for fractional seconds.
16522         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
16523         (gmtime, localtime, mktime): Remove decls; not needed with C89.
16524         (to_hour): First arg is now long int, not int.
16525         (to_year): Returns long int, not int.
16526         Don't treat year -70 like 70.
16527         (tm_diff): Returns long int, not int.
16528         (lookup_word): Use bool instead of int when appropriate.
16529         (yylex): Use size_t for count, not int.
16530         Detect overflow when parsing large integer constants.
16531         Add support for fractions.
16532         (get_date): Make pointers 'const' if possible.
16533         Use more-portable code to detect integer overflow.
16534         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16535         Don't use ctime; it's not reliable if the year has >4 digits.
16536
16537         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16538         This is for compatibility with BSD.
16539
16540         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16541         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16542         From coreutils' system.h.
16543
16544         * lib/userspec.c: Don't include "posixver.h".
16545         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16546         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16547         compatible extension.  Simplify code by removing a boolean int
16548         that was always nonzero if a string was nonnull.
16549
16550 2004-03-30  Jim Meyering  <jim@meyering.net>
16551
16552         Merge from coreutils.
16553
16554         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16555         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16556         on some systems one must include <grp.h> before it.
16557         Reported by Christian Krackowizer.
16558
16559 2004-03-30  Jim Meyering  <jim@meyering.net>
16560
16561         Merge from coreutils.
16562
16563         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16564
16565         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16566         an empty input stream.
16567
16568         * lib/readtokens.c: Include <stdbool.h>.
16569         (readtoken): Use `size_t' rather than int/long.
16570         All callers adjusted.
16571         Use `bool' rather than `int' where appropriate.
16572         Use memset rather than an explicit loop.
16573         Use x2nrealloc rather than xrealloc.
16574         Allow the use of `\0' as a delimiter.
16575         (readtokens): Likewise.
16576         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16577
16578 2004-03-30  Jim Meyering  <jim@meyering.net>
16579
16580         * m4/realloc.m4: Remove file, since now it does no more than
16581         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16582         the `configure.ac' section of module/realloc.
16583         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16584
16585 2004-03-30  Bruno Haible  <bruno@clisp.org>
16586
16587         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16588         nonnull.
16589
16590 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16591
16592         Merge changes to getloadavg.c from coreutils and Emacs.
16593
16594         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16595         Define to an expression, not to the empty string.
16596         Include cloexec.h and xalloc.h.
16597         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16598         Use set_cloexec_flag rather than rolling our own.
16599         * lib/cloexec.c, lib/cloexec.h: New files.
16600
16601 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16602
16603         * m4/cloexec.m4: New file.
16604
16605 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16606
16607         * lib/getopt.h: Sync with libc CVS.
16608
16609 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16610             Bruno Haible  <bruno@clisp.org>
16611
16612         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16613         mbswidth.
16614
16615 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16616             Bruno Haible  <bruno@clisp.org>
16617
16618         * lib/mbswidth.h: Include <wchar.h> only if
16619         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16620         <wchar.h>.
16621         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16622
16623 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16624
16625         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16626         Sync with libc CVS.
16627         * lib/getopt_int.h: New file, also synced from libc.
16628
16629 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16630
16631         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16632         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16633         Bring back getopt.c, getopt.h, getopt1.c.
16634
16635 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16636
16637         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16638         All uses changed.  Check for sa_sigaction member; this fixes
16639         a bug first reported by Jason Andrade in
16640         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16641
16642 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16643
16644         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16645         '#if' expressions.  Unlike the code it replaces, it does not
16646         depend on (defined _SC_PAGESIZE).  However, it does depend on
16647         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16648         first reported by Jason Andrade in
16649         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16650
16651 2004-02-25  Simon Josefsson  <jas@extundo.com>
16652
16653         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16654
16655 2004-02-25  Simon Josefsson  <jas@extundo.com>
16656
16657         * lib/strdup.h: New file.
16658         * lib/strdup.c: Include it.
16659         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16660         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16661
16662 2004-02-23  Karl Berry  <karl@gnu.org>
16663
16664         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16665         (from fencepost.gnu.org:/gd/gnuorg).
16666
16667 2004-02-23  Karl Berry  <karl@gnu.org>
16668
16669         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16670         * config/srclist.txt: add maintain/standards documents.
16671
16672 2004-02-18  Bruno Haible  <bruno@clisp.org>
16673
16674         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16675         Reported by Derek Robert Price <derek@ximbiot.com>.
16676
16677 2004-02-16  Karl Berry  <karl@gnu.org>
16678
16679         * config/mkinstalldirs, install-sh: update from automake.
16680
16681 2004-02-06  Karl Berry  <karl@gnu.org>
16682
16683         * m4/po.m4: update from gettext 0.14.1.
16684
16685 2004-02-06  Karl Berry  <karl@gnu.org>
16686
16687         * lib/config.charset: update from gettext 0.14.1.
16688
16689 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16690
16691         Add comments and code, prompted by suggestions from Bruno Haible
16692         for sh-quote.
16693         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16694         describing the enum quoting_style values.
16695         * lib/quotearg.c (quotearg_alloc): New function.
16696         (quotearg_buffer_restyled): Treat lone { and } as special.
16697         Treat = as special.  Work around bug with older shells
16698         that "see" a '\' that is really the 2nd byte of a multibyte char.
16699         Quote empty string with shell_quoting_style.
16700
16701 2004-02-03  Bruno Haible  <bruno@clisp.org>
16702
16703         * m4/pipe.m4: New file, from GNU gettext.
16704
16705 2004-02-03  Bruno Haible  <bruno@clisp.org>
16706
16707         * lib/pipe.h: New file, from GNU gettext.
16708         * lib/pipe.c: New file, from GNU gettext.
16709
16710 2004-01-27  Bruno Haible  <bruno@clisp.org>
16711
16712         * m4/execute.m4: New file, from GNU gettext.
16713
16714 2004-01-27  Bruno Haible  <bruno@clisp.org>
16715
16716         * lib/execute.h: New file, from GNU gettext.
16717         * lib/execute.c: New file, from GNU gettext.
16718         * lib/w32spawn.h: New file, from GNU gettext.
16719
16720 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16721
16722         Merge from diffutils.
16723
16724         * lib/file-type.c (file_type): Add typed memory objects.
16725         * lib/file-type.h (S_TYPEISTMO): New macro.
16726
16727         * lib/c-stack.h (c_stack_action): Remove argv argument.
16728         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16729         (die): Don't calculate message unless segv_action returns.
16730         (get_stack_location, min_address_from_argv, max_address_from_argv,
16731         volatile stack_base, volatile_stack_size): Remove.
16732         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16733         that every segmentation violation is a stack overflow.  (Ouch!)
16734         See Debian bug 136249 (still outstanding) for more info about why
16735         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16736
16737 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16738
16739         Exit-status fix from coreutils.
16740
16741         Use exit_failure consistently in place of EXIT_FAILURE,
16742         so that program exit statuses are consistent on failure.
16743
16744         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16745         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16746         * lib/argmatch.h: Comment fix to match the above.
16747         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16748         Now a macro referring to exit_failure, instead of a separate
16749         variable.  Include "exitfail.h" to get it.
16750         * lib/xstrtol.h: Include "exitfail.h".
16751         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16752
16753         * lib/long-options.c (parse_long_options): Use prototype
16754         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16755         for clarity.
16756
16757 2004-01-21  Jim Meyering  <jim@meyering.net>
16758
16759         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16760         so as not to conflict with a different-sized __mktime_internal
16761         function in GNU libc.
16762         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16763         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16764
16765 2004-01-20  Karl Berry  <karl@gnu.org>
16766
16767         * config/config.guess: update from config.
16768
16769         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16770
16771 2004-01-20  Bruno Haible  <bruno@clisp.org>
16772
16773         Safer stack allocation.
16774         * lib/setenv.c: Include allocsa.h.
16775         (alloca): Remove fallback definition.
16776         (freea): Remove macro.
16777         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16778         instead of freea.
16779
16780 2004-01-20  Bruno Haible  <bruno@clisp.org>
16781
16782         * m4/eealloc.m4: New file, from GNU gettext.
16783
16784 2004-01-20  Bruno Haible  <bruno@clisp.org>
16785
16786         * m4/allocsa.m4: New file, from GNU gettext.
16787
16788 2004-01-20  Bruno Haible  <bruno@clisp.org>
16789
16790         * lib/xallocsa.h: New file, from GNU gettext.
16791         * lib/xallocsa.c: New file, from GNU gettext.
16792
16793 2004-01-20  Bruno Haible  <bruno@clisp.org>
16794
16795         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
16796
16797 2004-01-20  Bruno Haible  <bruno@clisp.org>
16798
16799         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
16800         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
16801         specially.
16802
16803 2004-01-20  Bruno Haible  <bruno@clisp.org>
16804
16805         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
16806         patch.
16807
16808 2004-01-20  Bruno Haible  <bruno@clisp.org>
16809
16810         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
16811
16812 2004-01-20  Bruno Haible  <bruno@clisp.org>
16813
16814         * lib/eealloc.h: New file.
16815
16816 2004-01-20  Bruno Haible  <bruno@clisp.org>
16817
16818         * lib/binary-io.h: Avoid warnings on Cygwin.
16819
16820 2004-01-20  Bruno Haible  <bruno@clisp.org>
16821
16822         * lib/allocsa.h: New file, from GNU gettext.
16823         * lib/allocsa.c: New file, from GNU gettext.
16824
16825 2004-01-18  Karl Berry  <karl@gnu.org>
16826
16827         * doc/gpl.texi, doc/lgpl.texi: new files.
16828
16829 2004-01-18  Karl Berry  <karl@gnu.org>
16830
16831         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
16832         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
16833
16834 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16835
16836         Merge from coreutils.
16837
16838         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
16839         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
16840         (gl_DEFAULT_POSIX2_VERSION): Move
16841         the documentation from 'configure' into 'config.hin',
16842         so that 'configure --help' isn't burdened by it and
16843         we don't have to worry about its formatting there.
16844         Reword the documentation so that it's more succinct
16845         and can be run together into a single paragraph.
16846         * m4/same.m4 (gl_SAME): Check for pathconf.
16847
16848 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16849
16850         Merge from coreutils.
16851
16852         * lib/posixver.c: Include posixver.h.
16853
16854         * lib/same.c: Include <stdbool.h>, <limits.h>.
16855         (_POSIX_NAME_MAX): Define if not defined.
16856         (MIN): New macro.
16857         (same_name): If file names are silently truncated, report
16858         that the file names are the same if they are the same after
16859         the silent truncation.
16860
16861         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
16862         conversion function.
16863         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
16864         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
16865         longer needed.
16866
16867 2004-01-15  Jim Meyering  <jim@meyering.net>
16868
16869         Merge from coreutils.
16870
16871         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
16872         if no library is required.
16873         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
16874         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
16875         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
16876         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
16877         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
16878         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
16879         value, $ac_cv_search_crypt, if it's "none required".
16880         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
16881         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
16882         not gl_FUNC_GETLOADAVG.
16883         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
16884         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
16885
16886 2004-01-15  Jim Meyering  <jim@meyering.net>
16887
16888         Merge from coreutils.
16889
16890         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
16891         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
16892         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
16893
16894         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
16895         optional configure-time default.
16896
16897         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16898
16899         * lib/xreadlink.c (xreadlink): Correct outdated comment.
16900
16901 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
16902
16903         Merge from coreutils.
16904
16905         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
16906         value, $ac_cv_search_nanosleep, if it's "none required".
16907
16908 2004-01-14  Paul Eggert  <eggert@twinsun.com>
16909
16910         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
16911         with like-named macro in fnmatch.c.
16912         (EXT): Use an internal constant instead.
16913
16914         Merge fnmatch patches from glibc.
16915         * lib/fnmatch.c (mbsinit): Remove define.
16916         Add libc_hidden_ver (__fnmatch, fnmatch).
16917         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
16918         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
16919
16920 2004-01-14  Karl Berry  <karl@gnu.org>
16921
16922         * config/install-sh: update from automake.
16923
16924 2004-01-13  Karl Berry  <karl@gnu.org>
16925
16926         * config/install-sh: update from automake.
16927
16928 2004-01-09  Karl Berry  <karl@gnu.org>
16929
16930         * config/install-sh: update from automake.
16931
16932 2004-01-05  Karl Berry  <karl@gnu.org>
16933
16934         * config/config.{sub,guess}: update from config.
16935
16936 2003-12-31  Karl Berry  <karl@gnu.org>
16937
16938         * config/depcomp: update from automake.
16939
16940 2003-12-14  Karl Berry  <karl@gnu.org>
16941
16942         * lib/config.charset: update from gettext-runtime.
16943
16944 2003-12-03  Paul Eggert  <eggert@twinsun.com>
16945
16946         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
16947         Bug reported by Alfred M. Szmidt.
16948
16949 2003-12-03  Bruno Haible  <bruno@clisp.org>
16950
16951         * m4/gettext.m4: Upgrade from gettext-0.13.
16952         * m4/po.m4: Upgrade from gettext-0.13.
16953         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
16954         * m4/intmax.m4: New file, from gettext-0.13.
16955         * m4/printf-posix.m4: New file, from gettext-0.13.
16956
16957 2003-11-29  Karl Berry  <karl@gnu.org>
16958
16959         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
16960
16961 2003-11-25  Paul Eggert  <eggert@twinsun.com>
16962             Bruno Haible  <bruno@clisp.org>
16963
16964         * lib/printf-parse.h: Don't include sys/types.h.
16965         (ARG_NONE): New macro.
16966         (char_directive): Change type of *arg_index fields to size_t.
16967         * lib/printf-parse.c: Don't include sys/types.h.
16968         (SSIZE_MAX): Remove macro.
16969         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
16970         Remove unnecessary overflow check.
16971         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
16972         fields.
16973
16974 2003-11-25  Bruno Haible  <bruno@clisp.org>
16975
16976         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
16977
16978 2003-11-25  Bruno Haible  <bruno@clisp.org>
16979
16980         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
16981         gt_TYPE_SSIZE_T.
16982
16983 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16984
16985         * modules/alloca: Remove dependency on xalloc.
16986
16987 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16988
16989         * lib/alloca.c: Remove dependency on xalloc module.
16990         (xalloc_die): Remove.
16991         (memory_full) [!defined emacs]: New macro.
16992         [!defined emacs]: Don't include xalloc.h.
16993         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
16994         address arithmetic overflows.  Change datatypes a bit to avoid
16995         unnecessary casts.
16996
16997 2003-11-22  Jim Meyering  <jim@meyering.net>
16998
16999         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
17000         s/size/size_t/.
17001
17002 2003-11-21  Karl Berry  <karl@gnu.org>
17003
17004         * config/config.{sub,guess}: update from config.
17005
17006 2003-11-18  Karl Berry  <karl@gnu.org>
17007
17008         * config/config.{sub,guess}: update from config.
17009
17010         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
17011
17012 2003-11-17  Paul Eggert  <eggert@twinsun.com>
17013
17014         * README: Mention that S+T cannot overflow if S is the size of
17015         an existing object and T is sufficiently small.
17016
17017 2003-11-17  Jim Meyering  <jim@meyering.net>
17018
17019         On systems without utime and without a utimes function capable of
17020         dealing with a NULL struct utimbuf* argument, this utime replacement
17021         could -- in unusual circumstances -- leak a file descriptor.
17022         * lib/utime.c: Include <unistd.h> and <errno.h>.
17023         (utime_null): Be sure to close `fd' and to preserve errno.
17024         Reported by Geoff Collyer via Arnold Robbins.
17025
17026 2003-11-17  Bruno Haible  <bruno@clisp.org>
17027
17028         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
17029         (Depends-on): Add xsize.
17030
17031 2003-11-17  Bruno Haible  <bruno@clisp.org>
17032
17033         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
17034
17035 2003-11-17  Bruno Haible  <bruno@clisp.org>
17036
17037         * lib/vasnprintf.c (alloca): Remove fallback definition.
17038         (freea): Remove definition.
17039         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
17040         Reported by Paul Eggert.
17041
17042 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17043             Bruno Haible  <bruno@clisp.org>
17044
17045         Protect against address arithmetic overflow.
17046         * lib/printf-args.h: Include stddef.h.
17047         (arguments): Change type of field 'count' to size_t.
17048         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17049         'unsigned int' where appropriate.
17050         * lib/printf-parse.h: Include sys/types.h.
17051         (char_directive): Change type of *arg_index fields to ssize_t.
17052         (char_directives): Change type of fields 'count', max_*_length to
17053         size_t.
17054         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17055         (SSIZE_MAX): Define fallback value.
17056         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17057         instead of 'int' where appropriate. Check a_allocated, d_allocated
17058         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17059         * lib/vasnprintf.c: Include xsize.h.
17060         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17061         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17062         overflow. Avoid wraparound when converting a width or precision from
17063         decimal to binary.
17064
17065 2003-11-16  Bruno Haible  <bruno@clisp.org>
17066
17067         Update from GNU gettext.
17068         * lib/printf-parse.c: Generalize to it can be compiled for wide
17069         strings.
17070         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17071         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17072         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17073         SNPRINTF): New macros.
17074         Don't include <alloca.h> if the file is used inside libintl.
17075         (local_wcslen): New function, for Solaris 2.5.1.
17076         (VASNPRINTF): Use it instead of wcslen.
17077
17078 2003-11-16  Bruno Haible  <bruno@clisp.org>
17079
17080         * lib/xsize.h (xmax): New function.
17081         (xsum, xsum3, xsum4): Declare as "pure" functions.
17082
17083 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17084
17085         * modules/xalloc (Files): Undo latest change, since xalloc.h
17086         no longer needs SIZE_MAX or PTRDIFF_MAX.
17087
17088 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17089
17090         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
17091         gl_PTRDIFF_MAX.
17092
17093 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17094
17095         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
17096         "return", to pacify some unknown compiler.  Problem reported
17097         by Joerg Schilling.
17098
17099 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17100
17101         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
17102         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
17103         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
17104         heuristic is just as accurate as far as we know, and it removes a
17105         dependency on size_max.m4 and ptrdiff_max.m4.
17106
17107 2003-11-11  Bruno Haible  <bruno@clisp.org>
17108
17109         * modules/xsize (Files): Add m4/size_max.m4.
17110         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
17111
17112 2003-11-11  Bruno Haible  <bruno@clisp.org>
17113
17114         * m4/size_max.m4: New file.
17115         * m4/ptrdiff_max.m4: New file.
17116         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
17117         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
17118         (gl_XALLOC): Invoke it.
17119
17120 2003-11-11  Bruno Haible  <bruno@clisp.org>
17121
17122         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
17123         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
17124         defined.
17125
17126 2003-11-10  Paul Eggert  <eggert@twinsun.com>
17127
17128         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
17129         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
17130         rejected some allocations of exactly SIZE_MAX - 2 bytes.
17131         From Bruno Haible.
17132         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
17133         not (size_t) -1, since it's defined here.
17134
17135 2003-11-09  Karl Berry  <karl@gnu.org>
17136
17137         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
17138
17139 2003-11-06  Paul Eggert  <eggert@twinsun.com>
17140
17141         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
17142         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
17143         Reject sizes of exactly SIZE_MAX bytes.
17144         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
17145         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
17146
17147 2003-11-05  Bruno Haible  <bruno@clisp.org>
17148
17149         * lib/xsize.h: Include limits.h, to avoid a possible collision with
17150         SIZE_MAX defined in <limits.h> on Solaris.
17151
17152 2003-11-04  Jim Meyering  <jim@meyering.net>
17153
17154         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
17155         variable names, rather than @VAR@.
17156         * modules/poll: Likewise.
17157
17158 2003-11-04  Bruno Haible  <bruno@clisp.org>
17159
17160         * modules/xsize: New file.
17161         * modules/linebreak: Depend on xsize.
17162         * MODULES.html.sh (func_all_modules): Add xsize.
17163
17164 2003-11-04  Bruno Haible  <bruno@clisp.org>
17165
17166         * m4/xsize.m4: New file.
17167
17168 2003-11-04  Bruno Haible  <bruno@clisp.org>
17169
17170         * lib/xsize.h: New file.
17171         * lib/linebreak.c: Include xsize.h.
17172         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
17173         argument for overflow.
17174         Suggested by Paul Eggert.
17175
17176 2003-11-03  Karl Berry  <karl@gnu.org>
17177
17178         * config/config.{guess,sub}: update from config.
17179
17180 2003-11-03  Jim Meyering  <jim@meyering.net>
17181
17182         * modules/userspec (lib_SOURCES): Add userspec.h.
17183         (Include): Add "userspec.h".
17184         Improve description.
17185
17186 2003-11-03  Jim Meyering  <jim@meyering.net>
17187
17188         * lib/userspec.c: Include "userspec.h".
17189         * lib/userspec.h: New file.
17190
17191 2003-11-03  Bruno Haible  <bruno@clisp.org>
17192
17193         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
17194
17195 2003-11-03  Bruno Haible  <bruno@clisp.org>
17196
17197         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
17198         available, to avoid (extremely rare) race condition.
17199         Suggested by Paul Eggert.
17200
17201 2003-11-02  Karl Berry  <karl@gnu.org>
17202
17203         * config/srclist.txt (vasprintf.c): sync broken, sigh.
17204
17205 2003-10-31  Paul Eggert  <eggert@twinsun.com>
17206
17207         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
17208         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
17209         (read_filesystem_list): Set and use me_type_malloced.
17210         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
17211         whatever the type happens to be), for brevity and consistency.
17212         Check for size calculation overflow on Alphas running OSF/1.
17213
17214 2003-10-31  Jim Meyering  <jim@meyering.net>
17215
17216         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
17217
17218         * lib/linebuffer.c: Include <string.h> for declaration of memset.
17219
17220 2003-10-30  Paul Eggert  <eggert@twinsun.com>
17221             Bruno Haible  <bruno@clisp.org>
17222
17223         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
17224         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
17225
17226 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17227
17228         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
17229         netbsd*-gnu*.  Suggested by Robert Millan.
17230
17231 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17232
17233         * modules/group-member: Depend on stdbool.
17234
17235 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17236
17237         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
17238
17239 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17240
17241         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
17242         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
17243         after the 'gnu' in these cases.  This fixes some bugs in the
17244         previous change, and is based on suggestions by Robert Millan.
17245
17246 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17247
17248         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
17249         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
17250         no longer needed.
17251         * lib/quotearg.c (quotearg_n_options): Use it.
17252         * lib/group-member.c: Include <stdbool.h>.
17253         (free_group_info): Arg is now const *; don't free arg.
17254         (get_group_info): Now returns bool and accepts struct group_info *,
17255         rather than returning a malloc'ed struct group_info *.
17256         All uses changed.  Check for overflow in internal size calculation.
17257
17258         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
17259         rather than xmalloc/xrealloc.
17260         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
17261         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
17262         conformance bug: the old code used a pointer after freeing the
17263         storage that it addressed.
17264         * lib/hash.c (hash_initialize): Simplify the code by using
17265         xalloc_oversized rather than doing it by hand.
17266         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
17267         the buffer preserved.  Use free and xmalloc instead.
17268         * lib/quotearg.c (quotearg_n_options): Likewise.
17269         Use a simpler test for size overflow.  Don't use xalloc_oversized
17270         because unsigned int might be wider than size_t (!); this suggests
17271         that we should switch from unsigned int to size_t for slot numbers.
17272
17273 2003-10-28  Paul Eggert  <eggert@twinsun.com>
17274
17275         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
17276         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
17277         NetBSD kernels.  Requested by Richard Stallman.
17278
17279 2003-10-27  Paul Eggert  <eggert@twinsun.com>
17280
17281         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
17282         to allocate the returned structure.  Do not allocate a subarray,
17283         as x2nrealloc will do that.
17284         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
17285         instead of xnrealloc.
17286         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
17287
17288 2003-10-27  Bruno Haible  <bruno@clisp.org>
17289
17290         * lib/stdbool_.h: Better support for BeOS.
17291
17292 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17293
17294         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
17295         now uses inline.
17296
17297 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17298
17299         * lib/xalloc.h (xalloc_oversized): New static inline function, for
17300         callers that want to do their own size-overflow checking.  Include
17301         <stdbool.h>, since xalloc_oversized returns bool.
17302         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
17303         to use xalloc_oversized.
17304
17305         Add two functions x2realloc, x2nrealloc, for programs that grow
17306         arrays dynamically by doubling their sizes.
17307         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
17308         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
17309         New functions.
17310
17311         Port to C99 semantics for 'inline' of external functions.
17312         Bug reported by Bruno Haible.
17313         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
17314         with the old contents of xnmalloc.
17315         (xnmalloc, xmalloc): Use it.
17316         (xnrealloc_inline): New static inline function,
17317         with the old contents of xnrealloc.
17318         (xnrealloc, xrealloc): Use it.
17319
17320         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17321         that.
17322
17323 2003-10-26  Karl Berry  <karl@gnu.org>
17324
17325         * config/srclist.txt (COPYING.DOC): no longer available from
17326         /gd/gnuorg; don't know where the ultimate source is.
17327
17328 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17329
17330         Fix several address-calculation bugs in the hash modules,
17331         plus some minor code cleanup.
17332
17333         * lib/hash.h: Include <stdbool.h>, for bool.
17334         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17335         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17336         hash_get_n_entries, hash_get_max_bucket_length,
17337         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17338         hash_rehash): Use size_t rather than unsigned.
17339         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17340         hash_get_n_buckets_used, hash_get_n_entries,
17341         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17342         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17343         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17344         Likewise.
17345         (SIZE_MAX): Define if not defined.
17346         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17347         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17348         hash_print):
17349         Use const * when possible.
17350         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17351         (check_tuning): Fix bug: if tuning parameters were very close to
17352         0 or 1, rounding errors could have caused subscript violations.
17353         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17354         (hash_initialize): Add 'fail:' label
17355         to free table and return NULL, and use it to simplify code.
17356         Use calloc rather than clearing the storage ourself.
17357         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17358         buffer size calculations.
17359         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17360         Include <stddef.h>, for size_t.
17361         * lib/hash-pjw.c (hash_pjw): Likewise.
17362         Switch to method described by Bruno Haible.
17363         Include <limits.h>, for CHAR_BIT.
17364         (SIZE_BITS): New macro.
17365
17366 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17367
17368         * m4/getline.m4 (AM_FUNC_GETLINE):
17369         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17370         hosts.  Problem reported by Derek Robert Price in
17371         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17372         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17373         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17374
17375 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17376
17377         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17378         ceiling the allocation at NMAX bytes rather than silently
17379         discarding input bytes before NMAX is reached.  This makes
17380         a difference only if NMAX exceeds SIZE_MAX / 2.
17381
17382         * lib/obstack.c: Merge from glibc.
17383         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17384         Add libc_hidden_def (_obstack_newchunk).
17385         (_obstack_free) [! defined _LIBC]: Remove.
17386         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17387         a clone of the function body.
17388         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17389         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17390
17391         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17392         glibc.
17393         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17394         arg to memcpy.
17395
17396         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17397         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17398         Don't use lvalue casts, as GCC plans to remove support for them
17399         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17400         was also present in the non-GCC version, indicating that this
17401         code had always been buggy and had never been widely used.
17402         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17403         Use the fast variant of each macro, rather than copying the
17404         definiens of the fast variant; that way, we'll be more likely to
17405         catch future bugs in the fast variants.
17406
17407 2003-10-20  Bruno Haible  <bruno@clisp.org>
17408
17409         * modules/wait-process: New file.
17410         * MODULES.html.sh (func_all_modules): Add wait-process.
17411
17412 2003-10-20  Bruno Haible  <bruno@clisp.org>
17413
17414         * m4/wait-process.m4: New file.
17415
17416 2003-10-20  Bruno Haible  <bruno@clisp.org>
17417
17418         * lib/wait-process.h: New file, from GNU gettext.
17419         * lib/wait-process.c: New file, from GNU gettext.
17420
17421 2003-10-19  Jim Meyering  <jim@meyering.net>
17422
17423         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17424         HPUX 10.20.
17425
17426 2003-10-18  Karl Berry  <karl@gnu.org>
17427
17428         * config/config.guess: update from config.
17429
17430 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17431
17432         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17433         (getgroups): First arg is int, not size_t.
17434         Don't let 'free' mangle errno.
17435
17436 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17437
17438         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17439
17440 2003-10-16  Karl Berry  <karl@gnu.org>
17441
17442         * config/config.{guess,sub}: update from config.
17443
17444 2003-10-16  Jim Meyering  <jim@meyering.net>
17445
17446         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17447         memcpy.
17448
17449 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17450
17451         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17452         (SIZE_MAX): Remove.
17453         (new_exclude, add_exclude_file): Initial size no longer needs to
17454         be a power of 2.
17455         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
17456         our own address arithmetic overflow checking.
17457
17458         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
17459         (fnmatch): Do not alloca more than 2000 wide characters;
17460         instead, use malloc for large buffers.
17461         Check for address arithmetic overflow, and return -1
17462         with errno set to ENOMEM in that case.
17463         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17464         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17465         instead, return -1.  Check for address arithmetic overflow.
17466
17467 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17468
17469         Handle invalid suffixes and overflow independently, so that
17470         callers can treat them independently as needed.  Fix some bugs in
17471         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17472         suffix for a human-readable blocksize.  The major caller-visible
17473         change is the addition of a new
17474         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17475         that both overflow and suffix chars were found.
17476
17477         * lib/human.c (humblock): Don't check separately for invalid suffix
17478         char; that is xstrtoumax's job (now that its bug is fixed).
17479         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
17480         INTMAX_MAX]: New macros.
17481         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
17482         TYPE_MAXIMUM): New macros.
17483         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
17484         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
17485         if overflow occurs, as it's what __strtol does and it's more useful
17486         in practice.
17487         (__xstrtol): If __strtol reports some error other than ERANGE,
17488         reflect it to the caller as LONGINT_INVALID.  If it reports
17489         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
17490         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
17491         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
17492         value.
17493         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
17494         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
17495         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
17496         [defined UINTMAX_MAX]: New macros.
17497
17498 2003-10-14  Bruno Haible  <bruno@clisp.org>
17499
17500         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
17501
17502 2003-10-14  Bruno Haible  <bruno@clisp.org>
17503
17504         * m4/sig_atomic_t: New file, from GNU gettext.
17505         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
17506
17507 2003-10-14  Bruno Haible  <bruno@clisp.org>
17508
17509         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
17510         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
17511         Also use volatile where needed.
17512
17513 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17514
17515         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
17516         Change maintainer from Bruno Haible to 'all'.
17517
17518 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17519
17520         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
17521
17522 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17523
17524         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
17525         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
17526         and define in terms of the other primitives.
17527         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17528         (SIZE_MAX): Define if not already defined.
17529         (array_size_overflow): New function.
17530         (xalloc_die): Abort instead of exiting if 'error' returns.
17531         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17532         (xmalloc, xrealloc): Use them.
17533         (xcalloc): Check for address arithmetic overflow.
17534         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17535         a bit faster than strcpy.
17536
17537 2003-10-10  Simon Josefsson  <jas@extundo.com>
17538
17539         * modules/argp (Depends-on): Add restrict and strcase.
17540
17541 2003-10-10  Simon Josefsson  <jas@extundo.com>
17542
17543         * m4/argp.m4: Add AC_C_INLINE.
17544
17545 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17546
17547         Merge getpass from libc, plus a few fixes.
17548
17549         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17550         Include <stdbool.h>.
17551         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17552         __fsetlocking to empty.
17553         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17554         do include <bits/libc-lock.h>.
17555         Do not include <fcntl.h>; not needed.
17556         [_LIBC]: Include <wchar.h>.
17557         (NOTCANCEL_MODE): New macro.
17558         (flockfile, funlockfile) [_LIBC]: New macros.
17559         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17560         [!_LIBC]: New macros.
17561         (call_fclose): New function.
17562         (getpass): Use it.  Save tty stream separately; this simplifies the
17563         code and makes it more reliable if stdin happens to equal stdout.
17564         Invoke __fsetlocking on tty.
17565         Handle thread cancellation if needed.
17566         Namespace cleanup (use __tcgetattr, __getline).
17567         Use bool for Booleans.
17568         [USE_IN_LIBIO]: Handle wide streams.
17569         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17570         stream might go where.
17571
17572         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17573         doesn't have to include <stdio.h> before us.
17574         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17575         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17576         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17577         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17578         if not declared, so that we can use getpass.c code from libc without
17579         rewriting it.
17580         (flockfile, ftrylockfile, funlockfile): New macros.
17581
17582 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17583
17584         * modules/getpass: Depend on stdbool.
17585
17586 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17587
17588         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17589
17590 2003-10-07  Karl Berry  <karl@gnu.org>
17591
17592         * config/config.{guess,sub}: update from config.
17593
17594 2003-10-06  Jim Meyering  <jim@meyering.net>
17595             Bruno Haible  <bruno@clisp.org>
17596
17597         This lets translators provide better translations for the
17598         "Written by ..." part of --version output.
17599         * lib/version-etc.h: Include stdarg.h.
17600         (version_etc_copyright): Declare as readonly.
17601         (version_etc): Make this function variadic with a NULL-terminated list
17602         of author name strings.
17603         (version_etc_va): New declaration.
17604         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17605         (version_etc_copyright): Declare as readonly.
17606         (version_etc_va): New function. Provide a different translatable string
17607         for each possible number of authors < 10. Abbreviate when there are 10
17608         authors or more.
17609         (version_etc): Make this function variadic. Call version_etc_va.
17610         Suggestion from Gary V. Vaughan.
17611
17612         * lib/long-options.h (parse_long_options): Change prototype: the
17613         authors string is moved to the end and becomes variadic.
17614         * lib/long-options.c: Include stdarg.h.
17615         (parse_long_options): Make this function variadic, too.
17616         Call version_etc_va, not version_etc.
17617
17618 2003-10-06  Bruno Haible  <bruno@clisp.org>
17619
17620         * modules/version-etc-2: Remove file.
17621         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17622
17623 2003-10-06  Bruno Haible  <bruno@clisp.org>
17624
17625         * modules/fatal-signal: New file.
17626         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17627
17628 2003-10-06  Bruno Haible  <bruno@clisp.org>
17629
17630         * m4/fatal-signal.m4: New file.
17631         * m4/signalblocking.m4: New file, from GNU gettext.
17632
17633 2003-10-06  Bruno Haible  <bruno@clisp.org>
17634
17635         * lib/version-etc-2.h: Remove file.
17636         * lib/version-etc-2.c: Remove file.
17637
17638 2003-10-06  Bruno Haible  <bruno@clisp.org>
17639
17640         * lib/fatal-signal.h: New file, from GNU gettext.
17641         * lib/fatal-signal.c: New file, from GNU gettext.
17642
17643 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17644
17645         * README: Rework advice for preventing empty .o files.
17646         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17647         not <sys/types.h>.
17648
17649 2003-10-04  Karl Berry  <karl@gnu.org>
17650
17651         * lib/argp*: update from libc.
17652
17653 2003-10-04  Karl Berry  <karl@gnu.org>
17654
17655         * config/config.{guess,sub}: update from config.
17656
17657 2003-10-02  Bruno Haible  <bruno@clisp.org>
17658
17659         * modules/lchown (Include): Add lchown.h.
17660         * modules/time_r (Include): Use "..." syntax.
17661         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17662
17663 2003-10-01  Simon Josefsson  <jas@extundo.com>
17664
17665         * MODULES.html.sh (func_all_modules): Move gethostname from section
17666         'based on' to section 'lacking' POSIX:2001.
17667
17668 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17669
17670         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17671         to output mode on the same stream.
17672
17673 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17674
17675         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17676         Fix arg typo in previous patch.
17677
17678 2003-09-28  Jim Meyering  <jim@meyering.net>
17679
17680         * lib/error.c: Correct cpp indentation.
17681
17682 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17683
17684         * modules/free: New file.
17685
17686 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17687
17688         * m4/free.m4: New file.
17689
17690 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17691
17692         * lib/minmax.h (MIN, MAX)
17693         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17694         Omit the special code that used __typeof__, since we worry that
17695         it could be more trouble than it's worth.  See:
17696         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17697         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17698
17699         * lib/free.c: New file.
17700
17701 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17702
17703         Trivial fixes to Makefile.am parts of module listings.
17704         * modules/strstr: Append strstr.h to lib_SOURCES.
17705         * modules/strcase: Likewise, for strcase.h.
17706
17707 2003-09-27  Karl Berry  <karl@gnu.org>
17708
17709         * config/mkinstalldirs: update from automake.
17710
17711 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17712
17713         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17714         (error_tail): Do not loop, reallocating temporary buffer, since
17715         the output cannot contain more wide characters than the input
17716         contains bytes, the size must be big enough already.  This avoids
17717         one potential size overflow calculation.  Check for size overflow
17718         when calculating temporary buffer size.  Free temporary buffer
17719         when done, if it was allocated with malloc; this plugs a memory
17720         leak.  Remove casts from void * to pointers, that are no longer
17721         needed now that we're assuming C89 or better.
17722
17723         Merge error changes from glibc.
17724
17725         * lib/error.c, error.h: Update copyright notice header to match glibc.
17726         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17727         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17728         Disable cancellation while printing error.
17729         * lib/error.h: Prepend __ to parameter names.
17730
17731 2003-09-26  Jim Meyering  <jim@meyering.net>
17732
17733         * lib/error.c (error_tail): Move some declarations
17734         into inner scope where the local variables are used.
17735
17736 2003-09-26  Bruno Haible  <bruno@clisp.org>
17737
17738         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17739         stpncpy().
17740         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17741
17742 2003-09-26  Bruno Haible  <bruno@clisp.org>
17743
17744         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17745         (stpncpy): Define as alias for gnu_stpncpy.
17746         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17747
17748 2003-09-25  Simon Josefsson  <jas@extundo.com>
17749
17750         * lib/xgetdomainname.h: New file.
17751         * lib/xgetdomainname.c: New file.
17752
17753 2003-09-25  Simon Josefsson  <jas@extundo.com>
17754             Bruno Haible  <bruno@clisp.org>
17755
17756         * modules/getdomainname: New file.
17757         * modules/xgetdomainname: New file.
17758         * MODULES.html.sh (func_all_modules): Add getdomainname,
17759         xgetdomainname.
17760
17761 2003-09-25  Simon Josefsson  <jas@extundo.com>
17762             Bruno Haible  <bruno@clisp.org>
17763
17764         * m4/getdomainname.m4: New file.
17765
17766 2003-09-25  Simon Josefsson  <jas@extundo.com>
17767             Bruno Haible  <bruno@clisp.org>
17768
17769         * lib/getdomainname.h: New file.
17770         * lib/getdomainname.c: New file.
17771
17772 2003-09-25  Karl Berry  <karl@gnu.org>
17773
17774         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17775
17776 2003-09-25  Karl Berry  <karl@gnu.org>
17777
17778         * config/install-sh: update from automake.
17779
17780 2003-09-25  Bruno Haible  <bruno@clisp.org>
17781
17782         * modules/version-etc-2: New file, from modules/version-etc with
17783         modifications.
17784         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17785
17786 2003-09-25  Bruno Haible  <bruno@clisp.org>
17787
17788         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17789         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17790
17791 2003-09-24  Simon Josefsson  <jas@extundo.com>
17792
17793         * modules/xgethostname: Add xgethostname.h.
17794
17795 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17796
17797         * lib/linebuffer.c (freebuffer): Don't free the argument, just
17798         the buffer associated with the argument.  Bug reported by
17799         Simon Josefsson.
17800
17801 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17802
17803         * README: Document assumptions that 'int' is at least 32 bits
17804         wide, that integer arithmetic is 2's complement without overflow,
17805         that there are no holes in integer values, that adding sizes of
17806         two nonoverlapping objects can't overflow, and that all-bits-zero
17807         yields scalar zero.  Fix spelling and capitalization typos.
17808
17809 2003-09-19  Karl Berry  <karl@gnu.org>
17810
17811         * lib/argp.h: update from libc.
17812
17813 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17814
17815         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
17816         to avoid spurious warnings like "AC_RUN_IFELSE was called before
17817         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
17818
17819 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17820
17821         * gnulib-tool: Use "test -h", not "test -L", for portability
17822         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
17823         (tags_regexp): Remove, since \| doesn't conform to POSIX.
17824         (sed_extract_prog): Issue s commands one-by-one, rather than
17825         using \| in one s command.
17826
17827 2003-09-16  Paul Eggert  <eggert@twinsun.com>
17828
17829         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
17830         input error, instead of returning NULL the next time we are called
17831         (and therefore losing track of errno).
17832
17833 2003-09-16  Bruno Haible  <bruno@clisp.org>
17834
17835         * gnulib-tool (func_create_testdir): Warn about duplicated
17836         dependencies.
17837
17838 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17839
17840         * modules/argmatch, modules/fatal, modules/obstack,
17841         modules/xalloc, modules/xgethostname: Sort dependencies by
17842         importance, not alphabetically.
17843
17844 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17845
17846         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
17847         fails, so that the caller gets the proper errno.
17848
17849         * lib/readutmp.c (read_utmp): Likewise.
17850         Check for fstat error.  Close stream and free storage
17851         when failing.
17852
17853 2003-09-14  Karl Berry  <karl@gnu.org>
17854
17855         * config/srclist.txt (strdup.c): disable for c89 changes.
17856
17857 2003-09-14  Jim Meyering  <jim@meyering.net>
17858
17859         * lib/getloadavg.c: Correct cpp indentation.
17860         * lib/strdup.c: Likewise.
17861         * lib/vasnprintf.c: Likewise.
17862
17863 2003-09-14  Bruno Haible  <bruno@clisp.org>
17864
17865         * modules/fwriteerror: New file.
17866         * MODULES.html.sh (func_all_modules): Add fwriteerror.
17867
17868 2003-09-14  Bruno Haible  <bruno@clisp.org>
17869
17870         * lib/fwriteerror.h: New file.
17871         * lib/fwriteerror.c: New file.
17872
17873 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17874
17875         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
17876         modules/xgethostname, modules/xalloc: Depend on exit.
17877
17878 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17879
17880         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
17881
17882         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
17883         and AC_MINIX, too, so that their extensions are available.
17884
17885         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
17886         This macro has been superseded by gl_BACKUPFILE.
17887
17888         More patches to assume C89 or better.
17889
17890         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
17891
17892         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
17893         unconditionally.
17894         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
17895         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
17896         Include <string.h>, <stdlib.h> unconditionally.
17897         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
17898         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
17899         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
17900         headers or for string.h.
17901         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
17902         or strtoul.
17903
17904         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
17905         headers.
17906         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
17907         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17908         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
17909         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
17910         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17911         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
17912         memcpy, memset.
17913         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
17914         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
17915         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
17916         strtol.
17917         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
17918         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
17919         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
17920         strtoul.
17921
17922 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17923
17924         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
17925         * lib/obstack.c [!defined _LIBC]: Likewise.
17926         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
17927         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
17928         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
17929
17930         More changes to assume C89 or better.
17931
17932         * lib/error.c (error_tail): Assume vprintf.
17933
17934         * lib/argmatch.c (getenv): Remove decl.
17935         * lib/progreloc.c (get_full_program_name): Define via prototype.
17936         * lib/setenv.c (clearenv): Likewise.
17937         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
17938         needed.
17939         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
17940         (malloc, memcpy): Remove decls.
17941         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
17942         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
17943         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17944         (memcpy): Remove macro.
17945         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
17946         (__P): Remove.  All uses removed.
17947         (PTR): Remove.  All uses changed to void *.
17948         (CHAR_BIT, NULL): Remove.
17949         (spaces, zeros, memset_space, memset_zero)
17950         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
17951         Remove.
17952         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
17953         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
17954         Define with prototype.
17955         Remove now-unnecessary prototype decl.
17956         (extra_args_spec): Assume ANSI C.  All uses changed.
17957         (extra_args_spec_iso): Remove.
17958         (my_strftime, emacs_strftimeu): Define via prototype.
17959         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
17960         unconditionally.
17961         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
17962         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
17963         (strtoul, strtol): Remove decls.
17964         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
17965         LONG_MAX): Remove.
17966         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17967         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
17968         (LOCALE_PARAM_PROTO): New macro.
17969         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
17970         (INTERNAL (strtol), strtol): Define with a prototype.
17971         (PARAMS): Remove.  All uses removed.
17972         * lib/tempname.c: Include <string.h> unconditionally.
17973         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
17974         * lib/xgethostname.c (main): Define with a prototype.
17975         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
17976         Include <stdlib.h> unconditionally.
17977         (calloc, malloc, realloc, free): Remove decls.
17978         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
17979         Include <stdlib.h> unconditionally.  Sort include file names.
17980         (strtod): Remove.
17981         (xstrtod): Define with a prototype.
17982         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
17983         (strtol, strtoul): Remove decls.
17984
17985 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17986
17987         More patches to assume C89 or better.
17988         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
17989         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
17990         string.h, memchr, STDC_HEADERS.
17991
17992 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17993
17994         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
17995         Include <stdlib.h>, <string.h> unconditionally.
17996         Remove now-unnecessary cast to char *.
17997         * lib/strnlen.c: Include <string.h> unconditionally.
17998         * lib/yesno.c (yesno): Define with a prototype.
17999
18000 2003-09-11  Bruno Haible  <bruno@clisp.org>
18001
18002         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
18003
18004 2003-09-10  Jim Meyering  <jim@meyering.net>
18005
18006         * lib/error.c: Correct indentation of cpp directives.
18007
18008 2003-09-10  Bruno Haible  <bruno@clisp.org>
18009
18010         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
18011         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
18012         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
18013         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
18014         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
18015         <stdlib.h> and <string.h> checks.
18016         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
18017         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
18018
18019 2003-09-10  Bruno Haible  <bruno@clisp.org>
18020
18021         * lib/strcspn.c: Include <string.h> unconditionally.
18022         * lib/strpbrk.c: Include <string.h> unconditionally.
18023         * lib/strstr.c: Include <string.h> unconditionally.
18024         * lib/unicodeio.c: Include <string.h> unconditionally.
18025         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
18026         * lib/unsetenv.c: Likewise.
18027         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
18028         * lib/yesno.c: Include <stdlib.h> unconditionally.
18029         (rpmatch): Add prototype.
18030
18031 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18032
18033         More patches to assume C89 or better.
18034         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
18035         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
18036         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
18037         or for string.h.
18038         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
18039         stdlib.h.
18040         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18041         C headers.
18042         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18043         string.h.
18044         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18045         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18046         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18047         or for string.h.
18048         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18049         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18050         C headers.
18051         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18052         memcpy.
18053         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18054         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18055         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18056         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18057         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18058         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18059         string.h, free.
18060         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18061         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18062         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18063         C headers, or for string.h.
18064         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18065         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18066         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18067         headers, memory.h, stdlib.h, string.h, strings.h.
18068         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18069         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18070         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18071         strchr.
18072         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18073         headers, memory.h, string.h.
18074         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18075         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18076         free.
18077         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18078         headers.
18079         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18080         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
18081         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
18082         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
18083         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
18084
18085 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18086
18087         More K&R removal.
18088
18089         * lib/acosl.c (main): Use a prototype.
18090         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
18091         tanl.c: Likewise.
18092
18093         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
18094
18095         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
18096         (getopt, etopt_long, getopt_long_only, _getopt_internal)
18097         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
18098         with a prototype.
18099         * lib/getopt.c (const): Remove macro.
18100         Include <string.h> unconditionally.
18101         (my_index): Remove; all uses changed to strchr.
18102         (strlen): Remove decl.
18103         (exchange): Remove forward decl; no longer needed.
18104         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
18105         Define with prototype.
18106         * lib/getopt1.c (const): Remove macro.
18107         (getopt_long, getopt_long_only, main): Define with prototype.
18108
18109         * lib/getugroups.c: Include <string.h> unconditionally.
18110
18111         * lib/getusershell.c: Include <stdlib.h> unconditionally.
18112         (getusershell, setusershell, endusershell, readname, main):
18113         Define with prototypes.
18114
18115         * lib/group-member.c: Include group-member.h first.
18116         Include <stdlib.h> unconditionally.
18117
18118         * lib/hard-locale.c: Include hard-locale.h first.
18119         Include <stdlib.h>, <string.h> unconditionally.
18120
18121         * lib/hash.c (free, malloc): Remove decls.
18122         Include <stdlib.h> unconditionally.
18123
18124         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
18125         (getenv): Do not declare.
18126
18127         * lib/idcache.c: Include <string.h> unconditionally.
18128
18129         * lib/long-options.c: Include long-options.h first, to test interface.
18130         Include <stdlib.h> unconditionally.
18131
18132         * lib/makepath.c: Include makepath.h first, to test interface.
18133         Include <stdlib.h> and <string.h> unconditionally.
18134
18135         * lib/linebuffer.c: Include <stdlib.h>.
18136         (free): Remove decl.
18137
18138         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
18139         stddef.h. rpl_malloc returns void *, not char *.
18140         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
18141         prototype.
18142
18143         * lib/md5.h: Include <limits.h> unconditionally.
18144         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
18145         (__P): Remove; all uses removed.
18146         * lib/md5.c: Include "md5.h" first.
18147         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
18148         md5_buffer, md5_process_bytes, md5_process_block):
18149         Define with prototypes.
18150         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
18151         * lib/sha.c: Include "sha.h" first.
18152         Include <stdlib.h>, <string.h> unconditionally.
18153
18154         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
18155         * lib/memcmp.c (__ptr_t): Likewise.
18156         * lib/memrchr.c (__ptr_t): Likewise.
18157         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
18158         Include <string.h> unconditionally.
18159         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
18160         * lib/memchr.c: Include <stdlib.h> unconditionally.
18161         * lib/memchr.c (LONG_MAX): Remove.
18162         * lib/memrchr.c (LONG_MAX): Likewise.
18163         * lib/memchr.c (__memchr): Define via a prototype.
18164         * lib/memrchr.c (__memrchr): Likewise.
18165         * lib/memcmp.c (__P): Remove, and remove all uses.
18166         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
18167         Remove forward decls; no longer needed.
18168         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
18169         Use types required by C89 in prototype.
18170
18171         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
18172         * lib/savedir.c: Likewise.
18173         * lib/mkdir.c (free): Remove decl.
18174         * lib/rmdir.c (rmdir): Define with a prototype.
18175         * lib/savedir.c: Include savedir.h first, to test interface.
18176
18177         * lib/mktime.c (STDC_HEADERS): Remove.
18178         Include <stdlib.h>, <string.h> unconditionally.
18179
18180         * lib/modechange.c: Include <stdlib.h> unconditionally.
18181         (malloc): Remove decl.
18182
18183         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
18184         (free): Remove decl.
18185
18186         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
18187         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
18188         (This type really should be intptr_t, but that's a C99ism.)
18189         (_obstack_memcpy): Remove: all uses changed to memcpy.
18190         Include <string.h> unconditionally.
18191         (struct obstack): Assume __STDC__ for types of members
18192         chunkfun, freefun, extra_arg.
18193         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
18194         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
18195         obstack_begin, obstack_specify_allocation,
18196         obstack_specify_allocation_with_arg, obstack_chunkfun,
18197         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
18198         Remove unprototyped decls and the macros that use them.
18199         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
18200         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
18201         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
18202         (defined __STDC__ && __STDC__)]:
18203         Remove nonprototyped code.
18204         Include <stdlib.h> unconditionally.
18205         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
18206         _obstack_allocated_p, _obstack_free, obstack_free,
18207         _obstack_memory_used, print_and_abort):
18208         Define using prototypes.
18209         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
18210         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
18211         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
18212         obstack_next_free, obstack_object_size, obstack_room) [0]:
18213         Remove unused, unprototyped code.
18214
18215         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
18216
18217         * lib/physmem.c (physmem_total, physmem_available, main): Define
18218         with prototypes.
18219
18220         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
18221         (main): Define with a prototype.
18222
18223         * lib/posixver.c (getenv): Remove decl.
18224
18225         * lib/putenv.c (malloc): Returns void *, not char *.
18226         Include <string.h> unconditionally.
18227         (strchr, memcpy, NULL): Do not define.
18228
18229         * lib/readtokens.c: Include readtokens.h first, to test interface.
18230         Include <stdlib.h>, <string.h> unconditionally.
18231         (init_tokenbuffer): Define with a prototype.
18232
18233         * lib/regex.c (PARAMS): Remove.  All uses removed.
18234         All uses of _RE_ARGS removed, too.
18235         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18236         unconditionally.
18237         (bzero): Assume memset exists.
18238         (memcmp, memcpy, NULL): Remove.
18239         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
18240         char, or assignments to local vars of type signed char.
18241         (init_syntax_once, PREFIX(extract_number_and_incr),
18242         PREFIX(print_partial_compiled_pattern),
18243         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
18244         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
18245         PREFIX(regex_grow_registers), PREFIX(regex_compile),
18246         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
18247         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
18248         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
18249         wcs_compile_range, byte_compile_range, truncate_wchar,
18250         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
18251         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
18252         count_mbs_length, wcs_re_match_2_internal,
18253         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
18254         PREFIX(alt_match_null_string_p),
18255         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
18256         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
18257         regfree, PREFIX(extract_number)): Define with prototype.  Remove
18258         now-unnecessary declaration, if any.
18259         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
18260         regcomp, regexec):
18261         Remove now-unnecessary casts among pointer types.
18262         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
18263
18264         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
18265         (free): Remove decl.
18266
18267         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
18268
18269         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
18270         (free): Remove decl.
18271
18272         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
18273         * lib/xgetcwd.c: Likewise.
18274
18275         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
18276         (free): Remove decl.
18277
18278         * lib/strchrnul.c (strchrnul): Define with a prototype.
18279         Fix bug: c_in was not converted to char before searching.
18280
18281         The following changes are not K&R related:
18282
18283         * lib/group-member.h: Include <sys/types.h>, so that this file is
18284         self-contained.
18285         * lib/makepath.h: Likewise.
18286
18287         * lib/getusershell.c (readname, default_index, line_size, readname):
18288         Use size_t, not int, for sizes.
18289         (readname): If the size overflows, report an error instead of
18290         looping forever.
18291
18292 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18293
18294         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
18295         libc.
18296
18297 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18298
18299         * README: New section: portability guidelines.
18300
18301 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18302
18303         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
18304         C89 spec.
18305
18306 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18307
18308         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
18309
18310 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18311
18312         Assume C89 or better; remove K&R cruft.
18313         A few of these changes were first proposed by Derek Robert Price
18314         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18315
18316         * lib/addext.c: Include <string.h> unconditionally.
18317         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18318         Don't declare getenv or malloc.
18319
18320         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18321         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18322         (NULL): Remove.
18323         (find_stack_direction, alloca): Use prototypes.
18324
18325         * lib/atexit.c (atexit): Define using a prototype.
18326
18327         * lib/basename.c, dirname.c, stripslash.c:
18328         Include <string.h> unconditionally.
18329
18330         * lib/bcopy.c: Include <stddef.h>.
18331         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18332
18333         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18334
18335         * lib/error.h (error, error_at_line, error_print_progname)
18336         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18337         * lib/error.c: Include error.h first, to check interface.
18338         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18339         (VA_START): Remove; all uses changeed to va_start.
18340         (exit, strerror): Remove decls.
18341         (error_print_progname): Prototype uncondionally.
18342         Don't include <errno.h>; no longer needed.
18343         (private_strerror): Remove.
18344         (error_tail): Always define.
18345         (error, error_at_line): Assume C89 or better; always use prototypes.
18346         * lib/fatal.c: Include "fatal.h" first, to test interface.
18347         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18348         (VA_START): Remove; all uses changed to va_start.
18349         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18350         this case.
18351         (exit): Remove decl.
18352         (fatal): Prototype unconditionally.  Assume va_start works.
18353         Abort at end, to pacify gcc.
18354
18355         * lib/euidaccess.c (main): Define with a prototype.
18356
18357         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18358
18359         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18360
18361         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18362         prototypes.
18363         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18364         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18365         (getenv): Remove decl.
18366         (fnmatch): Define using a prototype.
18367         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18368         (FCT): Define using a prototype.
18369
18370         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18371
18372         * lib/gethostname.c: Include <stddef.h>.
18373         (gethostname): Define with prototype.  Length is size_t, not int.
18374
18375 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18376
18377         Assume C89 or better; remove K&R cruft.
18378         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18379         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18380         string.h, getenv, malloc.
18381         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18382         headers.
18383         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18384         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18385         do not check for strerror.
18386         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18387         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18388         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18389         do not check for doprnt or vprintf.
18390         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18391         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18392
18393 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18394
18395         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18396         getversion.c should have been removed then, but was accidentally
18397         preserved.
18398
18399         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18400         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18401
18402 2003-09-08  Karl Berry  <karl@gnu.org>
18403
18404         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18405                 config, forget about prep.
18406
18407         * config/depcomp, missing: update from automake.
18408
18409 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18410
18411         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18412         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18413
18414 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18415
18416         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18417         copy_tm_result.  Bug reported by Simon Josefsson in
18418         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18419
18420 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18421
18422         * m4/time_r.m4: New file.
18423         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18424         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18425         is. Check for timegm declaration.
18426         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18427         Do not check for gmtime_r.
18428         Replace mktime if __mktime_internal does not exist and if mktime
18429         hasn't been replaced already.
18430
18431 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18432
18433         * lib/time_r.c, lib/time_r.h: New files.
18434
18435         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18436         __localtime_r.
18437         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18438         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18439
18440         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18441         __gmtime_r.
18442         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18443         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18444         Include <time_r.h>.
18445
18446         * lib/timegm.c: Switch to glibc implementation, with the following
18447         changes:
18448         [defined HAVE_CONFIG_H]: Include <config.h>.
18449         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18450         (__mktime_internal) [!defined _LIBC]: New decl.
18451         (__gmtime_r) [!defined _LIBC]: New macro and function.
18452         (timegm): Use a prototype, since gnulib assumes C89.
18453         Do not bother declaring tmp to be const, as it's not really usefu.
18454         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
18455         (timegm): Declare only if HAVE_DECL_TIMEGM.
18456
18457 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18458
18459         * MODULES.html.sh (func_all_modules): Add time_r.
18460         * modules/time_r: New file.
18461         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18462         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18463
18464 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18465
18466         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18467         Bug reported by Lute Kamstra in
18468         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18469
18470         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18471         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18472         course with correspondingly smaller numbers for tomorrow and
18473         yesterday.  From Tadayoshi Funaba.  Originally installed into
18474         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18475         coreutils merge?).
18476
18477 2003-08-31  Simon Josefsson  <jas@extundo.com>
18478
18479         * modules/timegm: New file.
18480         * MODULES.html.sh (func_all_modules): Add timegm.
18481
18482 2003-08-31  Simon Josefsson  <jas@extundo.com>
18483
18484         * m4/timegm.m4: New file.
18485
18486 2003-08-31  Simon Josefsson  <jas@extundo.com>
18487
18488         * lib/timegm.h: New file.
18489         * lib/timegm.c: New file.  Based on
18490         wget-1.8.2/src/http.c:mktime_from_utc.
18491
18492 2003-08-31  Karl Berry  <karl@gnu.org>
18493
18494         * lib/argp.h: update from libc.
18495
18496 2003-08-28  Bruno Haible  <bruno@clisp.org>
18497
18498         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
18499         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
18500         followed by '#define fnmatch fnmatch_posix' gives an error.
18501
18502 2003-08-28  Bruno Haible  <bruno@clisp.org>
18503
18504         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
18505         warning on QNX, which defines O_BINARY to 000000.
18506
18507 2003-08-27  Jim Meyering  <jim@meyering.net>
18508
18509         * m4/mkstemp.m4: Require that the system mkstemp be able to create
18510         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
18511         would fail after 32.  Reported by Danny Levinson.  Details here:
18512         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
18513
18514 2003-08-24  Bruno Haible  <bruno@clisp.org>
18515
18516         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
18517         MSVC7 <stdio.h> is included later.
18518
18519 2003-08-22  Simon Josefsson  <jas@extundo.com>
18520
18521         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
18522
18523 2003-08-20  Karl Berry  <karl@gnu.org>
18524
18525         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
18526
18527 2003-08-20  Bruno Haible  <bruno@clisp.org>
18528
18529         * modules/progname: New file.
18530         * MODULES.html.sh (func_all_modules): Add progname.
18531
18532 2003-08-20  Bruno Haible  <bruno@clisp.org>
18533
18534         * lib/progname.h: New file, from GNU gettext.
18535         * lib/progname.c: New file, from GNU gettext.
18536         * lib/progreloc.c: New file, from GNU gettext.
18537
18538 2003-08-19  Jim Meyering  <jim@meyering.net>
18539
18540         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18541         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18542
18543 2003-08-19  Bruno Haible  <bruno@clisp.org>
18544
18545         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18546         more.
18547
18548 2003-08-19  Bruno Haible  <bruno@clisp.org>
18549
18550         * lib/xstrdup.c: Assume <string.h> exists.
18551
18552 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18553
18554         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18555         in makefile rules.
18556
18557 2003-08-18  Jim Meyering  <jim@meyering.net>
18558
18559         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18560         * m4/lib-ld.m4: Likewise.
18561
18562 2003-08-18  Jim Meyering  <jim@meyering.net>
18563
18564         * lib/setenv.h: Indent nested cpp directive.
18565         * lib/vasnprintf.c: Remove trailing blanks.
18566
18567 2003-08-17  Simon Josefsson  <jas@extundo.com>
18568
18569         * modules/xstrndup: New file.
18570         * MODULES.html.sh (func_all_modules): Add xstrndup.
18571
18572 2003-08-17  Simon Josefsson  <jas@extundo.com>
18573
18574         * modules/argp: Fix autoconf macro name. Add more dependencies.
18575
18576 2003-08-17  Simon Josefsson  <jas@extundo.com>
18577
18578         * m4/xstrndup.m4: New file.
18579
18580 2003-08-17  Simon Josefsson  <jas@extundo.com>
18581
18582         * m4/argp.m4: New file.
18583
18584 2003-08-17  Simon Josefsson  <jas@extundo.com>
18585             Bruno Haible  <bruno@clisp.org>
18586
18587         * lib/xstrndup.h: New file.
18588         * lib/xstrndup.c: New file.
18589
18590 2003-08-17  Bruno Haible  <bruno@clisp.org>
18591
18592         * modules/strndup (Files, Include): Add lib/strndup.h.
18593
18594 2003-08-17  Bruno Haible  <bruno@clisp.org>
18595
18596         * modules/euidaccess (Files): Add lib/euidaccess.h.
18597
18598 2003-08-17  Bruno Haible  <bruno@clisp.org>
18599
18600         * lib/strndup.h: New file.
18601
18602 2003-08-17  Bruno Haible  <bruno@clisp.org>
18603
18604         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18605         like AC_GNU_SOURCE.
18606         * modules/extensions (configure.ac): Comment out the invocation of
18607         gl_USE_SYSTEM_EXTENSIONS.
18608
18609 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18610
18611         Merges from coreutils, etc.
18612         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18613         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18614         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18615         fixing a typo.
18616         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18617         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18618
18619 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18620
18621         Document merge from coreutils.
18622         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18623         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18624         * modules/utime: Add m4/utimes-null.m4.
18625
18626 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18627
18628         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18629         space, undoing this 2003-08-12 change:
18630         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18631
18632 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18633
18634         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18635         strtoul.c from libc, undoing this 2003-08-12 change:
18636         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18637
18638 2003-08-16  Jim Meyering  <jim@meyering.net>
18639
18640         Merges from coreutils.
18641         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18642         prefix.  Adjust cache variables similarly.  Create 500 rather than
18643         just 300 files, to exercise bug on Darwin6.5, too.
18644         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18645         $missing_dir.
18646         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18647         AM_SYS_POSIX_TERMIOS.
18648         Reported by mkc@mathdogs.com.
18649         Also change use of $am_cv_sys_posix_termios
18650         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18651         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18652         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18653         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18654         in /proc/mounts until it finds one with matching device number.  This
18655         is unnecessary when the FILE argument *is* a mount point.  No stat call
18656         is necessary in that case.  So, disable the statvfs-testing code on
18657         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18658         as RedHat bug# 84846.
18659         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18660         to 1MB, so as not to render systems with no stack size limit (e.g.,
18661         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18662         Include <unistd.h>.  On some systems,
18663         it is required for the definition of _SC_PAGESIZE.
18664
18665 2003-08-16  Jim Meyering  <jim@meyering.net>
18666
18667         Merge from coreutils.
18668         * lib/xstrtoimax.c: #else #if -> #elif.
18669         * lib/xstrtoumax.c: Likewise.
18670
18671 2003-08-16  Jim Meyering  <jim@meyering.net>
18672
18673         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18674         * m4/utimes.m4: Removed.
18675         * m4/utimes-null.m4: Renamed from utimes.m4.
18676
18677         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18678         to 1MB, so as not to render systems with no stack size limit (e.g.,
18679         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18680         Include <unistd.h>.  On some systems,
18681         it is required for the definition of _SC_PAGESIZE.
18682
18683 2003-08-16  Jim Meyering  <jim@meyering.net>
18684         and Paul Eggert  <eggert@cs.ucla.edu>
18685
18686         Merges from coreutils, etc.
18687
18688         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18689         using the latest version from cvs.  This avoids problems with #line
18690         directives using a vendor (Sun) compiler.
18691         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18692         Don't set GETGROUPS_LIB here; now it's
18693         done via getgroups.m4's wrapper function.
18694         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18695         rather than just in sh-util/configure.in, so that the
18696         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18697         same.
18698         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18699         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18700         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18701         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18702         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18703         Remove code that is now done by the newly-required macros.
18704         Append $(EXEEXT) to DF_PROG.
18705         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18706         Do not invoke or require the following here,
18707         since prereq.m4 or some gnulib .m4 now does this for us:
18708         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18709         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18710         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18711         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18712         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18713         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18714         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18715         AC_FUNC_OBSTACK.
18716         Do not replace the following functions, as this is now the job
18717         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18718         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18719         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18720         atexit getpass, strdup, getpagesize.
18721         Replace 'raise'.
18722         Do not check for the following functions, as this is now the job
18723         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18724         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18725         setregid.
18726         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18727         Check for sys/sysctl.h.
18728         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18729         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18730         of checking for ssize_t ourselves.
18731
18732         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18733         Require every macro that gnulib/modules/* suggests for us.
18734         (jm_PREREQ_ADDEXT): New macro.
18735         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18736         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18737
18738         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18739         (gl_PHYSMEM): Use it.
18740         Also check for `table' function.
18741         Check for new headers and functions.
18742         Add check for sys/sysmp.h.
18743         With suggestions from Kaveh Ghazi.
18744         Ignore headers that are present but cannot be compiled.  This
18745         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18746         C 5.4.
18747
18748 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18749
18750         Document merge from coreutils.
18751         * modules/userspec: Depend on posixver.
18752         * modules/strftime: Depend on tzset.
18753
18754 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18755
18756         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18757         rather than tab, after '#' in shell-script copyright notices.
18758         Suggested by Bruno Haible.
18759
18760 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18761
18762         * config/srclist-update: Use three spaces, rather than tab, after '#'
18763         in shell-script copyright notices.  Suggested by Bruno Haible.
18764         Remove unnecessary parenthesization in regular expression.
18765
18766 2003-08-15  Jim Meyering  <jim@meyering.net>
18767
18768         Merge from coreutils.
18769         * lib/xgethostname.c: Include <stdlib.h>.
18770         (xghostname): Don't exit for anything other than memory-related
18771         failure; just return NULL.
18772         * lib/userspec.c: Include "posixver.h".
18773         (parse_user_spec): Accept `.' as a separator only
18774         in pre-POSIX-200112 mode.
18775         * lib/strtoimax.c: Use #elif rather than #else #if.
18776         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18777         Remove function, now that we can rely on a working tzset function.
18778         [!_LIBC]: Ensure that the required autoconf test has been run.
18779         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18780         Use underlying_strftime for %r.
18781         * lib/sha.c: Merge in some clean-up and optimization changes from
18782         glibc.
18783         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18784         Ensure that it is a multiple of 64.
18785         Rearrange loop exit tests so as to avoid performing an
18786         additional fread after encountering an error or EOF.
18787         * lib/realloc.c: Update copyright date.
18788
18789 2003-08-15  Jim Meyering  <jim@meyering.net>
18790         and Paul Eggert  <eggert@twinsun.com>
18791
18792         Merge from coreutils.
18793         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
18794         member but strut utmpx does not.  Needed for AIX 4.3.3.
18795         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
18796
18797 2003-08-15  Jim Meyering  <jim@meyering.net>
18798         and Paul Eggert  <eggert@cs.ucla.edu>
18799
18800         Merges from coreutils, etc.
18801         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
18802         Require gl_FUNC_TZSET_CLOBBER.
18803         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
18804         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
18805         members.
18806
18807 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18808
18809         Help the merge from coreutils.
18810         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
18811         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
18812         * m4/tzset.m4: Use it too.
18813
18814 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18815
18816         * modules/tzset: New file.
18817
18818 2003-08-14  Jim Meyering  <jim@meyering.net>
18819
18820         Merges from coreutils.
18821         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
18822         variable names, rather than @FNMATCH_H@.
18823         * modules/alloca: Likewise for $(ALLOCA_H).
18824
18825         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
18826         the three copies of the literal target, `fnmatch.h'.
18827         * modules/alloca (alloca.h): Likewise.
18828
18829 2003-08-14  Jim Meyering  <jim@meyering.net>
18830
18831         Merge from coreutils.
18832         * m4/tzset.m4: New file.
18833         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
18834         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
18835         otherwise, AIX 5.1 systems would end up using the latter.
18836         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
18837         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
18838         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
18839         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
18840
18841 2003-08-14  Jim Meyering  <jim@meyering.net>
18842
18843         Merge from coreutils.
18844         * lib/obstack.h: Whitespace changes.
18845         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
18846         and xcalloc return values.
18847         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
18848         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
18849         hang on OSF/1 5.1 for DIR on both local and remote file systems.
18850         Reported by (and fix confirmed by) Nelson H. F. Beebe.
18851         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18852         error from mntctl.
18853         Use mntctl's return value to drive the entry-processing loop, since
18854         we can't rely on the value of the vmt_length member in the last
18855         entry.  On some systems doing so could result in exhausting
18856         virtual memory.  Based in part on a patch from Mike Jetzer.
18857
18858 2003-08-14  Jim Meyering  <jim@meyering.net>
18859         and Paul Eggert  <eggert@twinsun.com>
18860
18861         Merges from coreutils, plus other fixes.
18862         * lib/physmem.c: Merge in portability changes from gcc/libiberty
18863         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
18864         for credits and details.  Thanks to Kaveh Ghazi for helping
18865         to keep these files in sync.
18866         (ARRAY_SIZE): Define it.
18867         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
18868         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
18869         (memcasecmp): Don't assume size_t fits in unsigned int.
18870         Remove casts and duplicate code.
18871         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
18872         (memcpy): Remove definition.
18873         Merge in some clean-up and optimization changes from glibc.
18874         [BLOCKSIZE]: Move definition to top of file.
18875         Ensure that it is a multiple of 64.
18876         Rearrange loop exit tests so as to avoid performing an
18877         additional fread after encountering an error or EOF.
18878         * lib/md5.h (md5_uintptr): Define.
18879         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
18880         return to the initial working directory.  Preserve errno
18881         for caller.
18882         * lib/idcache.c: Include "xalloc.h".
18883         (xmalloc, xrealloc): Remove decls.
18884         (getuser): Remove casts no longer required in C89.
18885         * lib/human.c: Include stdio.h, for sprintf.
18886         * lib/group-member.c: Include "xalloc.h".
18887         (xmalloc, xrealloc): Remove decls.
18888         (get_group_info): Remove casts no longer required in C89.
18889         * lib/getusershell.c (readname): Remove casts no longer required in
18890         C89.
18891         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
18892         * lib/getline.c: Whitespace fix, from coreutils.
18893
18894 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18895
18896         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
18897         Check for isascii.
18898
18899         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18900         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18901         Undo previous (whitespace-only) change.
18902
18903 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18904
18905         * lib/exclude.c: Include <ctype.h>
18906         (IN_CTYPE_DOMAIN): New macro.
18907         (is_space): New fn.
18908         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
18909         and empty lines.
18910
18911         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18912         Undo previous (whitespace-only) change.
18913
18914 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18915
18916         * config/srclist-update: Change update back to the old behavior,
18917         leaving whitespace alone.  Use one 'sed' command rather than a
18918         pipeline.
18919         (fixlicense): Now a variable, not a function.
18920         (remove_trailing_blanks): Remove.
18921         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
18922         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18923         Undo previous (whitespace-only) change.
18924
18925 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18926
18927         Merge from coreutils.
18928         * modules/euidaccess: Add lib_SOURCES, include for new
18929         file euidaccess.h
18930
18931 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18932
18933         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18934         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18935         Normalize leading white space and remove trailing white space.
18936
18937         Merge from coreutils
18938         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
18939
18940         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
18941         0.12.1.  These files are now being upgraded automatically by
18942         ../config/srclist-update.
18943
18944 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18945
18946         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18947         Normalize leading white space and remove trailing white space.
18948         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
18949         notice, as per ../config/srclist-update.
18950
18951         Merge from coreutils.
18952         * lib/euidaccess.h: New file.
18953         * lib/euidaccess.c: Include it.
18954         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
18955         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
18956         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
18957
18958 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18959
18960         * config/srclist-update: Add copyright notice.
18961         (remove_id_lines, remove_trailing_blanks): New constants.
18962         (fixfile): Use them to normalize spacing a bit in copied files.
18963         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18964         Normalize leading white space and remove trailing white space.
18965
18966         * config/texinfo.tex: Sync with texinfo.
18967
18968         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
18969         strtoul.c from libc, to merge coreutils whitespace changes.
18970
18971         * config/srclist.txt: Get the following m4 files from gettext:
18972         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
18973         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
18974         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
18975         wint_t.m4.
18976
18977 2003-08-12  Karl Berry  <karl@gnu.org>
18978
18979         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
18980         been made.
18981
18982 2003-08-11  Paul Eggert  <eggert@twinsun.com>
18983
18984         * modules/gnu-source, m4/gnu-source.m4:
18985         Remove; we're assuming Autoconf 2.54 or later now.
18986         Suggested by Bruno Haible.
18987         * MODULES.html.sh (func_all_modules): Remove gnu-source.
18988
18989 2003-08-11  Bruno Haible  <bruno@clisp.org>
18990
18991         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
18992
18993 2003-08-11  Bruno Haible  <bruno@clisp.org>
18994
18995         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
18996         (vasnprintf): Use it instead of wcslen.
18997
18998 2003-08-11  Bruno Haible  <bruno@clisp.org>
18999
19000         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
19001         value to ensure that _Bool promotes to int. Use #define for _Bool when
19002         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
19003
19004 2003-08-10  Karl Berry  <karl@gnu.org>
19005
19006         * lib/regex.h: update from libc (whitespace fix).
19007
19008 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19009
19010         Merge some files from coreutils.  These changes were
19011         originally made by Jim Meyering.
19012         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
19013         many older Unixes require this.
19014         * lib/alloca.c (alloca): Remove cast to argument of free;
19015         no longer needed in C89.
19016         * lib/alloca_.h, regex.h: Fix white space to match
19017         what GNU indent does.
19018
19019 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19020
19021         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
19022         apparently Emacs's Unicode mode got confused before my 2003-08-05
19023         checkin.
19024
19025 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19026
19027         * m4/extensions.m4: New file.
19028         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
19029         Require gl_USE_SYSTEM_EXTENSIONS.
19030         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
19031         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
19032
19033 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19034
19035         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
19036         * modules/extensions, modules/gnu-source: New files.
19037         * modules/timespec, modules/unlocked-io: Depend on extensions.
19038
19039 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19040
19041         * modules/restrict: New file.
19042         * MODULES.html.sh (func_all_modules): Add restrict.
19043         * modules/regex: Depend on restrict.
19044
19045 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19046
19047         * m4/restrict.m4: New file.
19048         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19049
19050 2003-08-07  Bruno Haible  <bruno@clisp.org>
19051
19052         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19053         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19054
19055 2003-08-07  Bruno Haible  <bruno@clisp.org>
19056
19057         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19058         makes the module 'getndelim2' compatible with the module 'getline'.
19059
19060 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19061
19062         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19063         byte with "\201" to avoid glitches when editing that source file
19064         with multi-gnome-terminal.
19065
19066 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19067
19068         * lib/bumpalloc.h: Remove.
19069
19070 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19071
19072         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19073         * modules/bumpalloc: Remove.
19074
19075 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19076
19077         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19078         GNU coding style.
19079
19080         Merge from coreutils.
19081         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
19082         1. From glibc.
19083         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
19084         from Karl Berry, implemented by Jim Meyering.
19085         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
19086         from Dmitry V. Levin.
19087         Remove anachronistic cast of xrealloc.
19088         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
19089         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
19090         type. Otherwise, it wouldn't compile with at least /bin/cc on
19091         ymp-cray-unicos9.0.2.X.
19092         Combine two mostly-identical uses of alloca into one.
19093         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
19094
19095 2003-08-04  Dave Love  <d.love@dl.ac.uk>
19096
19097         [From Emacs.]
19098
19099         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
19100         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
19101         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
19102         obsolete NLIST_NAME_UNION.
19103         [__GNU__]: Undef BSD and FSCALE.
19104         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
19105
19106 2003-08-03  Paul Eggert  <eggert@twinsun.com>
19107
19108         * lib/stdbool_.h (_Bool): Make it signed char, instead of
19109         an enum type, so that it's guaranteed to promote to int.  See:
19110         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
19111
19112 2003-08-03  Karl Berry  <karl@gnu.org>
19113
19114         * config/depcomp: update from automake.
19115
19116 2003-07-31  Paul Eggert  <eggert@twinsun.com>
19117
19118         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
19119         (strerror): Don't assume that a printable int fits in 14 bytes.
19120
19121 2003-07-31  Bruno Haible  <bruno@clisp.org>
19122
19123         * modules/getpass-gnu: New file.
19124         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
19125
19126 2003-07-31  Bruno Haible  <bruno@clisp.org>
19127
19128         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
19129
19130 2003-07-24  Karl Berry  <karl@gnu.org>
19131
19132         * config/missing: update from automake.
19133
19134 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
19135             Bruno Haible  <bruno@clisp.org>
19136
19137         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
19138         * lib/getline.c (getline, getdelim): Likewise.
19139         Remove _GNU_SOURCE define; now it's defined in config.h through
19140         m4/getline.m4.
19141
19142 2003-07-23  Karl Berry  <karl@gnu.org>
19143
19144         * config/config.sub: update from prep.
19145
19146 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19147
19148         * modules/xalloc (Depends-on): Add exitfail.
19149         * modules/xmemcoll: Likewise.
19150
19151 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19152
19153         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
19154         over-parenthesization in macros.
19155
19156         Sync with coreutils.
19157
19158         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
19159         required by C99.
19160
19161         Use `exit_failure' for xalloc and xmemcoll instead of their own
19162         private exit-failure variables.
19163         * lib/xalloc.h (xalloc_exit_failure): Remove.
19164         * lib/xmalloc.c: Likewise.  Include exitfail.h.
19165         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
19166         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
19167         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
19168         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
19169
19170 2003-07-20  Jim Meyering  <jim@meyering.net>
19171
19172         * modules/closeout (Depends-on): Add exitfail.
19173         Suggestion from Bruno Haible.
19174
19175 2003-07-19  Karl Berry  <karl@gnu.org>
19176
19177         * config/config.sub: update from prep.
19178
19179 2003-07-18  Paul Eggert  <eggert@twinsun.com>
19180
19181         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
19182         Remove.
19183         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
19184         to test that it can stand by itself.  Include "exitfail.h".
19185         Clients should set exit_failure instead.
19186         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
19187
19188 2003-07-18  Bruno Haible  <bruno@clisp.org>
19189
19190         * modules/getndelim2: New file.
19191         * modules/getline: Share files with module getndelim2.
19192         * modules/getnline: Depend on getndelim2 instead of sharing files with
19193         it. Add getnline.c to lib_SOURCES.
19194         * MODULES.html.sh (func_all_modules): Add getndelim2.
19195
19196 2003-07-18  Bruno Haible  <bruno@clisp.org>
19197
19198         * m4/getndelim2.m4: New file.
19199         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
19200         invoke gl_PREREQ_GETNDELIM2.
19201         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
19202         gl_PREREQ_GETNDELIM2.
19203         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
19204         gl_GETNDELIM2.
19205
19206 2003-07-18  Bruno Haible  <bruno@clisp.org>
19207
19208         * lib/getndelim2.h: New file.
19209         * lib/getndelim2.c: Make into a module of its own. Include config.h,
19210         getndelim2.h.
19211         (getndelim2): Make non-static. Change return type to ssize_t.
19212         * lib/getline.h: Change argument names.
19213         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
19214         * lib/getnline.c: Include getndelim2.h.
19215
19216 2003-07-18  Andreas Schwab  <schwab@suse.de>
19217
19218         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
19219
19220 2003-07-17  Karl Berry  <karl@gnu.org>
19221
19222         * config/config.sub: update from prep.
19223
19224 2003-07-17  Bruno Haible  <bruno@clisp.org>
19225
19226         * modules/getnline: New file.
19227         * modules/getline: Add lib/getndelim2.c to source file list.
19228         * MODULES.html.sh (func_all_modules): Add getnline.
19229
19230 2003-07-17  Bruno Haible  <bruno@clisp.org>
19231
19232         * m4/getnline.m4: New file.
19233
19234 2003-07-17  Bruno Haible  <bruno@clisp.org>
19235
19236         * m4/Makefile.am.in: Remove file.
19237         * m4/Makefile.am: Remove file.
19238         * m4/Makefile.in: Remove file.
19239
19240 2003-07-17  Bruno Haible  <bruno@clisp.org>
19241
19242         * lib/getnline.h: New file.
19243         * lib/getnline.c: New file.
19244         * lib/getndelim2.c: New file, extracted from getline.c.
19245         (getndelim2): Renamed from getdelim2, with added nmax argument.
19246         * lib/getline.c: Include getndelim2.c.
19247         (getdelim2): Moved out to getndelim2.c.
19248         (getline, getdelim): Update.
19249
19250 2003-07-17  Bruno Haible  <bruno@clisp.org>
19251
19252         * lib/Makefile.am: Remove file.
19253         * lib/Makefile.in: Remove file.
19254
19255 2003-07-17  Bruno Haible  <bruno@clisp.org>
19256
19257         * configure.in: Remove file.
19258         * Makefile.in: Remove file.
19259
19260 2003-07-17  Bruno Haible  <bruno@clisp.org>
19261
19262         * MODULES.html.sh: Put the </BODY> right before </HTML>.
19263
19264 2003-07-16  Karl Berry  <karl@gnu.org>
19265
19266         * config/srclist-update: was running fixlicense twice, which caused
19267                 texinfo.tex to be nullified for some reason.  Simplify,
19268                 $gplsrc is no longer needed as far as I can see?
19269
19270 2003-07-16  Jim Meyering  <jim@meyering.net>
19271
19272         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
19273
19274 2003-07-15  Paul Eggert  <eggert@twinsun.com>
19275
19276         * config/srclist.txt: Get the following files from gettext-runtime/intl
19277         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
19278         ref-del.sin.  From Bruno Haible.
19279         * config/srclist-update (fixfile): Change grep pattern again, since the
19280         previous fix didn't work (there was another trailing $).  Use
19281         '[$]' to escape the $s.
19282
19283 2003-07-15  Karl Berry  <karl@gnu.org>
19284
19285         * lib/vasnprintf.c: update from gettext.
19286
19287 2003-07-15  Karl Berry  <karl@gnu.org>
19288
19289         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
19290         gets expanded when surrounded by '$'.
19291
19292 2003-07-15  Jim Meyering  <jim@meyering.net>
19293
19294         * modules/save-cwd: Don't depend on error.  From Derek Price.
19295
19296 2003-07-15  Jim Meyering  <jim@meyering.net>
19297
19298         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
19299
19300 2003-07-14  Simon Josefsson  <jas@extundo.com>
19301
19302         * modules/mempcpy: New file.
19303         * MODULES.html.sh (func_all_modules): Add mempcpy.
19304
19305 2003-07-14  Simon Josefsson  <jas@extundo.com>
19306
19307         * m4/mempcpy.m4: New file.
19308
19309 2003-07-14  Simon Josefsson  <jas@extundo.com>
19310
19311         * lib/mempcpy.h: New file.
19312         * lib/mempcpy.c: New file.
19313
19314 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19315
19316         * modules/getdate, modules/posixtm: Depend on mktime.
19317
19318 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19319
19320         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19321         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19322         unicodeio.c, unicodeio.h, unlocked-io.h:
19323         Switch from LGPL to GPL.
19324
19325 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19326
19327         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19328         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19329         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19330         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19331         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19332         updated automatically by ../config/srclist-update.  This changes
19333         their license from LPGL to GPL.
19334
19335 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19336
19337         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19338         assumed to refer to the root of the most recent stable gettext version.
19339         * config/srclistvars.sh: Add defaults for eggert.
19340         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19341         Match "This program" as well as "The program".  This is needed
19342         for gettext.
19343
19344 2003-07-14  Jim Meyering  <jim@meyering.net>
19345
19346         Don't emit diagnostics.  Let callers do that.
19347         * lib/save-cwd.c: Don't include "error.h".
19348         (save_cwd): Don't call error.  Ensure that errno is valid
19349         when returning nonzero.
19350
19351         * lib/save-cwd.h (restore_cwd): Update prototype.
19352         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19353         Simplify.  Don't call error upon failure.  Let callers do that.
19354         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19355         when auditing is enabled.  But don't bother updating the #if.
19356
19357 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19358
19359         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19360         it breaks C++ compilation.
19361         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19362
19363 2003-07-10  Simon Josefsson  <jas@extundo.com>
19364
19365         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19366
19367 2003-07-10  Jim Meyering  <jim@meyering.net>
19368
19369         * m4/clock_time.m4: Remove trailing blank.
19370         * m4/intmax_t.m4: Likewise.
19371
19372 2003-07-10  Jim Meyering  <jim@meyering.net>
19373
19374         * lib/vasnprintf.c: Remove trailing blanks.
19375         Make cpp indentation consistent.
19376
19377 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19378
19379         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19380         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19381         Switch from LGPL to GPL.
19382
19383 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19384
19385         * config/srclist.txt: Sort sublists.  Add
19386         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19387         that differ from gnulib for one reason or another; we'd like this list
19388         to be smaller but for now let's document what we have.
19389
19390 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19391
19392         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19393         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19394         and sweeter "eval x=$x".
19395         * config/srclist.txt: Get lib/argp* from glibc.
19396
19397 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19398
19399         * lib/mktime.c: Fix some boundary cases and remove need for floating
19400         point.
19401
19402         Issue a compile-time diagnostic if time_t is floating point, or if
19403         two's complement arithmetic is not in effect, or if arithmetic
19404         right shift does not propagate the sign.  These assumptions were
19405         all in the original code but they weren't checked.
19406
19407         (TIME_T_MIDPOINT, verify): New macros.
19408         (__isleap): Remove; it has integer overflow problems.
19409         (leapyear): New function, without those problems.
19410         (ydhms_tm_diff): Remove; splitting into two parts.
19411         (ydhms_diff): New function, containing the arithmetic part of
19412         the old ydhms_tm_diff function.  Issue a compile-time
19413         diagnostic if we are not using C99 integer division.
19414         Avoid casts when possible.
19415         (guess_time_tm): New function, containing the checking part of
19416         the old ydhms_tm_diff function.  Return the new value, rather than
19417         the difference between it and the old.  Accept a new argument T
19418         so that *T specifies the old value.  Check for overflow in the result.
19419
19420         (__mktime_internal): Use a time_t offset, not a long int offset.
19421         This undoes the 2003-06-04 change, which is no longer needed now
19422         that we have better overflow checking.
19423         (localtime_offset): Likewise.
19424
19425         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19426         and long are 64-bit but int is only 32-bit.
19427         (ydhms_diff): Use long int to store year1 and yday1.
19428         Issue a compile-time diagnostic if long int is not wide enough.
19429
19430         (__mktime_internal): Use long int to store adjusted year and yday.
19431         Use plain C rather than preprocessor commands, if that doesn't
19432         affect efficiency.
19433         Check for overflow (and try to repair) after each probe
19434         rather than checking only at the very end.  This avoids some bugs
19435         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19436         does not equal GMT offset at maximum time).
19437         Use integer to check for overflow rather than floating point; this
19438         is more portable to non-IEEE hosts, and is a tad faster.
19439         When we detect that we are oscillating between two values,
19440         don't check whether tm_isdst has the requested value, since
19441         we already know the answer.  When tm_isdst has the wrong value,
19442         use a different heuristic to find the right one, based on the
19443         extreme values actually observed in practice in tz2003a,
19444         rather than the (overly optimistic) "previous 3 calendar quarters".
19445
19446         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19447         "T const" to accommodate glibc style.
19448         (check_result): Use less-confusing report format.  "long" -> "long int.
19449         (main): Likewise.
19450         Don't loop if the iteration overflows time_t.
19451         Allow a negative step in the iteration.
19452
19453 2003-07-06  Karl Berry  <karl@gnu.org>
19454
19455         * config/depcomp: update from automake.
19456         * config/config.sub: update from prep.
19457
19458 2003-07-03  Karl Berry  <karl@gnu.org>
19459
19460         * config/config.guess: update from prep.
19461
19462 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19463
19464         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19465         xreadlink.c now includes it unconditionally.
19466
19467 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19468
19469         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19470         having it depend on HAVE_SYS_TYPES_H.
19471
19472 2003-07-01  Bruno Haible  <bruno@clisp.org>
19473
19474         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19475         <sys/types.h> should be sufficient.
19476         Reported by Paul Eggert.
19477
19478 2003-06-26  Karl Berry  <karl@gnu.org>
19479
19480         * config/depcomp: update from automake.
19481
19482 2003-06-26  Bruno Haible  <bruno@clisp.org>
19483
19484         * modules/human: Depend on module stdbool.
19485
19486 2003-06-25  Bruno Haible  <bruno@clisp.org>
19487
19488         * modules/readlink: New file.
19489         * modules/xreadlink: Depend on it.
19490         * MODULES.html.sh (func_all_modules): Add readlink.
19491
19492 2003-06-25  Bruno Haible  <bruno@clisp.org>
19493
19494         * m4/readlink.m4: New file.
19495
19496 2003-06-25  Bruno Haible  <bruno@clisp.org>
19497
19498         * lib/readlink.c: New file.
19499
19500 2003-06-22  Karl Berry  <karl@gnu.org>
19501
19502         * config/srclist.txt: update mkinstalldirs from automake.
19503         * config/mkinstalldirs: update.
19504
19505 2003-06-22  Bruno Haible  <bruno@clisp.org>
19506
19507         Portability to mingw32.
19508         * m4/ssize_t.m4: New file, from GNU gettext.
19509         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
19510         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
19511
19512 2003-06-22  Bruno Haible  <bruno@clisp.org>
19513
19514         * modules/safe-read: Add m4/ssize_t.m4.
19515         * modules/xreadlink: Add m4/ssize_t.m4.
19516
19517 2003-06-20  Bruno Haible  <bruno@clisp.org>
19518
19519         Assume C89, so PARAMS isn't needed.
19520         * lib/unicodeio.h (PARAMS): Remove.
19521         * lib/unicodeio.c: Don't use PARAMS.
19522
19523 2003-06-18  Karl Berry  <karl@gnu.org>
19524
19525         * config/config.{guess,sub}: update from prep.
19526
19527 2003-06-18  Jim Meyering  <jim@meyering.net>
19528
19529         Merge changes from coreutils.
19530         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19531         Remove explicit declarations of xmalloc and realloc.
19532         Include xalloc.h.
19533         (read_utmp): Remove anachronistic cast of xmalloc.
19534
19535 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19536
19537         Assume C89, so PARAMS isn't needed.
19538         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19539         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19540         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19541         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19542         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19543         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19544         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19545         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19546         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19547         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19548         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19549         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19550         no longer needed. Anyway, config.h should always be included before any
19551         other file.
19552
19553 2003-06-11  Simon Josefsson  <jas@extundo.com>
19554
19555         * modules/sysexits: New file.
19556         * MODULES.html.sh (func_all_modules): Add sysexits.
19557
19558 2003-06-11  Simon Josefsson  <jas@extundo.com>
19559
19560         * lib/sysexit_.h: New file.
19561
19562 2003-06-11  Derek Price  <derek@ximbiot.com>
19563
19564         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19565         necessary.
19566
19567 2003-06-11  Bruno Haible  <bruno@clisp.org>
19568
19569         * m4/sysexits.m4: New file.
19570
19571 2003-06-10  Simon Josefsson  <jas@extundo.com>
19572
19573         * lib/argp.h: New file, from glibc.
19574         * lib/argp-ba.c: New file, from glibc.
19575         * lib/argp-eexst.c: New file, from glibc.
19576         * lib/argp-fmtstream.c: New file, from glibc.
19577         * lib/argp-fmtstream.h: New file, from glibc.
19578         * lib/argp-fs-xinl.c: New file, from glibc.
19579         * lib/argp-help.c: New file, from glibc.
19580         * lib/argp-namefrob.h: New file, from glibc.
19581         * lib/argp-parse.c: New file, from glibc.
19582         * lib/argp-pv.c: New file, from glibc.
19583         * lib/argp-pvh.c: New file, from glibc.
19584         * lib/argp-xinl.c: New file, from glibc.
19585
19586 2003-06-10  Simon Josefsson  <jas@extundo.com>
19587
19588         * modules/strchrnul: New file.
19589
19590 2003-06-10  Simon Josefsson  <jas@extundo.com>
19591
19592         * modules/argp: New file.
19593
19594 2003-06-10  Simon Josefsson  <jas@extundo.com>
19595
19596         * m4/strchrnul.m4: New file.
19597
19598 2003-06-10  Simon Josefsson  <jas@extundo.com>
19599
19600         * lib/strchrnul.h: New file.
19601         * lib/strchrnul.c: New file.
19602
19603 2003-06-10  Bruno Haible  <bruno@clisp.org>
19604
19605         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19606
19607 2003-06-07  Karl Berry  <karl@gnu.org>
19608
19609         * config/config.{guess,sub}: update from prep.
19610
19611 2003-06-07  Jim Meyering  <jim@meyering.net>
19612
19613         * modules/strtod: Use $(...) notation, not @...@ for
19614         AC_REPLACE'd variables.
19615         * modules/localcharset: Likewise.
19616
19617 2003-06-07  Jim Meyering  <jim@meyering.net>
19618
19619         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19620         in place of my name in the copyright comment.
19621         Remove definition and uses of __P.
19622
19623         From coreutils.
19624         * lib/stat.c: Don't declare xmalloc explicitly.
19625         Instead, include "xalloc.h".
19626         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19627         xrealloc, and xcalloc return values.
19628         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19629         Improve comment.
19630         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19631
19632 2003-06-07  Bruno Haible  <bruno@clisp.org>
19633
19634         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19635         avoid AC_CONFIG_LINKS.
19636         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19637         fnmatch.h, to avoid AC_CONFIG_LINKS.
19638         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19639
19640 2003-06-07  Bruno Haible  <bruno@clisp.org>
19641
19642         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19643         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19644         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19645         directory.
19646         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19647         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19648         directory.
19649
19650 2003-06-06  Jim Meyering  <jim@meyering.net>
19651
19652         Merge from coreutils.
19653         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19654         Consolidate declarations and initializations of *_base* locals.
19655
19656         Merge from coreutils.
19657         This avoids a core dump on systems without GNU putenv,
19658         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19659         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19660         (unsetenv): New static function, from GNU libc.
19661         (rpl_putenv): Use it.
19662
19663         * lib/modechange.c: Remove trailing blanks.
19664
19665         Merge from coreutils.
19666         * lib/fsusage.c: Remove declaration of statfs.
19667         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19668
19669         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19670
19671 2003-06-06  Jim Meyering  <jim@meyering.net>
19672
19673         * lib/stdbool_.h: Renamed from stdbool.h.in.
19674
19675 2003-06-06  Jim Meyering  <jim@meyering.net>
19676             Bruno Haible  <bruno@clisp.org>
19677
19678         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19679         Adjust Makefile.am snippet not to redirect directly to target.
19680         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19681
19682 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19683
19684         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19685         mismatch, look in future quarters as well as past.  This fixes a
19686         bug when processing fall-backwards gaps immediately after a long
19687         period of daylight-saving time.
19688
19689         * lib/mktime.c: Assume freestanding C89 or better.
19690         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19691         (__P): Remove; not used.
19692         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19693         (mktime, not_equal_tm, print_tm, check_result,
19694         main): Use prototypes.  Use const * where appropriate.
19695         (main): Fix typo in testing code that uncovered by above changes.
19696         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19697
19698 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19699
19700         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19701         locale.h, localeconv.  This merges changes from coreutils.
19702
19703         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19704         It can be removed after the next Autoconf is released.
19705         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19706         needed.
19707
19708 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19709
19710         * lib/mktime.c: Fix Debian bug 177940
19711         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19712         (localtime_offset): Now long int, not time_t, because we want it
19713         to be guaranteed to be signed.  All uses changed.
19714         (__mktime_internal): If overflow would occur when adding offset,
19715         don't add it.
19716
19717         Merge 'human' changes from coreutils.  Rewrite to support
19718         locale-specific notations like thousands separators.
19719         * lib/human.c: Simplify authorship notice.
19720         Include human.h immediately after config.h.
19721         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19722         <limits.h>: Do not include, since human.h does.
19723         (SIZE_MAX, UINTMAX_MAX): New macros.
19724         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19725         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19726         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19727         (power_letter): Renamed from suffixes.
19728         (generate_suffix_backwards): Remove.
19729         (adjust_value): Now takes int style (because of human.h changes)
19730         and long double value (for greater precision on some platforms).
19731         (group_number): New function.
19732         (human_readable): Use it.  Use integer options, not enum.
19733         Put the options before the sizes in the arg list.
19734         Support all the new options.
19735         The old human_readable function has been removed;
19736         use inttostr.h instead.
19737         (human_readable, default_block_size, humblock):
19738         Use uintmax_t, not int, for block sizes.
19739         (human_readable_inexact, block_size_types): Remove.
19740         (block_size_opts): New constant.
19741         (human_options): Renamed from human_block_size, with new signature
19742         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19743         * lib/human.h: Add copyright and authorship notice.
19744         Include <limits.h> and <stdbool.h> unconditionally.
19745         (PARAMS): Remove.  All uses removed.
19746         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19747         (enum human_inexact_style): Remove tag; now a nameless enum.
19748         (human_floor, human_ceiling, human_round_to_even): Now have
19749         values 2, 0, 1 rather than -1, 1, 0.
19750         (human_group_digits, human_suppress_point_zero, human_autoscale,
19751         human_base_1024, human_SI, human_B): New constants.
19752         (human_readable_inexact, human_block_size): Remove.
19753         (human_readable): Size args are now uintmax_t, not int.
19754         (human_options): New decl.
19755
19756         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19757         unnecessary now that we assume C89 or better.  This change
19758         imported from coreutils.
19759
19760         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19761         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19762         in the 2003-05-30 sync from glibc.
19763
19764         .h files should stand alone, but we shouldn't include <sys/types.h>
19765         if we can get away with just <stddef.h>.
19766
19767         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19768         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19769         rather than <sys/types.h>, as we merely need size_t.
19770         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19771         to get size_t.
19772         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19773         Include <stdio.h>, to get FILE.
19774         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19775         memcasecmp.h has included <stddef.h> and all we need is size_t.
19776         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19777         our interface, instead of including <sys/types.h>
19778
19779 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19780
19781         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19782         now, as glibc mktime is buggy on non-glibc systems.
19783
19784 2003-06-03  Karl Berry  <karl@gnu.org>
19785
19786         * config/config.sub: update from prep.
19787
19788 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19789
19790         [from coreutils]
19791         Fix some minor time-related bugs with POSIX time arguments.
19792         Some valid time stamps were being rejected (notably -1, and
19793         time stamps before 1900 on 64-bit hosts).  And some invalid
19794         time stamps were being accepted, e.g. September 31.
19795
19796         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
19797         that we can return (time_t) -1 successfully.
19798         * lib/posixtm.c: Likewise.
19799         [HAVE_STDBOOL_H]: Include <stdbool.h>.
19800         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
19801         (t): Remove static var.
19802         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
19803         of static var.  All uses changed.
19804         (year): Do not reject years before 1900; they can occur with
19805         64-bit time_t.
19806         (posix_time_parse): Do not check for out-of-range components;
19807         that is now the caller's responsibility, since our checks were
19808         only approximations.
19809         (posixtime): Use mktime to check for out-of-range components,
19810         since it knows them exactly.
19811         If mktime returns (time_t) -1, check whether an error actually occurred
19812         by invoking localtime on -1.
19813         (main) [TEST_POSIXTIME]: Check for input data errors, and report
19814         posixtime failures better.
19815         Improve the test data (in comments only).
19816
19817 2003-06-02  Karl Berry  <karl@gnu.org>
19818
19819         * config/mkinstalldirs (version): new variable.
19820         (--version): new option.
19821         (usage): improve message.
19822
19823 2003-05-30  Karl Berry  <karl@gnu.org>
19824
19825         * lib/mktime.c: update from libc.
19826
19827 2003-05-30  Bruno Haible  <bruno@clisp.org>
19828
19829         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
19830         * config/config.rpath: Upgrade to gettext-0.12.1.
19831
19832 2003-05-30  Bruno Haible  <bruno@clisp.org>
19833
19834         * m4/gettext.m4: Upgrade to gettext-0.12.1.
19835         * m4/nls.m4: New file, from gettext-0.12.1.
19836         * m4/po.m4: New file, from gettext-0.12.1.
19837         * m4/progtest.m4: Upgrade to gettext-0.12.1.
19838
19839 2003-05-30  Bruno Haible  <bruno@clisp.org>
19840
19841         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
19842         * lib/localcharset.h: Likewise.
19843         * lib/localcharset.c: Likewise.
19844
19845 2003-05-29  Karl Berry  <karl@gnu.org>
19846
19847         * config/config.rpath: update from gettext.
19848
19849 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19850
19851         Assume the headers required for C89 freestanding compilers.
19852         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
19853         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
19854         * m4/human.m4 (gl_HUMAN): Likewise.
19855         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
19856         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
19857         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19858         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
19859         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19860         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
19861
19862 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19863
19864         Assume the headers required for C89 freestanding compilers.
19865         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
19866         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
19867         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
19868         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
19869         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
19870         define, since <limits.h> is guaranteed to do that.
19871         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
19872         * lib/exclude.c: Include <stdbool.h> unconditionally.
19873         * lib/tempname.c: Include <stddef.h> unconditionally.
19874         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
19875         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
19876         <stddef.h> does that.
19877         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
19878         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
19879         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
19880         needed.
19881         * lib/xstrtol.c: Likewise.
19882         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
19883         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
19884
19885         * lib/addext.c (addext): Use assignment rather than cast, to avoid
19886         warnings on some platforms.
19887
19888         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19889         arbitrarily.
19890
19891 2003-05-26  Jim Meyering  <jim@meyering.net>
19892
19893         Merge in a change from coreutils:
19894         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
19895         that is guaranteed to be `no'.  Use `no_such_member' to indicate
19896         that condition, rather than `-1' which is slightly misleading.
19897         Change the name of the cache variable to have the gl_ prefix.
19898         Prompted by a patch from Richard Dawe for DJGPP.
19899
19900 2003-05-24  Karl Berry  <karl@gnu.org>
19901
19902         * config/config.guess: update from prep.
19903
19904 2003-05-22  Karl Berry  <karl@gnu.org>
19905
19906         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
19907
19908 2003-05-20  Karl Berry  <karl@gnu.org>
19909
19910         * config/config.guess: update from prep.
19911
19912 2003-05-18  Karl Berry  <karl@gnu.org>
19913
19914         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
19915         might actually be set by the user.
19916
19917         * config/depcomp, install-sh, mdate-sh: update from automake.
19918
19919 2003-05-17  Bruno Haible  <bruno@clisp.org>
19920
19921         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
19922         invalid expansion for AC_EGREP_CPP.
19923         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
19924         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
19925         Suggested by Akim Demaille <akim@epita.fr> in
19926         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
19927
19928 2003-05-12  Jim Meyering  <jim@meyering.net>
19929
19930         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
19931         the space-padded-by-default conversion specifiers, %e, %k, %l.
19932
19933 2003-05-12  Bruno Haible  <bruno@clisp.org>
19934
19935         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
19936         the string is longer than 4 KB.
19937
19938 2003-05-11  Karl Berry  <karl@gnu.org>
19939
19940         * config/config.{guess,sub}: update from prep.
19941
19942 2003-05-09  Bruno Haible  <bruno@clisp.org>
19943
19944         * modules/error: Add m4/strerror_r.m4 to file list.
19945
19946 2003-05-03  Bruno Haible  <bruno@clisp.org>
19947
19948         Upgrade to Unicode-4.0.
19949         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
19950         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
19951         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
19952         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
19953         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
19954         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
19955         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
19956         Change width of U+E0100..U+E01EF from 1 to 0.
19957
19958 2003-04-25  Jim Meyering  <jim@meyering.net>
19959
19960         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
19961         of type size_t, not int.
19962
19963 2003-04-25  Bruno Haible  <bruno@clisp.org>
19964
19965         * lib/copy-file.c: Include <stddef.h>, for size_t.
19966
19967 2003-04-21  Paul Eggert  <eggert@twinsun.com>
19968
19969         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
19970         code which expansion is under static control.  Patch imported from
19971         Akim Demaille's patch to Bison; see
19972         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
19973
19974 2003-04-14  Bruno Haible  <bruno@clisp.org>
19975
19976         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
19977
19978 2003-04-11  Jim Meyering  <jim@meyering.net>
19979
19980         Merge changes from Coreutils.
19981
19982         2003-03-22  Jim Meyering  <jim@meyering.net>
19983
19984         * lib/strftime.c (widen): Cast alloca return value to proper type.
19985
19986         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
19987
19988         From GNU libc.
19989         * lib/strftime.c (my_strftime): Handle very large width
19990         specifications for numeric values correctly.  Improve checks for
19991         overflow.
19992
19993         2003-01-19  Jim Meyering  <jim@meyering.net>
19994
19995         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
19996         definitions.
19997         (nl_get_alt_digit) [! defined my_strftime]: Define.
19998         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
19999         _nl_get_alt_digit and _nl_get_walt_digit.
20000
20001         * lib/strftime.c (my_strftime): Merge in locale-related changes from
20002         libc. These changes have no effect outside of _LIBC.
20003
20004 2003-04-10  Bruno Haible  <bruno@clisp.org>
20005
20006         * modules/findprog: New file.
20007         * MODULES.html.sh (func_all_modules): Add it.
20008
20009 2003-04-10  Bruno Haible  <bruno@clisp.org>
20010
20011         * m4/findprog.m4: New file.
20012         * m4/eaccess.m4: New file.
20013
20014 2003-04-10  Bruno Haible  <bruno@clisp.org>
20015
20016         * lib/findprog.h: New file, from GNU gettext.
20017         * lib/findprog.c: New file, from GNU gettext.
20018
20019 2003-04-05  Jim Meyering  <jim@meyering.net>
20020
20021         Merge changes from Coreutils.
20022
20023         * lib/exclude.h (PARAMS): Remove definition and uses.
20024         * lib/exclude.c: Remove uses of `PARAMS'.
20025
20026         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
20027         Add test-cases for DOS filenames. Declare program_name.
20028         (main): Set up program_name.  Patch by Rich Dawe.
20029
20030         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20031         error from mntctl.
20032         Use mntctl's return value to drive the entry-processing loop, since
20033         we can't rely on the value of the vmt_length member in the last
20034         entry.  On some systems doing so could result in exhausting
20035         virtual memory.  Based in part on a patch from Mike Jetzer.
20036
20037 2003-04-04  Bruno Haible  <bruno@clisp.org>
20038
20039         * modules/linebreak: New file.
20040         * MODULES.html.sh (func_all_modules): Add it.
20041
20042 2003-04-04  Bruno Haible  <bruno@clisp.org>
20043
20044         * m4/linebreak.m4: New file.
20045
20046 2003-04-04  Bruno Haible  <bruno@clisp.org>
20047
20048         * lib/linebreak.h: New file, from GNU gettext.
20049         * lib/linebreak.c: New file, from GNU gettext with slight
20050         modifications.
20051         * lib/lbrkprop.h: New file, from GNU gettext.
20052
20053 2003-04-03  Bruno Haible  <bruno@clisp.org>
20054
20055         * modules/utf8-ucs4: New file.
20056         * modules/utf16-ucs4: New file.
20057         * modules/ucs4-utf8: New file.
20058         * modules/ucs4-utf16: New file.
20059         * MODULES.html.sh (func_all_modules): Add them.
20060
20061 2003-04-03  Bruno Haible  <bruno@clisp.org>
20062
20063         * m4/utf-ucs4.m4: New file.
20064         * m4/ucs4-utf.m4: New file.
20065
20066 2003-04-03  Bruno Haible  <bruno@clisp.org>
20067
20068         * lib/utf8-ucs4.h: New file, from GNU gettext.
20069         * lib/utf16-ucs4.h: New file, from GNU gettext.
20070         * lib/ucs4-utf8.h: New file, from GNU gettext.
20071         * lib/ucs4-utf16.h: New file, from GNU gettext.
20072
20073 2003-04-02  Bruno Haible  <bruno@clisp.org>
20074
20075         * modules/binary-io: New file.
20076         * MODULES.html.sh (func_all_modules): Add it.
20077
20078 2003-04-02  Bruno Haible  <bruno@clisp.org>
20079
20080         * lib/binary-io.h: New file, from GNU gettext.
20081
20082 2003-04-01  Bruno Haible  <bruno@clisp.org>
20083
20084         * modules/pathname: New file.
20085         * MODULES.html.sh (func_all_modules): Add it.
20086
20087 2003-04-01  Bruno Haible  <bruno@clisp.org>
20088
20089         * lib/pathname.h: New file, from GNU gettext.
20090         * lib/concatpath.c: New file, from GNU gettext.
20091
20092 2003-03-30  Bruno Haible  <bruno@clisp.org>
20093
20094         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
20095
20096 2003-03-30  Bruno Haible  <bruno@clisp.org>
20097
20098         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
20099         function chown() doesn't exist.
20100
20101 2003-03-28  Bruno Haible  <bruno@clisp.org>
20102
20103         * modules/copy-file: New file.
20104         * MODULES.html.sh (func_all_modules): Add it.
20105
20106 2003-03-28  Bruno Haible  <bruno@clisp.org>
20107
20108         * m4/copy-file.m4: New file.
20109
20110 2003-03-28  Bruno Haible  <bruno@clisp.org>
20111
20112         * lib/copy-file.h: New file, from GNU gettext.
20113         * lib/copy-file.c: New file, from GNU gettext.
20114
20115 2003-03-18  Jim Meyering  <jim@meyering.net>
20116
20117         * lib/quote.c (quote_n): Fix typo in comment.
20118
20119 2003-03-18  Bruno Haible  <bruno@clisp.org>
20120
20121         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
20122         checking.
20123         * m4/onceonly_2_57.m4: Likewise.
20124
20125 2003-03-17  Bruno Haible  <bruno@clisp.org>
20126
20127         * m4/onceonly.m4: Require autoconf 2.54 or newer.
20128         (m4_quote): Remove macro.
20129         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
20130
20131 2003-03-14  Jim Meyering  <jim@meyering.net>
20132
20133         Merge changes from Coreutils.
20134         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
20135         to be const, in order to avoid warnings.
20136         (obstack_room): Likewise.
20137         (obstack_empty_p): Likewise.
20138
20139 2003-03-14  Bruno Haible  <bruno@clisp.org>
20140
20141         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
20142         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
20143
20144 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20145
20146         Merge changes from Bison.
20147         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
20148         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
20149         when compiling Bison 1.875's `bitset bset = obstack_alloc
20150         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
20151         * lib/hash.c: Include <stdbool.h> unconditionally.
20152
20153 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20154
20155         * m4/onceonly.m4 (m4_quote): New macro.
20156         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
20157         Quote AC_FOREACH variable-expansions properly.
20158
20159 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20160
20161         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
20162
20163 2003-03-09  Paul Eggert  <eggert@twinsun.com>
20164
20165         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
20166         Reported by Bruce Becker; see:
20167         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
20168
20169 2003-03-03  Paul Eggert  <eggert@twinsun.com>
20170             Bruno Haible  <bruno@clisp.org>
20171
20172         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
20173         Reported by John Hughes, see
20174         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
20175
20176 2003-02-20  Bruno Haible  <bruno@clisp.org>
20177
20178         * MODULES.html.sh (func_all_modules): Add poll.
20179
20180 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20181
20182         * modules/poll: New file.
20183
20184 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20185
20186         * lib/poll_.h: New file.
20187         * lib/poll.c: New file.
20188
20189 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20190
20191         * m4/poll.m4: New file.
20192
20193 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20194
20195         * modules/mathl: New file.
20196
20197 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20198
20199         * lib/mathl.h: New file.
20200         * lib/acosl.c: New file.
20201         * lib/asinl.c: New file.
20202         * lib/atanl.c: New file.
20203         * lib/ceill.c: New file.
20204         * lib/cosl.c: New file.
20205         * lib/expl.c: New file.
20206         * lib/floorl.c: New file.
20207         * lib/frexpl.c: New file.
20208         * lib/ldexpl.c: New file.
20209         * lib/logl.c: New file.
20210         * lib/sincosl.c: New file.
20211         * lib/sinl.c: New file.
20212         * lib/sqrtl.c: New file.
20213         * lib/tanl.c: New file.
20214         * lib/trigl.c: New file.
20215         * lib/trigl.h: New file.
20216
20217 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20218
20219         * m4/mathl.m4: New file.
20220
20221 2003-02-18  Bruno Haible  <bruno@clisp.org>
20222
20223         * MODULES.html.sh (func_all_modules): Add mathl.
20224
20225 2003-02-17  Bruno Haible  <bruno@clisp.org>
20226
20227         * modules/mkdtemp: New module.
20228         * MODULES.html.sh (func_all_modules): Add it.
20229
20230 2003-02-17  Bruno Haible  <bruno@clisp.org>
20231
20232         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
20233
20234 2003-02-17  Bruno Haible  <bruno@clisp.org>
20235
20236         * lib/mkdtemp.h: New file, from GNU gettext.
20237         * lib/mkdtemp.c: New file, from GNU gettext.
20238
20239 2003-02-02  Jim Meyering  <jim@meyering.net>
20240
20241         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
20242         e.g. glibc-2.2.93.
20243
20244 2003-01-31  Bruno Haible  <bruno@clisp.org>
20245
20246         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
20247         'rpl_rename'.
20248         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
20249         'rpl_strnlen'.
20250         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
20251         'rpl_strtod'.
20252         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
20253         'rpl_utime'.
20254
20255 2003-01-31  Bruno Haible  <bruno@clisp.org>
20256
20257         * lib/rename.c: #undef rename before defining rpl_rename.
20258         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
20259
20260 2003-01-30  Bruno Haible  <bruno@clisp.org>
20261
20262         * modules/vasnprintf, modules/vasprintf: New modules.
20263         * MODULES.html.sh (func_all_modules): Add them.
20264
20265 2003-01-30  Bruno Haible  <bruno@clisp.org>
20266
20267         * m4/signed.m4: New file, from GNU gettext.
20268         * m4/longdouble.m4: New file, from GNU gettext.
20269         * m4/wchar_t.m4: New file, from GNU gettext.
20270         * m4/wint_t.m4: New file, from GNU gettext.
20271         * m4/vasnprintf.m4: New file.
20272         * m4/vasprintf.m4: New file.
20273
20274 2003-01-30  Bruno Haible  <bruno@clisp.org>
20275
20276         * lib/printf-args.h: New file, from GNU gettext.
20277         * lib/printf-args.c: New file, from GNU gettext.
20278         * lib/printf-parse.h: New file, from GNU gettext.
20279         * lib/printf-parse.c: New file, from GNU gettext.
20280         * lib/vasnprintf.h: New file, from GNU gettext.
20281         * lib/vasnprintf.c: New file, from GNU gettext.
20282         * lib/asnprintf.c: New file, from GNU gettext.
20283         * lib/vasprintf.h: New file, from GNU gettext with modifications.
20284         * lib/vasprintf.c: New file, from GNU gettext.
20285         * lib/asprintf.c: New file, from GNU gettext.
20286
20287 2003-01-29  Bruno Haible  <bruno@clisp.org>
20288
20289         * modules/stpncpy: New module.
20290         * MODULES.html.sh (func_all_modules): Add it.
20291
20292 2003-01-29  Bruno Haible  <bruno@clisp.org>
20293
20294         * m4/stpncpy.m4: New file.
20295
20296 2003-01-29  Bruno Haible  <bruno@clisp.org>
20297
20298         * lib/stpncpy.h: New file, from GNU gettext with modifications.
20299         * lib/stpncpy.c: New file, from GNU gettext with modifications.
20300
20301 2003-01-28  Bruno Haible  <bruno@clisp.org>
20302
20303         * modules/c-ctype: New module.
20304         * MODULES.html.sh (func_all_modules): Add it.
20305
20306 2003-01-28  Bruno Haible  <bruno@clisp.org>
20307
20308         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
20309         Paul Eggert.
20310         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
20311         Paul Eggert.
20312
20313 2003-01-27  Bruno Haible  <bruno@clisp.org>
20314
20315         * modules/xsetenv: New module.
20316         * MODULES.html.sh (func_all_modules): Add it.
20317
20318 2003-01-27  Bruno Haible  <bruno@clisp.org>
20319
20320         * lib/xsetenv.h: New file, from GNU gettext.
20321         * lib/xsetenv.c: New file, from GNU gettext.
20322
20323 2003-01-23  Jim Meyering  <jim@meyering.net>
20324
20325         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20326         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20327
20328 2003-01-23  Bruno Haible  <bruno@clisp.org>
20329
20330         * modules/minmax: New module.
20331         * MODULES.html.sh (func_all_modules): Add it.
20332
20333 2003-01-23  Bruno Haible  <bruno@clisp.org>
20334
20335         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20336         Eggert.
20337
20338 2003-01-22  Bruno Haible  <bruno@clisp.org>
20339
20340         * modules/exit: New module.
20341         * MODULES.html.sh (func_all_modules): Add it.
20342
20343 2003-01-22  Bruno Haible  <bruno@clisp.org>
20344
20345         * lib/exit.h: New file, from GNU gettext.
20346
20347 2003-01-19  Bruno Haible  <bruno@clisp.org>
20348
20349         * gnulib-tool: Recognize option --extract-maintainer.
20350         (func_get_maintainer): New function.
20351         * modules/*: Add Maintainer entry.
20352
20353 2003-01-16  Jim Meyering  <jim@meyering.net>
20354
20355         * m4/regex.m4: The `regex' struct is both input and output.
20356         Initialize it before each use.  Patch by Tim Waugh.
20357
20358 2003-01-16  Bruno Haible  <bruno@clisp.org>
20359
20360         * MODULES.html.sh: Add a table of contents. Add the module name as
20361         leftmost column. Add hyperlinks.
20362
20363 2003-01-15  Bruno Haible  <bruno@clisp.org>
20364
20365         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20366
20367 2003-01-15  Bruno Haible  <bruno@clisp.org>
20368
20369         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20370         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20371         suffix.
20372
20373 2003-01-15  Bruno Haible  <bruno@clisp.org>
20374
20375         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20376
20377 2003-01-15  Bruno Haible  <bruno@clisp.org>
20378
20379         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20380         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20381
20382 2003-01-14  Jim Meyering  <jim@meyering.net>
20383
20384         * lib/same.c (same_name): Tweak a comment.
20385
20386 2003-01-14  Bruno Haible  <bruno@clisp.org>
20387
20388         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20389         when a string comparison is sufficient.
20390
20391 2003-01-14  Bruno Haible  <bruno@clisp.org>
20392
20393         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20394         'unsigned int'.
20395
20396 2003-01-14  Bruno Haible  <bruno@clisp.org>
20397
20398         * lib/hash-pjw.c: Add comment about low quality of this function.
20399
20400 2003-01-13  Bruno Haible  <bruno@clisp.org>
20401
20402         * modules/stpcpy: Distribute lib/stpcpy.h.
20403         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20404
20405 2003-01-13  Bruno Haible  <bruno@clisp.org>
20406
20407         * modules/*: Add a description.
20408         * modules/strpbrk: Fix Makefile.am snippet.
20409         * modules/strtoimax: Fix dependencies.
20410         * modules/strtoumax: Likewise.
20411
20412 2003-01-13  Bruno Haible  <bruno@clisp.org>
20413
20414         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20415         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20416         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20417
20418 2003-01-13  Bruno Haible  <bruno@clisp.org>
20419
20420         * gnulib-tool (func_create_testdir): Store config/* files in the main
20421         directory.
20422         * config.rpath: Move to ...
20423         * config/config.rpath: ... here.
20424         * modules/gettext: Contains config/config.rpath, not config.rpath.
20425         * modules/iconv: Likewise.
20426
20427 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20428
20429         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20430         to avoid collisions with libcurses and libreadline.
20431
20432         * m4/getstr.m4: Remove.
20433         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20434
20435 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20436
20437         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20438         to avoid collisions with libcurses and libreadline.
20439
20440         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20441         * lib/getstr.h, getstr.c: Remove.
20442         * lib/getline.c: Include "getline.h", to check interface.
20443         Move body of old getstr.c here: this defines MIN_CHUNK and
20444         declares getdelim2, which is renamed from getstr.
20445         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20446
20447         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20448         All uses changed.
20449         * lib/linebuffer.h: Likewise.
20450         (readline): Remove backward-compatibility macro.
20451
20452 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20453
20454         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20455         to avoid collisions with libcurses and libreadline.
20456         * getstr: Remove.
20457         * MODULES.html.sh: Remove getstr.
20458         * modules/getline: Depend on unlocked-io, not getstr.
20459
20460 2003-01-12  Jim Meyering  <jim@meyering.net>
20461
20462         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20463
20464 2003-01-10  Bruno Haible  <bruno@clisp.org>
20465
20466         * modules/alloca: Change Makefile.am requirements. Simplify Include
20467         requirements. Add lib/alloca_.h to file list.
20468
20469 2003-01-10  Bruno Haible  <bruno@clisp.org>
20470
20471         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20472
20473 2003-01-10  Bruno Haible  <bruno@clisp.org>
20474
20475         * lib/alloca_.h: New file.
20476         * lib/getdate.y: Unconditionally include alloca.h.
20477         * lib/makepath.c: Likewise.
20478         * lib/setenv.c: Likewise.
20479         * lib/userspec.c: Likewise.
20480
20481 2003-01-09  Karl Berry  <karl@gnu.org>
20482
20483         * MODULES.html.sh: include `dirname $0` in PATH, to find
20484         gnulib-tool.
20485
20486 2003-01-09  Bruno Haible  <bruno@clisp.org>
20487
20488         * modules/stdbool: Change configure.ac, Makefile.am requirements.
20489         Simplify Include requirements. Add lib/stdbool.h.in to file list.
20490
20491 2003-01-09  Bruno Haible  <bruno@clisp.org>
20492
20493         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
20494
20495 2003-01-09  Bruno Haible  <bruno@clisp.org>
20496
20497         * lib/stdbool.h.in: New file.
20498
20499 2003-01-09  Bruno Haible  <bruno@clisp.org>
20500
20501         * gnulib-tool (func_all_modules): Ignore files ending in ~.
20502         * MODULES.html.sh: Likewise.
20503
20504 2003-01-08  Jim Meyering  <jim@meyering.net>
20505
20506         * lib/full-write.c: Undefine and define-away `const' after inclusion
20507         of errno.h, not before.  Suggestion from Bruno Haible.
20508
20509 2003-01-08  Bruno Haible  <bruno@clisp.org>
20510
20511         * modules/full-read: Depend on full-write.
20512
20513 2003-01-08  Bruno Haible  <bruno@clisp.org>
20514
20515         * lib/safe-read.c: Include specification header first, to ensure its
20516         selfcontainedness.
20517         * lib/full-write.c: Likewise.
20518
20519 2003-01-07  Jim Meyering  <jim@meyering.net>
20520
20521         * lib/full-write.c: Rework so that it may serve to define full_read,
20522         too.
20523         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
20524
20525 2003-01-07  Bruno Haible  <bruno@clisp.org>
20526
20527         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20528         <inttypes.h>.
20529         * lib/xstrtol.h: Likewise.
20530         * lib/xstrtoimax.c: Likewise.
20531         * lib/xstrtoumax.c: Likewise.
20532         * lib/human.h: Likewise.
20533
20534         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20535         on systems that have <inttypes.h> but not <stdint.h>.
20536
20537 2003-01-07  Bruno Haible  <bruno@clisp.org>
20538
20539         * MODULES.html.sh: Add copyright notice.
20540         (missed_files): Omit CVS directory entries.
20541         (func_module): Make it work with sed-3.02.
20542         * MODULES.txt: Remove file.
20543
20544 2003-01-06  Jim Meyering  <jim@meyering.net>
20545
20546         * lib/version-etc.c: Update year in translatable copyright string.
20547
20548 2003-01-03  Karl Berry  <karl@gnu.org>
20549
20550         * config/config.{guess,sub}: update from prep.
20551
20552 2003-01-02  Karl Berry  <karl@gnu.org>
20553
20554         * doc/COPYING.DOC: belatedly updated to 1.2.
20555
20556 2003-01-01  Karl Berry  <karl@gnu.org>
20557
20558         * gnulib-tool (func_verify_module): report module name $module in
20559         error message, not $1.
20560         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20561         be created, only if it doesn't exist.
20562         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20563
20564 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20565
20566         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20567
20568 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20569
20570         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20571         memcmp if strcoll doesn't work.
20572
20573 2002-12-31  Bruno Haible  <bruno@clisp.org>
20574
20575         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20576         nonempty.
20577
20578 2002-12-31  Bruno Haible  <bruno@clisp.org>
20579
20580         * lib/memcoll.c (STRCOLL): New macro.
20581         (memcoll): Use it.
20582
20583 2002-12-31  Bruno Haible  <bruno@clisp.org>
20584
20585         * lib/localcharset.h: New file.
20586         * lib/localcharset.c: Include it.
20587         * lib/unicodeio.c: Likewise.
20588
20589 2002-12-31  Bruno Haible  <bruno@clisp.org>
20590
20591         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20592         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20593
20594 2002-12-31  Bruno Haible  <bruno@clisp.org>
20595
20596         * lib/getline.h: Include <stddef.h>, for size_t.
20597
20598         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20599         * lib/unicodeio.c: Don't include <stddef.h>.
20600
20601 2002-12-31  Bruno Haible  <bruno@clisp.org>
20602
20603         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20604         HAVE_TM_ZONE.
20605
20606 2002-12-24  Karl Berry  <karl@gnu.org>
20607
20608         * config/config.guess: update from prep.
20609
20610 2002-12-24  Bruno Haible  <bruno@clisp.org>
20611
20612         General infrasructure.
20613         * m4/README: Rewritten.
20614         * m4/onceonly.m4: New file.
20615         * m4/onceonly_2_57.m4: New file.
20616
20617         Module atexit.
20618         * m4/atexit.m4: New file.
20619
20620         Module strtod.
20621         * m4/strtod.m4: New file.
20622
20623         Module strtol.
20624         * m4/strtol.m4: New file.
20625
20626         Module strtoul.
20627         * m4/strtoul.m4: New file.
20628
20629         Module memchr.
20630         * m4/memchr.m4: New file.
20631
20632         Module memcmp.
20633         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20634         (jm_FUNC_MEMCMP): Invoke it.
20635
20636         Module memcpy.
20637         * m4/memcpy.m4: New file.
20638
20639         Module memmove.
20640         * m4/memmove.m4: New file.
20641
20642         Module memset.
20643         * m4/memset.m4: New file.
20644
20645         Module strcspn.
20646         * m4/strcspn.m4: New file.
20647
20648         Module strpbrk.
20649         * m4/strpbrk.m4: New file.
20650
20651         Module strstr.
20652         * m4/strstr.m4: New file.
20653
20654         Module strerror.
20655         * m4/strerror.m4: New file.
20656
20657         Module mktime.
20658         * m4/mktime.m4: Renamed from jm-mktime.m4.
20659         (gl_PREREQ_MKTIME): New macro.
20660         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20661
20662         Module malloc.
20663         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20664         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20665         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20666
20667         Module realloc.
20668         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20669         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20670         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20671
20672         Module strftime.
20673         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20674         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20675         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20676         gl_TM_GMTOFF.
20677         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20678
20679         Module xalloc.
20680         * m4/xalloc.m4: New file.
20681
20682         Module alloca.
20683         * m4/alloca.m4: New file.
20684
20685         Module putenv.
20686         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20687         (jm_FUNC_PUTENV): Invoke it.
20688
20689         Module setenv.
20690         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20691         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20692         when invoked twice.
20693         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20694         gt_FUNC_SETENV.
20695
20696         Module memrchr.
20697         * m4/memrchr.m4: New file.
20698
20699         Module stpcpy.
20700         * m4/stpcpy.m4: New file.
20701
20702         Module strcase.
20703         * m4/strcase.m4: New file.
20704
20705         Module strdup.
20706         * m4/strdup.m4: New file.
20707
20708         Module strnlen.
20709         * m4/strnlen.m4: New file.
20710
20711         Module strndup.
20712         * m4/strndup.m4: New file.
20713
20714         Module xstrtod.
20715         * m4/xstrtod.m4: New file.
20716
20717         Module xstrtol.
20718         * m4/xstrtol.m4: New file.
20719
20720         Module getdate.
20721         * m4/getdate.m4: New file.
20722
20723         Module unlocked-io.
20724         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20725         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20726         * m4/jm-glibc-io.m4n: Remove file.
20727
20728         Module long-options.
20729         * m4/long-options.m4: New file.
20730
20731         Module md5.
20732         * m4/md5.m4: New file.
20733
20734         Module sha.
20735         * m4/sha.m4: New file.
20736
20737         Module getstr.
20738         * m4/getstr.m4: New file.
20739
20740         Module getline.
20741         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20742         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20743         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20744         simply getline. Infoke gl_PREREQ_GETLINE.
20745
20746         Module obstack.
20747         * m4/obstack.m4: New file.
20748
20749         Module hash.
20750         * m4/hash.m4: New file.
20751
20752         Module readtokens.
20753         * m4/readtokens.m4: New file.
20754
20755         Module strverscmp.
20756         * m4/strverscmp.m4: New file.
20757
20758         Module stdbool.
20759         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20760         OSF/1.
20761
20762         Module strtoll.
20763         * m4/strtoll.m4: New file.
20764
20765         Module strtoull.
20766         * m4/strtoull.m4: New file.
20767
20768         Module strtoimax.
20769         * m4/strtoimax.m4: New file.
20770
20771         Module strtoumax.
20772         * m4/strtoumax.m4: New file.
20773
20774         Module xstrtoimax.
20775         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20776         jm_AC_PREREQ_XSTRTOIMAX.
20777         Moved the strtol prerequisites to strtol.m4.
20778         Moved the strtoll prerequisites to strtoll.m4.
20779         Moved the strtoimax prerequisites to strtoimax.m4.
20780
20781         Module xstrtoumax.
20782         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20783         jm_AC_PREREQ_XSTRTOUMAX.
20784         Moved the strtoul prerequisites to strtoul.m4.
20785         Moved the strtoull prerequisites to strtoull.m4.
20786         Moved the strtoumax prerequisites to strtoumax.m4.
20787
20788         Module chown.
20789         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20790         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20791
20792         Module dup2.
20793         * m4/dup2.m4: New file.
20794
20795         Module ftruncate.
20796         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
20797         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
20798
20799         Module getgroups.
20800         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
20801         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
20802
20803         Module gettimeofday.
20804         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
20805         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
20806         gl_PREREQ_GETTIMEOFDAY.
20807
20808         Module mkdir.
20809         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
20810         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
20811
20812         Module mkstemp.
20813         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
20814         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
20815         jm_AC_TYPE_UINTMAX_T.
20816         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
20817
20818         Module stat.
20819         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
20820         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
20821
20822         Module lstat.
20823         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
20824         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
20825
20826         Module timespec.
20827         * m4/timespec.m4 (gl_TIMESPEC): New macro.
20828         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
20829         * m4/st_mtim.m4: Indentation.
20830
20831         Module nanosleep.
20832         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
20833         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
20834         gl_PREREQ_NANOSLEEP.
20835
20836         Module regex.
20837         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
20838         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
20839         (gl_REGEX): New macro.
20840
20841         Module rename.
20842         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
20843         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
20844
20845         Module rmdir.
20846         * m4/rmdir.m4: New file.
20847
20848         Module utime.
20849         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
20850         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
20851         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
20852
20853         Module dirname.
20854         * m4/dirname.m4: New file.
20855
20856         Module getopt.
20857         * m4/getopt.m4: New file.
20858
20859         Module unistd-safer.
20860         * m4/unistd-safer.m4: New file.
20861
20862         Module fnmatch.
20863         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
20864         declaration.
20865         (gl_PREREQ_FNMATCH_EXTRA): New macro.
20866         (gl_FUNC_FNMATCH_POSIX): New macro.
20867         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
20868         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
20869         simply fnmatch.
20870
20871         Module exclude.
20872         * m4/exclude.m4: New file.
20873
20874         Module human.
20875         * m4/human.m4: New file.
20876
20877         Module acl.
20878         * m4/acl.m4: Nop.
20879
20880         Module backupfile.
20881         * m4/backupfile.m4: New file.
20882         * m4/d-ino.m4: Indentation.
20883
20884         Module fsusage.
20885         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
20886         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
20887         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
20888
20889         Module dirfd.
20890         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
20891         requirements.
20892
20893         Module euidaccess.
20894         * m4/euidaccess.m4: New file.
20895
20896         Module file-type.
20897         * m4/file-type.m4: New file.
20898
20899         Module fileblocks.
20900         * m4/fileblocks.m4: New file.
20901
20902         Module filemode.
20903         * m4/filemode.m4: New file.
20904
20905         Module isdir.
20906         * m4/isdir.m4: New file.
20907
20908         Module lchown.
20909         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
20910         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
20911
20912         Module makepath.
20913         * m4/makepath.m4: New file.
20914
20915         Module modechange.
20916         * m4/modechange.m4: New file.
20917
20918         Module mountlist.
20919         * m4/mountlist.m4: New file.
20920         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
20921         Indentation.
20922
20923         Module path-concat.
20924         * m4/path-concat.m4: New file.
20925
20926         Module pathmax.
20927         * m4/pathmax.m4: New file.
20928
20929         Module same.
20930         * m4/same.m4: New file.
20931
20932         Module save-cwd.
20933         * m4/save-cwd.m4: New file.
20934
20935         Module savedir.
20936         * m4/savedir.m4: New file.
20937
20938         Module xgetcwd.
20939         * m4/xgetcwd.m4: New file.
20940         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
20941
20942         Module xreadlink.
20943         * m4/xreadlink.m4: New file.
20944
20945         Module safe-read.
20946         * m4/safe-read.m4: New file.
20947
20948         Module safe-write.
20949         * m4/safe-write.m4: New file.
20950
20951         Module closeout.
20952         * m4/closeout.m4: New file.
20953
20954         Module stdio-safer.
20955         * m4/stdio-safer.m4: New file.
20956
20957         Module getpass.
20958         * m4/getpass.m4: New file.
20959
20960         Module getugroups.
20961         * m4/getugroups.m4: New file.
20962
20963         Module group-member.
20964         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
20965         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
20966
20967         Module idcache.
20968         * m4/idcache.m4: New file.
20969
20970         Module userspec.
20971         * m4/userspec.m4: New file.
20972
20973         Module gettime.
20974         * m4/clock_time.m4: New file.
20975         * m4/gettime.m4: New file.
20976
20977         Module settime.
20978         * m4/settime.m4: New file.
20979
20980         Module posixtm.
20981         * m4/posixtm.m4: New file.
20982
20983         Module gethostname.
20984         * m4/gethostname.m4: New file.
20985
20986         Module canon-host.
20987         * m4/canon-host.m4: New file.
20988
20989         Module gettext.
20990         * m4/codeset.m4: New file, from gettext-0.11.5.
20991         * m4/gettext.m4: New file, from gettext-0.11.5.
20992         * m4/glibc21.m4: New file, from gettext-0.11.5.
20993         * m4/iconv.m4: New file, from gettext-0.11.5.
20994         * m4/intdiv0.m4: New file, from gettext-0.11.5.
20995         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
20996         * m4/inttypes.m4: New file, from gettext-0.11.5.
20997         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
20998         * m4/isc-posix.m4: New file, from gettext-0.11.5.
20999         * m4/lcmessage.m4: New file, from gettext-0.11.5.
21000         * m4/lib-ld.m4: New file, from gettext-0.11.5.
21001         * m4/lib-link.m4: New file, from gettext-0.11.5.
21002         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
21003         * m4/progtest.m4: New file, from gettext-0.11.5.
21004         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
21005         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
21006         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
21007
21008         Module localcharset.
21009         * m4/localcharset.m4: New file.
21010
21011         Module hard-locale.
21012         * m4/hard-locale.m4: New file.
21013
21014         Module mbswidth.
21015         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
21016         onceonly macros.
21017         * m4/mbrtowc.m4: Add comment.
21018
21019         Module memcasecmp.
21020         * m4/memcasecmp.m4: New file.
21021
21022         Module memcoll.
21023         * m4/memcoll.m4: New file.
21024
21025         Module unicodeio.
21026         * m4/unicodeio.m4: New file.
21027
21028         Module rpmatch.
21029         * m4/rpmatch.m4: New file.
21030
21031         Module yesno.
21032         * m4/yesno.m4: New file.
21033
21034         Module exitfail.
21035         * m4/exitfail.m4: New file.
21036
21037         Module c-stack.
21038         * m4/c-stack.m4 (gl_C_STACK): New macro.
21039         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
21040
21041         Module error.
21042         * m4/error.m4 (gl_ERROR): New macro.
21043         (jm_PREREQ_ERROR): Use onceonly macros.
21044
21045         Module fatal.
21046         * m4/fatal.m4: New file.
21047
21048         Module getloadavg.
21049         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21050         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21051
21052         Module getpagesize.
21053         * m4/getpagesize.m4: New file.
21054
21055         Module getusershell.
21056         * m4/getusershell.m4: New file.
21057
21058         Module physmem.
21059         * m4/physmem.m4: New file.
21060
21061         Module posixver.
21062         * m4/posixver.m4: New file.
21063
21064         Module quotearg.
21065         * m4/quotearg.m4: New file.
21066
21067         Module quote.
21068         * m4/quote.m4: New file.
21069
21070         Module readutmp.
21071         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21072
21073         Module sig2str.
21074         * m4/sig2str.m4: New file.
21075
21076         Other.
21077         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21078         ulonglong.m4.
21079         * m4/intmax_t.m4: New file.
21080         * m4/d-type.m4: Indentation.
21081         * m4/jm-macros.m4: Update.
21082         * m4/prereq.m4 (jm_PREREQ): Update.
21083         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
21084         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
21085         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
21086         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
21087         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
21088         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
21089         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
21090         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
21091         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
21092         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
21093         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
21094         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
21095         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
21096         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
21097         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
21098         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
21099         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
21100         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
21101         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
21102
21103 2002-12-24  Bruno Haible  <bruno@clisp.org>
21104
21105         * MODULES.txt: Update according to m4/ changes.
21106
21107         Module gettext.
21108         * config.rpath: New file, from gettext-0.11.5.
21109
21110         * modules/*: New module descriptions.
21111         * gnulib-tool: New file.
21112         * MODULES.html.sh: New file.
21113
21114 2002-12-21  Karl Berry  <karl@gnu.org>
21115
21116         * doc/fdl.texi: update to version 1.2.
21117
21118 2002-12-19  Karl Berry  <karl@gnu.org>
21119
21120         * config/config.guess: update from prep.
21121
21122 2002-12-18  Bruno Haible  <bruno@clisp.org>
21123
21124         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
21125         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
21126
21127 2002-12-17  Bruno Haible  <bruno@clisp.org>
21128
21129         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
21130         stdlib.h, string.h.
21131
21132 2002-12-17  Bruno Haible  <bruno@clisp.org>
21133
21134         * lib/canon-host.c (strdup): Remove unused declaration.
21135
21136         * lib/fsusage.c: Include full_read.h.
21137         (get_fs_usage): Use full_read instead of safe_read.
21138
21139         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
21140
21141 2002-12-12  Karl Berry  <karl@gnu.org>
21142
21143         * config/config.guess: update from prep.
21144
21145 2002-12-11  Bruno Haible  <bruno@clisp.org>
21146
21147         * m4/setenv.m4: New file, from gettext-0.11.5.
21148
21149 2002-12-11  Bruno Haible  <bruno@clisp.org>
21150
21151         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
21152         not unsetenv().
21153         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
21154         modifications:
21155
21156         2002-12-11  Bruno Haible  <bruno@clisp.org>
21157
21158                 * setenv.c (alloca): Fall back to malloc.
21159                 (freea): New macro.
21160                 (setenv): Use freea() to free memory allocated with alloca().
21161
21162         2002-11-13  Bruno Haible  <bruno@clisp.org>
21163
21164                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
21165                 function declarations.
21166                 * unsetenv.c (unsetenv): Likewise.
21167
21168         2002-03-04  Bruno Haible  <bruno@clisp.org>
21169
21170                 Portability to AIX 4.3.3.
21171                 * unsetenv.c: New file, extracted from setenv.c.
21172                 * setenv.c: Move the unsetenv() function to unsetenv.c.
21173
21174         2001-12-20  Bruno Haible  <bruno@clisp.org>
21175
21176                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
21177                 use malloc instead. For SunOS 4.
21178
21179         2001-12-11  Bruno Haible  <bruno@clisp.org>
21180
21181                 * setenv.c: Declare alloca.
21182                 (compar_fn_t): New typedef.
21183                 (KNOWN_VALUE, STORE_VALUE): Use it.
21184
21185         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
21186         setenv.h.
21187
21188 2002-12-10  Paul Eggert  <eggert@twinsun.com>
21189
21190         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
21191         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
21192         Choose values that are less likely to collide with system fnmatch
21193         options.
21194         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
21195         defined (e.g., a pure POSIX system).
21196         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
21197         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
21198
21199 2002-12-06  Paul Eggert  <eggert@twinsun.com>
21200
21201         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
21202         a pain in practice to deal with generated m4 files.  This change
21203         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
21204
21205         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
21206         and jm-glibc-io.m4, as they are no longer a special case.
21207         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
21208         kludge and the auto-generation stuff.  Check only whether the
21209         functions are declared, not whether they exist, since older hosts
21210         that don't declare the functions can't use the optimization anyway.
21211
21212 2002-12-06  Jim Meyering  <jim@meyering.net>
21213
21214         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
21215
21216         Merge in changes from libc's misc/error.c, in preparation
21217         for the merge of gnulib's changes back into libc.
21218
21219         * lib/error.c (_): Define only if not already defined.
21220         Move definition to follow all #include directives.
21221         Include unlocked-io.h only if !_LIBC.
21222         [_LIBC]: Include <libio/libioP.h>.
21223         [USE_IN_LIBIO]: Include <libio/iolibio.h>
21224         (fflush): Tweak definition to use INTUSE.
21225         (putc): Define.
21226
21227 2002-12-05  Paul Eggert  <eggert@twinsun.com>
21228
21229         * lib/alloca.c [defined emacs]: Include "lisp.h".
21230         (xalloc_die) [defined emacs]: New macro.
21231         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
21232         [! defined emacs]: Include <xalloc.h>.
21233         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
21234         (pointer): Typedef to POINTER_TYPE *.
21235         (malloc): Remove decl; we now always use xmalloc.
21236         (alloca): Use old-style definition, since Emacs needs this.
21237         Check for arithmetic overflow when computing combined size.
21238
21239 2002-12-04  Paul Eggert  <eggert@twinsun.com>
21240
21241         Do not generate unlocked-io.h automatically, since it's easier to
21242         maintain it by hand.
21243
21244         * lib/unlocked-io.h: New file, from GNU diffutils,
21245         but with proper copyright notice and attribution.
21246         * lib/gen-uio: Remove.
21247         * lib/Makefile.am: Add copyright notice.
21248         (libfetish_a_SOURCES): Add unlocked-io.h.
21249         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
21250         (DISTCLEANFILES, io_functions): Remove macros.
21251         (EXTRA_DIST): Remove gen_uio.
21252         (unlocked-io.h): Remove rule.
21253
21254 2002-12-04  Jim Meyering  <jim@meyering.net>
21255
21256         Reflect the fact that stat.c and lstat.c are no longer generated.
21257         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
21258         (DISTCLEANFILES): Likewise.
21259         (EXTRA_DIST): Likewise.
21260         (all_local): Don't depend on stat.c or lstat.c.
21261         (stat.c, lstat.c): Remove rules.
21262         (EXTRA_DIST): Remove xstat.in.
21263
21264         * lib/xstat.in: Remove file.  Contents moved into stat.c.
21265         * lib/stat.c: New file.  Contents mostly from xstat.in.
21266         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
21267         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
21268
21269         * lib/safe-read.c: Rework so that it may serve to define safe_write,
21270         too.
21271         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
21272
21273 2002-12-03  Jim Meyering  <jim@meyering.net>
21274
21275         * lib/safe-read.c, safe-write.c: Change variable names and comments,
21276         but not semantics, to minimize the differences between these two files.
21277         (safe_read): Change comment to mention SAFE_READ_ERROR.
21278
21279         * lib/safe-read.c (IS_EINTR): Define.
21280         (safe_read): Use IS_EINTR in place of in-function cpp directives.
21281
21282 2002-12-02  Jim Meyering  <jim@meyering.net>
21283
21284         * lib/safe-read.c (EINTR): Define.
21285         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21286         (INT_MAX): Provide fallback.
21287         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
21288
21289         * lib/safe-read.h (SAFE_READ_ERROR): Define.
21290
21291 2002-12-02  Bruno Haible  <bruno@clisp.org>
21292
21293         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
21294         Define, taken from safe-read.c.
21295         (INT_MAX): Provide fallback.
21296         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21297         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
21298
21299         * lib/safe-read.c (EINTR): Remove definition.
21300         (safe_read): Don't use EINTR if it is absent.
21301
21302 2002-12-01  Jim Meyering  <jim@meyering.net>
21303
21304         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
21305         zero.
21306         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
21307
21308 2002-11-27  Paul Eggert  <eggert@twinsun.com>
21309
21310         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
21311         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
21312         with `if (! (value < limit)) abort ();', for readability.
21313
21314 2002-11-26  Karl Berry  <karl@gnu.org>
21315
21316         * lib/strdup.c: copy from libc again, with jim's ok.
21317         * lib/.cppi-disable: re-add strdup.c
21318
21319 2002-11-25  Karl Berry  <karl@gnu.org>
21320
21321         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21322         instead of "strtol.c".
21323
21324 2002-11-25  Karl Berry  <karl@gnu.org>
21325
21326         * config/install-sh: update from automake for variable quoting, $0 in
21327         error msgs, etc.
21328
21329         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21330         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21331         entry.
21332
21333 2002-11-25  Jim Meyering  <jim@meyering.net>
21334
21335         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21336
21337 2002-11-24  Karl Berry  <karl@gnu.org>
21338
21339         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21340         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21341
21342 2002-11-24  Jim Meyering  <jim@meyering.net>
21343
21344         Update from coreutils:
21345
21346         * lib/mktime.c: Merge in changes from libc.
21347
21348         Avoid a link-time failure on some Linux systems.
21349         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21350         (otherwise).
21351         (__mon_yday): Declare with the STATIC attribute.
21352         (__mktime_internal): Likewise.
21353         Based on a report from Greg Schafer.
21354
21355 2002-11-23  Jim Meyering  <jim@meyering.net>
21356
21357         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21358         Use `unsigned', not `int', as type of index.
21359
21360         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21361
21362         * lib/fsusage.c: Remove unneeded parentheses around operands of
21363         `defined'.
21364
21365 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21366
21367         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21368         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21369         so that we can be included first.
21370         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21371         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21372         No need to include stddef.h or sys/types.h any more.
21373         Surround local include files with "", not "<>".
21374         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21375         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21376         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21377         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21378         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21379         (ISPRINT): Remove; no longer needed now that we assume C89.
21380
21381         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21382         Preserve errno.
21383
21384         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21385         quotearg_char): Use SIZE_MAX rather than
21386         (size_t) -1 when we are talking about "infinity".
21387
21388         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21389
21390 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21391
21392         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21393         hint that one should use `if (! x) abort ();' rather than `assert
21394         (x);', and anyway it's one less thing to worry about configuring.
21395         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21396         hash_rehash, hash_insert): Use abort rather than assert.
21397
21398 2002-11-22  Bruno Haible  <bruno@clisp.org>
21399
21400         * lib/safe-read.h: Assume C89. Add comments.
21401         (safe_read): Change return type to size_t.
21402         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21403         byte counts > SSIZE_MAX correctly.
21404         * lib/safe-write.h: New file.
21405         * lib/safe-write.c: New file.
21406         * lib/full-read.h: New file.
21407         * lib/full-read.c: New file.
21408         * lib/full-write.h: Assume C89. Add comments.
21409         * lib/full-write.c: Include safe-write.h.
21410         (full_write): Rewritten to use safe_write.
21411         Suggested by Jim Meyering and Paul Eggert.
21412
21413 2002-11-21  Jim Meyering  <jim@meyering.net>
21414
21415         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21416
21417         Merge in changes from the coreutils.
21418
21419         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21420         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21421         <stdint.h>.
21422         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21423         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21424         int.  Work more efficiently if X is the same width as uintmax_t.
21425         Do not compare X to -1, to avoid bogus compiler warning.
21426         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21427         Don't assume that f_frsize and f_bsize are the same type.
21428
21429         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21430         warning on FreeBSD.
21431
21432         * lib/makepath.c (make_path): Restore umask *before* creating the final
21433         component.
21434         (make_path): Minor reformatting.
21435
21436         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21437         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21438         HAVE_MALLOC/HAVE_REALLOC.
21439
21440         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21441         dummy ones.  At least on GNU/Linux systems, `auto' means something
21442         else.
21443         From Michael Stone.
21444
21445 2002-11-21  Bruno Haible  <bruno@clisp.org>
21446
21447         Remove case insensitive option matching.
21448         * lib/argmatch.h (argcasematch): Remove declaration.
21449         (ARGCASEMATCH): Remove macro.
21450         (__xargmatch_internal): Remove case_sensitive argument.
21451         (XARGMATCH): Update.
21452         (XARGCASEMATCH): Remove macro.
21453         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21454         case_sensitive argument.
21455         (argcasematch): Remove function.
21456         (__xargmatch_internal): Remove case_sensitive argument.
21457         (main): Use XARGMATCH instead of XARGCASEMATCH.
21458
21459         * lib/xmalloc.c: Change compile-time error message. Add comment about
21460         required autoconf version.
21461
21462 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21463
21464         Merge argmatch cleanups from Bison.  Assume C89.
21465
21466         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21467         Include stdlib.h, for EXIT_FAILURE.
21468         Always include <string.h>, since we assume C89.
21469         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21470         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21471         Include <stddef.h> instead, since it's all we need for size_t.
21472         (PARAMS): Remove.  All uses removed.
21473         (ARRAY_CARDINALITY): Do not bother to #undef.
21474         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21475         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21476         Remove unnecessary parentheses.
21477         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21478         Insert necessary parentheses.
21479         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
21480         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
21481
21482 2002-11-19  Bruno Haible  <bruno@clisp.org>
21483
21484         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
21485         * lib/mbswidth.h: Include <stddef.h>, for size_t.
21486
21487         * lib/mbswidth.h (PARAMS): Remove macro.
21488         (mbswidth, mbsnwidth): Use ANSI C function declarations.
21489         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
21490
21491         * lib/gcd.h (PARAMS): Remove macro.
21492         (gcd): Use ANSI C function declarations.
21493         * lib/gcd.c (gcd): Likewise.
21494
21495 2002-11-15  Bruno Haible  <bruno@clisp.org>
21496
21497         * lib/strcspn.c: Include <stddef.h>.
21498         (strcspn): Use ANSI C function declaration. Change return type to
21499         size_t. Use NULL.
21500         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
21501         (strpbrk): Use NULL.
21502         * lib/strpbrk.h (PARAMS): Remove macro.
21503         (strpbrk): Use ANSI C function declaration.
21504         * lib/strstr.c: Don't include <sys/types.h>.
21505         * lib/strstr.h (PARAMS): Remove macro.
21506         (strstr): Use ANSI C function declarations.
21507
21508 2002-11-14  Karl Berry  <karl@gnu.org>
21509
21510         * config/mkinstalldirs: `do' on separate line, instead of
21511         `for var; do'.
21512
21513 2002-11-06  Bruno Haible  <bruno@clisp.org>
21514
21515         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
21516         * lib/gcd.c (gcd): Likewise.
21517
21518 2002-11-05  Bruno Haible  <bruno@clisp.org>
21519
21520         * lib/gcd.h: New file, from gettext-0.11.5.
21521         * lib/gcd.c: New file, from gettext-0.11.5.
21522
21523 2002-11-05  Bruno Haible  <bruno@clisp.org>
21524
21525         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21526         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21527         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21528         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21529
21530         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21531         <libintl.h>.
21532         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21533         <libintl.h>.
21534
21535         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21536         * lib/human.c: Include gettext.h instead of <libintl.h>.
21537         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21538         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21539         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21540         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21541         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21542         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21543         (textdomain): Remove definition.
21544         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21545
21546         * lib/long-options.c: Remove include of <libintl.h> and definition of
21547         _.
21548         * lib/same.c: Remove include of <libintl.h> and definition of _.
21549
21550 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21551
21552         * lib/config.charset: A few additions for Solaris.
21553
21554 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21555
21556         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21557         * lib/localcharset.c (locale_charset): Declare as extern "C".
21558
21559 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21560
21561         * lib/config.charset: msdos in uk_UA uses CP1125.
21562
21563 2002-11-04  Bruno Haible  <bruno@clisp.org>
21564
21565         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21566         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21567         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21568         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21569         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21570
21571 2002-11-04  Bruno Haible  <bruno@clisp.org>
21572
21573         * lib/localcharset.c (locale_charset): Don't return an empty string.
21574
21575 2002-11-04  Bruno Haible  <bruno@clisp.org>
21576
21577         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21578         aliases.
21579
21580 2002-11-04  Bruno Haible  <bruno@clisp.org>
21581
21582         * lib/config.charset: Update for newest glibc. Add canonical names
21583         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21584
21585 2002-11-04  Bruno Haible  <bruno@clisp.org>
21586
21587         * lib/config.charset: Add support for NetBSD.
21588
21589 2002-11-04  Bruno Haible  <bruno@clisp.org>
21590
21591         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21592
21593 2002-11-01  Bruno Haible  <bruno@clisp.org>
21594
21595         * configure.in: Add AC_CONFIG_AUX_DIR call.
21596         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21597         test/Makefile.
21598         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21599
21600 2002-09-28  Karl Berry  <karl@gnu.org>
21601
21602         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21603         installed automake until the next release, since changes have been
21604         made.
21605
21606 2002-09-25  Karl Berry  <karl@gnu.org>
21607
21608         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21609         * lib/getopt*: copy from libc/posix.
21610         * lib/gettext.h: copy from gettext.
21611         * lib/.cppi-disable: add strdup.c, gettext.h.
21612
21613 2002-09-25  Karl Berry  <karl@gnu.org>
21614
21615         * config/srclist.txt: enable gettext.h check.
21616         * config/config.{guess,sub}: update from prep.
21617         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21618                 from automake 1.6.3.
21619         See srclist*.
21620
21621 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21622
21623         * regex.c (PATFETCH): Remove the translating fetch.
21624         (PATFETCH_RAW): Rename to PATFETCH.
21625         (set_image_of_range): New fun.
21626         (SET_RANGE_TABLE_WORK_AREA): Use it.
21627         (regex_compile): Don't translate the pattern chars so eagerly.
21628         Only do it when inserting an `exactn' bytecode or when handling
21629         a char-range.
21630         (mutually_exclusive_p): Avoid empty statement.
21631
21632 2002-07-06  Jim Meyering  <meyering@lucent.com>
21633
21634         * m4/README: Don't mention Makefile.am.in.
21635         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21636
21637 2002-07-01  Jim Meyering  <meyering@lucent.com>
21638
21639         * lib/c-stack.c: Include sys/time.h.
21640         From Volker Borchert.
21641
21642 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21643
21644         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21645
21646 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21647
21648         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21649         New macro.  Use it uniformly instead of
21650         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21651         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21652         reported by Vin Shelton.
21653
21654 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21655
21656         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21657         Do not assume SA_SIGINFO behavior.
21658         Bug reported by Jim Meyering on NetBSD 1.5.2.
21659
21660 2002-06-22  Jim Meyering  <meyering@lucent.com>
21661
21662         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21663         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21664
21665         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21666         now that configure.ac uses AC_GNU_SOURCE.
21667         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21668         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21669
21670         Update to latest tools.  Suggestions from Paul Eggert.
21671         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21672         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21673         * m4/fnmatch.m4: Likewise.
21674         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21675         to AC_HEADER_STDBOOL
21676
21677 2002-06-22  Jim Meyering  <meyering@lucent.com>
21678
21679         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21680         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21681
21682 2002-06-22  Jim Meyering  <meyering@lucent.com>
21683
21684         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21685
21686         * lib/exitfail.c, exitfail.h: Likewise.
21687         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21688
21689         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21690         of fnmatch.h.
21691         (EXTRA_DIST): Add fnmatch_loop.c.
21692         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21693
21694         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21695         * lib/fnmatch.c: Update from diffutils-2.8.2.
21696         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21697         * lib/fnmatch.h: Remove file.
21698
21699 2002-06-21  Jim Meyering  <meyering@lucent.com>
21700
21701         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21702         * m4/mbrtowc.m4: Likewise.
21703
21704         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21705         * m4/mbswidth.m4: Reflect name change:
21706         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21707         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21708
21709         * m4/lib-link.m4: Update from gettext-0.11.2.
21710         * m4/gettext.m4: Likewise.
21711
21712         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21713         From Alfred M. Szmidt.
21714
21715 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21716
21717         * lib/file-type.h: Report an error if neither S_ISREG nor
21718         S_IFREG is defined, instead of using a test specific to glibc
21719         2.2.  This should be safe, since POSIX requires S_ISREG and
21720         Unix Version 7 had S_IFREG.  We don't need to check for
21721         <sys/types.h> since we don't use any symbols that it defines.
21722
21723 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21724
21725         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21726         $@-t, so that each temporary file name is unique and valid in the first
21727         8 characters, for operation under DOS.
21728
21729 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21730
21731         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21732
21733 2002-06-15  Jim Meyering  <meyering@lucent.com>
21734
21735         Work even with DJGPP 2.03, which lacks support for symlinks.
21736         From Richard Dawe.
21737         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21738         is defined.
21739         * lib/lchown.c (S_ISLNK): Likewise.
21740
21741 2002-06-15  Jim Meyering  <meyering@lucent.com>
21742
21743         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21744         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21745         have been included before this file.
21746
21747 2002-06-14  Jim Meyering  <meyering@lucent.com>
21748
21749         * lib/file-type.h: Use the version from diffutils-2.8.2.
21750         * lib/file-type.c: Likewise.
21751
21752 2002-06-07  Jim Meyering  <meyering@lucent.com>
21753
21754         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21755         They're needed at least for NetBSD 1.5.2.
21756         ($statxfs_includes): Include those same headers.
21757         ($statxfs_includes): Include sys/vfs.h if available.
21758         ($statxfs_includes): Likewise for sys/statvfs.h.
21759         Check for the following members in both structs statfs and statvfs:
21760         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21761
21762 2002-06-01  Jim Meyering  <meyering@lucent.com>
21763
21764         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21765         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21766
21767 2002-05-28  Jim Meyering  <meyering@lucent.com>
21768
21769         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21770         Reported by Volker Borchert.
21771
21772 2002-05-27  Jim Meyering  <meyering@lucent.com>
21773
21774         Fix a problem seen only on nonconforming systems whereby ls.c's
21775         use of localtime, and then of gettimeofday would cause trouble:
21776         the localtime call used to initialize rpl_gettimeofday's save
21777         mechanism would clobber ls's current local time information so
21778         that in any long listing the first file would always be listed
21779         with date 1970-01-01.  Analysis by Volker Borchert.
21780
21781         * lib/gettimeofday.c (localtime): Undefine.
21782         (rpl_localtime): New function.
21783
21784 2002-05-27  Jim Meyering  <meyering@lucent.com>
21785
21786         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21787         localtime.
21788
21789         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21790         use the replacement function; it wouldn't resolve at link time.
21791         Reported by Volker Borchert.
21792
21793 2002-05-22  Jim Meyering  <meyering@lucent.com>
21794
21795         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
21796         file-type.h.
21797         * lib/file-type.h: New file.
21798         * lib/file-type.c (file_type): New file/function.  Extracted from
21799         diffutils.
21800
21801 2002-04-30  Jim Meyering  <meyering@lucent.com>
21802
21803         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
21804
21805 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21806
21807         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
21808
21809 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21810
21811         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
21812         Do not check for alloca.h (no longer used) or stdbool.h (was never
21813         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
21814
21815 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21816
21817         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
21818
21819 2002-04-29  Jim Meyering  <meyering@lucent.com>
21820
21821         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
21822         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
21823         Use AC_FUNC_STRNLEN here instead.
21824
21825         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
21826         With autoconf-2.53a, it's part of AC_PROG_CC.
21827
21828 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21829
21830         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
21831         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
21832
21833 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21834
21835         * lib/sig2str.h, lib/sig2str.c: New files.
21836         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
21837
21838 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21839
21840         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
21841         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
21842         of 127, since 64 is the largest conceivable number for ancient
21843         nonstandard hosts.
21844         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
21845
21846 2002-04-28  Jim Meyering  <meyering@lucent.com>
21847
21848         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
21849
21850 2002-04-24  Jim Meyering  <meyering@lucent.com>
21851
21852         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
21853         (jm_PREREQ): Use it.
21854
21855         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
21856         mach/mach.h fcntl.h.
21857         Check for this function: setlocale.
21858
21859 2002-04-24  Jim Meyering  <meyering@lucent.com>
21860
21861         * lib/gettext.h: New file, from Gettext.
21862         * lib/Makefile.am (INCLUDES): Remove -I../intl.
21863         (libfetish_a_SOURCES): Add gettext.h.
21864
21865 2002-04-16  Jim Meyering  <meyering@lucent.com>
21866
21867         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
21868         ut_pid, ut_id, ut_exit.
21869
21870 2002-04-16  Jim Meyering  <meyering@lucent.com>
21871
21872         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
21873         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
21874         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
21875
21876 2002-04-12  Jim Meyering  <meyering@lucent.com>
21877
21878         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
21879         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
21880         existence of the getmntinfo function.  Needed for Darwin 5.3.
21881
21882         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
21883         This is necessary at least on Darwin 5.3.
21884
21885         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
21886         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
21887         strnlen.o in the library, and that makes some versions of ranlib
21888         object.
21889
21890 2002-04-12  Jim Meyering  <meyering@lucent.com>
21891
21892         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
21893
21894 2002-04-09  Jim Meyering  <meyering@lucent.com>
21895
21896         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
21897         to be more precise.  Rather than saying we're checking whether the
21898         function `works', say what we're testing.
21899         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
21900         Reported by Bruno Haible.
21901
21902 2002-03-10  Jim Meyering  <meyering@lucent.com>
21903
21904         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
21905         Suggestion from Santiago Vila.
21906
21907 2002-03-08  Jim Meyering  <meyering@lucent.com>
21908
21909         * lib/rename.c: Mention that this wrapper is needed also on
21910         mips-dec-ultrix4.4 systems.
21911
21912 2002-03-02  Jim Meyering  <meyering@lucent.com>
21913
21914         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
21915         not HAVE_CLOCK_SETTIME.
21916
21917 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21918
21919         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
21920         Check for clock_settime.
21921
21922 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21923
21924         * lib/nanosleep.h: Rename to....
21925         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
21926
21927         * lib/gettime.c: New file.
21928         * lib/settime.c: New file.
21929         * lib/stime.c: Remove.
21930
21931         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
21932         timespec.h.  Remove nanosleep.h.
21933
21934 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21935
21936         * m4/acl.m4: New file.
21937         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
21938         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
21939
21940 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21941
21942         * lib/acl.c, lib/acl.h: New files.
21943         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
21944
21945 2002-02-24  Jim Meyering  <meyering@lucent.com>
21946
21947         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
21948         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
21949         cause trouble.  Reported by Nelson Beebe.
21950
21951 2002-02-23  Paul Eggert  <eggert@twinsun.com>
21952
21953         * lib/path-concat.c (xpath_concat): Reorder code to pacify
21954         compilers that don't know that xalloc_die never returns.
21955
21956 2002-02-20  Jim Meyering  <meyering@lucent.com>
21957
21958         * lib/getdate.c: Regenerate using bison-1.33.
21959
21960 2002-02-17  Jim Meyering  <meyering@lucent.com>
21961
21962         * config/config.guess (main): Don't use `head -1'; it's no longer
21963         portable. Use `sed 1q' instead.
21964
21965 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
21966
21967         * m4/codeset.m4: Upgrade to gettext-0.11.
21968         * m4/gettext.m4: Upgrade to gettext-0.11.
21969         * m4/glibc21.m4: Upgrade to gettext-0.11.
21970         * m4/iconv.m4: Upgrade to gettext-0.11.
21971         * m4/isc-posix.m4: Upgrade to gettext-0.11.
21972         * m4/lcmessage.m4: Upgrade to gettext-0.11.
21973         * m4/lib-ld.m4: New file, from gettext-0.11.
21974         * m4/lib-link.m4: New file, from gettext-0.11.
21975         * m4/lib-prefix.m4: New file, from gettext-0.11.
21976         * m4/progtest.m4: Upgrade to gettext-0.11.
21977
21978 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21979
21980         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
21981         (jm_PREREQ): Use it.
21982
21983 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21984
21985         * lib/posixver.c, lib/posixver.h: New files.
21986         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21987
21988 2002-02-02  Paul Eggert  <eggert@twinsun.com>
21989             Bruno Haible  <bruno@clisp.org>
21990
21991         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
21992         (fwrite_success_callback): New declaration.
21993         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
21994         print_unicode_char. Call failure callback instead of error.
21995         (fwrite_success_callback): New function.
21996         (exit_failure_callback): New function.
21997         (fallback_failure_callback): New function.
21998         (print_unicode_char): Call unicode_to_mb.
21999
22000 2002-01-26  Jim Meyering  <meyering@lucent.com>
22001
22002         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
22003         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
22004
22005 2002-01-26  Jim Meyering  <meyering@lucent.com>
22006
22007         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
22008
22009 2002-01-22  Paul Eggert  <eggert@twinsun.com>
22010
22011         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
22012
22013 2002-01-22  Jim Meyering  <meyering@lucent.com>
22014
22015         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
22016         Otherwise, some versions of automake would omit the rule that makes
22017         Makefile from Makefile.in.
22018
22019 2002-01-21  Paul Eggert  <eggert@twinsun.com>
22020
22021         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
22022         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22023         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
22024         (memcoll): Set errno to zero if there is no error.
22025
22026         * lib/quotearg.c (quotearg_buffer_restyled):
22027         Fix bug with quoting buffers containing NUL when backslashing escapes.
22028         This bug was exposed by the other changes in this patch.
22029         (quotearg_n_options): New arg ARGSIZE.
22030         All callers changed.
22031         (quoting_options_from_style): New function.
22032         (quotearg_n_style): Use it.
22033         (quotearg_n_style_mem): New function.
22034
22035         * lib/quotearg.h (quotearg_n_style_mem): New function.
22036
22037 2002-01-19  Jim Meyering  <meyering@lucent.com>
22038
22039         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
22040         Remove useless quotes: DF_PROG="df".
22041         * m4/strnlen.m4: New file.
22042
22043 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22044
22045         * lib/backupfile.c (ISDIGIT): Comment fix.
22046         * lib/getdate.y (ISDIGIT): Likewise.
22047         * lib/posixtm.c (ISDIGIT, year): Likewise.
22048         * lib/strverscmp.c (ISDIGIT): Likewise.
22049         * lib/userspec.c (ISDIGIT): Likewise.
22050
22051 2002-01-16  Jim Meyering  <meyering@lucent.com>
22052
22053         * lib/getdate.y: Add three semicolons, each just before a closing
22054         brace. Bison (as of version 1.31) no longer papers over that mistake.
22055
22056 2002-01-05  Jim Meyering  <meyering@lucent.com>
22057
22058         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22059
22060 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22061
22062         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22063         not silently exit merely because the output buffer happens to
22064         have nothing pending.
22065
22066 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22067
22068         See the big note in ../ChangeLog.
22069         * lib/human.c (suffixes): Prefer K to k for 1024.
22070         (generate_suffix_backwards): New function.
22071         (human_readable_inexact): Use it.
22072         * lib/xstrtol.c (__xstrtol): If there is no number but there
22073         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22074         Accept 'K' as well as 'k'.
22075
22076 2001-12-15  Jim Meyering  <meyering@lucent.com>
22077
22078         * lib/regex.h (__restrict_arr): Update from libc.
22079
22080         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
22081         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
22082         (STREQ): Define.
22083
22084 2001-12-14  Jim Meyering  <meyering@lucent.com>
22085
22086         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
22087         Suggestion from Bruno Haible.
22088
22089 2001-12-10  Jim Meyering  <meyering@lucent.com>
22090
22091         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
22092         xrealloc, Instead, include "xalloc.h".
22093         (initbuffer): Don't cast xmalloc return value to char*.
22094         (readline): Reword comment.
22095         Don't cast xrealloc return value to char*
22096         Return NULL, not 0.
22097
22098 2001-12-09  Jim Meyering  <meyering@lucent.com>
22099
22100         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
22101         about `signed and unsigned type in conditional expression'.
22102         * lib/posixtm.c (posix_time_parse): Likewise.
22103
22104         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
22105
22106         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
22107         to avoid a pedantic warning.
22108
22109         * lib/getstr.c: Don't include assert.h.
22110         (getstr): Remove warning-evoking assertions.
22111         Return -1 if offset parameter is out of bounds.
22112         Change the type of a local from int to size_t.
22113
22114         * lib/strftime.c (my_strftime_localtime_r): Include this function
22115         definition in the `#if ! HAVE_TM_GMTOFF' block.
22116
22117         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
22118         Include xalloc.h instead.
22119
22120 2001-12-02  Jim Meyering  <meyering@lucent.com>
22121
22122         * lib/tempname.c: Don't declare getenv, thus reverting the change of
22123         2001-11-18.  It's no longer necessary, now that stdlib.h is always
22124         included.
22125
22126         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
22127         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
22128
22129 2001-11-30  Akim Demaille  <akim@epita.fr>
22130
22131         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
22132         before being defined.
22133
22134 2001-11-27  Paul Eggert  <eggert@twinsun.com>
22135
22136         * lib/quotearg.h (quotearg_n, quotearg_n_style):
22137         First arg is int, not unsigned.
22138         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22139         (SIZE_MAX, UINT_MAX): New macros.
22140         (quotearg_n_options): Abort if N is negative.
22141         Avoid overflow check on hosts where size_t is 64 bits and int
22142         is 32 bits, as overflow is impossible there.
22143         Fix off-by-one typo that caused unnecessary reallocation.
22144
22145 2001-11-27  Jim Meyering  <meyering@lucent.com>
22146
22147         * lib/tempname.c: Merge with version from libc.
22148         * lib/regex.c: Likewise.
22149
22150         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
22151         systems for which STDC_HEADERS is 0, it was not included, resulting in
22152         a warning about an integer-to-pointer conversion problem with getenv.
22153         Reported by Volker Borchert.
22154
22155 2001-11-26  Jim Meyering  <meyering@lucent.com>
22156
22157         * lib/gtod.h: Remove file.
22158         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
22159         * lib/gettimeofday.c: Don't include gtod.h.
22160         (GTOD_init): Remove function.
22161         (rpl_gettimeofday): Do its job here instead, rather than aborting.
22162         Suggestion from Volker Borchert.
22163
22164 2001-11-23  Jim Meyering  <meyering@lucent.com>
22165
22166         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
22167         it.
22168         * lib/hash.c (struct hash_table): Define it here instead.
22169
22170 2001-11-22  Jim Meyering  <meyering@lucent.com>
22171
22172         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
22173
22174 2001-11-20  Jim Meyering  <meyering@lucent.com>
22175
22176         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
22177         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
22178
22179 2001-11-19  Jim Meyering  <meyering@lucent.com>
22180
22181         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
22182         directory.  Use "conftestXXXXXX" as the template.
22183         Suggestion from Paul Eggert.
22184
22185         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
22186         immediately, so the test doesn't mistakenly hit the max-open-files
22187         limit.
22188
22189 2001-11-18  Paul Eggert  <eggert@twinsun.com>
22190
22191         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
22192         (TEMPORARIES): New macro.
22193         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
22194         removes an artificial limitation (e.g. HP-UX 10.20, where
22195         TMP_MAX is 17576).
22196
22197 2001-11-18  Jim Meyering  <meyering@lucent.com>
22198
22199         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
22200
22201 2001-11-18  Jim Meyering  <meyering@lucent.com>
22202
22203         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
22204         on SunOS 4.
22205
22206         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
22207         files will be created before anything else.
22208
22209 2001-11-17  Paul Eggert  <eggert@twinsun.com>
22210
22211         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
22212         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
22213
22214 2001-11-17  Jim Meyering  <meyering@lucent.com>
22215
22216         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
22217         Prompted by a report from Bob Proulx.
22218
22219         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
22220         Instead, require UTILS_FUNC_MKSTEMP.
22221
22222 2001-11-17  Jim Meyering  <meyering@lucent.com>
22223
22224         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
22225         Now, that's done as part of AC_FUNC_STRTOD.
22226
22227 2001-11-17  Jim Meyering  <meyering@lucent.com>
22228
22229         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
22230         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
22231         rather than group writable.  Patch by Juan F. Codagnone.
22232
22233         * lib/readtokens.c: Remove explicit declarations of xmalloc and
22234         xrealloc, Instead, include "xalloc.h".
22235
22236         * lib/mountlist.c: Include unlocked-io.h after all system headers.
22237         Remove explicit declarations of xmalloc, xrealloc,
22238         and xstrdup.  Instead, include "xalloc.h".
22239
22240         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
22241         unlocked-io.h.
22242         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
22243         Likewise.
22244         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
22245
22246         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
22247         Reported by Padraig Brady.
22248
22249         * lib/mkstemp.c: #undef mkstemp.
22250         Include config.h.
22251         (rpl_mkstemp): Rename from mkstemp.
22252         Protoize.
22253
22254 2001-11-16  Jim Meyering  <meyering@lucent.com>
22255
22256         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
22257         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
22258         determine the amount of total physical memory, use pstat_getstatic.
22259         HPUX-11 doesn't define _SC_PHYS_PAGES.
22260         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
22261         If sysconf couldn't be used to determine the amount of available
22262         physical memory, use both pstat_getstatic and pstat_getdynamic.
22263         Based on a patch from Bob Proulx.
22264
22265 2001-11-10  Jim Meyering  <meyering@lucent.com>
22266
22267         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
22268         (jm_PREREQ): Use it.
22269
22270 2001-11-09  Jim Meyering  <meyering@lucent.com>
22271
22272         * m4/jm-macros.m4: Require autoconf-2.52f.
22273         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
22274         Use these AC_-prefixed names, not the AM_-prefixed ones.
22275
22276         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
22277
22278 2001-11-05  Jim Meyering  <meyering@lucent.com>
22279
22280         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
22281
22282 2001-11-04  Jim Meyering  <meyering@lucent.com>
22283
22284         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
22285         $DEFS.
22286
22287 2001-11-03  Jim Meyering  <meyering@lucent.com>
22288
22289         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
22290         of AC_DEFUN.
22291
22292         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
22293         know the name of the variable in the macro definition.
22294
22295 2001-11-03  Jim Meyering  <meyering@lucent.com>
22296
22297         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
22298         in argmatch_to_argument call.
22299
22300         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
22301         argument.
22302
22303         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
22304         e.g., a fault due to an attempt to free a NULL pointer.
22305
22306 2001-11-01  Jim Meyering  <meyering@lucent.com>
22307
22308         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
22309         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
22310
22311 2001-11-01  Jim Meyering  <meyering@lucent.com>
22312
22313         * lib/dirfd.c, lib/dirfd.h: New files.
22314         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22315
22316         * lib/hash.c (hash_print) [TESTING]: Clean up.
22317
22318 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22319
22320         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22321         to avoid a warning if -Wall.
22322
22323 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22324
22325         * README: New file
22326         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22327         (per RMS's instructions, this is now the canonical source)
22328         * lgpl/, gpl/: New directories.
22329
22330 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22331
22332         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22333
22334 2001-10-21  Jim Meyering  <meyering@lucent.com>
22335
22336         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22337         this code would end up calling gettext even in packages built
22338         with --disable-nls.
22339         * lib/getopt.c (_): Likewise.
22340         * lib/regex.c (_): Likewise.
22341
22342 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22343
22344         * m4/error.m4 (jm_PREREQ_ERROR):
22345         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22346         AC_FUNC_STRERROR_R does that.
22347         Check for strerror declaration.
22348
22349         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22350         are supposed to have them these days.
22351         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22352         Merge changes from latest Autoconf CVS.
22353         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22354         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22355         POSIX decided to standardize on the int flavor of strerror_r.
22356
22357 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22358
22359         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22360         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22361         Use strerror_r that is only a macro, even if it is not a function.
22362         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22363         (private_strerror): Use prototypes, not old-style function definition.
22364         (print_errno_message): New function.
22365         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22366         char*-flavored one.
22367         (error_tail, error, error_at_line): Use it.
22368
22369 2001-10-11  Jim Meyering  <meyering@lucent.com>
22370
22371         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22372         and quote_n (1, ... to avoid clobbering a buffer.
22373
22374 2001-10-05  Jim Meyering  <meyering@lucent.com>
22375
22376         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22377         hash-pjw.h.
22378         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22379         * lib/hash-pjw.h: New file.
22380
22381 2001-09-30  Jim Meyering  <meyering@lucent.com>
22382
22383         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22384         `struct fsstat' has the `f_fstypename' member.
22385         Use that to define FS_TYPE, which is now used to make
22386         the getfsstat link test tighter.
22387
22388 2001-09-30  Jim Meyering  <meyering@lucent.com>
22389
22390         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22391         Include <sys/ucred.h>, for Apple Darwin.
22392         Include sys/mount.h and sys/fs_types.h only if available.
22393         (FS_TYPE): Define.
22394         (read_filesystem_list): Use FS_TYPE.
22395
22396 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22397
22398         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22399         a boolean context.
22400
22401 2001-09-29  Jim Meyering  <meyering@lucent.com>
22402
22403         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22404         [one-argument getmntent function]): Include stdio.h before mntent.h.
22405         SunOS 4.1.x needs it for the declaration of `FILE'.
22406         Patch by Volker Borchert.
22407
22408         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22409         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22410         sys/fs_types.h, and make the link-test for getfsstat guard #include
22411         directives with appropriate #if HAVE_*_H tests so that we can
22412         detect getfsstat on Apple Darwin1.3.7 systems.
22413         Reported by Nelson Beebe.
22414         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22415
22416 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22417
22418         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22419         #defines strtoimax.  Also treat the other strto* functions
22420         like strtoimax.
22421
22422         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22423         Check for strtoul and strtoumax,
22424         as those declarations are made even in the signed case.
22425         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22426         Likewise, for strtol and strtoimax.
22427
22428 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22429
22430         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22431         #defines strtoimax.  Also treat the other strto* functions
22432         like strtoimax.
22433
22434         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22435         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22436         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22437
22438 2001-09-26  Jim Meyering  <meyering@lucent.com>
22439
22440         Most macros in unlocked-io.h had the wrong number of arguments.
22441         * lib/gen-uio: New script.
22442         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22443         * lib/unlocked-io.hin: Remove file.
22444         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22445         rather than trying to embed it here.
22446         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22447         Reported by Padraig Brady.
22448
22449 2001-09-25  Volker Borchert  <bt@teknon.de>
22450
22451         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22452         `result'.
22453
22454 2001-09-24  Jim Meyering  <meyering@lucent.com>
22455
22456         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
22457
22458 2001-09-23  Jim Meyering  <meyering@lucent.com>
22459
22460         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
22461         instead of the mere test for existence of mntent.h.  The latter
22462         would get a false-positive on AIX 3.4 systems.
22463         In the outer getmntent if-block, don't die if neither of the getmntent
22464         tests succeeds.  Instead, just fall through and continue with the
22465         remaining tests.
22466
22467 2001-09-23  Jim Meyering  <meyering@lucent.com>
22468
22469         * lib/mountlist.c: Remove useless parentheses in #if directives.
22470         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22471         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22472
22473 2001-09-22  Jim Meyering  <meyering@lucent.com>
22474
22475         * m4/gettext.m4: New file.  From gettext.
22476         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22477         * m4/progtest.m4: Likewise
22478         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
22479         * m4/glibc21.m4: Likewise.
22480
22481         * m4/libintl.m4: Remove.  No longer used.
22482
22483 2001-09-22  Jim Meyering  <meyering@lucent.com>
22484
22485         * lib/localcharset.c: Update from latest gettext.
22486         * lib/config.charset: Likewise.
22487
22488 2001-09-20  Jim Meyering  <meyering@lucent.com>
22489
22490         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
22491         strtoimax.
22492         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
22493         strtoumax.
22494
22495 2001-09-20  Jim Meyering  <meyering@lucent.com>
22496
22497         * lib/xstrtol.c (strtoimax): Guard declaration with
22498         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
22499         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
22500         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
22501         (strtoumax): Likewise, for completeness (it wasn't necessary).
22502
22503 2001-09-17  Paul Eggert  <eggert@twinsun.com>
22504
22505         * lib/strtoimax.c (HAVE_LONG_LONG):
22506         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
22507         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
22508         to work around bug in IBM C compiler.
22509
22510 2001-09-17  Jim Meyering  <meyering@lucent.com>
22511
22512         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
22513         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
22514         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
22515         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
22516         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
22517         whenever the right hand side need not be expanded by the shell.
22518
22519 2001-09-16  Paul Eggert  <eggert@twinsun.com>
22520
22521         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
22522         library.  It's not correct, as some older glibcs are buggy.
22523         fnmatch wasn't fixed until glibc 2.2.
22524
22525         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
22526         special shell magic here.
22527
22528 2001-09-16  Jim Meyering  <meyering@lucent.com>
22529
22530         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22531         * m4/jm-macros.m4: Require it.
22532
22533 2001-09-16  Jim Meyering  <meyering@lucent.com>
22534
22535         * lib/mkdir.c: New file.
22536
22537 2001-09-15  Jim Meyering  <meyering@lucent.com>
22538
22539         * m4/jm-macros.m4: Check for help2man.
22540
22541 2001-09-11  Jim Meyering  <meyering@lucent.com>
22542
22543         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22544         The body, by Paul Eggert, was moved here from configure.in.
22545         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22546
22547 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22548
22549         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22550         (jm_PREREQ): Use it.
22551
22552 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22553
22554         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22555         Use ssize_t, not int, to store result of readlink.
22556         Check for ssize_t overflow as well as size_t overflow,
22557         as POSIX says the result of readlink is implementation-defined
22558         when ssize_t overflows.
22559         Remove unnecessary cast to char*.
22560         Use free+malloc instead of realloc, as the storage doesn't need
22561         to be preserved and it's clearer and can be more efficient that way.
22562         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22563         * lib/xreadlink.h (xreadlink): Update prototype.
22564
22565 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22566
22567         * lib/xgetcwd.c: Revert some of the previous change; intead,
22568         fix the HAVE_GETCWD_NULL code to behave more like the
22569         !HAVE_GETCWD_NULL code used to.
22570
22571         Include "xalloc.h".
22572         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22573         invoke xalloc_die.
22574
22575 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22576
22577         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22578         sys/param.h, as pathmax.h includes them.
22579
22580 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22581
22582         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22583         (jm_PREREQ_XGETCWD): New macro.
22584
22585         * m4/getcwd.m4: New file.
22586
22587 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22588
22589         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22590         like the HAVE_GETCWD_NULL code.
22591         Include pathmax.h if not HAVE_GETCWD.
22592         Do not include xalloc.h.
22593         (INITIAL_BUFFER_SIZE): New symbol.
22594         Do not use xmalloc / xrealloc, since the caller is responsible for
22595         handling errors.  Preserve errno around `free' during failure.
22596         Do not overrun buffer when using getwd.
22597
22598 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22599
22600         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22601         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22602         getcwd (NULL, 0).
22603
22604 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22605
22606         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22607         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22608         spotted by Jim Meyering.
22609
22610 2001-09-03  Jim Meyering  <meyering@lucent.com>
22611
22612         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22613         failure.
22614
22615 2001-09-02  Jim Meyering  <meyering@lucent.com>
22616
22617         * lib/error.c: Update from GNU libc.
22618
22619 2001-09-01  Jim Meyering  <meyering@lucent.com>
22620
22621         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22622         Used by df.
22623
22624 2001-09-01  Jim Meyering  <meyering@lucent.com>
22625
22626         * lib/xreadlink.c: New file.
22627         * lib/xreadlink.h: New file.
22628         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22629         xreadlink.h.
22630
22631         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22632         doesn't conflict with sparc Solaris 7's definition in
22633         /usr/include/sys/int_types.h.
22634
22635         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22636         files.
22637         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22638         and strncasecmp as r-values.  Unixware didn't have declarations.
22639
22640 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22641
22642         * lib/xstrtol.h: Add copyright notice.
22643         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22644         LONGINT_INVALID_SUFFIX_CHAR.
22645
22646 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22647
22648         * lib/xstrtol.c (strtoimax): New decl.
22649
22650 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22651
22652         * lib/xgetcwd.c: Don't include pathmax.h.
22653         Include stdlib.h and unistd.h if available.
22654         Include xalloc.h.
22655         (xmalloc, xstrdup, free): Remove decls.
22656         (xgetcwd): Don't assume sizes fit in unsigned.
22657         Check for overflow when computing sizes.
22658         Simplify reallocation code.
22659
22660 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22661
22662         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22663         a directory's st_size can have an arbitrary value, so the old
22664         usage could waste an arbitrary amount of memory.  All uses
22665         changed.
22666         * lib/savedir.h: Update prototype.
22667
22668 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22669
22670         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22671
22672         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22673         old strtoimax.c.
22674
22675         Also, make the following further changes to make this file's
22676         configuration more similar to that of strtol.c:
22677         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22678         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22679         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22680         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22681         changed to signed values.
22682
22683         And make the following changes as well:
22684         Fix copyright notice, as 1999 was missing.
22685         (verify): New macro.
22686         (strtoimax): Check sizes at compile-time, not run-time.
22687         Prefer strtol to strtoll if both work.
22688         (main): Remove; it was not that useful and was a pain to maintain.
22689
22690         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22691
22692 2001-08-31  Jim Meyering  <meyering@lucent.com>
22693
22694         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22695         Use an initial, malloc'd, buffer of length 128 rather than
22696         a statically allocated one of length 1024.
22697
22698 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22699
22700         Simplify code, partly by assuming autoconf 2.52 semantics.
22701
22702         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22703
22704         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22705         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22706         All uses removed.
22707         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22708         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22709         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22710         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22711         jm_AC_HEADER_INTTYPES_H.
22712         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22713
22714         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22715
22716         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22717         Quote first arg of AC_DEFUN.
22718         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22719         since they are needed to parse the include file even if we need
22720         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22721         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22722         but with opposite signedness.
22723
22724 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22725
22726         Merge 'exclude' changes from tar 1.13.22.
22727         This fixes one or two unlikely storage allocation overflow bugs,
22728         but doesn't change user-visible behavior otherwise.
22729
22730 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22731
22732         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22733         (jm_PREREQ_EXCLUDE): New macro.
22734
22735 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22736
22737         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22738         tm to be declared.
22739
22740 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22741
22742         * lib/hash.c: Remove '2001' from copyright notice.
22743
22744 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22745
22746         * lib/full-write.h: New file.
22747         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22748         * lib/full-write.c: Correct credits, as cccp.c no longer
22749         exists and anyway it was so heavily changed from the old cccp
22750         code as to be unrecognizable.  Include full-write.h.
22751         (full_write) Return size_t, with short writes meaning failure.
22752         All callers changed.  This fixes a bug with large buffers
22753         on 64-bit hosts.
22754         * lib/utime.c: Include full-write.h.
22755
22756 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22757
22758         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22759         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22760         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22761         Include if available.
22762         (<xalloc.h>): Include
22763         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22764         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22765         collide with FNM macros.
22766         (struct patopts): New struct.
22767         (struct exclude): Use it, as exclude patterns now come with options.
22768         (new_exclude): Support above changes.
22769         (new_exclude, add_exclude_file):
22770         Initial size must now be a power of two to simplify overflow checking.
22771         (free_exclude, fnmatch_no_wildcards): New function.
22772         (excluded_filename): No longer requires options arg, as the options
22773         are determined by add_exclude.  Now returns bool, not int.
22774         (excluded_filename, add_exclude):
22775         Add support for the fancy new exclusion options.
22776         (add_exclude, add_exclude_file): Now takes int options arg.
22777         Check for arithmetic overflow when computing sizes.
22778         (add_exclude_file): xrealloc might modify errno, so don't
22779         realloc until after errno might be used.
22780
22781         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22782         New macros.
22783         (free_exclude): New decl.
22784         (add_exclude, add_exclude_file): Now takes int options arg.
22785         (excluded_filename): No longer requires options arg, as the options
22786         are determined by add_exclude.  Now returns bool, not int.
22787
22788 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22789
22790         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22791
22792 2001-08-27  Jim Meyering  <meyering@lucent.com>
22793
22794         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
22795
22796         * lib/version-etc.c (N_): Remove definition.
22797         Revert most of last change.
22798         Instead, simply don't mark the `Copyright...' string for translation.
22799         Based on advice from Paul Eggert.
22800
22801         * lib/strtoxmax.c: Tweak comment.
22802
22803 2001-08-26  Jim Meyering  <meyering@lucent.com>
22804
22805         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
22806
22807         * m4/xstrtoimax.m4: New file.
22808         * m4/xstrtoumax.m4: Add comments explaining why we
22809         AC_REPLACE_FUNCS(strtol).
22810
22811 2001-08-26  Jim Meyering  <meyering@lucent.com>
22812
22813         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
22814         of copyright with `%s' so translators don't get an untranslated
22815         message in 2002.
22816         (COPYRIGHT_YEAR): Define.
22817         (version_etc): Use fprintf rather than fputs.
22818         Suggestion from Ulrich Drepper.
22819
22820         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
22821
22822         * lib/strtoll.c: New file, from GNU libc.
22823         * lib/xstrtoimax.c: New file.
22824
22825         * lib/xstrtol.h: Add xstrtoimax.
22826         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
22827         * lib/strtoimax.c: New file.  Likewise, but first define
22828         STRTOUXMAX_SIGNED.
22829
22830         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
22831         ...
22832         * lib/strtoxmax.c: ... then renamed to this.
22833
22834 2001-08-18  Paul Eggert  <eggert@twinsun.com>
22835
22836         * m4/inttypes.m4: Add AC_PREREQ(2.13).
22837         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
22838         (jm_AC_TYPE_INTMAX_T): New macro.
22839         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
22840
22841         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
22842
22843         * m4/longlong.m4: Renamed from ulonglong.m4.
22844         * m4/inttypes.m4: Renamed from inttypes_h.m4.
22845         * m4/uintmax_t.m4: Removed.
22846
22847 2001-08-13  Paul Eggert  <eggert@twinsun.com>
22848
22849         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
22850         Port to Solaris 8, where 'sed' requires a space after the 'r'
22851         command, and where sh dislikes "$/".  Clean up the spacing a bit.
22852         Redirect output to $tmp just once.
22853
22854 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
22855
22856         * lib/addext.c (<errno.h>): Include.
22857         (errno): Declare if not defined.
22858         (addext): Work correctly when pathconf returns -1 and leaves
22859         errno alone because there is no limit.  Also, work even if
22860         pathconf returns a value greater than SIZE_MAX.
22861
22862 2001-08-12  Jim Meyering  <meyering@lucent.com>
22863
22864         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
22865         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
22866         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
22867         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
22868         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
22869         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
22870         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
22871         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
22872         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
22873         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
22874         utime.m4, utimes.m4, xstrtoumax.m4:
22875         Quote the first argument in each use of AC_DEFUN.
22876
22877 2001-08-12  Jim Meyering  <meyering@lucent.com>
22878
22879         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
22880         Simply `return getcwd (NULL, 0);'.
22881         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
22882         Use 1300 as initial value for length, not PATH_MAX.
22883
22884         * lib/pathmax.h: Clean up cpp syntax.
22885
22886 2001-08-12  Jim Meyering  <meyering@lucent.com>
22887
22888         * lib/gettimeofday.c: New file.
22889         * lib/gtod.h: New file.
22890         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
22891
22892 2001-08-05  Jim Meyering  <meyering@lucent.com>
22893
22894         * m4/jm-macros.m4: Require autoconf-2.52.
22895
22896 2001-08-04  Jim Meyering  <meyering@lucent.com>
22897
22898         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
22899         stmt, to get in sync with glibc.
22900
22901 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22902
22903         The following changes are from gettext 0.10.39 as maintained by
22904         Bruno Haible.
22905
22906         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
22907         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
22908         with inverted sense.  All uses changed.
22909
22910         * lib/mbswidth.c: Don't include <limits.h>.
22911         Include <stdlib.h> and <string.h> unconditionally.
22912         (iswcntrl, mbsinit, ISCNTRL): New macros.
22913         (mbsnwidth): Use K&R style function declarations.
22914         Don't bother checking for MB_LEN_MAX == 1, since the compiler
22915         can optimize it when MB_CUR_MAX == 1.
22916         The width of control characters is zero, not 1.
22917
22918 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22919
22920         The following changes are from gettext 0.10.39 as maintained by
22921         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
22922
22923         * m4/codeset.m4: Upgrade to serial AM1.
22924         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
22925         all uses changed.  Quote first arg of AC_DEFUN.
22926         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
22927
22928         * m4/iconv.m4: Upgrade to serial AM2.
22929         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
22930         Add --with-libconv-prefix.
22931         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
22932         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
22933         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
22934         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
22935         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
22936
22937         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
22938         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
22939         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
22940         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
22941         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
22942         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
22943         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
22944         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
22945         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
22946
22947         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
22948         string.h any more.
22949
22950         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
22951         not the default value.
22952
22953         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
22954         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
22955         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
22956         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
22957         Also check for iswcntrl, used for wcwidth fallback.
22958         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
22959         to Autoconf 2.13.
22960
22961 2001-08-03  Jim Meyering  <meyering@lucent.com>
22962
22963         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
22964         as it was in the original.  Reported by Paul Eggert.
22965
22966 2001-07-16  Jim Meyering  <meyering@lucent.com>
22967
22968         * m4/gettimeofday.m4: New file.
22969         Prompted by a report from Bernhard Baehr.
22970
22971 2001-07-15  Jim Meyering  <meyering@lucent.com>
22972
22973         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
22974         stuff. Now it's in ../Makefile.cfg.
22975
22976 2001-07-15  Jim Meyering  <meyering@lucent.com>
22977
22978         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
22979         (BUILT_SOURCES): Add unlocked-io.h.
22980         (io_functions): Define.
22981         (unlocked-io.h): New rule.
22982         (DISTCLEANFILES): Add unlocked-io.h.
22983         (all-local): Depend on unlocked-io.h, to ensure it is created.
22984
22985         * lib/unlocked-io.hin: New file
22986
22987         * lib/regex.c: Update from glibc.
22988
22989 2001-07-05  Jim Meyering  <meyering@lucent.com>
22990
22991         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
22992         recommendation.
22993         (libfetish_a_SOURCES): Put all .h files here instead.
22994         Remove a thus-exposed (better checks in automake) duplicate and
22995         two unnecessary .h files.
22996
22997 2001-07-04  Jim Meyering  <meyering@lucent.com>
22998
22999         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
23000         that generates jm-glibc-io.m4 so that it doesn't trigger any make
23001         distcheck failure.
23002
23003 2001-07-02  Jim Meyering  <meyering@lucent.com>
23004
23005         The following changes were prompted by suggestions from Bruno Haible.
23006
23007         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
23008         is now generated.
23009         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
23010         definition of EXTRA_DIST.
23011         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
23012         ensure that the generated file is created/updated whenever the list
23013         of $(unlocked_functions) is changed.
23014         (jm-glibc-io.m4): New rule.
23015         (unlocked-io.h): New rule -- currently unused.
23016
23017 2001-06-24  Jim Meyering  <meyering@lucent.com>
23018
23019         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
23020         unmatched right bracket, rather than kludging it with an extra,
23021         falsely-matching quote in a comment.  Patch by Akim Demaille.
23022
23023 2001-06-11  Jim Meyering  <meyering@lucent.com>
23024
23025         * lib/regex.c: Update from GNU libc.
23026
23027 2001-05-27  Jim Meyering  <meyering@lucent.com>
23028
23029         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
23030         Check for ut_type in struct utmp.
23031
23032 2001-05-27  Jim Meyering  <meyering@lucent.com>
23033
23034         * lib/readutmp.h (UT_TYPE): Define.
23035
23036 2001-05-24  Jim Meyering  <meyering@lucent.com>
23037
23038         * lib/argmatch.c: Include "quote.h".
23039         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
23040         quote function.  Reported by Göran Uddeborg.
23041
23042 2001-05-22  Jim Meyering  <meyering@lucent.com>
23043
23044         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23045         now that we use the package-supplied version unconditionally.
23046         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23047
23048 2001-05-21  Jim Meyering  <meyering@lucent.com>
23049
23050         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23051         shell syntax errors.
23052
23053 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23054
23055         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23056
23057 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23058
23059         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23060         Don't bother to check library strftime, since
23061         we'll be using our own my_strftime function anyway.
23062         Define my_strftime instead of strftime.
23063
23064 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23065
23066         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23067         which is not yet declared.
23068
23069 2001-05-15  Jim Meyering  <meyering@lucent.com>
23070
23071         * m4/regex.m4: Use proper quoting so brackets appear in the test
23072         program.
23073         Reported by, and with help from, Bruno Haible.
23074
23075 2001-05-13  Jim Meyering  <meyering@lucent.com>
23076
23077         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23078         undefined.
23079
23080 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23081
23082         dirname code cleanup.  base_name now behaves more compatibly
23083         with POSIX basename when given file names that have trailing
23084         slashes, and similarly for dir_name.  Add new primitives
23085         base_len and dir_len.  Put the directory-name-related decls
23086         into dirname.h.
23087
23088         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
23089         * lib/backupfile.c (base_name): Likewise.
23090         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
23091         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
23092         * lib/makepath.c (strip_trailing_slashes): Likewise.
23093         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
23094         ISSLASH): Likewise.
23095         * lib/rename.c (strip_trailing_slashes): Likewise.
23096         * lib/same.c (base_name): Likewise.
23097         * lib/stripslash.c (ISSLASH): Likewise.
23098
23099         * lib/addext.c: Include <dirname.h> after size_t is defined.
23100         * lib/backupfile.c: Likewise.
23101
23102         * lib/addext.c (addext): Use base_len to trim redundant
23103         trailing slashes instead of doing it ourselves.
23104         But do not trim the last slash if it is not redundant.
23105
23106         * lib/backupfile.c (find_backup_file_name,
23107         max_backup_version): Use base_len instead of rolling it ourselves.
23108         Handle the case of "" and (on DOS) "C:" correctly.
23109
23110         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
23111         needed. Include <string.h>, <dirname.h>.
23112         (base_name): Allow file names ending in slashes, other than names
23113         that are all slashes.  In this case, return the basename followed
23114         by the slashes.  This is more general, and can be used in places
23115         where the original base_name purposely had an assertion failure.
23116         (base_len): New function.
23117
23118         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
23119         Do not include <assert.h>; no longer needed.
23120         Include xalloc.h.
23121         (memrchr): Remove decl.
23122         (dir_name_r): Remove.
23123         (dir_len): Renamed from dirlen.  All callers changed.
23124         Rewrite in terms of base_name, for simplicity and consistency.
23125         (dir_name): Never return NULL.  All callers changed.
23126         Do not include <stdlib.h> in test program; no longer needed.
23127         return 0; is fine for test program.
23128
23129         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
23130         New macros.
23131         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
23132
23133         * lib/path-concat.c (path_concat): Use base_len to compute
23134         base length, not strlen; this means we cannot rely on memcpy
23135         to null-terminate.
23136
23137         * lib/same.c (STREQ): Remove.
23138         (same_name): Handle the case where the basename ends in trailing '/'.
23139
23140         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
23141         a slash was stripped.  Do not strip the last slash after a
23142         file system prefix.
23143
23144 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23145
23146         * lib/Makefile.am (libfetish_a_SOURCES):
23147         Add strftime.c, since we now compile it on all hosts.
23148
23149         * lib/strftime.c (my_strftime):
23150         Define to nstrftime if emacs, but only if my_strftime is not defined.
23151         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
23152         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
23153         Add one more extra argument: a nanoseconds value.
23154         All uses changed.
23155         (ns): New macro.
23156         (my_strftime function): Add %N format.
23157         (emacs_strftimeu): Renamed from emacs_strftime,
23158         with extra ut argument.
23159
23160 2001-05-09  Paul Eggert  <eggert@twinsun.com>
23161
23162         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
23163
23164 2001-04-21  Jim Meyering  <meyering@lucent.com>
23165
23166         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
23167         doesn't interfere.
23168
23169 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23170
23171         * m4/ftruncate.m4: Check for chsize.
23172         Link with ftruncate.o unconditionally if ftruncate is missing.
23173         This was required when cross-compiling to i586-mingw32msvc.
23174
23175 2001-04-08  Jim Meyering  <meyering@lucent.com>
23176
23177         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
23178         recomputed; that's necessary when the offset spans a DST transition.
23179         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
23180
23181 2001-04-02  Jim Meyering  <meyering@lucent.com>
23182
23183         * lib/regex.h, regex.c: Update from GNU libc.
23184
23185 2001-03-24  Jim Meyering  <meyering@lucent.com>
23186
23187         * m4/jm-macros.m4: Require autoconf-2.49d.
23188
23189 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
23190
23191         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
23192
23193 2001-03-19  Paul Eggert  <eggert@twinsun.com>
23194
23195         * lib/version-etc.c (version_etc_copyright): Update to 2001.
23196
23197 2001-03-17  Jim Meyering  <meyering@lucent.com>
23198
23199         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
23200         now that the version in autoconf is equivalent.
23201         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
23202
23203         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
23204         Suggestion from Akim Demaille.
23205
23206         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
23207         (jm_PREREQ_TEMPNAME): New function.
23208
23209 2001-03-16  Paul Eggert  <eggert@twinsun.com>
23210
23211         * lib/tempname.c (uint64_t): Define to uintmax_t if
23212         not defined, and if UINT64_MAX is not defined.
23213         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
23214         Reported by John David Anglin.
23215
23216 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
23217
23218         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
23219         resolve alias if codeset is empty.
23220         * lib/config.charset (BeOS): Use wildcard syntax.
23221
23222 2001-03-13  Jim Meyering  <meyering@lucent.com>
23223
23224         * lib/path-concat.c (path_concat)
23225         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
23226         concatenating e.g., `C:' and `foo'.
23227         From Bruno Haible.
23228
23229 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23230
23231         * lib/localcharset.c (locale_charset): Don't use
23232         setlocale(LC_CTYPE,NULL). Don't return NULL.
23233         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
23234
23235 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23236
23237         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
23238         support for DOS/DJGPP.
23239
23240 2001-03-01  Paul Eggert  <eggert@twinsun.com>
23241
23242         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
23243         lacks mkstemp.  Compile our own tempname.c if we compile our own
23244         mkstemp.c, as mkstemp relies on tempname.
23245
23246 2001-03-01  Jim Meyering  <meyering@lucent.com>
23247
23248         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
23249         AH_VERBATIM really does output its argument verbatim.
23250
23251 2001-02-28  Paul Eggert  <eggert@twinsun.com>
23252
23253         * lib/Makefile.am (libfetish_a_SOURCES):
23254         Add dup-safer.c, fopen-safer.c.
23255         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
23256
23257         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
23258         * lib/unistd-safer.h: New files.
23259
23260 2001-02-25  Paul Eggert  <eggert@twinsun.com>
23261
23262         The mkstemp replacement is taken from glibc 2.2.2, with some
23263         portability fixes for use outside glibc, as follows:
23264
23265         * lib/tempname.c (struct_stat64): New macro.
23266         (direxists, __gen_tempname): Use it.
23267         This avoids a portability problem with Solaris 8.
23268
23269         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
23270         (<stddef.h>, <stdint.h>, <string.h>):
23271         Include only if STDC_HEADERS || _LIBC.
23272         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
23273         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
23274         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
23275         (__set_errno): Define this macro if <errno.h> doesn't.
23276         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
23277         Define these macros if <stdio.h> doesn't.
23278         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
23279         Define these macros if <sys/stat.h>
23280         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
23281         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
23282         __xstat64): Define if not _LIBC.
23283         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
23284         (__gen_tempname): Invoke gettimeofday only if
23285         HAVE_GETTIMEOFDAY || _LIBC;
23286         otherwise, fall back on plain "time".
23287         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
23288
23289         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
23290
23291         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
23292
23293 2001-02-18  Paul Eggert  <eggert@twinsun.com>
23294
23295         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
23296
23297 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23298
23299         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
23300         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
23301         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
23302         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23303
23304 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23305
23306         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
23307         Remove workaround macros for hosts that have mbrtowc but not
23308         mbstate_t, as we now insist on proper declarations for both
23309         before using mbrtowc.
23310
23311 2001-02-17  Jim Meyering  <meyering@lucent.com>
23312
23313         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
23314         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23315         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23316         UnixWare 7.1.1.
23317
23318         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23319         rather than AC_CACHE_VAL.
23320
23321 2001-02-17  Jim Meyering  <meyering@lucent.com>
23322
23323         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23324         around included file name.
23325
23326         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23327
23328         * lib/strftime.c: Update from GNU libc (the only changes were to
23329         comments).
23330
23331 2001-02-17  Jim Meyering  <meyering@lucent.com>
23332
23333         * lib/regex.c: Update from libc.
23334
23335 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23336
23337         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23338         clash.
23339
23340 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23341
23342         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23343         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23344         Reported by Mark Hounschell via Paul Eggert.
23345
23346 2001-02-07  Jim Meyering  <meyering@lucent.com>
23347
23348         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23349
23350 2001-02-05  Jim Meyering  <meyering@lucent.com>
23351
23352         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23353         it includes the patch required for `large file' support with at least
23354         HP-UX's 10.20 /bin/cc.
23355
23356 2001-02-03  Jim Meyering  <meyering@lucent.com>
23357
23358         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23359         AS_IF, now that it works once again (mysteriously).
23360         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23361
23362 2001-01-30  Jim Meyering  <meyering@lucent.com>
23363
23364         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23365         * m4/chown.m4: Rename conftestchown to conftest.chown.
23366         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23367         s/conftestdir2/conftest.d2/.
23368         * m4/utimes.m4: s/conftestdata/conftest.data/
23369         Inspired by Pavel Roskin's change in autoconf.
23370
23371 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23372
23373         * lib/config.charset: Update for FreeBSD 4.2.
23374
23375 2001-01-27  Jim Meyering  <meyering@lucent.com>
23376
23377         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23378         a use of AS_IF.
23379         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23380
23381 2001-01-26  Jim Meyering  <meyering@lucent.com>
23382
23383         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23384         quotearg.c includes it.
23385
23386 2001-01-26  Jim Meyering  <meyering@lucent.com>
23387
23388         * lib/quotearg.c: Include stddef.h.
23389         * lib/quote.c: Include stddef.h.
23390         Reported by Axel Kittenberger.
23391
23392         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23393         line in double quotes so that it evokes a better diagnostic.
23394         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23395         Reported by Axel Kittenberger.
23396
23397 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23398
23399         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23400         as if it was a `charset'.
23401
23402 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23403
23404         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23405         has const.
23406
23407 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23408
23409         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23410         to avoid a warning.  Add back 'const' to inptr.
23411
23412 2001-01-20  Jim Meyering  <meyering@lucent.com>
23413
23414         Be sure that headers are checked before used in code compiled
23415         for the type checks.
23416         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23417         In place of that, invoke jm_CHECK_ALL_TYPES.
23418         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23419         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23420         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23421         The check for ssize_t was mistakenly run before the test for unistd.h.
23422
23423         The configure-time check for stdbool.h was missing.
23424         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23425         (jm_PREREQ_HASH): New function.
23426
23427 2001-01-17  Jim Meyering  <meyering@lucent.com>
23428
23429         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23430         for autoconf-2.49c.
23431         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23432
23433 2001-01-16  Jim Meyering  <meyering@lucent.com>
23434
23435         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23436         From Bruno Haible.
23437
23438 2001-01-14  Jim Meyering  <meyering@lucent.com>
23439
23440         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23441         foo and bar.  Create conftestdir/ in the script, not in the C code.
23442         Remove directories in the script, not in the C code.
23443         Remove conftestdir{,2} before trying to create the directory.
23444         Make the entire configure script fail if the mkdir fails.
23445
23446 2001-01-14  Jim Meyering  <meyering@lucent.com>
23447
23448         * lib/rename.c: New file.  From Volker Borchert.
23449         Include stdlib.h, string.h or strings.h, and xalloc.h.
23450         Use strip_trailing_slashes rather than open-coding it.
23451
23452 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23453
23454         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
23455
23456 2001-01-03  Jim Meyering  <meyering@lucent.com>
23457
23458         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
23459         of local `inptr' to avoid warning with some system declarations of
23460         iconv.
23461
23462 2001-01-02  Volker Borchert  <bt@teknon.de>
23463
23464         * m4/rename.m4: New file.
23465         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23466
23467 2001-01-01  Jim Meyering  <meyering@lucent.com>
23468
23469         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23470         even on systems with utmpx.h.  It's necessary for the declaration of
23471         utmp's ut_user member.  Reported by Andreas Jaeger.
23472
23473         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23474         available. They are required for the declarations of getgrgid and
23475         getpwuid resp.
23476         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23477         Reported by Andreas Jaeger.
23478
23479 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
23480
23481         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
23482         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
23483         so `make install' also works in VPATH builds.
23484
23485 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
23486
23487         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
23488         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
23489         can be used in subdirectories.
23490
23491 2000-12-29  Paul Eggert  <eggert@twinsun.com>
23492
23493         * lib/modechange.c: Do not assume that mode_t uses the
23494         traditional octal encoding.  E.g. "chmod 1 FOO" should set
23495         the other-execute bit of FOO even if S_IXOTH != 1.
23496
23497         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23498         WOTH, XOTH, ALLM): New macros.
23499         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
23500          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
23501         Use them.
23502         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
23503         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
23504         (mode_compile):
23505         No need to use uintmax_t; unsigned long is long enough.
23506         Don't bother to get suffix since we don't use it.
23507
23508 2000-12-26  Jim Meyering  <meyering@lucent.com>
23509
23510         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
23511         better with autoheader.
23512
23513 2000-12-24  Jim Meyering  <meyering@lucent.com>
23514
23515         * lib/hash.c (is_prime): Return explicit boolean values.
23516         (hash_get_first): Return NULL to appease Irix5.6's 89.
23517         Reported by Nelson Beebe.
23518
23519 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
23520
23521         * lib/localcharset.c (locale_charset): Add support for Win32.
23522
23523 2000-12-18  Paul Eggert  <eggert@twinsun.com>
23524
23525         * lib/physmem.h, lib/physmem.c: New files.
23526
23527         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23528         (noinst_HEADERS): Add physmem.h.
23529
23530         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23531         't' for compatibility with Solaris 8 sort.
23532
23533 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23534
23535         * lib/config.charset: Add support for BeOS.
23536
23537 2000-12-17  Jim Meyering  <meyering@lucent.com>
23538
23539         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23540         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23541
23542 2000-12-16  Jim Meyering  <meyering@lucent.com>
23543
23544         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23545         N and M) would have treated it like `chown N:N FILE'.
23546
23547         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23548
23549 2000-12-16  Jim Meyering  <meyering@lucent.com>
23550
23551         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23552         SHELLS_FILE to a file name that's useful on djgpp systems.
23553         Include stdlib.h.
23554         (ADDITIONAL_DEFAULT_SHELLS): Define.
23555         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23556         Based mostly on a patch from Prashant TR.
23557
23558 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23559
23560         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23561         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23562         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23563
23564 2000-12-08  Andreas Schwab  <schwab@suse.de>
23565
23566         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23567         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23568
23569 2000-12-07  Jim Meyering  <meyering@lucent.com>
23570
23571         * lib/stripslash.c (ISSLASH): Define.
23572         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23573         `/'.
23574         From Prashant TR.
23575
23576         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23577         (dir_name_r): Declare this function as static.
23578         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23579         manifest itself on a name containing a mix of slashes and
23580         backslashes.
23581         Make this function work with names starting with a DOS-style
23582         drive letter and colon prefix.
23583         (dir_name): Append `.' if necessary.
23584         Based mostly on patches from Prashant TR and Eli Zaretskii.
23585
23586         * lib/dirname.h (dir_name_r): Remove prototype.
23587
23588 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23589
23590         * m4/off_t-format.m4: Remove this file.
23591         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23592
23593 2000-12-06  Jim Meyering  <meyering@lucent.com>
23594
23595         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23596         replacement strtoull, we may well need the replacement strtoul, too.
23597         Check for declarations of strtoul and strtoull.
23598         Check for strtol.  Mainly as a cue to cause automake to include
23599         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23600         Check for limits.h -- strtol.c needs it.
23601
23602 2000-12-05  Jim Meyering  <meyering@lucent.com>
23603
23604         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23605
23606 2000-12-04  Jim Meyering  <meyering@lucent.com>
23607
23608         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23609         Also include memory.h, stdlib.h, unistd.h if appropriate.
23610         Reported by Andreas Jaeger (conflicting declaration of malloc).
23611
23612 2000-12-02  Jim Meyering  <meyering@lucent.com>
23613
23614         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23615         * m4/jm-macros.m4 (jm_MACROS): require it.
23616
23617 2000-12-02  Jim Meyering  <meyering@lucent.com>
23618
23619         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23620
23621 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23622
23623         * lib/memrchr.c: Include <config.h> before any system include file.
23624
23625 2000-11-30  Jim Meyering  <meyering@lucent.com>
23626
23627         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23628
23629 2000-11-30  Jim Meyering  <meyering@lucent.com>
23630
23631         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23632
23633 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23634
23635         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23636
23637 2000-11-26  Jim Meyering  <meyering@lucent.com>
23638
23639         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23640
23641 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23642
23643         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23644         size of (size_t) -1; it's not portable.
23645
23646 2000-11-17  Jim Meyering  <meyering@lucent.com>
23647
23648         * lib/strstr.c: Update from GNU libc.
23649
23650 2000-11-17  Akim Demaille  <akim@epita.fr>
23651
23652         * lib/obstack.h: Formatting changes.
23653         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23654         prevent type checking.
23655         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23656         cast the value to (void *): assigning a `foo *' to a `void *'
23657         variable is valid.
23658         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23659
23660 2000-11-16  Jim Meyering  <meyering@lucent.com>
23661
23662         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23663
23664 2000-11-11  Jim Meyering  <meyering@lucent.com>
23665
23666         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23667
23668 2000-11-10  Jim Meyering  <meyering@lucent.com>
23669
23670         * lib/obstack.h: Update from GNU libc.
23671         * lib/obstack.c: Likewise.
23672
23673 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23674
23675         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23676
23677 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23678
23679         * lib/getusershell.c (setusershell): Use rewind rather than
23680         fseek/fseeko, to avoid configuration hassles with fseeko.
23681         Don't bother opening SHELLS_FILE if shellstream is NULL;
23682         it's not necessary.
23683
23684 2000-11-05  Jim Meyering  <meyering@lucent.com>
23685
23686         * lib/makepath.h (make_dir): Declare.
23687         * lib/makepath.c (make_dir): Remove `static' attribute.
23688         Tweak a comment.
23689
23690 2000-11-04  Jim Meyering  <meyering@lucent.com>
23691
23692         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23693
23694 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23695
23696         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23697         last one in a bucket, advance to the next bucket.
23698
23699 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23700
23701         * lib/fnmatch.c: Do not comment out all the code if we are using
23702         the GNU C library, because in some cases we are replacing buggy
23703         code in the GNU C library itself.
23704
23705 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23706
23707         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23708         (regex_compile): Catch bogus \(\1\).
23709
23710 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23711
23712         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23713         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23714         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23715
23716 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23717
23718         * lib/error.h, getline.h, modechange.h:
23719         Remove "2000" from Copyright line, as the file hasn't been
23720         changed this year other than in the copyright notice.
23721
23722         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23723         was changed this year.
23724
23725 2000-10-29  Jim Meyering  <meyering@lucent.com>
23726
23727         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23728         renaming.
23729         * m4/ls-mntd-fs.m4: Likewise
23730
23731 2000-10-29  Jim Meyering  <meyering@lucent.com>
23732
23733         * lib/xstat.in: Fix grammar in comment.
23734
23735 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23736
23737         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23738         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23739         doesn't define __restrict_arr.
23740
23741 2000-10-28  Jim Meyering  <meyering@lucent.com>
23742
23743         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23744         (jm_PREREQ_MEMCHR): New function.
23745
23746 2000-10-28  Jim Meyering  <meyering@lucent.com>
23747
23748         * lib/memchr.c: Update from libc.
23749         Adjust for portability:
23750         [HAVE_STDLIB_H]: Include stdlib.h.
23751         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23752         Undef __memchr, too.
23753         [!weak_alias]: Define __memchr to memchr.
23754
23755         * lib/regex.c: Update from libc.
23756         * lib/regex.h: Likewise.
23757         * lib/getopt1.c: Likewise.
23758         * lib/memcmp.c: Likewise.
23759
23760         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23761         Avoid using fseek, when possible -- it's broken by design.
23762         Patch by Ulrich Drepper.
23763
23764 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23765
23766         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23767         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23768         Giving in to popular pressure to shut up the compiler with casts.
23769
23770 2000-10-26  Jim Meyering  <meyering@lucent.com>
23771
23772         * lib/strftime.c: Update from libc.
23773
23774 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23775
23776         * regex.c: More `unsigned char' -> `re_char' changes.
23777         Also change several `int' into `re_wchar_t'.
23778         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23779         (PUSH_FAILURE_POINTER): Don't cast any more.
23780         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23781         We want GCC to complain, since this piece of code makes
23782         re_match non-reentrant, which *should* be fixed.
23783         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23784         (EXTEND_BUFFER): Use RETALLOC.
23785         (SET_LIST_BIT): Don't cast.
23786         (re_wchar_t): New type.
23787         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23788         that those two functions will always properly return.
23789         (IMMEDIATE_QUIT_CHECK): Cast to void.
23790         (analyse_first): Use recursion rather than an explicit stack.
23791         (re_compile_fastmap): Can't fail anymore.
23792         (re_search_2): Don't check re_compile_fastmap for failure.
23793         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
23794         Now also sets the new value (passed in a new argument).
23795         (re_match_2_internal): Use it.
23796         Also, use a new var `reg' of type size_t when looping through regs
23797         rather than reuse the inappropriate `mcnt'.
23798
23799 2000-10-25  Jim Meyering  <meyering@lucent.com>
23800
23801         * lib/obstack.c: Update from libc.
23802
23803 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
23804
23805         * regex.c (regex_compile): Change the way of handling a range from
23806         a char less than 256 to a char not less than 256.
23807
23808 2000-10-24  Andrew Innes  <andrewi@gnu.org>
23809
23810         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
23811         NT-Emacs only.
23812         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
23813         so that re_search functions only quit when callers expect them to.
23814
23815 2000-10-23  Jim Meyering  <meyering@lucent.com>
23816
23817         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
23818         wrong.  That set_locale call must not have any side effects.
23819         From Paul Eggert.
23820
23821 2000-10-22  Jim Meyering  <meyering@lucent.com>
23822
23823         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
23824         [CYCLIC]: Remove now-unused definition.
23825
23826         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
23827         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
23828         Suggestion from Ulrich Drepper.
23829
23830 2000-10-21  Jim Meyering  <meyering@lucent.com>
23831
23832         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
23833         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
23834         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
23835
23836 2000-10-21  Jim Meyering  <meyering@lucent.com>
23837
23838         * lib/dirname.c (memrchr): Declare if necessary.
23839         (dir_name): Remove the restriction that there be no
23840         trailing slashes.  Now, this code skips past them, effectively
23841         ignoring them.
23842         [TEST_DIRNAME] (main): New unit tests.
23843
23844         * lib/memrchr.c: New file from GNU libc.
23845         Undef __memrchr, too.
23846         [!weak_alias]: Define __memrchr to memrchr.
23847         Guard weak_alias use with `#ifdef weak_alias'.
23848
23849 2000-10-21  Jim Meyering  <meyering@lucent.com>
23850
23851         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
23852         (dir_name): Use dir_name_r.
23853         * lib/dirname.h (dir_name_r): Declare it.
23854
23855 2000-10-17  Jim Meyering  <meyering@lucent.com>
23856
23857         * lib/quote.h (PARAMS): Define and use.
23858         Reported by Akim Demaille.
23859
23860         * lib/getopt.c: Update from libc.
23861
23862 2000-10-16  Jim Meyering  <meyering@lucent.com>
23863
23864         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
23865         setlocale.
23866         From Jan Fedak.
23867
23868 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
23869
23870         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
23871
23872 2000-09-25  Jim Meyering  <meyering@lucent.com>
23873
23874         * lib/md5.h (rol): Define (from GnuPG).
23875
23876         * lib/sha.c: Give credit (GnuPG) where due.
23877         (M): Use rol rather than open-coding it.
23878         Add a FIXME comment.
23879
23880 2000-09-21  Jim Meyering  <meyering@lucent.com>
23881
23882         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
23883         Reported by Michael Stone.
23884
23885 2000-09-20  Jim Meyering  <meyering@lucent.com>
23886
23887         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
23888         (noinst_HEADERS): Add sha.h.
23889         Based on code from Scott G. Miller and from GnuPG.
23890
23891 2000-09-18  Jim Meyering  <meyering@lucent.com>
23892
23893         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
23894         LIBS. Otherwise, everyone ends up linking with -lelf for some
23895         configurations.
23896         Reported by Mike Stone.
23897
23898 2000-09-15  Jim Meyering  <meyering@lucent.com>
23899
23900         * lib/regex.c: Update from libc.
23901
23902 2000-09-10  Jim Meyering  <meyering@lucent.com>
23903
23904         * lib/getopt.c (_getopt_internal): Update from glibc.
23905
23906 2000-09-09  Jim Meyering  <meyering@lucent.com>
23907
23908         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
23909         think it should be used as a general replacement for isascii.
23910         * lib/fnmatch.c: Likewise.
23911         * lib/mbswidth.c: Likewise
23912         * lib/regex.c: Likewise.
23913
23914         Don't use atoi.
23915         * lib/userspec.c: Include sys/param.h and limits.h.
23916         Include xstrtol.h.
23917         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23918         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
23919         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
23920         UID, GID.  Check range.
23921
23922 2000-09-06  Jim Meyering  <meyering@lucent.com>
23923
23924         * lib/getopt.c (_getopt_internal): Update from glibc.
23925
23926 2000-08-30  Jim Meyering  <meyering@lucent.com>
23927
23928         * lib/strftime.c: Merge in changes from GNU libc.
23929
23930 2000-08-26  Jim Meyering  <meyering@lucent.com>
23931
23932         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
23933         * m4/fpending.m4: New file.
23934
23935 2000-08-26  Jim Meyering  <meyering@lucent.com>
23936
23937         * lib/closeout.c: Include "__fpending.h".
23938         (close_stdout_status): Return right away if there's nothing to flush.
23939
23940         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
23941         * lib/__fpending.c: New file.
23942         * lib/__fpending.h: New file.
23943
23944 2000-08-20  Jim Meyering  <meyering@lucent.com>
23945
23946         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
23947         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
23948         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
23949
23950 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
23951
23952         Improve fileutils installation on systems where running
23953         programs (like install) can't be unlinked.
23954         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
23955         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
23956
23957 2000-08-07  Paul Eggert  <eggert@twinsun.com>
23958
23959         Standardize on "memory exhausted" instead of "Memory exhausted"
23960         or "virtual memory exhausted".
23961         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
23962         "virtual memory exhausted".
23963         * lib/same.c (same_name): Invoke xalloc_die instead of printing
23964         our own message.
23965         * lib/userspec.c (parse_user_spec): Likewise.
23966         * lib/bumpalloc.h: comment fix
23967         * lib/same.c, userspec.c: Include xalloc.h.
23968
23969         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
23970         not char *const and pointing to a constant array.
23971         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
23972         (xrealloc): Comment fix.
23973
23974         * lib/userspec.c (parse_user_spec):
23975         Don't translate a message until just before returning,
23976         to avoid unnecessary translation.
23977
23978 2000-08-07  Jim Meyering  <meyering@lucent.com>
23979
23980         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
23981         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
23982         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
23983         getgroups.c, gethostname.c, getopt.h, group-member.c,
23984         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
23985         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
23986         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
23987         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
23988         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
23989         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
23990         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
23991         yesno.c: Back out Copyright date changes for each file with no change
23992         this year.  This eases coordination with other programs using the same
23993         source code modules.  From Paul Eggert.
23994
23995 2000-08-06  Paul Eggert  <eggert@twinsun.com>
23996
23997         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
23998         not char, for compatibility with glibc 2.1.3 strftime.c.
23999
24000 2000-08-03  Greg McGary  <greg@mcgary.org>
24001
24002         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
24003         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
24004         (EXTEND_BUFFER): Use them.
24005
24006 2000-08-01  Jim Meyering  <meyering@lucent.com>
24007
24008         * lib/dirname.c (ISSLASH): Define.
24009         (BACKSLASH_IS_PATH_SEPARATOR): Define.
24010         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
24011         both `\' and `/' may be use as path separators.
24012         Based on a patch from Prashant TR.
24013
24014 2000-07-31  Paul Eggert  <eggert@twinsun.com>
24015
24016         * lib/quotearg.c (quotearg_n_options): Don't make the initial
24017         slot vector a constant, since it might get modified.
24018
24019 2000-07-31  Jim Meyering  <meyering@lucent.com>
24020
24021         * lib/xmalloc.c: Use `virtual memory exhausted', not
24022         `Memory exhausted'.
24023         * lib/obstack.c (print_and_abort): Likewise.
24024
24025 2000-07-30  Paul Eggert  <eggert@twinsun.com>
24026
24027         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
24028         buffer, so that the caller can always quote one small
24029         component of a "memory exhausted" message in slot 0.
24030         From a suggestion by Jim Meyering.
24031
24032 2000-07-30  Jim Meyering  <meyering@lucent.com>
24033
24034         * lib/makepath.c (make_path): Quote the other instance, too.
24035
24036         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
24037         (STATIC_BUF_SIZE): Define.
24038         (quotearg_n_options): Use only statically allocated storage when
24039         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
24040         than STATIC_BUF_SIZE.
24041
24042 2000-07-29  Jim Meyering  <meyering@lucent.com>
24043
24044         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24045         * lib/dirname.c (dir_name): Likewise.
24046
24047         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24048         `/'.
24049
24050         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24051         (dir_name): Assert that there are no trailing slashes.
24052
24053 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24054
24055         * lib/mbswidth.h (mbswidth): Add a flags argument.
24056         (mbswidth): New declaration.
24057         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24058         * lib/mbswidth.c (mbswidth): Add a flags argument.
24059         (mbsnwidth): New function.
24060
24061 2000-07-24  Jim Meyering  <meyering@lucent.com>
24062
24063         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24064
24065 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24066
24067         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24068
24069 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24070
24071         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24072         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24073         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24074         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24075         invoke multibyte primitives.
24076
24077 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24078
24079         * lib/quotearg.c:
24080         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
24081         so that mbstate_t is always defined.
24082
24083         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
24084         be 1 in at least one GCC installation, and this configuration
24085         error is likely to be common.  Ignoring MB_LEN_MAX hurts
24086         performance on hosts that have mbrtowc but have only unibyte
24087         locales, but I assume these hosts are rare.
24088
24089 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24090
24091         * lib/mbswidth.c (_XOPEN_SOURCE):
24092         Don't define; this causes problems on Solaris 7.
24093         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
24094
24095 2000-07-23  Jim Meyering  <meyering@lucent.com>
24096
24097         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
24098         too: getgrgid, getpwuid, getuid.
24099
24100 2000-07-23  Jim Meyering  <meyering@lucent.com>
24101
24102         * lib/basename.c (base_name): Add an assertion.
24103
24104 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
24105
24106         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
24107         shadow its mbsinit function.
24108
24109 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24110
24111         * lib/mbswidth.h: New file.
24112         * lib/mbswidth.c: New file.
24113         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
24114         (noinst_HEADERS): Add mbswidth.h.
24115
24116 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24117
24118         * lib/config.charset: Add support for FreeBSD. Improve support for
24119         HP-UX and IRIX 6.
24120
24121 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
24122
24123         * m4/mbswidth.m4: New file.
24124         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
24125
24126 2000-07-15  Jim Meyering  <meyering@lucent.com>
24127
24128         * lib/makepath.c: Include quote.h.
24129         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
24130         corresponding argument in a `quote (...)' call.
24131         Give better diagnostics.
24132
24133         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
24134         (noinst_HEADERS): Add quote.h.
24135
24136         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
24137         from tar's src/misc.c.
24138         * lib/quote.h: New file.  Prototypes for same.
24139
24140 2000-07-14  Paul Eggert  <eggert@twinsun.com>
24141
24142         From a suggestion by Bruno Haible.
24143         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
24144         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
24145         to decide whether to define the BeOS workaround macro;
24146         this adjusts to the change to AC_MBSTATE_T.
24147
24148 2000-07-14  Jim Meyering  <meyering@lucent.com>
24149
24150         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
24151         jm_AC_TYPE_UINTMAX_T.
24152
24153 2000-07-13  Paul Eggert  <eggert@twinsun.com>
24154
24155         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
24156
24157         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
24158         quotearg_buffer_restyled): Add support for
24159         clocale_quoting_style.  Undo previous change to
24160         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
24161         and "{RIGHT QUOTATION MARK}" msgids.
24162
24163 2000-07-10  Paul Eggert  <eggert@twinsun.com>
24164
24165         From a suggestion by Bruno Haible.
24166         * m4/mbstate_t.m4 (AC_MBSTATE_T):
24167         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
24168         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
24169         and mbstate_t, to a single-part test that simply defines mbstate_t.
24170         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
24171         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
24172
24173 2000-07-10  Jim Meyering  <meyering@lucent.com>
24174
24175         * m4/strerror_r.m4: Mirror the correction made in autoconf.
24176
24177         * m4/gnu-source.m4: Output to confdefs.h directly.
24178         Suggestion from Akim Demaille.
24179
24180 2000-07-09  Paul Eggert  <eggert@twinsun.com>
24181
24182         The old behavior of quoting `like this' doesn't look good with
24183         newer, ISO-style fonts.  See:
24184         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
24185
24186         Instead, quote "like this" by default.  Let the translator
24187         tailor the locale-specific quoting behavior by providing
24188         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
24189
24190         * lib/quotearg.c (N_): New macro.
24191         (gettext_default): New function.
24192         (quotearg_buffer_restyled): Use
24193         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
24194         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
24195
24196 2000-07-09  Jim Meyering  <meyering@lucent.com>
24197
24198         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
24199         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
24200
24201         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
24202         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
24203
24204 2000-07-09  Jim Meyering  <meyering@lucent.com>
24205
24206         * lib/Most files: Update copyright dates to include 2000.
24207
24208 2000-07-08  Jim Meyering  <meyering@lucent.com>
24209
24210         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
24211         if not defined.
24212         (xgethostname): Remove now-unnecessary #ifdef.
24213         Move declaration of `err' into loop where it's used.
24214
24215 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24216         and Bruno Haible  <haible@clisp.cons.org>
24217
24218         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
24219         only if the test for an object-type mbstate_t fails.  This
24220         prevents us from mistakenly reporting that mbstate_t is a
24221         system object type after we "#define mbstate_t int" to work
24222         around its lack.
24223
24224 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24225         and Bruno Haible  <haible@clisp.cons.org>
24226
24227         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
24228
24229 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24230
24231         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
24232         to strerror_r.
24233         Include <ctype.h> for use of isalpha.
24234
24235 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24236
24237         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
24238         by allocating a larger buffer. Test the gethostname return value for
24239         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
24240         returns an error and ENAMETOOLONG isn't defined.
24241
24242 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24243
24244         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
24245         dimension.
24246
24247 2000-07-04  Jim Meyering  <meyering@lucent.com>
24248
24249         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
24250         of the deprecated AC_CHECKING.
24251
24252 2000-07-04  Jim Meyering  <meyering@lucent.com>
24253
24254         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
24255         Reported by Bruno Haible.
24256
24257 2000-07-04  Jim Meyering  <meyering@lucent.com>
24258
24259         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
24260         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
24261         lacks mbrtowc.
24262
24263 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24264
24265         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
24266         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
24267
24268 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24269         and Bruno Haible  <haible@clisp.cons.org>
24270
24271         * lib/quotearg.c (mbrtowc):
24272         Assign to *pwc, and return 1 only if result is nonzero.
24273         (iswprint): Use ISPRINT when substituting our own mbrtowc.
24274
24275 2000-07-03  Jim Meyering  <meyering@lucent.com>
24276
24277         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
24278
24279 2000-07-03  Jim Meyering  <meyering@lucent.com>
24280
24281         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
24282         This is necessary to get a definition of e.g., UTMP_FILE on
24283         HP-UX 10.20.
24284         From Bob Proulx.
24285
24286 2000-07-02  Jim Meyering  <meyering@lucent.com>
24287
24288         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
24289
24290         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
24291         AC_LIBOBJ(function_name).
24292         * m4/chown.m4: Likewise.
24293         * m4/fnmatch.m4: Likewise.
24294         * m4/ftruncate.m4: Likewise.
24295         * m4/getgroups.m4: Likewise.
24296         * m4/getline.m4: Likewise.
24297         * m4/group-member.m4: Likewise.
24298         * m4/jm-macros.m4: Likewise.
24299         * m4/lstat.m4: Likewise.
24300         * m4/malloc.m4: Likewise.
24301         * m4/memcmp.m4: Likewise.
24302         * m4/nanosleep.m4: Likewise.
24303         * m4/putenv.m4: Likewise.
24304         * m4/realloc.m4: Likewise.
24305         * m4/regex.m4: Likewise.
24306         * m4/stat.m4: Likewise.
24307         * m4/strftime.m4: Likewise.
24308
24309 2000-07-02  Jim Meyering  <meyering@lucent.com>
24310
24311         * lib/quotearg.c (mbstate_t): Don't define here.
24312
24313 2000-07-02  Jim Meyering  <meyering@lucent.com>
24314
24315         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24316
24317 2000-07-01  Jim Meyering  <meyering@lucent.com>
24318
24319         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24320
24321 2000-07-01  Jim Meyering  <meyering@lucent.com>
24322
24323         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24324         problem.
24325
24326 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24327
24328         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24329         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24330
24331 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24332
24333         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24334         per change in ../m4/ls-mntd-fs.m4.
24335         (read_filesystem_list): Ignore symbolic links.
24336
24337 2000-06-29  Jim Meyering  <meyering@lucent.com>
24338
24339         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24340         for declaration of strcmp.
24341
24342         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24343
24344         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24345         Avoid warning by casting result to `char *' to remove `const'.
24346
24347 2000-06-28  Jim Meyering  <meyering@lucent.com>
24348
24349         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24350         included by quotearg.c, for which we perform this test.  From
24351         Bruno Haible.
24352
24353 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24354
24355         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24356         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24357         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24358
24359 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24360
24361         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24362
24363 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24364
24365         savedir now sets errno on failure and invokes xmalloc to get memory.
24366         Fix a couple of other minor bugs while we're at it.
24367
24368         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24369         (NAMLEN): Remove macro.
24370         (malloc, realloc): Remove decls.
24371         (stpcpy): Likewise.
24372         ("xalloc.h"): Include.
24373         (NAME_SIZE_DEFAULT): New macro.
24374         (savedir): Use xmalloc / xrealloc to allocate memory.
24375         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24376         Skip "" directory entries.
24377         Use strlen to calculate directory entry length, since the old method
24378         is rarely used these days and isn't worth supporting.
24379         Don't use a pointer after freeing it.
24380         Check for integer overflow when calculating allocation size.
24381         Use memcpy to copy entries, instead of stpcpy.
24382         Set errno properly when returning NULL.
24383         Check for readdir error.
24384
24385 2000-06-26  Jim Meyering  <meyering@lucent.com>
24386
24387         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24388
24389 2000-06-25  Jim Meyering  <meyering@lucent.com>
24390
24391         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24392         Linux header bug when _XOPEN_SOURCE is defined to 500.
24393
24394 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24395
24396         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24397         deficiency.
24398
24399 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24400
24401         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24402         Include xalloc.h.
24403         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24404
24405 2000-06-24  Jim Meyering  <meyering@lucent.com>
24406
24407         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24408         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24409         for which strerror does return char*, but which lacks a conveniently
24410         accessible declaration of the function.  If the compile-test says
24411         strerror_r doesn't work, then resort to a `run'-test that works on
24412         BeOS and segfaults on DEC Unix.
24413
24414 2000-06-24  Jim Meyering  <meyering@lucent.com>
24415
24416         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24417
24418 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24419
24420         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24421         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24422
24423 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24424
24425         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24426         (mbrtowc, mbstate_t): Define substitutes if
24427         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24428         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24429         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24430
24431 2000-06-23  Jim Meyering  <meyering@lucent.com>
24432
24433         * m4/afs.m4: Add missing AC_MSG_RESULT.
24434         Reported by Bruno Haible.
24435
24436         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24437         Suggestion from Bruno Haible.
24438
24439 2000-06-23  Jim Meyering  <meyering@lucent.com>
24440
24441         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24442
24443 2000-06-21  Jim Meyering  <meyering@lucent.com>
24444
24445         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24446
24447 2000-06-21  Jim Meyering  <meyering@lucent.com>
24448
24449         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24450         (noinst_HEADERS): Add getstr.h.
24451
24452         * lib/getline.c (getstr): Move into a separate file.
24453         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24454         the following changes: new parameter, delim2; both delim[12]
24455         parameters have type `int', not `char'.  The latter would lose
24456         with 8-bit delimiters.
24457         * lib/getstr.h: New file.
24458
24459 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24460
24461         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24462         than 1024, return a memory chunk of least possible size, instead
24463         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24464         Use free/xmalloc instead of xrealloc to avoid copying for very long
24465         paths.
24466
24467 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24468
24469         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24470         the empty string.
24471
24472 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24473
24474         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24475         address, not strdup.  Include <stdlib.h> and don't declare free().
24476
24477 2000-06-19  Jim Meyering  <meyering@lucent.com>
24478
24479         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
24480
24481 2000-06-18  Jim Meyering  <meyering@lucent.com>
24482
24483         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
24484
24485         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
24486         `checking whether...' message to be consistent with that of the
24487         lstat test.
24488
24489 2000-06-18  Jim Meyering  <meyering@lucent.com>
24490
24491         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
24492         Besides, these days every porting target provides a mkdir function.
24493
24494         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
24495         needed. (this snippet comes from src/system.h).
24496
24497 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
24498
24499         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
24500
24501 2000-06-15  Paul Eggert  <eggert@twinsun.com>
24502
24503         * lib/human.c (adjust_value): New function.
24504         (human_readable_inexact): Apply rounding style even when
24505         printing approximate values.
24506
24507 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24508
24509         * lib/human.c (human_readable_inexact): Allow an input block
24510         size that is not a multiple of the output block size, and vice versa.
24511         Reported by Piergiorgio Sartor.
24512
24513 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24514
24515         * lib/getdate.y (get_date): Apply relative times after time
24516         zone indicator, not before.  Reported by Todd A. Jacobs.
24517
24518 2000-06-13  Jim Meyering  <meyering@lucent.com>
24519
24520         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
24521
24522         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
24523
24524 2000-06-12  Paul Eggert  <eggert@twinsun.com>
24525
24526         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24527
24528 2000-06-12  Jim Meyering  <meyering@lucent.com>
24529
24530         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24531         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24532         optional argument.
24533         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24534         the optional argument, `lib'.
24535
24536 2000-06-08  Jim Meyering  <meyering@lucent.com>
24537
24538         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24539
24540 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24541
24542         Rewrite largefile configuration so that we don't need to run
24543         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24544         AC_CANONICAL_HOST in configure.in -- jmm]
24545
24546         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24547         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24548         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24549         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24550         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24551         All uses changed.
24552         Instead of inspecting the output of getconf, try to compile the
24553         test program without and with the macro definition.
24554         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24555         for getconf.  Instead, check for the needed flags by compiling
24556         test programs.
24557
24558 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24559
24560         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24561
24562 2000-06-04  Jim Meyering  <meyering@lucent.com>
24563
24564         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24565         SunOS 4.1.4 for which gid_t is an unsigned type.
24566
24567 2000-06-03  Jim Meyering  <meyering@lucent.com>
24568
24569         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24570         now that autoconf requires that.
24571
24572         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24573         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24574         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24575
24576 2000-06-03  Jim Meyering  <meyering@lucent.com>
24577
24578         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24579
24580 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24581
24582         * m4/glibc21.m4: New file.
24583         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24584
24585 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24586
24587         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24588         newer, don't install charset.alias.
24589         * lib/config.charset: Change the Linux/glibc rules so they become empty
24590         on glibc-2.1 or newer.
24591
24592 2000-06-02  Jim Meyering  <meyering@lucent.com>
24593
24594         * lib/mountlist.c: Back out last change.  Instead, do this...
24595         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24596         me_dummy member using the same `ignore'-testing code.
24597         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24598         fs_type strings.
24599         From Mark D. Roth.
24600
24601 2000-05-29  Jim Meyering  <meyering@lucent.com>
24602
24603         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24604         mounts with the `ignore' attribute.  Based on a patch from
24605         Mark D. Roth.
24606
24607 2000-05-28  Jim Meyering  <meyering@lucent.com>
24608
24609         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24610         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24611         * m4/stat.m4: Likewise.
24612         * m4/lstat.m4: Likewise.
24613         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24614
24615         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24616         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24617
24618 2000-05-26  Jim Meyering  <meyering@lucent.com>
24619
24620         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24621
24622 2000-05-24  Jim Meyering  <meyering@lucent.com>
24623
24624         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24625         autoconf requires that.
24626         * m4/lib-check.m4: Likewise.
24627         * m4/jm-macros.m4: Likewise.
24628         * m4/strftime.m4: Likewise.
24629
24630         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24631         AC_CHECK_DECLS, now that autoconf requires that.
24632
24633 2000-05-22  Jim Meyering  <meyering@lucent.com>
24634
24635         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24636         * m4/lstat.m4: Likewise.
24637
24638 2000-05-22  Jim Meyering  <meyering@lucent.com>
24639
24640         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24641
24642 2000-05-20  Jim Meyering  <meyering@lucent.com>
24643
24644         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24645         (jm_PREREQ): Use it.
24646
24647 2000-05-18  Jim Meyering  <meyering@lucent.com>
24648
24649         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24650         back, too, since it may have been modified by allocate_entry.
24651         (hash_delete): Rewrite to use neither the assignment operator
24652         nor the comma operator in an if-expression.
24653
24654 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24655
24656         * lib/closeout.c:
24657         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24658         Remove; no longer needed.
24659         "quotearg.h": Add include.
24660         (file_name): Do not bother to explicitly initialize to NULL; it's less
24661         efficient on some hosts.
24662         (close_stdout_status): Remove test as to whether stdout was already
24663         closed; it breaks for the case "echo x | sort >&-".
24664         Quote file name colons.
24665         Do not assume that _("write error") lacks format strings.
24666
24667 2000-05-15  Jim Meyering  <meyering@lucent.com>
24668
24669         * lib/version-etc.c (version_etc_copyright): Update the copyright
24670         string used in all --version output.
24671
24672 2000-05-14  Jim Meyering  <meyering@lucent.com>
24673
24674         * lib/closeout.c (close_stdout_set_file_name): New function.
24675         (close_stdout_status): Use new file-scoped global.
24676         Return right away if fstat says the stdout file descriptor is invalid.
24677         * lib/closeout.h (close_stdout_set_file_name): Declare.
24678
24679 2000-05-10  Jim Meyering  <meyering@lucent.com>
24680
24681         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24682         (close_stdout_set_status): New function.
24683         * lib/closeout.h (close_stdout_set_status): Declare.
24684
24685 2000-05-09  Jim Meyering  <meyering@lucent.com>
24686
24687         * m4/gettext.m4: Rename this...
24688         * m4/libintl.m4: ...to this.
24689
24690 2000-05-08  Jim Meyering  <meyering@lucent.com>
24691
24692         * lib/long-options.c: Don't include closeout.h.
24693         (parse_long_options): Don't call close_stdout for --version.
24694
24695 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24696
24697         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24698         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24699         2.1.3 bug.  This avoids a clash when files like regex.c define
24700         _GNU_SOURCE.
24701
24702 2000-05-06  Jim Meyering  <meyering@lucent.com>
24703
24704         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24705         (AC_REPLACE_FUNCS): Add strnlen.
24706
24707         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24708         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24709
24710         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24711         AC_SEARCH_LIBS call for nanosleep.
24712         (LIB_NANOSLEEP): Set and AC_SUBST.
24713
24714 2000-05-06  Jim Meyering  <meyering@lucent.com>
24715
24716         * lib/strnlen.c: Undefine __strnlen and strnlen.
24717         [!weak_alias]: Define __strnlen to strnlen.
24718
24719         * lib/atexit.c: New file, from libiberty.
24720
24721 2000-05-06  Jim Meyering  <meyering@lucent.com>
24722
24723         * lib/closeout.c (close_stdout_status): Also check for errors on the
24724         stderr stream.
24725
24726 2000-05-05  Jim Meyering  <meyering@lucent.com>
24727
24728         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24729         AC_SEARCH_LIBS call for clock_gettime.
24730         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24731
24732         * m4/search-libs.m4: Update from autoconf.
24733
24734         su doesn't work on Solaris 2.6.
24735         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24736         <shadow.h>.  Reported by Dragos Harabor.
24737
24738 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24739
24740         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24741         memcpy instead of xmalloc, xrealloc, path_concat.
24742         (locale_charset): Treat empty environment variables as absent.
24743         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24744
24745 2000-05-04  Jim Meyering  <meyering@lucent.com>
24746
24747         * lib/getopt.c: Update from glibc.
24748         * lib/obstack.c: Likewise.
24749         * lib/obstack.h: Likewise.
24750         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24751         file
24752
24753         * lib/regex.h: Likewise.
24754         * lib/strndup.c: Likewise.
24755         * lib/strnlen.c: New file, from glibc.
24756
24757 2000-05-03  Jim Meyering  <meyering@lucent.com>
24758
24759         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24760
24761 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24762
24763         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24764         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24765         compile-time test, rather than inspecting host and OS, to
24766         decide whether to define _LARGEFILE_SOURCE.
24767
24768 2000-05-01  Jim Meyering  <meyering@lucent.com>
24769
24770         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24771
24772         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24773         Based on a patch from Bruno Haible.
24774
24775 2000-05-01  Jim Meyering  <meyering@lucent.com>
24776
24777         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24778
24779 2000-04-29  Jim Meyering  <meyering@lucent.com>
24780
24781         * lib/path-concat.c: Declare strdup only if it's not defined.
24782         * lib/canon-host.c: Likewise.
24783
24784 2000-04-28  Jim Meyering  <meyering@lucent.com>
24785
24786         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24787         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24788         is included first, then limits.h is included by locale.h by libintl.h.
24789         From John David Anglin.
24790
24791 2000-04-25  Jim Meyering  <meyering@lucent.com>
24792
24793         * lib/makepath.c (S_IRWXUGO): Define.
24794         (make_path): Always perform explicit chmod if MODE specifies any
24795         of the `special' permission bits.  Prompted by a bug report against
24796         install from Mate Wierdl and Joost van Baal.
24797
24798 2000-04-18  Jim Meyering  <meyering@lucent.com>
24799
24800         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
24801         (jm_PREREQ): Use it.
24802
24803 2000-04-18  Jim Meyering  <meyering@lucent.com>
24804
24805         * lib/README: New file.
24806
24807         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
24808         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
24809
24810 2000-04-17  Jim Meyering  <meyering@lucent.com>
24811
24812         Get it right :-)
24813         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
24814         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
24815         Suggestion from Akim Demaille.
24816
24817 2000-04-17  Jim Meyering  <meyering@lucent.com>
24818
24819         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
24820         the definition of it to rpl_strftime also defined-away the system's
24821         declaration.
24822
24823 2000-04-15  Jim Meyering  <meyering@lucent.com>
24824
24825         Use `C' to denote so-called `contiguous' files, the same way
24826         that tar does.
24827         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
24828         (ftypelet): Use S_ISCTG.
24829         From Michael Deutschmann.
24830
24831 2000-04-14  Jim Meyering  <meyering@lucent.com>
24832
24833         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
24834         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
24835         clobbered.
24836
24837 2000-04-14  Jim Meyering  <meyering@lucent.com>
24838
24839         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
24840
24841 2000-04-13  Jim Meyering  <meyering@lucent.com>
24842
24843         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
24844         AH_VERBATIM to insert required #ifndef into config.h.in.
24845         Suggestion from Akim Demaille.
24846
24847 2000-04-12  Jim Meyering  <meyering@lucent.com>
24848
24849         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
24850         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
24851         Christian Krackowizer.
24852
24853         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
24854         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
24855         (AC_SYS_LARGEFILE): Require.
24856         (AM_C_PROTOTYPES): Require.
24857
24858 2000-04-08  Jim Meyering  <meyering@lucent.com>
24859
24860         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
24861         names don't conflict.  Reported by Eli Zaretskii.
24862
24863 2000-04-07  Jim Meyering  <meyering@lucent.com>
24864
24865         * lib/putenv.c: Move inclusion of errno.h so it follows that of
24866         sys/types.h, to work around system header problems on AIX 3.2.5.
24867         From Bruno Haible.
24868
24869 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
24870
24871         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
24872         bug.  Deal with the different error behavior of Irix iconv.
24873
24874 2000-04-05  Paul Eggert  <eggert@twinsun.com>
24875
24876         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
24877         IRIX if the installer said otherwise.
24878
24879 2000-04-05  Jim Meyering  <meyering@lucent.com>
24880
24881         Portability tweaks required for ultrix4.3.
24882         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
24883         (jm_CHECK_DECLS): Add getutent to the list of functions.
24884         (_jm_DECL_HEADERS): Add utmpx.h.
24885         From John David Anglin.
24886
24887         * m4/strftime.m4: Back out the 2000-04-02 change.
24888         Instead of that change, simply undefine putenv in the test program.
24889
24890 2000-04-05  Jim Meyering  <meyering@lucent.com>
24891
24892         Portability tweaks required for ultrix4.3.
24893         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
24894         getutent.
24895         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
24896         * lib/canon-host.c: Declare strdup.
24897         * lib/path-concat.c: Likewise.
24898         From John David Anglin.
24899
24900 2000-04-04  Jim Meyering  <meyering@lucent.com>
24901
24902         Be more DOS 8.3-friendly.
24903         * lib/ref-add.sin: Renamed from ref-add.sed.in.
24904         * lib/ref-del.sin: Renamed from ref-del.sed.in.
24905         * lib/Makefile.am: Reflect renaming.
24906         Reported by Eli Zaretskii.
24907
24908         Use a temporary file name that won't clash with `charset.alias'
24909         in the DOS 8.3 name space.
24910         * lib/Makefile.am (charset_tmp): Define.
24911         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
24912         (uninstall-local): Likewise.
24913         Reported by Eli Zaretskii.
24914
24915 2000-04-03  Jim Meyering  <meyering@lucent.com>
24916
24917         * m4/gettext.m4: Fix typo in comment.
24918
24919         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
24920         textutils/configure.in).  Suggestion from Paul Eggert.
24921         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
24922
24923 2000-04-02  Paul Eggert  <eggert@twinsun.com>
24924
24925         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
24926         variable in the shell rather than using putenv, which isn't
24927         portable.  This avoids the configure-time inter-test dependency
24928         on the potentially-renamed putenv function.
24929
24930 2000-03-30  Paul Eggert  <eggert@twinsun.com>
24931
24932         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
24933         before checking struct stat.st_blksize, so that
24934         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
24935
24936 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24937
24938         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
24939         since strftime.c uses HAVE_STRFTIME to decide whether to use
24940         the underlying strftime.
24941
24942 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24943
24944         * lib/time/strftime.c (my_strftime): Make sure we call the system
24945         strftime, not ourselves, when invoking the underlying strftime.
24946
24947 2000-03-24  Jim Meyering  <meyering@lucent.com>
24948
24949         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
24950         (charset_alias): Define.
24951         (install-exec-local): Factor out common code.
24952         (uninstall-local): Split lines longer than 80.
24953         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
24954         (SUFFIXES): Define.
24955         (.sed.in.sed): New rule.  Don't redirect directly to $@.
24956         (CLEANFILES): Add ref-add.sed and ref-del.sed.
24957
24958 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
24959
24960         * lib/config.charset: Output a line containing "Packages using this
24961         file".
24962         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
24963         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
24964         ref-del.sed): New rules.
24965
24966 2000-03-17  Jim Meyering  <meyering@lucent.com>
24967
24968         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
24969         Otherwise, include <strings.h>
24970
24971 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
24972
24973         * lib/unicodeio.c (utf8_wctomb): New function.
24974         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
24975         format instead of in UCS-4 with platform dependent endianness.
24976
24977 2000-03-10  Jim Meyering  <meyering@lucent.com>
24978
24979         * m4/lib-check.m4: Look for getspnam in -lgen, too.
24980         From Marco Franzen.
24981
24982 2000-03-07  Paul Eggert  <eggert@twinsun.com>
24983
24984         * lib/savedir.c (savedir): Work even if directory size is
24985         negative; this can happen with some screwy NFS configurations.
24986
24987 2000-03-06  Jim Meyering  <meyering@lucent.com>
24988
24989         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
24990         if it's NULL (because we ran out of memory).  From Bruno Haible.
24991
24992 2000-03-05  Jim Meyering  <meyering@lucent.com>
24993
24994         * lib/localcharset.c ("path-concat.h"): Include.
24995         (get_charset_aliases): Use path_concat instead of ANSI string
24996         concatenation.
24997
24998         * lib/unicodeio.h (PARAMS): Define.
24999         Use it to guard prototype.
25000
25001 2000-03-04  Jim Meyering  <meyering@lucent.com>
25002
25003         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
25004         for lib/localcharset.c.
25005
25006 2000-03-04  Jim Meyering  <meyering@lucent.com>
25007
25008         * lib/Makefile.am (install-exec-local): Create $(libdir) before
25009         installing into it.
25010         (uninstall-local): Uncomment this rule so `make distcheck' works
25011         once again.
25012
25013         * lib/unicodeio.c (<errno.h>): Include it.
25014         (errno): Declare if not defined.
25015
25016         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
25017
25018         * lib/config.charset: New version, incorporating remarks from a linux
25019         i18n mailing list.  From Bruno Haible.
25020
25021 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
25022
25023         * m4/codeset.m4: New file.
25024         * m4/iconv.m4: New file.
25025         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
25026
25027 2000-03-03  Jim Meyering  <meyering@lucent.com>
25028
25029         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
25030
25031 2000-03-02  Jim Meyering  <meyering@lucent.com>
25032
25033         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
25034         the messages come out on separate lines.
25035
25036         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
25037         rather than jm_CHECK_DECLARATIONS.
25038         * m4/decl.m4: Remove now-unused file.
25039
25040         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25041         geteuid.
25042
25043 2000-03-02  Jim Meyering  <meyering@lucent.com>
25044
25045         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25046
25047 2000-03-01  Jim Meyering  <meyering@lucent.com>
25048
25049         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25050         * lib/unicodeio.c: Likewise.
25051
25052 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25053
25054         * lib/config.charset: New file.
25055         * lib/localcharset.c: New file.
25056         * lib/unicodeio.h, lib/unicodeio.c: New files.
25057         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25058         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25059         (noinst_HEADERS): Add unicodeio.h.
25060         (all-local, install-exec-local, charset.alias): New targets.
25061
25062 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25063
25064         * lib/quotearg.c (ALERT_CHAR): New macro.
25065         (quotearg_buffer_restyled): Use it.
25066
25067 2000-02-27  Jim Meyering  <meyering@lucent.com>
25068
25069         * m4/check-decl.m4: Add getenv to the list.
25070
25071 2000-02-27  Jim Meyering  <meyering@lucent.com>
25072
25073         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25074         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25075
25076         * lib/backupfile.c: Guard inclusion of stdlib.h with
25077         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25078         Declare malloc if needed.
25079
25080         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
25081         `#ifndef HAVE_DECL..'
25082         now that autoconf always defines the HAVE_DECL_ symbols.
25083         * lib/human.c: Likewise.
25084         * lib/same.c: Likewise.
25085         * lib/strtoumax.c: Likewise.
25086
25087         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
25088         declaration check was not run.
25089         * lib/hash.c: Likewise.
25090         * lib/human.c: Likewise.
25091         * lib/same.c: Likewise.
25092         * lib/strtoumax.c: Likewise.
25093
25094         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
25095         `.', then first look up the entire `.'-containing string as a login
25096         name.
25097
25098 2000-02-23  Jim Meyering  <meyering@lucent.com>
25099
25100         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
25101         in place of my hack.
25102
25103 2000-02-18  Paul Eggert  <eggert@twinsun.com>
25104
25105         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
25106         (textint): New typedef.
25107         (parser_control): Member year changed from int to textint.
25108         All uses changed.
25109         (YYSTYPE): Removed; replaced by %union with int and textint members.
25110         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
25111         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
25112         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
25113         (tSNUMBER, tUNUMBER): Now of type <textintval>.
25114         (date, number, to_year): Use width of number in digits, not its value,
25115         to determine whether it's a 2-digit year, or a 2-digit time.
25116         (yylex): Store number of digits of numeric tokens.
25117         Reported by John Kendall.
25118
25119         (parser_control): Changed from struct parser_control to typedef (for
25120         consistency).  All uses changed.
25121
25122         (tID): Removed; not used.
25123         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
25124
25125 2000-02-14  Paul Eggert  <eggert@twinsun.com>
25126
25127         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
25128         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
25129
25130 2000-02-12  Jim Meyering  <meyering@lucent.com>
25131
25132         * lib/userspec.c (ISDIGIT): Define it.
25133         (isdigit): Remove definition.
25134         (is_number): Use ISDIGIT, not isdigit.
25135         <libintl.h>: Include.
25136         (_ and N_): Define.
25137         (parse_user_spec): Mark translatable strings.
25138
25139 2000-02-10  Jim Meyering  <meyering@lucent.com>
25140
25141         With these changes, nanosleep.[ch] are finally enough like the other
25142         lib/* replacement files to compile on a few more losing systems.
25143
25144         * lib/nanosleep.h: Don't include config.h.
25145         Remove prototype from declaration of nanosleep.
25146         (PARAMS): Remove now-unneeded definition.
25147         * lib/nanosleep.c: #undef nanosleep.
25148         (rpl_nanosleep): Rename from nanosleep.
25149
25150 2000-02-10  Jim Meyering  <meyering@lucent.com>
25151
25152         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
25153         gnu_nanosleep to rpl_nanosleep.
25154
25155 2000-02-09  Jim Meyering  <meyering@lucent.com>
25156
25157         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
25158         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
25159
25160 2000-02-08  Akim Demaille  <akim@epita.fr>
25161
25162         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
25163         `[' and `]' and remove uses of `changequote'.
25164         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
25165         (AC_SYS_LARGEFILE): Likewise.
25166         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
25167         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
25168         of changequote.
25169         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
25170         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
25171         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
25172         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
25173
25174 2000-02-05  Jim Meyering  <meyering@lucent.com>
25175
25176         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
25177         Remove explicit use of AC_HEADER_TIME.  It is required by
25178         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
25179         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
25180         in autoconf whereby the expansion of the latter ended up preceding
25181         the expansion of its prerequisite, AC_HEADER_TIME.
25182         Reported by Volker Borchert.
25183
25184 2000-02-03  Jim Meyering  <meyering@lucent.com>
25185
25186         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
25187
25188 2000-02-03  Jim Meyering  <meyering@lucent.com>
25189
25190         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
25191         rather than with `#if HAVE_UTMPNAME'.
25192
25193 2000-02-02  Jim Meyering  <meyering@lucent.com>
25194
25195         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
25196         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
25197         Reported by Eli Zaretskii.
25198
25199 2000-02-01  Jim Meyering  <meyering@lucent.com>
25200
25201         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
25202
25203 2000-01-31  Jim Meyering  <meyering@lucent.com>
25204
25205         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
25206         functions.  Add the time.h and sys/time.h headers along with the
25207         AC_REQUIRE'ment of AC_HEADER_TIME.
25208
25209 2000-01-31  Jim Meyering  <meyering@lucent.com>
25210
25211         * lib/nanosleep.h (nanosleep): Guard declaration with
25212         `#if ! HAVE_DECL_NANOSLEEP'.
25213         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
25214         the declaration in that vendor's sys/timers.h.
25215         Reported by Christian Krackowizer.
25216
25217         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
25218         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
25219         (ISPRINT): Likewise.
25220         Reported by Tom Tromey.
25221
25222 2000-01-30  Jim Meyering  <meyering@lucent.com>
25223
25224         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
25225
25226         * m4/prereq.m4 (utmp_includes): Define.
25227         Check for ut_user and ut_name members in both struct utmpx
25228         and struct utmp.
25229
25230 2000-01-30  Jim Meyering  <meyering@lucent.com>
25231
25232         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
25233         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
25234         header files where only utmpx.ut_user is declared.
25235
25236         * lib/readutmp.h (UT_USER): Define.
25237
25238 2000-01-29  Jim Meyering  <meyering@lucent.com>
25239
25240         * m4/lib-check.m4: New file containing library-related checks from
25241         fileutils and sh-utils (textutils had none).
25242
25243 2000-01-28  Jim Meyering  <meyering@lucent.com>
25244
25245         * m4/perl.m4: Change format of warning message to look more like that
25246         from the missing script.  Suggestion from François Pinard.
25247
25248 2000-01-25  Jim Meyering  <meyering@lucent.com>
25249
25250         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
25251         well as time.h in the compile check.
25252         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
25253         Fix typo in cross-compiling case: s/yes/no/.
25254
25255 2000-01-23  Jim Meyering  <meyering@lucent.com>
25256
25257         * m4/jm-macros.m4: Move df-related tests here from
25258         fileutils/configure.in
25259
25260         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
25261         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
25262
25263         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
25264         s/space/ac_fsusage_space/.
25265         (jm_FILE_SYSTEM_USAGE): Take two parameters.
25266
25267         * m4/ftruncate.m4: New file (derived from part of
25268         fileutils/configure.in).
25269         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
25270         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
25271
25272         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
25273         AC_SUBST these here, rather than just in sh-util/configure.in, so
25274         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
25275         all the same.
25276         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
25277         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
25278         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
25279         (AC_SUBST(POW_LIBM)): Likewise.
25280         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
25281
25282 2000-01-23  Jim Meyering  <meyering@lucent.com>
25283
25284         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
25285         obstack.c.
25286
25287 2000-01-22  Jim Meyering  <meyering@lucent.com>
25288
25289         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
25290
25291         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
25292
25293         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
25294         configure.in
25295         (AC_CHECK_HEADERS): Likewise for sh-utils.
25296         (AC_CHECK_HEADERS): Likewise for textutils.
25297         Merge the three lists of headers.
25298
25299         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
25300         from fileutils' configure.in.
25301
25302         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
25303         code. Moved tests into their own function (_jm_DECL_HEADERS) in
25304         check-decl.m4.
25305
25306         * m4/check-decl.m4: Use #if rather than #ifdef.
25307         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
25308         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
25309         (_jm_DECL_HEADERS): Define new function.
25310         (jm_CHECK_DECLARATIONS): Require it.
25311
25312 2000-01-22  Jim Meyering  <meyering@lucent.com>
25313
25314         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25315         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25316         Required for some AIX systems.  Reported by Christian Krackowizer.
25317         [TESTING] (main): New function.
25318
25319         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25320         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25321         letters.
25322
25323         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25324         iswprint.
25325
25326         * lib/strverscmp.c (ISDIGIT): Define.
25327         (strverscmp): Use ISDIGIT, not isdigit.
25328
25329 2000-01-19  Jim Meyering  <meyering@lucent.com>
25330
25331         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25332         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25333         defines `struct timespec' in <sys/time.h>
25334
25335         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25336         Thanks to Akim for explaining.
25337
25338 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25339
25340         * lib/nanosleep.c (nanosleep):
25341         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25342         POSIX.1 doesn't require SA_INTERRUPT and some systems
25343         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25344         it's been part of POSIX.1 since day 1 (in 1988).
25345
25346 2000-01-17  Jim Meyering  <meyering@lucent.com>
25347
25348         * lib/interlock: Remove unused file.  Reported by François Pinard.
25349
25350 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25351
25352         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25353         alert, backslash, formfeed, and vertical tab unnecessarily in
25354         shell quoting style.
25355
25356 2000-01-16  Jim Meyering  <meyering@lucent.com>
25357
25358         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25359         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25360         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25361         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25362
25363 2000-01-16  Jim Meyering  <meyering@lucent.com>
25364
25365         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25366         because the latter didn't work.
25367
25368 2000-01-15  Jim Meyering  <meyering@lucent.com>
25369
25370         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25371         (AC_REPLACE_FUNCS): Add memcpy and memset.
25372         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25373         Add strpbrk.
25374         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25375
25376 2000-01-12  Jim Meyering  <meyering@lucent.com>
25377
25378         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25379         (jm_PREREQ): Use it.
25380         (jm_PREREQ_READUTMP): New macro.
25381         (jm_PREREQ): Use it.
25382
25383 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25384
25385         Quote multibyte characters correctly.
25386         * m4/c-bs-a.m4: New file.
25387         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25388         (jm_PREREQ): Use it.
25389
25390 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25391
25392         * m4/uintmax_t.m4: Port to autoconf 2.13.
25393
25394 2000-01-08  Jim Meyering  <meyering@ascend.com>
25395
25396         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25397         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25398
25399 2000-01-04  Jim Meyering  <meyering@ascend.com>
25400
25401         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25402         jm_STRUCT_DIRENT_D_TYPE.
25403         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25404         jm_STRUCT_DIRENT_D_INO.
25405         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25406         jm_STRUCT_UTIMBUF.
25407         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25408         renamings.
25409         * m4/utime.m4: Likewise.
25410
25411         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25412         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25413
25414 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25415
25416         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25417         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25418
25419 2000-01-02  Jim Meyering  <meyering@ascend.com>
25420
25421         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25422         remember if this is necessary.
25423
25424 1999-12-26  Jim Meyering  <meyering@ascend.com>
25425
25426         * m4/jm-macros.m4: Use it here.
25427         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25428
25429 1999-12-23  Jim Meyering  <meyering@ascend.com>
25430
25431         * m4/jm-macros.m4: Check for clock_gettime (moved from
25432         fileutils/configure.in)
25433         Check for gettimeofday.
25434
25435 1999-12-20  Jim Meyering  <meyering@ascend.com>
25436
25437         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25438         autoconf-2.14a-1999-12-20.
25439
25440 1999-12-19  Jim Meyering  <meyering@ascend.com>
25441
25442         * m4/lstat-slash.m4: New file.
25443         * m4/jm-macros.m4: Use the new macro:
25444         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25445
25446 1999-12-07  Jim Meyering  <meyering@ascend.com>
25447
25448         * m4/perl.m4: Require that File::Compare be available, too.
25449         Too many systems seem to lack it.
25450
25451         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25452         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25453
25454 1999-11-18  Paul Eggert  <eggert@twinsun.com>
25455
25456         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
25457         problem with the QNX 4.25 shell, which doesn't propagate exit
25458         status of failed commands inside shell assignments.
25459
25460 1999-11-17  Jim Meyering  <meyering@ascend.com>
25461
25462         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25463
25464 1999-11-07  Jim Meyering  <meyering@ascend.com>
25465
25466         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25467
25468 1999-11-06  Jim Meyering  <meyering@ascend.com>
25469
25470         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25471         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25472
25473 1999-11-05  Jim Meyering  <meyering@ascend.com>
25474
25475         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25476         configure.in of textutils, fileutils, and sh-utils into this one
25477         (shared between those packages) file.
25478         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
25479         AC_STRUCT_ST_BLKSIZE.
25480
25481 1999-11-03  Jim Meyering  <meyering@ascend.com>
25482
25483         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
25484         of AC_CHECK_TYPE checks includes unistd.h.
25485         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
25486         Suggestion from Akim Demaille.
25487
25488 1999-10-30  Jim Meyering  <meyering@ascend.com>
25489
25490         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
25491         m4-quoted string.
25492         * m4/ls-mntd-fs.m4: Likewise.
25493         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
25494         * m4/jm-winsz1.m4: Likewise.
25495
25496         * m4/const.m4: Remove file, since the fix made it into the experimental
25497         version of autoconf.
25498         * m4/mktime.m4: Likewise.
25499
25500         * m4/check-type.m4: Remove file, now that the latest version of
25501         AC_CHECK_TYPE takes a third arg to specify additional #includes.
25502
25503         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
25504         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
25505         AC_CHECK_TYPE.
25506
25507 1999-10-04  Jim Meyering  <meyering@ascend.com>
25508
25509         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
25510
25511 1999-09-22  Paul Eggert  <eggert@twinsun.com>
25512
25513         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
25514         2.95.1 bug with HP-UX 10.20.
25515
25516 1999-09-17  Jim Meyering  <meyering@ascend.com>
25517
25518         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
25519         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
25520         due to missing strdup (against sh-utils-2.0).
25521
25522 1999-08-29  Jim Meyering  <meyering@ascend.com>
25523
25524         * m4/jm-macros.m4: Require jm_BISON.
25525         * m4/bison.m4: New file.
25526
25527 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25528
25529         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25530         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25531
25532 1999-08-05  Jim Meyering  <meyering@ascend.com>
25533
25534         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25535         to avoid conflicts with `conftest' on 8+3 filesystems.
25536         Suggestion from Eli Zaretskii.
25537
25538 1999-08-04  Jim Meyering  <meyering@ascend.com>
25539
25540         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25541         fileutils and sh-utils (textutils's getline test was inadequate).
25542         (AM_FUNC_GETLINE): Run this test.
25543         (AC_CHECK_FUNCS): Check for getdelim.
25544         Reported by Bob Proulx.
25545
25546 1999-08-02  Jim Meyering  <meyering@ascend.com>
25547
25548         * m4/jm-macros.m4: Add a comment.
25549
25550 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25551
25552         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25553         <inttypes.h> defines strtoumax as a macro (and not as a
25554         function).
25555
25556 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25557
25558         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25559         that we can shift, multiply and divide unsigned long long
25560         values; Ultrix cc can't do it.
25561
25562 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25563
25564         * m4/mktime.m4: New file, which is a preview of what should appear
25565         in the next public autoconf release.
25566
25567 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25568
25569         * m4/lfs.m4: Remove this file.
25570         * m4/largefile.m4: New file.  It contains the old contents of
25571         lfs.m4, except that all names with prefix AC_LFS have been
25572         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25573         compatible with future autoconf versions.  Also, some minor m4
25574         quoting problems have been fixed.
25575
25576 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25577
25578         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25579         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25580         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25581         and simplify the shell code.
25582
25583 1999-08-01  Jim Meyering  <meyering@ascend.com>
25584
25585         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25586         m4.
25587
25588 1999-07-20  Jim Meyering  <meyering@ascend.com>
25589
25590         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25591
25592 1999-07-15  Jim Meyering  <meyering@ascend.com>
25593
25594         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25595
25596 1999-05-22  Jim Meyering  <meyering@ascend.com>
25597
25598         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25599
25600 1999-05-20  Jim Meyering  <meyering@ascend.com>
25601
25602         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25603         Add a colon after each `then' in case $4 is empty.
25604
25605 1999-05-16  Jim Meyering  <meyering@ascend.com>
25606
25607         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25608
25609 1999-05-10  Jim Meyering  <meyering@ascend.com>
25610
25611         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25612
25613         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25614         AC_FUNC_MKTIME.
25615
25616 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25617
25618         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25619
25620 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25621
25622         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25623         not CPPFLAGS, so that linking works correctly in IRIX.
25624
25625 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25626
25627         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25628
25629 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25630
25631         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25632         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25633         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25634         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25635         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25636
25637         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25638
25639 1999-04-20  Jim Meyering  <meyering@ascend.com>
25640
25641         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25642         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25643         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25644
25645 1999-04-18  Jim Meyering  <meyering@ascend.com>
25646
25647         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25648         * m4/jm-macros.m4: Use it.
25649
25650 1999-04-06  Jim Meyering  <meyering@ascend.com>
25651
25652         * m4/strftime.m4: Remove test for %f.
25653
25654 1999-03-29  Jim Meyering  <meyering@ascend.com>
25655
25656         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25657         superset of the AC_TYPE_* checks in the textutils, fileutils,
25658         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25659         AC_TYPE_PID_T.
25660
25661 1999-03-28  Jim Meyering  <meyering@ascend.com>
25662
25663         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25664         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25665         replaced e.g., in the *.sh files of the sh-utils.
25666
25667 1999-03-20  Jim Meyering  <meyering@ascend.com>
25668
25669         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25670         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25671         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25672
25673 1999-03-19  Jim Meyering  <meyering@ascend.com>
25674
25675         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25676
25677 1999-03-12  Jim Meyering  <meyering@ascend.com>
25678
25679         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25680
25681 1999-03-07  Jim Meyering  <meyering@ascend.com>
25682
25683         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25684         declared.
25685
25686 1999-02-17  Jim Meyering  <meyering@ascend.com>
25687
25688         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25689         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25690
25691 1999-02-07  Jim Meyering  <meyering@ascend.com>
25692
25693         * m4/group-member.m4: New file -- extracted from sh-utils'
25694         configure.in.
25695
25696         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25697         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25698
25699 1999-02-06  Jim Meyering  <meyering@ascend.com>
25700
25701         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25702         * m4/fnmatch.m4: Likewise.
25703         * m4/getgroups.m4: Likewise.
25704         * m4/lstat.m4: Likewise.
25705         * m4/malloc.m4: Likewise.
25706         * m4/putenv.m4: Likewise.
25707         * m4/realloc.m4: Likewise.
25708         * m4/regex.m4: Likewise.
25709         * m4/stat.m4: Likewise.
25710         * m4/strftime.m4: Likewise.
25711         Suggestion from Alain Magloire.
25712
25713         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25714         * m4/fnmatch.m4: Likewise.
25715         * m4/getgroups.m4: Likewise.
25716         * m4/getline.m4: Likewise.
25717         * m4/lstat.m4: Likewise.
25718         * m4/malloc.m4: Likewise.
25719         * m4/memcmp.m4: Likewise.
25720         * m4/putenv.m4: Likewise.
25721         * m4/realloc.m4: Likewise.
25722         * m4/regex.m4: Likewise.
25723         * m4/stat.m4: Likewise.
25724         * m4/strftime.m4: Likewise.
25725         Suggestion from Alain Magloire.
25726
25727         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25728         an argument.
25729
25730         * m4/regex.m4: Add a run-time Test for proper operation of
25731         re_compile_pattern.
25732
25733 1999-01-31  Jim Meyering  <meyering@ascend.com>
25734
25735         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25736
25737 1999-01-30  Jim Meyering  <meyering@ascend.com>
25738
25739         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25740
25741         * m4/jm-mktime.m4: Make this a wrapper around the official
25742         AM_FUNC_MKTIME rather than my private copy, now that the official one
25743         is up to date.
25744         * m4/mktime.m4: Remove file.
25745
25746         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25747         * m4/uptime.m4: Likewise.
25748         * m4/uintmax_t.m4: Likewise.
25749
25750 1999-01-28  Jim Meyering  <meyering@ascend.com>
25751
25752         * m4/jm-macros.m4: Use jm_AFS.
25753         * m4/afs.m4: New file (from fileutils' configure.in).
25754
25755         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25756         * m4/chown.m4: Likewise.
25757         * m4/d-ino.m4: Likewise.
25758         * m4/d-type.m4: Likewise.
25759         * m4/fnmatch.m4: Likewise.
25760         * m4/getgroups.m4: Likewise.
25761         * m4/gettext.m4: Likewise.
25762         * m4/jm-mktime.m4: Likewise.
25763         * m4/jm-winsz2.m4: Likewise.
25764         * m4/lcmessage.m4: Likewise.
25765         * m4/ls-mntd-fs.m4: Likewise.
25766         * m4/malloc.m4: Likewise.
25767         * m4/memcmp.m4: Likewise.
25768         * m4/putenv.m4: Likewise.
25769         * m4/realloc.m4: Likewise.
25770         * m4/st_mtim.m4: Likewise.
25771         * m4/strftime.m4: Likewise.
25772
25773 1999-01-16  Jim Meyering  <meyering@ascend.com>
25774
25775         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25776         (ARGMATCH_DIE_DECL): Define.
25777
25778 1999-01-12  Jim Meyering  <meyering@ascend.com>
25779
25780         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25781         Reported by Lars Hecking.
25782
25783 1999-01-10  Jim Meyering  <meyering@ascend.com>
25784
25785         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25786         gross kludge.
25787         * m4/inttypes_h.m4: Likewise.
25788         * m4/lstat.m4: Likewise.
25789         * m4/malloc.m4: Likewise.
25790         * m4/readdir.m4: Likewise.
25791         * m4/realloc.m4: Likewise.
25792         * m4/st_dm_mode.m4: Likewise.
25793         * m4/stat.m4: Likewise.
25794         * m4/utimbuf.m4: Likewise.
25795         * m4/utimes.m4: Likewise.
25796
25797         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
25798         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
25799         comments in config.h.in are meaningful.
25800
25801         * m4/jm-macros.m4: Require autoconf-2.13 here.
25802
25803         * m4/regex.m4: By default, don't use the included regex.c on systems
25804         with glibc 2.  Suggestion from Uli Drepper.
25805
25806 1999-01-02  Jim Meyering  <meyering@ascend.com>
25807
25808         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
25809
25810 1998-12-18  Jim Meyering  <meyering@ascend.com>
25811
25812         * m4/Makefile.am.in (Makefile.am): Simplify rule.
25813         Based on a suggestion from Lars Hecking.
25814
25815 1998-11-16  Paul Eggert  <eggert@twinsun.com>
25816
25817         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
25818
25819 1998-11-16  Jim Meyering  <meyering@ascend.com>
25820
25821         * m4/lfs.m4: Double-quote the `uname...` expression.
25822
25823 1998-11-14  Jim Meyering  <meyering@ascend.com>
25824
25825         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
25826         * m4/stat.m4: Likewise.
25827
25828 1998-11-03  Jim Meyering  <meyering@ascend.com>
25829
25830         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
25831         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
25832
25833 1998-10-18  Jim Meyering  <meyering@ascend.com>
25834
25835         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
25836
25837 1998-10-17  Jim Meyering  <meyering@ascend.com>
25838
25839         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
25840         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
25841         calls for those previously hard-coded headers.  Instead, take a new
25842         parameter.
25843         (jm_CHECK_DECLARATIONS): Reflect interface change.
25844         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
25845         (jm_CHECK_DECL_LOCALTIME_R): New macro.
25846
25847         * m4/mktime.m4: Test for spring-forward gap before long-running test.
25848
25849 1998-10-14  Jim Meyering  <meyering@ascend.com>
25850
25851         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
25852         instead of "TZ=America/Vancouver".  From Paul Eggert.
25853
25854 1998-10-11  Jim Meyering  <meyering@ascend.com>
25855
25856         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
25857         This adds a test for a recently added compatibility fix for mktime.c.
25858         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
25859
25860 1998-09-27  Jim Meyering  <meyering@ascend.com>
25861
25862         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
25863
25864         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
25865         ../configure.in, including a change from Gordon Matzigkeit to allow
25866         cross-compiling for the Hurd.
25867
25868         * m4/glibc.m4: New file/macro to test for the GNU C Library
25869         versions 1 and 2.  From Gordon Matzigkeit.
25870         Indent.
25871
25872 1998-09-21  Jim Meyering  <meyering@ascend.com>
25873
25874         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
25875
25876 1998-08-18  Paul Eggert  <eggert@twinsun.com>
25877
25878         Port nanosecond-resolution times to UnixWare 2.1.2 and
25879         pedantic Solaris 2.6.
25880
25881         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
25882         AC_STRUCT_ST_MTIM.
25883         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
25884         Generate name of ns member, instead of just 1 or undef.
25885         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
25886
25887 1998-08-15  Jim Meyering  <meyering@ascend.com>
25888
25889         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
25890         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
25891         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
25892         instead of jm_TYPE_SSIZE_T.
25893
25894 1998-08-12  Jim Meyering  <meyering@ascend.com>
25895
25896         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
25897
25898 1998-08-02  Jim Meyering  <meyering@ascend.com>
25899
25900         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
25901         in acconfig.h manually.
25902
25903 1998-07-31  Paul Eggert  <eggert@twinsun.com>
25904
25905         * m4/st_mtim.m4: New file.
25906
25907 1998-07-28  Jim Meyering  <meyering@ascend.com>
25908
25909         * m4/utimes.m4: Undef stat.
25910
25911 1998-07-25  Jim Meyering  <meyering@ascend.com>
25912
25913         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
25914         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
25915
25916 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
25917
25918         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
25919         uid and gid actually remain unchanged.
25920
25921 1998-07-07  Jim Meyering  <meyering@ascend.com>
25922
25923         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
25924
25925 1998-07-04  Jim Meyering  <meyering@ascend.com>
25926
25927         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
25928         to prove that this macro can be used in packages without regex.c.
25929
25930 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
25931
25932         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
25933         is to be used.
25934
25935 1998-07-03  Jim Meyering  <meyering@ascend.com>
25936
25937         * m4/gettext.m4: Add -lintl if it's found to be necessary.
25938
25939         * m4/gettext.m4: New file -- from gettext-0.10.35.
25940         * m4/lcmessage.m4: Likewise.
25941         * m4/progtest.m4: Likewise.
25942
25943         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
25944         * m4/jm-macros.m4: Require the new macro.
25945
25946 1998-06-29  Jim Meyering  <meyering@ascend.com>
25947
25948         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
25949         for the definition of NGROUPS (used in a system header included
25950         by sys/mount.h).
25951
25952 1998-06-28  Jim Meyering  <meyering@ascend.com>
25953
25954         * m4/ls-mntd-fs.m4: New file.
25955         * m4/fstypename.m4: New file.
25956
25957         * m4/jm-macros.m4: Require the new macro.
25958         * m4/jm-glibc-io.m4: New file.
25959
25960 1998-05-19  Jim Meyering  <meyering@ascend.com>
25961
25962         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
25963         * m4/lchown.m4: New file.
25964
25965         * m4/Makefile.am.in: New file.
25966         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
25967
25968 1998-05-14  Jim Meyering  <meyering@ascend.com>
25969
25970         * m4/Makefile.am (EXTRA_DIST): Add them.
25971         * m4/jm-macros.m4: New file.
25972         * m4/utimbuf.m4: New file.
25973
25974 1998-05-12  Jim Meyering  <meyering@ascend.com>
25975
25976         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
25977
25978 1998-05-11  Jim Meyering  <meyering@ascend.com>
25979
25980         * m4/isc-posix.m4: New file.
25981
25982 1998-05-10  Jim Meyering  <meyering@ascend.com>
25983
25984         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
25985
25986 1998-05-09  Jim Meyering  <meyering@ascend.com>
25987
25988         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
25989         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
25990         with automake.
25991
25992         * m4/ssize_t.m4: New file.
25993         * m4/mktime.m4: Remove file -- the new automake has this now.
25994
25995 1998-04-26  Jim Meyering  <meyering@ascend.com>
25996
25997         * m4/assert.m4: New file.
25998         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
25999
26000 1998-04-05  Jim Meyering  <meyering@ascend.com>
26001
26002         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
26003         (jm_PREREQ): Use it here.
26004
26005 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
26006
26007         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
26008         in acconfig.h.
26009
26010 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
26011
26012         * m4/prereq.m4: New file.
26013         * m4/error.m4: New file.
26014         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
26015
26016 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
26017
26018         * m4/getline.m4: Don't set am_cv_func_working_getline before the
26019         cache-check for the same variable -- that defeated the purpose of
26020         the test; the test program was never run.  This was a problem only
26021         on systems with losing getline functions -- HP-UX 10.20 is one.
26022         Reported by Bjorn Helgaas.
26023
26024 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
26025
26026         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
26027
26028 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
26029
26030         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
26031
26032         * m4/const.m4: New file.  Use an initializer in this declaration
26033         typedef int charset[2]; const charset x;
26034         Reported by Bob Glickstein.
26035
26036 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
26037
26038         * m4/chown.m4: Fix reversed types on -1 args to chown.
26039         From Kaveh Ghazi.
26040
26041 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26042
26043         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26044         Add lseek and memchr.
26045
26046         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26047         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26048         have a 20-character limit on names.
26049
26050 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26051
26052         * m4/inttypes_h.m4: New file.
26053         * m4/uintmax_t.m4: New file.
26054         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26055
26056 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26057   Free Software Foundation, Inc.
26058 Copying and distribution of this file, with or without modification,
26059 are permitted provided the copyright notice and this notice are preserved.