* modules/sys_time (Makefile.am): Build sys/time.h only when it's the
[gnulib.git] / ChangeLog
1 2007-01-28  Bruno Haible  <bruno@clisp.org>
2
3         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
4         value of $(SYS_TIME_H).
5         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
6         remove it conditionally, too.
7         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
8         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
9         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
10         GETTIMEOFDAY_REPLACEMENT to 1.
11
12 2007-01-28  Bruno Haible  <bruno@clisp.org>
13
14         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
15         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
16         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
17         Set UNISTD_H instead of UNISTD_H2.
18         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
19
20 2007-01-28  Bruno Haible  <bruno@clisp.org>
21
22         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
23         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
24
25 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
26
27         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
28         (func_create_testdir): Ensure C locale for `grep' and `tr'
29         character ranges.
30         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
31         ACLOCAL_AMFLAGS parsing state machine.
32
33 2007-01-27  Bruno Haible  <bruno@clisp.org>
34
35         * modules/unistr/base: Update.
36
37 2007-01-27  Bruno Haible  <bruno@clisp.org>
38
39         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
40         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
41         * modules/unistr/u32-mbtouc-unsafe: Renamed from
42         modules/unistr/u32-mbtouc.
43         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
44         * lib/unistr.h: Update.
45         * lib/linebreak.c: Update.
46         * modules/unistr/u32-mbtouc: Renamed from
47         modules/unistr/u32-mbtouc-safe.
48         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
49         * lib/unistr.h: Update.
50         * lib/unistr/u32-to-u8.c: Update.
51         * lib/unistr/u32-to-u16.c: Update.
52
53 2007-01-27  Bruno Haible  <bruno@clisp.org>
54
55         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
56         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
57         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
58         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
59         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
60         * modules/unistr/u16-mbtouc-unsafe: Renamed from
61         modules/unistr/u16-mbtouc.
62         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
63         * lib/unistr.h: Update.
64         * lib/linebreak.c: Update.
65         * modules/linebreak: Update.
66         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
67         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
68         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
69         * modules/unistr/u16-mbtouc: Renamed from
70         modules/unistr/u16-mbtouc-safe.
71         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
72         * lib/unistr.h: Update.
73         * lib/unistr/u16-to-u8.c: Update.
74         * modules/unistr/u16-to-u8: Update.
75         * lib/unistr/u16-to-u32.c: Update.
76         * modules/unistr/u16-to-u32: Update.
77
78 2007-01-27  Bruno Haible  <bruno@clisp.org>
79
80         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
81         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
82         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
83         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
84         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
85         * modules/unistr/u8-mbtouc-unsafe: Renamed from
86         modules/unistr/u8-mbtouc.
87         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
88         * lib/unistr.h: Update.
89         * lib/striconveh.c: Update.
90         * modules/striconveh: Update.
91         * lib/linebreak.c: Update.
92         * modules/linebreak: Update.
93         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
94         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
95         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
96         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
97         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
98         * lib/unistr.h: Update.
99         * lib/striconveh.c: Update.
100         * modules/striconveh: Update.
101         * lib/unistr/u8-to-u16.c: Update.
102         * modules/unistr/u8-to-u16: Update.
103         * lib/unistr/u8-to-u32.c: Update.
104         * modules/unistr/u8-to-u32: Update.
105
106 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
107
108         Sync from Libtool.
109         * lib/argz.c: Do not include strings.h nor memory.h, include
110         string.h unconditionally.  Patch by Simon Josefsson.
111
112 2007-01-27  Bruno Haible  <bruno@clisp.org>
113
114         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
115         from gl_HEADER_STRING_H_BODY.
116         (gl_HEADER_STRING_H_BODY): Require it.
117         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
118         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
119         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
120         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
121         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
122         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
123         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
124         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
125         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
126         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
127         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
128         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
129         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
130         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
131         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
132
133 2007-01-27  Bruno Haible  <bruno@clisp.org>
134
135         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
136         check_PROGRAMS into noinst_PROGRAMS.
137         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
138         check_PROGRAMS in this case.
139         (func_import): Set for_test to false.
140         (func_create_testdir): Set for_test to true.
141
142 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
143             Bruno Haible  <bruno@clisp.org>
144
145         * modules/strcasestr (Files): Remove lib/strcasestr.h.
146         (Depends-on): Add string.
147         (Includes): Use <string.h> instead of strcasestr.h.
148         * modules/string (Makefile.am): Also substitute the value of
149         REPLACE_STRCASESTR.
150         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
151         assume strcasestr is declared in <string.h> not <strings.h>. Also
152         set REPLACE_STRCASESTR.
153         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
154         REPLACE_STRCASESTR.
155         * lib/strcasestr.h: Remove file.
156         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
157         * lib/string_.h (strcasestr): New declaration.
158
159 2007-01-27  Bruno Haible  <bruno@clisp.org>
160
161         * lib/string_.h: Use 'extern'.
162
163 2007-01-27  Jim Meyering  <jim@meyering.net>
164
165         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
166         of set-but-not-used local, "q".
167
168         * lib/mempcpy.c: Include <config.h> before <string.h>.
169         This fixes a compilation error on HP-UX, due to the system's
170         "restrict"-using mempcpy prototype.
171
172 2007-01-26  Bruno Haible  <bruno@clisp.org>
173
174         Small optimization.
175         * lib/javacomp.c: Include c-strstr.h.
176          (is_envjavac_gcj): Use c_strstr instead of strstr.
177         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
178
179 2007-01-26  Bruno Haible  <bruno@clisp.org>
180
181         * MODULES.html.sh (Unicode string functions): Add the new modules.
182
183         * modules/uniconv/u32-strconv-to-locale: New file.
184         * lib/uniconv/u32-strconv-to-locale.c: New file.
185
186         * modules/uniconv/u16-strconv-to-locale: New file.
187         * lib/uniconv/u16-strconv-to-locale.c: New file.
188
189         * modules/uniconv/u8-strconv-to-locale: New file.
190         * lib/uniconv/u8-strconv-to-locale.c: New file.
191
192         * modules/uniconv/u32-strconv-from-locale: New file.
193         * lib/uniconv/u32-strconv-from-locale.c: New file.
194
195         * modules/uniconv/u16-strconv-from-locale: New file.
196         * lib/uniconv/u16-strconv-from-locale.c: New file.
197
198         * modules/uniconv/u8-strconv-from-locale: New file.
199         * lib/uniconv/u8-strconv-from-locale.c: New file.
200
201         * modules/uniconv/u32-strconv-to-enc: New file.
202         * lib/uniconv/u32-strconv-to-enc.c: New file.
203         * modules/uniconv/u32-strconv-to-enc-tests: New file.
204         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
205
206         * modules/uniconv/u16-strconv-to-enc: New file.
207         * lib/uniconv/u16-strconv-to-enc.c: New file.
208         * lib/uniconv/u-strconv-to-enc.h: New file.
209         * modules/uniconv/u16-strconv-to-enc-tests: New file.
210         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
211
212         * modules/uniconv/u8-strconv-to-enc: New file.
213         * lib/uniconv/u8-strconv-to-enc.c: New file.
214         * modules/uniconv/u8-strconv-to-enc-tests: New file.
215         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
216
217         * modules/uniconv/u32-strconv-from-enc: New file.
218         * lib/uniconv/u32-strconv-from-enc.c: New file.
219         * modules/uniconv/u32-strconv-from-enc-tests: New file.
220         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
221
222         * modules/uniconv/u16-strconv-from-enc: New file.
223         * lib/uniconv/u16-strconv-from-enc.c: New file.
224         * modules/uniconv/u16-strconv-from-enc-tests: New file.
225         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
226
227         * modules/uniconv/u8-strconv-from-enc: New file.
228         * lib/uniconv/u8-strconv-from-enc.c: New file.
229         * lib/uniconv/u-strconv-from-enc.h: New file.
230         * modules/uniconv/u8-strconv-from-enc-tests: New file.
231         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
232
233         * modules/uniconv/u32-conv-from-enc: New file.
234         * lib/uniconv/u32-conv-from-enc.c: New file.
235         * modules/uniconv/u32-conv-from-enc-tests: New file.
236         * tests/uniconv/test-u32-conv-from-enc.c: New file.
237
238         * modules/uniconv/u16-conv-from-enc: New file.
239         * lib/uniconv/u16-conv-from-enc.c: New file.
240         * lib/uniconv/u-conv-from-enc.h: New file.
241         * modules/uniconv/u16-conv-from-enc-tests: New file.
242         * tests/uniconv/test-u16-conv-from-enc.c: New file.
243
244         * modules/uniconv/u8-conv-from-enc: New file.
245         * lib/uniconv/u8-conv-from-enc.c: New file.
246         * modules/uniconv/u8-conv-from-enc-tests: New file.
247         * tests/uniconv/test-u8-conv-from-enc.c: New file.
248
249         * modules/uniconv/base: New file.
250         * lib/uniconv.h: New file.
251
252 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
253
254         * doc/gnulib-tool.texi (Initial import): Update to match current
255         behavior with strdup module.
256         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
257         * lib/memmem.h: Remove; all uses removed.  This is now done
258         by <string.h>.
259         * lib/mempcpy.h: Likewise.
260         * lib/memrchr.h: Likewise.
261         * lib/stpcpy.h: Likewise.
262         * lib/stpncpy.h: Likewise.
263         * lib/strcase.h: Likewise.
264         * lib/strchrnul.h: Likewise.
265         * lib/strdup.h: Likewise.
266         * lib/strndup.h: Likewise.
267         * lib/strnlen.h: Likewise.
268         * lib/strpbrk.h: Likewise.
269         * lib/strsep.h: Likewise.
270         * lib/strstr.h: Likewise.
271         * lib/strtok_r.h: Likewise.
272         * lib/string_.h: New file.
273         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
274         Rely on <string.h> instead.
275         * lib/canon-host.c: Likewise.
276         * lib/chdir-long.c: Likewise.
277         * lib/concatpath.c: Likewise.
278         * lib/exclude.c: Likewise.
279         * lib/fchdir.c: Likewise.
280         * lib/getaddrinfo.c: Likewise.
281         * lib/getcwd.c: Likewise.
282         * lib/getsubopt.c: Likewise.
283         * lib/glob.c: Likewise.
284         * lib/hard-locale.c: Likewise.
285         * lib/iconvme.c: Likewise.
286         * lib/javacomp.c: Likewise.
287         * lib/mempcpy.c: Likewise.
288         * lib/memrchr.c: Likewise.
289         * lib/regex_internal.h: Likewise.
290         * lib/stpncpy.c: Likewise.
291         * lib/strcasecmp.c: Likewise.
292         * lib/strchrnul.c: Likewise.
293         * lib/strdup.c: Likewise.
294         * lib/striconv.c: Likewise.
295         * lib/striconveh.c: Likewise.
296         * lib/striconveha.c: Likewise.
297         * lib/strncasecmp.c: Likewise.
298         * lib/strndup.c: Likewise.
299         * lib/strnlen.c: Likewise.
300         * lib/strsep.c: Likewise.
301         * lib/strstr.c: Likewise.
302         * lib/strtok_r.c: Likewise.
303         * lib/userspec.c: Likewise.
304         * lib/w32spawn.h: Likewise.
305         * lib/xstrndup.c: Likewise.
306         * lib/mountlist.c (strstr): Remove decl.
307         * m4/string_h.m4: New file.
308         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
309         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
310         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
311         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
312         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
313         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
314         Set REPLACE_STRCASECMP if necessary.
315         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
316         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
317         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
318         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
319         HAVE_DECL_STRDUP if necessary.
320         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
321         since gl_FUNC_STRNDUP does that now.
322         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
323         Check for decl here...
324         (gl_PREREQ_STRNLEN): ... not here.
325         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
326         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
327         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
328         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
329         necessary.
330         * modules/string: New file.
331         * modules/memmem (Files): Remove special-purpose include file.
332         (Depends-on): Add string.
333         (Include): Include <string.h>, not the removed file.
334         * modules/mempcpy: Likewise.
335         * modules/memrchr: Likewise.
336         * modules/stpcpy: Likewise.
337         * modules/stpncpy: Likewise.
338         * modules/strcase: Likewise.
339         * modules/strchrnul: Likewise.
340         * modules/strdup: Likewise.
341         * modules/strndup: Likewise.
342         * modules/strnlen: Likewise.
343         * modules/strpbrk: Likewise.
344         * modules/strsep: Likewise.
345         * modules/strstr: Likewise.
346         * modules/strtok_r: Likewise.
347         * tests/test-dirname.c: Don't include "strdup.h", since
348         <string.h> now suffices.
349         * tests/test-memmem.c: Don't include "memmem.h", since
350         <string.h> now suffices.
351
352 2007-01-25  Bruno Haible  <bruno@clisp.org>
353
354         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
355         *resultp is 0.
356
357         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
358         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
359         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
360         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
361
362         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
363         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
364         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
365         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
366         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
367         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
368
369 2007-01-24  Bruno Haible  <bruno@clisp.org>
370
371         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
372         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
373         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
374         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
375         gl_FUNC_FTS_CORE.
376         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
377         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
378         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
379         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
380         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
381         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
382         gl_FUNC_FCHOWNAT.
383         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
384         gl_FUNC_STRFTIME.
385         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
386         Reported by Ralf Wildenhues.
387
388 2007-01-24  Bruno Haible  <bruno@clisp.org>
389
390         Drop AC_REQUIRE calls that are redundant with the module dependencies.
391         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
392         gl_GETADDRINFO.
393         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
394         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
395         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
396
397 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
398
399         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
400         Don't use 'exit'; just return from 'main'.
401         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
402
403         * lib/fnmatch_.h: Readjust white space and comments to match
404         glibc, to avoid spurious diffs.
405
406 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
407
408         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
409         2004-12-01 change by Jakub Jelinek, since this code won't compile
410         if !LIBC.  Problem reported by Bob Proulx.
411
412 2007-01-23  Bruno Haible  <bruno@clisp.org>
413
414         * lib/striconveh.c: Include c-strcaseeq.h.
415         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
416         * modules/striconveh (Depends-on): Add c-strcaseeq.
417
418 2007-01-23  Bruno Haible  <bruno@clisp.org>
419
420         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
421
422         * modules/c-strcaseeq: New file.
423         * lib/c-strcaseeq.h: New file.
424
425         * modules/streq: New file.
426         * lib/streq.h: New file.
427
428 2007-01-23  Bruno Haible  <bruno@clisp.org>
429
430         * modules/striconveha-tests: New file.
431         * tests/test-striconveha.c: New file.
432
433         * lib/striconveha.h: Include <stdbool.h>.
434         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
435         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
436         (mem_iconveha_notranslit): Renamed from mem_iconveha.
437         (mem_iconveha): New function.
438         (str_iconveha_notranslit): Renamed from str_iconveha.
439         (str_iconveha): New function.
440         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
441         c-strcase.
442
443 2007-01-23  Bruno Haible  <bruno@clisp.org>
444
445         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
446         encodings without forgiving before trying any encoding with handler.
447         (str_iconveha): Try all encodings without forgiving before trying any
448         encoding with handler.
449
450 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
451
452         Import the following changes from libc.
453
454         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
455
456         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
457
458         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
459
460         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
461         normal_bracket label.
462
463         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
464
465         [BZ #361]
466         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
467         to normal_bracket after fetching the next character.
468
469 2007-01-22  Bruno Haible  <bruno@clisp.org>
470
471         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
472         argument.
473         * lib/striconveh.c (iconv_carefully_1): New function.
474         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
475         argument.
476         (str_cd_iconveh): Update.
477         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
478         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
479         * tests/test-striconveh.c (MAGIC): New macro.
480         (new_offsets): New function.
481         (main): Test call with and without offsets.
482
483 2007-01-22  Bruno Haible  <bruno@clisp.org>
484
485         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
486         * modules/sys_select (Makefile.am): Likewise.
487         * modules/sys_socket (Makefile.am): Likewise.
488         * modules/sys_time (Makefile.am): Likewise.
489
490 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
491
492         * modules/gettimeofday (License): Change from GPL to LGPL, since
493         gettimeofday is a library function.
494
495 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
496
497         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
498
499 2007-01-21  Bruno Haible  <bruno@clisp.org>
500
501         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
502
503 2007-01-21  Bruno Haible  <bruno@clisp.org>
504
505         * modules/striconveha: New file.
506         * lib/striconveha.h: New file.
507         * lib/striconveha.c: New file.
508         * MODULES.html.sh (Internationalization functions): Add striconveha.
509         * lib/striconv.c (str_iconv): Optimize the case of an empty input
510         string.
511         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
512
513 2007-01-21  Bruno Haible  <bruno@clisp.org>
514
515         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
516         * lib/striconveh.c (str_iconveh): Likewise.
517
518 2007-01-21  Bruno Haible  <bruno@clisp.org>
519
520         * lib/striconveh.h (mem_iconveh): New declaration.
521         * lib/striconveh.c (mem_iconveh): New function.
522         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
523
524 2007-01-21  Bruno Haible  <bruno@clisp.org>
525
526         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
527
528         * lib/striconveh.h (mem_cd_iconveh): Change specification.
529         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
530         original result buffer.
531         (str_cd_iconveh): Update.
532         * tests/test-striconveh.c (main): Update.
533
534         * lib/striconv.h (mem_cd_iconv): Change specification.
535         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
536         result buffer.
537         (str_cd_iconv): Update.
538         * tests/test-striconv.c (main): Update.
539
540 2007-01-21  Bruno Haible  <bruno@clisp.org>
541
542         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
543
544 2007-01-20  Jim Meyering  <jim@meyering.net>
545
546         * lib/userspec.c (parse_with_separator): If a user or group string
547         starts with "+", skip the corresponding name-to-ID look-up, since
548         such a look-up must fail: user and group names may not include "+".
549
550 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
551
552         * lib/poll.c: Include sys/time.h and time.h unconditionally,
553         since we now assume the sys_time module.
554         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
555         check for sys/time.h; no longer needed.
556         * modules/poll (Depends-on): Depend on sys_time.
557
558 2007-01-18  Bruno Haible  <bruno@clisp.org>
559
560         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
561         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
562
563         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
564         gettimeofday.
565
566         * tests/test-gettimeofday.c: Include <time.h>.
567         (dummy): Remove variable.
568
569         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
570         gl_HEADER_SYS_TIME_H.
571         (gl_HEADER_SYS_TIME_H): New macro.
572
573         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
574         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
575         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
576         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
577         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
578         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
579         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
580         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
581         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
582         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
583         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
584
585         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
586         last change; it caused a compilation error when cross-compiling to
587         Cygwin.
588
589 2007-01-18  Jim Meyering  <jim@meyering.net>
590
591         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
592         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
593         than the race-prone "test -d sys || mkdir sys".
594         (configure.ac): Use AC_PROG_MKDIR_P.
595         * modules/sys_select: Likewise.
596         * modules/sys_socket: Likewise.
597         * modules/sys_time: Likewise.
598
599 2007-01-18  Eric Blake  <ebb9@byu.net>
600
601         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
602         replace gettimeofday.
603         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
604         name, to avoid infinite recursion.
605
606 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
607
608         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
609         module sys_time.
610         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
611         assume timespec.h defines struct timeval.
612         * lib/settime.c: Likewise.
613         * lib/utimens.c: Likewise.
614         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
615         since we now assume the gettimeofday module.
616         * lib/tempname.c (__gen_tempname): Likewise.
617         * lib/gettimeofday.h: Remove.
618         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
619         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
620         Include <time.h>, for 'time()'.
621         (localtime_buffer_addr): Also use this workaround if
622         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
623         to simplify the uses.  All uses changed.
624         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
625         that #undef is inside {}, and 'const' follows type name consistently.
626         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
627         (gettimeofday): Do not use the maximum possible value for
628         tv->tv_usec, since that might break usages other than ls.c.
629         Instead, we'll leave ls.c alone.  This undoes today's patch
630         by Bruno.  Add a compile-time warning for 1s-clock resolution;
631         we've never observed the problem but might as well keep the
632         canary.
633         * lib/nanosleep.c: Include timespec.h first, for interface check.
634         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
635         now assume the sys_time module.
636         * lib/tempname.c: Likewise.
637         * lib/timespec.h: Likewise.
638         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
639         needed.
640         * lib/strftime.c: Likewise.
641         * lib/timespec.h: Likewise.
642         * lib/posixtm.c: Include posixtm.h first, for interface check.
643         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
644         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
645         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
646         * lib/sys_time_.h: New file.
647         * lib/timespec.h (struct timespec): Use long int, not long.
648         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
649         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
650         Remove obsolescent call to AC_HEADER_TIME.
651         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
652         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
653         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
654         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
655         Likewise.
656         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
657         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
658         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
659         into the sys_time module.  Check for gettimeofday just once.
660         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
661         for gettimeofday signature to just check the signature.  Merely
662         compile it, since linking doesn't test signature.  Improve test for
663         whether gettimeofday.o is actually needed.
664         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
665         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
666         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
667         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
668         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
669         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
670         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
671         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
672         than worrying about sys/time.h.
673         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
674         Don't bother worrying about TIME_WITH_SYS_TIME.
675         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
676         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
677         * m4/sys_time_h.m4: New file.
678         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
679         Don't include sys/time.h.  Return from main rather than exiting.
680         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
681         all uses changed.
682         * modules/gethrxtime (Depends-on): Add sys_time.
683         * modules/gettime (Depends-on): Likewise.
684         * modules/gettimeofday (Depends-on): Likewise.
685         * modules/nanosleep (Depends-on): Likewise.
686         * modules/settime (Depends-on): Likewise.
687         * modules/tempname (Depends-on): Likewise.
688         * modules/utimens (Depends-on): Likewise.
689         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
690         (Include:) Change back to <sys/time.h>.
691         (Maintainer:) Add self.
692         * modules/sys_time: New file.
693         * modules/tempname (Depends-on): Add gettimeofday.
694         * tests/test-gettimeofday.c: Include <sys/time.h>
695         rather than gettimeofday.h.
696
697 2007-01-17  Bruno Haible  <bruno@clisp.org>
698
699         * gnulib-tool (func_get_license): Revert last patch. Instead, let
700         the license default to GPL.
701         (func_create_testdir): Don't complain if a module is LGPL and its
702         tests module depends on GPLed modules.
703
704 2007-01-17  Bruno Haible  <bruno@clisp.org>
705
706         * lib/gettimeofday.c (gettimeofday): Add code for the case
707         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
708         maximum possible value for tv->tv_usec, rather than the minimum one.
709
710 2005-10-08  Martin Lambers  <marlam@marlam.de>
711 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
712 2007-01-16  Bruno Haible  <bruno@clisp.org>
713
714         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
715         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
716         gl_FUNC_GETTIMEOFDAY.
717         (Include): Add gettimeofday.h.
718         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
719         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
720         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
721         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
722         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
723         * lib/gettimeofday.h: New file.
724         * lib/gettimeofday.c: Include <sys/timeb.h>.
725         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
726         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
727         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
728         fall back on time().
729
730         * tests/test-gettimeofday.c: New file.
731         * modules/gettimeofday-tests: New file.
732
733 2007-01-16  Eric Blake  <ebb9@byu.net>
734
735         * modules/fnmatch (Depends-on): Depend on wchar.
736         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
737         * m4/fnmatch.m4: Likewise.
738         * modules/mbchar (Makefile.am): Assume <wchar.h>.
739         * m4/mbchar.m4: Likewise.
740         * modules/mbswidth (Depends-on): Depend on wchar.
741         * lib/mbswidth.c: Assume <wchar.h>.
742         * m4/mbswidth.m4: Likewise.
743         * modules/quotearg (Depends-on): Depend on wchar.
744         * lib/quotearg.c: Assume <wchar.h>.
745         * m4/quotearg.m4: Likewise.
746         * modules/regex (Depends-on): Depend on wchar.
747         * lib/regex_internal.h: Assume <wchar.h>.
748         * m4/regex.m4: Likewise.
749         * modules/stdint (Depends-on): Depend on wchar.
750         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
751         * m4/stdint.m4: Likewise.
752         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
753         * modules/strftime (Depends-on): Depend on wchar.
754         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
755         * modules/strtol (Depends-on): Depend on wchar.
756         * lib/strtol.c: Assume <wchar.h>.
757         * modules/wcwidth (Depends-on): Depend on wchar.
758         * lib/wcwidth.h: Assume <wchar.h>.
759         * m4/wcwidth.m4: Likewise.
760
761 2007-01-16  Bruno Haible  <bruno@clisp.org>
762
763         * modules/csharpexec-script: New, created from...
764         * modules/csharpexec: ... this.
765
766 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
767
768         * modules/javaexec-script: New, created from...
769         * modules/javaexec: ... this.
770
771 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
772
773         * modules/poll (Dependencies): Add sys_select.
774
775 2007-01-15  Jim Meyering  <jim@meyering.net>
776
777         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
778         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
779         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
780         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
781
782 2007-01-15  Bruno Haible  <bruno@clisp.org>
783
784         * modules/striconveh: New file.
785         * lib/striconveh.h: New file.
786         * lib/striconveh.c: New file.
787         * MODULES.html.sh (Internationalization functions): Add striconveh.
788
789         * modules/striconveh-tests: New file.
790         * tests/test-striconveh.c: New file.
791
792 2007-01-15  Bruno Haible  <bruno@clisp.org>
793
794         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
795         not from GNU libiconv or GNU libc.
796
797 2007-01-15  Bruno Haible  <bruno@clisp.org>
798
799         * doc/gnulib-intro.texi (Copyright): Explain the different license
800         terms for module descriptions, autoconf macros, tests, documentation.
801
802 2007-01-14  Bruno Haible  <bruno@clisp.org>
803
804         * modules/striconv-tests: New file.
805         * tests/test-striconv.c: New file.
806
807 2007-01-14  Bruno Haible  <bruno@clisp.org>
808
809         * modules/iconv-tests: New file.
810         * tests/test-iconv.c: New file.
811
812 2007-01-14  Bruno Haible  <bruno@clisp.org>
813
814         * gnulib-tool (func_get_license): For test modules, use the license of
815         the main module.
816
817 2007-01-14  Bruno Haible  <bruno@clisp.org>
818
819         * modules/iconv (Include): Clarify that <iconv.h> can only be included
820         if iconv is found to exist.
821
822 2007-01-14  Bruno Haible  <bruno@clisp.org>
823
824         * modules/c-ctype-tests: New file.
825         * tests/test-c-ctype.c: New file.
826
827 2007-01-14  Bruno Haible  <bruno@clisp.org>
828
829         * modules/binary-io-tests: New file.
830         * tests/test-binary-io.sh: New file.
831         * tests/test-binary-io.c: New file.
832
833 2007-01-14  Bruno Haible  <bruno@clisp.org>
834
835         * modules/array-oset-tests: New file.
836         * tests/test-array_oset.c: New file.
837
838 2007-01-14  Bruno Haible  <bruno@clisp.org>
839
840         * modules/array-list-tests: New file.
841         * tests/test-array_list.c: New file.
842
843 2007-01-14  Bruno Haible  <bruno@clisp.org>
844
845         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
846         and make.
847         Reported by Simon Josefsson in
848         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
849
850 2007-01-14  Bruno Haible  <bruno@clisp.org>
851
852         * modules/allocsa-tests: New file.
853         * tests/test-allocsa.c: New file.
854
855 2007-01-14  Bruno Haible  <bruno@clisp.org>
856
857         * modules/fchdir (Depends-on): Add absolute-header.
858         * modules/unistd (Depends-on): Likewise.
859
860 2006-12-30  Bruno Haible  <bruno@clisp.org>
861
862         * modules/fchdir: New file.
863         * modules/unistd (Files): Add lib/unistd_.h.
864         (Makefile.am): Generate unistd.h from unistd_.h.
865         * lib/fchdir.c: New file.
866         * lib/dirent_.h: New file.
867         * lib/unistd_.h: New file.
868         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
869         * m4/fchdir.m4: New file.
870         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
871         (gl_HEADER_UNISTD): Invoke it.
872         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
873         function.
874         * lib/backupfile.c (opendir, closedir): Undefine.
875         * lib/chown.c (open, close): Undefine.
876         * lib/clean-temp.c (open, close): Undefine.
877         * lib/copy-file.c (open, close): Undefine.
878         * lib/execute.c (open, close): Undefine.
879         * lib/fsusage.c (open, close): Undefine.
880         * lib/gc-gnulib.c (open, close): Undefine.
881         * lib/getcwd.c (opendir, closedir): Undefine.
882         * lib/glob.c (opendir, closedir): Undefine.
883         * lib/javacomp.c (open, close): Undefine.
884         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
885         * lib/openat-proc.c (open, close): Undefine.
886         * lib/pagealign_alloc.c (open, close): Undefine.
887         * lib/pipe.c (open, close): Undefine.
888         * lib/progreloc.c (open, close): Undefine.
889         * lib/savedir.c (opendir, closedir): Undefine.
890         * lib/utime.c (open, close): Undefine.
891         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
892
893 2007-01-10  Bruno Haible  <bruno@clisp.org>
894
895         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
896
897 2007-01-12  Eric Blake  <ebb9@byu.net>
898
899         Provide a robust <wchar.h>.  Further simplifications are now
900         possible in other modules, but not included here.
901         * modules/wchar: New module.
902         * m4/wchar.m4: New file.
903         * lib/wchar_.h: Likewise.
904         * modules/mbchar (Depends-on): Depend on wchar, as the first use
905         of the new module.
906         * MODULES.html.sh (Extended multibyte and wide character utilities):
907         New section.
908
909 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
910
911         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
912         to a reasonable default for memory allocation.
913         (xreadlink): Don't allocate a huge buffer, to work around a buggy
914         file system that reports garbage st_size values for symlinks.
915         Problem reported by Liyang Hu.
916
917 2007-01-11  Simon Josefsson  <simon@josefsson.org>
918
919         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
920         Emacs .#* auto-save files).
921
922 2007-01-11  Bruno Haible  <bruno@clisp.org>
923
924         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
925         directory.
926
927 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
928
929         Use @...@ consistently in lib/wctype_.h.
930         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
931         on it being set to 1 or 0.
932         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
933         go back to AC_SUBSTing it.
934         * modules/wctype (Makefile.am): Undo previous change.
935
936 2007-01-10  Eric Blake  <ebb9@byu.net>
937
938         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
939         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
940         * modules/wctype (Makefile.am): Likewise.
941         Reported by Chris McGuire.
942
943 2007-01-10  Jim Meyering  <jim@meyering.net>
944
945         fts.c: a small readability/maintainability improvement
946         * lib/fts.c (fts_read): Make this code slightly more readable and
947         maintainable by hoisting the "sp->fts_cur = p" assignments to
948         immediately follow the statements that set P.  Derived from
949         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
950
951 2007-01-10  Eric Blake  <ebb9@byu.net>
952
953         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
954         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
955         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
956         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
957         Reported by Chris McGuire.
958
959 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
960
961         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
962         in sed script.
963
964 2007-01-09  Bruno Haible  <bruno@clisp.org>
965
966         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
967         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
968         variables.
969         (func_module): Use them.
970
971 2007-01-09  Bruno Haible  <bruno@clisp.org>
972
973         * modules/unistr/base: New file.
974         * lib/unistr.h: New file.
975
976         * modules/unistr/u8-to-u16: New file.
977         * lib/unistr/u8-to-u16.c: New file.
978
979         * modules/unistr/u8-to-u32: New file.
980         * lib/unistr/u8-to-u32.c: New file.
981
982         * modules/unistr/u16-to-u8: New file.
983         * lib/unistr/u16-to-u8.c: New file.
984
985         * modules/unistr/u16-to-u32: New file.
986         * lib/unistr/u16-to-u32.c: New file.
987
988         * modules/unistr/u32-to-u8: New file.
989         * lib/unistr/u32-to-u8.c: New file.
990
991         * modules/unistr/u32-to-u16: New file.
992         * lib/unistr/u32-to-u16.c: New file.
993
994         * modules/unistr/u8-check: New file.
995         * modules/unistr/u16-check: New file.
996         * modules/unistr/u32-check: New file.
997         * lib/unistr/u8-check.c: New file.
998         * lib/unistr/u16-check.c: New file.
999         * lib/unistr/u32-check.c: New file.
1000
1001         * modules/unistr/u8-chr: New file.
1002         * modules/unistr/u16-chr: New file.
1003         * modules/unistr/u32-chr: New file.
1004         * lib/unistr/u8-chr.c: New file.
1005         * lib/unistr/u16-chr.c: New file.
1006         * lib/unistr/u32-chr.c: New file.
1007
1008         * modules/unistr/u8-cmp: New file.
1009         * modules/unistr/u16-cmp: New file.
1010         * modules/unistr/u32-cmp: New file.
1011         * lib/unistr/u8-cmp.c: New file.
1012         * lib/unistr/u16-cmp.c: New file.
1013         * lib/unistr/u32-cmp.c: New file.
1014
1015         * modules/unistr/u8-cpy: New file.
1016         * modules/unistr/u16-cpy: New file.
1017         * modules/unistr/u32-cpy: New file.
1018         * lib/unistr/u8-cpy.c: New file.
1019         * lib/unistr/u16-cpy.c: New file.
1020         * lib/unistr/u32-cpy.c: New file.
1021         * lib/unistr/u-cpy.h: New file.
1022
1023         * modules/unistr/u8-cpy-alloc: New file.
1024         * modules/unistr/u16-cpy-alloc: New file.
1025         * modules/unistr/u32-cpy-alloc: New file.
1026         * lib/unistr/u8-cpy-alloc.c: New file.
1027         * lib/unistr/u16-cpy-alloc.c: New file.
1028         * lib/unistr/u32-cpy-alloc.c: New file.
1029         * lib/unistr/u-cpy-alloc.h: New file.
1030
1031         * modules/unistr/u8-endswith: New file.
1032         * modules/unistr/u16-endswith: New file.
1033         * modules/unistr/u32-endswith: New file.
1034         * lib/unistr/u8-endswith.c: New file.
1035         * lib/unistr/u16-endswith.c: New file.
1036         * lib/unistr/u32-endswith.c: New file.
1037         * lib/unistr/u-endswith.h: New file.
1038
1039         * modules/unistr/u8-mblen: New file.
1040         * modules/unistr/u16-mblen: New file.
1041         * modules/unistr/u32-mblen: New file.
1042         * lib/unistr/u8-mblen.c: New file.
1043         * lib/unistr/u16-mblen.c: New file.
1044         * lib/unistr/u32-mblen.c: New file.
1045
1046         * modules/unistr/u8-mbtouc: New file.
1047         * modules/unistr/u16-mbtouc: New file.
1048         * modules/unistr/u32-mbtouc: New file.
1049         * lib/unistr/u8-mbtouc.c: New file.
1050         * lib/unistr/u16-mbtouc.c: New file.
1051         * lib/unistr/u32-mbtouc.c: New file.
1052
1053         * modules/unistr/u8-mbtouc-safe: New file.
1054         * modules/unistr/u16-mbtouc-safe: New file.
1055         * modules/unistr/u32-mbtouc-safe: New file.
1056         * lib/unistr/u8-mbtouc-safe.c: New file.
1057         * lib/unistr/u16-mbtouc-safe.c: New file.
1058         * lib/unistr/u32-mbtouc-safe.c: New file.
1059
1060         * modules/unistr/u8-move: New file.
1061         * modules/unistr/u16-move: New file.
1062         * modules/unistr/u32-move: New file.
1063         * lib/unistr/u8-move.c: New file.
1064         * lib/unistr/u16-move.c: New file.
1065         * lib/unistr/u32-move.c: New file.
1066         * lib/unistr/u-move.h: New file.
1067
1068         * modules/unistr/u8-next: New file.
1069         * modules/unistr/u16-next: New file.
1070         * modules/unistr/u32-next: New file.
1071         * lib/unistr/u8-next.c: New file.
1072         * lib/unistr/u16-next.c: New file.
1073         * lib/unistr/u32-next.c: New file.
1074
1075         * modules/unistr/u8-prev: New file.
1076         * modules/unistr/u16-prev: New file.
1077         * modules/unistr/u32-prev: New file.
1078         * lib/unistr/u8-prev.c: New file.
1079         * lib/unistr/u16-prev.c: New file.
1080         * lib/unistr/u32-prev.c: New file.
1081
1082         * modules/unistr/u8-set: New file.
1083         * modules/unistr/u16-set: New file.
1084         * modules/unistr/u32-set: New file.
1085         * lib/unistr/u8-set.c: New file.
1086         * lib/unistr/u16-set.c: New file.
1087         * lib/unistr/u32-set.c: New file.
1088         * lib/unistr/u-set.h: New file.
1089
1090         * modules/unistr/u8-startswith: New file.
1091         * modules/unistr/u16-startswith: New file.
1092         * modules/unistr/u32-startswith: New file.
1093         * lib/unistr/u8-startswith.c: New file.
1094         * lib/unistr/u16-startswith.c: New file.
1095         * lib/unistr/u32-startswith.c: New file.
1096         * lib/unistr/u-startswith.h: New file.
1097
1098         * modules/unistr/u8-stpcpy: New file.
1099         * modules/unistr/u16-stpcpy: New file.
1100         * modules/unistr/u32-stpcpy: New file.
1101         * lib/unistr/u8-stpcpy.c: New file.
1102         * lib/unistr/u16-stpcpy.c: New file.
1103         * lib/unistr/u32-stpcpy.c: New file.
1104         * lib/unistr/u-stpcpy.h: New file.
1105
1106         * modules/unistr/u8-stpncpy: New file.
1107         * modules/unistr/u16-stpncpy: New file.
1108         * modules/unistr/u32-stpncpy: New file.
1109         * lib/unistr/u8-stpncpy.c: New file.
1110         * lib/unistr/u16-stpncpy.c: New file.
1111         * lib/unistr/u32-stpncpy.c: New file.
1112         * lib/unistr/u-stpncpy.h: New file.
1113
1114         * modules/unistr/u8-strcat: New file.
1115         * modules/unistr/u16-strcat: New file.
1116         * modules/unistr/u32-strcat: New file.
1117         * lib/unistr/u8-strcat.c: New file.
1118         * lib/unistr/u16-strcat.c: New file.
1119         * lib/unistr/u32-strcat.c: New file.
1120         * lib/unistr/u-strcat.h: New file.
1121
1122         * modules/unistr/u8-strchr: New file.
1123         * modules/unistr/u16-strchr: New file.
1124         * modules/unistr/u32-strchr: New file.
1125         * lib/unistr/u8-strchr.c: New file.
1126         * lib/unistr/u16-strchr.c: New file.
1127         * lib/unistr/u32-strchr.c: New file.
1128
1129         * modules/unistr/u8-strcmp: New file.
1130         * modules/unistr/u16-strcmp: New file.
1131         * modules/unistr/u32-strcmp: New file.
1132         * lib/unistr/u8-strcmp.c: New file.
1133         * lib/unistr/u16-strcmp.c: New file.
1134         * lib/unistr/u32-strcmp.c: New file.
1135
1136         * modules/unistr/u8-strcpy: New file.
1137         * modules/unistr/u16-strcpy: New file.
1138         * modules/unistr/u32-strcpy: New file.
1139         * lib/unistr/u8-strcpy.c: New file.
1140         * lib/unistr/u16-strcpy.c: New file.
1141         * lib/unistr/u32-strcpy.c: New file.
1142         * lib/unistr/u-strcpy.h: New file.
1143
1144         * modules/unistr/u8-strcspn: New file.
1145         * modules/unistr/u16-strcspn: New file.
1146         * modules/unistr/u32-strcspn: New file.
1147         * lib/unistr/u8-strcspn.c: New file.
1148         * lib/unistr/u16-strcspn.c: New file.
1149         * lib/unistr/u32-strcspn.c: New file.
1150         * lib/unistr/u-strcspn.h: New file.
1151
1152         * modules/unistr/u8-strdup: New file.
1153         * modules/unistr/u16-strdup: New file.
1154         * modules/unistr/u32-strdup: New file.
1155         * lib/unistr/u8-strdup.c: New file.
1156         * lib/unistr/u16-strdup.c: New file.
1157         * lib/unistr/u32-strdup.c: New file.
1158         * lib/unistr/u-strdup.h: New file.
1159
1160         * modules/unistr/u8-strlen: New file.
1161         * modules/unistr/u16-strlen: New file.
1162         * modules/unistr/u32-strlen: New file.
1163         * lib/unistr/u8-strlen.c: New file.
1164         * lib/unistr/u16-strlen.c: New file.
1165         * lib/unistr/u32-strlen.c: New file.
1166         * lib/unistr/u-strlen.h: New file.
1167
1168         * modules/unistr/u8-strmblen: New file.
1169         * modules/unistr/u16-strmblen: New file.
1170         * modules/unistr/u32-strmblen: New file.
1171         * lib/unistr/u8-strmblen.c: New file.
1172         * lib/unistr/u16-strmblen.c: New file.
1173         * lib/unistr/u32-strmblen.c: New file.
1174
1175         * modules/unistr/u8-strmbtouc: New file.
1176         * modules/unistr/u16-strmbtouc: New file.
1177         * modules/unistr/u32-strmbtouc: New file.
1178         * lib/unistr/u8-strmbtouc.c: New file.
1179         * lib/unistr/u16-strmbtouc.c: New file.
1180         * lib/unistr/u32-strmbtouc.c: New file.
1181
1182         * modules/unistr/u8-strncat: New file.
1183         * modules/unistr/u16-strncat: New file.
1184         * modules/unistr/u32-strncat: New file.
1185         * lib/unistr/u8-strncat.c: New file.
1186         * lib/unistr/u16-strncat.c: New file.
1187         * lib/unistr/u32-strncat.c: New file.
1188         * lib/unistr/u-strncat.h: New file.
1189
1190         * modules/unistr/u8-strncmp: New file.
1191         * modules/unistr/u16-strncmp: New file.
1192         * modules/unistr/u32-strncmp: New file.
1193         * lib/unistr/u8-strncmp.c: New file.
1194         * lib/unistr/u16-strncmp.c: New file.
1195         * lib/unistr/u32-strncmp.c: New file.
1196
1197         * modules/unistr/u8-strncpy: New file.
1198         * modules/unistr/u16-strncpy: New file.
1199         * modules/unistr/u32-strncpy: New file.
1200         * lib/unistr/u8-strncpy.c: New file.
1201         * lib/unistr/u16-strncpy.c: New file.
1202         * lib/unistr/u32-strncpy.c: New file.
1203         * lib/unistr/u-strncpy.h: New file.
1204
1205         * modules/unistr/u8-strnlen: New file.
1206         * modules/unistr/u16-strnlen: New file.
1207         * modules/unistr/u32-strnlen: New file.
1208         * lib/unistr/u8-strnlen.c: New file.
1209         * lib/unistr/u16-strnlen.c: New file.
1210         * lib/unistr/u32-strnlen.c: New file.
1211         * lib/unistr/u-strnlen.h: New file.
1212
1213         * modules/unistr/u8-strpbrk: New file.
1214         * modules/unistr/u16-strpbrk: New file.
1215         * modules/unistr/u32-strpbrk: New file.
1216         * lib/unistr/u8-strpbrk.c: New file.
1217         * lib/unistr/u16-strpbrk.c: New file.
1218         * lib/unistr/u32-strpbrk.c: New file.
1219         * lib/unistr/u-strpbrk.h: New file.
1220
1221         * modules/unistr/u8-strrchr: New file.
1222         * modules/unistr/u16-strrchr: New file.
1223         * modules/unistr/u32-strrchr: New file.
1224         * lib/unistr/u8-strrchr.c: New file.
1225         * lib/unistr/u16-strrchr.c: New file.
1226         * lib/unistr/u32-strrchr.c: New file.
1227
1228         * modules/unistr/u8-strspn: New file.
1229         * modules/unistr/u16-strspn: New file.
1230         * modules/unistr/u32-strspn: New file.
1231         * lib/unistr/u8-strspn.c: New file.
1232         * lib/unistr/u16-strspn.c: New file.
1233         * lib/unistr/u32-strspn.c: New file.
1234         * lib/unistr/u-strspn.h: New file.
1235
1236         * modules/unistr/u8-strstr: New file.
1237         * modules/unistr/u16-strstr: New file.
1238         * modules/unistr/u32-strstr: New file.
1239         * lib/unistr/u8-strstr.c: New file.
1240         * lib/unistr/u16-strstr.c: New file.
1241         * lib/unistr/u32-strstr.c: New file.
1242         * lib/unistr/u-strstr.h: New file.
1243
1244         * modules/unistr/u8-strtok: New file.
1245         * modules/unistr/u16-strtok: New file.
1246         * modules/unistr/u32-strtok: New file.
1247         * lib/unistr/u8-strtok.c: New file.
1248         * lib/unistr/u16-strtok.c: New file.
1249         * lib/unistr/u32-strtok.c: New file.
1250         * lib/unistr/u-strtok.h: New file.
1251
1252         * modules/unistr/u8-uctomb: New file.
1253         * modules/unistr/u16-uctomb: New file.
1254         * modules/unistr/u32-uctomb: New file.
1255         * lib/unistr/u8-uctomb.c: New file.
1256         * lib/unistr/u16-uctomb.c: New file.
1257         * lib/unistr/u32-uctomb.c: New file.
1258
1259         * MODULES.html.sh (Unicode string functions): Add the new modules.
1260
1261 2007-01-08  Bruno Haible  <bruno@clisp.org>
1262
1263         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
1264         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
1265         subdirectories.
1266
1267 2007-01-08  Karl Berry  <karl@gnu.org>
1268
1269         * doc/error.texi: mention that main() fns must set program_name
1270         when progname is used.
1271
1272 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
1273
1274         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
1275         WCTYPE_H is empty, for the benefit of builds from non-distclean
1276         directories.  Problem reported by Eric Blake in
1277         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
1278
1279 2007-01-08  Bruno Haible  <bruno@clisp.org>
1280
1281         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
1282         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
1283         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
1284         PROVIDE_CANONICALIZE_FILENAME_MODE.
1285         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
1286
1287 2007-01-08  Bruno Haible  <bruno@clisp.org>
1288
1289         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
1290         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
1291         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
1292         * lib/fts.c: Likewise.
1293         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
1294
1295 2006-12-25  Bruno Haible  <bruno@clisp.org>
1296
1297         * modules/utf8-ucs4-safe: New file.
1298         * lib/utf8-ucs4-safe.h: New file.
1299         * lib/unistr/utf8-ucs4-safe.c: New file.
1300
1301         * modules/utf16-ucs4-safe: New file.
1302         * lib/utf16-ucs4-safe.h: New file.
1303         * lib/unistr/utf16-ucs4-safe.c: New file.
1304
1305         * MODULES.html.sh (Unicode string functions): Add the new modules.
1306
1307 2007-01-08  Bruno Haible  <bruno@clisp.org>
1308
1309         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
1310         (Depends-on): Add unitypes.
1311         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1312         (u8_mbtouc_aux): Move out to separate file.
1313         (u8_mbtouc): Use ucs4_t, uint8_t types.
1314         * lib/unistr/utf8-ucs4.c: New file.
1315
1316         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
1317         (Depends-on): Add unitypes.
1318         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1319         (u16_mbtouc_aux): Move out to separate file.
1320         (u16_mbtouc): Use ucs4_t, uint16_t types.
1321         * lib/unistr/utf16-ucs4.c: New file.
1322
1323         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
1324         (Depends-on): Add unitypes.
1325         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
1326         (u8_uctomb_aux): Move out to separate file.
1327         (u8_uctomb): Use ucs4_t, uint8_t types.
1328         * lib/unistr/ucs4-utf8.c: New file.
1329
1330         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
1331         (Depends-on): Add unitypes.
1332         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
1333         (u16_uctomb_aux): Move out to separate file.
1334         (u16_uctomb): Use ucs4_t, uint16_t types.
1335         * lib/unistr/ucs4-utf16.c: New file.
1336
1337 2006-12-25  Bruno Haible  <bruno@clisp.org>
1338
1339         * modules/unitypes: New file.
1340         * lib/unitypes.h: New file.
1341         * MODULES.html.sh (func_all_modules): New section "Unicode string
1342         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
1343         this section. Add unitypes.
1344
1345 2007-01-08  Bruno Haible  <bruno@clisp.org>
1346
1347         Avoid variable names that conflict with those from libtool.
1348         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
1349         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
1350         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1351         library_names_spec to acl_library_names_spec, hardcode_* to
1352         acl_hardcode_*.
1353         Reported by Ralf Wildenhues.
1354
1355 2007-01-08  Bruno Haible  <bruno@clisp.org>
1356
1357         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1358         definition.
1359         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1360         definition.
1361         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1362         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1363         definition.
1364         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1365         definition.
1366         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1367         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1368         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1369         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1370         definition.
1371         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1372         definition.
1373         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1374         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1375         GC_USE_<algorithm>.
1376         * lib/gc-libgcrypt.c: Likewise.
1377         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1378         * modules/gc-arctwo (configure.ac): Likewise.
1379         * modules/gc-des (configure.ac): Likewise.
1380         * modules/gc-hmac-md5 (configure.ac): Likewise.
1381         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1382         * modules/gc-md2 (configure.ac): Likewise.
1383         * modules/gc-md4 (configure.ac): Likewise.
1384         * modules/gc-md5 (configure.ac): Likewise.
1385         * modules/gc-random (configure.ac): Likewise.
1386         * modules/gc-rijndael (configure.ac): Likewise.
1387         * modules/gc-sha1 (configure.ac): Likewise.
1388
1389 2007-01-08  Bruno Haible  <bruno@clisp.org>
1390
1391         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1392         macro definition.
1393         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1394         definition.
1395         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1396         definition.
1397         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1398         * modules/fcntl-safer (configure.ac): Likewise.
1399         * modules/fopen-safer (configure.ac): Likewise.
1400         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1401         GNULIB_FWRITEERROR macro definition.
1402
1403 2007-01-08  Bruno Haible  <bruno@clisp.org>
1404
1405         * m4/gnulib-common.m4: New file.
1406         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1407         (func_get_filelist): Add m4/gnulib-common.m4.
1408
1409 2007-01-08  Bruno Haible  <bruno@clisp.org>
1410
1411         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1412         command.
1413
1414 2007-01-08  Jim Meyering  <jim@meyering.net>
1415
1416         Use a more robust test for a "can't happen" condition.
1417         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1418         narrowed the st_size value.  Presuming the "can't happen" condition
1419         is true, that narrowing could conceivably convert an invalid st_size
1420         value into a valid one.  Instead, use a change based on Matthew
1421         Woehlke's original patch.
1422
1423         Slight readability improvement: use an assert-like macro
1424         in place of literal "abort ()" uses.
1425         * lib/fts.c (fts_assert): Define.
1426         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1427         Use this macro instead of a bare 'abort'.
1428
1429 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1430
1431         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1432         simply work around them.
1433         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1434         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1435         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1436         Don't bother to define as macros, since the standard doesn't require it.
1437         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1438         longer worry about IRIX 5.3.
1439         (HAVE_WCTYPE_CTMP_BUG): Remove.
1440
1441 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1442
1443         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1444         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1445         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1446         Problems reported by Georg Schwarz for IRIX 5.3.
1447
1448         * gnulib-tool (autoconf_minversion): Take the maximum version number
1449         found, not the minimum.  Problem reported by James Youngman.
1450
1451 2007-01-03  Karl Berry  <karl@gnu.org>
1452
1453         * doc/error.texi: new file, explaining interaction with progname.
1454         * doc/gnulib.texi: include it.  Update copyright.
1455
1456 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1457
1458         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1459         AC_CANONICAL_HOST, to improve autobuild outputs.
1460
1461 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1462             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1463
1464         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1465         sockets, server sockets, and other file descriptors.  Count errors
1466         to compute the return value.  Reorder the code a bit to be easier
1467         to follow.  Don't set event bits that were not requested (except
1468         POLLERR and POLLHUP).
1469
1470 2007-01-01  Bruno Haible  <bruno@clisp.org>
1471
1472         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1473
1474 2007-01-03  Jim Meyering  <jim@meyering.net>
1475
1476         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1477
1478 2007-01-02  Bruno Haible  <bruno@clisp.org>
1479
1480         * modules/settime (Include): Require timespec.h.
1481         * modules/nanosleep (Include): Likewise.
1482
1483 2007-01-01  Bruno Haible  <bruno@clisp.org>
1484
1485         * gnulib-tool (func_emit_copyright_notice): Bump year.
1486         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1487
1488 2007-01-01  Bruno Haible  <bruno@clisp.org>
1489
1490         Improve support for OpenBSD.
1491         * build-aux/config.rpath (libname_spec): Export.
1492         (library_names_spec): New variable. Export.
1493         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
1494         library_names_spec from the config.rpath output. Locate shared library
1495         through the name pattern in library_names_spec.
1496
1497 2007-01-01  Eric Blake  <ebb9@byu.net>
1498
1499         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1500
1501 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1502
1503         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1504         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1505         assume the C locale, and avoid an "eval" that could cause trouble.
1506         Problem with SORT reported by Bob Proulx.
1507
1508         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1509         Define.  Trivial patch from Henning Nielsen Lund, originally
1510         sent to bug-grep@gnu.org today.
1511
1512 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1513
1514         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
1515         struct stat.  Problem reported by Henning Nielsen Lund.
1516         * lib/acl.c: Include acl.h first, to check interface.  Don't
1517         bother to include sys/types.h and sys/stat.h again.
1518
1519 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1520
1521         Import the following change from libc; problem reported by
1522         Sven Verdoolaege.
1523
1524         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
1525
1526         [BZ #1373]
1527         * lib/argp.h: Remove __NTH for __argp_usage inline function.
1528
1529 2006-12-28  Jim Meyering  <jim@meyering.net>
1530
1531         * build-aux/announce-gen: Do not assume that the package
1532         builds any of tar.gz, tar.bz2, and .xdelta files.
1533         Suggestion from Simon Josefsson.
1534
1535 2006-12-28  Simon Josefsson  <simon@josefsson.org>
1536
1537         * modules/announce-gen: New file.
1538
1539 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
1540
1541         * lib/mbchar.h: Just include <wctype.h>; the wctype module
1542         handles its gotchas now.
1543         * lib/mbswidth.c: Likewise.
1544         * lib/wcwidth.h: Likewise.
1545         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
1546         and iswcntrl; the wctype module does this stuff now.
1547         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1548         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1549         * modules/mbchar (Depends-on): Add wctype.
1550         * modules/mbswidth (Depends-on): Likewise.
1551         * modules/wcwidth (Depends-on): Likewise.
1552
1553 2006-12-27  Eric Blake  <ebb9@byu.net>
1554
1555         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
1556         module uses more than what <wctype.h> is required to provide.
1557
1558 2006-12-26  Eric Blake  <ebb9@byu.net>
1559
1560         * gnulib-tool (sed_extract_prog): Avoid space-tab.
1561
1562 2006-12-26  Eric Blake  <ebb9@byu.net>
1563
1564         * modules/absolute-header: New module.
1565         * modules/fcntl (Depends-on): Depend on it.
1566         * modules/inttypes (Depends-on): Likewise.
1567         * modules/stdint (Depends-on): Likewise.
1568         * modules/sys_stat (Depends-on): Likewise.
1569         * modules/wctype (Depends-on): Likewise.
1570         * MODULES.html.sh (Support for building libraries and
1571         executables): Document it.
1572
1573 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1574
1575         * gnulib-tool (SED): Remove, undoing previous change.
1576         The problem was that it broke coreutils on Solaris, because
1577         "sed --posix" leaked into a makefile.
1578         (sed): New alias, if 'alias' and GNU sed.
1579
1580 2006-12-24  Jim Meyering  <jim@meyering.net>
1581
1582         Work around an fchownat bug in glibc-2.4:
1583         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1584         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1585         in spite of the -P option.
1586         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1587         New macros.
1588         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1589         * modules/openat (Files): Add lib/fchownat.c.
1590         * lib/openat.c (fchownat): Don't define here.  Move to...
1591         * lib/fchownat.c: ...this new file.
1592
1593 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1594
1595         Fix bug reported by Bruno Haible in
1596         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1597         where quotearg.c didn't compile on Mac OS X 10.2 because it
1598         lacks <wchar.h> and wint_t.
1599         * lib/wctype_.h (__wctype_wint_t): New type.
1600         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1601         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1602         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1603         Arg is now of type __wctype_wint_t, not wint_t.
1604         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1605         substitute HAVE_WINT_T.
1606         * modules/wctype (Files): Add m4/wint_t.m4.
1607         (wctype.h): Substitute HAVE_WINT_T.
1608
1609 2006-12-23  Bruno Haible  <bruno@clisp.org>
1610
1611         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1612
1613 2006-12-23  Bruno Haible  <bruno@clisp.org>
1614
1615         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1616         S_ISLNK.
1617         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1618         mingw.
1619
1620 2006-12-22  Bruno Haible  <bruno@clisp.org>
1621
1622         * lib/copy-file.c: Include acl.h.
1623         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1624         Close the file descriptors only after being done with copy_acl.
1625         * modules/copy-file (Depends-on): Add acl.
1626
1627 2006-12-22  Bruno Haible  <bruno@clisp.org>
1628
1629         * gnulib-tool (SED): New variable.
1630         Use $SED instead of sed everywhere.
1631
1632 2006-12-22  Bruno Haible  <bruno@clisp.org>
1633
1634         * modules/no-c++: New file.
1635         * m4/no-c++.m4: New file.
1636         * MODULES.html.sh (Support for building libraries and executables):
1637         Add no-c++.
1638
1639 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1640
1641         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1642         Include <limits.h>, and use its INT_MAX to rewrite the
1643         j loop so that it does not overflow 'int'.  Problem reported by
1644         Ralf Wildenhues in
1645         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1646         Play it safe by shifting left by 1 rather than multiplying by 2,
1647         as GCC is less likely to optimize this away when the value
1648         is signed (when it assumes overflow leads to undefined behavior).
1649         Also, don't assume time_t uses two's complement.
1650
1651 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1652
1653         * MODULES.html.sh: New module wctype.
1654         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1655         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1656         <wctype.h>, since the new wctype module should fix this.
1657         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1658         the wctype module should arrange for it.
1659         * lib/regex_internal.h: Likewise.
1660         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1661         since the wctype module should handle this now.
1662         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1663         * modules/fnmatch (Depends-on): Add wctype.
1664         * modules/quotearg (Depends-on): Likewise.
1665         * modules/regex (Depends-on): Likewise.
1666
1667 2006-12-19  Bruno Haible  <bruno@clisp.org>
1668
1669         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1670         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1671
1672 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1673
1674         * modules/savewd (Depends-on): Fix dependency on fcntl.
1675
1676 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1677
1678         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1679         conforms to C99, rather than relying on the user's environment
1680         setting of STDINT_H.
1681
1682 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1683         and Eric Blake  <ebb9@byu.net>
1684
1685         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1686         This is more consistent with the other defines here.
1687         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1688         Port to z/OS.  Problem reported by Paul Gilmartin.
1689         Change local vars to use gl_ prefix rather than ac_.
1690         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1691         with other defines.
1692         * modules/double-slash-root: New module.
1693         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1694         (Depends-on): Add double-slash-root.
1695         * MODULES.html.sh (File system functions): Mention new module.
1696
1697 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1698
1699         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1700         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1701         This is for the benefit of gzip, which doesn't do i18n.
1702
1703 2006-12-12  Jim Meyering  <jim@meyering.net>
1704
1705         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1706         Reported by Andreas Schwab <schwab@suse.de>.
1707
1708 2006-12-12  Bruno Haible  <bruno@clisp.org>
1709
1710         Merge these changes.
1711         2006-09-05  Bruno Haible  <bruno@clisp.org>
1712         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1713         iconv_alloc succeeded.
1714         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1715         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1716         test for " && dest " at the end - dest is always != NULL there. Call
1717         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1718         with 2xNULL arguments, also to flush the state storage. Handle the
1719         IRIX iconv behaviour. Realloc the final result, to throw away unused
1720         memory.
1721
1722 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1723
1724         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1725         and fchmodat unconditionally, since glibc 2.4 has them.
1726         Problem reported by Arkadiusz Miskiewicz.
1727
1728 2006-12-10  Bruno Haible  <bruno@clisp.org>
1729
1730         * gnulib-tool (func_import): Show the include files only for those
1731         modules that are copied and specified.
1732         Reported by Karl Berry.
1733
1734 2006-12-08  Jim Meyering  <jim@meyering.net>
1735
1736         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1737         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1738
1739         * build-aux/announce-gen: Add two new options, both optional:
1740         --bootstrap-tools=TOOL_LIST
1741               a comma-separated list of tools, e.g.,
1742               autoconf,automake,bison,gnulib
1743         --gnulib-snapshot-date=DATE
1744               if gnulib is in the bootstrap tool list,
1745               then report this as the snapshot date.
1746               If not specified, use the current date/time.
1747               If you specify a date here, be sure it's UTC.
1748
1749 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1750
1751         * tests/test-argp-2.sh: Fix test to match actual output.
1752         (func_compare): Fix sed script to be portable.
1753
1754 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1755
1756         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1757         workaround for this case.  It is not autoconfigured now; offhand
1758         it's hard to see how to autoconfigure it.
1759
1760 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1761
1762         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1763         a directory that is about to be chowned.  Such a directory's
1764         initial file permissions should permit the owner only and this
1765         should not be changed until after the chown, since the group and
1766         other bits would be incorrect if they granted permission before
1767         the chown.
1768
1769         Fix porting problem for iswctype reported by Georg Schwarz in:
1770         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1771         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1772         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1773         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1774         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1775
1776 2006-12-03  Jim Meyering  <jim@meyering.net>
1777
1778         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1779         p->fts_statp may not yet be defined.
1780         (fts_read): Instead, set it in the caller, once p->fts_statp is
1781         sure to be defined, and corresponds to a top-level directory.
1782         This bug made du -x fail.  Here's the coreutils test case:
1783         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1784         Reported by Mike Frysinger.
1785
1786 2006-12-01  Jim Meyering  <jim@meyering.net>
1787
1788         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1789         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1790         Reported by Simon Josefsson.
1791
1792 2006-11-30  Jim Meyering  <jim@meyering.net>
1793
1794         * m4/warning.m4: Use the all-permissive copyright notice
1795         recommended by RMS (rather than LGPL).
1796         * m4/vararrays.m4: Likewise.
1797         * m4/flexmember.m4: Likewise.
1798
1799 2006-11-29  Bruno Haible  <bruno@clisp.org>
1800
1801         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1802         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1803         using +=.
1804         Reported by Simon Josefsson <simon@josefsson.org>.
1805
1806 2006-11-28  James Youngman <jay@gnu.org>
1807
1808         * README: Advise users that they might find the bug-gnulib@gnu.org
1809         and autotools-announce@gnu.org mailing lists useful.
1810
1811 2006-11-28  Bruno Haible  <bruno@clisp.org>
1812
1813         * m4/ptrdiff_max.m4: Remove file.
1814
1815 2006-11-21  Bruno Haible  <bruno@clisp.org>
1816
1817         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1818         _AC_COMPUTE_INT.
1819         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1820         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1821         _AC_COMPUTE_INT.
1822         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1823         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1824         _AC_COMPUTE_INT.
1825         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1826
1827 2006-11-28  Jim Meyering  <jim@meyering.net>
1828
1829         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
1830         warning from "gcc -Wshadow" about shadowing the builtin.
1831
1832 2006-11-27  Bruno Haible  <bruno@clisp.org>
1833
1834         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
1835         _AC_COMPUTE_INT.
1836         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1837
1838 2006-11-27  Bruno Haible  <bruno@clisp.org>
1839             Paul Eggert  <eggert@cs.ucla.edu>
1840
1841         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
1842
1843 2006-11-26  Bruno Haible  <bruno@clisp.org>
1844
1845         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1846         noinst_LTLIBRARIES.
1847
1848 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
1849             Bruno Haible  <bruno@clisp.org>
1850
1851         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
1852         if compiling with "gcc -ansi".
1853
1854 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1855
1856         Fix some incompatibilities with gcc -ansi -pedantic.
1857         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
1858         if compiling pedantically with GCC, unless it's C99 or later.
1859         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
1860         it mishandles gcc -ansi -pedantic as well.
1861         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
1862         if gcc -pedantic.
1863         * lib/regexec.c (check_node_accept_bytes): Don't use auto
1864         initializers for struct if -pedantic, unless it's C99 or later.
1865
1866 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
1867
1868         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
1869         Don't close an fd more than once. Identical atimes indicate
1870         success, not failure.
1871
1872 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
1873
1874         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
1875
1876 2006-11-23  Jim Meyering  <jim@meyering.net>
1877
1878         * build-aux/announce-gen: New file.  From coreutils.
1879
1880 2006-11-22  Jim Meyering  <jim@meyering.net>
1881
1882         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
1883         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
1884         (fts_read): Use a temporary to narrow the overused st_size member
1885         before using it in a switch statement.  Reported by Matthew Woehlke.
1886
1887         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
1888         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
1889
1890 2006-11-20  Bruno Haible  <bruno@clisp.org>
1891
1892         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
1893         changequote instead of pairs of brackets.
1894         Reported by Andreas Schwab <schwab@suse.de>.
1895
1896 2006-11-21  Jim Meyering  <jim@meyering.net>
1897
1898         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
1899         so as to remain compatible with older compilers.
1900         Patch from Michael Deutschmann.
1901
1902 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1903
1904         * MODULES.html.sh (File system functions): Add openat.
1905
1906         * lib/openat.h (rpl_fstatat): New macro, if
1907         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
1908         (fstatat): Define to rpl_fstatat under the same conditions,
1909         unless COMPILING_FSTATAT.
1910         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
1911         seems to have the bug.
1912         * lib/fstatat.c: New file.
1913         * modules/openat (Files): Add it.
1914
1915 2006-11-20  Bruno Haible  <bruno@clisp.org>
1916
1917         * Makefile: New file.
1918
1919 2006-11-20  Jim Meyering  <jim@meyering.net>
1920
1921         The beginnings of syntax-related checks for gnulib.
1922         * lib/Makefile: New file.
1923         * lib/t-idcache: New script.  Ensure that the two halves of
1924         idcache.c stay in sync.
1925
1926         * lib/idcache.c: Adjust comments in user- and group- portions to
1927         be more accurate, and to be consistent with one another.
1928
1929 2006-11-20  Jim Meyering  <jim@meyering.net>
1930
1931         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
1932         continue using the flexible array member (thus, this module performs
1933         half as many malloc calls), with the addition that...
1934         (getgroup, getuser): Consistently record a non-match via an empty
1935         "name" string, and map an empty string match to a NULL return value.
1936         * modules/idcache (Depends-on): Re-add flexmember.
1937
1938         * lib/idcache.c (getuser): Remove all uses of the register keyword.
1939         (getuidbyname, getgroup, getgidbyname): Likewise.
1940
1941         Use cleaner syntax: NULL rather than 0.
1942         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
1943
1944 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1945
1946         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
1947         It mishandled the case where the group was missing.
1948         Problem reported by Greg Schafer.
1949         * modules/idcache: Likewise.
1950
1951 2006-11-18  Jim Meyering  <jim@meyering.net>
1952
1953         * check-module (%exempt_header): Add exception for some
1954         conditionally-included headers.
1955
1956         * modules/i-ring (Depends-on): Add verify.
1957         (License): Change to LGPL.
1958
1959 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1960
1961         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
1962         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
1963         and inttostr.h.  Use snprintf rather than uinttostr, so that
1964         LGPLed code doesn't depend on GPLed.
1965
1966 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
1967
1968         * modules/inline (License): Change from GPL to LGPL.
1969
1970 2006-11-17  Jim Meyering  <jim@meyering.net>
1971
1972         * modules/d-type (License): Switch to LGPL.
1973
1974 2006-11-15  Bruno Haible  <bruno@clisp.org>
1975
1976         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
1977
1978 2006-11-15  Eric Blake  <ebb9@byu.net>
1979
1980         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
1981         the module dependency.
1982
1983 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1984             Bruno Haible  <bruno@clisp.org>
1985
1986         * gnulib-tool (func_create_testdir): Add license consistency check.
1987
1988 2006-11-15  Eric Blake  <ebb9@byu.net>
1989
1990         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
1991         random "(cached)" in configure output.
1992
1993 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1994
1995         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
1996         test for conforming inttypes.h is both announced and cached.
1997
1998         * MODULES.html.sh (seen_modules, seen_files): New variables.
1999         (func_module): Rewrite to use a few less gnulib-tool and sed
2000         invocations.  Avoid a couple of quadratic algorithms for ...
2001         (missed_modules, missed_files): ... these, with ...
2002         (func_append, func_tmpdir): ... these new functions, from
2003         gnulib-tool.  Analogously, install traps for cleanup.
2004
2005         * tests/test-gc.c (main): Remove unused variables.
2006         * tests/test-read-file.c: Include stdlib.h, for 'free'.
2007
2008 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
2009
2010         * modules/inttostr (License): Change to LGPL.
2011
2012 2006-11-14  Eric Blake  <ebb9@byu.net>
2013
2014         * modules/tempname (License): Change to LGPL.
2015
2016 2006-11-14  Eric Blake  <ebb9@byu.net>
2017
2018         * doc/functions.texi (Function Portability): *printf functions on
2019         Cygwin now understand all POSIX size specifiers.
2020
2021 2006-11-14  Bruno Haible  <bruno@clisp.org>
2022
2023         * modules/c-ctype (License): Change to LGPL.
2024
2025 2006-11-12  Bruno Haible  <bruno@clisp.org>
2026
2027         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
2028         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
2029         for GNOME libraries, for which the include files are installed in
2030         subdirectories of $prefix/include.
2031
2032 2006-11-12  Bruno Haible  <bruno@clisp.org>
2033
2034         * m4/lib-link.m4: Require at least autoconf-2.54.
2035         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
2036         name to underscores for the --with option.
2037
2038 2006-11-13  Bruno Haible  <bruno@clisp.org>
2039
2040         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
2041         the tests directory.
2042         Reported by Ralf Wildenhues.
2043
2044 2006-11-13  Bruno Haible  <bruno@clisp.org>
2045
2046         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
2047         (func_emit_initmacro_end): Undo the override here.
2048         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
2049         Works around the famous automake error in coreutils.
2050
2051 2006-11-13  Eric Blake  <ebb9@byu.net>
2052
2053         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
2054         element, not its node.
2055
2056 2006-11-12  Bruno Haible  <bruno@clisp.org>
2057
2058         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
2059         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
2060
2061 2006-11-12  Bruno Haible  <bruno@clisp.org>
2062
2063         * gnulib-tool: New option --local-symlink.
2064         (func_usage): Document it.
2065         (lsymbolic): New variable.
2066         (func_import, func_create_testdir): If --symlink was not specified,
2067         test whether --local-symlink was specified and the file comes from
2068         the local_gnulib_dir.
2069
2070 2006-11-12  Bruno Haible  <bruno@clisp.org>
2071
2072         * gnulib-tool (func_ln): New function.
2073         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
2074
2075 2006-11-12  Bruno Haible  <bruno@clisp.org>
2076
2077         Finish support for source files in subdirectories.
2078         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2079         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2080         AUTOMAKE_OPTIONS.
2081         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2082
2083 2006-11-12  Bruno Haible  <bruno@clisp.org>
2084
2085         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2086         EXTRA_lib_SOURCES augmentation.
2087         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2088
2089 2006-11-12  Jim Meyering  <jim@meyering.net>
2090
2091         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2092         file descriptors.  This also averts a failure on systems with
2093         native openat support when a traversed directory lacks "x" access.
2094         * lib/fts_.h: Include "i-ring.h"
2095         (struct FTS) [fts_fd_ring]: New member.
2096         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2097         (FCHDIR): Add parentheses.
2098         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2099         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2100         When descending, rather than simply closing the previous
2101         fts_cwd_fd value, push that file descriptor onto the ring.
2102         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2103         (fts_open): Initialize the new fd_ring member.
2104         (fts_close): Clear the ring.
2105         (fts_safe_changedir): When possible, use our new fd_ring to skip
2106         the diropen and fstat and dev/ino comparison that would normally
2107         accompany a virtual `chdir ("..")'.
2108
2109         * modules/fts (Depends-on): Add i-ring.
2110         * modules/i-ring: New module.
2111         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2112         * m4/i-ring.m4: New file.
2113
2114 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2115
2116         * gnulib-tool (func_create_testdir): Fix replacement of
2117         `build-aux' in configure.ac.  Run autotools in gltests
2118         subdirectory.
2119         (func_create_testdir, func_create_megatestdir, test): There is
2120         no need for '--force' in most autotool invocations in a new
2121         tree.  Actually fail the whole test if any of the tools, or the
2122         configure or make stages fail.
2123
2124         Sync from Automake.
2125         * build-aux/gnupload: Revert last change.  Add pointer to upload
2126         instructions of the GNU Maintenance Instructions.
2127         Suggestion by Karl Berry.
2128
2129 2006-11-10  Jim Meyering  <jim@meyering.net>
2130
2131         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
2132
2133 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2134
2135         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
2136         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
2137         (bind_textdomain_codeset) [! ENABLE_NLS]:
2138         Evaluate all the arguments.  That way, callers get compatible behavior
2139         if the arguments have side effects.  Also, it avoids some GCC
2140         diagnostics in some cases; Joel E. Denny reported problems when Bison
2141         was configured with --enable-gcc-warnigs.
2142
2143 2006-11-10  Jim Meyering  <jim@meyering.net>
2144
2145         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
2146         relevant options in CFLAGS (like -O, -fno-inline) are taken into
2147         account.
2148
2149 2006-11-10  Jim Meyering  <jim@meyering.net>
2150
2151         * modules/inline: New file/module.
2152         * modules/xalloc (Files): Remove m4/inline.m4.
2153         (Depends-on): Add inline, instead.
2154         * modules/oset: Likewise.
2155         * modules/list: Likewise.
2156
2157 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2158
2159         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
2160         Problem reported by Matthew Woehlke.
2161
2162 2006-11-09  Bruno Haible  <bruno@clisp.org>
2163
2164         * lib/tempname.c (gen_tempname): Remove variant that invokes
2165         __gen_tempname.
2166         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
2167         __gen_tempname.
2168
2169 2006-11-08  Bruno Haible  <bruno@clisp.org>
2170
2171         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
2172         to 'yes' instead of 'cross-compiling'.
2173
2174 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
2175
2176         * lib/quotearg.h (quotearg_free): New decl.
2177         * lib/quotearg.c (quotearg_free): New function.
2178         (slot0, nslots, slotvec0, slotvec):
2179         Now file-scope so that quotearg_free can get at them.
2180
2181 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2182
2183         Sync from Automake.
2184         * build-aux/gnupload: Add missing 'gnu' to example URL.
2185         Report by Karl Berry.
2186
2187 2006-11-08  Bruno Haible  <bruno@clisp.org>
2188
2189         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
2190         Suggested by Paul Eggert.
2191
2192 2006-11-08  Jim Meyering  <jim@meyering.net>
2193
2194         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
2195         It's already included if !_LIBC.
2196         (fts_safe_changedir): Add a comment.
2197
2198 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2199
2200         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
2201         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
2202         Matthew Woehlke.
2203
2204         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
2205         definitions up, to avoid colliding with change below.
2206         (static_inline) [HAVE_INLINE]: New macro.
2207         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
2208         Provide extern decls when !HAVE_INLINE.  Do not define unless
2209         static_inline is defined, either by us or by xmalloc.c.  Use
2210         static_inline rather than static inline.
2211         (XCALLOC): Optimize sizeof(T) = 1 case.
2212         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2213
2214 2006-11-07  Bruno Haible  <bruno@clisp.org>
2215
2216         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
2217         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
2218         AC_C_INLINE.
2219         * modules/xalloc (Files): Add m4/inline.m4.
2220
2221 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2222
2223         * README: Fix typo.
2224         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
2225         (Miscellanous Notes): ...from this.
2226
2227 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2228
2229         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
2230         Mention that offsetof should be used instead of sizeof.
2231         From Bruno Haible.
2232
2233 2006-11-07  Bruno Haible  <bruno@clisp.org>
2234
2235         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
2236
2237 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2238
2239         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2240         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
2241         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2242         (gl_tree_add_before, gl_tree_add_after):
2243         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
2244         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
2245         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2246         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
2247         (gl_linked_add_after, gl_linked_add_at): Likewise.
2248         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
2249         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2250         (gl_tree_add_before, gl_tree_add_after): Likewise.
2251         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
2252         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
2253         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
2254
2255 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2256
2257         * lib/gl_oset.h: Use C comment style, not C++ comment style.
2258
2259 2006-11-06  Bruno Haible  <bruno@clisp.org>
2260
2261         * m4/inline.m4: New file.
2262         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
2263         * modules/list (Files): Add m4/inline.m4.
2264         * modules/oset (Files): Likewise.
2265
2266 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2267
2268         * lib/idcache.c: Include <stddef.h>, for offsetof.
2269         (struct userid.name): Change from char * to a flexible array member.
2270         All uses changed.
2271         * modules/idcache (Depends-on): Add flexmember.
2272
2273         * MODULES.html.sh (Core language properties): New module flexmember.
2274         * modules/flexmember, m4/flexmember.m4: New files.
2275
2276         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
2277         inline functions that are identical with the old xnmalloc_inline,
2278         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
2279         that we can avoid some unnecessary integer multiplications and
2280         divisions in the common case where the element size is known at
2281         compile time.
2282         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
2283         needed.
2284         (xnboundedmalloc): Remove.
2285         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
2286         arguments, for consistency with rest of this header.
2287         (xcharalloc): Rewrite using XNMALLOC.
2288         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
2289         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
2290         versions have been moved to lib/xalloc.h and renamed to be the
2291         non-*_inline versions.
2292         (xmalloc, xrealloc): Implement without reference to the xnmalloc
2293         and xnrealloc functions, since those functions are now inline and
2294         now call us.
2295         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
2296         renaming described above.
2297         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
2298         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
2299         captures the dependency in AC_C_INLINE.
2300
2301         New module canonicalize-lgpl, proposed by Charles Wilson in
2302         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
2303         with a few small changes afterwards.
2304         * MODULES.html.sh (File system functions): New module
2305         canonicalize-lgpl.
2306         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
2307         and canonicalize_file_name.
2308         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
2309         * modules/canonicalize-lgpl: New files.
2310
2311 2006-11-05  Bruno Haible  <bruno@clisp.org>
2312
2313         * gnulib-tool (func_import, func_create_testdir): Create directories
2314         also for files in subdirectories of lib/.
2315
2316 2006-11-05  Bruno Haible  <bruno@clisp.org>
2317
2318         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
2319         ANSI C compliant.
2320
2321 2006-11-03  Bruno Haible  <bruno@clisp.org>
2322
2323         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2324         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
2325         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
2326         (xnboundedmalloc): New inline function.
2327         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
2328         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
2329         xmalloc.
2330         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
2331         xmalloc.
2332         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
2333         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
2334         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
2335         xmalloc.
2336         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2337         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
2338         xmalloc.
2339         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
2340         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2341         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
2342         xmalloc.
2343         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2344         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
2345         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2346         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
2347         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
2348         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
2349         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
2350
2351 2006-11-03  Bruno Haible  <bruno@clisp.org>
2352
2353         * lib/c-ctype.h [C++]: Define functions without name mangling.
2354         * lib/fwriteerror.h [C++]: Likewise.
2355         * lib/gcd.h [C++]: Likewise.
2356         * lib/linebreak.h [C++]: Likewise.
2357
2358 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2359
2360         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2361         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2362         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2363         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2364         Check for functions and headers just once.
2365         Check for declaration of canonicalize_file_name.
2366         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2367
2368 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2369
2370         * gnulib-tool (func_import): Fix typo in actioncmd.
2371
2372 2006-11-02  Bruno Haible  <bruno@clisp.org>
2373
2374         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2375         newline sequence in the Makefile.am snippet as a space, like "make"
2376         does.
2377         Reported by Roger Persson <perrog@gmail.com>.
2378
2379 2006-11-01  Bruno Haible  <bruno@clisp.org>
2380
2381         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2382         already declared in <string.h>.
2383         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2384
2385 2006-11-01  Bruno Haible  <bruno@clisp.org>
2386
2387         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2388         * lib/strcase.h: Include <string.h>.
2389         (strcasecmp): Define to rpl_strcasecmp here.
2390
2391 2006-11-01  Bruno Haible  <bruno@clisp.org>
2392
2393         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2394
2395 2006-11-01  Eric Blake  <ebb9@byu.net>
2396
2397         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2398
2399         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2400
2401 2006-10-29  Bruno Haible  <bruno@clisp.org>
2402
2403         Make it compile in C++ mode.
2404         * lib/full-write.c (full_rw): Add a cast.
2405
2406 2006-11-01  Bruno Haible  <bruno@clisp.org>
2407
2408         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2409         be POSIX compliant.
2410         Reported by Roger Persson <perrog@gmail.com>.
2411
2412 2006-11-01  Eric Blake  <ebb9@byu.net>
2413
2414         * lib/getopt_.h: Fix comments.
2415
2416 2006-10-31  Eric Blake  <ebb9@byu.net>
2417
2418         * modules/tmpdir (Depends-on): Add sys_stat.
2419         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2420         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2421         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2422         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2423         tempname.
2424
2425 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2426
2427         Avoid some C++ diagnostics reported by Bruno Haible.
2428         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2429         xmalloc.
2430         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2431         (struct slotvec): Move to top level.
2432         (quotearg_n_options): Rewrite to avoid xmalloc.
2433         * lib/xalloc.h (xcharalloc): New function.
2434         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2435         [defined __cplusplus]: Add function template that provides result
2436         type propagation.  This part of the change is from Bruno Haible.
2437
2438 2006-10-29  Bruno Haible  <bruno@clisp.org>
2439
2440         Make it compile in C++ mode.
2441         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2442         * lib/strnlen1.c (strnlen1): Cast memchr result.
2443         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2444         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2445         (create_temp_dir): Rename local variable 'template'.
2446         (compile_csharp_using_sscli): Add cast.
2447         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2448         * lib/findprog.c (find_in_path): Likewise.
2449         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2450         * lib/wait-process.c (register_slave_subprocess): Likewise.
2451
2452 2006-10-22  Bruno Haible  <bruno@clisp.org>
2453
2454         * modules/tsearch: New file.
2455         * lib/tsearch.h: New file.
2456         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2457         * m4/tsearch.m4: New file.
2458         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2459
2460 2006-10-29  Eric Blake  <ebb9@byu.net>
2461
2462         * lib/arcfour.c: Assume config.h.
2463         * lib/arctwo.c: Likewise.
2464         * lib/base64.c: Likewise.
2465         * lib/check-version.c: Likewise.
2466         * lib/crc.c: Likewise.
2467         * lib/des.c: Likewise.
2468         * lib/gc-gnulib.c: Likewise.
2469         * lib/gc-libgcrypt.c: Likewise.
2470         * lib/gc-pbkdf2-sha1.c: Likewise.
2471         * lib/getaddrinfo.c: Likewise.
2472         * lib/getdelim.c: Likewise.
2473         * lib/getline.c: Likewise.
2474         * lib/hmac-md5.c: Likewise.
2475         * lib/hmac-sha1.c: Likewise.
2476         * lib/iconvme.c: Likewise.
2477         * lib/md2.c: Likewise.
2478         * lib/md4.c: Likewise.
2479         * lib/memxor.c: Likewise.
2480         * lib/read-file.c: Likewise.
2481         * lib/readline.c: Likewise.
2482         * lib/rijndael-alg-fst.c: Likewise.
2483         * lib/rijndael-api-fst.c: Likewise.
2484         * lib/xgetdomainname.c: Likewise.
2485
2486 2006-10-28  Eric Blake  <ebb9@byu.net>
2487
2488         * lib/xstrndup.c: Assume config.h.
2489
2490 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
2491
2492         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
2493         stat-macros.h is now for our own macros, whereas stat_h is for
2494         macros in the <sys/stat.h> name space.
2495         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
2496         (STAT_MACROS_H): Remove.
2497         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2498         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2499         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2500         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2501         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2502         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2503         Move these macros to ...
2504         * lib/stat_.h: here.  Don't include stat-macros.h.
2505         * lib/canonicalize.c: Don't include stat-macros.h.
2506         * lib/chown.c: Likewise.
2507         * lib/euidaccess.c: Likewise.
2508         * lib/file-type.c: Likewise.
2509         * lib/filemode.c: Likewise.
2510         * lib/glob.c: Likewise.
2511         * lib/isapipe.c: Likewise.
2512         * lib/lchown.c: Likewise.
2513         * lib/lstat.c: Likewise.
2514         * lib/mkdir-p.c: Likewise.
2515         * lib/rmdir.c: Likewise.
2516         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
2517         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
2518         unless mkdir isn't declared, to speed up 'configure'.
2519         Always create sys/stat.h, since it's unlikely any real sys/stat.h
2520         would define all the S_* symbols.
2521         * modules/canonicalize (Depends-on):
2522         Depend on sys_stat, not stat-macros.
2523         * modules/chown: Likewise.
2524         * modules/euidaccess: Likewise.
2525         * modules/filemode: Likewise.
2526         * modules/file-type: Likewise.
2527         * modules/glob: Likewise.
2528         * modules/isapipe: Likewise.
2529         * modules/lchown: Likewise.
2530         * modules/lstat: Likewise.
2531         * modules/mkancesdirs: Likewise.
2532         * modules/rmdir: Likewise.
2533         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
2534         * modules/modechange: Likewise.
2535         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
2536         (configure.ac): Remove gl_STAT_MACROS.
2537         * modules/sys_stat (Depends-on): Remove stat-macros.
2538
2539 2006-10-27  Bruno Haible  <bruno@clisp.org>
2540
2541         * m4/signed.m4: Remove file.
2542         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
2543         invocation.
2544         * modules/vasnprintf (Files): Remove m4/signed.m4.
2545
2546 2006-10-27  Bruno Haible  <bruno@clisp.org>
2547
2548         Update to GNU gettext 0.16.
2549         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
2550         m4/inttypes-h.m4, m4/signed.m4.
2551         * m4/gettext.m4: Update to GNU gettext 0.16.
2552         * m4/intl.m4: New file, from GNU gettext.
2553         * m4/intldir.m4: New file, from GNU gettext.
2554         * config/srclist.txt: Update
2555
2556 2006-10-27  Eric Blake  <ebb9@byu.net>
2557
2558         * MODULES.html.sh: Document tempname.
2559         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
2560         dependencies.
2561         (Files): Move lib/tempname.c...
2562         * modules/tempname: ...to this new module.
2563         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2564         (gl_PREREQ_TEMPNAME): Move...
2565         * m4/tempname.m4: ...to this new file.
2566         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2567         * modules/sys_stat (Depends-on): Add stat-macros.
2568         * lib/stat_.h (includes): Pick up stat macros.
2569         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2570         if stat macros are broken.
2571         * lib/tempname.c (includes): No need to include "stat-macros.h".
2572         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2573         (direxists, __path_search) [!_LIBC]: Don't compile these in
2574         gnulib; the tmpdir module covers that.
2575         * lib/tempname.h: New file.
2576
2577 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2578
2579         * COPYING: Explain how gnulib-tool converts licence headers.
2580         Almost all wording by Eric Blake.
2581
2582 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2583
2584         * lib/mbchar.h (is_basic_table): Make read-only.
2585         * lib/mbchar.c (is_basic_table): Likewise.
2586         Reported by John Darrington.
2587
2588 2006-10-25  Bruno Haible  <bruno@clisp.org>
2589
2590         * lib/progname.h (set_program_name): Undefine before defining.
2591
2592 2006-10-25  Bruno Haible  <bruno@clisp.org>
2593
2594         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2595         false for non-gcc C++ compilers.
2596         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2597
2598 2006-10-24  Bruno Haible  <bruno@clisp.org>
2599
2600         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2601         iconv implementations like Irix iconv.
2602
2603 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2604
2605         * modules/vararrays: New file.
2606         * m4/vararrays.m4: New file, taken from diffutils.
2607         * MODULES.html.sh: New module vararrays.
2608
2609 2006-10-24  Karl Berry  <karl@gnu.org>
2610
2611         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2612         Don't call GNU Unix.
2613
2614 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2615
2616         * users.txt: Add Libtool.
2617
2618         Sync from Libtool:
2619
2620         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2621
2622         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2623         to gnulib's policy of including config.h unconditionally.
2624
2625 2006-10-24  Bruno Haible  <bruno@clisp.org>
2626
2627         * modules/wcwidth (Files): Add m4/wint_t.m4.
2628         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2629         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2630
2631 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2632
2633         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2634         to pacify GCC with some -W flags enabled.  Problem reported by
2635         Bruno Haible.
2636
2637 2006-10-24  Jim Meyering  <jim@meyering.net>
2638
2639         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2640         Reported by Karl Berry.
2641
2642 2006-10-23  Bruno Haible  <bruno@clisp.org>
2643
2644         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2645
2646 2006-10-24  Bruno Haible  <bruno@clisp.org>
2647
2648         * lib/gl_list.h: Use C comment style, not C++ comment style.
2649
2650 2006-10-23  Eric Blake  <ebb9@byu.net>
2651
2652         * lib/getaddrinfo.c (includes): Add missing include.
2653
2654 2006-10-23  Bruno Haible  <bruno@clisp.org>
2655             Paul Eggert  <eggert@cs.ucla.edu>
2656
2657         Ability to rename obstack_free.
2658         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2659         obstack_free.
2660         (obstack_free): Invoke the __obstack_free macro.
2661         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2662
2663 2006-10-23  Bruno Haible  <bruno@clisp.org>
2664             Paul Eggert  <eggert@cs.ucla.edu>
2665
2666         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2667         __argc, __argv from the declaration. (They are defined as macros on
2668         mingw.)
2669
2670 2006-10-22  Bruno Haible  <bruno@clisp.org>
2671
2672         * doc/gnulib-intro.texi: New file.
2673         * doc/gnulib.texi: Include it.
2674
2675 2006-10-21  Bruno Haible  <bruno@clisp.org>
2676
2677         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2678         "Introduction", "Miscellanous Notes", "Particular Modules".
2679
2680 2006-10-21  Bruno Haible  <bruno@clisp.org>
2681
2682         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2683         Change mostlyclean-local rule to avoid sh syntax error from bash
2684         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2685
2686 2006-10-23  Jim Meyering  <jim@meyering.net>
2687
2688         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2689         in place of snprintf.
2690
2691         * modules/inttostr (Files): Add lib/uinttostr.c.
2692         * lib/uinttostr.c (inttostr): New file/function.
2693         * lib/inttostr.h (uinttostr): Declare.
2694         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2695         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2696         Add uinttostr.
2697         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2698
2699 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2700
2701         * lib/canonicalize.c (ELOOP): Define if not already defined.
2702         Problem reported by Bruno Haible in
2703         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2704
2705 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2706
2707         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2708         Problem reported by Perry Smith and Ville Laurikari.
2709
2710         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2711         uses.
2712
2713 2006-10-19  Bruno Haible  <bruno@clisp.org>
2714
2715         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2716         for mingw.
2717
2718 2006-10-19  Bruno Haible  <bruno@clisp.org>
2719
2720         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2721         Needed for mingw.
2722
2723 2006-10-19  Bruno Haible  <bruno@clisp.org>
2724
2725         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2726
2727 2006-10-19  Bruno Haible  <bruno@clisp.org>
2728
2729         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2730         it.
2731
2732 2006-10-19  Bruno Haible  <bruno@clisp.org>
2733
2734         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2735         invocation.
2736
2737 2006-10-19  Bruno Haible  <bruno@clisp.org>
2738
2739         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2740         mountlist by default.
2741
2742 2006-10-16  Bruno Haible  <bruno@clisp.org>
2743
2744         * lib/c-strstr.c: Include c-strstr.h.
2745
2746 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2747
2748         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2749         in a slash.
2750
2751 2006-10-18  Bruno Haible  <bruno@clisp.org>
2752
2753         * lib/lock.h [C++]: Wrap definitions in extern "C".
2754
2755 2006-10-18  Bruno Haible  <bruno@clisp.org>
2756
2757         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2758         gl_LIBOBJS list.
2759
2760 2006-10-18  Bruno Haible  <bruno@clisp.org>
2761
2762         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2763
2764 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2765
2766         * lib/xstrtol.h: Include gettext.h.
2767         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2768         Problem reported by Eric Blake.
2769         * modules/xstrtol (Depends-on): Add gettext-h.
2770
2771 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2772
2773         * lib/strftime.c (advance): New macro.
2774         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2775         incomplete type, so you can't add 0 to it.  Problem and patch
2776         reported by Eelco Dolstra for dietlibc.
2777
2778 2006-10-18  Jim Meyering  <jim@meyering.net>
2779
2780         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2781         type for a local, and rename it: s/up/user_proc/.
2782
2783 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2784
2785         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2786         READ_UTMP_USER_PROCESS.
2787         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2788
2789 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2790
2791         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2792         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2793
2794 2006-10-17  Eric Blake  <ebb9@byu.net>
2795
2796         * lib/sigprocmask.c (sigprocmask): Fix typo.
2797
2798         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2799
2800         * modules/clean-temp (Makefile.am): Don't add to make output...
2801         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2802         config.h.
2803
2804 2006-10-17  Bruno Haible  <bruno@clisp.org>
2805
2806         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2807         differently if DEFAULT_TEXT_DOMAIN is set.
2808
2809 2006-10-16  Bruno Haible  <bruno@clisp.org>
2810
2811         * lib/clean-temp.c: Include fwriteerror.h.
2812
2813 2006-10-16  Bruno Haible  <bruno@clisp.org>
2814
2815         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2816
2817 2006-10-16  Bruno Haible  <bruno@clisp.org>
2818
2819         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2820         * lib/sigprocmask.h: Include <sys/types.h>.
2821         (sigset_t): Use the system's definition if present.
2822
2823 2006-10-17  Eric Blake  <ebb9@byu.net>
2824
2825         * lib/xvasprintf.c (includes): Assume config.h.
2826         * lib/xasprintf.c (includes): Likewise.
2827
2828 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2829
2830         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
2831         at least as wide as intmax_t.
2832
2833 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
2834
2835         (Imported from Automake.)
2836         * build-aux/gnupload: Update to version 1.1 of directive file.
2837
2838 2006-10-16  Eric Blake  <ebb9@byu.net>
2839
2840         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
2841         match Automake 1.10a.
2842
2843 2006-10-14  Bruno Haible  <bruno@clisp.org>
2844
2845         * modules/sigprocmask: New file.
2846         * lib/sigprocmask.h: New file.
2847         * lib/sigprocmask.c: New file.
2848         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
2849         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
2850         request sigprocmask.o.
2851         (gl_PREREQ_SIGPROCMASK): New macro.
2852         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
2853         (Depends-on): Add sigprocmask.
2854         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
2855         gt_SIGNALBLOCKING. Test for 'raise' only once.
2856         * lib/fatal-signal.c: Include sigprocmask.h.
2857         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
2858         unblock_fatal_signals): Define always.
2859         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2860         sigprocmask.
2861
2862 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
2863
2864         Sync from Automake.
2865         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
2866         which incorrectly sets the mode of an existing destination
2867         directory.  In some cases the unpatched install-sh could do the
2868         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
2869         system.  We hope this is rare in practice, but it's clearly worth
2870         fixing.  Problem reported by Alex Unleashed in
2871         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
2872         Also, don't bother to check for -m bugs unless we're using -m;
2873         suggested by Stepan Kasal.
2874
2875 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2876
2877         Sync from Automake.
2878         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
2879         `-c' flag, so they appear at the same position as in %FASTDEP%
2880         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
2881         which ignores unknown options only after the first non-option.
2882         Bug report against M4 by Nelson H. F. Beebe.
2883
2884 2006-10-13  Jim Meyering  <jim@meyering.net>
2885
2886         Fix a bug in yesterday's change.
2887         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
2888         p->fts_statp->st_dev would be used uninitialized.
2889         Ensures that we always call fts_stat on the very first entry.
2890         Miklos Szeredi reported that find -xdev stopped working.
2891
2892 2006-10-12  Bruno Haible  <bruno@clisp.org>
2893
2894         * gnulib-tool (func_get_automake_snippet): Append an automatically
2895         computed EXTRA_DIST augmentation.
2896         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
2897         * modules/alloca-opt (Makefile.am): Likewise.
2898         * modules/allocsa (Makefile.am): Likewise.
2899         * modules/arcfour (Makefile.am): Likewise.
2900         * modules/arctwo (Makefile.am): Likewise.
2901         * modules/argmatch (Makefile.am): Likewise.
2902         * modules/argz (Makefile.am): Likewise.
2903         * modules/atexit (Makefile.am): Likewise.
2904         * modules/backupfile (Makefile.am): Likewise.
2905         * modules/byteswap (Makefile.am): Likewise.
2906         * modules/c-strtod (Makefile.am): Likewise.
2907         * modules/c-strtold (Makefile.am): Likewise.
2908         * modules/calloc (Makefile.am): Likewise.
2909         * modules/canon-host (Makefile.am): Likewise.
2910         * modules/canonicalize (Makefile.am): Likewise.
2911         * modules/chdir-long (Makefile.am): Likewise.
2912         * modules/chdir-safer (Makefile.am): Likewise.
2913         * modules/check-version (Makefile.am): Likewise.
2914         * modules/chown (Makefile.am): Likewise.
2915         * modules/cloexec (Makefile.am): Likewise.
2916         * modules/close-stream (Makefile.am): Likewise.
2917         * modules/closeout (Makefile.am): Likewise.
2918         * modules/crc (Makefile.am): Likewise.
2919         * modules/csharpexec (Makefile.am): Likewise.
2920         * modules/cycle-check (Makefile.am): Likewise.
2921         * modules/des (Makefile.am): Likewise.
2922         * modules/dev-ino (Makefile.am): Likewise.
2923         * modules/dirfd (Makefile.am): Likewise.
2924         * modules/dirname (Makefile.am): Likewise.
2925         * modules/dup2 (Makefile.am): Likewise.
2926         * modules/eealloc (Makefile.am): Likewise.
2927         * modules/error (Makefile.am): Likewise.
2928         * modules/euidaccess (Makefile.am): Likewise.
2929         * modules/exclude (Makefile.am): Likewise.
2930         * modules/exitfail (Makefile.am): Likewise.
2931         * modules/fcntl-safer (Makefile.am): Likewise.
2932         * modules/fcntl (Makefile.am): Likewise.
2933         * modules/file-type (Makefile.am): Likewise.
2934         * modules/fileblocks (Makefile.am): Likewise.
2935         * modules/filemode (Makefile.am): Likewise.
2936         * modules/filenamecat (Makefile.am): Likewise.
2937         * modules/fnmatch (Makefile.am): Likewise.
2938         * modules/fopen-safer (Makefile.am): Likewise.
2939         * modules/fpending (Makefile.am): Likewise.
2940         * modules/fprintftime (Makefile.am): Likewise.
2941         * modules/free (Makefile.am): Likewise.
2942         * modules/fsusage (Makefile.am): Likewise.
2943         * modules/ftruncate (Makefile.am): Likewise.
2944         * modules/fts (Makefile.am): Likewise.
2945         * modules/gc-arcfour (Makefile.am): Likewise.
2946         * modules/gc-des (Makefile.am): Likewise.
2947         * modules/gc-hmac-md5 (Makefile.am): Likewise.
2948         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
2949         * modules/gc-md4 (Makefile.am): Likewise.
2950         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2951         * modules/gc-sha1 (Makefile.am): Likewise.
2952         * modules/gc (Makefile.am): Likewise.
2953         * modules/getaddrinfo (Makefile.am): Likewise.
2954         * modules/getcwd (Makefile.am): Likewise.
2955         * modules/getdelim (Makefile.am): Likewise.
2956         * modules/getdomainname (Makefile.am): Likewise.
2957         * modules/getgroups (Makefile.am): Likewise.
2958         * modules/gethostname (Makefile.am): Likewise.
2959         * modules/gethrxtime (Makefile.am): Likewise.
2960         * modules/getline (Makefile.am): Likewise.
2961         * modules/getloadavg (Makefile.am): Likewise.
2962         * modules/getlogin_r (Makefile.am): Likewise.
2963         * modules/getndelim2 (Makefile.am): Likewise.
2964         * modules/getopt (Makefile.am): Likewise.
2965         * modules/getpagesize (Makefile.am): Likewise.
2966         * modules/getpass-gnu (Makefile.am): Likewise.
2967         * modules/getpass (Makefile.am): Likewise.
2968         * modules/getsubopt (Makefile.am): Likewise.
2969         * modules/gettime (Makefile.am): Likewise.
2970         * modules/gettimeofday (Makefile.am): Likewise.
2971         * modules/getugroups (Makefile.am): Likewise.
2972         * modules/getusershell (Makefile.am): Likewise.
2973         * modules/glob (Makefile.am): Likewise.
2974         * modules/group-member (Makefile.am): Likewise.
2975         * modules/hard-locale (Makefile.am): Likewise.
2976         * modules/hash (Makefile.am): Likewise.
2977         * modules/hmac-md5 (Makefile.am): Likewise.
2978         * modules/hmac-sha1 (Makefile.am): Likewise.
2979         * modules/human (Makefile.am): Likewise.
2980         * modules/idcache (Makefile.am): Likewise.
2981         * modules/imaxabs (Makefile.am): Likewise.
2982         * modules/imaxdiv (Makefile.am): Likewise.
2983         * modules/inet_ntop (Makefile.am): Likewise.
2984         * modules/inet_pton (Makefile.am): Likewise.
2985         * modules/intprops (Makefile.am): Likewise.
2986         * modules/inttostr (Makefile.am): Likewise.
2987         * modules/inttypes (Makefile.am): Likewise.
2988         * modules/isapipe (Makefile.am): Likewise.
2989         * modules/javaversion (Makefile.am): Likewise.
2990         * modules/lchmod (Makefile.am): Likewise.
2991         * modules/lchown (Makefile.am): Likewise.
2992         * modules/localcharset (Makefile.am): Likewise.
2993         * modules/long-options (Makefile.am): Likewise.
2994         * modules/lstat (Makefile.am): Likewise.
2995         * modules/malloc (Makefile.am): Likewise.
2996         * modules/mathl (Makefile.am): Likewise.
2997         * modules/mbchar (Makefile.am): Likewise.
2998         * modules/md2 (Makefile.am): Likewise.
2999         * modules/md4 (Makefile.am): Likewise.
3000         * modules/md5 (Makefile.am): Likewise.
3001         * modules/memcasecmp (Makefile.am): Likewise.
3002         * modules/memchr (Makefile.am): Likewise.
3003         * modules/memcmp (Makefile.am): Likewise.
3004         * modules/memcoll (Makefile.am): Likewise.
3005         * modules/memcpy (Makefile.am): Likewise.
3006         * modules/memmem (Makefile.am): Likewise.
3007         * modules/memmove (Makefile.am): Likewise.
3008         * modules/mempcpy (Makefile.am): Likewise.
3009         * modules/memrchr (Makefile.am): Likewise.
3010         * modules/memset (Makefile.am): Likewise.
3011         * modules/memxor (Makefile.am): Likewise.
3012         * modules/mkancesdirs (Makefile.am): Likewise.
3013         * modules/mkdir-p (Makefile.am): Likewise.
3014         * modules/mkdir (Makefile.am): Likewise.
3015         * modules/mkdtemp (Makefile.am): Likewise.
3016         * modules/mkstemp (Makefile.am): Likewise.
3017         * modules/mktime (Makefile.am): Likewise.
3018         * modules/modechange (Makefile.am): Likewise.
3019         * modules/mountlist (Makefile.am): Likewise.
3020         * modules/nanosleep (Makefile.am): Likewise.
3021         * modules/obstack (Makefile.am): Likewise.
3022         * modules/openat (Makefile.am): Likewise.
3023         * modules/pagealign_alloc (Makefile.am): Likewise.
3024         * modules/pathmax (Makefile.am): Likewise.
3025         * modules/physmem (Makefile.am): Likewise.
3026         * modules/poll (Makefile.am): Likewise.
3027         * modules/posixtm (Makefile.am): Likewise.
3028         * modules/posixver (Makefile.am): Likewise.
3029         * modules/putenv (Makefile.am): Likewise.
3030         * modules/quote (Makefile.am): Likewise.
3031         * modules/quotearg (Makefile.am): Likewise.
3032         * modules/raise (Makefile.am): Likewise.
3033         * modules/read-file (Makefile.am): Likewise.
3034         * modules/readline (Makefile.am): Likewise.
3035         * modules/readlink (Makefile.am): Likewise.
3036         * modules/readtokens (Makefile.am): Likewise.
3037         * modules/readutmp (Makefile.am): Likewise.
3038         * modules/realloc (Makefile.am): Likewise.
3039         * modules/regex (Makefile.am): Likewise.
3040         * modules/rename-dest-slash (Makefile.am): Likewise.
3041         * modules/rename (Makefile.am): Likewise.
3042         * modules/rijndael (Makefile.am): Likewise.
3043         * modules/rmdir (Makefile.am): Likewise.
3044         * modules/rpmatch (Makefile.am): Likewise.
3045         * modules/safe-read (Makefile.am): Likewise.
3046         * modules/safe-write (Makefile.am): Likewise.
3047         * modules/same-inode (Makefile.am): Likewise.
3048         * modules/same (Makefile.am): Likewise.
3049         * modules/save-cwd (Makefile.am): Likewise.
3050         * modules/savedir (Makefile.am): Likewise.
3051         * modules/setenv (Makefile.am): Likewise.
3052         * modules/settime (Makefile.am): Likewise.
3053         * modules/sha1 (Makefile.am): Likewise.
3054         * modules/sig2str (Makefile.am): Likewise.
3055         * modules/snprintf (Makefile.am): Likewise.
3056         * modules/stat-macros (Makefile.am): Likewise.
3057         * modules/stat-time (Makefile.am): Likewise.
3058         * modules/stdbool (Makefile.am): Likewise.
3059         * modules/stdint (Makefile.am): Likewise.
3060         * modules/stdlib-safer (Makefile.am): Likewise.
3061         * modules/stpcpy (Makefile.am): Likewise.
3062         * modules/stpncpy (Makefile.am): Likewise.
3063         * modules/strcase (Makefile.am): Likewise.
3064         * modules/strcasestr (Makefile.am): Likewise.
3065         * modules/strchrnul (Makefile.am): Likewise.
3066         * modules/strcspn (Makefile.am): Likewise.
3067         * modules/strdup (Makefile.am): Likewise.
3068         * modules/strerror (Makefile.am): Likewise.
3069         * modules/strftime (Makefile.am): Likewise.
3070         * modules/strndup (Makefile.am): Likewise.
3071         * modules/strnlen (Makefile.am): Likewise.
3072         * modules/strpbrk (Makefile.am): Likewise.
3073         * modules/strsep (Makefile.am): Likewise.
3074         * modules/strstr (Makefile.am): Likewise.
3075         * modules/strtod (Makefile.am): Likewise.
3076         * modules/strtoimax (Makefile.am): Likewise.
3077         * modules/strtok_r (Makefile.am): Likewise.
3078         * modules/strtol (Makefile.am): Likewise.
3079         * modules/strtoll (Makefile.am): Likewise.
3080         * modules/strtoul (Makefile.am): Likewise.
3081         * modules/strtoull (Makefile.am): Likewise.
3082         * modules/strtoumax (Makefile.am): Likewise.
3083         * modules/strverscmp (Makefile.am): Likewise.
3084         * modules/sys_socket (Makefile.am): Likewise.
3085         * modules/sys_stat (Makefile.am): Likewise.
3086         * modules/sysexits (Makefile.am): Likewise.
3087         * modules/time_r (Makefile.am): Likewise.
3088         * modules/timegm (Makefile.am): Likewise.
3089         * modules/timespec (Makefile.am): Likewise.
3090         * modules/tmpfile-safer (Makefile.am): Likewise.
3091         * modules/trim (Makefile.am): Likewise.
3092         * modules/unistd-safer (Makefile.am): Likewise.
3093         * modules/unlinkdir (Makefile.am): Likewise.
3094         * modules/unlocked-io (Makefile.am): Likewise.
3095         * modules/userspec (Makefile.am): Likewise.
3096         * modules/utime (Makefile.am): Likewise.
3097         * modules/utimecmp (Makefile.am): Likewise.
3098         * modules/utimens (Makefile.am): Likewise.
3099         * modules/vasnprintf (Makefile.am): Likewise.
3100         * modules/vasprintf (Makefile.am): Likewise.
3101         * modules/vsnprintf (Makefile.am): Likewise.
3102         * modules/xalloc (Makefile.am): Likewise.
3103         * modules/xgetcwd (Makefile.am): Likewise.
3104         * modules/xnanosleep (Makefile.am): Likewise.
3105         * modules/xreadlink (Makefile.am): Likewise.
3106         * modules/xstrtod (Makefile.am): Likewise.
3107         * modules/xstrtol (Makefile.am): Likewise.
3108         * modules/xstrtold (Makefile.am): Likewise.
3109         * modules/yesno (Makefile.am): Likewise.
3110         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3111
3112 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3113
3114         * modules/error (Makefile.am): Distribute files through
3115         EXTRA_DIST, not lib_SOURCES.
3116
3117 2006-10-12  Eric Blake  <ebb9@byu.net>
3118
3119         * modules/error (Makefile.am): Distribute files in /lib.
3120         * modules/obstack (Makefile.am): Likewise.
3121
3122 2006-10-12  Bruno Haible  <bruno@clisp.org>
3123
3124         * modules/acl (Makefile.am): Distribute all files in lib/ through
3125         EXTRA_DIST.
3126         * modules/arcfour (Makefile.am): Likewise.
3127         * modules/arctwo (Makefile.am): Likewise.
3128         * modules/argmatch (Makefile.am): Likewise.
3129         * modules/argz (Makefile.am): Likewise.
3130         * modules/atexit (Makefile.am): Likewise.
3131         * modules/backupfile (Makefile.am): Likewise.
3132         * modules/c-strtod (Makefile.am): Likewise.
3133         * modules/c-strtold (Makefile.am): Likewise.
3134         * modules/calloc (Makefile.am): Likewise.
3135         * modules/canon-host (Makefile.am): Likewise.
3136         * modules/canonicalize (Makefile.am): Likewise.
3137         * modules/chdir-long (Makefile.am): Likewise.
3138         * modules/chdir-safer (Makefile.am): Likewise.
3139         * modules/check-version (Makefile.am): Likewise.
3140         * modules/chown (Makefile.am): Likewise.
3141         * modules/cloexec (Makefile.am): Likewise.
3142         * modules/close-stream (Makefile.am): Likewise.
3143         * modules/closeout (Makefile.am): Likewise.
3144         * modules/crc (Makefile.am): Likewise.
3145         * modules/cycle-check (Makefile.am): Likewise.
3146         * modules/des (Makefile.am): Likewise.
3147         * modules/dirfd (Makefile.am): Likewise.
3148         * modules/dirname (Makefile.am): Likewise.
3149         * modules/dup2 (Makefile.am): Likewise.
3150         * modules/euidaccess (Makefile.am): Likewise.
3151         * modules/exclude (Makefile.am): Likewise.
3152         * modules/exitfail (Makefile.am): Likewise.
3153         * modules/fcntl-safer (Makefile.am): Likewise.
3154         * modules/file-type (Makefile.am): Likewise.
3155         * modules/fileblocks (Makefile.am): Likewise.
3156         * modules/filemode (Makefile.am): Likewise.
3157         * modules/filenamecat (Makefile.am): Likewise.
3158         * modules/fnmatch (Makefile.am): Likewise.
3159         * modules/fopen-safer (Makefile.am): Likewise.
3160         * modules/fpending (Makefile.am): Likewise.
3161         * modules/fprintftime (Makefile.am): Likewise.
3162         * modules/free (Makefile.am): Likewise.
3163         * modules/fsusage (Makefile.am): Likewise.
3164         * modules/ftruncate (Makefile.am): Likewise.
3165         * modules/fts (Makefile.am): Likewise.
3166         * modules/gc (Makefile.am): Likewise.
3167         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3168         * modules/getaddrinfo (Makefile.am): Likewise.
3169         * modules/getcwd (Makefile.am): Likewise.
3170         * modules/getdelim (Makefile.am): Likewise.
3171         * modules/getdomainname (Makefile.am): Likewise.
3172         * modules/getgroups (Makefile.am): Likewise.
3173         * modules/gethostname (Makefile.am): Likewise.
3174         * modules/gethrxtime (Makefile.am): Likewise.
3175         * modules/getline (Makefile.am): Likewise.
3176         * modules/getloadavg (Makefile.am): Likewise.
3177         * modules/getlogin_r (Makefile.am): Likewise.
3178         * modules/getopt (Makefile.am): Likewise.
3179         * modules/getpass (Makefile.am): Likewise.
3180         * modules/getpass-gnu (Makefile.am): Likewise.
3181         * modules/getsubopt (Makefile.am): Likewise.
3182         * modules/gettime (Makefile.am): Likewise.
3183         * modules/gettimeofday (Makefile.am): Likewise.
3184         * modules/getugroups (Makefile.am): Likewise.
3185         * modules/getusershell (Makefile.am): Likewise.
3186         * modules/glob (Makefile.am): Likewise.
3187         * modules/group-member (Makefile.am): Likewise.
3188         * modules/hard-locale (Makefile.am): Likewise.
3189         * modules/hash (Makefile.am): Likewise.
3190         * modules/hmac-md5 (Makefile.am): Likewise.
3191         * modules/hmac-sha1 (Makefile.am): Likewise.
3192         * modules/human (Makefile.am): Likewise.
3193         * modules/idcache (Makefile.am): Likewise.
3194         * modules/imaxabs (Makefile.am): Likewise.
3195         * modules/imaxdiv (Makefile.am): Likewise.
3196         * modules/inet_ntop (Makefile.am): Likewise.
3197         * modules/inet_pton (Makefile.am): Likewise.
3198         * modules/inttostr (Makefile.am): Likewise.
3199         * modules/isapipe (Makefile.am): Likewise.
3200         * modules/lchown (Makefile.am): Likewise.
3201         * modules/long-options (Makefile.am): Likewise.
3202         * modules/lstat (Makefile.am): Likewise.
3203         * modules/malloc (Makefile.am): Likewise.
3204         * modules/mathl (Makefile.am): Likewise.
3205         * modules/mbchar (Makefile.am): Likewise.
3206         * modules/md2 (Makefile.am): Likewise.
3207         * modules/md4 (Makefile.am): Likewise.
3208         * modules/md5 (Makefile.am): Likewise.
3209         * modules/memcasecmp (Makefile.am): Likewise.
3210         * modules/memchr (Makefile.am): Likewise.
3211         * modules/memcmp (Makefile.am): Likewise.
3212         * modules/memcoll (Makefile.am): Likewise.
3213         * modules/memcpy (Makefile.am): Likewise.
3214         * modules/memmem (Makefile.am): Likewise.
3215         * modules/memmove (Makefile.am): Likewise.
3216         * modules/mempcpy (Makefile.am): Likewise.
3217         * modules/memrchr (Makefile.am): Likewise.
3218         * modules/memset (Makefile.am): Likewise.
3219         * modules/memxor (Makefile.am): Likewise.
3220         * modules/mkancesdirs (Makefile.am): Likewise.
3221         * modules/mkdir (Makefile.am): Likewise.
3222         * modules/mkdir-p (Makefile.am): Likewise.
3223         * modules/mkdtemp (Makefile.am): Likewise.
3224         * modules/mkstemp (Makefile.am): Likewise.
3225         * modules/mktime (Makefile.am): Likewise.
3226         * modules/modechange (Makefile.am): Likewise.
3227         * modules/mountlist (Makefile.am): Likewise.
3228         * modules/nanosleep (Makefile.am): Likewise.
3229         * modules/openat (Makefile.am): Likewise.
3230         * modules/pagealign_alloc (Makefile.am): Likewise.
3231         * modules/physmem (Makefile.am): Likewise.
3232         * modules/poll (Makefile.am): Likewise.
3233         * modules/posixtm (Makefile.am): Likewise.
3234         * modules/posixver (Makefile.am): Likewise.
3235         * modules/putenv (Makefile.am): Likewise.
3236         * modules/quote (Makefile.am): Likewise.
3237         * modules/quotearg (Makefile.am): Likewise.
3238         * modules/raise (Makefile.am): Likewise.
3239         * modules/read-file (Makefile.am): Likewise.
3240         * modules/readline (Makefile.am): Likewise.
3241         * modules/readlink (Makefile.am): Likewise.
3242         * modules/readtokens (Makefile.am): Likewise.
3243         * modules/readutmp (Makefile.am): Likewise.
3244         * modules/realloc (Makefile.am): Likewise.
3245         * modules/regex (Makefile.am): Likewise.
3246         * modules/rename (Makefile.am): Likewise.
3247         * modules/rename-dest-slash (Makefile.am): Likewise.
3248         * modules/rijndael (Makefile.am): Likewise.
3249         * modules/rmdir (Makefile.am): Likewise.
3250         * modules/rpmatch (Makefile.am): Likewise.
3251         * modules/safe-read (Makefile.am): Likewise.
3252         * modules/safe-write (Makefile.am): Likewise.
3253         * modules/same (Makefile.am): Likewise.
3254         * modules/save-cwd (Makefile.am): Likewise.
3255         * modules/savedir (Makefile.am): Likewise.
3256         * modules/setenv (Makefile.am): Likewise.
3257         * modules/settime (Makefile.am): Likewise.
3258         * modules/sha1 (Makefile.am): Likewise.
3259         * modules/sig2str (Makefile.am): Likewise.
3260         * modules/snprintf (Makefile.am): Likewise.
3261         * modules/stdlib-safer (Makefile.am): Likewise.
3262         * modules/stpcpy (Makefile.am): Likewise.
3263         * modules/stpncpy (Makefile.am): Likewise.
3264         * modules/strcase (Makefile.am): Likewise.
3265         * modules/strcasestr (Makefile.am): Likewise.
3266         * modules/strchrnul (Makefile.am): Likewise.
3267         * modules/strcspn (Makefile.am): Likewise.
3268         * modules/strdup (Makefile.am): Likewise.
3269         * modules/strerror (Makefile.am): Likewise.
3270         * modules/strftime (Makefile.am): Likewise.
3271         * modules/strndup (Makefile.am): Likewise.
3272         * modules/strnlen (Makefile.am): Likewise.
3273         * modules/strpbrk (Makefile.am): Likewise.
3274         * modules/strsep (Makefile.am): Likewise.
3275         * modules/strstr (Makefile.am): Likewise.
3276         * modules/strtod (Makefile.am): Likewise.
3277         * modules/strtoimax (Makefile.am): Likewise.
3278         * modules/strtok_r (Makefile.am): Likewise.
3279         * modules/strtol (Makefile.am): Likewise.
3280         * modules/strtoll (Makefile.am): Likewise.
3281         * modules/strtoul (Makefile.am): Likewise.
3282         * modules/strtoull (Makefile.am): Likewise.
3283         * modules/strtoumax (Makefile.am): Likewise.
3284         * modules/strverscmp (Makefile.am): Likewise.
3285         * modules/time_r (Makefile.am): Likewise.
3286         * modules/timegm (Makefile.am): Likewise.
3287         * modules/tmpfile-safer (Makefile.am): Likewise.
3288         * modules/unistd-safer (Makefile.am): Likewise.
3289         * modules/unlinkdir (Makefile.am): Likewise.
3290         * modules/userspec (Makefile.am): Likewise.
3291         * modules/utime (Makefile.am): Likewise.
3292         * modules/utimecmp (Makefile.am): Likewise.
3293         * modules/utimens (Makefile.am): Likewise.
3294         * modules/vasnprintf (Makefile.am): Likewise.
3295         * modules/vasprintf (Makefile.am): Likewise.
3296         * modules/vsnprintf (Makefile.am): Likewise.
3297         * modules/xalloc (Makefile.am): Likewise.
3298         * modules/xgetcwd (Makefile.am): Likewise.
3299         * modules/xnanosleep (Makefile.am): Likewise.
3300         * modules/xreadlink (Makefile.am): Likewise.
3301         * modules/xstrtod (Makefile.am): Likewise.
3302         * modules/xstrtol (Makefile.am): Likewise.
3303         * modules/xstrtold (Makefile.am): Likewise.
3304         * modules/yesno (Makefile.am): Likewise.
3305
3306 2006-10-12  Jim Meyering  <jim@meyering.net>
3307
3308         * m4/getloadavg.m4: Revert the change below.
3309
3310         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
3311         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
3312         fail with a symlink, which is what coreutils' ./bootstrap now
3313         creates by default.
3314
3315 2006-10-12  Bruno Haible  <bruno@clisp.org>
3316
3317         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
3318         mingw.
3319         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
3320         MSVC and mingw explicitly.
3321
3322 2006-10-11  Simon Josefsson  <jas@extundo.com>
3323             Bruno Haible  <bruno@clisp.org>
3324
3325         Add support for multiple gnulib-tool invocations in the scope of a
3326         single configure.ac file.
3327         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
3328         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
3329         with the same contents as the _LIBADD variable.
3330         (func_emit_initmacro_start, func_emit_initmacro_end,
3331         func_emit_initmacro_done): New functions.
3332         (func_import, func_create_testdir): Invoke them. Allow the identifiers
3333         gl_LIBOBJS and gl_LTLIBOBJS.
3334
3335 2006-10-11  Bruno Haible  <bruno@clisp.org>
3336
3337         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
3338         (func_create_testdir): Don't create po/Makefile.am, don't invoke
3339         autoreconf. Instead, invoke autopoint explicitly but move back the
3340         *.m4 files from gnulib.
3341
3342 2006-10-11  Bruno Haible  <bruno@clisp.org>
3343
3344         * gnulib-tool (func_usage): Make module names after --create-testdir
3345         optional.
3346         (func_create_testdir): If no module was specified, use nearly all
3347         modules.
3348
3349 2006-10-12  Jim Meyering  <jim@meyering.net>
3350
3351         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3352         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3353         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3354         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3355         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3356         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3357         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3358         (fts_set_stat_required): New function.
3359         (fts_open): Defer the calls to fts_stat, if possible or requested.
3360         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3361         into fts_stat itself.
3362         (fts_read): Perform any required (deferred) fts_stat call.
3363         (fts_build): Likewise, for the directory we're about to open and read.
3364         In the readdir loop, carefully decide whether each entry will require
3365         an eventual call to fts_stat, using dirent.d_type info if available.
3366         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3367         a command line argument into this function.  Update all callers.
3368         Map a return value of FTS_DOT to FTS_D for a command line argument.
3369         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3370         Thanks to Miklos Szeredi for his tenacity and for the initial
3371         bug report about "find" failing on a FUSE-based file system.
3372
3373         * lib/fts.c (fts_open): Use consistent indentation.
3374
3375 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3376
3377         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3378         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3379         reported by Jim Meyering.  All uses of cache variables renamed
3380         to match Autoconf's.
3381         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3382         the other one.
3383
3384         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3385         Fix misspelling in diagnostic.
3386
3387 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3388
3389         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3390         defined.  Problem reported by Matthew Woehlke.
3391
3392         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3393         Add support for Tandem NonStop R series.
3394         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3395         Use new macro.
3396
3397         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3398         (has_trailing_slash): Omit size arg; all callers changed.
3399         Omit 'inline', since it doesn't help performance and we'd
3400         need to configure it.
3401         Don't count //, ///, etc. as having a trailing slash.
3402         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3403         (rpl_rename_dest_slash): On failure, use rename's errno rather
3404         than (in some cases) an incorrect or junk errno.
3405         Simplify code by removing need to compute length; this does
3406         cause it to make two passes instead of one over the file name,
3407         but it's worth it.
3408
3409         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3410         change, since Autoconf's version may no longer be appropriate now
3411         that we are using CVS Autoconf's version.  Add support for Tandem.
3412
3413 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3414             Bruno Haible  <bruno@clisp.org>
3415
3416         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3417         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3418         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3419         gl_AC_TYPE_LONG_LONG.
3420
3421         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3422         instead of HAVE_LONG_LONG.
3423         * lib/printf-args.c (printf_fetchargs): Likewise.
3424         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3425         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3426         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3427         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3428         gl_AC_TYPE_LONG_LONG.
3429
3430 2006-10-11  Bruno Haible  <bruno@clisp.org>
3431
3432         * m4/longlong.m4: Add comments.
3433         * m4/ulonglong.m4: Likewise.
3434
3435 2006-10-10  Bruno Haible  <bruno@clisp.org>
3436
3437         Make it possible to #define stpcpy, strdup to aliases.
3438         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3439         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3440
3441 2006-10-10  Bruno Haible  <bruno@clisp.org>
3442
3443         Make it possible to #define gcd to an alias.
3444         * lib/gcd.c: Include config.h.
3445
3446 2006-10-10  Bruno Haible  <bruno@clisp.org>
3447
3448         Make it possible to #define c_isascii to an alias.
3449         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3450         defined. Undefine the macros before defining them, to avoid gcc
3451         warnings.
3452         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3453         define NO_C_CTYPE_MACROS early.
3454
3455 2006-10-10  Bruno Haible  <bruno@clisp.org>
3456
3457         Make it possible to #define set_program_name to an alias.
3458         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3459         ENABLE_RELOCATABLE early.
3460
3461 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3462
3463         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3464         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3465         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3466         More generally, don't assume that 64-bit signed int is available
3467         if unsigned int is, and vice versa.
3468         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3469         unsigned symbols, not on their signed counterparts.
3470         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3471         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3472         (UINT64_C, UINTMAX_C):
3473         Likewise.
3474         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3475         unsigned counterparts.
3476         (Have_long_long, Unsigned): New macros.
3477         (Int): Renamed from INT.
3478         (strtoimax): Use the new macros.
3479         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3480         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3481         * modules/inttypes (inttypes.h): Substitute
3482         HAVE_UNSIGNED_LONG_LONG_INT.
3483         * modules/stdint (stdint.h): Likewise.
3484         (Files): Add m4/ulonglong.m4.
3485
3486 2006-10-10  Bruno Haible  <bruno@clisp.org>
3487
3488         Fix a gcc -Wshadow warning.
3489         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3490         to 'bucket'.
3491         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
3492         gl_linked_indexof_from_to): Likewise.
3493         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
3494         Likewise.
3495         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
3496         Likewise.
3497         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3498         Reported by Eric Blake.
3499
3500 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3501
3502         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3503         for NetBSD.  Problem reported by Bruno Haible.
3504
3505 2006-10-09  Jim Meyering  <jim@meyering.net>
3506
3507         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3508         Patch from Bruno Haible.
3509
3510 2006-10-09  Jim Meyering  <jim@meyering.net>
3511
3512         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3513         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3514         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
3515
3516 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3517
3518         Don't include <config.h> twice; this doesn't work in some cases,
3519         e.g., when config.h has "#define intmax_t long long int" and
3520         we include <config.h>, <inttypes.h>, <config.h> in that order.
3521         Problem reported by Matthew Woehlke in:
3522         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
3523         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
3524         * lib/fts-cycle.c: Don't include config.h.
3525         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
3526         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
3527         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
3528         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
3529         inttypes.h.
3530         * lib/xstrtoumax.c: Likewise.
3531         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
3532         __strtol and the like, so that this module is more like its siblings.
3533         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
3534         Remove; no longer needed now that we assume gnulib inttypes.h.
3535
3536 2006-10-08  Bruno Haible  <bruno@clisp.org>
3537
3538         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
3539         option.
3540
3541 2006-10-07  Jim Meyering  <jim@meyering.net>
3542
3543         * modules/inttypes (inttypes.h): Revert what seems to have been
3544         an inadvertent part of today's change: use "|", not "/" in the
3545         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
3546
3547 2006-10-07  Bruno Haible  <bruno@clisp.org>
3548
3549         * modules/sublist: New file.
3550
3551 2006-10-07  Bruno Haible  <bruno@clisp.org>
3552
3553         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
3554         * modules/argz (argz.h): Likewise.
3555         * modules/arpa_inet (arpa/inet.h): Likewise.
3556         * modules/byteswap (byteswap.h): Likewise.
3557         * modules/configmake (configmake.h): Likewise.
3558         * modules/fcntl (fcntl.h): Likewise.
3559         * modules/fnmatch (fnmatch.h): Likewise.
3560         * modules/getopt (getopt.h): Likewise.
3561         * modules/glob (glob.h): Likewise.
3562         * modules/inttypes (inttypes.h): Likewise.
3563         * modules/netinet_in (netinet/in.h): Likewise.
3564         * modules/poll (poll.h): Likewise.
3565         * modules/stdbool (stdbool.h): Likewise.
3566         * modules/stdint (stdint.h): Likewise.
3567         * modules/sys_select (sys/select.h): Likewise.
3568         * modules/sys_socket (sys/socket.h): Likewise.
3569         * modules/sys_stat (sys/stat.h): Likewise.
3570         * modules/sysexits (sysexits.h): Likewise.
3571         * modules/unistd (unistd.h): Likewise.
3572         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3573         Add a "DO NOT EDIT" comment to the generated file.
3574         (func_import): Likewise for gnulib-comp.m4.
3575
3576 2006-10-07  Bruno Haible  <bruno@clisp.org>
3577
3578         * lib/gl_sublist.h: New file.
3579         * lib/gl_sublist.c: New file.
3580
3581 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3582
3583         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3584         name (relative to the original working directory) and the file
3585         name component (relative to the temporary working directory).  All
3586         callers changed.
3587         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3588         * lib/mkdir-p.c (make_dir_parents): Likewise.
3589         * lib/mkdir-p.h (make_dir_parents): Likewise.
3590
3591 2006-10-06  Eric Blake  <ebb9@byu.net>
3592
3593         Define several macros for use by the clean-temp module.
3594         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3595         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3596         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3597
3598         * lib/clean-temp.h (close_stream_temp): New declaration.
3599         * lib/clean-temp.c (includes): Pull in headers according to what
3600         other modules are in use.
3601         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3602
3603 2006-10-06  Bruno Haible  <bruno@clisp.org>
3604
3605         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3606         instead of fopen, fwriteerror.
3607
3608 2006-10-06  Bruno Haible  <bruno@clisp.org>
3609
3610         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3611         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3612         int.
3613         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3614         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3615         Return an error indicator.
3616         Suggested by Eric Blake.
3617
3618 2006-10-06  Bruno Haible  <bruno@clisp.org>
3619
3620         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3621         Reported by Eric Blake.
3622
3623 2006-10-06  Bruno Haible  <bruno@clisp.org>
3624
3625         * modules/closeout (Description): Mention stderr too.
3626
3627 2006-10-06  Bruno Haible  <bruno@clisp.org>
3628         and Paul Eggert  <eggert@cs.ucla.edu>
3629
3630         * lib/closeout.c (close_stdout): Also close stderr.
3631         * lib/closeout.h: Update comment.
3632
3633 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3634
3635         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3636         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3637         * lib/dirchownmod.c: Include lchown.h.
3638         * lib/lchown.c: Don't include files that lchown.h now includes.
3639         Don't declare chown, since lchown.h now does that.
3640         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3641         (lchown): Define to rpl_chown if lchown is declared but
3642         does not exist.  Declare using a prototype if lchown is not
3643         declared.  Add a copyright notice.
3644         * lib/mkstemp.h: Include <unistd.h>.
3645         * lib/openat.c: Include lchown.h.
3646
3647         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3648         we now test for that separately.
3649         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3650         rather than O_NOFOLLOW, when testing whether it's possible to
3651         avoid a race condition reliably.
3652         * lib/savewd.c (savewd_chdir): Likewise.
3653
3654         Remove macros that are no longer needed now that stdint.h is
3655         reliable.
3656         * lib/fsusage.c (UINTMAX_MAX): Remove.
3657         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3658         * lib/utimecmp.c (SIZE_MAX): Remove.
3659
3660         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3661
3662         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3663         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3664         O_NOATIME works.
3665
3666 2006-10-05  Bruno Haible  <bruno@clisp.org>
3667
3668         * lib/gl_list.h (gl_sortedlist_search_from_to,
3669         gl_sortedlist_indexof_from_to): New declarations.
3670         (gl_list_implementation): New fields sortedlist_search_from_to,
3671         sortedlist_indexof_from_to.
3672         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3673         inline functions.
3674         * lib/gl_list.c (gl_sortedlist_search_from_to,
3675         gl_sortedlist_indexof_from_to): New functions.
3676         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3677         function.
3678         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3679         (gl_array_sortedlist_search_from_to): New function.
3680         (gl_array_list_implementation): Update.
3681         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3682         function.
3683         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3684         (gl_carray_sortedlist_search_from_to): New function.
3685         (gl_carray_list_implementation): Update.
3686         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3687         gl_linked_sortedlist_indexof_from_to): New functions.
3688         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3689         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3690         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3691         gl_tree_sortedlist_indexof_from_to): New functions.
3692         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3693         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3694         Update.
3695         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3696         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3697         Update.
3698
3699 2006-10-05  Bruno Haible  <bruno@clisp.org>
3700
3701         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3702         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3703         (struct gl_list_implementation): Add fields search_from_to,
3704         indexof_from_to. Remove fields search, indexof.
3705         (gl_list_search): Use the search_from_to method.
3706         (gl_list_search_from, gl_list_search_from_to): New functions.
3707         (gl_list_indexof): Use the indexof_from_to method.
3708         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3709         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3710         (gl_list_search_from, gl_list_search_from_to): New functions.
3711         (gl_list_indexof): Use the indexof_from_to method.
3712         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3713         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3714         gl_array_indexof. Add start_index, end_index arguments.
3715         (gl_array_search_from_to): Renamed from gl_array_search. Add
3716         start_index, end_index arguments.
3717         (gl_array_remove, gl_array_list_implementation): Update.
3718         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3719         gl_carray_indexof. Add start_index, end_index arguments.
3720         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3721         start_index, end_index arguments.
3722         (gl_carray_remove, gl_carray_list_implementation): Update.
3723         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3724         gl_linked_search. Add start_index, end_index arguments.
3725         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3726         start_index, end_index arguments.
3727         (gl_linked_remove): Update.
3728         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3729         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3730         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3731         field to 'size_t'.
3732         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3733         gl_tree_search. Add start_index, end_index arguments.
3734         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3735         start_index, end_index arguments.
3736         (gl_tree_remove): Update.
3737         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3738         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3739         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3740         function.
3741         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3742         gl_tree_search. Add start_index, end_index arguments.
3743         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3744         start_index, end_index arguments.
3745         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3746         Update.
3747         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3748
3749 2006-10-05  Bruno Haible  <bruno@clisp.org>
3750
3751         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3752
3753         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3754         fwriteerror_temp): New declarations.
3755         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3756         (descriptors): New variable.
3757         (cleanup): First, close the descriptors.
3758         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3759         fclose_temp, fwriteerror_temp): New functions.
3760
3761 2006-10-04  Jim Meyering  <jim@meyering.net>
3762
3763         * lib/fts.c (fts_open): Tiny comment change.
3764
3765 2006-10-04  Bruno Haible  <bruno@clisp.org>
3766
3767         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3768         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3769         gl_LOCK_BODY.
3770         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3771         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3772         gl_LOCK_EARLY_BODY.
3773         (gl_LOCK): Require gl_LOCK_BODY.
3774
3775 2006-10-04  Bruno Haible  <bruno@clisp.org>
3776
3777         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3778         (gl_oset_search_atleast): New declaration.
3779         (struct gl_oset_implementation): Add field 'search_atleast'.
3780         (gl_oset_search_atleast): New inline function.
3781         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3782         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3783         (gl_array_oset_implementation): Update.
3784         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3785         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3786         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3787
3788 2006-10-04  Bruno Haible  <bruno@clisp.org>
3789
3790         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3791
3792 2006-10-03  Bruno Haible  <bruno@clisp.org>
3793
3794         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3795         from gl_avltreehash_list_implementation.
3796
3797 2006-10-03  Bruno Haible  <bruno@clisp.org>
3798
3799         * lib/gl_oset.c (gl_oset_add): Fix return type.
3800
3801 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3802
3803         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3804
3805 2006-10-02  Eric Blake  <ebb9@byu.net>
3806
3807         * modules/strnlen (Depends-on): Add extensions.
3808
3809 2006-10-02  Eric Blake  <ebb9@byu.net>
3810
3811         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3812         definition in 2.60+.
3813
3814 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3815
3816         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3817         checks.
3818
3819 2006-10-02  Bruno Haible  <bruno@clisp.org>
3820
3821         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3822         to the AUTOMAKE_OPTIONS.
3823         Reported by Jim Meyering.
3824
3825 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3826
3827         Work around bug in Solaris 10 /proc file system:
3828         /proc/self/fd/NNN/.. isn't the parent directory of
3829         the directory whose file descriptor is NNN.  This needs to
3830         be worked around at run time, not compile time, since a
3831         program might be built on Solaris 8, where things work, and
3832         run on Solaris 10.
3833         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
3834         to use the following interface instead:
3835         (OPENAT_BUFFER_SIZE): New macro.
3836         (openat_proc_name): New function.
3837         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
3838         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
3839         Likewise.
3840         * lib/openat-proc.c: New file.
3841         * modules/openat (Files): Add lib/openat-proc.c.
3842         (Depends-on): Add same-inode, stdbool.
3843         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
3844
3845 2006-09-29  Bruno Haible  <bruno@clisp.org>
3846
3847         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
3848         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
3849         argument. Set stdout_closed before testing for ferror, not after.
3850         (fwriteerror, fwriteerror_no_ebadf): New functions.
3851
3852 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3853
3854         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
3855
3856 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
3857
3858         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
3859         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
3860
3861 2006-09-28  Jim Meyering  <jim@meyering.net>
3862
3863         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
3864         Include <unistd.h>.
3865
3866 2006-09-28  Bruno Haible  <bruno@clisp.org>
3867
3868         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
3869         * modules/linkedhash-list (Depends-on): Likewise.
3870         * modules/rbtreehash-list (Depends-on): Likewise.
3871
3872 2006-09-28  Bruno Haible  <bruno@clisp.org>
3873
3874         * lib/strndup.h: Simplify the redefinition of strndup.
3875         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
3876         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
3877
3878 2006-09-28  Bruno Haible  <bruno@clisp.org>
3879
3880         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
3881         * lib/gl_linkedhash_list.c: Likewise.
3882         * lib/gl_rbtreehash_list.c: Likewise.
3883
3884 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
3885
3886         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
3887         getaddrinfo.
3888
3889         * lib/__fpending.h: Don't include <stdio_ext.h> unless
3890         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
3891         it causes <stdio_ext.h> to cause a compile-time error.
3892         Problem reported by Nelson H. F. Beebe.
3893         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
3894         of HAVE_DECL___PENDING.
3895
3896         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
3897         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
3898         declaration.
3899
3900 2006-09-27  Jim Meyering  <jim@meyering.net>
3901
3902         This file could end up with a definition for a function
3903         named __strndup, rather than rpl_strndup on a system with
3904         incomplete weak_alias support.
3905         * lib/strndup.c (strndup): Rename from __strndup.
3906         Remove #defines that used to map __strndup to strndup.
3907         Don't use K&R prototypes.
3908         Remove LIBC-related code, since this file is not sync'd with glibc.
3909         * lib/strndup.h: Revamp, accordingly.
3910         * m4/strndup.m4: Modernize.
3911
3912 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3913
3914         * modules/savewd (Depends-on): Add 'raise'.
3915         * lib/savewd.c: Include <signal.h>, for 'raise'.
3916
3917 2006-09-26  Jim Meyering  <jim@meyering.net>
3918
3919         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
3920         when we detect Darwin 8.7.0's acl_get_file bug.
3921         Rearrange to perform the new (below) run-test while $LIBS
3922         contains any acl-related library.  Set USE_ACL at the end.
3923         (gl_ACL_GET_FILE): New function.
3924
3925 2006-09-26  Eric Blake  <ebb9@byu.net>
3926
3927         * lib/verror.c: Include <config.h> unconditionally.
3928
3929 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3930
3931         * modules/clock-time (Maintainer): Add self.
3932         * modules/getlogin_r (Depends-on): Add extensions.
3933
3934 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3935
3936         * modules/clock-time: New module.
3937         * modules/nanosleep (Depends-on): Add clock-time.
3938         * modules/gethrxtime (Depends-on): Likewise.
3939         * modules/gettime (Depends-on): Likewise.
3940         * modules/settime (Depends-on): Likewise.
3941
3942         * modules/fts-lgpl: Depend on openat.
3943         * modules/mkancesdirs: Depend on savewd.
3944         * modules/mkdir-p: Likewise.
3945
3946 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3947
3948         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
3949
3950         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
3951         `gl_have_arbitrary_file_name_length_limit' to
3952         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
3953         actually works between configure runs.
3954
3955 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3956             Bruno Haible  <bruno@clisp.org>
3957
3958         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
3959
3960 2006-09-25  Jim Meyering  <jim@meyering.net>
3961
3962         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
3963         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
3964
3965 2006-09-25  Eric Blake  <ebb9@byu.net>
3966
3967         * gnulib-tool (func_import, func_create_testdir): Fix typos in
3968         exec's in 2006-09-18 patch when shuffling fds.
3969
3970 2006-09-25  Bruno Haible  <bruno@clisp.org>
3971
3972         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
3973         Reported by Jim Meyering.
3974
3975 2006-09-24  Jim Meyering  <jim@meyering.net>
3976
3977         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
3978         compare a pointer against a literal "0".  That caused failures with
3979         at least HP-UX's hpcc.
3980
3981 2006-09-22  Simon Josefsson  <jas@extundo.com>
3982
3983         * modules/gc-sha1:
3984         * modules/gc-md4:
3985         * modules/gc-hmac-sha1:
3986         * modules/gc-hmac-md5:
3987         * modules/gc-des:
3988         * modules/gc-arcfour: Distribute more files.
3989
3990 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3991
3992         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
3993         (gl_linked_iterator_from_to): Initialize struct completely.
3994         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
3995         (gl_tree_iterator_from_to): Likewise
3996         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
3997         * lib/gl_array_list.c [lint] (gl_array_iterator)
3998         (gl_array_iterator_from_to): Likewise.
3999         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
4000         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
4001         (gl_carray_iterator_from_to): Likewise.
4002
4003         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
4004         * lib/md4.c (md4_process_block): Remove unused variable.
4005         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
4006         parentheses for clarity.
4007
4008 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4009
4010         * modules/bison-i18n (Depends-on): Add gettext.
4011
4012 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4013
4014         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
4015         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
4016         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
4017         also add missing comma that caused broken test.
4018         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
4019         stdlib.h, for `abort'.
4020         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
4021         variables.
4022         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
4023         include unistd.h if present, for `rmdir'.
4024         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
4025         variables.
4026         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
4027         in the process include standard headers for prototypes.
4028         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
4029         gets declared on GNU/Linux.
4030         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
4031         unistd.h, for `rmdir'.
4032         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
4033
4034         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
4035         always true.
4036         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
4037
4038         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
4039
4040 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4041
4042         * gnulib-tool (func_version): Create output all at once.  This
4043         may help avoid triggering unnecessary SIGPIPEs, and at any
4044         rate it doesn't hurt.
4045
4046 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4047             Bruno Haible  <bruno@clisp.org>
4048
4049         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
4050         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4051         * m4/signed.m4 (bh_C_SIGNED): Likewise.
4052
4053         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
4054         (gl_FUNC_VASPRINTF): Invoke it.
4055
4056 2006-09-22  Bruno Haible  <bruno@clisp.org>
4057
4058         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
4059         getloadavg.c as first argument.
4060
4061 2006-09-22  Bruno Haible  <bruno@clisp.org>
4062
4063         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
4064         at the beginning of the gl_INIT macro.
4065         * modules/getloadavg (configure.ac): Pass $gl_source_base to
4066         gl_GETLOADAVG.
4067
4068 2006-09-22  Bruno Haible  <bruno@clisp.org>
4069
4070         * gnulib-tool (func_create_megatestdir): Don't include the config-h
4071         module.
4072         Suggested by Ralf Wildenhues.
4073
4074 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
4075
4076         Import this patch from libc:
4077
4078         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4079
4080         * lib/regex_internal.c (re_string_reconstruct): Handle
4081         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4082         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4083         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4084         re_string_context_at.
4085
4086         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4087         now requires it.
4088         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4089         gl_REGEX now does it for us.
4090         (gl_REGEX): Add test taken from
4091         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4092
4093         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4094         Check that large offsets work.  Modernize Autoconf usages.
4095         Prefer "yes" to mean a good thing rather than a bad.
4096         Don't put "#define mkstemp" in config.h, as this might interfere
4097         with standard system headers that "#define mkstemp mkstemp64".
4098
4099         * modules/mkstemp (Depends-on): Add extensions, so that
4100         mkstemp is visible on some platforms.
4101         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4102         (Include): Change to "mkstemp.h" from <stdlib.h>.
4103         (Files): Add mkstemp.h.
4104
4105         * lib/mkstemp.h: New file, since some standard headers
4106         #define mkstemp.
4107         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4108         Include "mkstemp.h".
4109         Make the _LIBC code resemble glibc original more,
4110         e.g., use K&R style.
4111         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4112         (mkstemp): Remove, since mkstemp.h does this for us.
4113         * lib/stdlib--.h: Include mkstemp.h.
4114
4115         Import this patch from libc:
4116
4117         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4118
4119         * lib/tempname.c (__gen_tempname): Change attempts_min
4120         into a macro.  Use preprocessor to decide how to initialize
4121         attempts [Coverity CID 67].
4122
4123 2006-09-20  Bruno Haible  <bruno@clisp.org>
4124
4125         * lib/mkdtemp.c: Import from libc.
4126         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4127                 * sysdeps/posix/tempname.c (__gen_tempname): Change
4128                 attempts_min into a macro.  Use preprocessor to decide how to
4129                 initialize attempts [Coverity CID 67].
4130         2001-11-27  Paul Eggert  <eggert@twinsun.com>
4131                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
4132                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
4133
4134 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4135
4136         * gnulib-tool (func_exit): New function, to allow to pass the
4137         exit status portably through the trap.  Use everywhere.
4138         (--help, --version): Signal a write error.
4139         (trap): catch SIGPIPE, for write errors.
4140         Exit at the end of the trap, with the correct exit status.
4141
4142 2006-09-19  Karl Berry  <karl@gnu.org>
4143
4144         * doc/gnulib.texi: note about the license texinfo files.
4145
4146 2006-09-19  Eric Blake  <ebb9@byu.net>
4147
4148         * gnulib-tool: Avoid space-tab.
4149
4150 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4151
4152         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
4153         that prevented coreutils 6.1 from building.  Problem reported
4154         by Petter Reinholdtsen.
4155
4156 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4157
4158         * gnulib-tool (avoidlist): Fix typo that broke options like
4159         --avoid=lock that are used by coreutils bootstrap.
4160
4161 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
4162
4163         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
4164         more systematically.
4165
4166 2006-09-18  Jim Meyering  <jim@meyering.net>
4167
4168         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
4169
4170 2006-09-18  Bruno Haible  <bruno@clisp.org>
4171
4172         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
4173
4174 2006-09-18  Bruno Haible  <bruno@clisp.org>
4175
4176         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
4177         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
4178         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
4179         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
4180         * m4/gettext.m4: Require autoconf >= 2.52.
4181         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
4182         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
4183         of gl_cv_header_inttypes_h.
4184
4185 2006-09-18  Bruno Haible  <bruno@clisp.org>
4186
4187         * lib/javaversion.c: Include configmake.h.
4188
4189 2006-09-18  Bruno Haible  <bruno@clisp.org>
4190
4191         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
4192         avoid that the while loops be executed in a subshell.
4193
4194 2006-09-18  Bruno Haible  <bruno@clisp.org>
4195
4196         * MODULES.html.sh (func_module): Break long lines.
4197         Suggested by Bruce Korb <bkorb@gnu.org>.
4198
4199 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4200
4201         Speed up by a factor of 1.12.
4202         * gnulib-tool (nl): New variable.
4203         (func_import): Rewrite include directive extraction to only read each
4204         directive once.
4205
4206 2006-09-17  Bruno Haible  <bruno@clisp.org>
4207
4208         * modules/javaversion (Makefile.am): Remove DEFS setting.
4209         (Depends-on): Add configmake, for PKGDATADIR definition.
4210
4211 2006-09-17  Bruno Haible  <bruno@clisp.org>
4212
4213         * gnulib-tool (func_create_testdir): Rewrite all files at once.
4214
4215 2006-09-17  Bruno Haible  <bruno@clisp.org>
4216
4217         * gnulib-tool (func_append): New function, stolen from libtool.m4.
4218         (func_modules_transitive_closure, func_modules_add_dummy,
4219         func_modules_to_filelist, func_import, func_create_testdir,
4220         func_create_megatestdir, ...): Use it wherever possible.
4221         Suggested by Ralf Wildenhues.
4222
4223 2006-09-16  Karl Berry  <karl@gnu.org>
4224
4225         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
4226         to avoid sectioning errors.
4227         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
4228         [ifinfo]: blank line after @center-ed titles.
4229         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
4230         Spell FSF address consistently with others.
4231         (These changes approved by rms.)
4232
4233 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4234
4235         Speed up by a factor of 1.61.
4236         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
4237         already checked module names again.
4238
4239 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4240
4241         Speed up by a factor of 1.13.
4242         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
4243         for new_files, and the input to func_add_or_update.
4244
4245 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4246
4247         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
4248         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
4249
4250 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4251
4252         * modules/mkancesdirs (Depends-on): Add fcntl.
4253         * modules/savewd: New file.
4254         * MODULES.html.sh (File system functions): Add savewd.
4255
4256         * modules/configmake (Makefile.am): Add support for the
4257         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
4258
4259 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4260
4261         * m4/savewd.m4: New file.
4262
4263 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4264
4265         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
4266         (dirchownmod): New arg FD.  All callers changed.
4267         Use FD rather than opening the directory ourself, as opening is
4268         now the caller's responsibility.
4269         * lib/dirchownmod.h: Likewise.
4270         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
4271         hosts that require <sys/types.h> before <sys/stat.h>.  Include
4272         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
4273         (test_dir): Remove.
4274         (mkancesdirs): Return length of prefix of FILE that has already
4275         been made, or -2 if there is a child doing the work.  Redo
4276         algorithm so that it is O(N) rather than O(N**2).  Optimize away
4277         ".", and treat ".." specially since it might stray back into
4278         already-created areas.  Use a subprocess if necessary.  New arg
4279         WD; all users changed.  MAKE_DIR function should now return 1
4280         if it creates a directory that is not readable.  Return -2 if
4281         a child process is spun off.
4282         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
4283         Adjust signature to match code.
4284         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
4285         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
4286         all users changed.
4287         * lib/savewd.c, lib/savewd.h: New files.
4288
4289 2006-09-15  Jim Meyering  <jim@meyering.net>
4290
4291         * modules/rename-dest-slash: New module.
4292         * MODULES.html.sh (posix_compat): Add it here.
4293
4294         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
4295
4296 2006-09-15  Jim Meyering  <jim@meyering.net>
4297
4298         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
4299         file.
4300
4301         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
4302
4303 2006-09-15  Jim Meyering  <jim@meyering.net>
4304
4305         * lib/rename-dest-slash.c (has_trailing_slash): Use
4306         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
4307         (rpl_rename_dest_slash): Perform the cheaper trailing slash
4308         test before testing whether SRC is a directory.
4309         Suggestions from Bruno Haible.
4310
4311         Avoid a warning about an unused variable.
4312         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
4313         into the #ifdef block where it's used.
4314
4315         * lib/rename-dest-slash.c: New file.
4316
4317 2006-09-14  Bruno Haible  <bruno@clisp.org>
4318
4319         * lib/allocsa.c: Include <config.h> unconditionally.
4320         * lib/asnprintf.c: Likewise.
4321         * lib/asprintf.c: Likewise.
4322         * lib/c-strcasecmp.c: Likewise.
4323         * lib/c-strcasestr.c: Likewise.
4324         * lib/c-strncasecmp.c: Likewise.
4325         * lib/c-strstr.c: Likewise.
4326         * lib/classpath.c: Likewise.
4327         * lib/clean-temp.c: Likewise.
4328         * lib/concatpath.c: Likewise.
4329         * lib/copy-file.c: Likewise.
4330         * lib/csharpcomp.c: Likewise.
4331         * lib/csharpexec.c: Likewise.
4332         * lib/execute.c: Likewise.
4333         * lib/fatal-signal.c: Likewise.
4334         * lib/findprog.c: Likewise.
4335         * lib/fwriteerror.c: Likewise.
4336         * lib/gl_array_list.c: Likewise.
4337         * lib/gl_array_oset.c: Likewise.
4338         * lib/gl_avltree_list.c: Likewise.
4339         * lib/gl_avltree_oset.c: Likewise.
4340         * lib/gl_avltreehash_list.c: Likewise.
4341         * lib/gl_carray_list.c: Likewise.
4342         * lib/gl_linked_list.c: Likewise.
4343         * lib/gl_linkedhash_list.c: Likewise.
4344         * lib/gl_list.c: Likewise.
4345         * lib/gl_oset.c: Likewise.
4346         * lib/gl_rbtree_list.c: Likewise.
4347         * lib/gl_rbtree_oset.c: Likewise.
4348         * lib/gl_rbtreehash_list.c: Likewise.
4349         * lib/imaxabs.c: Likewise.
4350         * lib/imaxdiv.c: Likewise.
4351         * lib/javacomp.c: Likewise.
4352         * lib/javaexec.c: Likewise.
4353         * lib/javaversion.c: Likewise.
4354         * lib/linebreak.c: Likewise.
4355         * lib/localcharset.c: Likewise.
4356         * lib/lock.c: Likewise.
4357         * lib/mbchar.c: Likewise.
4358         * lib/mbswidth.c: Likewise.
4359         * lib/mkdtemp.c: Likewise.
4360         * lib/pipe.c: Likewise.
4361         * lib/printf-args.c: Likewise.
4362         * lib/printf-parse.c: Likewise.
4363         * lib/progname.c: Likewise.
4364         * lib/progreloc.c: Likewise.
4365         * lib/readlink.c: Likewise.
4366         * lib/sh-quote.c: Likewise.
4367         * lib/stpcpy.c: Likewise.
4368         * lib/stpncpy.c: Likewise.
4369         * lib/strcasecmp.c: Likewise.
4370         * lib/strcasestr.c: Likewise.
4371         * lib/strcspn.c: Likewise.
4372         * lib/striconv.c: Likewise.
4373         * lib/strncasecmp.c: Likewise.
4374         * lib/strnlen1.c: Likewise.
4375         * lib/strstr.c: Likewise.
4376         * lib/strtok_r.c: Likewise.
4377         * lib/tls.c: Likewise.
4378         * lib/tmpdir.c: Likewise.
4379         * lib/unicodeio.c: Likewise.
4380         * lib/unsetenv.c: Likewise.
4381         * lib/vasnprintf.c: Likewise.
4382         * lib/vasprintf.c: Likewise.
4383         * lib/wait-process.c: Likewise.
4384         * lib/xallocsa.c: Likewise.
4385         * lib/xsetenv.c: Likewise.
4386         * lib/xstriconv.c: Likewise.
4387
4388 2006-09-13  Simon Josefsson  <jas@extundo.com>
4389
4390         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4391         that internally, suggested by Ralf Wildenhues
4392         <Ralf.Wildenhues@gmx.de>.
4393
4394 2006-09-13  Simon Josefsson  <jas@extundo.com>
4395
4396         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4397         @LIBOBJS@.
4398         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4399
4400 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4401
4402         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4403         longer worry about uses that don't define HAVE_CONFIG_H.
4404         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4405         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4406         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4407         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4408         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4409         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4410         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4411         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4412         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4413         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4414         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4415         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4416         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4417         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4418         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4419         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4420         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4421         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4422         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4423         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4424         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4425         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4426         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4427         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4428         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4429         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4430         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4431         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4432         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4433         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4434         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4435         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4436         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4437         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4438         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4439         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4440         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4441         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4442         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4443         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4444         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4445         Likewise.
4446
4447 2006-09-13  Eric Blake  <ebb9@byu.net>
4448
4449         * lib/getopt.c: Fix typo in last commit.
4450
4451 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4452
4453         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4454         dgettext.
4455
4456 2006-09-12  Jim Meyering  <jim@meyering.net>
4457
4458         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4459         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4460         Reported by Nelson H. F. Beebe.
4461
4462 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4463
4464         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4465         program_invocation_name and program_invocation_short_name are
4466         initialized.
4467         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4468         and program_invocation_short_name to argp.h, so they are visible
4469         to user programs.
4470         * lib/argp.h: Likewise
4471
4472 2006-09-10  Bruno Haible  <bruno@clisp.org>
4473
4474         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4475         m4/inttypes_h.m4, m4/uintmax_t.m4.
4476
4477 2006-09-10  Bruno Haible  <bruno@clisp.org>
4478
4479         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4480         gl_AC_TYPE_UINTMAX_T.
4481
4482 2006-09-10  Bruno Haible  <bruno@clisp.org>
4483
4484         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4485
4486 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4487
4488         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4489         convention.  Text proposed by Bruno Haible.
4490         (struct argp_option): Document the use of N_() wrappers.
4491
4492         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
4493         '\v', and translate the two parts separately, instead of feeding
4494         the whole string to gettext.  This allows to exclude
4495         '\v' from the strings visible to the translator by writing doc
4496         strings as N_("..") "\v" N_("..").
4497
4498 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4499
4500         * config/srclist.txt: Undo latest change; the bug was fixed.
4501
4502 2006-09-09  Bruno Haible  <bruno@clisp.org>
4503
4504         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4505         assignments if building a library without libtool.
4506         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4507         in func_emit_lib_Makefile_am.
4508         (func_import): When building a static library libfoo.a, arrange to
4509         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4510         (func_create_testdir): Likewise.
4511         * modules/gc (configure.ac, Makefile.am): If building statically,
4512         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4513         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4514         * modules/striconv (configure.ac, Makefile.am): Likewise.
4515         Based on a suggestion by Ralf Wildenhues.
4516
4517 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4518
4519         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4520         Check for unistd.h too, since Autoconf doesn't assume POSIX.
4521         Also:
4522
4523         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4524         Add year_2050_test to catch glibc bug 2821
4525         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4526
4527         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4528         Prefer #ifdef to #if.
4529
4530         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
4531         Return from 'main' instead of calling 'exit'.
4532
4533 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4534
4535         * lib/mktime.c (guess_time_tm): Fix bug where mktime
4536         returned the maximum time_t value rather than (time_t) -1.
4537         Problem originally reported by William Bardwell
4538         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4539
4540         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4541         Moved to here ...
4542         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4543         ... from here.
4544
4545 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4546
4547         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
4548         2821 is fixed.
4549
4550 2006-09-08  Jim Meyering  <jim@meyering.net>
4551
4552         Don't make generated files read-only.  That would bother too many
4553         people.  However, do retain the ability to work when targets are
4554         read-only: remove the destination and temporary files before writing
4555         them (when generated via sed or echo), or by using the -f option for
4556         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
4557         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4558         * modules/byteswap, modules/configmake, modules/fcntl:
4559         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4560         * modules/localcharset, modules/netinet_in, modules/poll:
4561         * modules/stdbool, modules/stdint, modules/sys_select:
4562         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4563
4564 2006-09-08  Jim Meyering  <jim@meyering.net>
4565
4566         Avoid new build failure on FreeBSD 6.0.
4567         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4568         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4569         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4570
4571 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4572
4573         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4574
4575 2006-09-07  Jim Meyering  <jim@meyering.net>
4576
4577         Fix global typo in last change: use chmod u-w, not chmod u-x.
4578         Spotted by Paul Eggert and Bruce Korb.
4579         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4580         * modules/byteswap, modules/configmake, modules/fcntl:
4581         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4582         * modules/localcharset, modules/netinet_in, modules/poll:
4583         * modules/stdbool, modules/stdint, modules/sys_select:
4584         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4585
4586 2006-09-06  Jim Meyering  <jim@meyering.net>
4587
4588         Make generated files be read-only.
4589         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4590         Ensure that each generated file is now read-only.
4591         * modules/argz: Likewise.
4592         * modules/arpa_inet: Likewise.
4593         * modules/byteswap: Likewise.
4594         * modules/configmake: Likewise.
4595         * modules/fcntl: Likewise.
4596         * modules/fnmatch: Likewise.
4597         * modules/getopt: Likewise.
4598         * modules/glob: Likewise.
4599         * modules/inttypes: Likewise.
4600         * modules/netinet_in: Likewise.
4601         * modules/poll: Likewise.
4602         * modules/stdbool: Likewise.
4603         * modules/stdint: Likewise.
4604         * modules/sys_select: Likewise.
4605         * modules/sys_socket: Likewise.
4606         * modules/sys_stat: Likewise.
4607         * modules/sysexits: Likewise.
4608         * modules/localcharset: Same as above, but continue using temporary
4609         file named "t-$@" (why different?) rather than the "$@-t" used
4610         everywhere else.
4611
4612         * modules/sysexits (Makefile.am): Replace literal occurrences
4613         of "sysexit.h" more readable, and more consistent, "$@".
4614
4615 2006-09-06  Bruno Haible  <bruno@clisp.org>
4616
4617         * modules/striconv: New file.
4618         * modules/xstriconv: New file.
4619         * MODULES.html.sh (Internationalization functions): Add striconv,
4620         xstriconv.
4621
4622 2006-09-06  Bruno Haible  <bruno@clisp.org>
4623
4624         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4625         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4626         not using libtool correctly.
4627
4628 2006-09-06  Bruno Haible  <bruno@clisp.org>
4629
4630         * lib/striconv.h: New file.
4631         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4632         iconvstring.c.
4633         * lib/xstriconv.h: New file.
4634         * lib/xstriconv.c: New file.
4635
4636 2006-09-06  Bruno Haible  <bruno@clisp.org>
4637
4638         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4639         lib_..._LDFLAGS.
4640
4641 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4642
4643         * lib/argz_.h: Sync from Libtool.
4644
4645         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4646                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4647
4648         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4649
4650 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4651
4652         * modules/trim: New file.
4653
4654 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4655
4656         * lib/trim.h: New file.
4657         * lib/trim.c: New file.
4658
4659 2006-09-05  Bruno Haible  <bruno@clisp.org>
4660
4661         * MODULES.html.sh (String handling): Add trim.
4662
4663 2006-09-04  Karl Berry  <karl@gnu.org>
4664
4665         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4666         until next release.
4667
4668 2006-09-03  Bruno Haible  <bruno@clisp.org>
4669
4670         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4671         correctly.
4672
4673 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4674
4675         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4676         not gl_GETLOADAVG.  Omit unneeded semicolons.
4677         Problems reported by Ralf Wildenhues in
4678         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4679         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4680         at the end, which is the usual gnulib style.
4681
4682         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4683         of doing all the work ourselves.
4684         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4685         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4686
4687 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4688
4689         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4690         Problem reported by Ralf Wildenhues in
4691         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4692
4693         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4694         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4695
4696 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4697
4698         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4699         yesterday's patch by changing test -n to test -z.
4700
4701 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4702
4703         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4704         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4705         the former is now obsolescent.
4706
4707         * modules/chdir-long (Depends-on): Add fcntl.
4708
4709 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4710
4711         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4712         obsolescent, and programs should use gnulib instead.
4713         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4714         but with prefixes changed.
4715
4716 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4717
4718         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4719         or stdbool.h, because they might not exist while configuring.
4720
4721         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4722         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4723         does that for us.
4724         (O_DIRECTORY): Remove.
4725
4726 2006-08-31  Eric Blake  <ebb9@byu.net>
4727
4728         * gnulib-tool: Don't let emacs change spaces to TAB.
4729
4730 2006-08-31  Bruno Haible  <bruno@clisp.org>
4731
4732         * gnulib-tool: When calling func_import more than once, do it in a
4733         subshell.
4734         Reported by Eric Blake <ebb9@byu.net>.
4735
4736 2006-08-31  Bruno Haible  <bruno@clisp.org>
4737
4738         * gnulib-tool (nl): Remove variable.
4739         (sed_transform_lib_file): Use more robust test for config-h module.
4740         (func_import): Fix typo in 2006-08-25 patch.
4741
4742 2006-08-31  Bruno Haible  <bruno@clisp.org>
4743
4744         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4745         specified, augment Makefile.am variables instead of assigning them.
4746
4747 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4748
4749         Work around a bug in both the Linux and SunOS 64-bit kernels:
4750         nanosleep mishandles sleeps for longer than 2**31 seconds.
4751         Problem reported by Frank v Waveren in
4752         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4753         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4754         Check for nanosleep bug.
4755         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4756
4757 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4758
4759         Work around a bug in both the Linux and SunOS 64-bit kernels:
4760         nanosleep mishandles sleeps for longer than 2**31 seconds.
4761         Problem reported by Frank v Waveren in
4762         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4763         * lib/nanosleep.c (BILLION): New constant.
4764         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4765         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4766         implementation.
4767
4768 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4769
4770         * modules/nanosleep (Depends-on): Add gettime.
4771
4772 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4773         and Simon Josefsson  <jas@extundo.com>
4774         and Oskar Liljeblad  <oskar@osk.mine.nu>
4775
4776         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4777         * gnulib-tool (func_import): New license type 'unmodifiable license
4778         text'.
4779         * modules/fdl: Use it.  Longer description.
4780         * module/gpl, module/lgpl: New files.
4781
4782 2006-08-30  Jim Meyering  <jim@meyering.net>
4783
4784         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4785         shadowing the parameter.
4786
4787 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4788
4789         Sync from Libtool:
4790
4791         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4792
4793         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4794         sharing with gnulib.  Report by Eric Blake.
4795
4796 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4797
4798         * modules/isapipe: New file.
4799         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4800
4801 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4802
4803         * modules/configmake (Makefile.am): Add a comment, and omit
4804         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4805         by Bruno Haible.
4806
4807 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4808
4809         * m4/isapipe.m4: New file.
4810
4811 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4812
4813         * lib/isapipe.c, lib/isapipe.h: New files.
4814
4815 2006-08-29  Jim Meyering  <jim@meyering.net>
4816
4817         * modules/configmake (Makefile.am): Make configmake.h depend on
4818         Makefile.  Otherwise, a stale configmake.h could hang around.
4819
4820 2006-08-29  Eric Blake  <ebb9@byu.net>
4821
4822         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4823         resolution of upstream bug 3044.
4824
4825 2006-08-29  Bruno Haible  <bruno@clisp.org>
4826
4827         * modules/localcharset (Depends-on): Add configmake.
4828         (Makefile.am): Remove setting of LIBDIR through DEFS.
4829
4830 2006-08-29  Bruno Haible  <bruno@clisp.org>
4831
4832         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
4833         defined.
4834
4835 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4836
4837         * modules/fcntl: New file.
4838         * modules/chdir-safer (Depends-on): Add fcntl.
4839         * modules/fts: Likewise.
4840         * modules/mkdir-p: Likewise.
4841
4842         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
4843         This undoes the most recent change, since we're now addressing the
4844         problem in a different way.
4845
4846         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
4847         into output, since the output might be called Makefile.am even
4848         if $makefile_name is something different.
4849         (func_import): Use $makefile_am rather than
4850         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
4851         empty.
4852
4853         * modules/inttypes (Files): Add m4/inttypes-h.m4.
4854
4855 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4856
4857         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
4858         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
4859         recent change to stdint.m4, since we're now addressing the problem in a
4860         different way.
4861
4862 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4863
4864         * m4/fcntl_h.m4: New file.
4865
4866 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4867
4868         * lib/fcntl_.h: New file.
4869         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
4870         the fcntl module.
4871         * lib/dirchownmod.c: Likewise.
4872         * lib/fts.c: Likewise.
4873
4874         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
4875         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
4876         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
4877         just before including <inttypes.h>, to avoid circular inclusion.
4878
4879 2006-08-28  Jim Meyering  <jim@meyering.net>
4880
4881         * doc/visibility.texi: Actually read and correct the grammar of the
4882         sentence affected by yesterday's change.
4883
4884 2006-08-28  Eric Blake  <ebb9@byu.net>
4885
4886         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
4887         needs wrapper.
4888
4889 2006-08-28  Eric Blake  <ebb9@byu.net>
4890
4891         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
4892
4893 2006-08-28  Eric Blake  <ebb9@byu.net>
4894
4895         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
4896
4897 2006-08-28  Bruno Haible  <bruno@clisp.org>
4898
4899         * modules/c-strstr: New file, from GNU gettext.
4900         * MODULES.html.sh (String handling): Add c-strstr.
4901
4902 2006-08-28  Bruno Haible  <bruno@clisp.org>
4903
4904         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
4905         macros.
4906         Reported by Eric Blake.
4907
4908 2006-08-28  Bruno Haible  <bruno@clisp.org>
4909
4910         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
4911         (VASNPRINTF): Return a string of length > INT_MAX without failing.
4912         * lib/vasprintf.c: Include errno.h, limits.h.
4913         (EOVERFLOW): New fallback definition.
4914         (vasprintf): Test here whether the string length is > INT_MAX.
4915         * lib/vsnprintf.c: Include errno.h, limits.h.
4916         (EOVERFLOW): New fallback definition.
4917         (vsnprintf): Fix bug when generated string was too long for the buffer.
4918         Test here whether the string length is > INT_MAX.
4919
4920 2006-08-28  Bruno Haible  <bruno@clisp.org>
4921
4922         * lib/inttypes_.h (SCNX*): Remove definitions.
4923         Reported by Eric Blake.
4924
4925 2006-08-28  Bruno Haible  <bruno@clisp.org>
4926
4927         * lib/c-strstr.h: New file, from GNU gettext.
4928         * lib/c-strstr.c: New file, from GNU gettext.
4929
4930 2006-08-28  Bruno Haible  <bruno@clisp.org>
4931
4932         * gnulib-tool: Reorder some statements.
4933
4934 2006-08-28  Bruno Haible  <bruno@clisp.org>
4935
4936         * gnulib-tool: New option --makefile-name.
4937         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
4938         $makefile_name.
4939         (func_import): Write $makefile_name to the cache file, and read it from
4940         there unless explicitly specified. Use $makefile_name as file name
4941         instead of Makefile.am. Adjust the recommendations accordingly.
4942
4943 2006-08-28  Bruno Haible  <bruno@clisp.org>
4944
4945         * gnulib-tool (func_verify_module): Check against misapplying patch.
4946
4947 2006-08-28  Bruno Haible  <bruno@clisp.org>
4948
4949         * gnulib-tool (func_relativize, func_relconcat): New functions.
4950         Give an error if --local-dir is given with --update.
4951         Remove trailing slashes from $local_gnulib_dir.
4952         (func_import): Store the relativized $local_gnulib_dir in
4953         gnulib-cache.m4, and read it from there if not specified explicitly.
4954
4955 2006-08-28  Bruno Haible  <bruno@clisp.org>
4956
4957         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
4958         is the current directory. Respect also $local_gnulib_dir.
4959
4960 2006-08-28  Bruno Haible  <bruno@clisp.org>
4961             Simon Josefsson  <jas@extundo.com>
4962
4963         BeOS portability.
4964         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
4965
4966 2006-08-27  Jim Meyering  <jim@meyering.net>
4967
4968         * doc/visibility.texi: Remove duplicate word: "pointer".
4969
4970 2006-08-26  Bruno Haible  <bruno@clisp.org>
4971
4972         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
4973         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
4974         (Makefile.am): Create inttypes.h from inttypes_.h.
4975         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
4976
4977         * modules/imaxabs: New file.
4978
4979         * modules/imaxdiv: New file.
4980
4981 2006-08-26  Bruno Haible  <bruno@clisp.org>
4982
4983         * m4/inttypes.m4: New file.
4984         * m4/_inttypes_h.m4: Remove file.
4985         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
4986         PRI_MACROS_BROKEN.
4987         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
4988
4989         * m4/imaxabs.m4: New file.
4990
4991         * m4/imaxdiv.m4: New file.
4992
4993 2006-08-26  Bruno Haible  <bruno@clisp.org>
4994
4995         * lib/inttypes_.h: New file.
4996         * lib/inttypes.h: Remove file.
4997         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
4998
4999         * lib/imaxabs.c: New file.
5000
5001         * lib/imaxdiv.c: New file.
5002
5003 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5004
5005         New config-h module, so that "make" output needn't be cluttered
5006         by -DHAVE_CONFIG_H.
5007         * MODULES.html.sh (Support for building libraries and executables):
5008         Add config-h.
5009         * modules/config-h: New file.
5010         * gnulib-tool (nl, sed_transform_lib_file): New vars.
5011         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
5012         the config-h module is used.
5013
5014         New configmake module, so that "make" output needn't be cluttered
5015         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
5016         * MODULES.html.sh (Support for building libraries and executables):
5017         Add configmake.
5018         * modules/configmake: New file.
5019
5020 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5021
5022         * m4/config-h.m4: New file.
5023
5024 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5025
5026         * config/srclist.txt: Add elisp-comp.
5027
5028 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5029
5030         * MODULES.html.sh (Support for building libraries and executables):
5031         Add elisp-comp.
5032         * build-aux/elisp-comp: New file.
5033         * modules/elisp-comp: New file.
5034
5035 2006-08-24  Bruno Haible  <bruno@clisp.org>
5036
5037         * gnulib-tool (func_create_testdir): Use non-default values of
5038         sourcebase and m4base.
5039
5040 2006-08-24  Bruno Haible  <bruno@clisp.org>
5041
5042         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
5043         HTML structure.
5044
5045 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
5046
5047         * modules/openat (Depends-on): Add lchown.
5048
5049 2006-08-23  Bruno Haible  <bruno@clisp.org>
5050
5051         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
5052         of gl_LOCK_EARLY instead of gl_LOCK.
5053
5054 2006-08-23  Bruno Haible  <bruno@clisp.org>
5055
5056         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
5057         on OSF/1 to no.
5058         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
5059
5060 2006-08-23  Bruno Haible  <bruno@clisp.org>
5061
5062         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
5063         as unusable.
5064
5065         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
5066         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
5067         (gl_LOCK): New macro.
5068
5069 2006-08-22  Simon Josefsson  <jas@extundo.com>
5070
5071         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
5072         to md5 module.
5073
5074 2006-08-22  Simon Josefsson  <jas@extundo.com>
5075
5076         * MODULES.html.sh: Add "Support for maintaining and release
5077         projects".
5078
5079         * build-aux/gnupload: New file, from coreutils.
5080
5081 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5082
5083         Avoid the need for AC_LIBSOURCES in m4 macros.
5084         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5085         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5086         * modules/check-version (EXTRA_DIST): Add check-version.h.
5087         * modules/crc (EXTRA_DIST): Add crc.h.
5088         * modules/des (EXTRA_DIST): Add des.h.
5089         * modules/gc (EXTRA_DIST): Add gc.h.
5090         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5091         * modules/getline (EXTRA_DIST): Add getline.h.
5092         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5093         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5094         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5095         * modules/md2 (EXTRA_DIST): Add md2.h.
5096         * modules/md4 (EXTRA_DIST): Add md4.h.
5097         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5098         * modules/read-file (EXTRA_DIST): Add read-file.h.
5099         * modules/readline (EXTRA_DIST): Add readline.h.
5100         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5101         rijndael-api-fst.h.
5102
5103 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5104
5105         * m4/rijndael.m4 (gl_ARCFOUR):
5106         * m4/arctwo.m4 (gl_ARCTWO):
5107         * m4/check-version.m4 (gl_CHECK_VERSION):
5108         * m4/crc.m4 (gl_CRC):
5109         * m4/des.m4 (gl_DES):
5110         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5111         * m4/gc.m4 (gl_GC):
5112         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5113         * m4/getline.m4 (gl_FUNC_GETLINE):
5114         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5115         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5116         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
5117         * m4/md2.m4 (gl_MD2):
5118         * m4/md4.m4 (gl_MD4):
5119         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
5120         * m4/read-file.m4 (gl_FUNC_READ_FILE):
5121         * m4/readline.m4 (gl_FUNC_READLINE):
5122         * m4/rijndael.m4 (gl_RIJNDAEL):
5123         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5124         to get the necessary .h files and whatnot.
5125
5126 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5127
5128         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
5129         gnulib rather than the other way around.
5130         * config/srclistvars.sh (COREUTILS): Remove.
5131
5132 2006-08-22  Jim Meyering  <jim@meyering.net>
5133
5134         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
5135
5136         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
5137
5138 2006-08-22  Eric Blake  <ebb9@byu.net>
5139
5140         * modules/regexprops-generic: New file.
5141         * MODULES.html.sh (Support for building documentation): List it.
5142
5143 2006-08-22  Eric Blake  <ebb9@byu.net>
5144
5145         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
5146         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
5147         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
5148         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
5149
5150 2006-08-22  Bruno Haible  <bruno@clisp.org>
5151
5152         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
5153         and lib_LTLIBRARIES like the other lib_* variables.
5154
5155 2006-08-22  Bruno Haible  <bruno@clisp.org>
5156
5157         * build-aux/x-to-1.in: New file, from GNU gettext.
5158
5159 2006-08-22  Bruno Haible  <bruno@clisp.org>
5160
5161         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
5162         <utmpx.h> exists.
5163
5164 2006-08-22  Bruno Haible  <bruno@clisp.org>
5165
5166         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
5167         <utmpx.h> exists.
5168
5169 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5170
5171         BeOS portability.
5172         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
5173         exist.
5174         Problem reported by Bruno Haible.
5175
5176 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5177
5178         Avoid the need for AC_LIBSOURCES in m4 macros.
5179         * modules/acl (EXTRA_DIST): Add acl.h.
5180         * modules/argmatch (Files): Add m4/argmatch.m4.
5181         (configure.ac): Add gl_ARGMATCH.
5182         (EXTRA_DIST): Renamed from lib_SOURCES, for
5183         consistency with the other modules.  Remove argmatch.c.
5184         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
5185         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
5186         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
5187         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
5188         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
5189         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
5190         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
5191         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
5192         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
5193         * modules/closeout (EXTRA_DIST): Add closeout.h.
5194         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
5195         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
5196         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
5197         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
5198         dirname.h; remove basename.c and stripslash.c.
5199         * modules/exclude (EXTRA_DIST): Add exclude.h.
5200         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
5201         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
5202         * modules/file-type (EXTRA_DIST): Add file-type.h.
5203         * modules/filemode (EXTRA_DIST): Add filemode.h.
5204         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
5205         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5206         * modules/fpending (EXTRA_DIST): Add __fpending.h.
5207         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
5208         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
5209         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
5210         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
5211         * modules/getdate (EXTRA_DIST): Add getdate.c.
5212         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
5213         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
5214         * modules/getpass (EXTRA_DIST): Add getpass.h.
5215         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
5216         * modules/group-member (EXTRA_DIST): Add group-member.h.
5217         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
5218         * modules/hash (EXTRA_DIST): Add hash.h.
5219         * modules/human (EXTRA_DIST): Add human.h.
5220         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
5221         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
5222         * modules/lchown (EXTRA_DIST): Add lchown.h.
5223         * modules/long-options (EXTRA_DIST): Add long-options.h.
5224         * modules/lstat (EXTRA_DIST): Add lstat.h.
5225         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
5226         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
5227         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
5228         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
5229         * modules/memxor (EXTRA_DIST): Add memxor.h.
5230         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
5231         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
5232         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
5233         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
5234         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
5235         * modules/physmem (EXTRA_DIST): Add physmem.h.
5236         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
5237         * modules/posixver (EXTRA_DIST): Add posixver.h.
5238         * modules/quote (EXTRA_DIST): Add quote.h.
5239         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
5240         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
5241         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
5242         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
5243         regex_internal.h regexec.c.
5244         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
5245         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
5246         * modules/same (EXTRA_DIST): Add same.h.
5247         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
5248         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
5249         * modules/savedir (EXTRA_DIST): Add savedir.h.
5250         * modules/sha1 (EXTRA_DIST): Add sha1.h.
5251         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
5252         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
5253         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
5254         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
5255         * modules/strdup (EXTRA_DIST): Add strdup.h.
5256         * modules/strftime (EXTRA_DIST): Add strftime.h.
5257         * modules/strndup (EXTRA_DIST): Add strndup.h.
5258         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
5259         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
5260         * modules/time_r (EXTRA_DIST): Add time_r.h.
5261         * modules/timespec (EXTRA_DIST): Add timespec.h.
5262         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5263         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
5264         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
5265         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
5266         * modules/userspec (EXTRA_DIST): Add userspec.h.
5267         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
5268         * modules/utimens (EXTRA_DIST): Add utimens.h.
5269         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
5270         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
5271         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
5272         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
5273         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
5274         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
5275         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
5276         * modules/yesno (EXTRA_DIST): Add yesno.h.
5277
5278 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5279
5280         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
5281
5282         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
5283         * m4/dev-ino.m4, same-inode.m4: Remove.
5284
5285         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
5286         * m4/acl.m4 (AC_FUNC_ACL):
5287         * m4/backupfile.m4 (gl_BACKUPFILE):
5288         * m4/c-strtod.m4 (gl_C99_STRTOLD):
5289         * m4/canon-host.m4 (gl_CANON_HOST):
5290         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5291         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
5292         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
5293         * m4/cloexec.m4 (gl_CLOEXEC):
5294         * m4/close-stream.m4 (gl_CLOSE_STREAM):
5295         * m4/closeout.m4 (gl_CLOSEOUT):
5296         * m4/dirfd.m4 (gl_FUNC_DIRFD):
5297         * m4/dirname.m4 (gl_DIRNAME):
5298         * m4/exclude.m4 (gl_EXCLUDE):
5299         * m4/exitfail.m4 (gl_EXITFAIL):
5300         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
5301         * m4/file-type.m4 (gl_FILE_TYPE):
5302         * m4/filemode.m4 (gl_FILEMODE):
5303         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
5304         * m4/fpending.m4 (gl_FUNC_FPENDING):
5305         * m4/fprintftime.m4 (gl_FPRINTFTIME):
5306         * m4/fts.m4 (gl_FUNC_FTS):
5307         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
5308         * m4/getdate.m4 (gl_GETDATE):
5309         * m4/gethrxtime.m4 (gl_GETHRXTIME):
5310         * m4/getpagesize.m4 (gl_GETPAGESIZE):
5311         * m4/getpass.m4 (gl_FUNC_GETPASS):
5312         * m4/gettime.m4 (gl_GETTIME):
5313         * m4/getugroups.m4 (gl_GETUGROUPS):
5314         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
5315         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
5316         * m4/hard-locale.m4 (gl_HARD_LOCALE):
5317         * m4/hash.m4 (gl_HASH):
5318         * m4/idcache.m4 (gl_IDCACHE):
5319         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
5320         * m4/lchown.m4 (gl_FUNC_LCHOWN):
5321         * m4/long-options.m4 (gl_LONG_OPTIONS):
5322         * m4/lstat.m4 (gl_FUNC_LSTAT):
5323         * m4/md5.m4 (gl_MD5):
5324         * m4/memcasecmp.m4 (gl_MEMCASECMP):
5325         * m4/memcoll.m4 (gl_MEMCOLL):
5326         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
5327         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
5328         * m4/memxor.m4 (gl_MEMXOR):
5329         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
5330         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
5331         * m4/modechange.m4 (gl_MODECHANGE):
5332         * m4/mountlist.m4 (gl_MOUNTLIST):
5333         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5334         * m4/openat.m4 (gl_FUNC_OPENAT):
5335         * m4/pathmax.m4 (gl_PATHMAX):
5336         * m4/physmem.m4 (gl_PHYSMEM):
5337         * m4/posixtm.m4 (gl_POSIXTM):
5338         * m4/posixver.m4 (gl_POSIXVER):
5339         * m4/quote.m4 (gl_QUOTE):
5340         * m4/quotearg.m4 (gl_QUOTEARG):
5341         * m4/readtokens.m4 (gl_READTOKENS):
5342         * m4/readutmp.m4 (gl_READUTMP):
5343         * m4/regex.m4 (gl_REGEX):
5344         * m4/safe-read.m4 (gl_SAFE_READ):
5345         * m4/safe-write.m4 (gl_SAFE_WRITE):
5346         * m4/same.m4 (gl_SAME):
5347         * m4/save-cwd.m4 (gl_SAVE_CWD):
5348         * m4/savedir.m4 (gl_SAVEDIR):
5349         * m4/settime.m4 (gl_SETTIME):
5350         * m4/sha1.m4 (gl_SHA1):
5351         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5352         * m4/stat-macros.m4 (gl_STAT_MACROS):
5353         * m4/stat-time.m4 (gl_STAT_TIME):
5354         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5355         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5356         * m4/strdup.m4 (gl_FUNC_STRDUP):
5357         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5358         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5359         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5360         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5361         * m4/time_r.m4 (gl_TIME_R):
5362         * m4/timespec.m4 (gl_TIMESPEC):
5363         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5364         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5365         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5366         * m4/userspec.m4 (gl_USERSPEC):
5367         * m4/utimecmp.m4 (gl_UTIMECMP):
5368         * m4/utimens.m4 (gl_UTIMENS):
5369         * m4/xalloc.m4 (gl_XALLOC):
5370         * m4/xgetcwd.m4 (gl_XGETCWD):
5371         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5372         * m4/xreadlink.m4 (gl_XREADLINK):
5373         * m4/xstrtod.m4 (gl_XSTRTOD):
5374         * m4/yesno.m4 (gl_YESNO):
5375         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5376         to get the necessary .h files and whatnot.
5377
5378 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5379             Bruno Haible  <bruno@clisp.org>
5380
5381         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5382         /bin/sh understanding of '!' conditional negation.
5383
5384 2006-08-21  Jim Meyering  <jim@meyering.net>
5385
5386         * modules/openat (Depends-on): Really alphabetize.
5387
5388         * modules/acl (Depends-on): Add error and quote.
5389
5390         * check-module (find_included_lib_files): Add at-func.c to the
5391         ok-to-include-more-than-once white list.
5392
5393         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5394
5395 2006-08-21  Bruno Haible  <bruno@clisp.org>
5396
5397         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5398         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5399         Reported by Martin Lambers <marlam@marlam.de>.
5400
5401 2006-08-21  Bruno Haible  <bruno@clisp.org>
5402
5403         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5404         specify an installation location, don't emit a noinst_LIBRARIES or
5405         noinst_LTLIBRARIES assignment.
5406
5407 2006-08-21  Bruno Haible  <bruno@clisp.org>
5408
5409         BeOS portability.
5410         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5411         BeOS has mbrtowc() but no <wctype.h>.
5412
5413 2006-08-21  Bruno Haible  <bruno@clisp.org>
5414
5415         BeOS portability.
5416         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5417         exist.
5418
5419 2006-08-21  Bruno Haible  <bruno@clisp.org>
5420
5421         BeOS portability.
5422         * lib/mbchar.h: Include <wctype.h> only if it exists.
5423
5424 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5425
5426         Remove files that are no longer needed by their respective modules.
5427         * m4/obstack.m4: Remove.
5428         * m4/strerror_r.m4: Remove.
5429         * m4/uint32_t.m4: Remove.
5430         * m4/uintptr_t.m4: Remove.
5431         * m4/ullong_max.m4: Remove.
5432         * m4/xstrtoimax.m4: Remove.
5433         * m4/xstrtoumax.m4: Remove.
5434
5435         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5436         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5437         dependencies now capture this.
5438
5439         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5440         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5441         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5442         * m4/human.m4 (gl_HUMAN): Likewise.
5443         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5444         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5445
5446         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5447
5448         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5449         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5450         stdint.
5451         * m4/human.m4 (gl_HUMAN): Likewise.
5452         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5453         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5454         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5455         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5456         * m4/xstrtol (gl_XSTRTOL): Likewise.
5457
5458         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5459         AC_TYPE_LONG_LONG_INT.
5460         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5461         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5462         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5463         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5464
5465         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5466         on stdbool.
5467
5468         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5469         (gl_PREREQ_XSTRTOUL): Remove.
5470
5471         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5472
5473         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5474         mode.
5475
5476 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5477
5478         Add and change modules to make it easier for coreutils to use
5479         gnulib-tool.
5480         * modules/backupfile (Files): Remove m4/d-ino.m4.
5481         (Depends-on): Add d-ino.
5482         * modules/cycle-check (Depends-on): Add stdint.
5483         (lib_SOURCES): Add cycle-check.h.
5484         * modules/d-ino: New module.
5485         * modules/d-type: New module.
5486         * modules/error (Files): Remove m4/strerror_r.m4.
5487         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5488         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5489         m4/inttypes_h.m4, m4/uintmax_t.m4.
5490         (Depends-on): Add stdint.
5491         (lib_SOURCES): Add fsusage.h.
5492         * modules/getcwd (Files): Remove d-ino.m4.
5493         (Depends-on): Add d-ino.
5494         * modules/getndelim2 (Depends-on): Add stdint.
5495         * modules/glob (Files): Remove m4/d-type.m4.
5496         (Depends-on): Add d-type.
5497         * modules/host-os: New module.
5498         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5499         m4/inttypes_h.m4, m4/uintmax_t.m4.
5500         * Depends-on: Add stdint.
5501         (lib_SOURCES): Add human.h.
5502         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5503         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5504         m4/uintmax_t.m4, m4/ulonglong.m4.
5505         (Depends-on): Add stdint.
5506         (EXTRA_DIST): Add inttostr.h.
5507         * modules/lchmod: New module.
5508         * modules/link-follow: New module.
5509         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5510         (Depends-on): Add lchmod.
5511         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5512         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5513         (Depends-on): Add stdint.
5514         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
5515         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5516         (Depends-on): Add stdint.
5517         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
5518         * modules/perl: New module.
5519         * modules/regex (Depends-on): Add stdint.
5520         * modules/rmdir-errno: New module.
5521         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5522         m4/intmax_t.m4.
5523         (Depends-on): Add stdint.
5524         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5525         m4/uintmax_t.m4.
5526         (Depends-on): Add stdint.
5527         * modules/unlink-busy: New module.
5528         * modules/utimecmp (Depends-on): Add stdint.
5529         * modules/uptime: New module.
5530         * modules/winsz-ioctl: New module.
5531         * modules/winsz-termios: New module.
5532         * modules/xnanosleep (Depends-on): Add nanosleep.
5533         * modules/ullong_max: Remove.
5534         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
5535         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
5536         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
5537         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
5538         (Depends-on): Add inttypes.
5539         (lib_SOURCES): Add xstrtol.h.
5540         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
5541         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
5542         * MODULES.html.sh: Move 'assert' into the assert section.
5543         Move 'dummy' into the linking section.
5544         Remove ullong_max.
5545         Add section for compatibility checks for POSIX:2001 functions,
5546         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
5547         winsz-ioctl, and winsz-termios into it.
5548         Add lchmod.
5549         Add top-level Misc section and put host-os, perl, and uptime
5550         into it.
5551
5552 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5553
5554         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
5555         now assume the stdint module.  Do not include inttypes.h.
5556         * lib/fsusage.h: Likewise.
5557         * lib/getndelim2.c: Likewise.
5558         * lib/human.h: Likewise.
5559         * lib/inttostr.h: Likewise.
5560         * lib/obstack.c: Likewise.
5561         * lib/regex_internal.h: Likewise.
5562         * lib/tempname.c: Likewise.
5563         * lib/utimecmp.c: Likewise.
5564         * lib/xstrtol.h: Likewise.
5565
5566         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5567
5568         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5569         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5570         * lib/xtime.h: Likewise.
5571
5572 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5573
5574         * modules/openat (Files): Add lib/fchmodat.c.
5575         Fixes problem reported by Jay Youngman.
5576
5577 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5578
5579         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5580         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5581
5582 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5583             Bruno Haible  <bruno@clisp.org>
5584
5585         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5586         and is a script that invokes bison. Tighten the code. Add comments.
5587
5588 2006-08-18  Jim Meyering  <jim@meyering.net>
5589
5590         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5591         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5592         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5593         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5594
5595 2006-08-18  Bruno Haible  <bruno@clisp.org>
5596
5597         * modules/bison-i18n: New file.
5598         * MODULES.html.sh (Internationalization functions): Add it.
5599
5600 2006-08-18  Bruno Haible  <bruno@clisp.org>
5601
5602         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5603         sys/statvfs.h. When getmntinfo was found, check its declaration and
5604         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5605
5606 2006-08-18  Bruno Haible  <bruno@clisp.org>
5607
5608         * m4/bison-i18n.m4: New file, from bison.
5609
5610 2006-08-18  Bruno Haible  <bruno@clisp.org>
5611
5612         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5613         (ME_DUMMY): Treat "kernfs" as a dummy.
5614         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5615
5616 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5617
5618         Update from coreutils.
5619
5620         2006-08-15  Jim Meyering  <jim@meyering.net>
5621
5622         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5623
5624         2006-01-17  Jim Meyering  <jim@meyering.net>
5625
5626         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5627
5628         2006-01-11  Jim Meyering  <jim@meyering.net>
5629
5630         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5631         Check for the lchmod function.
5632
5633 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5634
5635         Update from coreutils.
5636
5637         * lib/__fpending.h: Add copyright notice.
5638         * lib/fprintftime.h: Likewise.
5639         * lib/savedir.c: Use (C) in copyright notice.
5640         * lib/savedir.h: Likewise.
5641
5642         2006-08-15  Jim Meyering  <jim@meyering.net>
5643
5644         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5645         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5646         in support of the EXPECTED_ERRNO macro.
5647         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5648         definitions.  Instead, define the appropriate symbols and include
5649         "at-func.c".
5650         * lib/mkdirat.c (mkdirat): Likewise.
5651         * lib/fchmodat.c (fchmodat): Likewise.
5652         (ENOSYS): Remove definition.
5653         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5654         it.  Don't include "unistd--.h" -- it wasn't ever used.
5655
5656         2006-01-17  Jim Meyering  <jim@meyering.net>
5657
5658         Rewrite fts.c not to change the current working directory,
5659         by using openat, fstatat, fdopendir, etc..
5660
5661         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5662         (HAVE_OPENAT_SUPPORT): Define.
5663         [_LIBC] (fchdir): Don't undef or define; no longer used.
5664         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5665         Now, this `function' always succeeds, and consumes its file descriptor
5666         parameter -- so callers must not close such FDs.  Update callers.
5667         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5668         (diropen): Add parameter, SP.  Adjust all callers.
5669         Implement using diropen_fd, rather than open.
5670         (fts_open): Initialize new member, fts_cwd_fd.
5671         Remove fts_rft-setting code.
5672         (fts_close): Close fts_cwd_fd, if necessary.
5673         (__opendir2): Define in terms of opendir or opendirat,
5674         depending on whether the FST_NOCHDIR flag is set.
5675         (fts_build): Since fts_safe_changedir consumes its FD, and since
5676         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5677         and close the dup'd file descriptor upon failure.
5678         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5679         (fts_safe_changedir): Tweak semantics to reflect that this function
5680         now calls cwd_advance_fd and hence consumes its FD argument.
5681         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5682         [struct FTS] (fts_rft): Remove now-unused member.
5683         [struct FTS] (fts_cycle.state): Improve comment.
5684
5685         * lib/openat.c (openat_needs_fchdir): New function.
5686         * lib/openat.h (openat_needs_fchdir): Declare it.
5687
5688 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5689
5690         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5691         Problem and fix reported by Pádraig Brady in
5692         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5693
5694 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5695
5696         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5697
5698 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5699
5700         * lib/memcoll.c (memcoll): Optimize for the common case where the
5701         arguments are bytewise equal.
5702
5703 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5704
5705         * doc/regexprops-generic.texi: Add a copyright notice.
5706
5707 2006-08-15  Bruno Haible  <bruno@clisp.org>
5708
5709         * modules/tmpdir (License): Change to LGPL.
5710
5711 2006-08-15  Bruno Haible  <bruno@clisp.org>
5712
5713         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5714         module.
5715
5716 2006-08-14  Simon Josefsson  <jas@extundo.com>
5717
5718         * config/srclist.txt: Add gnupload.
5719
5720 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5721
5722         Change copyright notice from LGPL 2 to GPL 2, since that's the
5723         standard form used in the gnulib repository.
5724         * tests/test-lock.c: Likewise.
5725         * tests/test-stdint.c: Likewise.
5726         * tests/test-tls.c: Likewise.
5727
5728         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5729         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5730         Add copyright notice.
5731
5732         * check-module: Add copyright notice.  Output a copyright
5733         notice if "--version" is specified.
5734         * modules/COPYING: New file.
5735         * tests/test-getaddrinfo.c: Add copyright notice.
5736         * tests/test-verify.c: Likewise.
5737
5738 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5739
5740         Change copyright notice from LGPL 2 to GPL 2, since that's the
5741         standard form used in the gnulib repository.
5742         * lib/lock.c: LGPL -> GPL.
5743         * lib/lock.h: Likewise.
5744         * lib/strnlen1.c: Likewise.
5745         * lib/strnlen1.h: Likewise.
5746         * lib/tls.c: Likewise.
5747         * lib/tls.h: Likewise.
5748         * lib/tmpdir.c: Likewise.
5749
5750         * lib/TODO: Remove; this belongs only in coreutils.
5751
5752 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5753
5754         Add copyright notices to long-enough files that lack them, since
5755         otherwise the files aren't clearly free.  Use the same notice that
5756         getdate.texi already uses.
5757         * doc/alloca-opt.texi: Add copyright notice.
5758         * doc/alloca.texi: Likewise.
5759         * doc/ctime.texi: Likewise.
5760         * doc/functions.texi: Likewise.
5761         * doc/gcd.texi: Likewise.
5762         * doc/gnulib-tool.texi: Likewise.
5763         * doc/inet_ntoa.texi: Likewise.
5764         * doc/visibility.texi: Likewise.
5765
5766         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5767         * doc/quote.texi: Add copyright notice.
5768
5769         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5770         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5771         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5772         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5773         is now obsolete, and give a pointer to the Sun list.
5774         Add copyright notice.
5775
5776 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5777
5778         * config/srclistvars.sh: Add copyright notice.
5779
5780 2006-08-14  Eric Blake  <ebb9@byu.net>
5781
5782         Import the following change from libc:
5783
5784         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5785
5786         Upstream bug 2997.
5787         * lib/misc/error.c: Add space between program name and message if file
5788         name is missing.
5789
5790 2006-08-12  Karl Berry  <karl@gnu.org>
5791
5792         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5793         remove, these originate in gnulib now.
5794
5795 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5796
5797         * doc/Makefile (standards.info standards.html standards.dvi):
5798         Also depend on make-stds.texi.
5799
5800 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5801
5802         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5803         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5804
5805         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5806         in wchar_t.  Problem reported by Eric Blake.
5807
5808         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5809         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5810         Also, help the compiler to keep LEN in a register.
5811
5812 2006-08-11  Eric Blake  <ebb9@byu.net>
5813
5814         * users.txt: Sort.  Add tar.
5815
5816 2006-08-11  Bruno Haible  <bruno@clisp.org>
5817
5818         * users.txt: New file.
5819
5820 2006-08-11  Bruno Haible  <bruno@clisp.org>
5821
5822         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5823         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5824
5825 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5826
5827         * modules/snprintf (Depends-on): Remove minmax.
5828         (Maintainer): Add self and Bruno.
5829
5830 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5831
5832         * lib/.cppi-disable: Add snprintf.h, socket_.h.
5833         * lib/snprintf.c: Include <errno.h> and <limits.h>.
5834         (EOVERFLOW): Define if the system does not.
5835         Do not include "minmax.h"; it wasn't used.
5836         (snprintf): Don't assume size_t promotes to an unsigned type.
5837         Fix bug when generated string was too long for the buffer: the
5838         buffer's contents are supposed to be the initial prefix of the
5839         output.  Don't assume vasnprintf returns EOVERFLOW if the size
5840         exceeds INT_MAX; do the check ourselves.
5841
5842         Import the following changes from libc:
5843
5844         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
5845
5846         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
5847         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
5848         set wc to the byte which couldn't be converted.
5849         (re_string_reconstruct): Don't clear valid_raw_len before calling
5850         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
5851         tip_context using re_string_context_at.
5852
5853         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
5854
5855         * lib/posix/regex.h: g++ still cannot handled [restrict].
5856
5857         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
5858
5859         * lib/posix/regex.h: Remove special handling for VMS.
5860
5861 2006-08-10  Jim Meyering  <jim@meyering.net>
5862
5863         * modules/same-inode: New module.
5864         * modules/dev-ino: New module.
5865         * modules/cycle-check: Depend on these modules, rather than simply
5866         including their .h files.
5867         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
5868         required via m4/cycle-check.m4.
5869         * modules/same: Depend on new same-inode module, rather than
5870         including same-inode.h.
5871         * modules/chdir-safer: New file.
5872
5873         * modules/chown (Depends-on): Add stat-macros.
5874
5875 2006-08-10  Jim Meyering  <jim@meyering.net>
5876
5877         * m4/cycle-check.m4: New file.
5878         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
5879         * m4/dev-ino.m4, m4/same-inode.m4: New files.
5880
5881 2006-08-10  Eric Blake  <ebb9@byu.net>
5882
5883         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
5884         in from original proposal.
5885
5886 2006-08-10  Eric Blake  <ebb9@byu.net>
5887         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5888
5889         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
5890         namespace.
5891
5892 2006-08-10  Bruno Haible  <bruno@clisp.org>
5893
5894         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
5895         as well.
5896
5897 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5898
5899         Sync from coreutils.
5900
5901         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
5902
5903         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
5904         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
5905
5906 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5907
5908         * modules/restrict: Remove; no longer needed now that we assume
5909         Autoconf 2.59 or later.
5910         * MODULES.html.sh: Remove 'restrict'.
5911         * modules/argp (Depends-on): Remove 'restrict'.
5912         * modules/base64 (Depends-on): Likewise.
5913         * modules/gc (Depends-on): Likewise.
5914         * modules/getaddrinfo (Depends-on): Likewise.
5915         * modules/glob (Depends-on): Likewise.
5916         * modules/inet_ntop (Depends-on): Likewise.
5917         * modules/inet_pton (Depends-on): Likewise.
5918         * modules/memxor (Depends-on): Likewise.
5919         * modules/regex (Depends-on): Likewise.
5920         * modules/strtok_r (Depends-on): Likewise.
5921         * modules/time_r (Depends-on): Likewise.
5922
5923 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5924
5925         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
5926         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
5927         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5928         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
5929         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
5930         * m4/memxor.m4 (gl_MEMXOR): Likewise.
5931         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
5932         gl_C_RESTRICT replaced by AC_C_RESTRICT.
5933
5934         Merge from coreutils.
5935         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
5936         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
5937         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5938         * m4/time_r.m4 (gl_TIME_R): Likewise.
5939
5940 2006-08-09  Karl Berry  <karl@gnu.org>
5941
5942         * config/srclist.txt: no more gettext-tools, per Bruno.
5943
5944 2006-08-08  Eric Blake  <ebb9@byu.net>
5945
5946         * modules/verror: New module.
5947         * MODULES.html.sh: Document it.
5948
5949 2006-08-08  Eric Blake  <ebb9@byu.net>
5950
5951         * lib/verror.h, lib/verror.c: New files.
5952
5953 2006-08-08  Eric Blake  <ebb9@byu.net>
5954
5955         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
5956         verror_at_line output complies with GNU Coding Standards even when
5957         file is NULL.
5958
5959 2006-08-07  Bruno Haible  <bruno@clisp.org>
5960
5961         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
5962         versions of AIX.
5963         Reported by Ralf Wildenhues.
5964
5965 2006-08-07  Bruno Haible  <bruno@clisp.org>
5966
5967         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
5968         in an AC_DEFUN. Needed so that the autoconf snippets can use
5969         AC_REQUIRE.
5970
5971 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5972
5973         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5974         Initialize pkgdata_DATA.
5975         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
5976         overriding it.
5977
5978 2006-08-06  Eric Blake  <ebb9@byu.net>
5979
5980         * lib/error.h: Fold in some upstream changes from glibc.
5981         * lib/error.c: Likewise.
5982
5983 2006-08-04  Bruno Haible  <bruno@clisp.org>
5984
5985         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5986         Make the mostlyclean-local rule depend on mostlyclean-generic.
5987         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
5988
5989 2006-07-31  Bruno Haible  <bruno@clisp.org>
5990
5991         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
5992         <stdlib.h>, <string.h>.
5993
5994 2006-07-30  Bruno Haible  <bruno@clisp.org>
5995
5996         * modules/readlink (License): Change to LGPL.
5997
5998 2006-07-30  Bruno Haible  <bruno@clisp.org>
5999
6000         * modules/javaversion (Makefile.am): Distribute javaversion.java and
6001         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
6002         set PKGDATADIR to point to it.
6003
6004 2006-07-30  Bruno Haible  <bruno@clisp.org>
6005
6006         * modules/csharpexec (configure.ac): Comment out macro invocation.
6007         * modules/javaexec (configure.ac): Likewise.
6008         * modules/javacomp-script (configure.ac): Likewise.
6009
6010         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
6011
6012 2006-07-30  Bruno Haible  <bruno@clisp.org>
6013
6014         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
6015         linked-list.
6016
6017 2006-07-30  Bruno Haible  <bruno@clisp.org>
6018
6019         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
6020
6021 2006-07-30  Bruno Haible  <bruno@clisp.org>
6022
6023         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6024         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
6025         get removed.
6026
6027 2006-07-29  Bruno Haible  <bruno@clisp.org>
6028
6029         Make it possible for gnulib-tool to work with locally modified or
6030         augmented gnulib repositories.
6031         * gnulib-tool (func_usage): Document --local-dir option.
6032         (local_gnulib_dir): New variable.
6033         Handle --local-dir option.
6034         (func_lookup_file): New function.
6035         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
6036         (func_get_description, func_get_filelist, func_get_description,
6037         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
6038         func_get_automake_snippet, func_get_include_directive,
6039         func_get_license, func_get_maintainer): Use func_lookup_file.
6040         (func_import, func_create_testdir): Use func_lookup_file.
6041
6042 2006-07-29  Bruno Haible  <bruno@clisp.org>
6043
6044         * modules/setenv (Depends-on): Add unistd.
6045
6046 2006-07-29  Bruno Haible  <bruno@clisp.org>
6047
6048         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
6049
6050 2006-07-29  Bruno Haible  <bruno@clisp.org>
6051
6052         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
6053
6054 2006-07-29  Bruno Haible  <bruno@clisp.org>
6055
6056         * gnulib-tool (import, update): If there is no Makefile.am, look at
6057         aclocal.m4, instead of bailing out.
6058
6059 2006-07-29  Bruno Haible  <bruno@clisp.org>
6060
6061         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
6062         Categorize the options by when they are useful.
6063
6064 2006-07-29  Bruno Haible  <bruno@clisp.org>
6065
6066         * gnulib-tool (func_usage): Document option --no-libtool.
6067         Handle option --no-libtool.
6068         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
6069         for changed semantics of $libtool variable.
6070         (func_import): Likewise. If libtool is not used, show this through
6071         an option --no-libtool.
6072         (func_create_testdir): Update.
6073
6074 2006-07-29  Bruno Haible  <bruno@clisp.org>
6075
6076         * gnulib-tool (func_import): Extend error message about missing
6077         --doc-base.
6078
6079 2006-07-29  Bruno Haible  <bruno@clisp.org>
6080
6081         * gnulib-tool (func_import): Don't create the $docbase directory if
6082         there is no file to store there.
6083
6084 2006-07-29  Bruno Haible  <bruno@clisp.org>
6085
6086         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6087         relevant, look for configure.ac there, not in the current directory.
6088         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6089
6090 2006-07-29  Bruno Haible  <bruno@clisp.org>
6091
6092         * gnulib-tool (SORT): New variable.
6093         (func_usage): Undocument --assume-autoconf option.
6094         Remove --assume-autoconf option handling.
6095         (autoconf_minversion): Determine from the contents of configure.ac.
6096         (func_import): Remove autoconf_minversion handling.
6097         Suggested by Eric Blake.
6098
6099 2006-07-29  Bruno Haible  <bruno@clisp.org>
6100
6101         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6102
6103 2006-07-29  Bruno Haible  <bruno@clisp.org>
6104
6105         * config/srclist.txt (*setenv.[ch]): Remove rules.
6106
6107 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6108
6109         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6110
6111 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6112
6113         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6114         arpa/inet.h.
6115
6116 2006-07-28  Simon Josefsson  <jas@extundo.com>
6117
6118         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
6119         * modules/inet_pton (Depends-on): Likewise.
6120
6121 2006-07-28  Simon Josefsson  <jas@extundo.com>
6122
6123         * m4/netinet_in_h.m4: New file.
6124
6125 2006-07-28  Simon Josefsson  <jas@extundo.com>
6126
6127         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
6128         #include's.
6129
6130 2006-07-28  Simon Josefsson  <jas@extundo.com>
6131
6132         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
6133         #include's.
6134
6135 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
6136
6137         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
6138         setgid on directories only if they set these bits.
6139         * lib/modechange.h: Remove obsolete comment about masks.
6140
6141 2006-07-28  Eric Blake  <ebb9@byu.net>
6142
6143         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6144         macro expansion.
6145
6146 2006-07-28  Bruno Haible  <bruno@clisp.org>
6147
6148         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
6149
6150 2006-07-28  Bruno Haible  <bruno@clisp.org>
6151
6152         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
6153
6154 2006-07-28  Bruno Haible  <bruno@clisp.org>
6155
6156         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
6157         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
6158         Define fallbacks.
6159         Avoids link error on FreeBSD 4.x.
6160         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
6161
6162         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
6163         encoding.
6164         * lib/mbswidth.c (iswcntrl): Likewise.
6165
6166 2006-07-27  Bruno Haible  <bruno@clisp.org>
6167
6168         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
6169         test.
6170
6171 2006-07-27  Bruno Haible  <bruno@clisp.org>
6172
6173         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
6174         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
6175         defined.
6176
6177 2006-07-26  Eric Blake  <ebb9@byu.net>
6178
6179         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
6180
6181 2006-07-26  Eric Blake  <ebb9@byu.net>
6182
6183         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
6184         like mingw that lack mkstemp.
6185         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
6186         avoid compilation warning on mingw.
6187
6188 2006-07-26  Bruno Haible  <bruno@clisp.org>
6189
6190         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
6191         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
6192         INT_FAST*_MIN, INTPTR_MIN.
6193
6194 2006-07-25  Bruno Haible  <bruno@clisp.org>
6195
6196         * modules/version-etc (Depends-on): Add stdarg.
6197
6198 2006-07-25  Bruno Haible  <bruno@clisp.org>
6199
6200         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
6201         complex commands.
6202
6203 2006-07-25  Bruno Haible  <bruno@clisp.org>
6204
6205         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
6206         defined in <stdarg.h> or config.h.
6207
6208 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6209
6210         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
6211         (gl_STDIO_SAFER): Remove.
6212
6213 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6214
6215         * MODULES.html.sh (File stream based Input/Output):
6216         Add fopen-safer, tmpfile-safer; remove stdio-safer.
6217         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
6218         * modules/fopen-safer, modules/tmpfile-safer: New files.
6219         * modules/stdio-safer: Remove.
6220
6221 2006-07-24  Bruno Haible  <bruno@clisp.org>
6222
6223         * modules/tmpdir: New file.
6224         * MODULES.html.sh (File system functions): Add it.
6225
6226 2006-07-24  Bruno Haible  <bruno@clisp.org>
6227
6228         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
6229         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
6230
6231 2006-07-24  Bruno Haible  <bruno@clisp.org>
6232
6233         * modules/clean-temp: New file.
6234
6235 2006-07-24  Bruno Haible  <bruno@clisp.org>
6236
6237         * m4/tmpdir.m4: New file, from GNU gettext.
6238
6239 2006-07-24  Bruno Haible  <bruno@clisp.org>
6240
6241         * lib/tmpdir.h: New file, from GNU gettext.
6242         * lib/tmpdir.c: New file, from GNU gettext.
6243
6244 2006-07-24  Bruno Haible  <bruno@clisp.org>
6245
6246         * lib/clean-temp.h: New file, from GNU gettext.
6247         * lib/clean-temp.c: New file, from GNU gettext.
6248
6249 2006-07-23  Eric Blake  <ebb9@byu.net>
6250
6251         * modules/stdio-safer (Files): Add tmpfile-safer.c.
6252         (Depends-on): Add binary-io.
6253
6254 2006-07-23  Eric Blake  <ebb9@byu.net>
6255
6256         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
6257
6258 2006-07-23  Eric Blake  <ebb9@byu.net>
6259
6260         * lib/tmpfile-safer.c: New file.
6261         * lib/stdio-safer.h (fopen_safer): Add prototype.
6262         * lib/stdio--.h (tmpfile): Make safer.
6263
6264 2006-07-23  Bruno Haible  <bruno@clisp.org>
6265
6266         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
6267         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
6268         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
6269         gl_linked_remove_at): Use it.
6270
6271 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6272         and Simon Josefsson <jas@extundo.com>
6273
6274         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
6275
6276         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
6277
6278 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6279
6280         * modules/close-stream: New file.
6281         * modules/closeout (Description): Make it clear that it exits
6282         with a diagnostic on error.
6283         (Depends-on): Add close-stream.  Remove fpending, stdbool.
6284         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
6285
6286 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6287
6288         * m4/close-stream.m4: New file.
6289
6290 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6291
6292         * lib/close-stream.c, lib/close-stream.h: New files.
6293
6294 2006-07-22  Bruno Haible  <bruno@clisp.org>
6295
6296         Merge from GNU gettext 0.15.
6297
6298         2006-05-01  Bruno Haible  <bruno@clisp.org>
6299
6300                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
6301
6302         2006-07-22  Bruno Haible  <bruno@clisp.org>
6303
6304                 * modules/javaversion: New file.
6305                 * MODULES.html.sh (Java): Add javaversion.
6306
6307         2006-03-12  Bruno Haible  <bruno@clisp.org>
6308
6309                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
6310
6311         2005-12-04  Bruno Haible  <bruno@clisp.org>
6312
6313                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
6314                 (untested).
6315
6316         2006-06-21  Bruno Haible  <bruno@clisp.org>
6317
6318                 Avoid warnings from recent versions of mcs.
6319                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
6320                 -o, -L, -r any more. Use options documented since mcs-1.0
6321                 instead. Similarly for -g.
6322
6323         2005-12-04  Bruno Haible  <bruno@clisp.org>
6324
6325                 * build-aux/csharpcomp.sh.in: Suffix for resources is
6326                 .resources, not .resource.
6327
6328         2005-07-09  Bruno Haible  <bruno@clisp.org>
6329
6330                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
6331                 add a .dll suffix.
6332                 Reported by Mark Junker <mjscod@gmx.de>.
6333
6334         2006-07-22  Bruno Haible  <bruno@clisp.org>
6335
6336                 * modules/gettext: Upgrade to gettext-0.15.
6337                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
6338                 m4/visibility.m4.
6339                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
6340
6341 2006-07-22  Bruno Haible  <bruno@clisp.org>
6342
6343         Merge from GNU gettext 0.15.
6344
6345         2006-03-25  Bruno Haible  <bruno@clisp.org>
6346
6347                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
6348
6349         2006-07-21  Bruno Haible  <bruno@clisp.org>
6350
6351                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6352                 "1.1".
6353
6354         2006-05-09  Bruno Haible  <bruno@clisp.org>
6355
6356                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6357                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6358                 for the conftestver execution.
6359
6360         2006-05-01  Bruno Haible  <bruno@clisp.org>
6361
6362                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6363                 optional target-version argument. Verify that the compiler
6364                 groks source of the specified source-version, or add -source
6365                 option as necessary. Verify that the compiler produces
6366                 bytecode in the specified target-version, or add -target and
6367                 -source options as necessary. Make the result of the test
6368                 available as variable CONF_JAVAC. Also log error output in
6369                 config.log.
6370
6371         2006-03-11  Bruno Haible  <bruno@clisp.org>
6372
6373                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6374
6375         2006-05-09  Bruno Haible  <bruno@clisp.org>
6376
6377                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6378                 CLASSPATH_SEPARATOR to a semicolon.
6379
6380         2006-03-12  Bruno Haible  <bruno@clisp.org>
6381
6382                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6383                 available as variable CONF_JAVA, for subsequent autoconf
6384                 tests. Also log error output in config.log.
6385
6386         2006-07-19  Bruno Haible  <bruno@clisp.org>
6387
6388                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6389                 that getline works on glibc2 systems. Needed to avoid trouble
6390                 in relocatable.c.
6391                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6392
6393         2005-12-04  Bruno Haible  <bruno@clisp.org>
6394
6395                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6396                 launcher (untested).
6397
6398         2005-12-04  Bruno Haible  <bruno@clisp.org>
6399
6400                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6401
6402         2006-07-22  Bruno Haible  <bruno@clisp.org>
6403
6404                 * gettext.m4: Update from GNU gettext-0.15.
6405                 * nls.m4: Likewise.
6406                 * po.m4: Likewise.
6407                 * inttypes-pri.m4: Likewise.
6408                 * inttypes-h.m4: Renamed from inttypes.m4.
6409                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6410
6411 2006-07-22  Bruno Haible  <bruno@clisp.org>
6412
6413         Merge from GNU gettext 0.15.
6414
6415         2005-07-05  Bruno Haible  <bruno@clisp.org>
6416
6417                 * printf-args.c (printf_fetchargs): Work around broken
6418                 definition of wint_t on mingw.
6419
6420         2005-02-12  Bruno Haible  <bruno@clisp.org>
6421
6422                 * xallocsa.h: Add extern "C" for C++.
6423
6424         2006-05-17  Bruno Haible  <bruno@clisp.org>
6425
6426                 Cygwin portability.
6427                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6428
6429         2006-04-30  Bruno Haible  <bruno@clisp.org>
6430
6431                 * progreloc.c: Include <mach-o/dyld.h> if available.
6432                 (find_executable): Use _NSGetExecutablePath when possible.
6433
6434         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6435
6436                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6437                 function.
6438
6439         2005-12-29  Bruno Haible  <bruno@clisp.org>
6440
6441                 * progreloc.c (set_program_name_and_installdir): Fix
6442                 compilation error.
6443
6444         2005-12-04  Bruno Haible  <bruno@clisp.org>
6445
6446                 Cygwin portability.
6447                 * progreloc.c: Include <windows.h> also on Cygwin.
6448                 (find_executable): Add support for Cygwin.
6449                 (set_program_name_and_installdir): Handle also platforms with
6450                 nonempty EXEEXT.
6451
6452         2006-07-11  Bruno Haible  <bruno@clisp.org>
6453
6454                 * javacomp.c: Fix a comment.
6455                 Reported by Jim Meyering.
6456
6457         2006-04-30  Bruno Haible  <bruno@clisp.org>
6458
6459                 * javacomp.h (compile_java_class): Add source_version,
6460                 target_version arguments.
6461                 * javacomp.c: Rewritten to choose only a compiler that
6462                 respects the specified source_version and target_version.
6463
6464         2006-06-27  Bruno Haible  <bruno@clisp.org>
6465
6466                 Assume correct S_ISDIR macro.
6467                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6468
6469         2006-07-22  Bruno Haible  <bruno@clisp.org>
6470
6471                 * javaversion.h: New file, from GNU gettext.
6472                 * javaversion.c: New file, from GNU gettext.
6473                 * javaversion.java: New file, from GNU gettext.
6474                 * javaversion.class: New file, from GNU gettext.
6475
6476         2006-05-17  Bruno Haible  <bruno@clisp.org>
6477
6478                 Cygwin portability.
6479                 * javaexec.c (execute_java_class): Test for jview program
6480                 also on Cygwin.
6481
6482         2006-04-09  Bruno Haible  <bruno@clisp.org>
6483
6484                 * fatal-signal.c: Don't include string.h.
6485                 (at_fatal_signal): Use a copying loop instead of memcpy.
6486
6487         2005-12-04  Bruno Haible  <bruno@clisp.org>
6488
6489                 * csharpexec.c: Add support for 'clix' launcher (untested).
6490                 (execute_csharp_using_sscli): New function.
6491                 (execute_csharp_program): Call it.
6492
6493         2006-06-21  Bruno Haible  <bruno@clisp.org>
6494
6495                 Avoid warnings from recent versions of mcs.
6496                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
6497                 -o, -L, -r any more. Use options documented since mcs-1.0
6498                 instead. Similarly for -g.
6499
6500         2005-07-09  Bruno Haible  <bruno@clisp.org>
6501
6502                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6503                 add a .dll suffix.
6504                 Reported by Mark Junker <mjscod@gmx.de>.
6505
6506         2006-06-17  Bruno Haible  <bruno@clisp.org>
6507
6508                 * config.charset: Update for NetBSD 3.0.
6509
6510         2006-05-17  Bruno Haible  <bruno@clisp.org>
6511
6512                 Cygwin portability.
6513                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6514
6515         2006-05-16  Bruno Haible  <bruno@clisp.org>
6516
6517                 * localcharset.c [CYGWIN]: Include <windows.h>.
6518                 (get_charset_aliases): For Cygwin, return the same CPxxx
6519                 aliases list as under WIN32.
6520                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
6521                 the environment variables. Fall back to GetACP().
6522
6523         2006-04-05  Bruno Haible  <bruno@clisp.org>
6524
6525                 * config.charset: Update Juan Manuel Guerrero's address.
6526
6527         2005-02-12  Bruno Haible  <bruno@clisp.org>
6528
6529                 * allocsa.h: Add extern "C" for C++.
6530
6531         2005-02-10  Bruno Haible  <bruno@clisp.org>
6532
6533                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
6534                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
6535
6536         2006-07-22  Bruno Haible  <bruno@clisp.org>
6537
6538                 * gettext.h: Update to GNU gettext-0.15.
6539
6540 2006-07-22  Bruno Haible  <bruno@clisp.org>
6541
6542         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
6543         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
6544         lib-prefix.m4, longdouble.m4, ssize_t.m4.
6545
6546 2006-07-21  Eric Blake  <ebb9@byu.net>
6547
6548         * modules/stdlib-safer: New file.
6549         * MODULES.html.sh (File stream based Input/Output): Add
6550         stdlib-safer.
6551
6552 2006-07-21  Eric Blake  <ebb9@byu.net>
6553
6554         * lib/stdlib-safer.h: New file from coreutils, required by
6555         stdlib--.h.
6556
6557 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6558
6559         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
6560
6561 2006-07-20  Bruno Haible  <bruno@clisp.org>
6562
6563         * gnulib-tool: Recognize new option --assume-autoconf.
6564         (autoconf_minversion): New variable.
6565         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6566
6567 2006-07-20  Bruno Haible  <bruno@clisp.org>
6568
6569         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6570
6571 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6572
6573         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6574         Reindent and repaginate.
6575
6576 2006-07-19  Derek Price  <derek@ximbiot.com>
6577
6578         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6579         Correct grammar.
6580
6581 2006-07-17  Bruno Haible  <bruno@clisp.org>
6582
6583         * modules/list: New file.
6584         * modules/array-list: New file.
6585         * modules/carray-list, modules/carray-list-tests: New files.
6586         * modules/linked-list, modules/linked-list-tests: New files.
6587         * modules/avltree-list, modules/avltree-list-tests: New files.
6588         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6589         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6590         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6591         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6592         * modules/oset: New file.
6593         * modules/array-oset: New file.
6594         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6595         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6596         * tests/test-carray_list.c: New file.
6597         * tests/test-linked_list.c: New file.
6598         * tests/test-avltree_list.c: New file.
6599         * tests/test-rbtree_list.c: New file.
6600         * tests/test-linkedhash_list.c: New file.
6601         * tests/test-avltreehash_list.c: New file.
6602         * tests/test-rbtreehash_list.c: New file.
6603         * tests/test-avltree_oset.c: New file.
6604         * tests/test-rbtree_oset.c: New file.
6605         * MODULES.html.sh (Container data structures): New section.
6606
6607 2006-07-17  Bruno Haible  <bruno@clisp.org>
6608
6609         * m4/gl_list.m4: New file.
6610
6611 2006-07-17  Bruno Haible  <bruno@clisp.org>
6612
6613         * lib/gl_list.h: New file.
6614         * lib/gl_list.c: New file.
6615         * lib/gl_array_list.h: New file.
6616         * lib/gl_array_list.c: New file.
6617         * lib/gl_carray_list.h: New file.
6618         * lib/gl_carray_list.c: New file.
6619         * lib/gl_linked_list.h: New file.
6620         * lib/gl_linked_list.c: New file.
6621         * lib/gl_anylinked_list1.h: New file.
6622         * lib/gl_anylinked_list2.h: New file.
6623         * lib/gl_avltree_list.h: New file.
6624         * lib/gl_avltree_list.c: New file.
6625         * lib/gl_anyavltree_list1.h: New file.
6626         * lib/gl_anyavltree_list2.h: New file.
6627         * lib/gl_rbtree_list.h: New file.
6628         * lib/gl_rbtree_list.c: New file.
6629         * lib/gl_anyrbtree_list1.h: New file.
6630         * lib/gl_anyrbtree_list2.h: New file.
6631         * lib/gl_anytree_list1.h: New file.
6632         * lib/gl_anytree_list2.h: New file.
6633         * lib/gl_linkedhash_list.h: New file.
6634         * lib/gl_linkedhash_list.c: New file.
6635         * lib/gl_anyhash_list1.h: New file.
6636         * lib/gl_anyhash_list2.h: New file.
6637         * lib/gl_avltreehash_list.h: New file.
6638         * lib/gl_avltreehash_list.c: New file.
6639         * lib/gl_rbtreehash_list.h: New file.
6640         * lib/gl_rbtreehash_list.c: New file.
6641         * lib/gl_anytreehash_list1.h: New file.
6642         * lib/gl_anytreehash_list2.h: New file.
6643
6644         * lib/gl_oset.h: New file.
6645         * lib/gl_oset.c: New file.
6646         * lib/gl_array_oset.h: New file.
6647         * lib/gl_array_oset.c: New file.
6648         * lib/gl_avltree_oset.h: New file.
6649         * lib/gl_avltree_oset.c: New file.
6650         * lib/gl_rbtree_oset.h: New file.
6651         * lib/gl_rbtree_oset.c: New file.
6652         * lib/gl_anytree_oset.h: New file.
6653
6654 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6655
6656         * m4/mkancesdirs.m4: New file.
6657         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6658         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6659         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6660         it.
6661
6662 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6663
6664         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6665         * lib/mkancesdirs.h: New files.
6666         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6667         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6668         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6669         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6670         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6671         callers changed.  Revamp internals significantly, by not
6672         attempting to create directories that are temporarily more
6673         permissive than the final results.  Do not attempt to use
6674         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6675         This removes some race conditions, fixes some bugs, and simplifies
6676         things.  Use new dirchownmod function to do owner and mode changes.
6677         * lib/mkdir-p.h: Likewise.
6678         * lib/modechange.c (octal_to_mode): New function.
6679         (struct mode_change): New member mentioned.
6680         (make_node_op_equals): New arg mentioned.  All callers changed.
6681         (mode_compile): Keep track of which mode bits the user has explicitly
6682         mentioned.
6683         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6684         New arg PMODE_BITS, to keep track of which mode bits the user
6685         mentioned; it treats S_ISUID and S_ISGID speciall.
6686         All callers changed.
6687         * lib/modechange.h: Likewise.
6688
6689 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6690
6691         * MODULES.html.sh: Add mkancestors.
6692         * modules/mkancesdirs: New module.
6693         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6694         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6695         The chdir-safer and afs files are now orphans; I'll remove them
6696         unless someone speaks up.
6697         Add lib/dirchownmod.c, lib/dirchownmod.h.
6698         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6699         Add lchown, mkancesdirs.
6700         (Maintainer): Add self.
6701
6702 2006-07-15  Karl Berry  <karl@gnu.org>
6703
6704         * gnulib-tool: help message wording/arrangement.
6705
6706 2006-07-14  Simon Josefsson  <jas@extundo.com>
6707
6708         * doc/gnulib.texi (Libtool and Windows): New section.
6709
6710 2006-07-12  Simon Josefsson  <jas@extundo.com>
6711
6712         * modules/gendocs (License): Fix license, approved by Karl.
6713
6714 2006-07-12  Eric Blake  <ebb9@byu.net>
6715
6716         * MODULES.html.sh: Add gendocs.
6717
6718 2006-07-11  Eric Blake  <ebb9@byu.net>
6719
6720         * modules/fdl: New module, to install doc/fdl.texi.
6721         * MODULES.html.sh: Add new section for documentation modules.
6722         * gnulib-tool: Avoid space-tab.
6723         (--doc-base): New option, to manage files from doc.
6724
6725 2006-07-11  Eric Blake  <ebb9@byu.net>
6726
6727         * m4/absolute-header.m4: Fix comments to match recent change.
6728
6729 2006-07-11  Eric Blake  <ebb9@byu.net>
6730
6731         * gnulib-tool: List --doc-base before --tests-base.
6732
6733 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6734
6735         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6736
6737 2006-07-11  Bruno Haible  <bruno@clisp.org>
6738
6739         * README: Mention where to put documentation.
6740
6741 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6742
6743         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6744
6745 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6746
6747         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6748         to stdint.m4.
6749
6750 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6751
6752         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6753         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6754         "no/such/file/stdint.h" when there is no such file, so that
6755         the resulting C code can be parsed by dodgy compilers.
6756         Problems reported by Bob Proulx.
6757
6758 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6759
6760         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6761         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6762         macros into the GNU _D_EXACT_NAMLEN.
6763         * lib/savedir.c:  Likewise.
6764         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6765
6766 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6767         and Paul Eggert  <eggert@cs.ucla.edu>
6768
6769         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6770         * m4/savedir.m4:
6771         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6772         macros into the GNU _D_EXACT_NAMLEN.
6773
6774 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6775
6776         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6777         around the absolute name, to work around a problem with the HP-UX
6778         11.23 native C compiler, reported by Bob Proulx.
6779
6780 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6781
6782         * doc/maintain.texi, make-stds.texi: Sync from
6783         <http://savannah.gnu.org/projects/gnustandards>.
6784
6785 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6786
6787         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6788
6789 2006-07-09  Jim Meyering  <jim@meyering.net>
6790
6791         * m4/glob.m4: Remove a doubled word in a comment.
6792
6793 2006-07-09  Jim Meyering  <jim@meyering.net>
6794
6795         * lib/argp-pv.c: Remove a doubled word in a comment.
6796         * lib/check-version.c (check_version): Likewise.
6797         * lib/javacomp.c (compile_java_class): Likewise.
6798
6799 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6800
6801         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6802         for the benefit of people using Autoconf 2.60.  If you want to
6803         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6804         (or m4/onceonly.m4, if pre-2.57) manually.
6805
6806 2006-07-08  Jim Meyering  <jim@meyering.net>
6807
6808         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6809         comment.
6810         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6811         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6812         comment.
6813
6814 2006-07-08  Jim Meyering  <jim@meyering.net>
6815
6816         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6817
6818 2006-07-07  Simon Josefsson  <jas@extundo.com>
6819
6820         * tests/test-crc.c: Change expected crc value, the test vector
6821         were probably computed using the old broken crc.c?
6822
6823 2006-07-06  Simon Josefsson  <jas@extundo.com>
6824
6825         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6826         now the canonical place for the M4 file).
6827
6828         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
6829         from the sys_socket dependency now.
6830
6831         * modules/inet_pton (Files): Ditto.
6832
6833         * modules/inet_ntop (Files): Ditto.
6834
6835 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6836
6837         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
6838         not gl_PREREQ_GETUSERSHELL.
6839
6840 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6841
6842         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
6843         with only one argument, for Autoconf 2.60.
6844         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
6845         expand to nothing, so add a shell command to avoid syntax error.
6846         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6847
6848 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6849
6850         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
6851
6852 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6853
6854         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
6855         no longer needed.  Check for isblank decl.
6856         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
6857         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
6858         of existence.
6859
6860 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6861
6862         * lib/getloadavg.c: Use __VMS, not VMS.
6863         * lib/getopt.c: Likewise.
6864         * lib/getpagesize.h: Likewise.
6865         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
6866         and probably does not work.
6867
6868 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6869
6870         * lib/.cppi-disable: Add wcwidth.
6871         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
6872         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
6873         (ISGRAPH): Remove.  All uses changed to isgraph.
6874         (FOLD) [!defined _LIBC]: Remove special case.
6875         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
6876         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
6877         HAVE_ISBLANK.
6878         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
6879         case.
6880
6881 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6882
6883         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
6884         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
6885         brackets.  Other minor changes to suppress some compiler
6886         warnings.
6887
6888 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6889         and Paul Eggert  <eggert@cs.ucla.edu>
6890
6891         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
6892         of invoking obsolescent AC_HEADER_DIRENT macro.
6893         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
6894         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
6895         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
6896         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
6897         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
6898         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6899         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
6900         * m4/readdir.m4: Remove; no longer needed.
6901
6902 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6903         and Paul Eggert  <eggert@cs.ucla.edu>
6904
6905         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
6906         Don't worry about this obsolete case any more.
6907         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
6908         directories.
6909         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
6910         worry about this obsolete case any more.
6911         * lib/fts.c: Likewise.
6912         * lib/getcwd.c: Likewise.
6913         * lib/glob.h: Likewise.
6914         * lib/savedir.c: Likewise.
6915
6916 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6917
6918         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
6919         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
6920         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
6921         needed.
6922         All uses removed.
6923         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6924         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6925         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
6926         needed.
6927         * m4/getdate.m4 (gl_GETDATE): Likewise.
6928         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6929         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6930         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6931         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6932         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6933         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6934         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
6935         needed.
6936
6937 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6938
6939         * lib/memcasecmp.c: Include <limits.h>.
6940         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
6941         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
6942         Don't assume isdigit succeeds only on '0' through '9'.
6943
6944 2006-07-05  Eric Blake  <ebb9@byu.net>
6945
6946         * modules/getaddrinfo (Depends-on): Add snprintf.
6947
6948 2006-07-05  Eric Blake  <ebb9@byu.net>
6949
6950         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
6951         to avoid 'header present but could not be compiled' on cygwin.
6952
6953 2006-07-05  Eric Blake  <ebb9@byu.net>
6954
6955         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
6956         missing from netdb.h.
6957         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
6958
6959 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6960
6961         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
6962         no longer needed.
6963         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
6964         * m4/getdate.m4 (gl_GETDATE): Likewise.
6965         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6966         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6967         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6968         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6969         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6970
6971 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6972
6973         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
6974         All uses of is_space replaced by isspace.
6975         * lib/exit.h: Don't talk about STDC_HEADERS.
6976         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
6977         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
6978         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
6979         replaced by isprint etc.
6980         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
6981         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6982         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
6983         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
6984         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
6985         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6986
6987 2006-07-05  Bruno Haible  <bruno@clisp.org>
6988
6989         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
6990         the function exists, before testing against AIX.
6991         Reported by Martin Lambers <marlam@marlam.de>.
6992
6993 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6994
6995         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
6996         From Mark D. Baushke.
6997
6998 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6999
7000         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
7001         to the absolute name, not just one, to bypass Sun C 5.8's
7002         "warning: #include of /usr/include/... may be non-portable".
7003
7004 2006-07-04  Eric Blake  <ebb9@byu.net>
7005
7006         * modules/dirname-tests: New test module.
7007         * tests/test-dirname.c: New file, replacing dirname.c
7008         TEST_DIRNAME section that was recently deleted.
7009
7010 2006-07-04  Bruno Haible  <bruno@clisp.org>
7011
7012         Assume ANSI C header files and <ctype.h> functions.
7013         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
7014         (mbsnwidth): Use isprint, iscntrl instead.
7015
7016 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7017
7018         Merge from coreutils.
7019         * MODULES.html.sh: Add xstrtold.
7020         * modules/xstrtold: New file.
7021         * modules/cycle-check (Files): Add lib/same-inode.h.
7022         * modules/dirname (Files): Add m4/double-slash-root.m4.
7023         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
7024         * modules/mkdir-p (Files): Add lib/same-inode.h.
7025         * modules/same (Files): Add lib/same-inode.h.
7026
7027 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7028
7029         * m4/absolute-header.m4: Renamed from full-header-path.m4.
7030         This is to keep the terminology clean; POSIX talks about
7031         "absolute pathnames", not "full pathnames", but the GNU
7032         Coding Standards say to use "path" for something else;
7033         so use "absolute" to keep both sides happy.
7034         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
7035         Set gl_absolute_header, not gl_full_header_path.
7036         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
7037         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
7038         All uses changed.
7039
7040         Merge from coreutils.
7041
7042         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7043
7044         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
7045         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
7046         want to require the building of c-strtod.o.
7047         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
7048         needs -lm directly.
7049         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
7050
7051         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7052
7053         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
7054         --as-needed option if available.  Problem reported by Albert Chin in
7055         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
7056         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
7057         cc merely issues a bunch of annoying warnings for --as-needed
7058         (this problem was reported by Bob Proulx).  Also, try linking with
7059         -lm to detect a bug in binutils 2.16 (this problem was reported
7060         by Ralf Wildenhues).
7061
7062         2006-06-18  Jim Meyering  <jim@meyering.net>
7063
7064         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
7065         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
7066         macro.
7067         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
7068         also check for glibc-2.4's abort-inducing bug.
7069
7070         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
7071         Low-probability clean-up should be to use rmdir to get rid of
7072         the just-created directory, not unlink.
7073
7074         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
7075         configure fail, and request a bug report to inform us about it.
7076         Add a comment that, barring reports to the contrary, in 2007 we'll
7077         assume ftruncate is universally available.
7078
7079         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7080
7081         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7082
7083         2006-03-12  Jim Meyering  <jim@meyering.net>
7084
7085         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7086         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7087         * m4/same.m4 (gl_SAME): Likewise.
7088         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7089
7090         2006-03-11  Eric Blake  <ebb9@byu.net>
7091
7092         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7093         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7094         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7095         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7096
7097 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7098
7099         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7100         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7101         reported by Mark D. Baushke, one in
7102         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7103
7104         Merge from coreutils.
7105
7106         * lib/.cppi-disable: Add stdint_.h.
7107         * lib/.cvsignore: Add stdint.h.
7108
7109         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7110
7111         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7112         both double and long double versions.
7113         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7114         * lib/xstrtold.c: New file.
7115         * lib/xstrtod.h (xstrtold): New decl.
7116
7117         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7118
7119         * lib/filemode.c (setst): Remove.
7120         (strmode): Rewrite to avoid setst.  This makes the code shorter,
7121         (arguably) clearer, and the generated code is a bit smaller on my
7122         Debian GNU/Linux stable x86 host.
7123
7124         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7125
7126         * lib/filemode.c: Include "filemode.h" first, to test the interface.
7127         Assume that filemode.h includes sys/types.h and sys/stat.h.
7128         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
7129         (ftypelet): Reorder to put common cases first, for efficiency.
7130         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
7131         to do 'M'.
7132         (strmode): Renamed from mode_string, and now stores 12 bytes instead
7133         of 10, for compatibility with FreeBSD.  All callers changed.
7134         (filemodestring): Now stores 12 bytes instead of 10, and sets file
7135         types that can't be deduced solely from st_mode.  First arg is now a
7136         const pointer.
7137         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
7138         (strmode): Renamed from mode_string.
7139         (filemodestring): New decl.
7140         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
7141         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
7142         needed.
7143         (S_ISPORT, S_ISWHT): New macros, if not already defined.
7144
7145         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7146
7147         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
7148         fsusage.h now does that.  Include fsusage.h first, to test interface.
7149         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
7150         at most one method (the old code could have generated decls that
7151         didn't conform to C89, not that this was ever exercised).
7152         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
7153
7154         2006-03-19  Jim Meyering  <jim@meyering.net>
7155
7156         Work even in a chroot where d_ino values for entries in "/"
7157         don't match the stat.st_ino values for the same names.
7158         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
7159         number, iterate through all entries again, using lstat instead.
7160         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
7161         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
7162
7163         * lib/getcwd.c (__getcwd): Clarify a comment.
7164         Use memcpy in place of a call to strcpy.
7165
7166         2006-03-12  Jim Meyering  <jim@meyering.net>
7167
7168         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
7169         matches that of the current directory (which we're about to chdir ".."
7170         out of), then save the dev-ino of the parent, instead.
7171
7172         * lib/same-inode.h (SAME_INODE): New file/macro.
7173         * lib/chdir-safer.c (SAME_INODE): Remove definition.
7174         Include "same-inode.h", instead.
7175         * lib/same.c: Likewise.
7176         * lib/cycle-check.h: Include "same-inode.h".
7177         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
7178         * lib/cycle-check.c (SAME_INODE): Remove definition.
7179         * lib/root-dev-ino.h: Include "same-inode.h".
7180
7181         2006-03-11  Eric Blake  <ebb9@byu.net>
7182
7183         * lib/same.c (same_name): s/base_name/last_component/
7184         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
7185         * lib/filenamecat.c (file_name_concat): Likewise.
7186
7187         2006-03-11  Eric Blake  <ebb9@byu.net>,
7188                     Paul Eggert  <eggert@cs.ucla.edu>
7189
7190         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
7191         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
7192         drive prefix.
7193         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
7194         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
7195         (last_component): New method.
7196         * lib/dirname.c (dir_len): Determine when drive letters need a
7197         subsequent slash.  Preserve // when it is special.
7198         (dir_name): Don't append dot when drive letter is absolute.
7199         [TEST_DIRNAME]: Move into a full-blown gnulib test.
7200         * lib/basename.c (base_name): New semantics - malloc the result.
7201         Preserve // when it is special.  Preserve relative files that look
7202         like drive letters.
7203         (base_len): Preserve // when it is special.
7204         (last_component): New method, similar to old base_name semantics.
7205         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
7206         base_name.  Strip redundant slashes from ///.
7207
7208 2006-07-03  Jim Meyering  <jim@meyering.net>
7209
7210         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
7211         macro is used before the first cycle_check call.
7212
7213 2006-07-03  Eric Blake  <ebb9@byu.net>
7214
7215         * modules/dirname (Depends-on): Add xstrndup.
7216
7217 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7218
7219         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
7220         test cases, so that config.log is a bit easier to follow.
7221
7222 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7223
7224         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
7225         both are 64 bits, since this seems to be the tradition, and this
7226         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
7227         we ever run into a host that prefers long long to long in this
7228         case, we'll need another configure-time test.  Problem reported by
7229         Jim Meyering.
7230
7231 2006-07-02  Eric Blake  <ebb9@byu.net>
7232
7233         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
7234
7235 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7236
7237         * modules/inttypes (Depends-on): No longer depends on stdint.
7238         * modules/stdint (Description): Say more about assumptions.
7239         Say that the fast types might differ.  Say macros are used.
7240         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
7241         (Makefile.am): Revise list of substituted symbols to match
7242         new stdint.m4.
7243         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
7244         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
7245         * tests/test-stdint.c (verify_same_types)
7246         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
7247         the code conforms to C99/C89.
7248         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
7249         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
7250
7251 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7252
7253         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
7254         but fix a bug, by requiring at least 64 bits.
7255         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
7256         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
7257         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
7258         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
7259
7260         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
7261         changes.  Make 2.59 a prerequisite.  Check and substitute for
7262         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
7263         inttypes.h.  Do not use special include files; just use the
7264         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
7265         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
7266         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
7267         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
7268         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
7269         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
7270         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
7271         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
7272         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
7273         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
7274         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
7275         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
7276         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
7277         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
7278         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
7279         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
7280         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
7281         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
7282         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
7283         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
7284         WINT_MAX.  Check for C99 conformance more strictly, by detecting
7285         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
7286         not check for things that C99 does not require, e.g., int8_t.  If
7287         a test isn't needed unless <stdint.h> isn't working, and is
7288         unlikely to be needed for any other reason, then don't do it
7289         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
7290         size_t, since we assume C89 freestanding at least.  Do not check
7291         for sig_atomic_t, wchar_t, or wint_t, since the code now does
7292         the right thing even if the types are not defined.  Instead use:
7293         (gl_STDINT_TYPE_PROPERTIES): New macro.
7294         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
7295         testing whether <sys/types.h> clashes, as Autoconf does this for
7296         us now.  All uses removed.
7297         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
7298         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
7299         (gl_CHECK_TYPE_SAME):
7300         Remove; no longer needed.
7301         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
7302         exists, since we'll return 0 anyway in that case.
7303         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
7304
7305 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7306
7307         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
7308         possible collision with system files.
7309         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
7310         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
7311         WCHAR_MIN and WCHAR_MAX in this case.
7312         (<stddef.h>): Do not include; no longer needed.
7313         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
7314         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
7315         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
7316         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
7317         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
7318         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
7319         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
7320         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
7321         !defined(__c99))]: Include in this case too, since it's harmless
7322         now.
7323         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
7324         dangerous to do so.
7325         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
7326         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
7327         (_STDINT_MIN, _STDINT_MAX): New macros.
7328         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
7329         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
7330         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
7331         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
7332         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
7333         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
7334         macros, not typedefs; this simplifies things quite a bit.
7335         Use long int for all types narrower than int64_t.
7336         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
7337         Define in terms of long long int or int64_t or long int,
7338         not int64_t or int32_t.  This saves some compile-time testing.
7339         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
7340         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
7341         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
7342         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
7343         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
7344         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
7345         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
7346         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
7347         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
7348         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
7349         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7350         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7351         undef any previous version and define our own version, for
7352         simplicity and consistency with the new macros for types.
7353         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7354         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7355         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7356         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7357         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7358         @WINT_T_SUFFIX@ to keep things simple here.
7359         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7360         Simplify by assuming typical 8/16/32/64 host, since we're
7361         already doing that elsewhere anyway.
7362         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7363         and assume long long int is 64 bits if available.  This
7364         speeds up 'configure'.
7365
7366 2006-07-01  Eric Blake  <ebb9@byu.net>
7367
7368         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7369         Reported by Andreas Buening.
7370
7371 2006-07-01  Eric Blake  <ebb9@byu.net>
7372
7373         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7374
7375 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7376
7377         * lib/getaddrinfo.c: fixed typo
7378
7379 2006-06-29  Jim Meyering  <jim@meyering.net>
7380
7381         * modules/strftime (Maintainer): Add my name, since with the
7382         FPRINTFTIME changes strftime.c has forked from glibc.
7383
7384 2006-06-29  Eric Blake  <ebb9@byu.net>
7385
7386         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7387
7388 2006-06-29  Eric Blake  <ebb9@byu.net>
7389
7390         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7391
7392 2006-06-29  Eric Blake  <ebb9@byu.net>
7393
7394         * lib/stat_.h: New file.
7395
7396 2006-06-29  Eric Blake  <ebb9@byu.net>
7397
7398         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7399         unused static function.
7400
7401 2006-06-29  Eric Blake  <ebb9@byu.net>
7402
7403         * doc/functions.texi (Function Portability): Document missing lstat
7404         on mingw.
7405
7406 2006-06-29  Eric Blake  <ebb9@byu.net>
7407
7408         * MODULES.html.sh: Add sys_stat.
7409         * modules/sys_stat: New module.
7410         * modules/mkstemp (Depends-on): Add sys_stat.
7411
7412 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7413
7414         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7415
7416 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7417
7418         * m4/c-bs-a.m4: Removed.
7419
7420 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7421
7422         * lib/strftime.c: Assume strftime() exists.
7423
7424 2006-06-29  Derek Price  <derek@ximbiot.com>
7425
7426         * modules/c-bs-a: Removed - \a is C89.
7427         * MODULES.html.sh: Remove c-bs-a.
7428
7429 2006-06-29  Bruno Haible  <bruno@clisp.org>
7430
7431         * modules/wcwidth (License): Change to LGPL.
7432
7433 2006-06-28  Simon Josefsson  <jas@extundo.com>
7434
7435         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7436         on _WIN32.
7437
7438         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7439         getnameinfo.
7440
7441 2006-06-28  Simon Josefsson  <jas@extundo.com>
7442
7443         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7444
7445 2006-06-28  Simon Josefsson  <jas@extundo.com>
7446
7447         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7448         functions there.  It will succeed on Windows XP, but on Windows
7449         2000 and (presumably) earlier, it will fail, and use the internal
7450         re-implementation.
7451         (use_win32_p): New function.
7452         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7453         Support AI_NUMERICSERV to disable getservbyname.
7454         (getnameinfo): New function, only supports
7455         NI_NUMERICHOST|NI_NUMERICSERV for now.
7456
7457         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7458         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7459         getnameinfo.
7460
7461 2006-06-28  Eric Blake  <ebb9@byu.net>
7462
7463         * modules/wcwidth: New file.
7464         * modules/mbchar (Depends-on): Add wcwidth.
7465         * modules/mbswidth (Depends-on): Add wcwidth.
7466         * MODULES.html.sh: Add wcwidth.
7467
7468 2006-06-28  Eric Blake  <ebb9@byu.net>
7469
7470         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7471         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7472
7473 2006-06-28  Eric Blake  <ebb9@byu.net>
7474
7475         * lib/xvasprintf.h: Fix comments.
7476
7477 2006-06-28  Eric Blake  <ebb9@byu.net>
7478
7479         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7480         * lib/mbswidth.c (wcwidth): Move from here...
7481         * lib/wcwidth.h: ...to this new file.
7482
7483 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7484
7485         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7486
7487         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7488         it's obsolete.
7489         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7490
7491 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7492
7493         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
7494         Autoconf 2.60 says this stuff was obsolete.
7495
7496 2006-06-28  Bruno Haible  <bruno@clisp.org>
7497
7498         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7499
7500 2006-06-28  Bruno Haible  <bruno@clisp.org>
7501
7502         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7503         gt_TYPE_WCHAR_T.
7504
7505 2006-06-28  Bruno Haible  <bruno@clisp.org>
7506
7507         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7508         declaration for wcwidth.
7509         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7510
7511 2006-06-28  Bruno Haible  <bruno@clisp.org>
7512
7513         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7514         (mkdir): Define using _mkdir.
7515
7516 2006-06-28  Bruno Haible  <bruno@clisp.org>
7517
7518         * lib/getaddrinfo.h: Fix POSIX URL.
7519         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
7520         _WIN32.
7521         (use_win32_p): Make static.
7522         (getaddrinfo): Reject service name if it is empty or does not consist
7523         solely of decimal digits, or if its value is > 65535.
7524         (getnameinfo): Remove useless casts.
7525
7526 2006-06-27  Simon Josefsson  <jas@extundo.com>
7527
7528         * modules/sys_select: New file, suggested by Bruno Haible, Paul
7529         Eggert and Martin Lambers.
7530
7531 2006-06-27  Simon Josefsson  <jas@extundo.com>
7532
7533         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
7534         Eggert and Martin Lambers.
7535
7536 2006-06-27  Bruno Haible  <bruno@clisp.org>
7537
7538         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
7539         result to 0, not to empty.
7540         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
7541
7542 2006-06-27  Bruno Haible  <bruno@clisp.org>
7543
7544         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
7545
7546 2006-06-26  Simon Josefsson  <jas@extundo.com>
7547
7548         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
7549         present.
7550
7551 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
7552
7553         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
7554         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
7555         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
7556
7557 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
7558
7559         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
7560
7561 2006-06-26  Bruno Haible  <bruno@clisp.org>
7562
7563         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7564
7565 2006-06-26  Bruno Haible  <bruno@clisp.org>
7566
7567         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7568
7569 2006-06-26  Bruno Haible  <bruno@clisp.org>
7570
7571         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7572         SGI C compiler in pre-C99 mode.
7573         Suggested by Mark D. Baushke and Larry Jones.
7574
7575 2006-06-26  Bruno Haible  <bruno@clisp.org>
7576
7577         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7578         WCHAR_MAX.
7579         Reported by Mark D. Baushke and Larry Jones.
7580
7581 2006-06-26  Bruno Haible  <bruno@clisp.org>
7582
7583         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7584         in pre-C99 mode.
7585         Suggested by Mark D. Baushke and Larry Jones.
7586
7587 2006-06-23  Simon Josefsson  <jas@extundo.com>
7588             Bruno Haible  <bruno@clisp.org>
7589
7590         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7591         Emit mostlyclean-local rule.
7592         (func_emit_tests_Makefile_am): Likewise.
7593         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7594
7595 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7596
7597         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7598
7599 2006-06-23  Bruno Haible  <bruno@clisp.org>
7600
7601         * tests/test-stdint.c: Update to match ISO C 99 Technical
7602         Corrigendum 1.
7603
7604 2006-06-23  Bruno Haible  <bruno@clisp.org>
7605
7606         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7607
7608 2006-06-23  Bruno Haible  <bruno@clisp.org>
7609
7610         * lib/stdint_.h: Treat IRIX like OpenBSD.
7611
7612 2006-06-23  Bruno Haible  <bruno@clisp.org>
7613
7614         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7615         ISO C 99 Technical Corrigendum 1.
7616
7617 2006-06-22  Simon Josefsson  <jas@extundo.com>
7618
7619         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7620         MinGW.
7621
7622 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7623
7624         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7625         needed.  Some compiler complained about some of them.  Problem reported
7626         by Larry Jones in
7627         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7628
7629 2006-06-21  Simon Josefsson  <jas@extundo.com>
7630
7631         * tests/test-getaddrinfo.c: New file.
7632
7633         * modules/getaddrinfo-tests: New file.
7634
7635         * MODULES.html.sh: Add inet_pton.
7636
7637         * modules/inet_pton: New file.
7638
7639 2006-06-21  Simon Josefsson  <jas@extundo.com>
7640
7641         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7642         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7643         of using the (limited) gnulib implementation on Windows XP.
7644
7645         * m4/inet_pton.m4: New file.
7646
7647 2006-06-21  Simon Josefsson  <jas@extundo.com>
7648
7649         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7650         variable.
7651
7652         * lib/socket_.h: Don't define WINVER.
7653
7654         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7655         slightly modified to work in gnulib.
7656
7657 2006-06-21  Simon Josefsson  <jas@extundo.com>
7658
7659         * doc/gnulib.texi (Windows sockets): Add.
7660
7661 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7662
7663         * lib/read-file.c (fread_file): Start with buffer allocation of
7664         0 bytes rather than 1 byte; this simplifies the code.
7665         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7666         code to free buffer and save/restore errno.
7667         (internal_read_file): Remove unused local.
7668
7669 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7670
7671         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7672         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7673         Problem reported by Denis Excoffier in
7674         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7675
7676 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7677
7678         * modules/sys_socket, modules/socklen: Include sys/types since
7679         FreeBSD 4.x's sys/socket.h needs it.
7680
7681 2006-06-19  Simon Josefsson  <jas@extundo.com>
7682
7683         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7684
7685 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7686
7687         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7688
7689 2006-06-19  Bruno Haible  <bruno@clisp.org>
7690
7691         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7692         and FULL_PATH_INTTYPES_H in angle brackets.
7693         Reported by Mark D. Baushke <mdb@gnu.org>.
7694
7695 2006-06-17  Eric Blake  <ebb9@byu.net>
7696
7697         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7698         errno.
7699
7700 2006-06-17  Bruno Haible  <bruno@clisp.org>
7701
7702         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7703         <sys/inttypes.h>.
7704
7705 2006-06-17  Bruno Haible  <bruno@clisp.org>
7706
7707         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7708         whether errno is declared. Assume <errno.h> declares errno.
7709
7710 2006-06-17  Bruno Haible  <bruno@clisp.org>
7711
7712         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7713
7714 2006-06-17  Bruno Haible  <bruno@clisp.org>
7715
7716         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7717         problem on Solaris 2.5.1.
7718
7719 2006-06-16  Eric Blake  <ebb9@byu.net>
7720
7721         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7722         * lib/unicodeio.c [!defined errno]: Likewise.
7723         * lib/strtol.c [!defined errno]: Likewise.
7724         * lib/strtod.c [!defined errno]: Likewise.
7725
7726 2006-06-15  Eric Blake  <ebb9@byu.net>
7727
7728         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7729
7730 2006-06-15  Eric Blake  <ebb9@byu.net>
7731
7732         * config/srclist.txt (ssize_t.m4): Lose sync.
7733
7734 2006-06-15  Bruno Haible  <bruno@clisp.org>
7735
7736         * modules/stdint (Files): Include m4/full-header-path.m4,
7737         m4/size_max.m4, m4/wchar_t.m4.
7738         (Makefile.am): Many more substitutions.
7739         * modules/stdint-tests: New file.
7740         * tests/test-stdint.c: New file.
7741
7742 2006-06-15  Bruno Haible  <bruno@clisp.org>
7743
7744         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7745         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7746         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7747         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7748         gl_CHECK_TYPE_SAME): New macros.
7749
7750 2006-06-15  Bruno Haible  <bruno@clisp.org>
7751
7752         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7753
7754 2006-06-15  Bruno Haible  <bruno@clisp.org>
7755
7756         * lib/stdint_.h: Rewritten to be fully auto-configured.
7757         Fixes bug on HP-UX/IA64.
7758
7759 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7760
7761         * lib/getdate.y (__attribute__): Don't define if already defined.
7762         Problem reported by Larry Jones.
7763         * lib/utimens.c (__attribute__): Likewise.
7764
7765 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7766
7767         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7768         reported by Andreas Schwab.
7769
7770 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7771             Bruno Haible  <bruno@clisp.org>
7772
7773         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7774         check for the declaration of strnlen and a run test that exposes the
7775         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7776         rpl_strndup.
7777
7778 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7779             Bruno Haible  <bruno@clisp.org>
7780
7781         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7782
7783 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7784
7785         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7786         compile test, for Tru64 4.0D.
7787
7788 2006-05-28  Karl Berry  <karl@gnu.org>
7789
7790         * config/srclist.txt (printf-args.c): lose sync.
7791
7792 2006-05-26  Martin Lambers  <marlam@marlam.de>
7793
7794         * lib/getpass.c: Updates the test for the native W32 API, and adds
7795         missing includes, thus fixing compilation warnings.
7796
7797 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7798
7799         * lib/exclude.c (exclude_fnmatch): New function.
7800         (excluded_file_name): Call exclude_fnmatch.
7801         * lib/exclude.h (excluded_file_name): New prototype
7802
7803 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7804
7805         * lib/tempname.c (small_open, large_open): New macros.
7806         (__open, __open64) [!_LIBC]: Remove.
7807         (__gen_tempname): Use small_open and large_open instead of __open
7808         and __open64.  This fixes a portability bug on HP-UX 11.11i
7809         reported by Simon Wing-Tang in
7810         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7811
7812 2006-05-24  Bruno Haible  <bruno@clisp.org>
7813
7814         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7815         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7816         Reported by Thorsten Maerz <torte@netztorte.de> via
7817         Aaron Stone <aaron@serendipity.cx>.
7818
7819 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7820
7821         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7822         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7823         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7824         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7825         not really conditional on the cache.
7826         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7827
7828 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7829
7830         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
7831         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
7832         (my_usleep): Don't mishandle maximum value.
7833
7834 2006-05-19  Jim Meyering  <jim@meyering.net>
7835
7836         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
7837
7838 2006-05-17  Bruno Haible  <bruno@clisp.org>
7839
7840         Cygwin portability.
7841         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
7842
7843 2006-05-17  Bruno Haible  <bruno@clisp.org>
7844
7845         * lib/stdint_.h: Fix recognition of Cygwin.
7846
7847 2006-05-15  Bruno Haible  <bruno@clisp.org>
7848
7849         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
7850         on libtool patch by Ralf Wildenhues.
7851
7852 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7853
7854         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
7855         test for C99 conformance; (bool) 0.5 is an integer constant
7856         expression, but (bool) -0.5 is not.  Problem reported by Fedor
7857         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
7858
7859 2006-05-11  Simon Josefsson  <jas@extundo.com>
7860
7861         * m4/xvasprintf.m4: Fix obvious typo.
7862
7863 2006-05-11  Jim Meyering  <jim@meyering.net>
7864
7865         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
7866         James Lemley.
7867
7868 2006-05-10  Simon Josefsson  <jas@extundo.com>
7869
7870         * lib/md4.c: Typo fix, update copyright years.
7871         (K1, K2): Don't use L because it turn computations into 64-bit on
7872         64-bit platforms.
7873
7874 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
7875
7876         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
7877         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
7878         unwanted sign propagation, e.g., on hosts with 64-bit int.
7879         There still are some problems with reeelly weird theoretical hosts
7880         (e.g., 33-bit int) but it's not worth worrying about now.
7881         * lib/sha1.c (rol): Likewise.
7882         (K1, K2, K3, K4): Remove unnecessary L suffix.
7883
7884 2006-05-10  Bruno Haible  <bruno@clisp.org>
7885
7886         * lib/des.c: Cast to avoid warnings.
7887
7888 2006-05-09  Bruno Haible  <bruno@clisp.org>
7889
7890         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
7891         (Depends-on): Depend also on xsize, stdarg.
7892         (configure.ac): Add gl_XVASPRINTF.
7893
7894 2006-05-09  Bruno Haible  <bruno@clisp.org>
7895
7896         * m4/xvasprintf.m4: New file.
7897
7898 2006-05-09  Bruno Haible  <bruno@clisp.org>
7899
7900         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
7901         (EOVERFLOW): Define fallback value.
7902         (xstrcat): New function.
7903         (xvasprintf): Recognize the special case of a string concatenation.
7904
7905 2006-05-08  Eric Blake  <ebb9@byu.net>
7906
7907         * gnulib-tool (func_version): Base copyright year on CVS date.
7908         (func_emit_copyright_notice): New function.
7909         (func_emit_lib_Makefile_am): Use it.
7910         (func_emit_tests_Makefile_am): Likewise.
7911         (func_import): Likewise.
7912
7913 2006-05-08  Bruno Haible  <bruno@clisp.org>
7914
7915         * modules/stdarg: New file.
7916         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
7917
7918 2006-05-08  Bruno Haible  <bruno@clisp.org>
7919
7920         * m4/stdarg.m4: New file, from GNU gettext.
7921
7922 2006-05-08  Bruno Haible  <bruno@clisp.org>
7923
7924         * config/srclist.txt (build-aux/config.rpath): different from latest
7925         release.
7926
7927 2006-05-08  Bruno Haible  <bruno@clisp.org>
7928
7929         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
7930
7931 2006-05-05  Jim Meyering  <jim@meyering.net>
7932
7933         * m4/warning.m4: New file, derived from bison's file by the same name.
7934
7935 2006-05-03  Bruno Haible  <bruno@clisp.org>
7936
7937         * lib/stdint_.h: Shorter URL.
7938         * lib/inttypes.h: Likewise.
7939
7940 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7941
7942         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
7943
7944 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7945
7946         * lib/verify.h: Document the internals better.  Most of this change
7947         was written by Bruno Haible.
7948
7949 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7950
7951         * doc/verify.texi: New file, partly based on a proposal by
7952         Bruno Haible.
7953
7954 2006-05-02  Bruno Haible  <bruno@clisp.org>
7955
7956         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
7957         test from here...
7958         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
7959
7960 2006-04-29  Bruno Haible  <bruno@clisp.org>
7961
7962         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
7963         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
7964
7965 2006-04-29  Bruno Haible  <bruno@clisp.org>
7966
7967         * gnulib-tool: Make --update option actually work.
7968
7969 2006-04-29  Bruno Haible  <bruno@clisp.org>
7970
7971         * doc/gcd.texi: New file.
7972         * doc/gnulib.texi: Include it.
7973
7974 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7975
7976         * lib/getdate.y (get_date): When adding relative date, start with the
7977         initial time, not with the result of the first mktime call.
7978
7979 2006-04-25  Bruno Haible  <bruno@clisp.org>
7980
7981         * gnulib-tool (func_import): Output the include directives in three
7982         blocks, sorted separately.
7983         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7984
7985 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7986
7987         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
7988         to define main with arguments, for C++.  Reported by Eric Blake.
7989         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
7990         Prefer 'int main ()' to 'int main (void)', for C++.
7991         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
7992         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
7993         for 'main', for C99 and C++.
7994
7995 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7996
7997         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
7998         Don't assume that exit status -1 is valid.
7999         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8000         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
8001         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
8002         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
8003         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
8004         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
8005         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
8006         functions can be used without declaring them, or that you can
8007         exit with status -1.
8008         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
8009
8010 2006-04-24  Karl Berry  <karl@gnu.org>
8011
8012         * config/srclist.txt (longdouble.m4): sync lost.
8013
8014 2006-04-24  Eric Blake  <ebb9@byu.net>
8015
8016         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
8017
8018 2006-04-24  Bruno Haible  <bruno@clisp.org>
8019
8020         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
8021         poll() implementation in AIX.
8022         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8023
8024 2006-04-24  Bruno Haible  <bruno@clisp.org>
8025
8026         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
8027         assigned exactly once.
8028
8029 2006-04-23  Claudio Fontana  <claudio@gnu.org>
8030             Bruno Haible  <bruno@clisp.org>
8031
8032         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
8033         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
8034         for AM_CPPFLAGS.
8035
8036 2006-04-23  Bruno Haible  <bruno@clisp.org>
8037
8038         * modules/copy-file: Depend on unistd.
8039         * modules/execute: Likewise.
8040         * modules/fatal-signal: Likewise.
8041         * modules/findprog: Likewise.
8042         * modules/mkdtemp : Likewise.
8043         * modules/pipe: Likewise.
8044         * modules/wait-process: Likewise.
8045
8046 2006-04-23  Bruno Haible  <bruno@clisp.org>
8047
8048         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
8049         condition was already detected.
8050         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8051
8052 2006-04-23  Bruno Haible  <bruno@clisp.org>
8053
8054         * lib/copy-file.c: Include <unistd.h> unconditionally.
8055         * lib/execute.c: Likewise.
8056         * lib/fatal-signal.c: Likewise.
8057         * lib/findprog.c: Likewise.
8058         * lib/mkdtemp.c: Likewise.
8059         * lib/pipe.h: Likewise.
8060         * lib/pipe.c: Likewise.
8061         * lib/wait-process.h: Likewise.
8062
8063 2006-04-23  Bruno Haible  <bruno@clisp.org>
8064
8065         * gnulib-tool (func_usage): Fix --import description. Document
8066         --update.
8067         (func_import): Create temporary file in a temporary directory, if
8068         --dry-run is specified. Silence errors from 'grep' when there are no
8069         m4 files in $m4dir.
8070         (func_create_testdir): Silence errors from 'grep' when there are no
8071         m4 files in $m4dir.
8072         Reported by Karl Berry <karl@freefriends.org>.
8073
8074 2006-04-20  Bruno Haible  <bruno@clisp.org>
8075
8076         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8077         one argument, so that the code will be portable to Autoconf 2.60.
8078         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8079         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8080         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8081
8082 2006-04-19  Derek Price  <derek@ximbiot.com>
8083             Eric Blake  <ebb9@byu.net>
8084
8085         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8086         rather than "/full/path.h".  Update comment to match.  Shorten &
8087         generalize m4_translit call via AS_TR_CPP.
8088
8089 2006-04-19  Derek Price  <derek@ximbiot.com>
8090             Eric Blake  <ebb9@byu.net>
8091
8092         * lib/inttypes.h: Correct grammar in comment.
8093
8094 2006-04-18  Derek Price  <derek@ximbiot.com>
8095             Paul Eggert  <eggert@cs.ucla.edu>
8096
8097         * modules/inttypes: New file.
8098         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8099
8100 2006-04-18  Derek Price  <derek@ximbiot.com>
8101             Paul Eggert  <eggert@cs.ucla.edu>
8102
8103         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8104         New files.
8105
8106 2006-04-18  Derek Price  <derek@ximbiot.com>
8107             Paul Eggert  <eggert@cs.ucla.edu>
8108
8109         * lib/inttypes.h: New file.
8110         * lib/strtoimax.c: Assume <inttypes.h>.
8111
8112 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8113
8114         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8115         isn't mounted.  Problem reported by Kir Kolyshkin.
8116
8117 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
8118
8119         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
8120         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
8121         Derek R. Price.
8122         * lib/regex.h (RE_DUP_MAX): Update comment to match current
8123         implementation.
8124
8125 2006-04-12  Eric Blake  <ebb9@byu.net>
8126
8127         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
8128         is now done automatically by the corresponding Autoconf macro.
8129
8130 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
8131
8132         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
8133         time_r.h.
8134
8135 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8136
8137         Merge regex changes from libc, removing some of our
8138         POSIX-conformance changes that were rejected and redoing them in a
8139         less-intrusive way.
8140
8141         * lib/regcomp.c (re_compile_internal, init_dfa):
8142         Length arg is now size_t, not Idx.  All uses changed.
8143         (peek_token): Forward decl now says internal_function.
8144         (__re_error_msgid, __re_error_msgid_idx):
8145         Now static rather than extern with attribute_hidden.
8146         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
8147         For some reason libc prefers K&R style defns for external functions.
8148         (regerror) [!defined _LIBC]: Likewise.
8149         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
8150         (seek_collating_symbol_entry, lookup_collation_sequence_value):
8151         (build_range_exp, build_collating_symbol):
8152         Use K&R-style defn.
8153         (re_compile_fastmap): Use '\0' to memset, not 0.
8154         (utf8_sb_map): Make the calculations more obvious.
8155         (init_dfa, parse_bracket_exp, build_charclass_op):
8156         Call calloc and cast result, as glibc does.
8157         (init_word_char, fetch_token, peek_token, peek_token_bracket):
8158         (build_range_exp, build_collating_symbol):
8159         Now internal functions.
8160
8161         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
8162
8163         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
8164         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
8165         Don't depend on VMS; depend on __VMS instead, for POSIX
8166         namespace cleanness.
8167         (regoff_t): Define to ssize_t, not long int.
8168
8169         Remove the REG_ macros named below.  Instead, make the old names
8170         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
8171         __USE_GNU_REGEX.
8172         (REG_BACKSLASH_ESCAPE_IN_LISTS):
8173         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
8174         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
8175         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
8176         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
8177         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
8178         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
8179         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
8180         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
8181         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
8182         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
8183         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
8184         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
8185         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
8186         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
8187         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
8188         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
8189         (REG_NREGS):
8190         Remove.  All uses replaced by the old RE_* names.
8191         (RE_BACKSLASH_ESCAPE_IN_LISTS):
8192         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
8193         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
8194         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
8195         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
8196         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
8197         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
8198         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
8199         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
8200         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
8201         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
8202         Don't bother having these macros be independent of each others'
8203         values, since they no longer exist in the POSIX name space.
8204
8205         Rename the following member names back to their old names,
8206         unless !__USE_GNU_REGEX.  All uses changed back.
8207         (buffer): Renamed from re_buffer.
8208         (allocated): Renamed from re_allocated.
8209         (used): Renamed from re_used.
8210         (syntax): Renamed from re_syntax.
8211         (fastmap): Renamed from re_fastmap.
8212         (translate): Renamed from re_translate.
8213         (can_be_null): Renamed from re_can_be_null.
8214         (regs_allocated): Renamed from re_regs_allocated.
8215         (fastmap_accurate): Renamed from re_fastmap_accurate.
8216         (no_sub): Renamed from re_no_sub.
8217         (not_bol): Renamed from re_not_bol.
8218         (not_eol): Renamed from re_not_eol.
8219         (newline_anchor): Renamed from re_newline_anchor.
8220         (num_regs): Renamed from rm_num_regs.
8221         (start): Renamed from rm_start.
8222         (end): Renamed from rm_end.
8223
8224         (free_state): Move up a bit.
8225
8226         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
8227         #define to be empty.
8228         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
8229         when that is what is intended.
8230         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
8231         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
8232         (MAX): New macro.
8233         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
8234         All uses changed back to re_malloc, etc.  It's now the caller's
8235         responsibility to check for overflow; all callers changed.
8236         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
8237         (re_x2nrealloc): Remove.
8238         (free_state): Remove decl.
8239
8240         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
8241         (re_set_registers, re_exec):
8242         Use K&R-style defn.
8243
8244         2006-01-31  Roland McGrath  <roland@redhat.com>
8245
8246         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
8247         Reported by Mike Frysinger <vapier@gentoo.org>.
8248
8249         2006-01-15  Andreas Jaeger  <aj@suse.de>
8250
8251         [BZ #1950]
8252         * lib/regex_internal.c (re_string_reconstruct): Adjust for
8253         build_wcs_upper_buffer change.
8254         (build_wcs_upper_buffer): Change return type.
8255
8256         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
8257
8258         * lib/regex_internal.h: Include <stdint.h> if available.
8259
8260         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
8261
8262         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
8263
8264         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
8265
8266         * lib/regcomp.c: Adjust for changed secondary hash function.
8267
8268         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
8269
8270         * lib/regex.h: Pretty printing.
8271         Clean up namespace a bit.
8272
8273         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
8274
8275         * lib/regexec.c (update_cur_sifted_state, check_arrival,
8276         check_arrival_add_next_nodes): Avoid using uninitialized variable.
8277
8278         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8279                     Ulrich Drepper  <drepper@redhat.com>
8280
8281         [BZ #1302]
8282         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
8283         changed.
8284         (bitset_word_t): Renamed from bitset_word.  All uses changed.
8285
8286         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
8287
8288         [BZ #281]
8289         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
8290         * lib/regcomp.c: Remove unnecessary uses of
8291         unsigned RE_TRANSLATE_TYPE.
8292         * lib/regex_internal.h: Likewise.
8293         * lib/regex_internal.c: Likewise.
8294         * lib/regexec.c: Likewise.
8295         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
8296
8297         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
8298
8299         * lib/regexec.c (find_recover_state): Remove unnecessary
8300         initialization.
8301         (transit_state_bkref): Make DFA a const pointer.
8302         (get_subexp): Likewise.
8303         (check_arrival): Likewise.
8304         (update_cur_sifted_state): Likewise.
8305         (re_search_internal): Likewise.
8306         (prune_impossible_nodes): Likewise.
8307         (acquire_init_state_context): Likewise.
8308         (proceed_next_node): Likewise.
8309         (set_regs): Likewise.
8310         (free_fail_stack_return): Likewise.
8311         (check_arrival_expand_ecl): Mark DFA parameter as const.
8312         (check_arrival_expand_ecl_sub): Likewise.
8313         (check_subexp_limits): Likewise.
8314         (sub_epsilon_src_nodes):  Likewise.
8315         (add_epsilon_src_nodes):  Likewise.
8316         (merge_state_array): Likewise.
8317         (update_regs): Likewise.
8318         (build_trtable): Likewise.
8319         (sift_states_backward): Mark MCTX parameter as const.
8320         (build_sifted_states): Likewise.
8321         (update_cur_sifted_state): Likewise.
8322         (sift_states_mkref): Likewise.
8323         (check_arrival_expand_ecl): Mark eclosure as const.
8324         (check_dst_limits_calc_pos_1): Likewise.
8325         * lib/regex_internal.h (re_match_context_t): Make dfa a const
8326         pointer.
8327
8328         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
8329
8330         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
8331         (transit_state_sb): Likewise.
8332         (transit_state_mb): Likewise.
8333         (sift_states_iter_mb): Likewise.
8334         (check_arrival_add_next_nodes): Likewise.
8335         (check_node_accept_bytes): Change first parameter to pointer-to-const.
8336         [_LIBC] (re_search_2_stub): Use mempcpy.
8337
8338         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
8339         mbrtowc for very simple UTF-8 case.
8340
8341         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
8342         a pointer-to-const.
8343         (re_acquire_state_context): Likewise.
8344         * lib/regex_internal.h: Adjust prototypes.
8345
8346         * lib/regex.c: Prevent using C++ compilers.
8347
8348         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
8349         (re_acquire_state_context): Likewise.
8350
8351 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8352
8353         * modules/regex (Depends-on): Add ssize_t.
8354
8355 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8356
8357         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8358         translation table.
8359
8360 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8361
8362         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8363
8364 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8365             Bruno Haible  <bruno@clisp.org>
8366
8367         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8368         <sys/types.h> and <inttypes.h>.
8369
8370 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8371
8372         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8373         `__error_t_defined', so argp.h will not typedef the former.
8374
8375 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8376
8377         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8378         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8379         glibc names.  Even if glibc is changed to conform to POSIX, the
8380         traditional names will be available anyway, since regex depends on
8381         the extensions module.  Also, fix a longstanding typo in the
8382         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8383         reported by Emanuele Giaquinta.  Also, change sense of cached
8384         variable, so that the message makes sense.
8385
8386 2006-03-24  Simon Josefsson  <jas@extundo.com>
8387
8388         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8389         including some doc fixes.
8390         (base64_encode_alloc): Fix +1 bug on allocation failures.
8391
8392 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8393
8394         * lib/base64.c (base64_encode): Do not read past end of array with
8395         unsanitized input on systems with CHAR_BIT > 8.
8396
8397 2006-03-24  Eric Blake  <ebb9@byu.net>
8398
8399         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8400
8401 2006-03-22  Karl Berry  <karl@gnu.org>
8402
8403         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8404         * config/srclistvars.sh (COREUTILS): new var.
8405
8406 2006-03-17  Jim Meyering  <jim@meyering.net>
8407
8408         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8409         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8410
8411 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8412
8413         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8414         no longer needs it.  Instead, check that regoff_t is as least
8415         as wide as ptrdiff_t.
8416
8417         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8418         so that our regex.h stays compatible with the installed regex.
8419         This is helpful for installers who configure --without-included-regex.
8420         Problem reported by Emanuele Giaquinta.
8421
8422 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8423
8424         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8425         Typedef to long int, not to off_, as POSIX will likely change
8426         in that direction.
8427
8428 2006-03-15  Eric Blake  <ebb9@byu.net>
8429
8430         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8431
8432 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8433
8434         * lib/argp-help.c (validate_uparams): Fix typo
8435         * lib/argp-parse.c (argp_default_options): Consistently begin help
8436         messages with a lowercase letter.
8437
8438 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8439
8440         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8441         overrun buffers and shouldn't be used (much as gets shouldn't be
8442         used).
8443         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8444
8445 2006-03-08  Simon Josefsson  <jas@extundo.com>
8446
8447         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8448         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8449
8450 2006-03-08  Simon Josefsson  <jas@extundo.com>
8451
8452         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8453         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8454
8455 2006-03-08  Simon Josefsson  <jas@extundo.com>
8456
8457         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8458         signal that configure disabled the device.
8459
8460 2006-03-08  Simon Josefsson  <jas@extundo.com>
8461
8462         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8463         languages.
8464
8465 2006-03-07  Simon Josefsson  <jas@extundo.com>
8466
8467         * modules/getopt (Depends-on): Add unistd.
8468
8469         * modules/unistd: New file.
8470
8471 2006-03-07  Simon Josefsson  <jas@extundo.com>
8472
8473         * modules/gc-random: New file.
8474
8475 2006-03-07  Simon Josefsson  <jas@extundo.com>
8476
8477         * m4/unistd_h.m4: New file.
8478
8479 2006-03-07  Simon Josefsson  <jas@extundo.com>
8480
8481         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8482         test to be side-effect free by storing the result in the cache
8483         variable gl_cv_lib_readline, and moving the assignment of
8484         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8485         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8486
8487 2006-03-07  Simon Josefsson  <jas@extundo.com>
8488
8489         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8490         error on missing devices (the functions will return an error).
8491
8492         * m4/gc.m4: Move random stuff to gc-random.m4
8493
8494 2006-03-07  Simon Josefsson  <jas@extundo.com>
8495
8496         * lib/unistd_.h: New file.
8497
8498 2006-03-07  Simon Josefsson  <jas@extundo.com>
8499
8500         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8501
8502 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8503
8504         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8505         Problem reported by Juan Manuel Guerrero.
8506
8507 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8508
8509         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8510         the unistd module.
8511         * lib/getlogin_r.c: Likewise.
8512         * lib/getlogin_r.h: Likewise.
8513         * lib/glob.c: Likewise.
8514         * lib/pagealign_alloc.c: Likewise.
8515         * lib/unistd_.h: Remove; no longer needed.
8516
8517 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8518
8519         * MODULES.html.sh (Support for systems lacking POSIX:2001):
8520         Add unistd.
8521         * modules/c-stack (Depends-on): Add unistd.
8522         * modules/getlogin_r: Likewise.
8523         * modules/glob: Likewise.
8524         * modules/pagealign_alloc: Likewise.
8525         * modules/unistd (Files): Remove lib/unistd_.h.
8526         (EXTRA_DIST): Remove.
8527         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
8528         need unistd_.h.
8529         (MOSTLYCLEANFILES): Remove unistd.h-t.
8530
8531 2006-03-03  Simon Josefsson  <jas@extundo.com>
8532
8533         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
8534
8535 2006-03-03  Simon Josefsson  <jas@extundo.com>
8536
8537         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
8538         libidn and bison.
8539
8540 2006-03-03  Simon Josefsson  <jas@extundo.com>
8541
8542         * build-aux/maint.mk: Add indent target.
8543
8544 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
8545
8546         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
8547         our replacement poll.h in any case, to avoid a differing
8548         declaration from a system header.  Seen on AIX.
8549
8550 2006-03-01  Simon Josefsson  <jas@extundo.com>
8551
8552         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
8553         <kasal@ucw.cz>.
8554
8555 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8556
8557         * modules/gettime (Depends-on): Add extensions module.
8558         * modules/nanosleep (Depends-on): Likewise.
8559         * modules/settime (Depends-on): Likewise.
8560
8561 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8562
8563         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8564         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8565         pedantically.
8566         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8567         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8568
8569         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8570         not "==".  Reported by Ralf Wildenhues.
8571
8572 2006-03-01  Karl Berry  <karl@gnu.org>
8573
8574         * doc/Copyright/request-*: new files, synced from gnuorg.
8575
8576 2006-03-01  Karl Berry  <karl@gnu.org>
8577
8578         * config/srclist.txt (Copyright/*): new entries.
8579
8580 2006-02-28  Simon Josefsson  <jas@extundo.com>
8581
8582         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8583
8584 2006-02-27  Simon Josefsson  <jas@extundo.com>
8585
8586         * lib/base64.h: Indent #define's.  From Jim Meyering
8587         <jim@meyering.net>.
8588
8589 2006-02-27  Jim Meyering  <jim@meyering.net>
8590
8591         Revert the change of 2006-02-24, so these files can continue
8592         to be sync'd from gettext.
8593         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8594         of `config.h'.
8595
8596 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8597
8598         * modules/intprops: New file.
8599         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8600         Add intprops.
8601         * modules/getloadavg (Files): Remove lib/intprops.h.
8602         (Depends-on): Add intprops.
8603         * modules/human: Likewise.
8604         * modules/inttostr: Likewise.
8605         * modules/openat: Likewise.
8606         * modules/sig2str: Likewise.
8607         * modules/userspec: Likewise.
8608         * modules/utimecmp: Likewise.
8609         * modules/xnanosleep: Likewise.
8610         * modules/xstrtol: Likewise.
8611
8612 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8613
8614         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8615         * modules/lock-tests (TESTS): Use $(EXEEXT).
8616         * modules/tls-tests: Likewise.
8617         * modules/argp-tests: Likewise.
8618         (check_PROGRAMS): New var, replacing...
8619         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8620
8621 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8622
8623         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8624         `config.h'.
8625
8626 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8627
8628         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8629
8630 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8631
8632         Sync from coreutils.
8633         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8634         gl_CHDIR_SAFER.
8635
8636 2006-02-22  Jim Meyering  <jim@meyering.net>
8637
8638         Sync from coreutils.
8639         * m4/chdir-safer.m4: New file.
8640
8641 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8642
8643         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8644         AT_FDCWD exceeds INT_MAX.
8645         * lib/openat.h (AT_FDCWD): Likewise.
8646
8647 2006-02-17  Eric Blake  <address@hidden>
8648
8649         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8650
8651 2006-02-16  Simon Josefsson  <jas@extundo.com>
8652
8653         * modules/getaddrinfo (Depends-on): Add sys_socket.
8654
8655 2006-02-15  Simon Josefsson  <jas@extundo.com>
8656
8657         * build-aux/maint.mk: Add dsyntax-check rule.
8658
8659 2006-02-15  Eric Blake  <ebb9@byu.net>
8660
8661         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8662         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8663         'present but cannot compile' warnings on cygwin.
8664         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8665         use ws2tcpip.h if sys/socket.h works.
8666         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8667         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8668
8669 2006-02-14  Simon Josefsson  <jas@extundo.com>
8670
8671         * modules/maintainer-makefile (Files): Rename.
8672
8673         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8674         and (the local) Makefile.cfg to maint-cfg.mk.
8675
8676         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8677         to the latter.
8678
8679         * modules/maintainer-makefile: New module.
8680
8681         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8682         severaly stripped to make it possible to build it up from scratch
8683         with reliable tests.
8684
8685         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8686         fixes to permit overriding the default actions when configure and
8687         makefile are not available.
8688
8689 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8690
8691         Sync from coreutils.
8692         * modules/lstat (Depends-on): Don't depend on xalloc.
8693         (License): Change from GPL to LGPL, since this is now simply a
8694         replacement for a libc function.
8695
8696 2006-02-14  Jim Meyering  <jim@meyering.net>
8697
8698         Sync from coreutils.
8699
8700         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8701         failure on deficient systems, and simplify gnulib lgpl dependencies.
8702         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8703         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8704
8705         * lib/xalloc-die.c: Remove unused definition of N_.
8706
8707 2006-02-14  Jim Meyering  <jim@meyering.net>
8708
8709         Sync from coreutils.
8710         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8711         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8712         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8713         double-quote uses of that variable, to accommodate the rare case in
8714         which getmntent is available in none of the libraries checked.  This
8715         happens at least on FreeBSD 5.0.
8716
8717 2006-02-13  Simon Josefsson  <jas@extundo.com>
8718
8719         * gnulib-tool (Usage): Fix --import, from
8720         karl@freefriends.org (Karl Berry).
8721
8722 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8723
8724         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8725
8726 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8727
8728         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8729         "autoupdate" on 2005-12-12.
8730
8731 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8732
8733         * modules/closeout (Depends-on): Remove atexit.
8734
8735 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8736
8737         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8738         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8739
8740 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8741
8742         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8743         __EXTENSIONS__ if this causes compilation to fail.  Problem
8744         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8745         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8746
8747 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8748
8749         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8750         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8751         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8752         All uses changed.
8753
8754 2006-01-26  Simon Josefsson  <jas@extundo.com>
8755
8756         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8757         prototype is visible on mingw32.
8758
8759         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8760         for mingw32.
8761
8762         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8763         mingw32).
8764
8765 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8766
8767         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8768         attempt to open for write; this always fails, at least on POSIX
8769         hosts.  This reinstates the 2006-01-09 change, which was
8770         inadvertently removed.
8771
8772 2006-01-26  Bruno Haible  <bruno@clisp.org>
8773
8774         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8775         Reported by Paul Eggert.
8776
8777 2006-01-26  Bruno Haible  <bruno@clisp.org>
8778             Paul Eggert  <eggert@cs.ucla.edu>
8779
8780         * lib/stdbool_.h (_Bool)
8781         [(! (defined __cplusplus || defined __BEOS__)
8782           && !defined __GNUC__
8783           && !(defined __HP_cc || defined __xlc__
8784                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8785                || defined __sgi))]:
8786         #define to signed char in these cases too; this simplifies
8787         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8788         etc., separately) and makes it more conservative.
8789
8790 2006-01-25  Simon Josefsson  <jas@extundo.com>
8791
8792         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8793         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8794         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8795
8796 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8797
8798         * lib/argp-namefrob.h: Bugfix. Remove stray #
8799
8800 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8801
8802         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8803         so that we test the test.
8804         Check for yet another HP-UX cc bug involving *bool |= bool.
8805
8806 2006-01-25  Karl Berry  <karl@gnu.org>
8807
8808         * config/srclist.txt (vasnprintf.c): sync lost.
8809
8810 2006-01-25  Jim Meyering  <jim@meyering.net>
8811
8812         Sync from the stable (b5) branch of coreutils:
8813
8814         * lib/fts.c (fts_children): Don't let close() clobber errno from
8815         failed fchdir().
8816
8817         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8818         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8819         a dangling symlink.  That can also happen at least for ELOOP.
8820         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8821         FYI, this bug predates the inclusion of fts.c in coreutils.
8822
8823         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8824         in their own block, so pre-c99 compilers don't object.
8825
8826         Avoid the double-free (first in fts_read, second in fts_close) that
8827         would occur when an `active' directory is made inaccessible (e.g.,
8828         via chmod a-x) during a traversal.
8829         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8830         before returning.  Reproduce this failure by
8831         mkdir -p a/b; cd a; chmod a-x . b
8832         Reported by Stavros Passas.
8833
8834 2006-01-25  Jim Meyering  <jim@meyering.net>
8835
8836         * lib/fileblocks.c: Remove more useless parentheses.
8837         * lib/readutmp.h: Likewise.
8838
8839 2006-01-25  Bruno Haible  <bruno@clisp.org>
8840
8841         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
8842         warnings.
8843         Reported by Paul Eggert.
8844
8845 2006-01-25  Bruno Haible  <bruno@clisp.org>
8846
8847         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
8848         rid of a trap command. For Solaris sh.
8849         Reported by Mark D. Baushke <mdb@gnu.org>.
8850
8851 2006-01-24  Simon Josefsson  <jas@extundo.com>
8852
8853         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
8854         Bruno.
8855
8856 2006-01-24  Karl Berry  <karl@gnu.org>
8857
8858         * config/srclist.txt (argp-namefrob.h): sync lost.
8859
8860 2006-01-24  Jim Meyering  <jim@meyering.net>
8861
8862         * modules/openat (Files): Add lib/intprops.h.
8863         From Mark D. Baushke.
8864
8865 2006-01-24  Jim Meyering  <jim@meyering.net>
8866
8867         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
8868         Reported by Mark D. Baushke.
8869
8870 2006-01-24  Jim Meyering  <jim@meyering.net>
8871
8872         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
8873
8874 2006-01-24  Bruno Haible  <bruno@clisp.org>
8875
8876         * modules/strnlen (Maintainer): Change from glibc to all.
8877
8878 2006-01-24  Bruno Haible  <bruno@clisp.org>
8879
8880         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
8881         Patch by Paul Eggert.
8882
8883 2006-01-24  Bruno Haible  <bruno@clisp.org>
8884
8885         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
8886         already has it.
8887         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
8888         2005-11-26.
8889
8890         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
8891         'signed char' to avoid problems with the built-in _Bool type.
8892         Reported by Paul Eggert on 2005-11-26.
8893
8894 2006-01-24  Bruno Haible  <bruno@clisp.org>
8895
8896         * gnulib-tool (func_import): Avoid constructing complicated sed
8897         expressions inside backquote.
8898         Report and solution by Mark D. Baushke <mdb@gnu.org>.
8899
8900 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
8901
8902         These changes imported from libc.
8903         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
8904         test and two separate function calls.
8905         * lib/strndup.c (__strndup): Add libc_hidden_def.
8906
8907 2006-01-23  Simon Josefsson  <jas@extundo.com>
8908
8909         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
8910         Remove the test_*_SOURCES variable: automake infers it by default.
8911         * modules/tls-tests: Likewise.
8912
8913 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8914
8915         Work around porting bugs reported by Dieter in
8916         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
8917         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
8918         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
8919         Include "getopt.h" first, to check interface.
8920         (getenv): Declare only if defined HAVE_DECL_GETENV &&
8921         !HAVE_DECL_GETENV.
8922         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
8923         (__strndup): Revert to K&R-style function dfns, the glibc style.
8924         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
8925         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
8926         Include strnlen.h first, to get prototype properly.
8927         (strnlen): Renamed from __strnlen.
8928         Remove weak alias.
8929
8930 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8931
8932         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
8933
8934 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8935
8936         * config/srclist.txt: Adjust to reflect glibc reorganization.
8937         This affects only comments.
8938
8939 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8940
8941          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
8942          Reported by Bruce Korb <bkorb@gnu.org>.
8943
8944 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
8945
8946         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
8947         to pacify gcc -Wswitch-default.
8948
8949 2006-01-22  Bruno Haible  <bruno@clisp.org>
8950
8951         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
8952         temporary buffer for sprintf, take into account the precision also
8953         for 'd', 'i', 'u', 'o', 'x', 'X'.
8954
8955 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8956
8957         * modules/argp-tests: New module
8958         * tests/test-argp.c: New file
8959         * tests/test-argp-2.sh: New file
8960
8961 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8962
8963         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
8964         (__argp_base_name): Removed
8965         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
8966         typo.
8967         (__argp_base_name): Provide macro definition or extern declaration
8968         depending on the configuration
8969
8970 2006-01-20  Simon Josefsson  <jas@extundo.com>
8971
8972         * modules/inet_ntop (Depends-on): Depend on sys_socket.
8973
8974 2006-01-20  Simon Josefsson  <jas@extundo.com>
8975
8976         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
8977
8978 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
8979
8980         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
8981         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
8982         Suggested by Bruno Haible.
8983
8984 2006-01-20  Karl Berry  <karl@gnu.org>
8985
8986         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
8987         until changes propagate, I guess.
8988
8989 2006-01-19  Simon Josefsson  <jas@extundo.com>
8990
8991         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
8992
8993 2006-01-19  Simon Josefsson  <jas@extundo.com>
8994
8995         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
8996
8997 2006-01-19  Simon Josefsson  <jas@extundo.com>
8998
8999         * gnulib-tool: Set check_PROGRAMS.
9000
9001         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9002         modules/des-tests, modules/gc-arcfour-tests,
9003         modules/gc-arctwo-tests, modules/gc-des-tests,
9004         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9005         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9006         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9007         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9008         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9009         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
9010         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
9011         test_*_SOURCES.
9012
9013 2006-01-18  Simon Josefsson  <jas@extundo.com>
9014
9015         * modules/socklen (Depends-on): Depend on sys_socket.
9016
9017 2006-01-18  Simon Josefsson  <jas@extundo.com>
9018
9019         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9020         modules/des-tests, modules/gc-arcfour-tests,
9021         modules/gc-arctwo-tests, modules/gc-des-tests,
9022         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9023         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9024         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9025         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9026         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9027         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
9028         $(EXEEXT) to automake TESTS variable, for mingw32.
9029
9030 2006-01-17  Simon Josefsson  <jas@extundo.com>
9031
9032         * modules/socklen (Include): Need sys/socket.h.
9033
9034 2006-01-17  Bruno Haible  <bruno@clisp.org>
9035
9036         * modules/ssize_t (Include): Add <sys/types.h>.
9037
9038 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
9039
9040         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
9041         it's not portable and it doesn't work with cross-compiles.
9042         Problem reported by Bruno Haible.  Fix missing-$ typo in
9043         'test "gl_cv_ignore_unused_libraries" ...' that prevented
9044         -zignore from being used with Sun's C compiler.
9045
9046 2006-01-12  Simon Josefsson  <jas@extundo.com>
9047
9048         * lib/base64.c: Fix warning, reported by Bruno Haible
9049         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
9050
9051 2006-01-12  Bruno Haible  <bruno@clisp.org>
9052
9053         * modules/ldd: New file.
9054         * build-aux/ldd.sh.in: New file.
9055         * MODULES.html.sh (Support for building libraries and executables): Add
9056         ldd.
9057
9058 2006-01-12  Bruno Haible  <bruno@clisp.org>
9059
9060         * m4/ldd.m4: New file.
9061
9062 2006-01-12  Bruno Haible  <bruno@clisp.org>
9063
9064         * gnulib-tool (func_import, func_create_testdir): Don't go into an
9065         endless loop while replacing $auxdir with build-aux.
9066
9067 2006-01-11  Simon Josefsson  <jas@extundo.com>
9068
9069         * lib/stdint_.h (SIZE_MAX): Add missing (.
9070
9071 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
9072
9073         Sync from coreutils.
9074         * lib/md5.c: Fix commentary typos.
9075         (alignof, UNALIGNED_P): No need for a GCC-specific version.
9076         * lib/md5.h (__attribute__): Remove; unused.
9077         * lib/sha1.c: Fix commentary to match md5 better.
9078         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9079         so that we don't need to worry about alignment.  All uses changed.
9080         This merges the 2005-10-28 md5 change into sha1.
9081
9082 2006-01-11  Jim Meyering  <jim@meyering.net>
9083
9084         Sync from coreutils.
9085         * lib/md5.c (OP): Fix spacing.
9086
9087 2006-01-11  Bruno Haible  <bruno@clisp.org>
9088
9089         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9090         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9091         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9092
9093 2006-01-11  Bruno Haible  <bruno@clisp.org>
9094
9095         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9096         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9097         the "early" section as well.
9098
9099 2006-01-11  Bruno Haible  <bruno@clisp.org>
9100
9101         Avoid "ar: no archive members specified" error on MacOS X.
9102         * gnulib-tool (func_modules_add_dummy): New function.
9103         (func_import, func_create_testdir): Invoke it.
9104
9105 2006-01-11  Bruno Haible  <bruno@clisp.org>
9106
9107         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9108         with $auxdir in AC_CONFIG_FILES statements.
9109
9110 2006-01-11  Bruno Haible  <bruno@clisp.org>
9111
9112         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9113         Initialize also noinst_HEADERS to empty.
9114
9115 2006-01-11  Bruno Haible  <bruno@clisp.org>
9116
9117         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
9118         variables.
9119         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
9120         autoreconf.
9121
9122 2006-01-11  Bruno Haible  <bruno@clisp.org>
9123
9124         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
9125         overridable by the user.
9126         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9127
9128 2006-01-10  Simon Josefsson  <jas@extundo.com>
9129
9130         * modules/sys_socket: New file.
9131
9132 2006-01-10  Simon Josefsson  <jas@extundo.com>
9133
9134         * m4/sys_socket_h.m4: New file.
9135
9136 2006-01-10  Simon Josefsson  <jas@extundo.com>
9137
9138         * lib/socket_.h: New file.
9139
9140 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9141
9142         * modules/readutmp (Maintainer): Add myself.
9143
9144 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9145
9146         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
9147         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
9148         People who are still concerned with buggy memcmp implementations
9149         can invoke gl_FUNC_MEMCMP themselves.
9150
9151 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9152
9153         * lib/regex_internal.h (BITSET_WORD_BITS):
9154         Work around a bug in 64-bit PGC (before version 6.1-2), where the
9155         preprocessor mishandles large unsigned values as if they were signed.
9156         Problem reported by Claudio Fontana in
9157         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
9158
9159 2006-01-10  Jim Meyering  <jim@meyering.net>
9160
9161         Avoid the double-free (first in fts_read, second in fts_close) that
9162         would occur when an `active' directory is made inaccessible (e.g.,
9163         via chmod a-x) during a traversal.
9164         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9165         before returning.  Reproduce this failure by
9166         mkdir -p a/b; cd a; chmod a-x . b
9167         Reported by Stavros Passas.
9168
9169         Sync from coreutils.
9170         * lib/sha1.c: Tweak grammar in a comment.
9171
9172 2006-01-10  Jim Meyering  <jim@meyering.net>
9173
9174         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
9175         Patch by Joerg Sonnenberger.
9176
9177 2006-01-10  Bruno Haible  <bruno@clisp.org>
9178
9179         * modules/readutmp: Depend on module free.
9180         * modules/strtok_r: Depend on module restrict.
9181
9182 2006-01-10  Bruno Haible  <bruno@clisp.org>
9183
9184         * modules/gettext (configure.ac): Add an invocation of
9185         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
9186
9187 2006-01-10  Bruno Haible  <bruno@clisp.org>
9188
9189         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
9190         Reported by Werner Lemberg <wl@gnu.org>.
9191
9192 2006-01-10  Bruno Haible  <bruno@clisp.org>
9193
9194         * lib/localcharset.c: Update from GNU gettext.
9195
9196 2006-01-10  Bruno Haible  <bruno@clisp.org>
9197
9198         * lib/argp.h (__const): Remove macro. Use const instead.
9199         * lib/argp-fmtstream.h (__const): Likewise.
9200         * lib/glob_.h (__const): Remove macro.
9201         * lib/glob-libc.h: Use const instead of __const.
9202
9203 2006-01-10  Bruno Haible  <bruno@clisp.org>
9204
9205         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
9206         variable.
9207         Needed to avoid an automake error regarding the 'gettext' module.
9208
9209 2006-01-09  Simon Josefsson  <jas@extundo.com>
9210
9211         * modules/inet_ntop (Depends-on): Add restrict.
9212
9213 2006-01-09  Simon Josefsson  <jas@extundo.com>
9214
9215         * modules/gc-rijndael-tests (License): Put under LGPL.
9216
9217         * modules/gc-des-tests (License): Likewise.
9218
9219         * modules/gc-arcfour-tests (License): Likewise.
9220
9221         * modules/gc-arctwo-tests (License): Likewise.
9222
9223         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
9224
9225         * modules/gc-hmac-sha1-tests (Files): Likewise.
9226
9227         * modules/gc-hmac-md5-tests (License): Likewise.
9228
9229         * modules/gc-sha1-tests (License): Likewise.
9230
9231         * modules/gc-md5-tests (License): Likewise.
9232
9233         * modules/gc-md4-tests (License): Likewise.
9234
9235         * modules/gc-md2-tests (License): Likewise.
9236
9237         * modules/gc-tests (License): Likewise.
9238
9239         * modules/des-tests (License): Likewise.
9240
9241         * modules/md4-tests (License): Likewise.
9242
9243         * modules/md2-tests (License): Likewise.
9244
9245 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9246
9247         Sync from coreutils:
9248
9249         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
9250         * modules/lib-ignore: New file.
9251         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
9252         chdir-safer.m4, lchmod.m4.
9253         * modules/openat: Add mkdirat.c, openat-priv.h.
9254
9255 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9256
9257         Sync from coreutils.
9258         * m4/lib-ignore.m4: New file.
9259         * m4/lchmod.m4: New file.
9260
9261 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9262
9263         Sync from coreutils.
9264         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
9265         for write access: POSIX says that must fail.
9266         * lib/fts.c (diropen): Likewise.
9267         * lib/save-cwd.c (save_cwd): Likewise.
9268         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
9269         well, for minor improvements on hosts that lack O_DIRECTORY.
9270         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
9271         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
9272         Fall back on chown if open failed with EACCES.
9273
9274         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
9275         Report an error at compile-time if only a 1-second nominal clock
9276         resolution is found.
9277
9278         * lib/lchmod.h: New file.
9279         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
9280         (make_dir_parents): Use lchown rather than chown, and
9281         lchmod rather than chmod.
9282
9283         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
9284         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
9285         "proc" reported by n0dalus.
9286
9287         * lib/mountlist.c: Include <limits.h>.
9288         (dev_from_mount_options)
9289         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
9290         New function.  It no longer assumes "dev=" has the System V meaning
9291         on Linux (since it doesn't).  It also parses "dev=" more carefully.
9292         (read_file_system_list)
9293         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
9294         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
9295         dev= in that case.
9296
9297         * lib/posixtm.h (PDS_PRE_2000): New macro.
9298         * lib/posixtm.c (year): Arg is now syntax_bits rather than
9299         allow_century.  All usages changed.  Reject dates outside the range
9300         1969-1999 if PDS_PRE_2000 is used.
9301
9302 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9303
9304         Sync from coreutils.
9305         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
9306         (Time of day items): Mention the possibility of leap seconds.
9307         Problem reported by Dr. David Alan Gilbert.
9308
9309 2006-01-09  Jim Meyering  <jim@meyering.net>
9310
9311         Sync from coreutils.
9312
9313         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
9314
9315         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
9316
9317         * lib/modechange.c (mode_compile): Reject an invalid mode string
9318         that starts with an octal digit.  From Andreas Gruenbacher.
9319
9320         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
9321         and dup to open_safer and dup_safer, respectively.
9322         (openat_permissive): Fix typo in comment.
9323
9324         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
9325         "gettext.h"; either no longer needed or are guaranteed by openat.h.
9326         (_): Remove; no longer needed.
9327         (openat): Renamed from rpl_openat; no need for rpl_openat
9328         since openat.h renames openat for us.
9329         Replace most of the body with a call to openat_permissive,
9330         to avoid duplicate code.
9331         Port to (probably hypothetical) environments were mode_t is
9332         wider than int.
9333         (openat_permissive): Require mode arg, so that we can check
9334         types better.  Put it just after flags.  Change cwd failure
9335         indicator from pointer-to-bool to pointer-to-errno-value.
9336         All callers changed.
9337         Invoke openat_save_fail and/or openat_restore_fail if
9338         cwd_errno is null, so that openat can call us.
9339         (openat_permissive, fdopendir, fstatat, unlinkat):
9340         Simplify errno handling to avoid some duplicate code,
9341         as it's OK to set errno on success.
9342         * lib/openat.h: Revamp code so that function macros depend on
9343         __OPENAT_PREFIX only, not also on AT_FDCWD.
9344         (openat_ro): Remove.  Caller changed to use openat_permissive.
9345         (openat_permissive): Now a macro, if not a function.
9346         (openat_restore_fail, openat_save_fail): Now always functions,
9347         since mkdirat needs them even if __OPENAT_PREFIX is defined.
9348
9349         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
9350         and openat.c.
9351         * lib/mkdirat.c: Include openat-priv.h.
9352         Remove definitions of macros defined therein.
9353         * lib/openat.c: Likewise.
9354
9355         * lib/mkdirat.c (mkdirat): New file and function.
9356         * lib/openat.h (mkdirat): Declare.
9357
9358         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9359
9360         * lib/openat.h (openat_permissive): Declare.
9361         (openat_ro): Define.
9362
9363         * lib/openat.c (EXPECTED_ERRNO): New macro.
9364         (openat_permissive): New function -- used in remove.c rewrite.
9365         (all functions): Set errno just before returning, only if there
9366         was an actual failure.
9367         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9368
9369         Emulate openat-family functions using Linux's procfs, if possible.
9370         Idea and some code based on Ulrich Drepper's glibc changes.
9371
9372         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9373         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9374         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9375         before falling back on save_cwd and restore_cwd.
9376         (fdopendir, fstatat, unlinkat): Likewise.
9377
9378         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9379         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9380
9381         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9382         as second argument to va_arg.  Otherwise, some versions of gcc
9383         warn that `if this code is reached, the program will abort'.
9384
9385 2006-01-09  Jim Meyering  <jim@meyering.net>
9386
9387         Sync from coreutils.
9388         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9389         Require openat-priv.h.
9390
9391 2006-01-09  Bruno Haible  <bruno@clisp.org>
9392
9393         * modules/strnlen (Include): Use strnlen.h.
9394
9395 2006-01-09  Bruno Haible  <bruno@clisp.org>
9396
9397         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9398
9399 2006-01-09  Bruno Haible  <bruno@clisp.org>
9400
9401         * lib/sysexit_.h (EX_OK): New macro.
9402         Suggested by Martin Lambers <marlam@marlam.de>.
9403
9404 2006-01-09  Bruno Haible  <bruno@clisp.org>
9405
9406         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9407         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9408
9409 2006-01-09  Bruno Haible  <bruno@clisp.org>
9410
9411         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9412         numbers.
9413
9414 2006-01-09  Bruno Haible  <bruno@clisp.org>
9415
9416         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9417         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9418         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9419         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9420
9421 2006-01-09  Bruno Haible  <bruno@clisp.org>
9422
9423         * build-aux/javacomp.sh.in: New file, moved from lib/.
9424         * modules/javacomp-script (Files): Update.
9425         (configure.ac): Add AC_CONFIG_FILES invocation.
9426         (EXTRA_DIST): Remove variable.
9427
9428         * build-aux/javaexec.sh.in: New file, moved from lib/.
9429         * modules/javaexec (Files): Update.
9430         (configure.ac): Add AC_CONFIG_FILES invocation.
9431         (EXTRA_DIST): Remove javaexec.sh.in.
9432
9433         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9434         * modules/csharpcomp-script (Files): Update.
9435         (configure.ac): Add AC_CONFIG_FILES invocation.
9436         (EXTRA_DIST): Remove variable.
9437
9438         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9439         * modules/csharpexec (Files): Update.
9440         (configure.ac): Add AC_CONFIG_FILES invocation.
9441         (EXTRA_DIST): Remove csharpexec.sh.in.
9442
9443 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9444
9445         Sync from coreutils.
9446
9447         Add POSIX ACL support
9448         * lib/acl.h (copy_acl, set_acl): Add declarations.
9449         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9450         systems other than Linux.
9451         (chmod_or_fchmod): New function: use fchmod when possible,
9452         and chmod otherwise.
9453         (file_has_acl): Add a POSIX ACL implementation, with a
9454         Linux-specific subcase.
9455         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9456         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9457         acls are unsupported.
9458         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9459         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9460         are unsupported.
9461
9462 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9463
9464         Sync from coreutils.
9465         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9466
9467 2006-01-07  Bruno Haible  <bruno@clisp.org>
9468
9469         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9470         gl_EARLY.
9471
9472 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9473
9474         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9475         Problem reported for Mingw by Mark Junker.
9476
9477 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9478
9479         * README: Gnulib normally doesn't generate a tarball.
9480
9481 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9482
9483         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9484         long int, not int, for nanosecond counts, so that people who are
9485         used to POSIX struct timespec won't be surprised.  Reported by Jim
9486         Meyering.
9487
9488 2005-12-28  Bruno Haible  <bruno@clisp.org>
9489
9490         * build-aux/config.rpath: Update from GNU gettext.
9491
9492 2005-12-16  Jim Meyering  <jim@meyering.net>
9493
9494         * modules/fprintftime: New module.
9495         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
9496
9497 2005-12-16  Jim Meyering  <jim@meyering.net>
9498
9499         * m4/fprintftime.m4: New file.
9500
9501 2005-12-16  Jim Meyering  <jim@meyering.net>
9502
9503         * lib/fprintftime.c, lib/fprintftime.h: New files.
9504
9505 2005-12-15  Simon Josefsson  <jas@extundo.com>
9506
9507         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9508         new m4/socklen.m4.
9509
9510 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9511
9512         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9513         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9514
9515 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9516
9517         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
9518         * lib/argp-help.c (fill_in_uparams): Check if the constructed
9519         struct uparams is valid. Fall back to the default values if it is
9520         not.
9521
9522 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9523
9524         * modules/argp (Files): Add argp-pin.c
9525         (Depends-on): dirname
9526         (lib_SOURCES): Add argp-pin.c
9527
9528 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9529
9530         * m4/argp.m4:  Check if program_invocation_name and
9531         program_invocation_short_name are declared and define appropriate
9532         macros if they are not.
9533
9534 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9535
9536         * lib/argp-help.c (__argp_base_name): New function
9537         (__argp_short_program_name): Rewrite using __argp_base_name
9538         * lib/argp-namefrob.h: Define program_invocation_name and
9539         program_invocation_short_name if requested
9540         (__argp_base_name): Add prototype
9541         * lib/argp-parse.c (argp_def): Use gettext wrappers
9542         (argp_default_parser): Use __argp_base_name
9543         * lib/argp-pin.c: New file. Defines program_invocation_name and
9544         program_invocation_short_name on systems that lack them.
9545
9546 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9547
9548         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
9549         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9550         porting problem reported by Georg Schwarz in
9551         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9552
9553 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9554
9555         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
9556         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9557         porting problem reported by Georg Schwarz in
9558         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9559
9560 2005-12-05  Bruno Haible  <bruno@clisp.org>
9561
9562         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9563         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9564         Reported by Mark Junker <mjscod@gmx.de>.
9565
9566 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9567
9568         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9569         Use implementation from Albert Chin, with some
9570         comments/corrections by Stepan Kasal and myself.
9571
9572 2005-12-02  Bruno Haible  <bruno@clisp.org>
9573
9574         * gnulib-tool (func_import): Accept GPLed build tool modules when
9575         --lgpl is given.
9576         * modules/csharpcomp-script: New file.
9577         * modules/csharpcomp: Depend on it.
9578         * modules/javacomp-script: New file.
9579         * modules/javacomp: Depend on it.
9580         Suggested by Simon Josefsson.
9581
9582 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9583
9584         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9585         statement, to work around an HP-UX 10.20 compiler bug reported by
9586         Peter O'Gorman.
9587
9588 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9589
9590         * modules/savedir (Depends-on): Add openat.
9591
9592 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9593
9594         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9595         (uintmax_t) [defined uintmax_t]: Do not declare.
9596         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9597         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9598         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9599         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9600         sake of portability to weird hosts that C allows (though we don't
9601         know of any practical examples).
9602
9603         * lib/savedir.h (fdsavedir): New decl.
9604         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9605         contains most of the former guts of savedir.
9606         (savedir): Use savedirstream.
9607         Include "openat.h".
9608
9609 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9610
9611         * modules/obstack (Files): Add m4/ulonglong.m4.
9612         Problem reported by Davide Angelocola.
9613
9614 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9615
9616         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9617         coreutils no longer futzes with rounding modes.
9618
9619 2005-11-14  Jim Meyering  <jim@meyering.net>
9620
9621         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9622         replacement of mkstemp.
9623
9624 2005-11-10  Simon Josefsson  <jas@extundo.com>
9625
9626         * lib/readline.c: Remove EOL.
9627
9628 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9629
9630         * modules/gethrxtime (Depends-on): Add gettime.
9631
9632 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9633
9634         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9635         or gettimeofday; no longer needed.
9636
9637 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9638
9639         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9640         time business.
9641         (gethrxtime) [! (HAVE_NANOUPTIME
9642         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9643         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9644         our own approximation.
9645
9646 2005-11-08  Eric Blake  <ebb9@byu.net>
9647
9648         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9649
9650 2005-11-08  Eric Blake  <ebb9@byu.net>
9651
9652         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9653
9654 2005-11-04  Bruno Haible  <bruno@clisp.org>
9655
9656         * gnulib-tool: Implement --update mode.
9657
9658 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9659
9660         Fix porting problem reported by Theodoros V. Kalamatianos.
9661         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9662         Don't assume that futimes failing means we must fail.
9663
9664 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9665
9666         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9667         variables to suggest the intended function of the PATH_MAX check.
9668
9669 2005-10-30  Kean Johnston  <jkj@sco.com>
9670
9671         Trivial changes to support SCO systems.
9672         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9673         as PATH_MAX.
9674         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9675         where __ptr is null when no I/O is pending.
9676
9677 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9678
9679         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9680         leave errno alone.  Problem reported by Dmitry V. Levin.
9681
9682 2005-10-28  Simon Josefsson  <jas@extundo.com>
9683
9684         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9685         Test more.
9686
9687         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9688
9689         * modules/md2, modules/md2-tests: New files.
9690
9691 2005-10-28  Simon Josefsson  <jas@extundo.com>
9692
9693         * m4/inet_ntop.m4: More tests.
9694
9695         * m4/gc-md2.m4, md2.m4: New file.
9696
9697 2005-10-28  Simon Josefsson  <jas@extundo.com>
9698
9699         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9700         "restrict" keywords, as per POSIX.  Protect the function
9701         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9702         Don't use K&R prototypes.  Check the sprintf return values.
9703         Re-define EAFNOSUPPORT if not present.  Indent.
9704
9705         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9706         suggested by Bruno Haible <bruno@clisp.org>.
9707
9708         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9709
9710         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9711
9712         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9713         libgcrypt).
9714
9715         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9716
9717         * lib/md2.h, lib/md2.c: New files.
9718
9719 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9720
9721         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9722         errno alone.  Problem reported by Frederic Jolliton.
9723
9724 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9725
9726         * modules/verify (License): Change from GPL to LGPL.  This is a
9727         tiny module and there are apparently near-equivalents that are
9728         under the BSD license.
9729
9730 2005-10-24  Simon Josefsson  <jas@extundo.com>
9731
9732         * modules/sha1: Relicense to LGPL.
9733
9734 2005-10-24  Simon Josefsson  <jas@extundo.com>
9735
9736         * lib/md4.h: Shrink buffer size, now that we changed the type.
9737
9738 2005-10-23  Simon Josefsson  <jas@extundo.com>
9739
9740         * gnulib-tool (func_import): Fix --tests-base.
9741
9742 2005-10-22  Simon Josefsson  <jas@extundo.com>
9743
9744         * modules/arcfour (Depends-on): Need stdint.
9745
9746 2005-10-22  Simon Josefsson  <jas@extundo.com>
9747
9748         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9749         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9750
9751 2005-10-22  Simon Josefsson  <jas@extundo.com>
9752
9753         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9754         suggested by Bruno Haible <bruno@clisp.org>.
9755
9756 2005-10-22  Simon Josefsson  <jas@extundo.com>
9757
9758         * lib/crc.h: Include stddef.h, for size_t.
9759
9760 2005-10-22  Simon Josefsson  <jas@extundo.com>
9761
9762         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9763         arcfour_context struct (simplify test vector testing in GNU
9764         Shishi).
9765
9766 2005-10-21  Simon Josefsson  <jas@extundo.com>
9767
9768         * modules/des, modules/des-tests: New files.
9769
9770         * modules/gc-des, modules/gc-des-tests: New files.
9771
9772         * tests/test-des.c, tests/test-gc-des.c: New file.
9773
9774 2005-10-21  Simon Josefsson  <jas@extundo.com>
9775
9776         * modules/arctwo, modules/arctwo-tests: New files.
9777
9778         * tests/test-arctwo.c: New file.
9779
9780         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9781
9782         * tests/test-gc-arctwo.c: New file.
9783
9784 2005-10-21  Simon Josefsson  <jas@extundo.com>
9785
9786         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9787         Bruno Haible <bruno@clisp.org>.
9788
9789         * m4/gc-des.m4: New file.
9790
9791 2005-10-21  Simon Josefsson  <jas@extundo.com>
9792
9793         * m4/arctwo.m4: New file.
9794
9795         * m4/gc-arctwo.m4: New file.
9796
9797 2005-10-21  Simon Josefsson  <jas@extundo.com>
9798
9799         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9800         block.
9801
9802 2005-10-21  Simon Josefsson  <jas@extundo.com>
9803
9804         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9805         <bruno@clisp.org>.
9806
9807         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9808
9809         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9810         Bruno Haible <bruno@clisp.org>.
9811
9812         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9813         <bruno@clisp.org>.
9814
9815 2005-10-21  Simon Josefsson  <jas@extundo.com>
9816
9817         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9818
9819 2005-10-21  Simon Josefsson  <jas@extundo.com>
9820
9821         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9822
9823 2005-10-21  Simon Josefsson  <jas@extundo.com>
9824
9825         * lib/des.h, lib/des.c: New files.
9826
9827         * lib/gc-gnulib.c: Support DES.c
9828
9829 2005-10-21  Simon Josefsson  <jas@extundo.com>
9830
9831         * lib/arctwo.h, lib/arctwo.c: New files.
9832
9833         * lib/gc-gnulib.c: Support ARCTWO.
9834
9835 2005-10-21  Simon Josefsson  <jas@extundo.com>
9836
9837         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
9838         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9839
9840 2005-10-21  Simon Josefsson  <jas@extundo.com>
9841
9842         * gnulib-tool (func_import, func_create_testdir): Define automake
9843         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
9844         Makefile.am snippet),
9845         suggested by Bruno Haible <bruno@clisp.org>.
9846
9847         * modules/gc (Makefile.am): Use it.
9848
9849 2005-10-21  Bruno Haible  <bruno@clisp.org>
9850
9851         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
9852         patch.
9853
9854 2005-10-19  Simon Josefsson  <jas@extundo.com>
9855
9856         * tests/test-gc-rijndael.c: New file.
9857
9858         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
9859
9860 2005-10-19  Simon Josefsson  <jas@extundo.com>
9861
9862         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
9863         interface too.
9864
9865 2005-10-19  Simon Josefsson  <jas@extundo.com>
9866
9867         * tests/test-gc-arcfour.c: New file.
9868
9869         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
9870
9871 2005-10-19  Simon Josefsson  <jas@extundo.com>
9872
9873         * modules/gc-md4, modules/gc-md4-tests: New file.
9874
9875         * tests/test-gc-md4.c: New file.
9876
9877 2005-10-19  Simon Josefsson  <jas@extundo.com>
9878
9879         * m4/gc-md4.m4: New file.
9880
9881 2005-10-19  Simon Josefsson  <jas@extundo.com>
9882
9883         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
9884         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
9885         <kasal@ucw.cz>.
9886
9887 2005-10-19  Simon Josefsson  <jas@extundo.com>
9888
9889         * m4/gc-arcfour.m4: New file.
9890
9891         * m4/gc-rijndael.m4: New file.
9892
9893 2005-10-19  Simon Josefsson  <jas@extundo.com>
9894
9895         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
9896
9897 2005-10-19  Simon Josefsson  <jas@extundo.com>
9898
9899         * lib/gc-gnulib.c: Support ARCFOUR.
9900
9901 2005-10-19  Simon Josefsson  <jas@extundo.com>
9902
9903         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
9904         support.
9905
9906         * lib/gc.h: Add ECB enum type.
9907
9908         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
9909
9910 2005-10-18  Simon Josefsson  <jas@extundo.com>
9911
9912         * tests/test-md5.c: New file.
9913
9914         * modules/md5-tests: New file.
9915
9916 2005-10-18  Simon Josefsson  <jas@extundo.com>
9917
9918         * tests/test-md4.c: New file.
9919
9920         * modules/md4, modules/md4-tests: New files.
9921
9922 2005-10-18  Simon Josefsson  <jas@extundo.com>
9923
9924         * m4/md4.m4: New file.
9925
9926 2005-10-18  Simon Josefsson  <jas@extundo.com>
9927
9928         * lib/md4.h, lib/md4.c: New files, based on md5.?.
9929
9930 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
9931
9932         * gnulib-tool (func_create_testdir): Omit the second check whether
9933         BUILT_SOURCES in nonempty.
9934
9935 2005-10-17  Simon Josefsson  <jas@extundo.com>
9936
9937         * tests/test-rijndael.c: New file.
9938
9939 2005-10-17  Simon Josefsson  <jas@extundo.com>
9940
9941         * modules/sha1: Depend on stdint instead of md5.
9942
9943         * modules/md5: Depend on stdint, remove uint32_t.
9944
9945 2005-10-17  Simon Josefsson  <jas@extundo.com>
9946
9947         * modules/gc-sha1-tests: New file.
9948
9949         * tests/test-gc-sha1.c: New file.
9950
9951 2005-10-17  Simon Josefsson  <jas@extundo.com>
9952
9953         * m4/md5.m4: Remove call to uint32_t.m4.
9954
9955 2005-10-17  Simon Josefsson  <jas@extundo.com>
9956
9957         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
9958
9959         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
9960         md5.h.
9961
9962         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
9963
9964         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
9965
9966 2005-10-17  Simon Josefsson  <jas@extundo.com>
9967
9968         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
9969
9970 2005-10-17  Simon Josefsson  <jas@extundo.com>
9971
9972         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
9973
9974 2005-10-17  Simon Josefsson  <jas@extundo.com>
9975
9976         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
9977
9978         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
9979
9980 2005-10-17  Bruno Haible  <bruno@clisp.org>
9981
9982         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
9983         that it can also be used in a test.
9984
9985 2005-10-16  Bruno Haible  <bruno@clisp.org>
9986
9987         * gnulib-tool (func_emit_tests_Makefile_am): Also define
9988         TESTS_ENVIRONMENT, so that individual tests can augment it.
9989
9990         * gnulib-tool (func_create_testdir): Use an intermediate target for
9991         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
9992         macros, like $(ALLOCA_H), which cannot be passed through the command
9993         line.
9994
9995 2005-10-15  Simon Josefsson  <jas@extundo.com>
9996
9997         * modules/rijndael-tests: New file.
9998
9999         * modules/rijndael: New file.
10000
10001 2005-10-15  Simon Josefsson  <jas@extundo.com>
10002
10003         * m4/rijndael.m4: New file.
10004
10005 2005-10-15  Simon Josefsson  <jas@extundo.com>
10006
10007         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
10008
10009         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
10010
10011 2005-10-14  Simon Josefsson  <jas@extundo.com>
10012
10013         * tests/test-arcfour.c: New file.
10014
10015         * modules/arcfour, modules/arcfour-tests: New files.
10016
10017 2005-10-14  Simon Josefsson  <jas@extundo.com>
10018
10019         * m4/arcfour.m4: New file.
10020
10021 2005-10-14  Simon Josefsson  <jas@extundo.com>
10022
10023         * lib/arcfour.h, lib/arcfour.c: New files.
10024
10025 2005-10-14  Roland McGrath  <roland@redhat.com>
10026
10027         Import from libc.  [BZ #1331]
10028         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
10029         macro argument.
10030         Reported by Matej Vela <vela@debian.org>.
10031
10032 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10033
10034         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
10035         include <wchar.h>; no longer needed.
10036
10037 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10038
10039         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
10040
10041 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
10042         and  Ulrich Drepper  <drepper@redhat.com>
10043
10044         Import from libc.
10045         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
10046         instead of inline stream orientation test and two separate
10047         function calls.  Pay no attention to USE_IN_LIBIO.
10048
10049 2005-10-13  Simon Josefsson  <jas@extundo.com>
10050
10051         * modules/gc-hmac-md5-tests: New file.
10052
10053         * tests/test-gc-hmac-sha1.c: New file.
10054
10055         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
10056
10057         * modules/gc-hmac-md5-tests: New file.
10058
10059         * tests/test-gc-md5.c: New file.
10060
10061         * modules/gc-md5-tests: New file.
10062
10063 2005-10-13  Simon Josefsson  <jas@extundo.com>
10064
10065         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
10066         Move memory allocation outside of loop.
10067
10068 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
10069
10070         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
10071         intermediate directory is in a read-only file system.  Problem
10072         reported by Eric Blake.
10073
10074 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
10075
10076         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10077
10078 2005-10-12  Simon Josefsson  <jas@extundo.com>
10079
10080         * tests/test-hmac-sha1.c: New file.
10081
10082         * modules/hmac-sha1-tests: New file.
10083
10084         * modules/hmac-sha1: New file.
10085
10086 2005-10-12  Simon Josefsson  <jas@extundo.com>
10087
10088         * modules/gc-sha1: New file.
10089
10090 2005-10-12  Simon Josefsson  <jas@extundo.com>
10091
10092         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10093
10094         * tests/test-gc-pbkdf2-sha1.c: New file.
10095
10096 2005-10-12  Simon Josefsson  <jas@extundo.com>
10097
10098         * modules/gc-md5, modules/gc-hmac-md5: New files.
10099
10100         * modules/gc (Files): Remove md5, memxor and hmac files.
10101
10102 2005-10-12  Simon Josefsson  <jas@extundo.com>
10103
10104         * m4/gc-pbkdf2-sha1.m4: New file.
10105
10106         * m4/gc-hmac-sha1.m4: New file.
10107
10108         * m4/gc-sha1: New file.
10109
10110         * m4/hmac-sha1.m4: New file.
10111
10112 2005-10-12  Simon Josefsson  <jas@extundo.com>
10113
10114         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10115
10116         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
10117
10118 2005-10-12  Simon Josefsson  <jas@extundo.com>
10119
10120         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
10121         suggested by Bruno Haible <bruno@clisp.org>.
10122
10123 2005-10-12  Simon Josefsson  <jas@extundo.com>
10124
10125         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
10126
10127 2005-10-12  Simon Josefsson  <jas@extundo.com>
10128
10129         * lib/gc-pbkdf2-sha1.c: New file.
10130
10131         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
10132
10133 2005-10-12  Simon Josefsson  <jas@extundo.com>
10134
10135         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
10136
10137         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
10138
10139 2005-10-12  Simon Josefsson  <jas@extundo.com>
10140
10141         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
10142         GC_USE_HMAC_MD5, respectively.
10143
10144         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
10145         (gc_md5): Fix typo.
10146
10147         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
10148
10149         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
10150
10151         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
10152
10153 2005-10-12  Bruno Haible  <bruno@clisp.org>
10154
10155         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
10156         Reported by Stepan Kasal <kasal@ucw.cz>.
10157
10158 2005-10-11  Simon Josefsson  <jas@extundo.com>
10159
10160         * tests/test-crc.c: New file.
10161
10162         * modules/crc, modules/crc-tests: New files.
10163
10164 2005-10-11  Simon Josefsson  <jas@extundo.com>
10165
10166         * m4/crc.m4: New file.
10167
10168 2005-10-11  Simon Josefsson  <jas@extundo.com>
10169
10170         * lib/gc.h: Add gc_hash and gc_hash_buffer.
10171
10172         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
10173
10174         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
10175
10176 2005-10-11  Simon Josefsson  <jas@extundo.com>
10177
10178         * lib/crc.h, lib/crc.c: New files.
10179
10180         * lib/gc.h (gc_hash_buffer): Add doc.
10181
10182 2005-10-11  Bruno Haible  <bruno@clisp.org>
10183
10184         * modules/c-strcasestr: New file.
10185         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
10186
10187 2005-10-11  Bruno Haible  <bruno@clisp.org>
10188
10189         * modules/c-strcase: New file.
10190         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
10191
10192 2005-10-11  Bruno Haible  <bruno@clisp.org>
10193
10194         * lib/strcasecmp.c: Include limits.h.
10195         (strcasecmp): Avoid integer overflow on exotic platforms.
10196         * lib/strncasecmp.c: Include limits.h.
10197         (strncasecmp): Avoid integer overflow on exotic platforms.
10198         Reported by Paul Eggert.
10199
10200 2005-10-11  Bruno Haible  <bruno@clisp.org>
10201
10202         * lib/c-strcasestr.h: New file, from GNU gettext.
10203         * lib/c-strcasestr.c: New file, from GNU gettext.
10204
10205 2005-10-11  Bruno Haible  <bruno@clisp.org>
10206
10207         * lib/c-strcase.h: New file, from GNU gettext.
10208         * lib/c-strcasecmp.c: New file, from GNU gettext.
10209         * lib/c-strncasecmp.c: New file, from GNU gettext.
10210
10211 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10212
10213         * modules/mempcpy (License): GPL -> LGPL.
10214         * modules/strchrnul (License): Likewise.
10215         * modules/sysexits (License): Likewise.
10216
10217 2005-10-08  Simon Josefsson  <jas@extundo.com>
10218
10219         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
10220
10221 2005-10-07  Simon Josefsson  <jas@extundo.com>
10222
10223         * m4/memxor.m4: Remove gl_C_RESTRICT call.
10224
10225 2005-10-06  Simon Josefsson  <jas@extundo.com>
10226
10227         * tests/test-hmac-md5.c: New file.
10228
10229         * modules/hmac-md5-tests: New file.
10230
10231         * modules/hmac-md5: New file.
10232
10233 2005-10-06  Simon Josefsson  <jas@extundo.com>
10234
10235         * m4/hmac-md5.m4: New file.
10236
10237         * m4/memxor.m4: Require gl_C_RESTRICT.
10238
10239 2005-10-06  Simon Josefsson  <jas@extundo.com>
10240
10241         * lib/memxor.c (memxor): Avoid casts and warnings.
10242
10243 2005-10-06  Simon Josefsson  <jas@extundo.com>
10244
10245         * lib/hmac-md5.c: New file.
10246
10247         * lib/hmac.h: New file.
10248
10249 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10250
10251         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
10252         promotes to int, not unsigned int, to catch the AIX 5.3
10253         compiler bug.
10254
10255 2005-10-05  Simon Josefsson  <jas@extundo.com>
10256
10257         * modules/memxor: New file.
10258
10259         * modules/iconv (Files): Move config.rpath to havelib, it is used
10260         there.
10261
10262         * modules/havelib (Files): Add config.rpath.
10263
10264 2005-10-05  Simon Josefsson  <jas@extundo.com>
10265
10266         * m4/memxor.m4: New file.
10267
10268 2005-10-05  Simon Josefsson  <jas@extundo.com>
10269
10270         * lib/memxor.c (memxor): Fix compiler error.
10271
10272         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
10273         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
10274
10275         * lib/memxor.h, lib/memxor.c: New files.
10276
10277         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
10278         we assume all systems have it, suggested by Jim Meyering
10279         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
10280         any systems lack sys/socket.h; mingw32 is known to lack it, but we
10281         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
10282         same reasons.
10283
10284 2005-10-05  Simon Josefsson  <jas@extundo.com>
10285
10286         * config/srclist.txt: Add glibc bug 1423 for md5.h.
10287
10288 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10289
10290         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
10291         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
10292         needed, since the source code now assumes these .h files.
10293
10294 2005-10-05  Derek Price  <derek@ximbiot.com>
10295
10296         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
10297
10298 2005-10-05  Bruno Haible  <bruno@clisp.org>
10299
10300         * modules/stdint (License): Change to LGPL.
10301
10302 2005-10-04  Simon Josefsson  <jas@extundo.com>
10303
10304         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
10305         D. Baushke" <mdb@gnu.org>.
10306
10307 2005-10-04  Bruno Haible  <bruno@clisp.org>
10308
10309         * lib/verify.h (verify_true): Provide alternative definition for C++.
10310
10311 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
10312
10313         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
10314         (SSIZE_MAX): New macro, if not already defined.
10315         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
10316         than 2 GiB.
10317
10318 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10319
10320         Sync from coreutils.
10321         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
10322         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
10323         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
10324         ULLONG_MAX doesn't work with 2.7.2.1.
10325
10326 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10327
10328         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
10329         From Ben Pfaff.
10330
10331         * modules/exclude (Depends-on): Depend on verify.
10332         * modules/strtoimax (Depends-on): Likewise.
10333         * modules/utimecmp (Depends-on): Likewise.
10334
10335 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10336
10337         * lib/exclude.c: Include verify.h.
10338         (verify): Remove.  All callers changed to use verify.h's version.
10339         * lib/strtoimax.c: Likewise.
10340         * lib/utimecmp.c: Likewis.e
10341
10342         Sync from coreutils.
10343         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
10344         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
10345         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
10346         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
10347         bother returning ENOSYS if settimeofday or stime fails; just let
10348         them return whatever errno they want to return.
10349         * lib/utimens.c: Include unistd.h, for dup2.
10350         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10351         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10352
10353 2005-10-02  Jim Meyering  <jim@meyering.net>
10354
10355         Sync from coreutils.
10356         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10357         from glibc-2.2.5 that fails for read-only files.
10358
10359 2005-10-02  Jim Meyering  <jim@meyering.net>
10360
10361         Sync from coreutils.
10362         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10363         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10364         `#if HAVE_CONFIG_H'.
10365         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10366         Remove AT_FDCWD test.
10367         Do not consume the fd unless successful.
10368         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10369         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10370         block, so that we don't even try to compile it if settimeofday is
10371         available.  This works around a compilation failure on OSF1 V5.1,
10372         due to stime requiring a `long int*' while tv_sec is `int'.
10373
10374 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10375
10376         Sync from coreutils.
10377         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10378         against `yes', rather than just testing for nonempty.
10379
10380 2005-10-01  Simon Josefsson  <jas@extundo.com>
10381
10382         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10383         and Darwin.
10384
10385         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10386         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10387         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10388         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10389         Check if struct addrinfo is declared.
10390
10391 2005-10-01  Simon Josefsson  <jas@extundo.com>
10392
10393         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10394         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10395         AI_* and EAI_* definitions.  Protect function declarations.
10396
10397 2005-10-01  Jim Meyering  <jim@meyering.net>
10398
10399         Sync from coreutils.
10400
10401         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10402         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10403         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10404         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10405         in the inet and nsl libraries.  Required on Solaris 5.7.
10406
10407 2005-10-01  Jim Meyering  <jim@meyering.net>
10408
10409         Sync from coreutils.
10410         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10411         in the inet and nsl libraries.  Required on Solaris 5.7.
10412
10413 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10414
10415         * lib/getdelim.c (getdelim): Remove unused variables.
10416
10417 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10418
10419         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10420         so that the code works even with ancient cpp.  Portability problem
10421         with GCC 2.7.2.1 reported by Thomas M.Ott.
10422
10423 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10424
10425         * modules/regex (Depends-on): Add strcase.
10426
10427         * modules/gethostname (Licence): Change from GPL to LGPL, since
10428         gethostname.c is a trivial implementation of a standard library
10429         function.
10430         * modules/poll (License): Change from GPL to LGPL, since it's
10431         derived from LGPL code.
10432
10433 2005-09-27  Jim Meyering  <jim@meyering.net>
10434
10435         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10436         HAVE_CONFIG_H.
10437
10438         * lib/intprops.h (signed_type_or_expr__): Define.
10439         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10440         for unsigned types.
10441
10442 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10443
10444         * lib/verify.h (verify_expr): Remove, replacing with:
10445         (verify_true): New macro that returns true instead of void.
10446         (verify_type__): Remove.
10447         (verify): Use verify_true rather than verify_type__.
10448
10449 2005-09-26  Bruno Haible  <bruno@clisp.org>
10450
10451         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10452         is necessary.
10453         (lib_SOURCES): Remove mbchar.c.
10454         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10455         (Files): Add m4/mbrtowc.m4.
10456         * modules/mbiter: Likewise.
10457         * modules/mbuiter: Likewise.
10458
10459 2005-09-26  Bruno Haible  <bruno@clisp.org>
10460
10461         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10462         compile mbchar.c if they are not both present.
10463         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10464         * m4/mbiter.m4 (gl_MBITER): Likewise.
10465         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10466         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10467         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10468
10469 2005-09-25  Jim Meyering  <jim@meyering.net>
10470
10471         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10472         also uses socklen_t.
10473
10474 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10475
10476         * lib/utimens.c (ENOSYS): Define if not already defined.
10477         (futimens): Support having a null PATH if the file descriptor
10478         is nonnegative.
10479
10480         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10481         Remove.
10482         (__attribute): Define to empty unless GCC 3.1 or later.
10483         This works around a core dump on OpenBSD 3.4, which has GCC
10484         2.95.3, which dumps core when given __attribute__(()).  It also
10485         simplifies other tests, since we really don't want to bother with
10486         worrying about which ancient version of GCC supported what.
10487         Original problem reported by Yoann Vandoorselaere, with part of
10488         the fix suggested by Derek Price.
10489
10490 2005-09-24  Jim Meyering  <jim@meyering.net>
10491
10492         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
10493         so we can once again use a positive bitfield width of 1 -- now we
10494         don't have to explain why we were using a bitfield width of 2.
10495
10496 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10497
10498         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10499         and similarly for the other external symbols.  Problem reported
10500         by James Gallager.
10501
10502         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10503         bug reported by Jim Meyering.
10504
10505         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10506         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10507         not needed, since socklen is a prerequisite module.
10508
10509 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10510
10511         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10512         Problem reported by Eric Blake.
10513         (getaddrinfo): Initialize se so that it's not garbage.
10514         Redo internal storage allocation so that it doesn't make unportable
10515         assumptions about alignment.
10516         Fix a memory leak.
10517
10518         * lib/utimens.c (futimens): Use futimesat if available.
10519         Prefer it to futimes since it doesn't have the futimes bug.
10520
10521         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
10522         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
10523         Instead, declare a function that returns a pointer to an array,
10524         and use verify_type__ to declare the size of the array.
10525         Problem and germ of a solution reported by Bruno Haible.
10526         (verify_type__): Use 2, not 1, for bitfield size, to avoid
10527         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
10528
10529 2005-09-23  Jim Meyering  <jim@meyering.net>
10530
10531         Sync from coreutils.
10532         Correct build failure (socklen_t not defined) on at least
10533         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
10534         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
10535
10536 2005-09-23  Jim Meyering  <jim@meyering.net>
10537
10538         * modules/getaddrinfo (Depends-on): Add socklen.
10539
10540 2005-09-23  Bruno Haible  <bruno@clisp.org>
10541
10542         * tests/test-verify.c: New file.
10543
10544 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10545
10546         Sync from coreutils.
10547
10548         * modules/argmatch (Depends-on): Add verify.
10549         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
10550         unistd-safer.
10551         * modules/save-cwd (Depends-on): Likewise.
10552
10553         * modules/openat (Files): Add lib/openat-die.c.
10554         (Depends-on): Remove error, exitfail.
10555         Add dirname.
10556
10557         * modules/verify: New file.
10558         * MODULES.html.sh (Diagnostics <assert.h>): New section,
10559         with "verify" module.
10560
10561 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10562
10563         Sync from coreutils.
10564
10565         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10566         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10567         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10568         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10569         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10570         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10571         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10572         Don't bother checking for string.h, stdlib.h, unistd.h.
10573         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10574         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10575         module's job.
10576         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10577         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10578
10579         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10580         (gl_GETDATE): Use it.
10581
10582         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10583
10584 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10585
10586         Sync from coreutils.
10587
10588         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10589         stat-time.h.
10590         * lib/argmatch.h: Include verify.h
10591         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10592         (ARGMATCH_ASSERT): Remove; unused.
10593         * lib/canonicalize.c: Assume STDC_HEADERS.
10594         * lib/exclude.c: Include "strcase.h".
10595         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10596         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10597         and stdio-safer.h.
10598         (getusershell): Call fopen, not fopen_safer.
10599         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10600         Do not include unistd-safer.h.
10601         (save_cwd): Don't call fd_safer; no longer needed
10602         now that we include fcntl--.h.
10603
10604         * lib/getdate.y (relative_time): New type.
10605         (RELATIVE_TIME_0): New constant.
10606         (parser_control): Use relative_time instead of doing it ourselves.
10607         (%union): Add new relative_time rel member.
10608         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10609         Now typeless.
10610         (relunit, relunit_snumber): Now of type rel.
10611         (zone, rel, relunit, get_date): Adjust to above changes.
10612
10613         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10614         Do not include unistd-safer.h.
10615         (getloadavg): Don't call fd_safer; no longer needed
10616         now that we include fcntl--.h.
10617
10618         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10619         (make_dir_parents): Treat ENOSYS like EEXIST.
10620
10621         Improve quality of diagnostics on restore_cwd failure.
10622         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10623         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10624         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10625         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10626         each time through the loop.  Do not diagnose restore_cwd failure;
10627         that is the caller's job (and perhaps the caller does not care).
10628
10629         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10630         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10631         If the file already exists but is not a directory, don't bother
10632         to try to make its parents.
10633         Close potential file descriptor leak if we can't chdir("/") (!).
10634         Don't always return true if chdir($PWD) fails; return true only
10635         if the requested action was done successfully (except for the
10636         chdir($PWD)).
10637         Don't log final directory unless we actually made it.
10638         Refactor to avoid duplicate code to fix up permissions.
10639         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10640
10641         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10642         to make it a bit faster and (I hope) clearer.
10643         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10644         Fix bug in formats like %2N.
10645
10646         * lib/verify.h: New file.
10647
10648 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10649
10650         Sync from coreutils.
10651         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10652
10653 2005-09-22  Jim Meyering  <jim@meyering.net>
10654
10655         Sync from coreutils.
10656
10657         * m4/lstat.m4 (gl_FUNC_LSTAT):
10658         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10659         Remove obsolete comment.
10660         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10661         * m4/xstrtod.m4: Likewise.
10662
10663         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10664
10665 2005-09-22  Jim Meyering  <jim@meyering.net>
10666
10667         Sync from coreutils.
10668
10669         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10670
10671         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10672         the .tm_year member, since otherwise gcc-4.0 would now warn about
10673         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10674
10675         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10676         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10677
10678         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10679         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10680         when run in a time zone for which daylight savings time is in effect
10681         for the starting date.
10682
10683         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10684         stop us from restricting permissions of just-created absolute-named
10685         directories.
10686         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10687         to restore initial working directory.
10688         * lib/mkdir-p.c (make_dir_parents): New parameter:
10689         different_working_dir, to tell caller if/when we change the working
10690         directory and are unable to return to the initial one.
10691         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10692         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10693         `return false'.  This fixes a bug introduced on 2004-07-30.
10694
10695         * lib/openat.c (fdopendir): Be sure to close the supplied
10696         file descriptor before returning.  This makes our replacement
10697         implementation a little closer to Solaris's, where fdopendir
10698         ties the file descriptor to the returned DIR* pointer.
10699         * lib/openat.c (unlinkat): New function.
10700         * lib/openat.h (unlinkat): Add prototype.
10701         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10702         (openat_restore_fail): Rename from openat_restore_die.
10703         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10704
10705         Provide an alternative to exiting immediately upon save_cwd or
10706         restore_cwd failure.  Now, an application can arrange e.g.,
10707         to perform a longjump in that case.
10708         * lib/openat.c: Include dirname.h.
10709         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10710         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10711         and openat_restore_die rather than calling error directly.
10712         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10713
10714         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10715         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10716         define.
10717
10718         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10719         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10720                             int utc, int nanoseconds);
10721         Background:
10722         date should not have to allocate a megabyte of virtual memory to
10723         handle a format argument like +%1048575T.  When implemented with
10724         strftime, it must allocate such a buffer, use strftime to fill it
10725         in, print it, then free it.
10726         With fprintftime, it simply prints everything and exits.
10727         With no need for memory allocation, that's one fewer way to fail.
10728         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10729         optional field width, not before, so we accept %9:z, not %:9z.
10730         (my_strftime): Be sure to use L_('x') for literals.
10731
10732         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10733         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10734         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10735         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10736         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10737         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10738         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10739         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10740         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10741         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10742         * lib/xgethostname.c, lib/xreadlink.c:
10743         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10744
10745         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10746         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10747         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10748         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10749         and don't include <sys/file.h>).
10750
10751 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10752
10753         Sync from coreutils.
10754
10755         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10756         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10757         [!LDAV_DONE]: Avoid unused variable warning.
10758
10759 2005-09-21  Bruno Haible  <bruno@clisp.org>
10760
10761         * lib/unicodeio.h (unicode_to_mb): New declaration.
10762
10763 2005-09-20  Derek Price  <derek@ximbiot.com>
10764
10765         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10766         getaddrinfo.h.
10767
10768 2005-09-20  Bruno Haible  <bruno@clisp.org>
10769
10770         * gnulib-tool: Remove trailing slashes from the values specified for
10771         --source-base, --m4-base, --tests-base, --aux-dir.
10772         Suggested by Simon Josefsson <jas@extundo.com>.
10773
10774 2005-09-20  Bruno Haible  <bruno@clisp.org>
10775
10776         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10777         func_modules_to_filelist, func_import, func_create_testdir): Make all
10778         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10779         change when gnulib-tool is invoked in a different locale.
10780
10781 2005-09-19  Simon Josefsson  <jas@extundo.com>
10782
10783         * m4/socklen.m4: Fix typo.
10784
10785 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10786
10787         Use a consistent style for including <config.h>.
10788         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10789         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10790         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10791         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10792         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10793         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10794         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10795         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10796         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10797         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10798         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10799         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10800         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10801         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10802         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10803         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10804         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10805         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10806         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10807         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10808         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10809         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10810         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10811         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10812         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10813         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10814         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10815         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10816         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10817         lib/xstrtoumax.c, lib/yesno.c:
10818         Standardize inclusion of config.h.
10819         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10820         lib/inttostr.h:  Removed inclusion of config.h from header files.
10821         * lib/inttostr.c:  Adjusted in-tree users.
10822         * lib/timespec.h: Remove superfluous warning to include config.h.
10823         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10824         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10825         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10826         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10827         config.h with HAVE_CONFIG_H.
10828
10829 2005-09-19  Jim Meyering  <jim@meyering.net>
10830
10831         * modules/pathmax (License): Change to LGPL.
10832
10833 2005-09-19  Derek Price  <derek@ximbiot.com>
10834
10835         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
10836
10837 2005-09-19  Bruno Haible  <bruno@clisp.org>
10838
10839         * gnulib-tool (import): Provide default for --tests-base.
10840
10841 2005-09-19  Bruno Haible  <bruno@clisp.org>
10842
10843         * doc/quote.texi: New file, extracted from gnulib.texi.
10844         * doc/ctime.texi: New file, extracted from gnulib.texi.
10845         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
10846         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
10847         * doc/gnulib.texi: Include them.
10848
10849 2005-09-18  Bruno Haible  <bruno@clisp.org>
10850
10851         Portability fix.
10852         * gnulib-tool (func_readlink): New function.
10853         (func_ln_if_changed): Use it.
10854
10855 2005-09-18  Bruno Haible  <bruno@clisp.org>
10856
10857         * gnulib-tool: Support --with-tests also with --import.
10858         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
10859         (func_import): Use variables $testsbase and $inctests. Emit a
10860         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
10861         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
10862         SUBDIRS += $testsdir.
10863         (func_create_testdir): Update.
10864
10865 2005-09-18  Bruno Haible  <bruno@clisp.org>
10866
10867         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
10868         instead of $dry_run.
10869         (func_cp_if_changed, func_mv_if_changed): Remove functions.
10870         (func_ln_if_changed): Don't handle dry-run here.
10871         (func_import): In dry-run mode, detect more precisely which actions
10872         would be performed, and don't use "...ing" verbs.
10873
10874 2005-09-18  Bruno Haible  <bruno@clisp.org>
10875
10876         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
10877         (func_import): Use join on two temporary files instead of three nested
10878         loops, in order to determine which files are new or old.
10879
10880 2005-09-18  Bruno Haible  <bruno@clisp.org>
10881
10882         * gnulib-tool (func_import): Comment out code that spits out the
10883         new files with --dry-run.
10884
10885 2005-09-18  Bruno Haible  <bruno@clisp.org>
10886
10887         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
10888
10889 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10890
10891         * lib/stat-time.h: New file.
10892         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
10893         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
10894         in a different way.
10895         (timespec_cmp): New function.
10896         * lib/utimecmp.c: Include stat-time.h.
10897         (SYSCALL_RESOLUTION): Depend on whether various struct stat
10898         members exist, not on the obsolescent ST_MTIM_NSEC.
10899         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
10900
10901 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10902
10903         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
10904
10905 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10906
10907         * MODULES.html.sh (File system functions): Add stat-time.
10908         * modules/stat-time: New file.
10909         * modules/timespec (Files): Remove m4/st_mtim.m4; this
10910         is now done in a different way, by the stat-time module.
10911         * modules/utimecmp (Depends-on): Add stat-time.
10912
10913 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10914
10915         * m4/st_mtim.m4: Remove.  Superseded by...
10916         * m4/stat-time.m4: New file.
10917         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
10918         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
10919
10920 2005-09-15  Derek Price  <derek@ximbiot.com>
10921
10922         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
10923
10924 2005-09-15  Derek Price  <derek@ximbiot.com>
10925
10926         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
10927         * lib/regex_internal.c: Ditto, using this...
10928         (__GNUC_PREREQ): ...new macro.
10929         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
10930         using...
10931         (__GNUC_PREREQ): ...this new macro.
10932
10933         * lib/strstr.h: Include string.h. Define strstr as a macro here.
10934
10935 2005-09-15  Derek Price  <derek@ximbiot.com>
10936             Paul Eggert  <eggert@cs.ucla.edu>
10937
10938         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
10939         changes, consolidating in...
10940         * lib/regex_internal.h: ...this file.
10941
10942 2005-09-13  Jim Meyering  <jim@meyering.net>
10943
10944         * lib/canon-host.c: Filter through gnu indent and reword comments
10945         slightly.
10946         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
10947
10948 2005-09-13  Derek Price  <derek@ximbiot.com>
10949
10950         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
10951         failure.
10952         Reported by Jim Meyering  <jim@meyering.net>.
10953
10954 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10955
10956         * lib/base64.c: Typo.
10957         (base64_encode): Put b64str in initialized data section.
10958
10959 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
10960
10961         Merge glibc and coreutils changes into gnulib, plus a few
10962         extra fixes.
10963         * lib/md5.c: Use #error rather than a string.
10964         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
10965         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
10966         (__attribute__): Define to empty for non recent-GCC.
10967         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
10968         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
10969         Renamed from their non-__ counterparts, with new macros replacing
10970         them if not _LIBC.  Add __THROW attribute.
10971         (rol): Remove.
10972         (struct md5_ctx): Align buffer if using GCC.
10973         * lib/sha1.h (struct sha1_ctx): Likewise.
10974         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
10975         The old name was backwards.
10976         (NOTSWAP): Remove; not used.
10977         (rol): New macro, moved here from md5.h.
10978         (sha1_process_block): Remove a FIXME that doesn't make sense.
10979
10980 2005-09-12  Derek Price  <derek@ximbiot.com>
10981
10982         Return usable errors from canon-host.
10983         * lib/canon-host.h: New file.
10984         * lib/canon-host.c (canon_host): Wrap...
10985         (canon_host_r): ...this new function, which now relies exclusively on
10986         getaddrinfo.
10987         (ch_strerror): New function.
10988         (last_cherror): New global.
10989         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
10990         interface.
10991         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
10992         void *.
10993         (freeaddrinfo): Free ai->ai_canonname when set.
10994
10995 2005-09-12  Derek Price  <derek@ximbiot.com>
10996
10997         Make canon-host require getaddrinfo.
10998         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
10999         AC_LIBSOURCE canon-host.h.  Call...
11000         (gl_PREREQ_CANON_HOST): ...this new function, which requires
11001         gl_GETADDRINFO.
11002         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
11003
11004 2005-09-12  Derek Price  <derek@ximbiot.com>
11005
11006         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
11007         LGPL.
11008         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
11009
11010 2005-09-12  Derek Price  <derek@ximbiot.com>
11011
11012         * lib/gai_strerror.c: Include config.h when available.  Include
11013         getaddrinfo.h before other headers to test interface.
11014         Reported by Larry Jones <lawrence.jones@ugs.com>.
11015
11016 2005-09-12  Derek Price  <derek@ximbiot.com>
11017             Paul Eggert  <eggert@cs.ucla.edu>
11018
11019         * modules/glob (Files): Add glob-libc.h.
11020
11021 2005-09-12  Derek Price  <derek@ximbiot.com>
11022             Paul Eggert  <eggert@cs.ucla.edu>
11023
11024         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
11025         glob_.h, glob-libc.h.
11026         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
11027
11028 2005-09-12  Derek Price  <derek@ximbiot.com>
11029             Paul Eggert  <eggert@cs.ucla.edu>
11030
11031         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
11032         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
11033         protecting things that should be done only in gnulib contexts.
11034         * lib/glob_.h: New file, containing only the glob things needed for
11035         gnulib.
11036         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
11037         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
11038         (glob, globfree, glob_pattern_p): Now defined simply in terms of
11039         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
11040         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
11041         and to respect the namespace rules better.
11042
11043 2005-09-08  Simon Josefsson  <jas@extundo.com>
11044
11045         * modules/socklen: New file.
11046
11047 2005-09-08  Simon Josefsson  <jas@extundo.com>
11048
11049         * m4/socklen.m4: New file.
11050
11051 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11052
11053         * modules/utimens (Files): Add m4/utimbuf.m4, since
11054         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
11055         Reported by Sergey Poznyakoff.
11056
11057 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11058
11059         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
11060         definitions, since that's the preferred style in glibc.
11061         Fix a minor spacing issue, and update copyright notice to match
11062         glibc's.
11063
11064 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11065
11066         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
11067
11068 2005-09-06  Simon Josefsson  <jas@extundo.com>
11069
11070         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
11071         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
11072
11073 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11074
11075         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
11076         warning.
11077
11078 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11079
11080         * config/srclist.txt: Add glibc bug 1302.
11081
11082 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11083
11084         Change bitset word type from unsigned int to unsigned long int,
11085         as this has better performance on typical 64-bit hosts.
11086         Port bitset code to hosts with unusual word sizes.
11087         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11088         (build_collating_symbol):
11089         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11090         argument is a bitset.  This is merely a style issue, but it makes
11091         it clearer that an entire array is expected.
11092         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11093         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11094         Port to the case where bitset_word is not the same as unsigned int.
11095         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11096         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11097         Likewise.
11098         * lib/regexec.c (check_dst_limits_calc_pos_1,
11099         check_subexp_matching_top):
11100         (build_trtable, group_nodes_into_DFAstates):
11101         Likewise.
11102         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11103         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11104         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11105         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11106         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11107         * lib/regcomp.c (optimize_subexps, lower_subexp):
11108         Work even if bitset_word has holes in its bitwise representation.
11109         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11110         * lib/regexec.c (check_dst_limits_calc_pos_1,
11111         check_subexp_matching_top):
11112         Likewise.
11113         * lib/regex_internal.c (re_string_reconstruct):
11114         Don't assume UCHAR_MAX == 255.
11115         * lib/regex_internal.h (bitset_set_all): Likewise.
11116         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
11117         All uses changed.
11118         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
11119         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
11120         All uses changed.
11121         (BITSET_WORD_MAX): New macro.
11122         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
11123         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
11124         (bitset_empty, bitset_copy):
11125         Prefer sizeof (bitset) to multiplying it out ourselves.
11126         (bitset_not_merge): Remove; unused.
11127         (bitset_contain): Return bool, not unsigned int with one bit on.
11128         All callers changed.
11129         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
11130         alignment than re_node_set; do this by defining a new internal
11131         type struct dests_alloc and using it to allocate memory.
11132
11133 2005-09-05  Bruno Haible  <bruno@clisp.org>
11134
11135         * gnulib-tool (func_import): Fix comparison in handling of symbolic
11136         links.
11137
11138 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
11139
11140         * modules/size_max (Makefile.am): Add size_max.h
11141
11142 2005-09-04  Derek Price  <derek@ximbiot.com>
11143
11144         * gnulib-tool (func_import): Fix reversed $symbolic logic.
11145
11146 2005-09-03  Simon Josefsson  <jas@extundo.com>
11147
11148         * gnulib-tool: Fix typo.
11149
11150 2005-09-03  Simon Josefsson  <jas@extundo.com>
11151
11152         * config/srclist.txt: Add glibc bug 1293.
11153
11154 2005-09-03  Derek Price  <derek@ximbiot.com>
11155
11156         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
11157         From Larry Jones <lawrence.jones@ugs.com>.
11158
11159 2005-09-02  Simon Josefsson  <jas@extundo.com>
11160
11161         * modules/socklen: New file.
11162
11163 2005-09-02  Simon Josefsson  <jas@extundo.com>
11164
11165         * modules/havelib: New module.
11166
11167         * modules/gettext, modules/iconv, modules/lock, modules/readline:
11168         Use havelib.
11169
11170 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11171
11172         Check for arithmetic overflow when calculating sizes, to prevent
11173         some buffer-overflow issues.  These patches are conservative, in the
11174         sense that when I couldn't determine whether an overflow was possible,
11175         I inserted a run-time check.
11176         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
11177         macros.
11178         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
11179         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
11180         (re_xnrealloc, re_x2nrealloc): New inline functions.
11181         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
11182         parse_bracket_exp):
11183         (build_equiv_class, build_charclass): Check for arithmetic overflow
11184         in size expression calculations.
11185         * lib/regex_internal.c (re_string_realloc_buffers):
11186         (build_wcs_upper_buffer, re_node_set_add_intersect):
11187         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
11188         (re_dfa_add_node, register_state): Likewise.
11189         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
11190         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
11191         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
11192         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
11193
11194 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11195
11196         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
11197         m4/ulonglong.m4.  Problem reported by Martin Lambers.
11198
11199 2005-09-02  Bruno Haible  <bruno@clisp.org>
11200
11201         Support for lib vs. lib64 distinction on biarch platforms.
11202         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
11203         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
11204         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
11205
11206 2005-09-02  Bruno Haible  <bruno@clisp.org>
11207
11208         * gnulib-tool (import): In the other first-use case, provide defaults
11209         as well.
11210
11211 2005-09-02  Bruno Haible  <bruno@clisp.org>
11212
11213         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
11214         patches not yet found in the latest gettext release.
11215
11216 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11217
11218         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
11219         to avoid a collision with bits/local_lim.h in glibc.
11220         All uses changed.  Problem reported by Dmitry V. Levin in
11221         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
11222
11223         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
11224         bugs in int versus size_t comparisons.
11225         (re_string_context_at): Fix bug where the code assumed that
11226         Idx is signed.
11227
11228         Use bool where appropriate.
11229         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
11230         All callers changed.
11231         (calc_eclosure_iter): Likewise, for ROOT arg.
11232         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
11233         (build_charclass_op): Likewise, for NON_MATCH arg.
11234         * lib/regex_internal.c (re_string_allocate, re_string_construct):
11235         (re_string_construct_common): Likewise, for ICASE arg.
11236         * lib/regexec.c (re_search_2_stub, re_search_stub):
11237         Likewise, for RET_LEN arg.
11238         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
11239         (set_regs): Likewise, for FL_BACKTRACK arg.
11240         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
11241         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
11242         (calc_eclosure_iter, parse_bracket_exp):
11243         Use bool for internal variables that are booleans.
11244         * lib/regexec.c (re_search_internal, check_matching,
11245         proceed_next_node):
11246         (set_regs, build_sifted_states, sift_states_bkref):
11247         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
11248         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11249         (find_collation_sequence_value):
11250         Likewise.
11251         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
11252         (re_node_set_compare):
11253         Return bool, not int. All callers changed.
11254         * lib/regexec.c (check_halt_node_context, check_dst_limits):
11255         (build_trtable, check_node_accept): Likewise.
11256         * lib/regex_internal.h: Include stdbool.h.
11257
11258         Fix bugs uncovered when converting to bool.
11259         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
11260         failure instead of charging ahead blindly.
11261         * lib/regex_internal.c (register_state): Likewise.
11262         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
11263         for freeing internal storage.
11264         (group_nodes_into_DFA_states): Use unsigned int, not int, for
11265         bitset pieces used as boolean, to avoid undefined behavior
11266         on hosts that do int overflow checking.
11267
11268 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11269
11270         * config/srclist.txt: Add glibc bugs 1285-1287.
11271
11272 2005-09-01  Jim Meyering  <jim@meyering.net>
11273
11274         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
11275         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
11276         Require gl_STAT_MACROS, too.
11277
11278 2005-09-01  Bruno Haible  <bruno@clisp.org>
11279
11280         * gnulib-tool (import): In the first-use case, provide defaults.
11281
11282 2005-09-01  Bruno Haible  <bruno@clisp.org>
11283
11284         * gnulib-tool (func_import): Remove the .tmp files.
11285
11286 2005-09-01  Bruno Haible  <bruno@clisp.org>
11287
11288         * gnulib-tool (func_import): Fix handling of symbolic links.
11289
11290 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11291
11292         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
11293         old glibc regex code mishandles strings longer than 2**31 bytes.
11294         This patch fixes this when the regex code is used in gnulib
11295         (i.e., outside glibc).
11296
11297         This patch should not affect the use of the regex code inside
11298         glibc.  No doubt this problem also needs to be handled for glibc
11299         as well, but the result will be an incompatible change to the
11300         glibc ABI, and the old ABI will have to be supported too.  That
11301         can be the the subject for another patch.
11302
11303         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
11304         governing whether the rest of this patch is active.  By default,
11305         the macro is disabled and the patch has no effect.
11306         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
11307         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
11308         (struct re_pattern_buffer, re_search, re_search_2, re_match):
11309         (re_match_2, re_set_registers): Use the new types.
11310         * lib/regex_internal.h (Idx, re_hashval_t): New types.
11311         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
11312         New macros.
11313         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
11314         (re_string_context_at, bin_tree_t, re_dfastate_t):
11315         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
11316         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
11317         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
11318         (re_string_char_size_at, re_string_wchar_at):
11319         (re_string_elem_size_at):
11320         Use the new types and macros to port to 64-bit hosts.
11321         Use unsigned types for internal values, so that the code
11322         mostly works even for arrays larger than SSIZE_MAX.
11323         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
11324         (search_duplicated_node, calc_eclosure_iter, fetch_number):
11325         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
11326         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
11327         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
11328         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
11329         (calc_inveclosure, parse_dup_op, build_range_exp):
11330         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
11331         (fetch_number, create_token_tree, mark_opt_subexp):
11332         Likewise.
11333         * lib/regex_internal.c (re_string_construct_common,
11334         create_ci_newstate):
11335         (create_cd_newstate, re_string_allocate, re_string_construct):
11336         (re_string_realloc_buffers, build_wcs_upper_buffer):
11337         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11338         (re_string_reconstruct, re_string_peek_byte_case):
11339         (re_string_fetch_byte_case, re_string_context_at):
11340         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11341         (re_node_set_init_copy, re_node_set_add_intersect):
11342         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11343         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11344         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11345         (re_acquire_state, re_acquire_state_context, register_state):
11346         Likewise.
11347         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
11348         search_cur_bkref_entry):
11349         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
11350         (re_search_internal, re_search_2_stub, re_search_stub)
11351         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11352         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11353         (update_cur_sifted_state, check_dst_limits):
11354         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11355         (check_subexp_limits, sift_states_bkref, merge_state_array):
11356         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11357         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11358         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11359         (expand_bkref_cache, check_node_accept_bytes):
11360         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11361         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11362         (acquire_init_state_context, check_halt_node_context):
11363         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11364         (sift_states_backward, clean_state_log_if_needed):
11365         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11366         (find_recover_state, transit_state_sb, transit_state_mb):
11367         (transit_state_bkref, build_trtable, match_ctx_clean):
11368         Likewise.
11369         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11370         to work around an assumption that REG_MISSING is negative.
11371
11372         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11373         (seek_collating_symbol_entry) [defined _LIBC]:
11374         (lookup_collation_sequence_value) [defined _LIBC]:
11375         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11376         Use prototypes rather than old-style function definitions.
11377         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11378         (transit_state_sb) [0]:
11379         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11380
11381         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11382         rm_eo.
11383
11384         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11385         (optimize_subexps, lower_subexp):
11386         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11387         since the signed shift might overflow.  Use 1u<<31 instead.
11388         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11389         Likewise.
11390         * lib/regexec.c (check_dst_limits_calc_pos_1,
11391         check_subexp_matching_top): Likewise.
11392
11393         * lib/regcomp.c (optimize_subexps, lower_subexp):
11394         Use CHAR_BIT rather than 8, for clarity.
11395         * lib/regexec.c (check_dst_limits_calc_pos_1):
11396         (check_subexp_matching_top): Likewise.
11397         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11398         have to worry about portability issues when shifting it left.
11399         Remove no-longer-needed test for table_size > 0.
11400         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11401         in a word, as the resulting behavior is undefined.
11402         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11403         in one case, a <= should have been an <, and in another case the
11404         whole test was missing.
11405         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11406         the standard name CHAR_BIT.
11407         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11408         this is not true on one's complement and signed-magnitude hosts.
11409
11410         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11411         next_last_offset.
11412         (struct re_dfa_t): Remove unused member states_alloc.
11413         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11414
11415 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11416
11417         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11418         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11419         and large-file glibc and in 32-bit large-file Solaris.
11420
11421 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11422
11423         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11424         lengths fit in regoff_t; this isn't true if regoff_t is the same
11425         width as size_t.
11426         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11427         (= START + RANGE) instead of RANGE.  This avoids overflow
11428         problems when regoff_t is the same width as size_t.
11429         All callers changed.
11430         (re_search_2_stub): Check for overflow when adding the
11431         sizes of the two strings.
11432         (re_search_stub): Check for overflow when adding START
11433         to RANGE; if it occurs, substitute the extreme value.
11434
11435 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11436
11437         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11438
11439 2005-08-31  Jim Meyering  <jim@meyering.net>
11440
11441         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11442         a pointer-to-const.
11443         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11444         (register_state): Likewise.
11445         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11446         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11447         (group_nodes_into_DFAstates): Likewise.
11448
11449 2005-08-31  Jim Meyering  <jim@meyering.net>
11450
11451         * check-module: Add a FIXME comment.
11452
11453 2005-08-31  Eric Blake  <ebb9@byu.net>
11454
11455         * modules/unistd-safer (Files): Add unistd--.h.
11456         * modules/stdio-safer (Files): Add stdio--.h.
11457
11458 2005-08-31  Derek Price  <derek@ximbiot.com>
11459
11460         * lib/getdelim.c (getdelim): Return EOF on EOF.
11461         Reported by Larry Jones <lawrence.jones@ugs.com>.
11462
11463 2005-08-31  Bruno Haible  <bruno@clisp.org>
11464
11465         Avoid unnecessary diffs in the generated lib/Makefile.am.
11466         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11467         the generated files.
11468         (func_import): Don't set cmd.
11469
11470 2005-08-31  Bruno Haible  <bruno@clisp.org>
11471
11472         * lib/strstr.c: Include <stddef.h>, for NULL.
11473         * lib/strcasestr.c: Likewise.
11474         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11475
11476 2005-08-31  Bruno Haible  <bruno@clisp.org>
11477
11478         * gnulib-tool: New option --macro-prefix.
11479         (func_import): Use macro_prefix.
11480         (import): Handle option --macro-prefix.
11481
11482 2005-08-31  Bruno Haible  <bruno@clisp.org>
11483
11484         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11485         Also use new variables cached_lgpl, cached_libtool.
11486
11487 2005-08-31  Bruno Haible  <bruno@clisp.org>
11488
11489         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11490         always instantiating them.
11491
11492 2005-08-31  Bruno Haible  <bruno@clisp.org>
11493
11494         * gnulib-tool (func_import): Read the previous cached settings
11495         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
11496         earlier added by gnulib but are now dropped. Warn when a gnulib file
11497         overwrites a non-gnulib file.
11498
11499 2005-08-31  Bruno Haible  <bruno@clisp.org>
11500
11501         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11502         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11503         projects that don't keep autogenerated files in CVS. Put into
11504         actioncmd only the specified modules, not the transitive closure.
11505
11506 2005-08-31  Bruno Haible  <bruno@clisp.org>
11507
11508         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11509         Create directories that shall be filled.
11510         (import): Don't look for gl_* macros in configure.ac. Recurse across
11511         all directories containing a gnulib-cache.m4 files, if meaningful.
11512
11513 2005-08-31  Bruno Haible  <bruno@clisp.org>
11514
11515         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
11516         (import): Set seen_libtool when we see gl_LIBTOOL.
11517
11518 2005-08-31  Bruno Haible  <bruno@clisp.org>
11519
11520         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
11521         declaration macro definitions from generated gnulib.m4.
11522
11523 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
11524
11525         * lib/iconvme.h: Add prototype for iconv_alloc.
11526
11527 2005-08-29  Simon Josefsson  <jas@extundo.com>
11528
11529         * lib/iconvme.c: Fix errno.
11530
11531 2005-08-29  Bruno Haible  <bruno@clisp.org>
11532
11533         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
11534         that it works when the directory contains spaces.
11535
11536 2005-08-29  Bruno Haible  <bruno@clisp.org>
11537
11538         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
11539
11540 2005-08-29  Bruno Haible  <bruno@clisp.org>
11541
11542         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
11543         Emit more advice.
11544
11545 2005-08-29  Bruno Haible  <bruno@clisp.org>
11546         and Stepan Kasal  <kasal@ucw.cz>
11547
11548         * check-module: If more parameters are given, check each of them
11549         separately; add more exceptions, as noted by Jim Meyering.
11550         (check_module): New procedure.
11551         (%exempt_header): Now contains all exceptions.
11552
11553 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
11554
11555         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
11556
11557 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
11558
11559         * lib/iconvme.c: Split iconv_string into iconv_alloc.
11560
11561 2005-08-28  Bruno Haible  <bruno@clisp.org>
11562
11563         * m4/gnulib-tool.m4: New file.
11564
11565 2005-08-27  Jim Meyering  <jim@meyering.net>
11566
11567         * modules/unistd-safer (Files): Add pipe-safer.c.
11568         * modules/fcntl-safer (Files): Add creat-safer.c.
11569
11570 2005-08-27  Jim Meyering  <jim@meyering.net>
11571
11572         * m4/stdlib-safer.m4: New file.  From coreutils.
11573         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11574         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11575         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11576         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11577         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11578
11579 2005-08-27  Jim Meyering  <jim@meyering.net>
11580
11581         * lib/fopen-safer.c: Merge minor changes from coreutils.
11582         * lib/dup-safer.c: Likewise.
11583         * lib/fd-safer.c: Likewise.
11584
11585         Merge from coreutils.
11586         * lib/stdio--.h: New file.
11587         * lib/stdlib--.h: New file.
11588         * lib/mkstemp-safer.c: New file.
11589
11590         GNU tar needs these.
11591         * lib/pipe-safer.c: New file.
11592         * lib/creat-safer.c: New file.
11593         * lib/fcntl--.h (creat): Define to creat_safer.
11594         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11595         * lib/unistd--.h (pipe): Define to pipe_safer.
11596         * lib/unistd-safer.h: Declare pipe_safer.
11597
11598 2005-08-26  Simon Josefsson  <jas@extundo.com>
11599
11600         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11601         Haible <bruno@clisp.org>.
11602
11603 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11604
11605         * lib/regex_internal.h: Remove all references to
11606         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11607         or better.
11608         (bitset_not, bitset_merge, bitset_not_merge):
11609         (bitset_mask, re_string_allocate, re_string_construct):
11610         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11611         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11612         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11613         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11614         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11615         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11616         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11617         (re_acquire_state_context):
11618         Remove unnecessary forward decls.
11619         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11620         Put __attribute at function definition,
11621         now that the function decl has been removed.
11622         * lib/regex_internal.c (re_string_peek_byte_case):
11623         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11624         Likewise.
11625
11626 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11627
11628         * m4/regex.m4: Add AC_PREREQ(2.50).
11629         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11630
11631 2005-08-25  Simon Josefsson  <jas@extundo.com>
11632
11633         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11634         __fsetlocking.
11635
11636 2005-08-25  Simon Josefsson  <jas@extundo.com>
11637
11638         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11639         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11640         GLIBC specific code.
11641
11642 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11643
11644         Make regex safe for g++.  This fixes one real bug (an "err"
11645         that should have been "*err").  g++ problem reported by
11646         Sam Steingold.
11647         * lib/regex_internal.h (re_calloc): New macro, consistent with
11648         re_malloc etc.  All callers of calloc changed to use re_calloc.
11649         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11650         not int.  All callers changed.
11651         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11652         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11653         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11654         (find_recover_state): Change "err" to "*err"; this fixes what
11655         appears to be a real bug.
11656         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11657         versus int.
11658
11659 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11660
11661         * modules/regex (Depends-on): Add malloc, since the code
11662         assumes that !malloc(0) means failure.
11663
11664 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11665
11666         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11667
11668         alloca modernization/simplification for regex.
11669         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11670         needs to be at the start of the file, and can be moved into
11671         regex_internal.h and simplified.
11672         * lib/regex_internal.h: Include <alloca.h>.
11673         (__libc_use_alloca) [!defined _LIBC]: New macro.
11674         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11675         now works outside glibc.
11676
11677 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11678
11679         * config/srclist.txt: Add glibc bugs 1241, 1245.
11680
11681 2005-08-25  Jim Meyering  <jim@meyering.net>
11682
11683         * lib/open-safer.c: Include <config.h>.
11684         Otherwise, we'd lose LARGEFILE support in any file using
11685         e.g. "fcntl--.h"
11686
11687 2005-08-25  Bruno Haible  <bruno@clisp.org>
11688
11689         * m4/minmax.m4: Require autoconf 2.52.
11690         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11691         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11692         alternatives of translit over the alphabet.
11693         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11694
11695 2005-08-24  Simon Josefsson  <jas@extundo.com>
11696
11697         * tests/test-getpass.c: New file.
11698
11699 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11700
11701         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11702         for GNU regex features.
11703
11704 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11705
11706         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11707         * lib/regex.h (regerror): Likewise.
11708
11709         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11710         requires this.  (The code never needed it.)
11711
11712         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11713         All uses of recently-renamed identifiers changed to use the new,
11714         POSIX-compliant names.  The code will build and run just fine
11715         without these changes, but it's better to eat our own dog food
11716         and use the standard-conforming names.
11717
11718         * lib/regex.h: Fix a multitude of POSIX name space violations.
11719         These changes have an effect only for programs that define
11720         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11721         do not change anything for programs compiled in the normal way.
11722         Also, there is no effect on the ABI.
11723
11724         (_REGEX_SOURCE): New macro.
11725         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11726         defined and _GNU_SOURCE is not; this fixes a name space violation.
11727
11728         Rename the following macros to obey POSIX requirements.
11729         The old names are still visible as macros if _REGEX_SOURCE is defined.
11730         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11731         RE_BACKSLASH_ESCAPE_IN_LISTS.
11732         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11733         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11734         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11735         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11736         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11737         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11738         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11739         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11740         (REG_INTERVALS): renamed from RE_INTERVALS.
11741         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11742         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11743         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11744         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11745         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11746         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11747         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11748         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11749         RE_UNMATCHED_RIGHT_PAREN_ORD.
11750         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11751         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11752         (REG_DEBUG): renamed from RE_DEBUG.
11753         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11754         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11755         unusual, since we can't clash with the POSIX REG_ICASE.
11756         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11757         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11758         (REG_NO_SUB): renamed from RE_NO_SUB.
11759         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11760         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11761         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11762         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11763         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11764         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11765         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11766         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11767         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11768         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11769         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11770         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11771         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11772         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11773         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11774         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11775         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11776         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11777         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11778         (REG_FIXED): Renamed from REGS_FIXED.
11779         (REG_NREGS): Renamed from RE_NREGS.
11780
11781         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11782         of other REG_* macros, since POSIX says the user is allowed to
11783         #undef these macros selectively.
11784
11785         (reg_errcode_t): Update comment stating what other tables need
11786         to be consistent.
11787
11788         Rename the following enum values to obey POSIX requirements.
11789         The old names are still visible as macros.
11790         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11791         is not defined, since GNU is supposed to be a superset of POSIX as
11792         much as possible, and since we want reg_errcode_t to be a signed
11793         type for implementation consistency.
11794         (_REG_NOERROR): Renamed from REG_NOERROR.
11795         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11796         (_REG_BADPAT): Renamed from REG_BADPAT.
11797         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11798         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11799         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11800         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11801         (_REG_EBRACK): Renamed from REG_EBRACK.
11802         (_REG_EPAREN): Renamed from REG_EPAREN.
11803         (_REG_EBRACE): Renamed from REG_EBRACE.
11804         (_REG_BADBR): Renamed from REG_BADBR.
11805         (_REG_ERANGE): Renamed from REG_ERANGE.
11806         (_REG_ESPACE): Renamed from REG_ESPACE.
11807         (_REG_BADRPT): Renamed from REG_BADRPT.
11808         (_REG_EEND): Renamed from REG_EEND.
11809         (_REG_ESIZE): Renamed from REG_ESIZE.
11810         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11811         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11812         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11813         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11814         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11815
11816         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11817         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11818         changed.  But support the old name if the new one is not defined
11819         and if _REGEX_SOURCE.
11820
11821         Change the following member names in struct re_pattern_buffer.
11822         The old names are still supported if !_REGEX_SOURCE.
11823         The new names are always supported, regardless of _REGEX_SOURCE.
11824         (re_buffer): Renamed from buffer.
11825         (re_allocated): Renamed from allocated.
11826         (re_used): Renamed from used.
11827         (re_syntax): Renamed from syntax.
11828         (re_fastmap): Renamed from fastmap.
11829         (re_translate): Renamed from translate.
11830         (re_can_be_null): Renamed from can_be_null.
11831         (re_regs_allocated): Renamed from regs_allocated.
11832         (re_fastmap_accurate): Renamed from fastmap_accurate.
11833         (re_no_sub): Renamed from no_sub.
11834         (re_not_bol): Renamed from not_bol.
11835         (re_not_eol): Renamed from not_eol.
11836         (re_newline_anchor): Renamed from newline_anchor.
11837
11838         Change the following member names in struct re_registers.
11839         The old names are still supported if !_REGEX_SOURCE.
11840         The new names are always supported, regardless of _REGEX_SOURCE.
11841         (rm_num_regs): Renamed from num_regs.
11842         (rm_start): Renamed from start.
11843         (rm_end): Renamed from end.
11844
11845         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
11846         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
11847         Prepend __ to parameter names.
11848
11849         Undo yesterday's changes.
11850
11851 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11852
11853         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
11854         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
11855         lib/regex.c.
11856
11857 2005-08-24  Jim Meyering  <jim@meyering.net>
11858
11859         Sync from coreutils.
11860         * m4/fcntl-safer.m4: New file.
11861
11862         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
11863         and object files for this module.
11864
11865 2005-08-24  Jim Meyering  <jim@meyering.net>
11866
11867         Sync from coreutils.
11868         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
11869
11870 2005-08-24  Jim Meyering  <jim@meyering.net>
11871
11872         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
11873         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
11874
11875 2005-08-24  Jim Meyering  <jim@meyering.net>
11876
11877         * modules/fcntl-safer: New module.
11878         * modules/fts (Depends-on): Add fcntl-safer.
11879         * MODULES.html.sh (File descriptor based Input/Output):
11880         Add fcntl-safer.
11881
11882 2005-08-24  Bruno Haible  <bruno@clisp.org>
11883
11884         Support for unit test modules.
11885         * modules/README: Mention tests modules.
11886         * modules/TEMPLATE-TESTS: New file.
11887         * gnulib-tool: New options --extract-tests-module, --with-tests and
11888         --tests-base (unused for the moment).
11889         (testsbase, inctests): New variables.
11890         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
11891         (func_verify_module): Exclude TEMPLATE-TESTS.
11892         (func_verify_nontests_module, func_verify_tests_module): New functions.
11893         (func_get_dependencies): Add implicit dependency for tests modules.
11894         (func_get_tests_module): New function.
11895         (func_modules_transitive_closure): When --with-tests was specified,
11896         include the unit tests as well, unless explicitly avoided.
11897         (func_emit_lib_Makefile_am): Ignore the tests modules here.
11898         (func_emit_tests_Makefile_am): New function.
11899         (func_create_testdir): When --with-tests was specified, emit a
11900         tests/ directory.
11901         * MODULES.html.sh (Future developments): Update.
11902
11903 2005-08-24  Bruno Haible  <bruno@clisp.org>
11904
11905         * modules/tls-tests: New file.
11906         * tests/test-tls.c: New file, from GNU gettext.
11907
11908 2005-08-24  Bruno Haible  <bruno@clisp.org>
11909
11910         * modules/lock-tests: New file.
11911         * tests/test-lock.c: New file, from GNU gettext.
11912
11913 2005-08-24  Bruno Haible  <bruno@clisp.org>
11914
11915         * lib/lock.h: Add multiple inclusion guard.
11916         * lib/tls.h: Add multiple inclusion guard.
11917
11918 2005-08-24  Bruno Haible  <bruno@clisp.org>
11919
11920         * gnulib-tool: Add support for the --aux-dir option to
11921         --create-testdir, --create-megatestdir, --test, --megatest.
11922         (func_create_testdir, func_create_megatestdir): Optionally emit a
11923         AC_CONFIG_AUX_DIR directive.
11924         (create-testdir, create-megatestdir, test, megatest): Provide a
11925         default value for $auxdir.
11926
11927 2005-08-24  Bruno Haible  <bruno@clisp.org>
11928
11929         * gnulib-tool (import): Use compound statement instead of subshell
11930         where possible.
11931
11932 2005-08-24  Bruno Haible  <bruno@clisp.org>
11933
11934         * gnulib-tool (import): Change --aux-dir default to "build-aux".
11935
11936 2005-08-24  Bruno Haible  <bruno@clisp.org>
11937
11938         * gnulib-tool (func_version): Update.
11939
11940 2005-08-24  Bruno Haible  <bruno@clisp.org>
11941
11942         * gnulib-tool (func_import, func_create_testdir,
11943         func_create_megatestdir): Quote all autoconf macro arguments.
11944
11945 2005-08-24  Bruno Haible  <bruno@clisp.org>
11946
11947         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
11948         option --force, because --force causes the aclocal.m4 of each
11949         subdirectory to be newer than the corresponding config.h.in.
11950
11951 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11952
11953         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
11954         All contents moved to gl_REGEX.
11955         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
11956         assume that it does.
11957
11958 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11959
11960         * lib/regex.h (REG_NOSYS)
11961         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
11962         Define, since POSIX requires it as of 2001.
11963         (_REG_ENOSYS)
11964         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
11965         New private symbol, used to keep the enum signed in all cases.
11966         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
11967         Youngman in
11968         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
11969
11970         * lib/regex_internal.c (re_string_skip_chars, register_state):
11971         (calc_state_hash):
11972         Remove forward decls; no longer needed now that we use prototypes.
11973         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
11974         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
11975         (clean_state_log_if_needed): Likewise.
11976
11977 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11978
11979         * config/srclist.txt: Add glibc bugs 1231-1233.
11980
11981 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11982
11983         Fix problems reported by Sam Steingold in
11984         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
11985         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
11986         assumed that reg_errcode_t is a signed type, which is not
11987         necessarily true if _XOPEN_SOURCE is not defined.
11988         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
11989         since some compilers warn about it otherwise.
11990
11991 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11992
11993         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
11994         (init_word_char, create_initial_state, duplicate_node_closure):
11995         (fetch_token, peek_token_bracket, build_range_exp):
11996         (build_collating_symbol): Remove forward decls; no longer needed
11997         now that we use prototypes.
11998
11999         * lib/regcomp.c:
12000         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
12001         (re_compile_fastmap_iter, regcomp, regerror, regfree):
12002         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
12003         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
12004         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
12005         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
12006         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
12007         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
12008         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
12009         (build_range_exp, build_collating_symbol, parse_bracket_exp):
12010         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
12011         (build_charclass, build_charclass_op, fetch_number, create_tree):
12012         (create_token_tree, mark_opt_subexp, duplicate_tree):
12013         Use prototypes rather than old-style definitions.
12014
12015         * lib/regex_internal.c:
12016         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
12017         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
12018         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12019         (re_string_reconstruct, re_string_peek_byte_case):
12020         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
12021         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12022         (re_node_set_init_copy, re_node_set_add_intersect):
12023         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12024         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12025         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12026         (re_acquire_state, re_acquire_state_context, register_state):
12027         (create_ci_newstate, create_cd_newstate, free_state):
12028         Likewise.
12029         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
12030         re_search_2):
12031         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
12032         (re_search_internal, prune_impossible_nodes):
12033         (acquire_init_state_context, check_matching, static):
12034         (check_halt_node_context, check_halt_state_context, proceed_next_node):
12035         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
12036         (update_regs, sift_states_backward, build_sifted_states):
12037         (clean_state_log_if_needed, merge_state_array):
12038         (update_cur_sifted_state, add_epsilon_src_nodes):
12039         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
12040         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
12041         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
12042         (find_recover_state, check_subexp_matching_top, transit_state_mb):
12043         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
12044         (check_arrival, check_arrival_add_next_nodes):
12045         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12046         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12047         (check_node_accept_bytes, check_node_accept, extend_buffers):
12048         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
12049         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
12050         (sift_ctx_init):
12051         Likewise.
12052
12053         * lib/regex_internal.h:
12054         (re_string_allocate, re_string_construct, re_string_reconstruct):
12055         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
12056         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
12057         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
12058         (re_string_context_at, re_string_peek_byte_case):
12059         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
12060         is defined, since we now use prototypes always.
12061
12062         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
12063         C89 or better.  All uses removed.
12064
12065 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12066
12067         * config/srclist.txt: Add glibc bugs 1220-1227.
12068
12069 2005-08-20  Jim Meyering  <jim@meyering.net>
12070
12071         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
12072         of unused local, dfa.
12073
12074 2005-08-20  Bruno Haible  <bruno@clisp.org>
12075
12076         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12077
12078 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12079
12080         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12081         (re_node_set_insert_last, re_dfa_add_node):
12082         Rename local variables to avoid GCC shadowing warnings.
12083
12084 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12085
12086         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12087         [defined lint]: Suppress bogus uninitialized-variable warnings.
12088
12089         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12090         and let the caller return REG_ESPACE if out of space.  This
12091         removes an uninitialied-variable warning with GCC 4.0.1, and also
12092         avoids taking the address of a local variable.  All callers
12093         changed.
12094
12095 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12096
12097         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12098         $LIBCSRC/posix/regexec.c.
12099         Add glibc bug 1217 for regcomp.c.
12100
12101 2005-08-19  Jim Meyering  <jim@meyering.net>
12102
12103         * lib/regexec.c (proceed_next_node): Redo local variables to
12104         avoid GCC shadowing warnings.
12105
12106 2005-08-18  Bruno Haible  <bruno@clisp.org>
12107
12108         * lib/strstr.c (strstr): Fix return value in multibyte case.
12109         * lib/strcasestr.c (strcasestr): Likewise.
12110
12111 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12112
12113         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12114
12115 2005-08-17  Jim Meyering  <jim@meyering.net>
12116
12117         Make the %s format (seconds since the epoch) work for a negative
12118         number and when used with a zero-padded field width, e.g. %015s.
12119
12120         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
12121         label so that it precedes the code to set `digits'.  Otherwise,
12122         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
12123         print `00-22'.  Now, it prints `-0022', as it should.
12124
12125 2005-08-17  Bruno Haible  <bruno@clisp.org>
12126
12127         * modules/strstr (Files): Add m4/mbrtowc.m4.
12128         (Depends-on): Add mbuiter.
12129
12130 2005-08-17  Bruno Haible  <bruno@clisp.org>
12131
12132         * modules/strcasestr: New file.
12133         * MODULES.html.sh (String handling, based on ANSI C 89): Add
12134         strcasestr.
12135
12136 2005-08-17  Bruno Haible  <bruno@clisp.org>
12137
12138         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
12139
12140 2005-08-17  Bruno Haible  <bruno@clisp.org>
12141
12142         * modules/mbuiter: New file.
12143         * MODULES.html.sh (Extended multibyte and wide character utilities):
12144         Add mbuiter.
12145
12146 2005-08-17  Bruno Haible  <bruno@clisp.org>
12147
12148         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
12149         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
12150
12151 2005-08-17  Bruno Haible  <bruno@clisp.org>
12152
12153         * m4/strcasestr.m4: New file.
12154
12155 2005-08-17  Bruno Haible  <bruno@clisp.org>
12156
12157         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
12158         * lib/strstr.c: Completely rewritten, with multibyte locale support.
12159
12160 2005-08-17  Bruno Haible  <bruno@clisp.org>
12161
12162         * lib/strcasestr.h: New file.
12163         * lib/strcasestr.c: New file.
12164
12165 2005-08-17  Bruno Haible  <bruno@clisp.org>
12166
12167         * lib/strcasecmp.c: Use mbuiter.h.
12168
12169 2005-08-17  Bruno Haible  <bruno@clisp.org>
12170
12171         * lib/mbuiter.h: New file.
12172
12173 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12174
12175         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
12176         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
12177         and gl_GETOPT are both invoked via different paths (as happens
12178         with GNU tar CVS because it uses both argp and getopt), the former
12179         wins.
12180
12181 2005-08-16  Bruno Haible  <bruno@clisp.org>
12182
12183         * modules/tls: New file.
12184         * MODULES.html.sh (Multithreading): Add tls.
12185
12186 2005-08-16  Bruno Haible  <bruno@clisp.org>
12187
12188         * modules/strnlen1: New file.
12189         * MODULES.html.sh (String handling): Add strnlen1.
12190
12191 2005-08-16  Bruno Haible  <bruno@clisp.org>
12192
12193         * modules/strcase (Files): Add m4/mbrtowc.m4.
12194         (Depends-on): Add strnlen1, mbchar.
12195
12196 2005-08-16  Bruno Haible  <bruno@clisp.org>
12197
12198         * modules/mbiter: New file.
12199         * MODULES.html.sh (Extended multibyte and wide character utilities):
12200         Add mbiter.
12201
12202 2005-08-16  Bruno Haible  <bruno@clisp.org>
12203
12204         * modules/mbfile: New file.
12205         * MODULES.html.sh (Extended multibyte and wide character utilities):
12206         Add mbfile.
12207
12208 2005-08-16  Bruno Haible  <bruno@clisp.org>
12209
12210         * modules/mbchar: New file.
12211         * MODULES.html.sh (Extended multibyte and wide character utilities):
12212         New section.
12213
12214 2005-08-16  Bruno Haible  <bruno@clisp.org>
12215
12216         * m4/tls.m4: New file, from GNU gettext.
12217
12218 2005-08-16  Bruno Haible  <bruno@clisp.org>
12219
12220         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
12221         always.
12222         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
12223
12224 2005-08-16  Bruno Haible  <bruno@clisp.org>
12225
12226         * m4/mbiter.m4: New file.
12227
12228 2005-08-16  Bruno Haible  <bruno@clisp.org>
12229
12230         * m4/mbfile.m4: New file.
12231
12232 2005-08-16  Bruno Haible  <bruno@clisp.org>
12233
12234         * m4/mbchar.m4: New file.
12235
12236 2005-08-16  Bruno Haible  <bruno@clisp.org>
12237
12238         * lib/tls.h: New file, from GNU gettext.
12239         * lib/tls.c: New file, from GNU gettext.
12240
12241 2005-08-16  Bruno Haible  <bruno@clisp.org>
12242
12243         * lib/strnlen1.h: New file.
12244         * lib/strnlen1.c: New file.
12245
12246 2005-08-16  Bruno Haible  <bruno@clisp.org>
12247
12248         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
12249         (mbi_init): Update.
12250         (mbi_avail, mbi_advance): Let the iteration end before the terminating
12251         NUL byte, not after it.
12252
12253 2005-08-16  Bruno Haible  <bruno@clisp.org>
12254
12255         * lib/strcase.h (strcasecmp): Add note in comments.
12256         * lib/strncasecmp.c: Use code from strcasecmp.c.
12257         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
12258         (strcasecmp): Work correctly in multibyte locales.
12259
12260 2005-08-16  Bruno Haible  <bruno@clisp.org>
12261
12262         * lib/mbiter.h: New file.
12263
12264 2005-08-16  Bruno Haible  <bruno@clisp.org>
12265
12266         * lib/mbfile.h: New file.
12267
12268 2005-08-16  Bruno Haible  <bruno@clisp.org>
12269
12270         * lib/mbchar.h: New file.
12271         * lib/mbchar.c: New file.
12272
12273 2005-08-16  Bruno Haible  <bruno@clisp.org>
12274
12275         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
12276         the valid ones. Makes the comparison operations transitive:
12277         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
12278         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
12279
12280 2005-08-15  Simon Josefsson  <jas@extundo.com>
12281
12282         * modules/ssize_t (License): Change to 'unlimited'.
12283
12284         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
12285
12286 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12287
12288         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
12289         Add comments for each pending glibc patch.
12290
12291 2005-08-15  Bruno Haible  <bruno@clisp.org>
12292
12293         * lib/regex.h (__restrict_arr): Don't define to __restrict if
12294         __cplusplus is defined.
12295
12296 2005-08-14  Jim Meyering  <jim@meyering.net>
12297
12298         Sync from coreutils.
12299
12300         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
12301         Use the hash-table-based cycle-detection code not just when
12302         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
12303         Reported by James Youngman in
12304         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
12305         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
12306         FTS_TIGHT_CYCLE_CHECK.
12307         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
12308         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
12309         once again.
12310         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
12311         * lib/fts.c (fd_safer): Remove decl.
12312         Include fcntl--.h rather than unistd-safer.h
12313         (fts_safe_changedir): Don't call fd_safer; no longer needed
12314         now that we include fcntl--.h.
12315
12316 2005-08-12  Simon Josefsson  <jas@extundo.com>
12317
12318         * modules/getndelim2: Use ssize_t module.
12319         * modules/getnline: Likewise.
12320         * modules/safe-read: Likewise.
12321         * modules/xreadlink: Likewise.
12322
12323         * modules/ssize_t: New file.
12324
12325 2005-08-12  Simon Josefsson  <jas@extundo.com>
12326
12327         * m4/readline.m4: Look for termcap, curses or ncurses if required.
12328
12329 2005-08-12  Simon Josefsson  <jas@extundo.com>
12330
12331         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12332         ssize_t.
12333
12334 2005-08-12  Simon Josefsson  <jas@extundo.com>
12335
12336         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
12337         readline, getdelim and check_version.
12338         (Support for systems lacking ISO C 99: Sizes of integer types):
12339         Add size_max.
12340
12341 2005-08-12  Bruno Haible  <bruno@clisp.org>
12342
12343         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
12344
12345 2005-08-11  Simon Josefsson  <jas@extundo.com>
12346
12347         * modules/readline: New file.
12348
12349         * modules/strnlen (Files): Add strnlen.h.
12350
12351 2005-08-11  Simon Josefsson  <jas@extundo.com>
12352
12353         * m4/readline.m4: New file.
12354
12355 2005-08-11  Simon Josefsson  <jas@extundo.com>
12356
12357         * lib/readline.h, readline.c: New file.
12358
12359 2005-08-11  Simon Josefsson  <jas@extundo.com>
12360
12361         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12362         gl_AVOID.
12363
12364 2005-08-11  Bruno Haible  <bruno@clisp.org>
12365
12366         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12367
12368 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12369
12370         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12371
12372 2005-08-10  Simon Josefsson  <jas@extundo.com>
12373
12374         * tests/test-iconvme.c: New file.
12375
12376 2005-08-10  Simon Josefsson  <jas@extundo.com>
12377
12378         * m4/strnlen.m4: New file.
12379
12380         * m4/strndup.m4: Don't check for strnlen declaration, done in
12381         strnlen.m4.
12382
12383 2005-08-10  Simon Josefsson  <jas@extundo.com>
12384
12385         * lib/strndup.c: Use strnlen.h.
12386
12387         * lib/strnlen.h: New file.
12388
12389 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12390
12391         * README: Typos.
12392
12393 2005-08-02  Simon Josefsson  <jas@extundo.com>
12394
12395         * modules/readline: New file.
12396
12397 2005-08-02  Simon Josefsson  <jas@extundo.com>
12398
12399         * modules/getdelim: New file.
12400
12401         * modules/getline: Rewrite, don't use getndelim2.
12402
12403 2005-08-02  Simon Josefsson  <jas@extundo.com>
12404
12405         * m4/getline.m4: Separate out getdelim stuff into separate module.
12406
12407         * m4/getdelim.m4: New file.
12408
12409 2005-08-02  Simon Josefsson  <jas@extundo.com>
12410
12411         * lib/getline.h, getline.c: Rewrite.
12412
12413         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12414
12415 2005-07-31  Bruno Haible  <bruno@clisp.org>
12416
12417         * lib/lock.h (gl_lock_initializer): New macro.
12418         (gl_lock_define_initialized): Use it.
12419         (gl_rwlock_initializer): New macro.
12420         (gl_rwlock_define_initialized): Use it.
12421         (gl_recursive_lock_initializer): New macro.
12422         (gl_recursive_lock_define_initialized): Use it.
12423
12424 2005-07-30  Karl Berry  <karl@gnu.org>
12425
12426         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12427         Report from Ben Pfaff, regarding getopt.
12428
12429 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12430
12431         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12432         normal way.
12433         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12434         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12435         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12436         (gl_GETOPT): Use the new macros.  Most of the implementation
12437         is moved to the new macros.  This is for programs like Emacs
12438         that don't want all the functionality of gl_GETOPT.
12439
12440 2005-07-26  Bruno Haible  <bruno@clisp.org>
12441
12442         * m4/lock.m4: Update from GNU gettext.
12443
12444 2005-07-26  Bruno Haible  <bruno@clisp.org>
12445
12446         * lib/lock.h: Update from GNU gettext.
12447         * lib/lock.c: Update from GNU gettext.
12448
12449 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12450
12451         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12452         obsolescent AC_TRY_RUN.  Include the default includes files, for
12453         'exit'.
12454
12455 2005-07-24  Bruno Haible  <bruno@clisp.org>
12456
12457         * modules/visibility: New file.
12458         * MODULES.html.sh (Misc): Add visibility.
12459
12460 2005-07-24  Bruno Haible  <bruno@clisp.org>
12461
12462         * m4/visibility.m4: New file.
12463
12464 2005-07-24  Bruno Haible  <bruno@clisp.org>
12465
12466         * doc/visibility.texi: New file.
12467
12468 2005-07-22  Bruno Haible  <bruno@clisp.org>
12469
12470         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12471         $(ALLOCA_H), redundant through BUILT_SOURCES.
12472         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12473         redundant through BUILT_SOURCES.
12474         * modules/byteswap (Makefile.am): Remove explicit dependency on
12475         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12476         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12477         $(FNMATCH_H), redundant through BUILT_SOURCES.
12478         * modules/getopt (Makefile.am): Remove explicit dependency on
12479         $(GETOPT_H), redundant through BUILT_SOURCES.
12480         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12481         redundant through BUILT_SOURCES.
12482         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12483         redundant through BUILT_SOURCES.
12484         * modules/stdbool (Makefile.am): Remove explicit dependency on
12485         $(STDBOOL_H), redundant through BUILT_SOURCES.
12486         * modules/stdint (Makefile.am): Remove explicit dependency on
12487         $(STDINT_H), redundant through BUILT_SOURCES.
12488         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12489         Remove explicit dependency on $(SYSEXITS_H).
12490         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
12491
12492 2005-07-18  Simon Josefsson  <jas@extundo.com>
12493
12494         * lib/check-version.c (check_version): Accept identical versions too.
12495
12496 2005-07-18  Bruno Haible  <bruno@clisp.org>
12497
12498         * modules/lock: New file.
12499         * MODULES.html.sh (Multithreading): New section.
12500
12501 2005-07-18  Bruno Haible  <bruno@clisp.org>
12502
12503         * m4/lock.m4: New file, from GNU gettext.
12504
12505 2005-07-18  Bruno Haible  <bruno@clisp.org>
12506
12507         * lib/lock.h: New file, from GNU gettext.
12508         * lib/lock.c: New file, from GNU gettext.
12509
12510 2005-07-18  Bruno Haible  <bruno@clisp.org>
12511
12512         * lib/lock.h (gl_once_t): New type.
12513         (gl_once_define, gl_once): New macros.
12514         * lib/lock.c (fresh_once): New variable.
12515         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
12516         functions.
12517
12518 2005-07-16  Simon Josefsson  <jas@extundo.com>
12519
12520         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
12521         workaround, suggested by Bruno.
12522
12523 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12524
12525         * modules/xalloc (Depends-on): Add xalloc-die.
12526         * modules/xvasprintf (Depends-on): Add xalloc-die.
12527
12528 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12529
12530         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
12531         with a minor change.
12532
12533 2005-07-15  Bruno Haible  <bruno@clisp.org>
12534
12535         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
12536         When using lib/poll.c, define poll as rpl_poll.
12537
12538 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
12539
12540         * modules/argp (Depends-on): Remove unlocked-io.
12541
12542 2005-07-14  Derek Price  <derek@ximbiot.com>
12543
12544         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
12545         for glob symlink bug.
12546
12547 2005-07-14  Bruno Haible  <bruno@clisp.org>
12548
12549         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
12550         Instead, test for *_unlocked function declarations directly.
12551
12552 2005-07-11  Simon Josefsson  <jas@extundo.com>
12553
12554         * modules/size_max: New file.
12555
12556         * modules/xsize: Depend on size_max module for size_max.m4.
12557
12558 2005-07-11  Simon Josefsson  <jas@extundo.com>
12559
12560         * lib/size_max.h: New file.
12561
12562 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12563
12564         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12565         copyright symbol and the year.
12566         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12567         (version_etc_va): Use parameterized copyright notice.
12568         Reword to conform to the current GNU coding standards.
12569
12570 2005-07-11  Karl Berry  <karl@gnu.org>
12571
12572         * doc/gnulib.texi (Quoting): new node.
12573         (Initial import): more info, from Patrice.
12574
12575 2005-07-11  Bruno Haible  <bruno@clisp.org>
12576
12577         * gnulib-tool (func_usage): Document option --avoid.
12578         (Command line options): Handle --avoid.
12579         (func_acceptable): New function.
12580         (func_modules_transitive_closure): Use it.
12581
12582 2005-07-11  Bruno Haible  <bruno@clisp.org>
12583
12584         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12585         Reported by Jim Meyering.
12586
12587 2005-07-10  Bruno Haible  <bruno@clisp.org>
12588
12589         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12590         Needed when size_t is smaller than 'unsigned int'.
12591         Reported by Paul Eggert.
12592
12593 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12594
12595         * modules/argp (Depends-on): Add unlocked-io
12596
12597 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12598
12599         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12600         block of defines.
12601
12602 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12603
12604         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12605         fix now.
12606
12607 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12608         and Paul Eggert  <eggert@cs.ucla.edu>
12609
12610         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12611         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12612
12613 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12614
12615         * modules/regex (Files): Add lib/regex_internal.c,
12616         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12617         (Depends-on): Add extensions.
12618         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12619
12620 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12621
12622         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12623         pathconf.
12624         * m4/same.m4 (gl_SAME): Likewise.
12625         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12626
12627         * m4/regex.m4: Adjust to new libc regex implementation.
12628         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12629         all the .c and .h parts of (the new) regex.
12630         Quote the m4 stuff better.
12631         Check for RE_ICASE bug of old gnulib.
12632         Check for REG_STARTEND of recent libc.
12633         Rename local variables from jm_* to gl_*.
12634         Quote operand of "test -f".
12635         Say "recent enough" version of libc, not "version 2".
12636         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12637         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12638         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12639         Remove check for btowc, isascii.
12640         Require AM_LANGINFO_CODESET.
12641
12642 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12643
12644         * lib/regex.c, regex.h: Sync from libc.
12645         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12646         * lib/regexec.c:
12647         New files, synced from libc, except that regex_internal.h
12648         currently has a small porting fix.
12649
12650 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12651
12652         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12653         regex_internal.c, regexec.c.
12654         Add regex_internal.h too, but as a comment, since the libc version
12655         is currently broken in gnulib mode.
12656
12657 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12658
12659         Support programs like Emacs that use gnulib but not gettext.
12660         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12661         * modules/gettext-h: New file.
12662         * modules/gettext (Files): Remove lib/gettext.h.
12663         (Depends-on): Add gettext-h.
12664         (Makefile.am): Remove lib_SOURCES.
12665         * modules/argmatch, modules/c-stack, modules/closeout:
12666         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12667         * modules/execute, modules/file-type, modules/getaddrinfo:
12668         * modules/getopt, modules/human, modules/javacomp:
12669         * modules/javaexec, modules/mkdir-p, modules/obstack:
12670         * modules/openat, modules/pagealign_alloc, modules/pipe:
12671         * modules/quotearg, modules/regex, modules/rpmatch:
12672         * modules/unicodeio, modules/userspec, modules/version-etc:
12673         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12674         * modules/xsetenv:
12675         Depend on gettext-h, not gettext.
12676
12677 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12678
12679         * gnulib-tool (func_import): Add support for 'public domain' license.
12680         * modules/alloca, modules/atexit, modules/memmove:
12681         Now public domain, not GPL.
12682         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12683         * modules/realloc, modules/strerror, modules/strtod:
12684         Now LGPL, not GPL.
12685
12686 2005-07-05  Bruno Haible  <bruno@clisp.org>
12687
12688         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12689         autoconf CVS. Needed for mingw.
12690
12691 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12692
12693         Remove the dependency of the strftime module on the tzset module.
12694         * modules/strftime (Depends-on): Remove dependency on tzset.
12695
12696 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12697
12698         Remove the dependency of the strftime module on the tzset module.
12699         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12700         gl_FUNC_TZSET_CLOBBER.
12701
12702 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12703
12704         Remove the dependency of the strftime module on the tzset module.
12705         * lib/strftime.c (my_strftime)
12706         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12707         Copy the input structure, to work around some of the bug with
12708         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12709         Solaris releases, you should also use the tzset module, but we won't
12710         require it as a dependency any more since we don't want LGPLed code
12711         to depend on GPLed code.
12712
12713 2005-07-02  Jim Meyering  <jim@meyering.net>
12714
12715         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12716         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12717         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12718         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12719
12720 2005-07-02  Jim Meyering  <jim@meyering.net>
12721
12722         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12723
12724 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12725
12726         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12727         declares only 'struct timespec;' (!).
12728
12729 2005-07-01  Jim Meyering  <jim@meyering.net>
12730
12731         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12732         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12733         * lib/save-cwd.c, tempname.c:
12734         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12735         and don't include <sys/file.h>).
12736
12737 2005-06-29  Jim Meyering  <jim@meyering.net>
12738
12739         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12740         type name.  Use the variable name instead.
12741         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12742         Likewise.
12743
12744 2005-06-28  Simon Josefsson  <jas@extundo.com>
12745
12746         * modules/check-version (Files): Add check-version.m4.
12747
12748 2005-06-28  Simon Josefsson  <jas@extundo.com>
12749
12750         * m4/check-version.m4: New file, suggested by Jim Meyering
12751         <jim@meyering.net>.
12752
12753 2005-06-28  Simon Josefsson  <jas@extundo.com>
12754
12755         * lib/check-version.h, lib/check-version.c: New files.
12756
12757 2005-06-28  Simon Josefsson  <jas@extundo.com>
12758
12759         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12760         collision with global variable.  Better indentation.  Don't
12761         increment buffer pointer beyond buffer end.  Based on comments
12762         from Paul Eggert <eggert@cs.ucla.edu>.
12763
12764         * lib/base64.h: Indent.
12765
12766 2005-06-28  Simon Josefsson  <jas@extundo.com>
12767
12768         * doc/gnulib.texi (Library version handling): New section.
12769
12770 2005-06-28  Jim Meyering  <jim@meyering.net>
12771
12772         * check-module (find_included_lib_files): Hard-code another
12773         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12774         but modules/fts-lgpl (correctly) does not list those files.
12775
12776         * modules/canonicalize (Files): Add lib/pathmax.h.
12777
12778 2005-06-25  Simon Josefsson  <jas@extundo.com>
12779
12780         * modules/check-version: New file.
12781
12782 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12783
12784         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12785         initializer of struct addrinfo, as an indication that we don't
12786         care how many members the structure has.
12787
12788 2005-06-24  Derek Price  <derek@ximbiot.com>
12789         and Bruno Haible  <bruno@clisp.org>
12790
12791         Remove stat module & update lstat.
12792         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12793         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12794         * m4/stat.m4: Remove this file.
12795
12796 2005-06-24  Derek Price  <derek@ximbiot.com>
12797         and Bruno Haible  <bruno@clisp.org>
12798
12799         Remove stat module & update lstat.
12800         * lib/stat.c: Remove this file...
12801         (slash_aware_lstat): ...moving this content and its support...
12802         * lib/lstat.c (rpl_lstat): ...into here.
12803         * lib/lstat.h: New file.
12804
12805 2005-06-24  Derek Price  <derek@ximbiot.com>
12806         and Bruno Haible  <bruno@clisp.org>
12807
12808         Remove stat module & update lstat.
12809         * config/srclist.txt (libc sources): Remove stat.
12810
12811 2005-06-24  Derek Price  <derek@ximbiot.com>
12812         and Bruno Haible  <bruno@clisp.org>
12813
12814         Remove stat module & update lstat.
12815         * MODULES.html.sh (stat): Remove.
12816         * MODULES.html: Regenerated.
12817         * modules/lstat (Description): Correct function name.
12818         (Files): Add "lstat.h".
12819         (Depends-on): Remove stat, add xalloc, stat-macros.
12820         * modules/stat: Remove this file.
12821         (Include): Add "lstat.h", remove <sys/stat.h>.
12822
12823 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12824
12825         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12826         (ranged_convert): Don't save conversion in a temporary struct.
12827         This causes a warning with GCC 4.0.0, and anyway in the typical
12828         case it's not worth the extra 100 bytes or so of code.
12829         (ranged_convert, __mktime_internal): When calling a function via a
12830         pointer P, use P () rather than (*P) (), as we now assume C89 or
12831         better.
12832
12833 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12834
12835         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
12836         "who -r" failed to give output.  Problem reported by Tim Waugh.
12837
12838         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
12839         (xcalloc): Use it to avoid needless tests.
12840         Problem reported by Jim Meyering.
12841
12842 2005-06-20  Derek Price  <derek@ximbiot.com>
12843
12844         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
12845         unnecessary for Autoconfs > 2.59c.
12846
12847 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12848
12849         * lib/argp.h (__option_is_short): Check upper limit of
12850         __key. Isprint() requires its argument to have the value
12851         of an unsigned char or EOF.
12852
12853 2005-06-16  Jim Meyering  <jim@meyering.net>
12854
12855         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
12856         when either N or S is zero.
12857
12858 2005-06-16  Derek Price  <derek@ximbiot.com>
12859
12860         * m4/bison.m4: Declare YACC & YFLAGS precious.
12861
12862 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
12863
12864         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
12865         multibyte string or pattern, fall back on unibyte matching.
12866         Problem reported by James Youngman.
12867
12868 2005-06-08  Bruno Haible  <bruno@clisp.org>
12869
12870         * modules/csharpcomp: New file.
12871         * MODULES.html.sh (C#): Add csharpcomp.
12872
12873 2005-06-08  Bruno Haible  <bruno@clisp.org>
12874
12875         * m4/csharpcomp.m4: New file, from GNU gettext.
12876
12877 2005-06-08  Bruno Haible  <bruno@clisp.org>
12878
12879         * lib/csharpcomp.h: New file, from GNU gettext.
12880         * lib/csharpcomp.c: New file, from GNU gettext.
12881         * lib/csharpcomp.sh.in: New file, from GNU gettext.
12882
12883 2005-06-08  Bruno Haible  <bruno@clisp.org>
12884
12885         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
12886         warning on mingw.
12887
12888 2005-06-07  Derek Price  <derek@ximbiot.com>
12889
12890         Sync from CVS.
12891         * lib/glob_.h: Indent nested #ifdef.
12892
12893 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12894
12895         Sync from coreutils.
12896         Use "file name" when talking about file names, instead of "filename"
12897         or "path", as per the GNU coding standards.
12898         * lib/mkdir-p.c: Renamed from makepath.c.
12899         (make_dir_parents): Renamed from make_path.  All callers changed.
12900         * lib/mkdir-p.h: Likewise.  All includers changed.
12901         * lib/filenamecat.c: Renamed from path-concat.c.
12902         (file_name_concat): Renamed from path_concat.  All callers changed.
12903         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
12904         * lib/filenamecat.h: Likewise.  All includers changed.
12905         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
12906         in comments or local variable names.
12907         * lib/basename.c: Likewise.
12908         * lib/canonicalize.c, canonicalize.h: Likewise.
12909         * lib/dirname.c, dirname.h: Likewise.
12910         * lib/euidaccess.c: Likewise.
12911         * lib/exclude.c: Likewise
12912         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
12913         * lib/fsusage.c, fsuage.h: Likewise.
12914         * lib/fts.c, fts_.h: Likewise.
12915         * lib/getcwd.c: Likewise.
12916         * lib/getloadavg.c: Likewise.
12917         * lib/mkstemp.c: Likewise.
12918         * lib/mountlist.c, mountlist.h: Likewise.
12919         * lib/openat.c, openat.h: Likewise.
12920         * lib/readlink-stub.c: Likewise.
12921         * lib/readutmp.c, readutmp.h: Likewise.
12922         * lib/rename.c: Likewise.
12923         * lib/rmdir.c: Likewise.
12924         * lib/same.c: Likewise.
12925         * lib/savedir.c: Likewise.
12926         * lib/stripslash.c: Likewise.
12927         * lib/tempname.c: Likewise.
12928         * lib/xreadlink.c: Likewise.
12929         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
12930         All uses changed.
12931         * lib/exclude.h: Likewise.
12932
12933         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
12934         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12935         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
12936         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12937         * lib/pathmax.h: Include <limits.h> unconditionally, since other
12938         files have been getting away with it for years (MORE/BSD 4.3
12939         is extinct now).
12940         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
12941         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12942
12943         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
12944         Define to 256, not 255, as per modern POSIX.
12945
12946 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12947
12948         Sync from coreutils.
12949         Use "file name" when talking about file names, instead of "filename"
12950         or "path", as per the GNU coding standards.
12951         * MODULES.html.sh: mkdir-p renamed from makepath.
12952         filenamecat renamed from path-concat.
12953         * modules/filenamecat: Renamed from modules/path-concat.
12954         (Files): filenamecat.h and filenamecat.c renamed from
12955         path-concat.h and path-concat.c.
12956         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
12957         (Include): filenamecat.h, not path-concat.h.
12958         * modules/mkdir-p: Renamed from modules/makepath.
12959         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
12960         makepath.c.
12961         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
12962         (Include): mkdir-p.h, not makepath.h.
12963
12964 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12965
12966         Sync from coreutils.
12967         * m4/mkdir-p.m4: Renamed from makepath.m4.
12968         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
12969         Rename files from makepath.c to mkdir-p.c, and from
12970         makepath.h to mkdir-p.h.
12971         * m4/filenamecat.m4: Renamed from path-concat.m4.
12972         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
12973         Rename files from path-concat.c to filenamecat.c,
12974         and from path-concat.h to filenamecat.h.
12975         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
12976         "file name" in local variables or comments.
12977         * m4/rename.m4: Likewise.
12978
12979 2005-06-01  Bruno Haible  <bruno@clisp.org>
12980
12981         * modules/csharpexec: New file.
12982         * MODULES.html.sh (C#): New section.
12983
12984 2005-06-01  Bruno Haible  <bruno@clisp.org>
12985
12986         * m4/csharp.m4: New file, from GNU gettext.
12987         * m4/csharpexec.m4: New file, from GNU gettext.
12988
12989 2005-06-01  Bruno Haible  <bruno@clisp.org>
12990
12991         * lib/csharpexec.h: New file, from GNU gettext.
12992         * lib/csharpexec.c: New file, from GNU gettext.
12993         * lib/csharpexec.sh.in: New file, from GNU gettext.
12994
12995 2005-05-31  Derek Price  <derek@ximbiot.com>
12996             Paul Eggert  <eggert@cs.ucla.edu>
12997
12998         Sync from cvs.
12999         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13000
13001 2005-05-31  Derek Price  <derek@ximbiot.com>
13002             Paul Eggert  <eggert@cs.ucla.edu>
13003
13004         Sync from cvs.
13005         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13006
13007 2005-05-29  Derek Price  <derek@ximbiot.com>
13008
13009         * config/srclist.txt (glob_.h, glob.c): Add these files.
13010
13011 2005-05-29  Derek Price  <derek@ximbiot.com>
13012
13013         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
13014         * modules/glob: New file.
13015         * modules/getlogin_r: Add link to POSIX spec in description.
13016
13017 2005-05-29  Derek Price  <derek@ximbiot.com>
13018             Paul Eggert  <eggert@cs.ucla.edu>
13019
13020         * m4/glob.m4: New file.
13021
13022 2005-05-29  Derek Price  <derek@ximbiot.com>
13023             Paul Eggert  <eggert@cs.ucla.edu>
13024
13025         * lib/glob_.h, lib/glob.c: New files.
13026
13027 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13028
13029         * modules/fts (Files): Remove m4/inttypes-pri.m4.
13030         * modules/fts-lgpl (Depends-on): Remove gettext.
13031
13032 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13033
13034         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
13035         and don't require gt_INTTYPES_PRI.
13036
13037 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13038
13039         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
13040
13041         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
13042         the configuration hassle isn't worth it.
13043         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
13044         (LONGEST_MODIFIER, PRIuMAX): Remove.
13045
13046 2005-05-27  Bruno Haible  <bruno@clisp.org>
13047
13048         * lib/getlogin_r.h: Remove second include of <stddef.h>.
13049
13050 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
13051
13052         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
13053         _POSIX_PTHREAD_SEMANTICS for Solaris.
13054
13055 2005-05-25  Derek Price  <derek@ximbiot.com>
13056
13057         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
13058
13059 2005-05-25  Derek Price  <derek@ximbiot.com>
13060             Paul Eggert  <eggert@cs.ucla.edu>
13061
13062         * modules/getlogin_r, m4/getlogin_r.m4: New files.
13063         * lib/getlogin_r.c, getlogin_r.h: New files.
13064
13065 2005-05-25  Bruno Haible  <bruno@clisp.org>
13066             Derek Price  <derek@ximbiot.com>
13067
13068         * lib/getlogin_r.h: Simplify API documentation.
13069
13070 2005-05-23  Derek Price  <derek@ximbiot.com>
13071
13072         * modules/minmax (Files): Add m4/minmax.m4.
13073         (configure.ac): Add gl_MINMAX.
13074
13075 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13076
13077         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13078         so that unistd-safer.h (GPL'ed code) need not be included.
13079
13080 2005-05-22  Bruno Haible  <bruno@clisp.org>
13081
13082         * m4/minmax.m4: New file.
13083         Based on a patch by Derek Price <derek@ximbiot.com>.
13084
13085 2005-05-22  Bruno Haible  <bruno@clisp.org>
13086
13087         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13088         (INT64_MIN): Fix definition.
13089         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13090
13091         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13092         NEED_SIGNED_INT_TYPES.
13093
13094         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13095         HAVE_SYSTEM_INTTYPES.
13096
13097 2005-05-22  Bruno Haible  <bruno@clisp.org>
13098
13099         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13100         Also include <sys/param.h> if it defines MIN, MAX.
13101         Based on a patch by Derek Price <derek@ximbiot.com>.
13102
13103 2005-05-21  Jim Meyering  <jim@meyering.net>
13104
13105         * modules/fts (Files): Add m4/inttypes-pri.m4.
13106         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13107
13108 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13109
13110         New fts module.
13111         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13112         (setup_dir, free_dir): New functions.
13113         (enter_dir, leave_dir): Define trivial
13114         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13115         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13116         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
13117         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
13118         Move to fts-cycle.c.
13119         (fts_open): Use setup_dir.
13120         (fts_close): Use free_dir.
13121         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
13122         This adds a label and some gotos, but the alternatives were messier.
13123         Check for memory allocation failure when entering a dir.
13124         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
13125         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
13126         (FTS): New member fts_cycle, that is a union that contains the
13127         old active_dir_ht and cycle_state.  All uses changed to mention
13128         fts_cycle.ht and fts_cycle.state.
13129         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
13130         fts.c, with the following changes:
13131         (setup_dir, free_dir): New functions.
13132         (enter_dir): Now returns bool.  Return true if successful, false
13133         if memory exhausted.  All callers changed.
13134         Do not bother partly cleaning up on
13135         memory allocation failure; that is free_dir's job.
13136         However, free ad if hash_insert fails, to avoid memory leak.
13137         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
13138         fts->fts_options to see which union member to use.
13139
13140 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13141
13142         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
13143         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
13144
13145 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13146
13147         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
13148
13149 2005-05-20  Jim Meyering  <jim@meyering.net>
13150
13151         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
13152         Now a macro, to pacify GCC.
13153
13154 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13155
13156         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
13157         of -1.
13158
13159 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13160
13161         * lib/chown.c (rpl_chown): Return -1 on failure.
13162
13163 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13164
13165         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
13166         Don't check for stddef.h.
13167         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
13168         don't use its results.
13169         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
13170         since we include them unconditionally.  Don't require
13171         AM_STDBOOL_H, since stdbool is a prerequisite.
13172         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
13173         since we assume C89 or better.
13174         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
13175         as we don't use their results.
13176         Don't check for fchdir, memmove, memset, strrchr, as we use
13177         them unconditionally.
13178         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
13179         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
13180
13181 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13182
13183         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
13184         Include <stddef.h> unconditionally, since we assume C89 now.
13185         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
13186         * lib/fts.c: Include fts_.h first, to check interface.
13187         Do not include intprops.h; no longer needed.
13188         Include cycle-check.h and hash.h, since fts_.h no longer does.
13189         Remove unnecessary casts of closedir to void.
13190         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
13191         decide whether to decrement nlinks.
13192         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
13193         (FTS): Use struct hash_table * instead of Hash_table, so that
13194         we no longer need to include hash.h here.
13195
13196 2005-05-18  Jim Meyering  <jim@meyering.net>
13197
13198         * modules/dirfd (License): Change to LGPL.  Most of the code
13199         is already in the public domain.
13200
13201 2005-05-18  Jim Meyering  <jim@meyering.net>
13202
13203         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
13204         Reported by Yoann Vandoorselaere.
13205
13206 2005-05-17  Jim Meyering  <jim@meyering.net>
13207
13208         * m4/fts.m4: New file, from coreutils.
13209
13210 2005-05-17  Jim Meyering  <jim@meyering.net>
13211
13212         * lib/fts.c, lib/fts_.h: New files, from coreutils.
13213
13214 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13215
13216         Sync from coreutils.
13217         * m4/unlinkdir.m4: New file.
13218
13219 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13220
13221         Sync from coreutils.
13222         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
13223         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
13224         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
13225         White space changes only.
13226         * lib/makepath.c (make_path): Port to hosts where leading "//" is
13227         special.
13228         * lib/yesno.c: Include getline.h, not ctype.h.
13229         (yesno): Don't remove leading white space; POSIX doesn't allow it.
13230         Use getline to remove arbitrary restriction on response length.
13231
13232 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13233
13234         * config/srclist-update: Spell out "Street" in FSF postal
13235         mail address; this is the style the FSF seems to prefer.
13236
13237         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
13238         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
13239         this updates FSF postal mail address.
13240
13241         Sync from coreutils.
13242         * modules/unlinkdir: New file.
13243         * modules/yesno (Depends-on): Add getline.
13244         * MODULES.html.sh (File system functions): Add unlinkdir.
13245
13246 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13247
13248         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
13249         lib/strsep.h:
13250         Change the initial comment to refer to GPL, not LGPL.
13251         gnulib-tool will change it to LGPL as needed.
13252
13253         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
13254         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
13255         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
13256         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
13257         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
13258         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
13259         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
13260         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
13261         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
13262         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
13263         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
13264         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
13265         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
13266         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
13267         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
13268         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
13269         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
13270         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
13271         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
13272         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
13273         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
13274         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
13275         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
13276         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
13277         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
13278         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
13279         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
13280         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
13281         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
13282         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
13283         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
13284         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
13285         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
13286         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
13287         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
13288         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
13289         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
13290         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
13291         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
13292         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
13293         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
13294         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
13295         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
13296         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
13297         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
13298         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
13299         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
13300         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
13301         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
13302         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
13303         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13304         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
13305         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
13306         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
13307         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
13308         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
13309         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
13310         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
13311         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
13312         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
13313         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
13314         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
13315         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
13316         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
13317         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
13318         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
13319         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
13320         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
13321         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
13322         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
13323         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
13324         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
13325         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
13326         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
13327         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
13328         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
13329         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
13330         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
13331         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
13332         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
13333         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
13334         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
13335         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
13336         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
13337         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
13338         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
13339         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
13340         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
13341         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
13342         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
13343         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
13344         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
13345         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
13346         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
13347         lib/yesno.c, lib/yesno.h:
13348         Update FSF postal mail address.
13349
13350 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13351
13352         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13353         tests/test-memmem.c, tests/test-stpncpy.c:
13354         Update FSF postal mail address.
13355
13356 2005-05-13  Bruno Haible  <bruno@clisp.org>
13357
13358         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13359         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13360         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13361         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13362         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13363         Add support for 64-bit integers in the MSVC compiler.
13364
13365 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13366
13367         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13368
13369 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13370
13371         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13372
13373 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13374
13375         * doc/getdate.texi (General date syntax): Don't say that date
13376         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13377         Problem reported by Nic Ferrier.
13378
13379 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13380
13381         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13382         specified in ai_socktype. Fix invalid ai_protocol
13383         check. ai_protocol is usually set to 0 or depending on
13384         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13385         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13386         ai_socktype / ai_protocol in the returned addrinfo structure.
13387
13388 2005-05-10  Simon Josefsson  <jas@extundo.com>
13389
13390         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13391         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13392
13393 2005-05-10  Karl Berry  <karl@gnu.org>
13394
13395         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13396         (from http://www.gnu.org/licenses).
13397         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13398         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13399         fdl.texi suffices.
13400
13401 2005-05-10  Karl Berry  <karl@gnu.org>
13402
13403         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13404         (COPYING.DOC): remove.
13405
13406         * config/srclist-update: new FSF address.
13407
13408 2005-05-10  Derek Price  <derek@ximbiot.com>
13409
13410         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13411         possible.
13412
13413 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13414             Bruno Haible  <bruno@clisp.org>
13415
13416         * modules/inet_ntop: New file.
13417         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13418         inet_ntop.
13419
13420 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13421             Bruno Haible  <bruno@clisp.org>
13422
13423         * m4/inet_ntop.m4: New file.
13424
13425 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13426             Bruno Haible  <bruno@clisp.org>
13427
13428         * lib/inet_ntop.h: New file.
13429         * lib/inet_ntop.c: New file, from glibc with modifications.
13430
13431 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13432
13433         * modules/time_r (License): Change to LGPL.
13434         * modules/extensions (License): Change to LGPL.  Actually,
13435         the license is more permissive than that, but currently gnulib-tool
13436         doesn't know how to handle more-permissive licenses.
13437
13438         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13439         Problem reported by Dave Love.
13440
13441 2005-05-08  Jim Meyering  <jim@meyering.net>
13442
13443         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13444         blank.
13445
13446 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13447
13448         * modules/argmatch (Depends-on): Add stdbool.
13449         * modules/backupfile (Depends-on): Likewise.
13450         * modules/chdir-long (Depends-on): Likewise.
13451         * modules/closeout (Depends-on): Likewise.
13452         * modules/cycle-check (Depends-on): Likewise.
13453         * modules/dirname (Depends-on): Likewise.
13454         * modules/fnmatch (Depends-on): Likewise.
13455         * modules/fsusage (Depends-on): Likewise.
13456         * modules/fwriteerror (Depends-on): Likewise.
13457         * modules/getcwd (Depends-on): Likewise.
13458         * modules/getloadavg (Depends-on): Likewise.
13459         * modules/hard-locale (Depends-on): Likewise.
13460         * modules/makepath (Depends-on): Likewise.
13461         * modules/mountlist (Depends-on): Likewise.
13462         * modules/nanosleep (Depends-on): Likewise.
13463         * modules/posixtm (Depends-on): Likewise.
13464         * modules/quotearg (Depends-on): Likewise.
13465         * modules/readtokens (Depends-on): Likewise.
13466         * modules/readtokens0 (Depends-on): Likewise.
13467         * modules/readutmp (Depends-on): Likewise.
13468         * modules/save-cwd (Depends-on): Likewise.
13469         * modules/strftime (Depends-on): Likewise.
13470         * modules/userspec (Depends-on): Likewise.
13471         * modules/utimecmp (Depends-on): Likewise.
13472         * modules/xgetcwd (Depends-on): Likewise.
13473         * modules/xnanosleep (Depends-on): Likewise.
13474         * modules/xstrtod (Depends-on): Likewise.
13475         * modules/yesno (Depends-on): Likewise.
13476
13477 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13478
13479         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13480         needless checks.
13481
13482 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13483
13484         Merge from coreutils.  Among other things,
13485         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13486         * lib/fd-safer.c: New file.
13487         * lib/fcntl-safer.h, open-safer.c: Remove.
13488         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13489         * lib/dup-safer.c: Include unistd-safer.h first.
13490         Don't include errno.h.
13491         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
13492         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
13493         * lib/file-type.c: Rely on file-type.h change.
13494         * lib/getloadavg.c: Include unistd-safer.h.
13495         (getloadavg): Use safer open.
13496         * lib/getusershell.c: Include "stdio-safer.h".
13497         (getusershell): Use safer fopen.
13498         * lib/long-options.c (long_options): Use NULL rather than 0.
13499         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13500         'free'.
13501         * lib/modechange.c: Likewise.
13502         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13503         (MODE_DONE): New constant.
13504         (struct mode_change): Remove 'next' member.
13505         (make_node_op_equals): New function; like the old one of the
13506         same name, except it allocates an array.
13507         (mode_compile, mode_create_from_ref): Use it.
13508         (mode_compile): Allocate result as an array, not a linked list.
13509         Parse octal string ourself, so that we catch mistakes like "+0".
13510         (mode_adjust): Arg is an array, not a linked list.
13511         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13512         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13513         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13514         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
13515         Remove.  This is now stat-macros.h's job.
13516         (talloc): Remove.  All callers replaced by xalloc, so that
13517         our invokers don't have to worry about reporting memory failures.
13518         (make_node_op_equals): Remove.
13519         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13520         New constants.
13521         (struct mode_change): Moved here from modechange.h.
13522         (mode_append_entry): Remove.
13523         (mode_compile): Remove MASKED_OPS arg, since it encouraged
13524         apps to have incorrect behavior.  Use simpler algorithm for head
13525         and tail.  Don't futz with umask; that's now the job of mode_adjust.
13526         Detect more invalid usages rather than having somewhat-random behavior.
13527         Don't insert an "a=" action, as that leads to incorrect behavior.
13528         (mode_compile, mode_create_from_ref): Return NULL on error instead
13529         of an enum, since now there's only one way to have an error.  All
13530         callers changed.
13531         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
13532         at the correct time.  Simplify calculation of "+u" and its ilk.
13533         Don't mishandle "+X".
13534         (mode_free): Remove "register" and localize decls.
13535         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13536         (struct mode_change): Move to modechange.c; callers don't
13537         need to see this stuff.
13538         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
13539         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
13540         (mode_change, mode_adjust): Reflect the new signatures noted above.
13541         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
13542         that might redefine system include files.
13543         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
13544         (my_usleep): Use NULL rather than (void *) 0.
13545         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
13546         Use siginterrupt to specify that system calls should be interrupted.
13547         (rpl_nanosleep): Move initialization of suspended closer to call of
13548         my_usleep.
13549         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
13550         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
13551         (desirable_utmp_entry): New function.
13552         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
13553         using x2nrealloc, to simplify logic.
13554         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
13555         size calculation.  Do not assume utmp file is a regular file.
13556         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
13557         (READ_UTMP_CHECK_PIDS): New constant.
13558         * lib/save-cwd.c: Include unistd-safer.h.
13559         (save_cwd): Use fd_safer.
13560         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
13561         [!_LIBC] Include "stat-macros.h" instead.
13562         * lib/unistd-safer.h (fd_safer): New decl.
13563
13564 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13565
13566         * modules/getloadavg (Depends-on): Add unistd-safer.
13567         * modules/getusershell (Depends-on): Add stdio-safer.
13568         * modules/lstat (Depends-on): Remove xalloc.
13569         * modules/mkstemp (Depends-on): Add stat-macros.
13570         * modules/modechange (Depends-on): Remove xstrtol.
13571         Add stat-macros, xalloc.
13572         * modules/save-cwd (Depends-on): Add unistd-safer.
13573         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13574         * modules/unistd-safer (Files): Add lib/fd-safer.c
13575         (Makefile.am): Remove lib_SOURCES.
13576
13577         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13578         Remove fcntl-safer; unistd-safer supersedes it.
13579
13580 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13581
13582         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13583         AC_HEADER_STAT.
13584         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13585         (gl_PREREQ_CHOWN): Remove.
13586         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13587         it.  Don't require AC_HEADER_STAT.
13588         (gl_PREREQ_LSTAT): Remove.
13589         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13590         Don't require AC_HEADER_STAT.
13591         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13592         (gl_PREREQ_RMDIR): Remove.
13593         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13594         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13595         the stat-macros module a prerequisite.
13596         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13597         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13598         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13599         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13600         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13601         variable names.
13602         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13603         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13604         variable prefixes.
13605         * m4/fcntl-safer.m4: Remove.
13606         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13607         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13608         Invoke gl_PREREQ_FD_SAFER.
13609         (gl_PREREQ_FD_SAFER): New macro.
13610         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13611         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13612         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13613         Remove duplicate call to AC_LIBOBJ(readutmp).
13614         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13615
13616         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13617         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13618
13619 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13620
13621         * MODULES.html.sh (Misc): Add byteswap.
13622
13623 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13624
13625         * modules/getcwd (Depends-on): Add extensions.
13626         * modules/openat (Depends-on): Likewise.
13627
13628 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13629
13630         * modules/byteswap: New file.
13631
13632 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13633
13634         * m4/byteswap.m4: New file.
13635
13636 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13637
13638         * lib/byteswap_.h: New file.
13639
13640 2005-04-25  Karl Berry  <karl@gnu.org>
13641
13642         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13643
13644 2005-04-25  Albert Chin  <china@thewrittenword.com>
13645
13646         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13647         Toolkit C bug.
13648
13649 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13650
13651         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13652         (func_ln_if_changed) Remove forcibly for no error message
13653         in case file does not exist.
13654
13655 2005-04-19  Simon Josefsson  <jas@extundo.com>
13656
13657         * gnulib-tool (Options): Make --symlink mean --symbolic.
13658
13659 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13660
13661         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13662
13663 2005-04-16  Simon Josefsson  <jas@extundo.com>
13664
13665         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13666
13667 2005-04-15  Simon Josefsson  <jas@extundo.com>
13668
13669         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13670
13671 2005-04-15  Simon Josefsson  <jas@extundo.com>
13672
13673         * gnulib-tool: Rename --symlink to --symbolic.
13674
13675 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13676
13677         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13678         symbolic links to files instead of copying/moving.  Add --aux-dir,
13679         specifying directory relative --dir where auxiliary build tools
13680         are placed.
13681
13682 2005-04-14  Bruno Haible  <bruno@clisp.org>
13683
13684         * modules/allocsa (License): Change to LGPL.
13685         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13686
13687 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13688
13689         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13690         that "UTC +1 second" continues to work.  Problem reported
13691         by Dmitry V. Levin.
13692         (relunit_snumber): New rule.
13693         (relunit): Use it.
13694
13695 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13696
13697         * lib/getdate.y (universal_time_zone_table): New constant.
13698         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13699         universal_time_zone_table.
13700         (lookup_zone): Prefer universal_time_zone_table to
13701         local_time_zone_table, so that "GMT" time stamps are allowed in
13702         London during the summer.  Problem reported by Ian Abbott.
13703
13704 2005-04-12  Jim Meyering  <jim@meyering.net>
13705
13706         * lib/human.c (humblock): Set *options even when returning due to
13707         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13708         warning from gcc-4.
13709
13710 2005-04-09  Jim Meyering  <jim@meyering.net>
13711
13712         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13713         -Wuninitialized: initialize tm0.tm_year.
13714
13715 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13716
13717         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13718         count, since there's no maximum.  All uses changed.
13719         Add member dsts_seen.
13720         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13721         not being INT_MAX.
13722         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13723         Use pc_rels_seen to decide whther a date is absolute.
13724
13725         * lib/getdate.y (number): Don't overwrite year.
13726         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13727         check.
13728
13729 2005-04-02  Simon Josefsson  <jas@extundo.com>
13730
13731         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13732         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13733
13734 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13735
13736         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13737         where no absolute path name can be longer than PATH_MAX.
13738
13739 2005-03-27  Jim Meyering  <jim@meyering.net>
13740
13741         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13742
13743 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13744
13745         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13746         "one's complement" -> "ones' complement" in comment, as per Knuth.
13747         "value of type" -> "type or expression" in comment.
13748         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13749
13750 2005-03-26  Jim Meyering  <jim@meyering.net>
13751
13752         Comment nits.
13753         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13754         Correct typos: s/or/of/.
13755
13756 2005-03-26  Jim Meyering  <jim@meyering.net>
13757
13758         * modules/check-include-files: Move to ../ and rename to...
13759         * check-module: ...this.
13760
13761 2005-03-25  Jim Meyering  <jim@meyering.net>
13762
13763         * modules/xvasprintf (Files): Add xalloc.h.
13764
13765 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13766
13767         * modules/gettext (Files): config/config.rpath ->
13768         build-aux/config.rpath
13769         * modules/iconv (Files): Likewise.
13770         Problem reported by Oskar Liljeblad.
13771
13772 2005-03-23  Jim Meyering  <jim@meyering.net>
13773
13774         * modules/check-include-files: New script to check for
13775         missing dependencies, multiple includes, etc.
13776
13777         * modules/c-strtold (Depends-on): Add xalloc.
13778         * modules/c-strtod (Depends-on): Add xalloc.
13779         * modules/hash (Depends-on): Add xalloc.
13780         (Files): Remove lib/xalloc.h.
13781
13782         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13783         * modules/userspec (Files): Add lib/inttostr.h.
13784
13785 2005-03-23  Jim Meyering  <jim@meyering.net>
13786
13787         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13788
13789 2005-03-22  Jim Meyering  <jim@meyering.net>
13790
13791         * modules/stat-macros: New module.
13792         * modules/canonicalize, modules/euidaccess, modules/file-type,
13793         * modules/filemode, modules/lchown, modules/makepath,
13794         * modules/rmdir, modules/stat: Depend on new stat-macros module
13795         rather than listing lib/stat-macros.h manually.
13796         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13797
13798 2005-03-22  Jim Meyering  <jim@meyering.net>
13799
13800         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13801
13802 2005-03-22  Bruno Haible  <bruno@clisp.org>
13803
13804         * config/srclist.txt: Replace target directory 'config' with
13805         'build-aux'.
13806         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13807         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13808         ../build-aux/.
13809
13810 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13811
13812         * modules/chdir-long (Depends-on): Add mempcpy.
13813
13814         * modules/acl, modules/backupfile, modules/c-strtod,
13815         modules/c-strtold, modules/canon-host, modules/canonicalize,
13816         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13817         modules/exclude, modules/exitfail, modules/file-type,
13818         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13819         modules/getdate, modules/getline, modules/getpagesize,
13820         modules/getpass, modules/getugroups, modules/group-member,
13821         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13822         modules/inttostr, modules/long-options, modules/makepath,
13823         modules/md5, modules/memcasecmp, modules/memcoll,
13824         modules/modechange, modules/mountlist, modules/path-concat,
13825         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13826         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13827         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
13828         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
13829         modules/strftime, modules/strndup, modules/strverscmp,
13830         modules/timespec, modules/unlocked-io, modules/userspec,
13831         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
13832         modules/yesno:
13833         Remove lib_SOURCES line from Makefile.am section, as this is now
13834         done automatically by the corresponding Autoconf macro.
13835
13836 2005-03-21  Jim Meyering  <jim@meyering.net>
13837
13838         Changes imported from coreutils.
13839
13840         * lib/cycle-check.c: Don't include xalloc.h.
13841
13842         * lib/path-concat.c: Don't include assert.h.
13843         (path_concat): Remove assertion that would have triggered
13844         for ABASE starting with more than one slash.
13845         Reported by Andreas Schwab.
13846
13847         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
13848         properly when ABASE is an absolute file name.
13849         Correct the description of this function.
13850         Include <assert.h>.
13851         Add an assertion and a test driver.
13852         This fixes a bug introduced on 2004-07-02.
13853         Andreas Schwab reported the resulting failure of cp --parents:
13854         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
13855
13856 2005-03-21  Jim Meyering  <jim@meyering.net>
13857
13858         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
13859         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
13860
13861 2005-03-21  Jim Meyering  <jim@meyering.net>
13862         and  Paul Eggert  <eggert@cs.ucla.edu>
13863
13864         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
13865         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
13866         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
13867         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
13868         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
13869         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
13870         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
13871         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
13872         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
13873         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
13874         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
13875         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
13876         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
13877         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
13878         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
13879         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
13880         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
13881         for these modules.
13882
13883 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
13884
13885         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
13886         (which shouldn't happen), generate nothing instead of returning 0
13887         immediately, so that nstrftime (NULL, ...) doesn't return 0.
13888
13889 2005-03-16  Bruno Haible  <bruno@clisp.org>
13890
13891         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
13892         HAVE_LONGLONG_64BIT.
13893
13894 2005-03-16  Bruno Haible  <bruno@clisp.org>
13895
13896         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
13897         HAVE_LONGLONG_64BIT.
13898
13899 2005-03-16  Bruno Haible  <bruno@clisp.org>
13900
13901         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
13902         HAVE_LONGLONG_64BIT.
13903
13904 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13905
13906         * lib/strftime.c (my_strftime): Prepend space to format so that we can
13907         reliably distinguish strftime failure from empty output on POSIX
13908         hosts.
13909
13910 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13911
13912         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
13913         (iconv_string): Don't guess a size-zero buffer, as that might cause
13914         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
13915         result would be 'too large', where 'too large' is (heuristically)
13916         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
13917         overflow concerns.  This will prevent some unwanted malloc failures
13918         when the inputs are very large.
13919
13920 2005-03-15  Karl Berry  <karl@gnu.org>
13921
13922         * config/srclist.txt (config.rpath): from gettext.
13923         * config/config.rpath: update.
13924
13925 2005-03-15  Bruno Haible  <bruno@clisp.org>
13926
13927         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
13928         to 'negate'.
13929
13930         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
13931         variable.
13932
13933         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
13934         results.
13935
13936 2005-03-14  Simon Josefsson  <jas@extundo.com>
13937
13938         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
13939         <fx@gnu.org>.
13940
13941 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
13942
13943         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
13944         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
13945         intprops.h.
13946         * lib/strtol.c: Likewise.
13947
13948 2005-03-14  Jim Meyering  <jim@meyering.net>
13949
13950         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
13951         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
13952         to be nonzero so that we (and caller) can detect the difference
13953         between a valid zero-length expansion and an error return, even
13954         when the underlying strftime fails before writing anything into
13955         that location.
13956
13957 2005-03-14  Bruno Haible  <bruno@clisp.org>
13958
13959         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
13960         Update from GNU gettext 0.14.3.
13961
13962 2005-03-10  Jim Meyering  <jim@meyering.net>
13963
13964         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
13965
13966 2005-03-10  Jim Meyering  <jim@meyering.net>
13967
13968         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
13969         so that this module works on systems without fchdir.
13970
13971 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
13972
13973         Factor int-properties macros into a single file, except for
13974         glibc-related files.
13975         * lib/intprops.h: New file.
13976         * lib/getloadavg.c: Include it instead of limits.h.
13977         (INT_STRLEN_BOUND): Remove.
13978         * lib/human.c: Include intprops.h.
13979         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
13980         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
13981         302/1000.
13982         * lib/inttostr.h: Include intprops.h instead of limits.h.
13983         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
13984         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
13985         for consistency with intprops.h.
13986         (time_t_is_integer, twos_complement_arithmetic): Use them.
13987         * lib/sig2str.h: Include <signal.h>, intprops.h.
13988         (INT_STRLEN_BOUND): Remove.
13989         * lib/strftime.c (TYPE_SIGNED): Remove.
13990         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
13991         * lib/strtol.c: Adjust comments to match intprops.h.
13992         * lib/userspec.c: Include intprops.h.
13993         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
13994         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
13995         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
13996         instead of rolling our own expressions.
13997         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
13998
13999         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
14000         instead of int.
14001         (my_strftime): Do not mishandle years close to INT_MAX, by doing
14002         the right thing even if adding 1900 would overflow.  Similarly
14003         for tm_mon + 1 and tm_yday + 1.
14004         Make %Y always equivalent to %C%y, and similarly for %G and %g.
14005         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
14006         (DO_SIGNED_NUMBER): New macro.
14007         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
14008
14009 2005-03-07  Bruno Haible  <bruno@clisp.org>
14010
14011         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
14012
14013 2005-03-07  Bruno Haible  <bruno@clisp.org>
14014
14015         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
14016
14017 2005-03-04  Derek R. Price  <derek@ximbiot.com>
14018
14019         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
14020         (func_import): Only replace files via --import when they have actually
14021         changed.
14022
14023 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14024
14025         * m4/mmap-anon.m4: New file.
14026         * m4/pagealign_alloc.m4: New file.
14027
14028 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14029             Bruno Haible  <bruno@clisp.org>
14030
14031         * modules/pagealign_alloc: New file.
14032         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
14033
14034 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14035             Bruno Haible  <bruno@clisp.org>
14036
14037         * lib/pagealign_alloc.h: New file.
14038         * lib/pagealign_alloc.c: New file.
14039
14040 2005-03-03  Bruno Haible  <bruno@clisp.org>
14041
14042         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
14043         Use an all-permissive copyright notice, recommended by RMS.
14044
14045 2005-03-02  Bruno Haible  <bruno@clisp.org>
14046
14047         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
14048         of AIX, the replacement has to be done only after <string.h> is
14049         included, therefore not in config.h. stpncpy.h does the replacement,
14050         and stpncpy.c uses it.
14051
14052 2005-03-02  Bruno Haible  <bruno@clisp.org>
14053
14054         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
14055         stpncpy.c uses it.
14056
14057 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14058
14059         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
14060         The workaround isn't strictly needed for POSIX conformance, and
14061         it's too much of a pain to configure and maintain.  We'll ask
14062         people to fix their kernels instead.
14063         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
14064         (NANOSLEEP_BUG_WORKAROUND): Remove.
14065         (xnanosleep): Remove the workaround.
14066
14067 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14068
14069         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
14070         Reported by Derek Price.
14071         (Include): Add "timespec.h".
14072
14073         * modules/xnanosleep (Depends-on): Remove gethrxtime.
14074
14075 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14076
14077         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14078         to detect nanosleep bug.
14079
14080 2005-03-01  Bruno Haible  <bruno@clisp.org>
14081
14082         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14083
14084 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14085
14086         * modules/gethrxtime: New file.
14087         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14088         (Depends-on): Add gethrxtime.
14089         (configure.ac): Add gl_XNANOSLEEP.
14090         (Makefile.am): Remove lib_SOURCES line.
14091
14092 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14093
14094         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14095         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14096
14097 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14098
14099         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14100         * lib/timespec.h (gettime): Return void, since it always
14101         succeeds now.  All uses changed.
14102         * lib/gettime.c (gettime) Likewise.
14103         [HAVE_NANOTIME]: Prefer nanotime.
14104         Assume gettimeofday succeeds, as POSIX requires.
14105         Assime time () succeeds, since other code already does.
14106         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14107         (timespec_subtract): Remove.
14108         (NANOSLEEP_BUG_WORKAROUND): New constant.
14109         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14110         things considerably.  Use it only on GNU/Linux hosts, since the
14111         workaround shouldn't be needed elsewhere.
14112
14113 2005-02-24  Bruno Haible  <bruno@clisp.org>
14114
14115         * modules/gettext (Files): Add m4/glibc2.m4.
14116
14117 2005-02-24  Bruno Haible  <bruno@clisp.org>
14118
14119         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
14120         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
14121         * m4/progtest.m4:
14122         Update from GNU gettext 0.14.2.
14123         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
14124
14125 2005-02-24  Bruno Haible  <bruno@clisp.org>
14126
14127         * lib/localcharset.c: Update from GNU gettext 0.14.2.
14128         * lib/config.charset: Update from GNU gettext 0.14.2.
14129
14130 2005-02-24  Bruno Haible  <bruno@clisp.org>
14131
14132         * lib/gettext.h: Update from GNU gettext 0.14.2.
14133
14134 2005-02-23  Simon Josefsson  <jas@extundo.com>
14135
14136         * m4/iconvme.m4: New file.
14137
14138 2005-02-23  Jim Meyering  <jim@meyering.net>
14139
14140         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
14141         change.
14142         Thanks to Bruno Haible for catching it.
14143
14144 2005-02-22  Simon Josefsson  <jas@extundo.com>
14145
14146         * modules/iconvme: New file.
14147
14148         * MODULES.html.sh: Add iconvme.
14149
14150 2005-02-22  Simon Josefsson  <jas@extundo.com>
14151
14152         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
14153
14154 2005-02-22  Simon Josefsson  <jas@extundo.com>
14155
14156         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
14157
14158 2005-02-22  Jim Meyering  <jim@meyering.net>
14159
14160         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
14161         s/ifndef/ifdef/.
14162
14163 2005-02-20  Neil Conway  <neilc@samurai.com>
14164
14165         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
14166         returned by OSX/Darwin if the specified buffer is not large
14167         enough for the hostname.
14168
14169 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14170
14171         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
14172         pass it to _help, otherwise the latter coredumps trying to
14173         dereference state.root_argp.
14174
14175 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14176
14177         * modules/chdir-long (Depends-on): Add memrchr.
14178         * modules/memrchr (Files): Add lib/memrchr.h.
14179         (Include): "memrchr.h".
14180
14181 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14182
14183         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
14184
14185 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14186
14187         * lib/memrchr.h: New file.
14188         * lib/chdir-long.c: Include it.
14189         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
14190         Don't bother including stddef.h.
14191
14192 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
14193
14194         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
14195         inclusion.
14196         Include <sys/types.h>, for dev_t.
14197         (ME_DUMMY, ME_REMOTE): Move from here....
14198         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
14199         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
14200         Dmitry V. Levin.
14201         Include mountlist.h first, to test the interface.
14202
14203 2005-01-29  Bruno Haible  <bruno@clisp.org>
14204
14205         * lib/progname.c (program_name): Initialize.
14206         Needed when linking statically on MacOS X.
14207
14208 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14209
14210         Sync from coreutils.
14211         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
14212         (Depends-on): Add c-strtod.
14213         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
14214
14215 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14216
14217         Sync from coreutils.
14218         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
14219
14220         Remove files that are specific to coreutils.
14221         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
14222
14223 2005-01-28  Bruno Haible  <bruno@clisp.org>
14224
14225         * modules/javacomp: New file.
14226         * MODULES.html.sh (Java): Add javacomp.
14227
14228 2005-01-28  Bruno Haible  <bruno@clisp.org>
14229
14230         * m4/javacomp.m4: New file, from GNU gettext.
14231
14232 2005-01-28  Bruno Haible  <bruno@clisp.org>
14233
14234         * lib/javacomp.sh.in: New file, from GNU gettext.
14235         * lib/javacomp.h: New file, from GNU gettext.
14236         * lib/javacomp.c: New file, from GNU gettext.
14237
14238 2005-01-26  Simon Josefsson  <jas@extundo.com>
14239
14240         * lib/gai_strerror.c: Use GPL in header.
14241
14242 2005-01-26  Bruno Haible  <bruno@clisp.org>
14243
14244         * modules/javaexec: New file.
14245         * MODULES.html.sh (Java): Add javaexec.
14246
14247 2005-01-26  Bruno Haible  <bruno@clisp.org>
14248
14249         * m4/javaexec.m4: New file, from GNU gettext.
14250
14251 2005-01-26  Bruno Haible  <bruno@clisp.org>
14252
14253         * lib/javaexec.sh.in: New file, from GNU gettext.
14254         * lib/javaexec.h: New file, from GNU gettext.
14255         * lib/javaexec.c: New file, from GNU gettext.
14256
14257 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14258
14259         * modules/lchown (Depends-on): Remove lchown.h
14260
14261 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14262
14263         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
14264         must be defined if the header file was not found, in order
14265         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
14266
14267 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14268
14269         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
14270         initializers for struct pentry_state.
14271         (__argp_error): Check return value of __asprintf
14272         (__argp_failure): Translate error message
14273
14274         * lib/argp-parse.c: Removed braces around the expansion of N_()
14275
14276 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14277
14278         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
14279         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
14280         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
14281         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
14282         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
14283         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
14284         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
14285         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
14286         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
14287         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
14288         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
14289         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
14290         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
14291         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
14292         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
14293         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
14294         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
14295         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
14296         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
14297         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
14298         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
14299         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
14300         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
14301         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
14302         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
14303         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
14304         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
14305         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
14306         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
14307         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
14308         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
14309         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
14310         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
14311         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
14312         xstrtol.m4, xstrtoumax.m4, yesno.m4:
14313         Use an all-permissive copyright notice, recommended by RMS.
14314
14315 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
14316
14317         * modules/chdir-long (Depends-on): Remove mempcpy.
14318
14319 2005-01-21  Jim Meyering  <jim@meyering.net>
14320
14321         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
14322         same value as for Solaris 9.
14323
14324         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
14325         component length.  This included changing the parameter to be
14326         of type `char *' rather than `char const *'.
14327         * lib/chdir-long.h (chdir_long): Update prototype.
14328
14329         * lib/openat.c (fdopendir, fstatat): New functions.
14330         * lib/openat.h: Include headers required for use of DIR and struct
14331         stat.
14332         [AT_SYMLINK_NOFOLLOW]: Define.
14333         (fdopendir, fstatat): Add prototypes.
14334
14335 2005-01-21  Bruno Haible  <bruno@clisp.org>
14336
14337         * modules/classpath: New file.
14338         * MODULES.html.sh (Java): Add classpath.
14339
14340 2005-01-21  Bruno Haible  <bruno@clisp.org>
14341
14342         * lib/classpath.h: New file, from GNU gettext.
14343         * lib/classpath.c: New file, from GNU gettext.
14344
14345 2005-01-20  Simon Josefsson  <jas@extundo.com>
14346
14347         * modules/version-etc-fsf: New file.
14348
14349 2005-01-20  Simon Josefsson  <jas@extundo.com>
14350
14351         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14352         * lib/version-etc.c: Remove version_etc_copyright.
14353         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14354         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14355
14356 2005-01-20  Simon Josefsson  <jas@extundo.com>
14357
14358         * lib/base64.h (isbase64): Add.
14359
14360         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14361         using a unsigned prototype, don't inline.
14362         (base64_decode): Use it.
14363
14364 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14365
14366         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14367         it.
14368
14369 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14370
14371         * lib/save-cwd.c (save_cwd): Remove code to support the case
14372         where fchdir is missing or flaky.
14373
14374 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14375
14376         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14377
14378 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14379
14380         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14381         AC_LIBSOURCES now does this.
14382         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14383         with new ullong_max module.
14384
14385 2005-01-19  Bruno Haible  <bruno@clisp.org>
14386
14387         * modules/sh-quote: New file.
14388         * MODULES.html.sh (Executing programs): Add sh-quote.
14389
14390 2005-01-19  Bruno Haible  <bruno@clisp.org>
14391
14392         * lib/sh-quote.h: New file, from GNU gettext.
14393         * lib/sh-quote.c: New file, from GNU gettext.
14394
14395 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14396
14397         Merge from coreutils.
14398         * m4/ullong_max.m4: New file.
14399         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14400         (gl_MACROS): Assume localeconv exists.
14401
14402 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14403
14404         Merge changes from coreutils, as described below in several
14405         changelogs dated today.
14406
14407         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14408         (O_DIRECTORY): Remove; not needed here, since "." must be
14409         a directory.  All uses removed.
14410         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14411         universal on Suns, and we also need to test for IRIX.
14412         Revamp code to use 'if' rather than '#if'.
14413         Avoid unnecessary comparison of cwd->desc to 0.
14414
14415         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14416         for known valid error numbers rather than observed invalid ones.
14417
14418 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14419
14420         * modules/ullong_max: New file.
14421
14422         * modules/chdir-long, modules/openat: New files.
14423         * modules/save-cwd (Depends-on): Depend on chdir-long.
14424         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14425
14426 2005-01-18  Jim Meyering  <jim@meyering.net>
14427
14428         Merge from coreutils.
14429         * m4/chdir-long.m4, m4/openat.m4: New files.
14430         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14431         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14432         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14433         is sane and DOES follow symlinks.  Besides, testing 20 different
14434         systems found no broken chown implementations.
14435         Prompted by a change in rsync's copy of this macro.
14436         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14437
14438         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14439
14440         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14441         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14442         NULL-means-set-to-current-time semantics.
14443         Remove temporary file immediately, rather than waiting
14444         for configure's at-exit trap code to do it.
14445
14446 2005-01-18  Jim Meyering  <jim@meyering.net>
14447
14448         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14449
14450         * lib/utimens.c (futimens): Account for the fact that futimes
14451         can also fail with errno == ENOSYS or errno == ENOENT.
14452         Patch from Dmitry V. Levin.
14453
14454         Change the name of the robust chdir function from chdir to chdir_long.
14455         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14456         (restore_cwd): Use chdir_long, not chdir.
14457         * lib/chdir-long.c: Renamed from chdir.c.
14458         * lib/chdir-long.h: Renamed from chdir.h.
14459         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14460         Hurd.
14461
14462 2005-01-18  Bruno Haible  <bruno@clisp.org>
14463
14464         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14465         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14466         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14467         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14468         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14469         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14470         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14471         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14472         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14473         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14474         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14475         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14476         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14477         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14478         Use an all-permissive copyright notice, recommended by RMS.
14479
14480 2005-01-18  Bob Proulx  <bob@proulx.com>
14481
14482         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14483         simplify offsetof() macro construct to avoid compile failure with
14484         native HP-UX 11.0 ANSI C compiler.
14485
14486 2005-01-17  Bruno Haible  <bruno@clisp.org>
14487
14488         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14489         redundant because stpncpy.m4 takes care of it.
14490
14491 2005-01-17  Bruno Haible  <bruno@clisp.org>
14492
14493         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
14494
14495 2005-01-17  Bruno Haible  <bruno@clisp.org>
14496
14497         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14498         used.
14499
14500 2005-01-17  Bruno Haible  <bruno@clisp.org>
14501
14502         * lib/fwriteerror.h (fwriteerror): Change specification to include
14503         fclose.
14504         * lib/fwriteerror.c: Include <stdbool.h>.
14505         (fwriteerror): At the end, close the file stream. Record whether
14506         stdout was already closed.
14507
14508 2005-01-17  Bruno Haible  <bruno@clisp.org>
14509
14510         * lib/execute.c (environ): Declare if needed.
14511         * lib/pipe.c (environ): Likewise.
14512         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14513
14514 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14515
14516         * modules/argp: Depend on vsnprintf
14517
14518 2005-01-10  Jim Meyering  <jim@meyering.net>
14519
14520         * modules/closeout (Depends-on): Add atexit.
14521
14522 2005-01-06  Bruno Haible  <bruno@clisp.org>
14523
14524         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
14525
14526 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14527
14528         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
14529         definitions to be after all include files, to avoid collisions.
14530         Problem reported by Bob Proulx.
14531
14532 2005-01-04  Jim Meyering  <jim@meyering.net>
14533
14534         Changes imported from coreutils.
14535         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
14536         as the mkstemp template, use a temporary directory and an
14537         8.3-friendly template to avoid trouble on systems like DJGPP.
14538         Reported by Juan M. Guerrero via Stepan Kasal.
14539         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
14540         close. Remove the temporary directory right away, rather than waiting
14541         for configure's at-exit trap code to do it.
14542         Suggestion from Stepan Kasal.
14543
14544 2005-01-01  Simon Josefsson  <jas@extundo.com>
14545
14546         * gnulib-tool: Print #include directives when --import'ing.
14547
14548 2004-12-28  Simon Josefsson  <jas@extundo.com>
14549
14550         * tests/test-base64.c: Include required header files.  Remove
14551         unused variables.
14552
14553 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14554
14555         * modules/error (Depends-on): Remove gettext.
14556
14557 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14558
14559         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
14560         not needed.  This removes a dependency on the gettext module.
14561         [defined _LIBC]: Do not include <libintl.h>; not needed.
14562
14563 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14564
14565         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14566         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14567
14568 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14569
14570         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14571         HAVE_DECL_STRTOLD.
14572
14573 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14574
14575         * modules/getdate (Depends-on): Remove alloca-opt.
14576
14577 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14578
14579         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14580
14581 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14582
14583         * lib/argp-parse.c: Include <stddef.h>.
14584         (alignof, alignto): New macros.
14585         (parser_init): Don't assume that void * is aligned sufficiently
14586         for struct option.
14587
14588         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14589         need to extend the stack.
14590         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14591         large.
14592
14593 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14594
14595         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14596
14597 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14598
14599         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14600         (2004-10-24) change.  Apparently this was a false alarm.
14601
14602         * modules/getdate: Depend on alloca-opt, not alloca.
14603
14604 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14605
14606         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14607         Remove now-obsolete comment about AIX.
14608         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14609         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14610         (YYMAXDEPTH): New macro.
14611
14612 2004-12-18  Simon Josefsson  <jas@extundo.com>
14613
14614         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14615
14616 2004-12-18  Bruno Haible  <bruno@clisp.org>
14617
14618         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14619
14620 2004-12-18  Bruno Haible  <bruno@clisp.org>
14621
14622         * lib/fatal-signal.c (fatal_signals): Make non-const.
14623         (init_fatal_signals): New function.
14624         (uninstall_handlers, install_handlers): Ignore signals that were set to
14625         SIG_IGN.
14626         (at_fatal_signal): Call init_fatal_signals.
14627         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14628         SIG_IGN.
14629         Reported by Paul Eggert.
14630
14631 2004-12-18  Bruno Haible  <bruno@clisp.org>
14632
14633         * doc/alloca.texi: New file.
14634         * doc/alloca-opt.texi: New file.
14635
14636 2004-12-17  Jim Meyering  <jim@meyering.net>
14637
14638         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14639         Otherwise, install-sh could exit with improper exit status when
14640         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14641
14642 2004-12-16  Simon Josefsson  <jas@extundo.com>
14643
14644         * tests/test-base64.c: Add license.
14645
14646 2004-12-15  Stepan Kasal  <address@hidden>
14647
14648         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14649
14650 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14651
14652         * modules/getcwd (Files): Add m4/d-ino.m4.
14653         Suggested by Mark D. Baushke.
14654
14655 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14656
14657         * lib/getdate.y (textint): New member "negative".
14658         (time_zone_hhmm): New function.
14659         Expect 14 shift-reduce conflicts, not 13.
14660         (o_colon_minutes): New rule.
14661         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14662         (yylex): Set the "negative" member of signed numbers.
14663
14664 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14665
14666         * doc/getdate.texi (Time of day items, Time zone items):
14667         Describe new formats +00:00, UTC+00:00.
14668
14669 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14670
14671         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14672         spurious "-l"s.  Problem reported by Stepan Kasal.
14673
14674 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14675
14676         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14677         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14678
14679 2004-12-04  Simon Josefsson  <jas@extundo.com>
14680
14681         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14682         Vandoorselaere <yoann@prelude-ids.org>.
14683
14684 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14685
14686         Changes imported from coreutils.
14687         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14688         exist.
14689         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14690
14691 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14692
14693         Changes imported from coreutils.
14694         * lib/hard-locale.c: Assume <locale.h> exists.
14695         Include "strdup.h".
14696         (GLIBC_VERSION): New macro.
14697         (hard_locale): Assume setlocale exists.
14698         Rewrite to avoid #ifdef.
14699         Use strdup rather than malloc + strcpy.
14700         * lib/human.c: Assume <locale.h> exists.
14701         (human_readable): Assume localeconv exists.
14702
14703 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14704
14705         * modules/hard-locale (Depends-on): Add strdup.
14706
14707 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14708
14709         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14710         convert T2, not T.  (Imported from libc.)
14711
14712 2004-11-30  Simon Josefsson  <jas@extundo.com>
14713
14714         * modules/restrict (License): Change to LGPL.
14715
14716 2004-11-30  Simon Josefsson  <jas@extundo.com>
14717
14718         * m4/restrict.m4: Add copyright and copying conditions.
14719
14720 2004-11-30  Simon Josefsson  <jas@extundo.com>
14721
14722         * m4/base64.m4: New file.
14723
14724 2004-11-30  Simon Josefsson  <jas@extundo.com>
14725
14726         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14727         base64.
14728
14729         * tests/test-base64.c: New file.
14730
14731         * modules/base64: New file.
14732
14733 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14734
14735         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14736         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14737
14738         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14739
14740 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14741
14742         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14743         (__getcwd.c): Don't restore errno; glibc doesn't.
14744         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14745         first, falling back to our code only if its results look suspicious.
14746         Ensure that the resulting buffer is only as large as necessary.
14747
14748         * lib/readutmp.c: Include readutmp.h first.
14749         Include <errno.h>, since readutmp.h no longer does that.
14750         * lib/readutmp.h: Don't include <errno.h>,
14751         <sys/param.h>, <time.h>; not needed to establish interface.
14752         (errno): Remove decl.
14753         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14754         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14755         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14756
14757 2004-11-28  Simon Josefsson  <jas@extundo.com>
14758
14759         * lib/base64.h, base64.c: New file.
14760
14761 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14762
14763         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14764
14765 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14766
14767         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14768         (Depends-on): Remove pathmax, same.  Add mempcpy.
14769         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14770         (Makefile.am): Append getcwd.h to lib_SOURCES.
14771         (Include): Add getcwd.h.
14772         (Maintainer): Change from Jim Meyering to "all, glibc",
14773         since getdate now uses intended-for-glibc code.
14774         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14775         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14776
14777 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14778
14779         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14780         HP's ANSI C compiler.
14781         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14782         Declaring int functions causes warnings on some modern systems and
14783         shouldn't be needed to compile on ancient ones.
14784         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14785         defined.
14786
14787         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14788         with the following changes.
14789         (__set_errno): Parenthesize properly.
14790         Include <stdbool.h>.
14791         (MIN, MAX, MATCHING_INO): New macros.
14792         (__getcwd): Define with prototype, not K&R form.
14793         Use heuristics to allocate default buffer on stack if possible.
14794         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14795         behavior, and to avoid the PATH_MAX limit when computing
14796         ../../../../...
14797         Use MATCHING_INO to compare inode number to file.
14798         Check for arithmetic overflow in size calculations.
14799         Fix bug in reallocation of dot array that caused getcwd to fail
14800         on directories nested deeper than 75.
14801         Be more careful about saving errno on error.
14802         Do not use realloc; use only free+malloc, as this is a bit
14803         more flexible and avoids a needless copy operation.
14804         Do not inspect st_dev and st_ino for symbolic links; POSIX
14805         doesn't specify the latter.
14806         Check for closedir errors.
14807         Avoid needless casts.
14808         Use "#ifdef weak_alias" around weak_alias, to be like other
14809         glibc code.
14810         The following changes to getcwd.c have effect only when used in
14811         gnulib; they have no effect inside glibc proper.
14812         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14813         as alloca isn't used.
14814         (alloca, __alloca): Likewise.
14815         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14816         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14817         unconditionally, as gnulib assumes C89 or better.
14818         Do not include <sys/param.h>.
14819         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14820         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14821         better.
14822         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14823         Include <dirent.h> in a way that is compatible with modern Autoconf.
14824         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14825         New macros, if not already defined.
14826         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14827         Use "_LIBC", not "defined _LIBC", for consistency.
14828         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
14829         a mempcpy module.
14830         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
14831         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
14832         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
14833         credit only to Jim Meyering and adjust the copyright dates.
14834         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
14835         <stdlib.h>, <unistd.h>, "pathmax.h".
14836         Instead, include "xgetcwd.h" (first) and "getcwd.h".
14837         (INITIAL_BUFFER_SIZE): Remove.
14838         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
14839
14840 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14841
14842         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
14843         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
14844         Use the _ONCE methods, for efficiency.
14845         Check for fcntl.h.  In test program, include <errno.h>
14846         and <fcntl.h> if available.  Remove old K&R cruft from
14847         test program.  Check for common errors in GNU/Linux,
14848         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
14849         don't do AC_LIBOBJ, as that's getcwd.m4's job.
14850         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
14851         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
14852         name accordingly.
14853         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
14854         accommodate new getcwd.c.
14855         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
14856         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
14857         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
14858         that's all we need now.
14859
14860 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14861
14862         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
14863         argp-parse.c depends on getopt internals, that means we should
14864         always use our getopt, to be on the safe side.
14865         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
14866         order not to spoil the result of an eventual previous invocation
14867         of gl_GETOPT_SUBSTITUTE.
14868
14869 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14870
14871         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
14872         redefinition warnings. To avoid them, include the defines
14873         in `#if !defined __need_getopt ... #endif'. The only place
14874         where __getopt_argv_const is used is in definitions
14875         of getopt_long and getopt_long_only below, which are as well
14876         protected by `#ifndef __need_getopt'.
14877         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
14878         __need_getopt after including <stdio.h> and <unistd.h> These
14879         headers might have defined it.
14880
14881 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14882
14883         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
14884
14885 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14886
14887         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
14888         (futimens): New function, which uses futimes if available.
14889         (futimens, utimens): Support timespec==NULL, with same semantics
14890         as utime and utimens.
14891         * lib/utimens.h (futimens): New decl.
14892
14893 2004-11-23  Jim Meyering  <jim@meyering.net>
14894
14895         * lib/getopt_.h: Remove trailing blanks.
14896
14897 2004-11-23  Jim Meyering  <jim@meyering.net>
14898
14899         * lib/__fpending.c: Add comment.
14900
14901 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
14902
14903         * modules/canonicalize (Depends-on): Add xreadlink.
14904         Problem reported by James Youngman.
14905
14906 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
14907
14908         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
14909         New macros.
14910         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
14911         optopt): Use them instead of invoking ## directly; otherwise, the
14912         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
14913
14914 2004-11-19  Bruno Haible  <bruno@clisp.org>
14915
14916         * lib/strtok_r.c: Move comments from here...
14917         * lib/strtok_r.h: ... to here.
14918
14919 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14920
14921         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
14922         implementations that mishandle size_t overflow.
14923
14924 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14925
14926         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
14927         might fail.  Problem reported by Yoann Vandoorselaere.
14928         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
14929         implementations that mishandle size_t overflow.
14930
14931 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14932
14933         * modules/canon-host (Depends-on): Add strdup.
14934
14935 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14936
14937         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
14938
14939 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14940
14941         * lib/canon-host.c: Include "strdup.h".
14942         (canon_host): Use getaddrinfo if available, so that IPv6 works.
14943         Use strdup instead of malloc/strcpy to duplicate strings.
14944
14945         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
14946         (human_space_before_unit): New constant.
14947         * lib/human.c (human_readable): Support it.
14948
14949         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
14950         (xgetcwd): Set errno correctly when failing.
14951         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
14952         the failure is actually due to a PATH_MAX problem.
14953
14954         Further getopt changes to make it more likely that glibc will
14955         buy the changes back.
14956         * lib/getopt.c (POSIXLY_CORRECT): New constant.
14957         (getopt): Use it, so to preserve glibc semantic
14958         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
14959         when compiling for libc.
14960         * lib/getopt_.h (__getopt_argv_const): Bring it back.
14961         (getopt_long, getopt_long_only): Use it.
14962
14963         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14964         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
14965         (getopt): Argv is now char * const *, as per standard.
14966         (_getopt_internal_r, _getopt_internal): Argv is now char **,
14967         not char *__getopt_argv_const *.
14968         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14969         _getopt_long_only_r): Likewise.
14970         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
14971         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14972         _getopt_long_r, _getopt_long_only_r): Likewise.
14973         * lib/getopt_.h (__getopt_argv_const): Remove.
14974         (getopt): Argv is now char * const *, as per standard.
14975
14976         * lib/getdate.y (tORDINAL): New token.
14977         (day, relunit): Allow it for relative times.
14978         (relative_time_table): Use tORDINAL for ordinals.
14979
14980 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14981
14982         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
14983         Document that "second" isn't allowed as an ordinal number.
14984
14985 2004-11-16  Jim Meyering  <jim@meyering.net>
14986
14987         * modules/closeout (Depends-on): Add fpending.
14988
14989 2004-11-15  Jim Meyering  <jim@meyering.net>
14990
14991         * lib/closeout.c: Include "__fpending.h" once again.
14992         Include <stdbool.h>.
14993         (close_stdout): Don't fail just because stdout was closed initially,
14994         since some programs don't write to stdout in the normal course of
14995         operation (other than --version and --help), and we don't want this
14996         function to make e.g. `touch file >&-' fail.
14997         But do fail if it was closed and someone has tried to write to it.
14998         E.g., `printf foo >&-' must fail.
14999
15000 2004-11-13  Jim Meyering  <jim@meyering.net>
15001
15002         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
15003
15004 2004-11-12  Simon Josefsson  <jas@extundo.com>
15005
15006         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
15007         small doc fix is still pending.
15008
15009 2004-11-11  Simon Josefsson  <jas@extundo.com>
15010
15011         * modules/strtok_r: New file.
15012
15013         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15014         strtok_r.
15015
15016 2004-11-11  Simon Josefsson  <jas@extundo.com>
15017
15018         * m4/strtok_r.m4: New file.
15019
15020         * m4/getopt.m4: Replace opterr.
15021
15022 2004-11-11  Simon Josefsson  <jas@extundo.com>
15023
15024         * lib/strtok_r.h, strtok_r.c: New file.
15025
15026 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15027
15028         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
15029         of replacing opterr, getopt, etc.  This should handle the
15030         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
15031
15032 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15033
15034         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
15035         we can stop lying to compilers about the constness of argv when we
15036         are compiled outside glibc.
15037         (getopt, getopt_long, getopt_long_only): Use it.
15038         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15039         _getopt_internal, getopt): Likewise.
15040         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15041         _getopt_long_only_r): Likewise.
15042         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15043         _getopt_long_r, _getopt_long_only_r): Likewise.
15044
15045         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
15046         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
15047         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
15048         the other external symbols.
15049         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
15050         declaration, since the above renaming now works around collisions.
15051
15052 2004-11-11  Jim Meyering  <jim@meyering.net>
15053
15054         * lib/linebreak.c: Remove trailing blanks.
15055         * lib/alloca_.h: Likewise.
15056         * lib/acosl.c: Likewise.
15057         * lib/euidaccess.c: Likewise.
15058         * lib/allocsa.h: Likewise.
15059
15060 2004-11-10  Simon Josefsson  <jas@extundo.com>
15061
15062         * m4/getaddrinfo.m4: New file.
15063
15064 2004-11-10  Simon Josefsson  <jas@extundo.com>
15065
15066         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
15067
15068 2004-11-10  Simon Josefsson  <jas@extundo.com>
15069
15070         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15071         getaddrinfo.
15072
15073         * modules/getaddrinfo: New file.
15074
15075 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15076
15077         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15078
15079 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15080
15081         * lib/mktime.c (SHR): New macro, which is a portable
15082         substitute for >> that should work even on Crays.
15083         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15084         Problem reported by Mark D. Baushke in
15085         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15086         * lib/getdate.y (SHR): Likewise.
15087         (tm_diff): Use it.
15088         * lib/strftime.c (SHR): Likewise.
15089         (tm_diff): Use it.
15090         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15091         quote_these_too, so that right shifts are well defined.  All uses
15092         changed.
15093
15094 2004-11-10  Jim Meyering  <jim@meyering.net>
15095
15096         Ensure that no close failure goes unreported.
15097         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15098         return early when it seems there's nothing to flush.
15099         Don't include __fpending.h.
15100
15101 2004-11-10  Jim Meyering  <jim@meyering.net>
15102
15103         * modules/closeout (Depends-on): Remove fpending.
15104
15105 2004-11-10  Jim Meyering  <jim@meyering.net>
15106
15107         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15108
15109 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15110
15111         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15112         gl_FUNC_STRFTIME.
15113         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15114         and AC_REQUIRE when possible, to avoid duplicate checks.
15115         Check for <wchar.h>.
15116
15117 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15118
15119         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
15120
15121 2004-11-09  Bruno Haible  <bruno@clisp.org>
15122
15123         * m4/sockpfaf.m4: New file.
15124
15125 2004-11-05  Bruno Haible  <bruno@clisp.org>
15126
15127         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
15128         Reported by Mark D. Baushke <mdb@cvshome.org>.
15129
15130 2004-11-04  Bruno Haible  <bruno@clisp.org>
15131
15132         2004-09-11  Bruno Haible  <bruno@clisp.org>
15133                 * allocsa.valgrind: New file.
15134         2004-02-06  Bruno Haible  <bruno@clisp.org>
15135                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
15136                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
15137                 Reported by Christopher Seip <chris.seip@hp.com>.
15138
15139 2004-11-04  Bruno Haible  <bruno@clisp.org>
15140
15141         * modules/allocsa (Files): Add lib/allocsa.valgrind.
15142         (Makefile.am): Distribute it.
15143
15144 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
15145
15146         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
15147         with errno == ERANGE if the buffer is too small.
15148         Problem reported by Mark D. Baushke.
15149
15150 2004-11-03  Albert Chin  <china@thewrittenword.com>
15151             Paul Eggert  <eggert@cs.ucla.edu>
15152
15153         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
15154         equivalent, substitute $ac_type for equivalent type rather than
15155         blindly using uint32_t *always* which won't work if uint32_t is not
15156         available.  Define _UINT32_T to work around typedef of uint32_t if
15157         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
15158         2.5.1.
15159
15160 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15161
15162         * m4/jm-macros.m4: Sync from coreutils.
15163         (gl_MACROS): Check for mbrlen, for pathchk.
15164         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
15165
15166 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15167
15168         * lib/xreadlink.c (MAXSIZE): New macro.
15169         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
15170         size does not exceed MAXSIZE.  Avoid cast.
15171         As suggested by Mark D. Baushke in
15172         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
15173         if readlink fails with buffer size just under MAXSIZE, try again
15174         with MAXSIZE.
15175
15176 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15177
15178         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
15179
15180 2004-11-02  Derek R. Price  <derek@ximbiot.com>
15181         and  Paul Eggert  <eggert@cs.ucla.edu>
15182
15183         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
15184         (get_date): Overparenthesize to avoid GCC warning.
15185
15186 2004-11-02  Bruno Haible  <bruno@clisp.org>
15187
15188         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
15189         returns void.
15190
15191 2004-11-02  Bruno Haible  <bruno@clisp.org>
15192
15193         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
15194         function returns void.
15195
15196 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15197
15198         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
15199         fflush_unlocked, flockfile, funlockfile, funlockfile,
15200         fputs_unlocked, putc_unlocked.
15201
15202 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15203
15204         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15205         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
15206         already declared.
15207
15208 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15209
15210         * modules/getdate (Files): Add doc/getdate.texi.
15211         (Depends-on): Add setenv, xalloc.
15212
15213 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15214
15215         * lib/getdate.y: Add support for TZ="foo" within a date string.
15216         Fix some bugs near time_t boundaries.  Reject dates with
15217         out-of-range components, e.g., "Sept 31".
15218         Include <stdlib.h>, "setenv.h", "xalloc.h".
15219         (ISDIGIT_LOCALE): Remove; unused.
15220         Note that the TZ and time functions used here are not reentrant.
15221         (mktime_ok, get_tz): New functions.
15222         (TZBUFSIZE): New constant.
15223         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
15224         This requires that we sometimes generate our own TZ="XXX..." setting.
15225
15226 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15227
15228         * doc/getdate.texi: New file, from coreutils with modifications for
15229         the new TZ parsing.
15230
15231 2004-10-27  Derek R. Price  <derek@ximbiot.com>
15232
15233         * lib/mktime.c (not_equal_tm): Remove redundant check.
15234
15235 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15236
15237         * modules/regex (lib_SOURCES): Add regex.c.
15238         Reported by James Youngman in
15239         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
15240
15241 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15242
15243         * lib/getdate.y: Use Bison 1.875 features, and some minor
15244         code cleanups.  This change does not affect semantics.
15245         Don't include <stdlib.h>; no longer needed.
15246         Don't include unlocked-io.h; only the "#if TEST" code uses
15247         stdio, and performance isn't crucial there.
15248         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
15249         Bison 1.875 features as described below.
15250         All uses of "PC." replaced by "pc->".
15251         (YYSTYPE): Add a forward declaration.
15252         (yylex, yyerror): Use full prototypes in forward decls.
15253         Use "%pure-parser" rather than obsolescent "%pure_parser".
15254         Use %parse-param and %lex-param instead of obsolescent
15255         YYPARSE_PARAM and YYLEX_PARAM.
15256         (meridian_table, month_and_day_table, time_units_table,
15257         relative_time_table, time_zone_table, military_table,
15258         lookup_zone, lookup_word, get_date):
15259         Use NULL instead of 0 where appropriate.
15260         (to_hour): Avoid abort (), to avoid a dependency on
15261         stdlib.h.
15262         (yyerror, yylex): Now accepts parser_control * arg.
15263         (main) [TEST]: Use '\0' rather than 0 for char.
15264
15265 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15266
15267         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
15268
15269 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15270
15271         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
15272         It's now the caller's responsibility to handle the case where
15273         !HAVE_GETPAGESIZE && !defined getpagesize.
15274
15275         * lib/mktime.c (leapyear): Arg is long int, not int.
15276
15277 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
15278
15279         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
15280
15281 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
15282
15283         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
15284         missing.  Problem reported by James Youngman.
15285
15286 2004-10-16  Simon Josefsson  <jas@extundo.com>
15287
15288         * gnulib-tool: Fix comments.  Fix parse problem.
15289         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
15290
15291 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
15292
15293         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
15294         implementation of getopt_long.  Problem reported by Alexander Taler in:
15295         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
15296
15297 2004-10-15  Bruno Haible  <bruno@clisp.org>
15298
15299         * gnulib-tool: Untabify. Initialize supplied_libname.
15300         (func_usage): More homogenous output.
15301         (func_modules_transitive_closure, func_modules_to_filelist,
15302         func_emit_lib_Makefile_am): New functions.
15303         (func_import): New function, extracted from big case statement. Use
15304         func_get_license, func_modules_transitive_closure,
15305         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
15306         opt_lgpl. Don't use test -a, as it's not portable.
15307         (func_create_testdir): Use func_modules_transitive_closure,
15308         func_modules_to_filelist, func_emit_lib_Makefile_am.
15309
15310 2004-10-15  Bruno Haible  <bruno@clisp.org>
15311
15312         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
15313
15314 2004-10-15  Bruno Haible  <bruno@clisp.org>
15315
15316         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
15317         the portions belonging to each module.
15318         Suggested by Derek Robert Price <derek@ximbiot.com>.
15319
15320 2004-10-12  Simon Josefsson  <jas@extundo.com>
15321
15322         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15323         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
15324         to real functions.
15325
15326 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15327
15328         * modules/vsnprintf: New file.
15329
15330 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15331
15332         * m4/vsnprintf.m4: New file.
15333
15334 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15335
15336         * lib/vsnprintf.h: New file.
15337         * lib/vsnprintf.c: New file.
15338
15339 2004-10-11  Bruno Haible  <bruno@clisp.org>
15340
15341         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
15342         vsnprintf.
15343
15344 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15345
15346         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
15347
15348 2004-10-07  Bruno Haible  <bruno@clisp.org>
15349
15350         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15351         fits into the provided buffer.
15352
15353 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15354
15355         * lib/diacrit.c, diacrit.h: Add GPL notice.
15356
15357         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15358         notice.
15359         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15360         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15361         This avoids a potential constant-folding bug.
15362
15363 2004-10-05  Bruno Haible  <bruno@clisp.org>
15364
15365         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15366         for the declaration of strsep.
15367
15368 2004-10-05  Bruno Haible  <bruno@clisp.org>
15369
15370         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15371
15372 2004-10-04  Simon Josefsson  <jas@extundo.com>
15373
15374         * modules/memmem: New file.
15375         * tests/test-memmem.c: New file.
15376         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15377
15378 2004-10-04  Simon Josefsson  <jas@extundo.com>
15379
15380         * m4/memmem.m4: New file.
15381
15382 2004-10-04  Simon Josefsson  <jas@extundo.com>
15383
15384         * lib/memmem.h: New file.
15385         * lib/memmem.c: New file, taken from glibc.
15386
15387 2004-10-04  Simon Josefsson  <jas@extundo.com>
15388
15389         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15390         '#ifdef USE_UNLOCKED_IO'.
15391
15392 2004-10-04  Simon Josefsson  <jas@extundo.com>
15393
15394         * config/srclist.txt: Add memmem from glibc.
15395
15396 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15397
15398         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15399
15400         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15401         modules/exclude, modules/getdate, modules/getline,
15402         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15403         modules/getusershell, modules/linebuffer, modules/md5,
15404         modules/mountlist, modules/posixtm, modules/readtokens,
15405         modules/readutmp, modules/regex, modules/sha1,
15406         modules/version-etc, modules/yesno:
15407         Remove dependency on unlocked-io.
15408
15409 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15410
15411         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15412
15413         * m4/unlocked-io.m4: Add copyright notice.
15414         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15415
15416 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15417
15418         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15419         * lib/xmalloc.c (xmemdup): Likewise.
15420         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15421         XFREE): Remove these long-obsolescent macros.
15422         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15423         * lib/xstrdup.c: Remove.
15424
15425         * lib/regex.c (re_comp): Cast gettext return value to char *,
15426         Problem reported by Martin Neitzel via Mark D. Baushke.
15427
15428 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15429
15430         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15431         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15432         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15433         regex.c, sha1.c, version-etc.c, yesno.c:
15434         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15435         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15436         the includer's responsibility.
15437
15438         Sync from coreutils.
15439
15440         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15441         points to the start of a string, as the C Standard says the
15442         resulting behavior is undefined.
15443
15444         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15445         simple -> simple_backups, numbered_existing ->
15446         numbered_existing_backups, numbered -> numbered_backups
15447         to avoid shadowing problems.  All uses changed.
15448         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15449         * lib/backupfile.c (check_extension, numbered_backup):
15450         Rename locals to avoid shadowing 'basename'.
15451         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15452         once.
15453
15454         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15455         * lib/.cvsignore: Add getopt.h.
15456
15457 2004-10-04  Bruno Haible  <bruno@clisp.org>
15458
15459         * modules/README: New file.
15460         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15461         not a module.
15462
15463 2004-10-02  Jim Meyering  <jim@meyering.net>
15464
15465         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15466
15467 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15468
15469         * modules/strsep: New file.
15470
15471 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15472
15473         * m4/strsep.m4: New file.
15474
15475 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15476
15477         * lib/strsep.h: New file.
15478         * lib/strsep.c: New file.
15479
15480 2004-10-01  Simon Josefsson  <jas@extundo.com>
15481
15482         * lib/snprintf.c (snprintf): Handle size==0.
15483
15484 2004-10-01  Simon Josefsson  <jas@extundo.com>
15485             Bruno Haible  <bruno@clisp.org>
15486
15487         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15488         (snprintf): Declare 'args'.
15489
15490 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
15491
15492         * lib/snprintf.c: Remove comments as to why each header is needed.
15493
15494 2004-10-01  Bruno Haible  <bruno@clisp.org>
15495
15496         * MODULES.html.sh: Add strsep.
15497
15498 2004-09-30  Simon Josefsson  <jas@extundo.com>
15499
15500         * modules/snprintf: New file.
15501
15502 2004-09-30  Simon Josefsson  <jas@extundo.com>
15503
15504         * m4/snprintf.m4: New file.
15505
15506 2004-09-30  Simon Josefsson  <jas@extundo.com>
15507
15508         * lib/snprintf.h, lib/snprintf.c: New files.
15509
15510 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15511
15512         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15513         (hol_entry_help): Never translate an empty string.
15514         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
15515         * lib/argp.h (OPTION_NO_TRANS): New option.
15516
15517 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15518
15519         * modules/argp (Maintainer): Replace Simon Josefsson
15520         by Sergey Poznyakoff.
15521
15522 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15523
15524         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
15525         changes merged back into glibc.
15526
15527 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15528
15529         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
15530
15531 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15532
15533         * lib/xvasprintf.c: Include xalloc.h.
15534         (xvasprintf): Use xalloc_die, not xmalloc_die.
15535
15536 2004-09-29  Bruno Haible  <bruno@clisp.org>
15537
15538         * modules/alloca-opt: New file, derived from modules/alloca.
15539         * modules/allocsa: Depend on alloca-opt instead of alloca.
15540         * modules/setenv: Likewise.
15541         * modules/vasnprintf: Likewise.
15542         * MODULES.html.sh: Add alloca-opt.
15543
15544 2004-09-28  Simon Josefsson  <jas@extundo.com>
15545
15546         * gnulib-tool: New parameter --lgpl, to asseert that modules are
15547         LGPL, and to replace license template from GPL to LGPL.
15548
15549 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15550
15551         * modules/dummy: Change license to LGPL.
15552
15553 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15554
15555         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
15556
15557 2004-09-24  Simon Josefsson  <jas@extundo.com>
15558
15559         * modules/minmax (License): Change from GPL to LGPL.
15560
15561 2004-09-23  Simon Josefsson  <jas@extundo.com>
15562
15563         * gnulib-tool (--import): Typo.
15564
15565 2004-09-23  Simon Josefsson  <jas@extundo.com>
15566
15567         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15568
15569 2004-09-22  Bruno Haible  <bruno@clisp.org>
15570
15571         * modules/*: Add 'License' field.
15572         * gnulib-tool: Accept --extract-license option.
15573         (func_get_license): New function.
15574
15575 2004-09-21  Bruno Haible  <bruno@clisp.org>
15576
15577         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15578         Reported by Simon Josefsson.
15579
15580 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15581
15582         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15583         gl_AC_TYPE_LONG_LONG.
15584
15585 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15586
15587         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15588
15589 2004-09-18  Simon Josefsson  <jas@extundo.com>
15590         and  Paul Eggert  <eggert@cs.ucla.edu>
15591
15592         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15593         calls with autoreconf.  Define GL_LIB.
15594
15595 2004-09-14  Karl Berry  <karl@gnu.org>
15596
15597         * config/srclist.txt: unsync setenv.c, sigh.
15598
15599 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15600
15601         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15602         Problem reported by Bruno Haible in:
15603         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15604
15605 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15606
15607         * config/srclist.txt: Comment out argp-pvh.c.
15608
15609 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15610
15611         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15612         in case some system header has #define'd it.  Problem reported by
15613         Soeren D. Schulze in
15614         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15615
15616 2004-09-09  Karl Berry  <karl@gnu.org>
15617
15618         * regex.[ch]: delete from the root.  These were supposed to be
15619                 synced with emacs cvs, but this has not happened for about
15620                 a year, and anyway nothing else uses emacs regex.[ch].
15621                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15622                 lib/regex[.ch] is untouched.
15623
15624 2004-09-09  Bruno Haible  <bruno@clisp.org>
15625
15626         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15627
15628 2004-09-09  Bruno Haible  <bruno@clisp.org>
15629
15630         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15631         modifications.
15632         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15633
15634 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15635
15636         * modules/xvasprintf: New file.
15637         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15638
15639 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15640
15641         * lib/xvasprintf.h: New file.
15642         * lib/xvasprintf.c: New file.
15643         * lib/xasprintf.c: New file.
15644
15645 2004-09-08  Bruno Haible  <bruno@clisp.org>
15646
15647         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15648
15649 2004-09-08  Bruno Haible  <bruno@clisp.org>
15650
15651         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15652         length is > INT_MAX.
15653         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15654         more.
15655
15656 2004-09-08  Bruno Haible  <bruno@clisp.org>
15657
15658         * lib/stdint_.h: New file, taken from GNU clisp.
15659
15660 2004-09-08  Bruno Haible  <bruno@clisp.org>
15661             Oskar Liljeblad  <oskar@osk.mine.nu>
15662
15663         * modules/stdint: New file.
15664         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15665
15666 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15667
15668         Import from coreutils.
15669         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15670         strings on unbounded length.  alloca's performance benefits aren't
15671         that important here.
15672         (V_STRDUP): Remove.
15673         (parse_with_separator): New function, with most of the internals
15674         of the old parse_user_spec.  Allow user to omit both user and group,
15675         for compatibility with FreeBSD.
15676         Clone only the user name, not the entire spec.
15677         Do not set *uid, *gid unless entirely successful.
15678         Avoid memory leak in some failing cases.
15679         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15680         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15681         (parse_user_spec): Rewrite to use parse_with_separator.
15682
15683 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15684
15685         * modules/userspec: Don't depend on alloca.
15686
15687 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15688
15689         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15690
15691 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15692
15693         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15694         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15695         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15696
15697 2004-08-16  Simon Josefsson  <jas@extundo.com>
15698
15699         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15700         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15701         Add --dry-run for --import.
15702         Let user provided command line parameters override configure.ac
15703         settings.
15704
15705 2004-08-12  Simon Josefsson  <jas@extundo.com>
15706
15707         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15708         as discussed with Paul Eggert in threads rooted at
15709         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15710         and
15711         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15712         Before, the test was empty, and relied on ELIDE_CODE in source
15713         code.)
15714         (gl_PREREQ_GETOPT): New macro.
15715         (gl_GETOPT): Use them.
15716
15717 2004-08-12  Simon Josefsson  <jas@extundo.com>
15718
15719         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15720         * lib/getopt_.h: Renamed from getopt.h.
15721
15722 2004-08-12  Simon Josefsson  <jas@extundo.com>
15723
15724         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15725         Change default library name from libfoo to libgnu.
15726         Now, if you have a configure.ac that says:
15727                 gl_SOURCE_BASE(gl)
15728                 gl_M4_BASE(gl/m4)
15729                 gl_MODULES(error getopt etcetera)
15730                 gl_INIT
15731         you can import all you need by running:
15732                 ../gnulib/gnulib-tool --import
15733
15734         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15735         (Makefile.am): Rewrite, use logic from argz.
15736         (Include): Use <getopt.h> instead of "getopt.h".
15737
15738 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15739
15740         * modules/argp (Files): Add m4/unlocked-io.m4.
15741         (Depends-on): Add extensions.
15742
15743 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15744
15745         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15746         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15747         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15748         Check for program_invocation_name, program_invocation_short_name,
15749         flockfile, funlockfile, features.h, _getopt_long_only_r.
15750
15751 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15752
15753         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15754         its complicated substitute.
15755         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15756         and program_invocation_name.
15757         (__argp_basename) [!_LIBC]: Remove; the only use was
15758         replaced by its body.
15759         (__argp_short_program_name): Change condition from
15760         !defined __argp_short_program_name to
15761         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15762         to match argp-namefrob.h.
15763         (__argp_failure): Don't assume strerror_r returns char *.
15764         * lib/argp-parse.c (N_): Define unconditionally.
15765         (argp_default_options): Fill out initializers with 0 to avoid
15766         gcc warnings.
15767
15768 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15769
15770         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15771         getopt1.c.
15772
15773 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15774
15775         Merge from coreutils.
15776
15777         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15778
15779         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15780         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15781
15782 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15783
15784         Merge from coreutils.
15785
15786         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15787         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15788         for Reliant Unix 5.43.
15789
15790         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15791         (union fooround): Use uintmax_t, not long int.
15792         The rest is a merge from libc:
15793         [defined _LIBC]: Include <shlib-compat.h>.
15794         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15795
15796         * lib/settime.c (settime): Recode to avoid warning with
15797         Sun Forte C 6U2.
15798
15799         * lib/strverscmp.c: Convert to UTF-8.
15800
15801 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15802
15803         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15804         m4/uintmax_t.m4.
15805
15806 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15807
15808         * modules/xalloc-die: New file.
15809         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15810
15811         * modules/md5 (Files): Add m4/uint32_t.m4.
15812         * modules/sha1: Renamed from modules/sha.
15813         (Files):
15814         Rename lib/sha.h to lib/sha1.h.
15815         Rename lib/sha.c to lib/sha1.c.
15816         Rename m4/sha.m4 to m4/sha1.m4.
15817         (lib_SOURCES): Likewise.
15818         (configure.ac): Rename gl_SHA to gl_SHA1.
15819         (Include): sha.h -> sha1.h.
15820
15821 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15822
15823         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15824         * m4/sha1.m4: Renamed from sha.m4.
15825         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15826
15827 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15828
15829         * lib/obstack.h (obstack_empty_p):
15830         Don't assume that chunk->contents is suitably aligned.
15831         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
15832         Likewise. Problem reported by Benno in
15833         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
15834
15835         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
15836         readable.  This could be improved further but it'd take some work.
15837
15838 2004-08-08  Simon Josefsson  <jas@extundo.com>
15839
15840         * modules/xgethostname (Depends-on): Remove exit and error (not
15841         used).
15842
15843         * modules/getpass-gnu: Add getpass.h.
15844         (Depends-on): Add stdbool.
15845         * modules/getpass: Add getpass.h.
15846
15847 2004-08-08  Simon Josefsson  <jas@extundo.com>
15848
15849         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
15850         Check getpass declaration.
15851
15852 2004-08-08  Simon Josefsson  <jas@extundo.com>
15853
15854         * lib/xgethostname.c: Don't include error.h (not used).
15855
15856         * lib/getpass.h: Add.
15857         * lib/getpass.c: Include getpass.h first.
15858
15859 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
15860
15861         * lib/xalloc-die.c: New file.
15862         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
15863         All uses removed.
15864         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
15865         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
15866         xalloc-die.c.
15867         (_, N_, xalloc_die): Move to xalloc-die.c.
15868         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
15869         so that we needn't mess with xalloc_msg_memory_exhausted.
15870
15871         * lib/sha1.h: Renamed from sha.h.
15872         (SHA1_H): Renamed from _SHA_H.
15873         (sha1_ctx): Renamed from sha_ctx.
15874         (sha1_init_ctx): Renamed from sha_init_ctx.
15875         (sha1_process_block): Renamed from sha_process_block.
15876         (sha1_process_bytes): Renamed from sha_process_bytes.
15877         (sha1_finish_ctx): Renamed from sha_finish_ctx.
15878         (sha1_read_ctx): Renamed from sha_read_ctx.
15879         (sha1_stream): Renamed from sha_stream.
15880         (sha1_buffer): Renamed from sha_buffer.
15881         * lib/sha1.c: Likewise; renamed from sha.c.
15882         Do not include <sys/types.h>.
15883         Include <stddef.h> rather than <stdlib.h>.
15884
15885 2004-08-08  Bruno Haible  <bruno@clisp.org>
15886
15887         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
15888         FILESYSTEM_PREFIX_LEN.
15889         * lib/progreloc.c: Likewise.
15890         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
15891
15892 2004-08-06  Simon Josefsson  <jas@extundo.com>
15893
15894         * modules/progname (Depends-on): Don't depend on stdbool.
15895
15896 2004-08-06  Simon Josefsson  <jas@extundo.com>
15897
15898         * modules/getsubopt: New file.
15899         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15900         getsubopt.
15901
15902 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15903
15904         More merge from coreutils.
15905
15906         * m4/utimens.m4, m4/utimecmp.m4: New files.
15907         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
15908         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
15909         prereq.m4, sha.m4: Import changes from coreutils.
15910
15911 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15912
15913         More merge from coreutils.
15914         * modules/raise, modules/readtokens0, modules/utimens:
15915         * modules/utimecmp, module/xnanosleep: New files.
15916         * modules/strftime: Add lib/strftime.h.
15917         Change include from <time.h> to "strftime.h".
15918         * modules/yesno: Add lib/yesno.h.
15919         * modules/backupfile: Remove lib/addext.c.
15920         * modules/euidaccess: Add stat-macros.h.
15921         * modules/canonicalize, modules/euidaccess,
15922         modules/filemode, modules/lchown, modules/makepath,
15923         modules/rmdir, modules/stat: Likewise.
15924
15925 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15926
15927         Merge from tar.
15928         * lib/argp-help.c (make_hol, hol_append): Don't assume that
15929         SIZE_MAX is a valid preprocessor constant.
15930         (__argp_basename): Change from "#ifndef _LIBC"
15931         to "#ifndef __argp_short_program_name", so that
15932         we don't compile these functions for tar.
15933
15934         More merges from coreutils.
15935         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
15936         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
15937         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
15938         * lib/addext.c: Remove; no longer needed.
15939         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
15940         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
15941         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
15942         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
15943         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
15944         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
15945         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
15946         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
15947         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
15948         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15949         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
15950         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
15951         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
15952         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
15953         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
15954         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
15955         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
15956         Import changes from coreutils.
15957
15958 2004-08-05  Simon Josefsson  <jas@extundo.com>
15959
15960         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
15961
15962 2004-08-05  Simon Josefsson  <jas@extundo.com>
15963
15964         * m4/getsubopt.m4: New file.
15965
15966 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15967
15968         Merge from coreutils.
15969
15970         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
15971         * m4/getcwd-path-max.m4: New files.
15972
15973         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
15974         FILESYSTEM_PREFIX_LEN ->
15975         FILE_SYSTEM_PREFIX_LEN.
15976         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
15977         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
15978         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
15979         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
15980
15981         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
15982         prerequisite modules now handle the DOS stuff.
15983         Don't check for unistd.h.
15984
15985 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15986
15987         Merge from coreutils.
15988
15989         * lib/.gdb-history: Remove; this doesn't belong here.
15990
15991         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
15992         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
15993         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
15994         * lib/getcwd.c: New files.
15995
15996         * lib/dirname.h: Include <stdbool.h>.
15997         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
15998         for consistency with POSIX terminology.  All uses changed.
15999         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
16000         (strip_trailing_slashes): Use bool for booleans.
16001         * lib/stripslash.c (strip_trailing_slashes): Likewise.
16002
16003         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
16004         sometimes returns a positive errno value even when it succeeds.
16005         (print_errno_message) [!LIBC]: Fall back on strerror if
16006         __strerror_r fails.
16007
16008         * lib/path-concat.c (mempcpy): Don't define if a system header defines
16009         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
16010         (longest_relative_suffix): New function.
16011         (path_concat): Use it.  Assume first argument is not NULL.
16012         Port to DOS.  Omit redundant separators.
16013         Report an error instead of returning NULL.
16014         Use mempcpy instead of memcpy.
16015         (xpath_concat): Remove: not declared or used.
16016
16017         * lib/same.h: Include <stdbool.h>
16018         (same_name): Return bool, not int.
16019         * lib/same.c (same_name): Likewise.
16020         (errno): Don't declare; we assume C89 or better now.
16021
16022         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
16023         if not already defined.
16024
16025         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
16026         * lib/dup-safer.c (errno): Likewise.
16027
16028 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16029
16030         Merge from coreutils.
16031         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
16032         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
16033         * modules/path-concat: Don't depend on strdup.
16034
16035 2004-08-03  Simon Josefsson  <jas@extundo.com>
16036
16037         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
16038         * lib/progname.h: Don't include stdbool.h.
16039
16040 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16041
16042         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
16043         * MODULES.html.sh (func_all_modules): Remove fatal.
16044
16045 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16046
16047         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
16048
16049 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16050
16051         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
16052         working.
16053
16054 2004-08-02  Simon Josefsson  <jas@extundo.com>
16055
16056         * lib/getsubopt.h: New file, with comments from Bruno Haible.
16057         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
16058         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
16059
16060 2004-08-01  Simon Josefsson  <jas@extundo.com>
16061
16062         * lib/xgetdomainname.c: Include stdlib.h, for free().
16063
16064 2004-07-19  Bruno Haible  <bruno@clisp.org>
16065
16066         * MODULES.html.sh (func_all_modules): Add dummy.
16067
16068 2004-07-16  Simon Josefsson  <jas@extundo.com>
16069
16070         * modules/dummy: New file.
16071
16072 2004-07-16  Simon Josefsson  <jas@extundo.com>
16073
16074         * lib/dummy.c: New file.
16075
16076 2004-07-16  Bruno Haible  <bruno@clisp.org>
16077
16078         * lib/backupfile.h: Add extern "C" for C++.
16079         * lib/closeout.h: Likewise.
16080         * lib/copy-file.h: Likewise.
16081         * lib/findprog.h: Likewise.
16082         * lib/full-write.h: Likewise.
16083         * lib/pathname.h: Likewise.
16084         * lib/progname.h: Likewise.
16085         * lib/stpcpy.h: Likewise.
16086         * lib/stpncpy.h: Likewise.
16087         * lib/strcase.h: Likewise.
16088         * lib/strstr.h: Likewise.
16089         * lib/xalloc.h: Likewise.
16090
16091         * lib/mbswidth.h: Add extern "C" for C++.
16092         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16093
16094 2004-07-13  Robert Millan  <robertmh@gnu.org>
16095
16096         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16097
16098 2004-07-09  Simon Josefsson  <jas@extundo.com>
16099
16100         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16101         failed without this.)
16102
16103 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16104
16105         * modules/chown (Files): Add lib/fchown-stub.c, since
16106         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16107
16108 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16109
16110         * lib/fchown-stub.c: New file.
16111
16112 2004-06-24  Jim Meyering  <jim@meyering.net>
16113
16114         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16115
16116 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16117
16118         * modules/argz: Omit "#include".
16119
16120         * MODULES.html.sh (func_all_modules): Add calloc, to match
16121         2004-06-01 addition of calloc module.
16122
16123 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16124
16125         * m4/argz.m4: New file, which is autoupdated from libtool.
16126
16127 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16128
16129         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
16130         libtool.
16131
16132 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16133
16134         * config/srclist-update: Don't insist on "USA." before the
16135         close-comment, as libtool omits the period and puts the */ on a
16136         separate line.
16137         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
16138         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
16139
16140 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
16141
16142         * modules/argz: New file.
16143         * MODULES.html.sh (func_all_modules): Add argz.
16144
16145 2004-06-12  Jim Meyering  <jim@meyering.net>
16146         and  Paul Eggert  <eggert@cs.ucla.edu>
16147
16148         * modules/hash (Files): Add lib/xalloc.h.
16149         * modules/pipe (Depends-on): Add wait-process.
16150         * modules/stat (Depends-on): Add xalloc.
16151         * modules/userspec (Files): Add lib/userspec.h.
16152         * modules/xstrto
16153
16154         Upgrade from gettext-0.13.
16155         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
16156         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
16157         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
16158
16159 2004-06-10  Jim Meyering  <jim@meyering.net>
16160
16161         * lib/calloc.c: New file.
16162
16163 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
16164
16165         * lib/getdate.y (yylex): Allow space between sign and number.
16166         Problem reported by Dan Jacobson.
16167
16168 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16169
16170         Merge from coreutils CVS.
16171
16172         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
16173         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
16174         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
16175         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
16176         xstrtol.m4: Fix copyright date and/or serial number.
16177
16178         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
16179         See if we need an fchown replacement.
16180         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
16181         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
16182         and use the replacement function if we detect either defect.
16183
16184         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
16185         gl_UTIMECMP.
16186
16187 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16188         and  Jim Meyering  <jim@meyering.net>
16189
16190         Merge from coreutils CVS.
16191
16192         * lib/stat-macros.h: New file, with contents from file-type.h
16193         and coreutils' system.h.
16194         * lib/file-type.c: Include "stat-macros.h".
16195         * lib/file-type.h (file_type): Move all macro definitions to new file,
16196         stat-macros.h.
16197
16198         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
16199         Wrap old code with this conditional.
16200         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
16201         function that does not dereference symlinks.
16202         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
16203
16204         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
16205         dependency problems.
16206         (xreadlink): Accept new arg SIZE, for efficiency.
16207         All decls and uses changed.
16208         * lib/xreadlink.h: Include <stddef.h>, for size_t.
16209
16210         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
16211         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
16212
16213         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
16214         sysexits.h.
16215
16216 2004-06-01  Jim Meyering  <jim@meyering.net>
16217
16218         * m4/calloc.m4: New file.
16219
16220 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
16221
16222         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
16223         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
16224         Also, fix a typo in a diagnostic.
16225
16226 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16227
16228         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
16229         or AC_FUNC_REALLOC.
16230
16231 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16232
16233         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
16234         macros to be defined.
16235         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
16236         the allocator returns NULL because the requested size is zero.
16237
16238 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16239
16240         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
16241         var.  Add comment explaining why libc still defines it.  This
16242         merges the following patch from glibc:
16243         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
16244
16245 2004-05-20  Andreas Schwab  <schwab@suse.de>
16246
16247         * m4/free.m4: Replace free if it not known to work, not the other
16248         way round.
16249
16250 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
16251
16252         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
16253         present in glibc since revision 1.1 of this file.
16254         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
16255         obstack_alignment_mask, obstack_alloc, obstack_base,
16256         obstack_blank, obstack_blank_fast, obstack_chunk_size,
16257         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
16258         obstack_grow0, obstack_init, obstack_int_grow,
16259         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
16260         obstack_next_free, obstack_object_size, obstack_ptr_grow,
16261         obstack_ptr_grow_fast, obstack_room): Remove declarations of
16262         nonexistent functions.
16263
16264 2004-05-18  Karl Berry  <karl@gnu.org>
16265
16266         * config/srclist.txt: break link for vasnprintf.c.
16267
16268 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16269
16270         Port obstack to the AS/400, where pointers are 16 bytes wide and
16271         you cannot cast an integer to a valid pointer.  This patch is
16272         currently waiting to be integrated into glibc; see
16273         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
16274
16275         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
16276         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
16277         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
16278         (struct obstack): temp member is now a union of a pointer and
16279         an integer, instead of an integer.  All integer uses changed.
16280         This does not affect the physical layout of struct obstack,
16281         except on hosts (like the AS/400) where the size or alignment of
16282         void * is greater than that of ptrdiff_t.
16283         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
16284         __STDC__)]: Store temporary in pointer member of union, not
16285         integer member.
16286         * lib/obstack.c: Include <stddef.h>, for offsetof.
16287         (struct fooalign): Remove; it doesn't need a name.
16288         (union fooround): Change double to long double, and add void *.
16289         (DEFAULT_ALIGNMENT): Use offsetof to compute.
16290         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
16291         not a macro.  Hence the values are always int; so remove all
16292         casts-to-int in uses.
16293
16294 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16295
16296         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
16297         we can get this patch merged into glibc.
16298
16299 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16300             Paul Eggert  <eggert@cs.ucla.edu>
16301
16302         * m4/argp: Depend on alloca.
16303
16304 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16305             Paul Eggert  <eggert@cs.ucla.edu>
16306
16307         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
16308         freecoding.
16309
16310 2004-05-17  Bruno Haible  <bruno@clisp.org>
16311
16312         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
16313         precision that consists of a '.' followed by an empty digit string.
16314         Patch by Tor Lillqvist <tml@iki.fi>.
16315
16316 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16317
16318         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
16319         for backward compatibility with older code.  We need our own
16320         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
16321         it under some other name, and our alloca.h will define it.
16322
16323 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16324             Derek Price  <derek@ximbiot.com>
16325
16326         * lib/alloca.c: Include <alloca.h>, to get our interface.
16327         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
16328         include <alloca.h> first.  Use C89 prototype for alloca; this
16329         requires including <stddef.h> for size_t.  Use extern "C" if C++.
16330         Use #elif for simplicity, since we can assume C89 now.
16331         Don't try to source the system alloca.h since it will not be found
16332         and to prevent recursively including its replacement.
16333         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
16334         * lib/regex.c: Likewise.
16335
16336 2004-05-16  Derek Price  <derek@ximbiot.com>
16337             Paul Eggert  <eggert@cs.ucla.edu>
16338
16339         getline cleanup.  This changes the getndelim2 API: both order of
16340         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
16341         no delimiter).
16342
16343         * lib/getline.c: Don't include stddef.h or stdio.h, since our
16344         interface does that.
16345         (getline): Always use getdelim, so that we don't have two
16346         copies of this code.
16347         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
16348         if available.
16349         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
16350         (GETNDELIM2_MAXIMUM): New macro.
16351         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16352         instead of the old practice of delim2==0.  All callers changed.
16353         Return -1 on overflow, instead of returning junk.
16354         Do not set *linesize unless allocation succeeds.
16355         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16356         that we include sys/types.h.
16357         * lib/getnline.h: Likewise.
16358         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16359         (getndelim2): Reorder arguments.
16360         * lib/getnline.c (getnline, getndelim):
16361         Don't discard the NMAX argument.
16362         (getnline): Invoke getndelim, to avoid code duplication.
16363         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16364         of (size_t) -1 by callers of the getnline family.
16365
16366 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16367
16368         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16369         Check for gettimeofday.
16370         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16371         Check for settimeofday, stime.
16372
16373 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16374
16375         * lib/nanosleep.c (suspended): Change its type from int to
16376         sig_atomic_t volatile.
16377         (first_call): Make it private to rpl_nanosleep, and have it
16378         be zero initially as that's a bit faster.
16379         (my_usleep): Round up fractional times instead of truncating them,
16380         as this is the usual meaning for 'sleep'.
16381
16382         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16383         doesn't work.
16384         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16385         (ENOSYS): Define if not defined.
16386         (settime): Fall back on stime if it exists and settimeofday fails.
16387         But don't bother with fallbacks if a method fails with errno == EPERM.
16388
16389 2004-05-11  Jim Meyering  <jim@meyering.net>
16390
16391         Prior to this change, the save_cwd caller required read access to the
16392         current directory on most systems (ones with the fchdir function).
16393
16394         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16395         fails, try write-only, and finally, resort to using xgetcwd.
16396
16397 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16398
16399         * lib/obstack.c, obstack.h: Import changes from libc.
16400
16401 2004-04-28  Bruno Haible  <bruno@clisp.org>
16402
16403         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16404         also implicitly appends .exe to executables.
16405         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16406         accepts Windows pathnames.
16407         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16408         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16409         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16410         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16411         Reported by Derek Robert Price <derek@ximbiot.com>.
16412
16413 2004-04-21  Karl Berry  <karl@gnu.org>
16414
16415         * config/srclist.txt (localcharset.c): break sync.
16416
16417 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16418
16419         * m4/host-os.m4: Add a copyright notice.
16420
16421 2004-04-20  Jim Meyering  <jim@meyering.net>
16422
16423         Change UTILS_ to gl_ in AC_DEFINE'd names.
16424         Change utils_- and jm_-prefixed variables, too.
16425         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16426         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16427         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16428
16429         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16430         Don't emit trailing blanks.
16431         Also rename jm_-prefixed variables to have gl_ prefix.
16432
16433         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16434         Also rename jm_-prefixed variables to have gl_ prefix.
16435
16436         * m4/jm-macros.m4: Reflect the renamings.
16437         * m4/prereq.m4: Likewise.
16438
16439 2004-04-20  Jim Meyering  <jim@meyering.net>
16440
16441         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16442         memory.
16443
16444 2004-04-20  Jim Meyering  <jim@meyering.net>
16445             Bruno Haible  <bruno@clisp.org>
16446
16447         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16448         memory when realloc fails.
16449
16450 2004-04-19  Jim Meyering  <jim@meyering.net>
16451
16452         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16453         now that readutmp.c may call `free (0)'.
16454
16455 2004-04-19  Bruno Haible  <bruno@clisp.org>
16456
16457         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16458         * m4/inttypes_h.m4: Likewise.
16459         * m4/stdint_h.m4: Likewise.
16460         * m4/intmax_t.m4: Likewise.
16461         * m4/uintmax_t.m4: Likewise.
16462
16463 2004-04-18  Jim Meyering  <jim@meyering.net>
16464
16465         * m4/prereq.m4: Don't forbid jm_ prefix.
16466
16467         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16468         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16469         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16470         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16471         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16472         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16473         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16474         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16475         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16476         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16477         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16478         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16479         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16480         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16481         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16482         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16483         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16484         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16485         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16486
16487 2004-04-18  Jim Meyering  <jim@meyering.net>
16488
16489         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16490         failure, don't leak memory and do call END_UTMP_ENT.
16491
16492 2004-04-16  Jim Meyering  <jim@meyering.net>
16493
16494         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
16495         coreutils' stat program.
16496         (gl_PREREQ): Don't require jm_PREREQ_STAT.
16497
16498 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16499
16500         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16501         C89.
16502         (CHAR_BIT): Remove, since we assume C89.
16503         Include <stdint.h> if available, as per current Autoconf CVS advice.
16504
16505 2004-03-31  Jim Meyering  <jim@meyering.net>
16506
16507         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16508         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16509         * m4/xalloc.m4: Likewise.
16510
16511 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16512
16513         Merge from coreutils.
16514
16515         * m4/inttostr.m4: New file.
16516         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
16517         Require AM_STDBOOL_H and gl_TIMESPEC instead.
16518         Require gl_CLOCK_TIME.
16519         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
16520
16521 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16522
16523         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
16524         not bool, to be more consistent with Unix conventions.
16525         Suggested by Bruno Haible.
16526
16527         Merge from coreutils.
16528
16529         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
16530         * lib/umaxtostr.c: New files.
16531
16532         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
16533         the usual <time.h> dance.
16534         (get_date): Change signature to support fractional time stamps.
16535         All callers changed.
16536         * lib/getdate.y: Include "getdate.h" first, as we can now
16537         assume C89 and don't need to worry about 'const'.
16538         Similarly, include "unlocked-io.h" near start, not in middle.
16539         Include <limits.h>.
16540         (textint.value): Use long int rather than int.
16541         (textint.digits): Use size_t rather than int.
16542         (BILLION, LOG10_BILLION): New constants.
16543         (parser_control): New member rel_ns.  Members day_ordinal,
16544         time_zone, month, day, hour, minutes, rel_year, rel_month,
16545         rel_day, rel_hour, rel_minutes, rel_seconds
16546         are now long int, not int.  Member seconds is now struct timespec,
16547         not int.  New member timespec_seen.  Members dates_seen, days_seen,
16548         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
16549         not int.
16550         (%union.intval): Now long int, not int.
16551         New member timespec.
16552         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
16553         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
16554         (spec): Now is a timespec or an item list.
16555         (timespec, items): New nonterminals.
16556         (time, rel, relunit, number, get_date):
16557         Add support for fractional seconds.
16558         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
16559         (gmtime, localtime, mktime): Remove decls; not needed with C89.
16560         (to_hour): First arg is now long int, not int.
16561         (to_year): Returns long int, not int.
16562         Don't treat year -70 like 70.
16563         (tm_diff): Returns long int, not int.
16564         (lookup_word): Use bool instead of int when appropriate.
16565         (yylex): Use size_t for count, not int.
16566         Detect overflow when parsing large integer constants.
16567         Add support for fractions.
16568         (get_date): Make pointers 'const' if possible.
16569         Use more-portable code to detect integer overflow.
16570         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16571         Don't use ctime; it's not reliable if the year has >4 digits.
16572
16573         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16574         This is for compatibility with BSD.
16575
16576         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16577         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16578         From coreutils' system.h.
16579
16580         * lib/userspec.c: Don't include "posixver.h".
16581         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16582         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16583         compatible extension.  Simplify code by removing a boolean int
16584         that was always nonzero if a string was nonnull.
16585
16586 2004-03-30  Jim Meyering  <jim@meyering.net>
16587
16588         Merge from coreutils.
16589
16590         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16591         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16592         on some systems one must include <grp.h> before it.
16593         Reported by Christian Krackowizer.
16594
16595 2004-03-30  Jim Meyering  <jim@meyering.net>
16596
16597         Merge from coreutils.
16598
16599         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16600
16601         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16602         an empty input stream.
16603
16604         * lib/readtokens.c: Include <stdbool.h>.
16605         (readtoken): Use `size_t' rather than int/long.
16606         All callers adjusted.
16607         Use `bool' rather than `int' where appropriate.
16608         Use memset rather than an explicit loop.
16609         Use x2nrealloc rather than xrealloc.
16610         Allow the use of `\0' as a delimiter.
16611         (readtokens): Likewise.
16612         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16613
16614 2004-03-30  Jim Meyering  <jim@meyering.net>
16615
16616         * m4/realloc.m4: Remove file, since now it does no more than
16617         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16618         the `configure.ac' section of module/realloc.
16619         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16620
16621 2004-03-30  Bruno Haible  <bruno@clisp.org>
16622
16623         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16624         nonnull.
16625
16626 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16627
16628         Merge changes to getloadavg.c from coreutils and Emacs.
16629
16630         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16631         Define to an expression, not to the empty string.
16632         Include cloexec.h and xalloc.h.
16633         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16634         Use set_cloexec_flag rather than rolling our own.
16635         * lib/cloexec.c, lib/cloexec.h: New files.
16636
16637 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16638
16639         * m4/cloexec.m4: New file.
16640
16641 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16642
16643         * lib/getopt.h: Sync with libc CVS.
16644
16645 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16646             Bruno Haible  <bruno@clisp.org>
16647
16648         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16649         mbswidth.
16650
16651 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16652             Bruno Haible  <bruno@clisp.org>
16653
16654         * lib/mbswidth.h: Include <wchar.h> only if
16655         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16656         <wchar.h>.
16657         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16658
16659 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16660
16661         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16662         Sync with libc CVS.
16663         * lib/getopt_int.h: New file, also synced from libc.
16664
16665 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16666
16667         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16668         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16669         Bring back getopt.c, getopt.h, getopt1.c.
16670
16671 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16672
16673         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16674         All uses changed.  Check for sa_sigaction member; this fixes
16675         a bug first reported by Jason Andrade in
16676         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16677
16678 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16679
16680         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16681         '#if' expressions.  Unlike the code it replaces, it does not
16682         depend on (defined _SC_PAGESIZE).  However, it does depend on
16683         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16684         first reported by Jason Andrade in
16685         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16686
16687 2004-02-25  Simon Josefsson  <jas@extundo.com>
16688
16689         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16690
16691 2004-02-25  Simon Josefsson  <jas@extundo.com>
16692
16693         * lib/strdup.h: New file.
16694         * lib/strdup.c: Include it.
16695         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16696         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16697
16698 2004-02-23  Karl Berry  <karl@gnu.org>
16699
16700         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16701         (from fencepost.gnu.org:/gd/gnuorg).
16702
16703 2004-02-23  Karl Berry  <karl@gnu.org>
16704
16705         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16706         * config/srclist.txt: add maintain/standards documents.
16707
16708 2004-02-18  Bruno Haible  <bruno@clisp.org>
16709
16710         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16711         Reported by Derek Robert Price <derek@ximbiot.com>.
16712
16713 2004-02-16  Karl Berry  <karl@gnu.org>
16714
16715         * config/mkinstalldirs, install-sh: update from automake.
16716
16717 2004-02-06  Karl Berry  <karl@gnu.org>
16718
16719         * m4/po.m4: update from gettext 0.14.1.
16720
16721 2004-02-06  Karl Berry  <karl@gnu.org>
16722
16723         * lib/config.charset: update from gettext 0.14.1.
16724
16725 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16726
16727         Add comments and code, prompted by suggestions from Bruno Haible
16728         for sh-quote.
16729         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16730         describing the enum quoting_style values.
16731         * lib/quotearg.c (quotearg_alloc): New function.
16732         (quotearg_buffer_restyled): Treat lone { and } as special.
16733         Treat = as special.  Work around bug with older shells
16734         that "see" a '\' that is really the 2nd byte of a multibyte char.
16735         Quote empty string with shell_quoting_style.
16736
16737 2004-02-03  Bruno Haible  <bruno@clisp.org>
16738
16739         * m4/pipe.m4: New file, from GNU gettext.
16740
16741 2004-02-03  Bruno Haible  <bruno@clisp.org>
16742
16743         * lib/pipe.h: New file, from GNU gettext.
16744         * lib/pipe.c: New file, from GNU gettext.
16745
16746 2004-01-27  Bruno Haible  <bruno@clisp.org>
16747
16748         * m4/execute.m4: New file, from GNU gettext.
16749
16750 2004-01-27  Bruno Haible  <bruno@clisp.org>
16751
16752         * lib/execute.h: New file, from GNU gettext.
16753         * lib/execute.c: New file, from GNU gettext.
16754         * lib/w32spawn.h: New file, from GNU gettext.
16755
16756 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16757
16758         Merge from diffutils.
16759
16760         * lib/file-type.c (file_type): Add typed memory objects.
16761         * lib/file-type.h (S_TYPEISTMO): New macro.
16762
16763         * lib/c-stack.h (c_stack_action): Remove argv argument.
16764         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16765         (die): Don't calculate message unless segv_action returns.
16766         (get_stack_location, min_address_from_argv, max_address_from_argv,
16767         volatile stack_base, volatile_stack_size): Remove.
16768         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16769         that every segmentation violation is a stack overflow.  (Ouch!)
16770         See Debian bug 136249 (still outstanding) for more info about why
16771         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16772
16773 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16774
16775         Exit-status fix from coreutils.
16776
16777         Use exit_failure consistently in place of EXIT_FAILURE,
16778         so that program exit statuses are consistent on failure.
16779
16780         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16781         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16782         * lib/argmatch.h: Comment fix to match the above.
16783         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16784         Now a macro referring to exit_failure, instead of a separate
16785         variable.  Include "exitfail.h" to get it.
16786         * lib/xstrtol.h: Include "exitfail.h".
16787         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16788
16789         * lib/long-options.c (parse_long_options): Use prototype
16790         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16791         for clarity.
16792
16793 2004-01-21  Jim Meyering  <jim@meyering.net>
16794
16795         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16796         so as not to conflict with a different-sized __mktime_internal
16797         function in GNU libc.
16798         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16799         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16800
16801 2004-01-20  Karl Berry  <karl@gnu.org>
16802
16803         * config/config.guess: update from config.
16804
16805         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16806
16807 2004-01-20  Bruno Haible  <bruno@clisp.org>
16808
16809         Safer stack allocation.
16810         * lib/setenv.c: Include allocsa.h.
16811         (alloca): Remove fallback definition.
16812         (freea): Remove macro.
16813         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16814         instead of freea.
16815
16816 2004-01-20  Bruno Haible  <bruno@clisp.org>
16817
16818         * m4/eealloc.m4: New file, from GNU gettext.
16819
16820 2004-01-20  Bruno Haible  <bruno@clisp.org>
16821
16822         * m4/allocsa.m4: New file, from GNU gettext.
16823
16824 2004-01-20  Bruno Haible  <bruno@clisp.org>
16825
16826         * lib/xallocsa.h: New file, from GNU gettext.
16827         * lib/xallocsa.c: New file, from GNU gettext.
16828
16829 2004-01-20  Bruno Haible  <bruno@clisp.org>
16830
16831         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
16832
16833 2004-01-20  Bruno Haible  <bruno@clisp.org>
16834
16835         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
16836         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
16837         specially.
16838
16839 2004-01-20  Bruno Haible  <bruno@clisp.org>
16840
16841         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
16842         patch.
16843
16844 2004-01-20  Bruno Haible  <bruno@clisp.org>
16845
16846         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
16847
16848 2004-01-20  Bruno Haible  <bruno@clisp.org>
16849
16850         * lib/eealloc.h: New file.
16851
16852 2004-01-20  Bruno Haible  <bruno@clisp.org>
16853
16854         * lib/binary-io.h: Avoid warnings on Cygwin.
16855
16856 2004-01-20  Bruno Haible  <bruno@clisp.org>
16857
16858         * lib/allocsa.h: New file, from GNU gettext.
16859         * lib/allocsa.c: New file, from GNU gettext.
16860
16861 2004-01-18  Karl Berry  <karl@gnu.org>
16862
16863         * doc/gpl.texi, doc/lgpl.texi: new files.
16864
16865 2004-01-18  Karl Berry  <karl@gnu.org>
16866
16867         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
16868         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
16869
16870 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16871
16872         Merge from coreutils.
16873
16874         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
16875         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
16876         (gl_DEFAULT_POSIX2_VERSION): Move
16877         the documentation from 'configure' into 'config.hin',
16878         so that 'configure --help' isn't burdened by it and
16879         we don't have to worry about its formatting there.
16880         Reword the documentation so that it's more succinct
16881         and can be run together into a single paragraph.
16882         * m4/same.m4 (gl_SAME): Check for pathconf.
16883
16884 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16885
16886         Merge from coreutils.
16887
16888         * lib/posixver.c: Include posixver.h.
16889
16890         * lib/same.c: Include <stdbool.h>, <limits.h>.
16891         (_POSIX_NAME_MAX): Define if not defined.
16892         (MIN): New macro.
16893         (same_name): If file names are silently truncated, report
16894         that the file names are the same if they are the same after
16895         the silent truncation.
16896
16897         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
16898         conversion function.
16899         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
16900         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
16901         longer needed.
16902
16903 2004-01-15  Jim Meyering  <jim@meyering.net>
16904
16905         Merge from coreutils.
16906
16907         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
16908         if no library is required.
16909         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
16910         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
16911         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
16912         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
16913         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
16914         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
16915         value, $ac_cv_search_crypt, if it's "none required".
16916         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
16917         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
16918         not gl_FUNC_GETLOADAVG.
16919         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
16920         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
16921
16922 2004-01-15  Jim Meyering  <jim@meyering.net>
16923
16924         Merge from coreutils.
16925
16926         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
16927         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
16928         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
16929
16930         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
16931         optional configure-time default.
16932
16933         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16934
16935         * lib/xreadlink.c (xreadlink): Correct outdated comment.
16936
16937 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
16938
16939         Merge from coreutils.
16940
16941         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
16942         value, $ac_cv_search_nanosleep, if it's "none required".
16943
16944 2004-01-14  Paul Eggert  <eggert@twinsun.com>
16945
16946         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
16947         with like-named macro in fnmatch.c.
16948         (EXT): Use an internal constant instead.
16949
16950         Merge fnmatch patches from glibc.
16951         * lib/fnmatch.c (mbsinit): Remove define.
16952         Add libc_hidden_ver (__fnmatch, fnmatch).
16953         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
16954         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
16955
16956 2004-01-14  Karl Berry  <karl@gnu.org>
16957
16958         * config/install-sh: update from automake.
16959
16960 2004-01-13  Karl Berry  <karl@gnu.org>
16961
16962         * config/install-sh: update from automake.
16963
16964 2004-01-09  Karl Berry  <karl@gnu.org>
16965
16966         * config/install-sh: update from automake.
16967
16968 2004-01-05  Karl Berry  <karl@gnu.org>
16969
16970         * config/config.{sub,guess}: update from config.
16971
16972 2003-12-31  Karl Berry  <karl@gnu.org>
16973
16974         * config/depcomp: update from automake.
16975
16976 2003-12-14  Karl Berry  <karl@gnu.org>
16977
16978         * lib/config.charset: update from gettext-runtime.
16979
16980 2003-12-03  Paul Eggert  <eggert@twinsun.com>
16981
16982         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
16983         Bug reported by Alfred M. Szmidt.
16984
16985 2003-12-03  Bruno Haible  <bruno@clisp.org>
16986
16987         * m4/gettext.m4: Upgrade from gettext-0.13.
16988         * m4/po.m4: Upgrade from gettext-0.13.
16989         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
16990         * m4/intmax.m4: New file, from gettext-0.13.
16991         * m4/printf-posix.m4: New file, from gettext-0.13.
16992
16993 2003-11-29  Karl Berry  <karl@gnu.org>
16994
16995         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
16996
16997 2003-11-25  Paul Eggert  <eggert@twinsun.com>
16998             Bruno Haible  <bruno@clisp.org>
16999
17000         * lib/printf-parse.h: Don't include sys/types.h.
17001         (ARG_NONE): New macro.
17002         (char_directive): Change type of *arg_index fields to size_t.
17003         * lib/printf-parse.c: Don't include sys/types.h.
17004         (SSIZE_MAX): Remove macro.
17005         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
17006         Remove unnecessary overflow check.
17007         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
17008         fields.
17009
17010 2003-11-25  Bruno Haible  <bruno@clisp.org>
17011
17012         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
17013
17014 2003-11-25  Bruno Haible  <bruno@clisp.org>
17015
17016         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
17017         gt_TYPE_SSIZE_T.
17018
17019 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17020
17021         * modules/alloca: Remove dependency on xalloc.
17022
17023 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17024
17025         * lib/alloca.c: Remove dependency on xalloc module.
17026         (xalloc_die): Remove.
17027         (memory_full) [!defined emacs]: New macro.
17028         [!defined emacs]: Don't include xalloc.h.
17029         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
17030         address arithmetic overflows.  Change datatypes a bit to avoid
17031         unnecessary casts.
17032
17033 2003-11-22  Jim Meyering  <jim@meyering.net>
17034
17035         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
17036         s/size/size_t/.
17037
17038 2003-11-21  Karl Berry  <karl@gnu.org>
17039
17040         * config/config.{sub,guess}: update from config.
17041
17042 2003-11-18  Karl Berry  <karl@gnu.org>
17043
17044         * config/config.{sub,guess}: update from config.
17045
17046         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
17047
17048 2003-11-17  Paul Eggert  <eggert@twinsun.com>
17049
17050         * README: Mention that S+T cannot overflow if S is the size of
17051         an existing object and T is sufficiently small.
17052
17053 2003-11-17  Jim Meyering  <jim@meyering.net>
17054
17055         On systems without utime and without a utimes function capable of
17056         dealing with a NULL struct utimbuf* argument, this utime replacement
17057         could -- in unusual circumstances -- leak a file descriptor.
17058         * lib/utime.c: Include <unistd.h> and <errno.h>.
17059         (utime_null): Be sure to close `fd' and to preserve errno.
17060         Reported by Geoff Collyer via Arnold Robbins.
17061
17062 2003-11-17  Bruno Haible  <bruno@clisp.org>
17063
17064         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
17065         (Depends-on): Add xsize.
17066
17067 2003-11-17  Bruno Haible  <bruno@clisp.org>
17068
17069         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
17070
17071 2003-11-17  Bruno Haible  <bruno@clisp.org>
17072
17073         * lib/vasnprintf.c (alloca): Remove fallback definition.
17074         (freea): Remove definition.
17075         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
17076         Reported by Paul Eggert.
17077
17078 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17079             Bruno Haible  <bruno@clisp.org>
17080
17081         Protect against address arithmetic overflow.
17082         * lib/printf-args.h: Include stddef.h.
17083         (arguments): Change type of field 'count' to size_t.
17084         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17085         'unsigned int' where appropriate.
17086         * lib/printf-parse.h: Include sys/types.h.
17087         (char_directive): Change type of *arg_index fields to ssize_t.
17088         (char_directives): Change type of fields 'count', max_*_length to
17089         size_t.
17090         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17091         (SSIZE_MAX): Define fallback value.
17092         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17093         instead of 'int' where appropriate. Check a_allocated, d_allocated
17094         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17095         * lib/vasnprintf.c: Include xsize.h.
17096         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17097         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17098         overflow. Avoid wraparound when converting a width or precision from
17099         decimal to binary.
17100
17101 2003-11-16  Bruno Haible  <bruno@clisp.org>
17102
17103         Update from GNU gettext.
17104         * lib/printf-parse.c: Generalize to it can be compiled for wide
17105         strings.
17106         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17107         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17108         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17109         SNPRINTF): New macros.
17110         Don't include <alloca.h> if the file is used inside libintl.
17111         (local_wcslen): New function, for Solaris 2.5.1.
17112         (VASNPRINTF): Use it instead of wcslen.
17113
17114 2003-11-16  Bruno Haible  <bruno@clisp.org>
17115
17116         * lib/xsize.h (xmax): New function.
17117         (xsum, xsum3, xsum4): Declare as "pure" functions.
17118
17119 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17120
17121         * modules/xalloc (Files): Undo latest change, since xalloc.h
17122         no longer needs SIZE_MAX or PTRDIFF_MAX.
17123
17124 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17125
17126         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
17127         gl_PTRDIFF_MAX.
17128
17129 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17130
17131         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
17132         "return", to pacify some unknown compiler.  Problem reported
17133         by Joerg Schilling.
17134
17135 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17136
17137         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
17138         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
17139         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
17140         heuristic is just as accurate as far as we know, and it removes a
17141         dependency on size_max.m4 and ptrdiff_max.m4.
17142
17143 2003-11-11  Bruno Haible  <bruno@clisp.org>
17144
17145         * modules/xsize (Files): Add m4/size_max.m4.
17146         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
17147
17148 2003-11-11  Bruno Haible  <bruno@clisp.org>
17149
17150         * m4/size_max.m4: New file.
17151         * m4/ptrdiff_max.m4: New file.
17152         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
17153         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
17154         (gl_XALLOC): Invoke it.
17155
17156 2003-11-11  Bruno Haible  <bruno@clisp.org>
17157
17158         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
17159         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
17160         defined.
17161
17162 2003-11-10  Paul Eggert  <eggert@twinsun.com>
17163
17164         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
17165         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
17166         rejected some allocations of exactly SIZE_MAX - 2 bytes.
17167         From Bruno Haible.
17168         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
17169         not (size_t) -1, since it's defined here.
17170
17171 2003-11-09  Karl Berry  <karl@gnu.org>
17172
17173         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
17174
17175 2003-11-06  Paul Eggert  <eggert@twinsun.com>
17176
17177         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
17178         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
17179         Reject sizes of exactly SIZE_MAX bytes.
17180         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
17181         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
17182
17183 2003-11-05  Bruno Haible  <bruno@clisp.org>
17184
17185         * lib/xsize.h: Include limits.h, to avoid a possible collision with
17186         SIZE_MAX defined in <limits.h> on Solaris.
17187
17188 2003-11-04  Jim Meyering  <jim@meyering.net>
17189
17190         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
17191         variable names, rather than @VAR@.
17192         * modules/poll: Likewise.
17193
17194 2003-11-04  Bruno Haible  <bruno@clisp.org>
17195
17196         * modules/xsize: New file.
17197         * modules/linebreak: Depend on xsize.
17198         * MODULES.html.sh (func_all_modules): Add xsize.
17199
17200 2003-11-04  Bruno Haible  <bruno@clisp.org>
17201
17202         * m4/xsize.m4: New file.
17203
17204 2003-11-04  Bruno Haible  <bruno@clisp.org>
17205
17206         * lib/xsize.h: New file.
17207         * lib/linebreak.c: Include xsize.h.
17208         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
17209         argument for overflow.
17210         Suggested by Paul Eggert.
17211
17212 2003-11-03  Karl Berry  <karl@gnu.org>
17213
17214         * config/config.{guess,sub}: update from config.
17215
17216 2003-11-03  Jim Meyering  <jim@meyering.net>
17217
17218         * modules/userspec (lib_SOURCES): Add userspec.h.
17219         (Include): Add "userspec.h".
17220         Improve description.
17221
17222 2003-11-03  Jim Meyering  <jim@meyering.net>
17223
17224         * lib/userspec.c: Include "userspec.h".
17225         * lib/userspec.h: New file.
17226
17227 2003-11-03  Bruno Haible  <bruno@clisp.org>
17228
17229         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
17230
17231 2003-11-03  Bruno Haible  <bruno@clisp.org>
17232
17233         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
17234         available, to avoid (extremely rare) race condition.
17235         Suggested by Paul Eggert.
17236
17237 2003-11-02  Karl Berry  <karl@gnu.org>
17238
17239         * config/srclist.txt (vasprintf.c): sync broken, sigh.
17240
17241 2003-10-31  Paul Eggert  <eggert@twinsun.com>
17242
17243         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
17244         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
17245         (read_filesystem_list): Set and use me_type_malloced.
17246         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
17247         whatever the type happens to be), for brevity and consistency.
17248         Check for size calculation overflow on Alphas running OSF/1.
17249
17250 2003-10-31  Jim Meyering  <jim@meyering.net>
17251
17252         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
17253
17254         * lib/linebuffer.c: Include <string.h> for declaration of memset.
17255
17256 2003-10-30  Paul Eggert  <eggert@twinsun.com>
17257             Bruno Haible  <bruno@clisp.org>
17258
17259         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
17260         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
17261
17262 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17263
17264         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
17265         netbsd*-gnu*.  Suggested by Robert Millan.
17266
17267 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17268
17269         * modules/group-member: Depend on stdbool.
17270
17271 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17272
17273         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
17274
17275 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17276
17277         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
17278         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
17279         after the 'gnu' in these cases.  This fixes some bugs in the
17280         previous change, and is based on suggestions by Robert Millan.
17281
17282 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17283
17284         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
17285         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
17286         no longer needed.
17287         * lib/quotearg.c (quotearg_n_options): Use it.
17288         * lib/group-member.c: Include <stdbool.h>.
17289         (free_group_info): Arg is now const *; don't free arg.
17290         (get_group_info): Now returns bool and accepts struct group_info *,
17291         rather than returning a malloc'ed struct group_info *.
17292         All uses changed.  Check for overflow in internal size calculation.
17293
17294         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
17295         rather than xmalloc/xrealloc.
17296         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
17297         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
17298         conformance bug: the old code used a pointer after freeing the
17299         storage that it addressed.
17300         * lib/hash.c (hash_initialize): Simplify the code by using
17301         xalloc_oversized rather than doing it by hand.
17302         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
17303         the buffer preserved.  Use free and xmalloc instead.
17304         * lib/quotearg.c (quotearg_n_options): Likewise.
17305         Use a simpler test for size overflow.  Don't use xalloc_oversized
17306         because unsigned int might be wider than size_t (!); this suggests
17307         that we should switch from unsigned int to size_t for slot numbers.
17308
17309 2003-10-28  Paul Eggert  <eggert@twinsun.com>
17310
17311         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
17312         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
17313         NetBSD kernels.  Requested by Richard Stallman.
17314
17315 2003-10-27  Paul Eggert  <eggert@twinsun.com>
17316
17317         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
17318         to allocate the returned structure.  Do not allocate a subarray,
17319         as x2nrealloc will do that.
17320         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
17321         instead of xnrealloc.
17322         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
17323
17324 2003-10-27  Bruno Haible  <bruno@clisp.org>
17325
17326         * lib/stdbool_.h: Better support for BeOS.
17327
17328 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17329
17330         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
17331         now uses inline.
17332
17333 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17334
17335         * lib/xalloc.h (xalloc_oversized): New static inline function, for
17336         callers that want to do their own size-overflow checking.  Include
17337         <stdbool.h>, since xalloc_oversized returns bool.
17338         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
17339         to use xalloc_oversized.
17340
17341         Add two functions x2realloc, x2nrealloc, for programs that grow
17342         arrays dynamically by doubling their sizes.
17343         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
17344         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
17345         New functions.
17346
17347         Port to C99 semantics for 'inline' of external functions.
17348         Bug reported by Bruno Haible.
17349         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
17350         with the old contents of xnmalloc.
17351         (xnmalloc, xmalloc): Use it.
17352         (xnrealloc_inline): New static inline function,
17353         with the old contents of xnrealloc.
17354         (xnrealloc, xrealloc): Use it.
17355
17356         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17357         that.
17358
17359 2003-10-26  Karl Berry  <karl@gnu.org>
17360
17361         * config/srclist.txt (COPYING.DOC): no longer available from
17362         /gd/gnuorg; don't know where the ultimate source is.
17363
17364 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17365
17366         Fix several address-calculation bugs in the hash modules,
17367         plus some minor code cleanup.
17368
17369         * lib/hash.h: Include <stdbool.h>, for bool.
17370         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17371         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17372         hash_get_n_entries, hash_get_max_bucket_length,
17373         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17374         hash_rehash): Use size_t rather than unsigned.
17375         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17376         hash_get_n_buckets_used, hash_get_n_entries,
17377         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17378         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17379         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17380         Likewise.
17381         (SIZE_MAX): Define if not defined.
17382         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17383         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17384         hash_print):
17385         Use const * when possible.
17386         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17387         (check_tuning): Fix bug: if tuning parameters were very close to
17388         0 or 1, rounding errors could have caused subscript violations.
17389         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17390         (hash_initialize): Add 'fail:' label
17391         to free table and return NULL, and use it to simplify code.
17392         Use calloc rather than clearing the storage ourself.
17393         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17394         buffer size calculations.
17395         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17396         Include <stddef.h>, for size_t.
17397         * lib/hash-pjw.c (hash_pjw): Likewise.
17398         Switch to method described by Bruno Haible.
17399         Include <limits.h>, for CHAR_BIT.
17400         (SIZE_BITS): New macro.
17401
17402 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17403
17404         * m4/getline.m4 (AM_FUNC_GETLINE):
17405         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17406         hosts.  Problem reported by Derek Robert Price in
17407         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17408         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17409         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17410
17411 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17412
17413         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17414         ceiling the allocation at NMAX bytes rather than silently
17415         discarding input bytes before NMAX is reached.  This makes
17416         a difference only if NMAX exceeds SIZE_MAX / 2.
17417
17418         * lib/obstack.c: Merge from glibc.
17419         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17420         Add libc_hidden_def (_obstack_newchunk).
17421         (_obstack_free) [! defined _LIBC]: Remove.
17422         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17423         a clone of the function body.
17424         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17425         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17426
17427         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17428         glibc.
17429         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17430         arg to memcpy.
17431
17432         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17433         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17434         Don't use lvalue casts, as GCC plans to remove support for them
17435         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17436         was also present in the non-GCC version, indicating that this
17437         code had always been buggy and had never been widely used.
17438         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17439         Use the fast variant of each macro, rather than copying the
17440         definiens of the fast variant; that way, we'll be more likely to
17441         catch future bugs in the fast variants.
17442
17443 2003-10-20  Bruno Haible  <bruno@clisp.org>
17444
17445         * modules/wait-process: New file.
17446         * MODULES.html.sh (func_all_modules): Add wait-process.
17447
17448 2003-10-20  Bruno Haible  <bruno@clisp.org>
17449
17450         * m4/wait-process.m4: New file.
17451
17452 2003-10-20  Bruno Haible  <bruno@clisp.org>
17453
17454         * lib/wait-process.h: New file, from GNU gettext.
17455         * lib/wait-process.c: New file, from GNU gettext.
17456
17457 2003-10-19  Jim Meyering  <jim@meyering.net>
17458
17459         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17460         HPUX 10.20.
17461
17462 2003-10-18  Karl Berry  <karl@gnu.org>
17463
17464         * config/config.guess: update from config.
17465
17466 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17467
17468         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17469         (getgroups): First arg is int, not size_t.
17470         Don't let 'free' mangle errno.
17471
17472 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17473
17474         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17475
17476 2003-10-16  Karl Berry  <karl@gnu.org>
17477
17478         * config/config.{guess,sub}: update from config.
17479
17480 2003-10-16  Jim Meyering  <jim@meyering.net>
17481
17482         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17483         memcpy.
17484
17485 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17486
17487         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17488         (SIZE_MAX): Remove.
17489         (new_exclude, add_exclude_file): Initial size no longer needs to
17490         be a power of 2.
17491         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
17492         our own address arithmetic overflow checking.
17493
17494         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
17495         (fnmatch): Do not alloca more than 2000 wide characters;
17496         instead, use malloc for large buffers.
17497         Check for address arithmetic overflow, and return -1
17498         with errno set to ENOMEM in that case.
17499         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17500         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17501         instead, return -1.  Check for address arithmetic overflow.
17502
17503 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17504
17505         Handle invalid suffixes and overflow independently, so that
17506         callers can treat them independently as needed.  Fix some bugs in
17507         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17508         suffix for a human-readable blocksize.  The major caller-visible
17509         change is the addition of a new
17510         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17511         that both overflow and suffix chars were found.
17512
17513         * lib/human.c (humblock): Don't check separately for invalid suffix
17514         char; that is xstrtoumax's job (now that its bug is fixed).
17515         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
17516         INTMAX_MAX]: New macros.
17517         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
17518         TYPE_MAXIMUM): New macros.
17519         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
17520         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
17521         if overflow occurs, as it's what __strtol does and it's more useful
17522         in practice.
17523         (__xstrtol): If __strtol reports some error other than ERANGE,
17524         reflect it to the caller as LONGINT_INVALID.  If it reports
17525         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
17526         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
17527         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
17528         value.
17529         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
17530         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
17531         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
17532         [defined UINTMAX_MAX]: New macros.
17533
17534 2003-10-14  Bruno Haible  <bruno@clisp.org>
17535
17536         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
17537
17538 2003-10-14  Bruno Haible  <bruno@clisp.org>
17539
17540         * m4/sig_atomic_t: New file, from GNU gettext.
17541         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
17542
17543 2003-10-14  Bruno Haible  <bruno@clisp.org>
17544
17545         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
17546         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
17547         Also use volatile where needed.
17548
17549 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17550
17551         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
17552         Change maintainer from Bruno Haible to 'all'.
17553
17554 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17555
17556         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
17557
17558 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17559
17560         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
17561         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
17562         and define in terms of the other primitives.
17563         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17564         (SIZE_MAX): Define if not already defined.
17565         (array_size_overflow): New function.
17566         (xalloc_die): Abort instead of exiting if 'error' returns.
17567         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17568         (xmalloc, xrealloc): Use them.
17569         (xcalloc): Check for address arithmetic overflow.
17570         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17571         a bit faster than strcpy.
17572
17573 2003-10-10  Simon Josefsson  <jas@extundo.com>
17574
17575         * modules/argp (Depends-on): Add restrict and strcase.
17576
17577 2003-10-10  Simon Josefsson  <jas@extundo.com>
17578
17579         * m4/argp.m4: Add AC_C_INLINE.
17580
17581 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17582
17583         Merge getpass from libc, plus a few fixes.
17584
17585         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17586         Include <stdbool.h>.
17587         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17588         __fsetlocking to empty.
17589         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17590         do include <bits/libc-lock.h>.
17591         Do not include <fcntl.h>; not needed.
17592         [_LIBC]: Include <wchar.h>.
17593         (NOTCANCEL_MODE): New macro.
17594         (flockfile, funlockfile) [_LIBC]: New macros.
17595         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17596         [!_LIBC]: New macros.
17597         (call_fclose): New function.
17598         (getpass): Use it.  Save tty stream separately; this simplifies the
17599         code and makes it more reliable if stdin happens to equal stdout.
17600         Invoke __fsetlocking on tty.
17601         Handle thread cancellation if needed.
17602         Namespace cleanup (use __tcgetattr, __getline).
17603         Use bool for Booleans.
17604         [USE_IN_LIBIO]: Handle wide streams.
17605         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17606         stream might go where.
17607
17608         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17609         doesn't have to include <stdio.h> before us.
17610         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17611         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17612         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17613         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17614         if not declared, so that we can use getpass.c code from libc without
17615         rewriting it.
17616         (flockfile, ftrylockfile, funlockfile): New macros.
17617
17618 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17619
17620         * modules/getpass: Depend on stdbool.
17621
17622 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17623
17624         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17625
17626 2003-10-07  Karl Berry  <karl@gnu.org>
17627
17628         * config/config.{guess,sub}: update from config.
17629
17630 2003-10-06  Jim Meyering  <jim@meyering.net>
17631             Bruno Haible  <bruno@clisp.org>
17632
17633         This lets translators provide better translations for the
17634         "Written by ..." part of --version output.
17635         * lib/version-etc.h: Include stdarg.h.
17636         (version_etc_copyright): Declare as readonly.
17637         (version_etc): Make this function variadic with a NULL-terminated list
17638         of author name strings.
17639         (version_etc_va): New declaration.
17640         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17641         (version_etc_copyright): Declare as readonly.
17642         (version_etc_va): New function. Provide a different translatable string
17643         for each possible number of authors < 10. Abbreviate when there are 10
17644         authors or more.
17645         (version_etc): Make this function variadic. Call version_etc_va.
17646         Suggestion from Gary V. Vaughan.
17647
17648         * lib/long-options.h (parse_long_options): Change prototype: the
17649         authors string is moved to the end and becomes variadic.
17650         * lib/long-options.c: Include stdarg.h.
17651         (parse_long_options): Make this function variadic, too.
17652         Call version_etc_va, not version_etc.
17653
17654 2003-10-06  Bruno Haible  <bruno@clisp.org>
17655
17656         * modules/version-etc-2: Remove file.
17657         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17658
17659 2003-10-06  Bruno Haible  <bruno@clisp.org>
17660
17661         * modules/fatal-signal: New file.
17662         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17663
17664 2003-10-06  Bruno Haible  <bruno@clisp.org>
17665
17666         * m4/fatal-signal.m4: New file.
17667         * m4/signalblocking.m4: New file, from GNU gettext.
17668
17669 2003-10-06  Bruno Haible  <bruno@clisp.org>
17670
17671         * lib/version-etc-2.h: Remove file.
17672         * lib/version-etc-2.c: Remove file.
17673
17674 2003-10-06  Bruno Haible  <bruno@clisp.org>
17675
17676         * lib/fatal-signal.h: New file, from GNU gettext.
17677         * lib/fatal-signal.c: New file, from GNU gettext.
17678
17679 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17680
17681         * README: Rework advice for preventing empty .o files.
17682         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17683         not <sys/types.h>.
17684
17685 2003-10-04  Karl Berry  <karl@gnu.org>
17686
17687         * lib/argp*: update from libc.
17688
17689 2003-10-04  Karl Berry  <karl@gnu.org>
17690
17691         * config/config.{guess,sub}: update from config.
17692
17693 2003-10-02  Bruno Haible  <bruno@clisp.org>
17694
17695         * modules/lchown (Include): Add lchown.h.
17696         * modules/time_r (Include): Use "..." syntax.
17697         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17698
17699 2003-10-01  Simon Josefsson  <jas@extundo.com>
17700
17701         * MODULES.html.sh (func_all_modules): Move gethostname from section
17702         'based on' to section 'lacking' POSIX:2001.
17703
17704 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17705
17706         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17707         to output mode on the same stream.
17708
17709 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17710
17711         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17712         Fix arg typo in previous patch.
17713
17714 2003-09-28  Jim Meyering  <jim@meyering.net>
17715
17716         * lib/error.c: Correct cpp indentation.
17717
17718 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17719
17720         * modules/free: New file.
17721
17722 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17723
17724         * m4/free.m4: New file.
17725
17726 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17727
17728         * lib/minmax.h (MIN, MAX)
17729         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17730         Omit the special code that used __typeof__, since we worry that
17731         it could be more trouble than it's worth.  See:
17732         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17733         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17734
17735         * lib/free.c: New file.
17736
17737 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17738
17739         Trivial fixes to Makefile.am parts of module listings.
17740         * modules/strstr: Append strstr.h to lib_SOURCES.
17741         * modules/strcase: Likewise, for strcase.h.
17742
17743 2003-09-27  Karl Berry  <karl@gnu.org>
17744
17745         * config/mkinstalldirs: update from automake.
17746
17747 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17748
17749         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17750         (error_tail): Do not loop, reallocating temporary buffer, since
17751         the output cannot contain more wide characters than the input
17752         contains bytes, the size must be big enough already.  This avoids
17753         one potential size overflow calculation.  Check for size overflow
17754         when calculating temporary buffer size.  Free temporary buffer
17755         when done, if it was allocated with malloc; this plugs a memory
17756         leak.  Remove casts from void * to pointers, that are no longer
17757         needed now that we're assuming C89 or better.
17758
17759         Merge error changes from glibc.
17760
17761         * lib/error.c, error.h: Update copyright notice header to match glibc.
17762         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17763         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17764         Disable cancellation while printing error.
17765         * lib/error.h: Prepend __ to parameter names.
17766
17767 2003-09-26  Jim Meyering  <jim@meyering.net>
17768
17769         * lib/error.c (error_tail): Move some declarations
17770         into inner scope where the local variables are used.
17771
17772 2003-09-26  Bruno Haible  <bruno@clisp.org>
17773
17774         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17775         stpncpy().
17776         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17777
17778 2003-09-26  Bruno Haible  <bruno@clisp.org>
17779
17780         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17781         (stpncpy): Define as alias for gnu_stpncpy.
17782         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17783
17784 2003-09-25  Simon Josefsson  <jas@extundo.com>
17785
17786         * lib/xgetdomainname.h: New file.
17787         * lib/xgetdomainname.c: New file.
17788
17789 2003-09-25  Simon Josefsson  <jas@extundo.com>
17790             Bruno Haible  <bruno@clisp.org>
17791
17792         * modules/getdomainname: New file.
17793         * modules/xgetdomainname: New file.
17794         * MODULES.html.sh (func_all_modules): Add getdomainname,
17795         xgetdomainname.
17796
17797 2003-09-25  Simon Josefsson  <jas@extundo.com>
17798             Bruno Haible  <bruno@clisp.org>
17799
17800         * m4/getdomainname.m4: New file.
17801
17802 2003-09-25  Simon Josefsson  <jas@extundo.com>
17803             Bruno Haible  <bruno@clisp.org>
17804
17805         * lib/getdomainname.h: New file.
17806         * lib/getdomainname.c: New file.
17807
17808 2003-09-25  Karl Berry  <karl@gnu.org>
17809
17810         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17811
17812 2003-09-25  Karl Berry  <karl@gnu.org>
17813
17814         * config/install-sh: update from automake.
17815
17816 2003-09-25  Bruno Haible  <bruno@clisp.org>
17817
17818         * modules/version-etc-2: New file, from modules/version-etc with
17819         modifications.
17820         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17821
17822 2003-09-25  Bruno Haible  <bruno@clisp.org>
17823
17824         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17825         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17826
17827 2003-09-24  Simon Josefsson  <jas@extundo.com>
17828
17829         * modules/xgethostname: Add xgethostname.h.
17830
17831 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17832
17833         * lib/linebuffer.c (freebuffer): Don't free the argument, just
17834         the buffer associated with the argument.  Bug reported by
17835         Simon Josefsson.
17836
17837 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17838
17839         * README: Document assumptions that 'int' is at least 32 bits
17840         wide, that integer arithmetic is 2's complement without overflow,
17841         that there are no holes in integer values, that adding sizes of
17842         two nonoverlapping objects can't overflow, and that all-bits-zero
17843         yields scalar zero.  Fix spelling and capitalization typos.
17844
17845 2003-09-19  Karl Berry  <karl@gnu.org>
17846
17847         * lib/argp.h: update from libc.
17848
17849 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17850
17851         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
17852         to avoid spurious warnings like "AC_RUN_IFELSE was called before
17853         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
17854
17855 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17856
17857         * gnulib-tool: Use "test -h", not "test -L", for portability
17858         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
17859         (tags_regexp): Remove, since \| doesn't conform to POSIX.
17860         (sed_extract_prog): Issue s commands one-by-one, rather than
17861         using \| in one s command.
17862
17863 2003-09-16  Paul Eggert  <eggert@twinsun.com>
17864
17865         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
17866         input error, instead of returning NULL the next time we are called
17867         (and therefore losing track of errno).
17868
17869 2003-09-16  Bruno Haible  <bruno@clisp.org>
17870
17871         * gnulib-tool (func_create_testdir): Warn about duplicated
17872         dependencies.
17873
17874 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17875
17876         * modules/argmatch, modules/fatal, modules/obstack,
17877         modules/xalloc, modules/xgethostname: Sort dependencies by
17878         importance, not alphabetically.
17879
17880 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17881
17882         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
17883         fails, so that the caller gets the proper errno.
17884
17885         * lib/readutmp.c (read_utmp): Likewise.
17886         Check for fstat error.  Close stream and free storage
17887         when failing.
17888
17889 2003-09-14  Karl Berry  <karl@gnu.org>
17890
17891         * config/srclist.txt (strdup.c): disable for c89 changes.
17892
17893 2003-09-14  Jim Meyering  <jim@meyering.net>
17894
17895         * lib/getloadavg.c: Correct cpp indentation.
17896         * lib/strdup.c: Likewise.
17897         * lib/vasnprintf.c: Likewise.
17898
17899 2003-09-14  Bruno Haible  <bruno@clisp.org>
17900
17901         * modules/fwriteerror: New file.
17902         * MODULES.html.sh (func_all_modules): Add fwriteerror.
17903
17904 2003-09-14  Bruno Haible  <bruno@clisp.org>
17905
17906         * lib/fwriteerror.h: New file.
17907         * lib/fwriteerror.c: New file.
17908
17909 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17910
17911         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
17912         modules/xgethostname, modules/xalloc: Depend on exit.
17913
17914 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17915
17916         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
17917
17918         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
17919         and AC_MINIX, too, so that their extensions are available.
17920
17921         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
17922         This macro has been superseded by gl_BACKUPFILE.
17923
17924         More patches to assume C89 or better.
17925
17926         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
17927
17928         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
17929         unconditionally.
17930         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
17931         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
17932         Include <string.h>, <stdlib.h> unconditionally.
17933         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
17934         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
17935         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
17936         headers or for string.h.
17937         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
17938         or strtoul.
17939
17940         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
17941         headers.
17942         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
17943         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17944         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
17945         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
17946         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17947         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
17948         memcpy, memset.
17949         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
17950         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
17951         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
17952         strtol.
17953         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
17954         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
17955         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
17956         strtoul.
17957
17958 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17959
17960         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
17961         * lib/obstack.c [!defined _LIBC]: Likewise.
17962         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
17963         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
17964         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
17965
17966         More changes to assume C89 or better.
17967
17968         * lib/error.c (error_tail): Assume vprintf.
17969
17970         * lib/argmatch.c (getenv): Remove decl.
17971         * lib/progreloc.c (get_full_program_name): Define via prototype.
17972         * lib/setenv.c (clearenv): Likewise.
17973         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
17974         needed.
17975         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
17976         (malloc, memcpy): Remove decls.
17977         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
17978         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
17979         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17980         (memcpy): Remove macro.
17981         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
17982         (__P): Remove.  All uses removed.
17983         (PTR): Remove.  All uses changed to void *.
17984         (CHAR_BIT, NULL): Remove.
17985         (spaces, zeros, memset_space, memset_zero)
17986         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
17987         Remove.
17988         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
17989         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
17990         Define with prototype.
17991         Remove now-unnecessary prototype decl.
17992         (extra_args_spec): Assume ANSI C.  All uses changed.
17993         (extra_args_spec_iso): Remove.
17994         (my_strftime, emacs_strftimeu): Define via prototype.
17995         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
17996         unconditionally.
17997         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
17998         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
17999         (strtoul, strtol): Remove decls.
18000         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
18001         LONG_MAX): Remove.
18002         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18003         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
18004         (LOCALE_PARAM_PROTO): New macro.
18005         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
18006         (INTERNAL (strtol), strtol): Define with a prototype.
18007         (PARAMS): Remove.  All uses removed.
18008         * lib/tempname.c: Include <string.h> unconditionally.
18009         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
18010         * lib/xgethostname.c (main): Define with a prototype.
18011         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
18012         Include <stdlib.h> unconditionally.
18013         (calloc, malloc, realloc, free): Remove decls.
18014         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
18015         Include <stdlib.h> unconditionally.  Sort include file names.
18016         (strtod): Remove.
18017         (xstrtod): Define with a prototype.
18018         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
18019         (strtol, strtoul): Remove decls.
18020
18021 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18022
18023         More patches to assume C89 or better.
18024         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
18025         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
18026         string.h, memchr, STDC_HEADERS.
18027
18028 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18029
18030         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
18031         Include <stdlib.h>, <string.h> unconditionally.
18032         Remove now-unnecessary cast to char *.
18033         * lib/strnlen.c: Include <string.h> unconditionally.
18034         * lib/yesno.c (yesno): Define with a prototype.
18035
18036 2003-09-11  Bruno Haible  <bruno@clisp.org>
18037
18038         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
18039
18040 2003-09-10  Jim Meyering  <jim@meyering.net>
18041
18042         * lib/error.c: Correct indentation of cpp directives.
18043
18044 2003-09-10  Bruno Haible  <bruno@clisp.org>
18045
18046         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
18047         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
18048         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
18049         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
18050         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
18051         <stdlib.h> and <string.h> checks.
18052         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
18053         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
18054
18055 2003-09-10  Bruno Haible  <bruno@clisp.org>
18056
18057         * lib/strcspn.c: Include <string.h> unconditionally.
18058         * lib/strpbrk.c: Include <string.h> unconditionally.
18059         * lib/strstr.c: Include <string.h> unconditionally.
18060         * lib/unicodeio.c: Include <string.h> unconditionally.
18061         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
18062         * lib/unsetenv.c: Likewise.
18063         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
18064         * lib/yesno.c: Include <stdlib.h> unconditionally.
18065         (rpmatch): Add prototype.
18066
18067 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18068
18069         More patches to assume C89 or better.
18070         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
18071         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
18072         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
18073         or for string.h.
18074         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
18075         stdlib.h.
18076         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18077         C headers.
18078         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18079         string.h.
18080         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18081         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18082         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18083         or for string.h.
18084         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18085         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18086         C headers.
18087         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18088         memcpy.
18089         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18090         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18091         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18092         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18093         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18094         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18095         string.h, free.
18096         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18097         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18098         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18099         C headers, or for string.h.
18100         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18101         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18102         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18103         headers, memory.h, stdlib.h, string.h, strings.h.
18104         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18105         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18106         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18107         strchr.
18108         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18109         headers, memory.h, string.h.
18110         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18111         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18112         free.
18113         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18114         headers.
18115         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18116         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
18117         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
18118         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
18119         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
18120
18121 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18122
18123         More K&R removal.
18124
18125         * lib/acosl.c (main): Use a prototype.
18126         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
18127         tanl.c: Likewise.
18128
18129         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
18130
18131         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
18132         (getopt, etopt_long, getopt_long_only, _getopt_internal)
18133         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
18134         with a prototype.
18135         * lib/getopt.c (const): Remove macro.
18136         Include <string.h> unconditionally.
18137         (my_index): Remove; all uses changed to strchr.
18138         (strlen): Remove decl.
18139         (exchange): Remove forward decl; no longer needed.
18140         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
18141         Define with prototype.
18142         * lib/getopt1.c (const): Remove macro.
18143         (getopt_long, getopt_long_only, main): Define with prototype.
18144
18145         * lib/getugroups.c: Include <string.h> unconditionally.
18146
18147         * lib/getusershell.c: Include <stdlib.h> unconditionally.
18148         (getusershell, setusershell, endusershell, readname, main):
18149         Define with prototypes.
18150
18151         * lib/group-member.c: Include group-member.h first.
18152         Include <stdlib.h> unconditionally.
18153
18154         * lib/hard-locale.c: Include hard-locale.h first.
18155         Include <stdlib.h>, <string.h> unconditionally.
18156
18157         * lib/hash.c (free, malloc): Remove decls.
18158         Include <stdlib.h> unconditionally.
18159
18160         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
18161         (getenv): Do not declare.
18162
18163         * lib/idcache.c: Include <string.h> unconditionally.
18164
18165         * lib/long-options.c: Include long-options.h first, to test interface.
18166         Include <stdlib.h> unconditionally.
18167
18168         * lib/makepath.c: Include makepath.h first, to test interface.
18169         Include <stdlib.h> and <string.h> unconditionally.
18170
18171         * lib/linebuffer.c: Include <stdlib.h>.
18172         (free): Remove decl.
18173
18174         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
18175         stddef.h. rpl_malloc returns void *, not char *.
18176         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
18177         prototype.
18178
18179         * lib/md5.h: Include <limits.h> unconditionally.
18180         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
18181         (__P): Remove; all uses removed.
18182         * lib/md5.c: Include "md5.h" first.
18183         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
18184         md5_buffer, md5_process_bytes, md5_process_block):
18185         Define with prototypes.
18186         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
18187         * lib/sha.c: Include "sha.h" first.
18188         Include <stdlib.h>, <string.h> unconditionally.
18189
18190         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
18191         * lib/memcmp.c (__ptr_t): Likewise.
18192         * lib/memrchr.c (__ptr_t): Likewise.
18193         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
18194         Include <string.h> unconditionally.
18195         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
18196         * lib/memchr.c: Include <stdlib.h> unconditionally.
18197         * lib/memchr.c (LONG_MAX): Remove.
18198         * lib/memrchr.c (LONG_MAX): Likewise.
18199         * lib/memchr.c (__memchr): Define via a prototype.
18200         * lib/memrchr.c (__memrchr): Likewise.
18201         * lib/memcmp.c (__P): Remove, and remove all uses.
18202         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
18203         Remove forward decls; no longer needed.
18204         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
18205         Use types required by C89 in prototype.
18206
18207         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
18208         * lib/savedir.c: Likewise.
18209         * lib/mkdir.c (free): Remove decl.
18210         * lib/rmdir.c (rmdir): Define with a prototype.
18211         * lib/savedir.c: Include savedir.h first, to test interface.
18212
18213         * lib/mktime.c (STDC_HEADERS): Remove.
18214         Include <stdlib.h>, <string.h> unconditionally.
18215
18216         * lib/modechange.c: Include <stdlib.h> unconditionally.
18217         (malloc): Remove decl.
18218
18219         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
18220         (free): Remove decl.
18221
18222         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
18223         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
18224         (This type really should be intptr_t, but that's a C99ism.)
18225         (_obstack_memcpy): Remove: all uses changed to memcpy.
18226         Include <string.h> unconditionally.
18227         (struct obstack): Assume __STDC__ for types of members
18228         chunkfun, freefun, extra_arg.
18229         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
18230         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
18231         obstack_begin, obstack_specify_allocation,
18232         obstack_specify_allocation_with_arg, obstack_chunkfun,
18233         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
18234         Remove unprototyped decls and the macros that use them.
18235         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
18236         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
18237         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
18238         (defined __STDC__ && __STDC__)]:
18239         Remove nonprototyped code.
18240         Include <stdlib.h> unconditionally.
18241         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
18242         _obstack_allocated_p, _obstack_free, obstack_free,
18243         _obstack_memory_used, print_and_abort):
18244         Define using prototypes.
18245         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
18246         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
18247         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
18248         obstack_next_free, obstack_object_size, obstack_room) [0]:
18249         Remove unused, unprototyped code.
18250
18251         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
18252
18253         * lib/physmem.c (physmem_total, physmem_available, main): Define
18254         with prototypes.
18255
18256         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
18257         (main): Define with a prototype.
18258
18259         * lib/posixver.c (getenv): Remove decl.
18260
18261         * lib/putenv.c (malloc): Returns void *, not char *.
18262         Include <string.h> unconditionally.
18263         (strchr, memcpy, NULL): Do not define.
18264
18265         * lib/readtokens.c: Include readtokens.h first, to test interface.
18266         Include <stdlib.h>, <string.h> unconditionally.
18267         (init_tokenbuffer): Define with a prototype.
18268
18269         * lib/regex.c (PARAMS): Remove.  All uses removed.
18270         All uses of _RE_ARGS removed, too.
18271         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18272         unconditionally.
18273         (bzero): Assume memset exists.
18274         (memcmp, memcpy, NULL): Remove.
18275         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
18276         char, or assignments to local vars of type signed char.
18277         (init_syntax_once, PREFIX(extract_number_and_incr),
18278         PREFIX(print_partial_compiled_pattern),
18279         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
18280         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
18281         PREFIX(regex_grow_registers), PREFIX(regex_compile),
18282         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
18283         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
18284         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
18285         wcs_compile_range, byte_compile_range, truncate_wchar,
18286         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
18287         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
18288         count_mbs_length, wcs_re_match_2_internal,
18289         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
18290         PREFIX(alt_match_null_string_p),
18291         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
18292         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
18293         regfree, PREFIX(extract_number)): Define with prototype.  Remove
18294         now-unnecessary declaration, if any.
18295         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
18296         regcomp, regexec):
18297         Remove now-unnecessary casts among pointer types.
18298         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
18299
18300         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
18301         (free): Remove decl.
18302
18303         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
18304
18305         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
18306         (free): Remove decl.
18307
18308         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
18309         * lib/xgetcwd.c: Likewise.
18310
18311         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
18312         (free): Remove decl.
18313
18314         * lib/strchrnul.c (strchrnul): Define with a prototype.
18315         Fix bug: c_in was not converted to char before searching.
18316
18317         The following changes are not K&R related:
18318
18319         * lib/group-member.h: Include <sys/types.h>, so that this file is
18320         self-contained.
18321         * lib/makepath.h: Likewise.
18322
18323         * lib/getusershell.c (readname, default_index, line_size, readname):
18324         Use size_t, not int, for sizes.
18325         (readname): If the size overflows, report an error instead of
18326         looping forever.
18327
18328 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18329
18330         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
18331         libc.
18332
18333 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18334
18335         * README: New section: portability guidelines.
18336
18337 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18338
18339         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
18340         C89 spec.
18341
18342 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18343
18344         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
18345
18346 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18347
18348         Assume C89 or better; remove K&R cruft.
18349         A few of these changes were first proposed by Derek Robert Price
18350         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18351
18352         * lib/addext.c: Include <string.h> unconditionally.
18353         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18354         Don't declare getenv or malloc.
18355
18356         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18357         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18358         (NULL): Remove.
18359         (find_stack_direction, alloca): Use prototypes.
18360
18361         * lib/atexit.c (atexit): Define using a prototype.
18362
18363         * lib/basename.c, dirname.c, stripslash.c:
18364         Include <string.h> unconditionally.
18365
18366         * lib/bcopy.c: Include <stddef.h>.
18367         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18368
18369         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18370
18371         * lib/error.h (error, error_at_line, error_print_progname)
18372         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18373         * lib/error.c: Include error.h first, to check interface.
18374         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18375         (VA_START): Remove; all uses changeed to va_start.
18376         (exit, strerror): Remove decls.
18377         (error_print_progname): Prototype uncondionally.
18378         Don't include <errno.h>; no longer needed.
18379         (private_strerror): Remove.
18380         (error_tail): Always define.
18381         (error, error_at_line): Assume C89 or better; always use prototypes.
18382         * lib/fatal.c: Include "fatal.h" first, to test interface.
18383         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18384         (VA_START): Remove; all uses changed to va_start.
18385         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18386         this case.
18387         (exit): Remove decl.
18388         (fatal): Prototype unconditionally.  Assume va_start works.
18389         Abort at end, to pacify gcc.
18390
18391         * lib/euidaccess.c (main): Define with a prototype.
18392
18393         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18394
18395         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18396
18397         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18398         prototypes.
18399         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18400         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18401         (getenv): Remove decl.
18402         (fnmatch): Define using a prototype.
18403         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18404         (FCT): Define using a prototype.
18405
18406         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18407
18408         * lib/gethostname.c: Include <stddef.h>.
18409         (gethostname): Define with prototype.  Length is size_t, not int.
18410
18411 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18412
18413         Assume C89 or better; remove K&R cruft.
18414         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18415         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18416         string.h, getenv, malloc.
18417         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18418         headers.
18419         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18420         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18421         do not check for strerror.
18422         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18423         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18424         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18425         do not check for doprnt or vprintf.
18426         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18427         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18428
18429 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18430
18431         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18432         getversion.c should have been removed then, but was accidentally
18433         preserved.
18434
18435         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18436         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18437
18438 2003-09-08  Karl Berry  <karl@gnu.org>
18439
18440         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18441                 config, forget about prep.
18442
18443         * config/depcomp, missing: update from automake.
18444
18445 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18446
18447         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18448         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18449
18450 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18451
18452         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18453         copy_tm_result.  Bug reported by Simon Josefsson in
18454         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18455
18456 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18457
18458         * m4/time_r.m4: New file.
18459         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18460         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18461         is. Check for timegm declaration.
18462         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18463         Do not check for gmtime_r.
18464         Replace mktime if __mktime_internal does not exist and if mktime
18465         hasn't been replaced already.
18466
18467 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18468
18469         * lib/time_r.c, lib/time_r.h: New files.
18470
18471         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18472         __localtime_r.
18473         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18474         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18475
18476         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18477         __gmtime_r.
18478         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18479         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18480         Include <time_r.h>.
18481
18482         * lib/timegm.c: Switch to glibc implementation, with the following
18483         changes:
18484         [defined HAVE_CONFIG_H]: Include <config.h>.
18485         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18486         (__mktime_internal) [!defined _LIBC]: New decl.
18487         (__gmtime_r) [!defined _LIBC]: New macro and function.
18488         (timegm): Use a prototype, since gnulib assumes C89.
18489         Do not bother declaring tmp to be const, as it's not really usefu.
18490         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
18491         (timegm): Declare only if HAVE_DECL_TIMEGM.
18492
18493 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18494
18495         * MODULES.html.sh (func_all_modules): Add time_r.
18496         * modules/time_r: New file.
18497         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18498         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18499
18500 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18501
18502         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18503         Bug reported by Lute Kamstra in
18504         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18505
18506         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18507         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18508         course with correspondingly smaller numbers for tomorrow and
18509         yesterday.  From Tadayoshi Funaba.  Originally installed into
18510         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18511         coreutils merge?).
18512
18513 2003-08-31  Simon Josefsson  <jas@extundo.com>
18514
18515         * modules/timegm: New file.
18516         * MODULES.html.sh (func_all_modules): Add timegm.
18517
18518 2003-08-31  Simon Josefsson  <jas@extundo.com>
18519
18520         * m4/timegm.m4: New file.
18521
18522 2003-08-31  Simon Josefsson  <jas@extundo.com>
18523
18524         * lib/timegm.h: New file.
18525         * lib/timegm.c: New file.  Based on
18526         wget-1.8.2/src/http.c:mktime_from_utc.
18527
18528 2003-08-31  Karl Berry  <karl@gnu.org>
18529
18530         * lib/argp.h: update from libc.
18531
18532 2003-08-28  Bruno Haible  <bruno@clisp.org>
18533
18534         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
18535         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
18536         followed by '#define fnmatch fnmatch_posix' gives an error.
18537
18538 2003-08-28  Bruno Haible  <bruno@clisp.org>
18539
18540         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
18541         warning on QNX, which defines O_BINARY to 000000.
18542
18543 2003-08-27  Jim Meyering  <jim@meyering.net>
18544
18545         * m4/mkstemp.m4: Require that the system mkstemp be able to create
18546         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
18547         would fail after 32.  Reported by Danny Levinson.  Details here:
18548         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
18549
18550 2003-08-24  Bruno Haible  <bruno@clisp.org>
18551
18552         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
18553         MSVC7 <stdio.h> is included later.
18554
18555 2003-08-22  Simon Josefsson  <jas@extundo.com>
18556
18557         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
18558
18559 2003-08-20  Karl Berry  <karl@gnu.org>
18560
18561         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
18562
18563 2003-08-20  Bruno Haible  <bruno@clisp.org>
18564
18565         * modules/progname: New file.
18566         * MODULES.html.sh (func_all_modules): Add progname.
18567
18568 2003-08-20  Bruno Haible  <bruno@clisp.org>
18569
18570         * lib/progname.h: New file, from GNU gettext.
18571         * lib/progname.c: New file, from GNU gettext.
18572         * lib/progreloc.c: New file, from GNU gettext.
18573
18574 2003-08-19  Jim Meyering  <jim@meyering.net>
18575
18576         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18577         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18578
18579 2003-08-19  Bruno Haible  <bruno@clisp.org>
18580
18581         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18582         more.
18583
18584 2003-08-19  Bruno Haible  <bruno@clisp.org>
18585
18586         * lib/xstrdup.c: Assume <string.h> exists.
18587
18588 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18589
18590         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18591         in makefile rules.
18592
18593 2003-08-18  Jim Meyering  <jim@meyering.net>
18594
18595         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18596         * m4/lib-ld.m4: Likewise.
18597
18598 2003-08-18  Jim Meyering  <jim@meyering.net>
18599
18600         * lib/setenv.h: Indent nested cpp directive.
18601         * lib/vasnprintf.c: Remove trailing blanks.
18602
18603 2003-08-17  Simon Josefsson  <jas@extundo.com>
18604
18605         * modules/xstrndup: New file.
18606         * MODULES.html.sh (func_all_modules): Add xstrndup.
18607
18608 2003-08-17  Simon Josefsson  <jas@extundo.com>
18609
18610         * modules/argp: Fix autoconf macro name. Add more dependencies.
18611
18612 2003-08-17  Simon Josefsson  <jas@extundo.com>
18613
18614         * m4/xstrndup.m4: New file.
18615
18616 2003-08-17  Simon Josefsson  <jas@extundo.com>
18617
18618         * m4/argp.m4: New file.
18619
18620 2003-08-17  Simon Josefsson  <jas@extundo.com>
18621             Bruno Haible  <bruno@clisp.org>
18622
18623         * lib/xstrndup.h: New file.
18624         * lib/xstrndup.c: New file.
18625
18626 2003-08-17  Bruno Haible  <bruno@clisp.org>
18627
18628         * modules/strndup (Files, Include): Add lib/strndup.h.
18629
18630 2003-08-17  Bruno Haible  <bruno@clisp.org>
18631
18632         * modules/euidaccess (Files): Add lib/euidaccess.h.
18633
18634 2003-08-17  Bruno Haible  <bruno@clisp.org>
18635
18636         * lib/strndup.h: New file.
18637
18638 2003-08-17  Bruno Haible  <bruno@clisp.org>
18639
18640         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18641         like AC_GNU_SOURCE.
18642         * modules/extensions (configure.ac): Comment out the invocation of
18643         gl_USE_SYSTEM_EXTENSIONS.
18644
18645 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18646
18647         Merges from coreutils, etc.
18648         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18649         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18650         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18651         fixing a typo.
18652         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18653         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18654
18655 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18656
18657         Document merge from coreutils.
18658         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18659         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18660         * modules/utime: Add m4/utimes-null.m4.
18661
18662 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18663
18664         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18665         space, undoing this 2003-08-12 change:
18666         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18667
18668 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18669
18670         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18671         strtoul.c from libc, undoing this 2003-08-12 change:
18672         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18673
18674 2003-08-16  Jim Meyering  <jim@meyering.net>
18675
18676         Merges from coreutils.
18677         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18678         prefix.  Adjust cache variables similarly.  Create 500 rather than
18679         just 300 files, to exercise bug on Darwin6.5, too.
18680         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18681         $missing_dir.
18682         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18683         AM_SYS_POSIX_TERMIOS.
18684         Reported by mkc@mathdogs.com.
18685         Also change use of $am_cv_sys_posix_termios
18686         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18687         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18688         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18689         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18690         in /proc/mounts until it finds one with matching device number.  This
18691         is unnecessary when the FILE argument *is* a mount point.  No stat call
18692         is necessary in that case.  So, disable the statvfs-testing code on
18693         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18694         as RedHat bug# 84846.
18695         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18696         to 1MB, so as not to render systems with no stack size limit (e.g.,
18697         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18698         Include <unistd.h>.  On some systems,
18699         it is required for the definition of _SC_PAGESIZE.
18700
18701 2003-08-16  Jim Meyering  <jim@meyering.net>
18702
18703         Merge from coreutils.
18704         * lib/xstrtoimax.c: #else #if -> #elif.
18705         * lib/xstrtoumax.c: Likewise.
18706
18707 2003-08-16  Jim Meyering  <jim@meyering.net>
18708
18709         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18710         * m4/utimes.m4: Removed.
18711         * m4/utimes-null.m4: Renamed from utimes.m4.
18712
18713         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18714         to 1MB, so as not to render systems with no stack size limit (e.g.,
18715         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18716         Include <unistd.h>.  On some systems,
18717         it is required for the definition of _SC_PAGESIZE.
18718
18719 2003-08-16  Jim Meyering  <jim@meyering.net>
18720         and Paul Eggert  <eggert@cs.ucla.edu>
18721
18722         Merges from coreutils, etc.
18723
18724         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18725         using the latest version from cvs.  This avoids problems with #line
18726         directives using a vendor (Sun) compiler.
18727         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18728         Don't set GETGROUPS_LIB here; now it's
18729         done via getgroups.m4's wrapper function.
18730         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18731         rather than just in sh-util/configure.in, so that the
18732         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18733         same.
18734         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18735         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18736         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18737         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18738         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18739         Remove code that is now done by the newly-required macros.
18740         Append $(EXEEXT) to DF_PROG.
18741         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18742         Do not invoke or require the following here,
18743         since prereq.m4 or some gnulib .m4 now does this for us:
18744         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18745         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18746         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18747         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18748         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18749         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18750         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18751         AC_FUNC_OBSTACK.
18752         Do not replace the following functions, as this is now the job
18753         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18754         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18755         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18756         atexit getpass, strdup, getpagesize.
18757         Replace 'raise'.
18758         Do not check for the following functions, as this is now the job
18759         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18760         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18761         setregid.
18762         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18763         Check for sys/sysctl.h.
18764         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18765         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18766         of checking for ssize_t ourselves.
18767
18768         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18769         Require every macro that gnulib/modules/* suggests for us.
18770         (jm_PREREQ_ADDEXT): New macro.
18771         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18772         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18773
18774         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18775         (gl_PHYSMEM): Use it.
18776         Also check for `table' function.
18777         Check for new headers and functions.
18778         Add check for sys/sysmp.h.
18779         With suggestions from Kaveh Ghazi.
18780         Ignore headers that are present but cannot be compiled.  This
18781         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18782         C 5.4.
18783
18784 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18785
18786         Document merge from coreutils.
18787         * modules/userspec: Depend on posixver.
18788         * modules/strftime: Depend on tzset.
18789
18790 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18791
18792         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18793         rather than tab, after '#' in shell-script copyright notices.
18794         Suggested by Bruno Haible.
18795
18796 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18797
18798         * config/srclist-update: Use three spaces, rather than tab, after '#'
18799         in shell-script copyright notices.  Suggested by Bruno Haible.
18800         Remove unnecessary parenthesization in regular expression.
18801
18802 2003-08-15  Jim Meyering  <jim@meyering.net>
18803
18804         Merge from coreutils.
18805         * lib/xgethostname.c: Include <stdlib.h>.
18806         (xghostname): Don't exit for anything other than memory-related
18807         failure; just return NULL.
18808         * lib/userspec.c: Include "posixver.h".
18809         (parse_user_spec): Accept `.' as a separator only
18810         in pre-POSIX-200112 mode.
18811         * lib/strtoimax.c: Use #elif rather than #else #if.
18812         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18813         Remove function, now that we can rely on a working tzset function.
18814         [!_LIBC]: Ensure that the required autoconf test has been run.
18815         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18816         Use underlying_strftime for %r.
18817         * lib/sha.c: Merge in some clean-up and optimization changes from
18818         glibc.
18819         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18820         Ensure that it is a multiple of 64.
18821         Rearrange loop exit tests so as to avoid performing an
18822         additional fread after encountering an error or EOF.
18823         * lib/realloc.c: Update copyright date.
18824
18825 2003-08-15  Jim Meyering  <jim@meyering.net>
18826         and Paul Eggert  <eggert@twinsun.com>
18827
18828         Merge from coreutils.
18829         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
18830         member but strut utmpx does not.  Needed for AIX 4.3.3.
18831         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
18832
18833 2003-08-15  Jim Meyering  <jim@meyering.net>
18834         and Paul Eggert  <eggert@cs.ucla.edu>
18835
18836         Merges from coreutils, etc.
18837         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
18838         Require gl_FUNC_TZSET_CLOBBER.
18839         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
18840         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
18841         members.
18842
18843 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18844
18845         Help the merge from coreutils.
18846         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
18847         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
18848         * m4/tzset.m4: Use it too.
18849
18850 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18851
18852         * modules/tzset: New file.
18853
18854 2003-08-14  Jim Meyering  <jim@meyering.net>
18855
18856         Merges from coreutils.
18857         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
18858         variable names, rather than @FNMATCH_H@.
18859         * modules/alloca: Likewise for $(ALLOCA_H).
18860
18861         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
18862         the three copies of the literal target, `fnmatch.h'.
18863         * modules/alloca (alloca.h): Likewise.
18864
18865 2003-08-14  Jim Meyering  <jim@meyering.net>
18866
18867         Merge from coreutils.
18868         * m4/tzset.m4: New file.
18869         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
18870         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
18871         otherwise, AIX 5.1 systems would end up using the latter.
18872         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
18873         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
18874         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
18875         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
18876
18877 2003-08-14  Jim Meyering  <jim@meyering.net>
18878
18879         Merge from coreutils.
18880         * lib/obstack.h: Whitespace changes.
18881         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
18882         and xcalloc return values.
18883         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
18884         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
18885         hang on OSF/1 5.1 for DIR on both local and remote file systems.
18886         Reported by (and fix confirmed by) Nelson H. F. Beebe.
18887         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18888         error from mntctl.
18889         Use mntctl's return value to drive the entry-processing loop, since
18890         we can't rely on the value of the vmt_length member in the last
18891         entry.  On some systems doing so could result in exhausting
18892         virtual memory.  Based in part on a patch from Mike Jetzer.
18893
18894 2003-08-14  Jim Meyering  <jim@meyering.net>
18895         and Paul Eggert  <eggert@twinsun.com>
18896
18897         Merges from coreutils, plus other fixes.
18898         * lib/physmem.c: Merge in portability changes from gcc/libiberty
18899         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
18900         for credits and details.  Thanks to Kaveh Ghazi for helping
18901         to keep these files in sync.
18902         (ARRAY_SIZE): Define it.
18903         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
18904         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
18905         (memcasecmp): Don't assume size_t fits in unsigned int.
18906         Remove casts and duplicate code.
18907         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
18908         (memcpy): Remove definition.
18909         Merge in some clean-up and optimization changes from glibc.
18910         [BLOCKSIZE]: Move definition to top of file.
18911         Ensure that it is a multiple of 64.
18912         Rearrange loop exit tests so as to avoid performing an
18913         additional fread after encountering an error or EOF.
18914         * lib/md5.h (md5_uintptr): Define.
18915         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
18916         return to the initial working directory.  Preserve errno
18917         for caller.
18918         * lib/idcache.c: Include "xalloc.h".
18919         (xmalloc, xrealloc): Remove decls.
18920         (getuser): Remove casts no longer required in C89.
18921         * lib/human.c: Include stdio.h, for sprintf.
18922         * lib/group-member.c: Include "xalloc.h".
18923         (xmalloc, xrealloc): Remove decls.
18924         (get_group_info): Remove casts no longer required in C89.
18925         * lib/getusershell.c (readname): Remove casts no longer required in
18926         C89.
18927         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
18928         * lib/getline.c: Whitespace fix, from coreutils.
18929
18930 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18931
18932         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
18933         Check for isascii.
18934
18935         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18936         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18937         Undo previous (whitespace-only) change.
18938
18939 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18940
18941         * lib/exclude.c: Include <ctype.h>
18942         (IN_CTYPE_DOMAIN): New macro.
18943         (is_space): New fn.
18944         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
18945         and empty lines.
18946
18947         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18948         Undo previous (whitespace-only) change.
18949
18950 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18951
18952         * config/srclist-update: Change update back to the old behavior,
18953         leaving whitespace alone.  Use one 'sed' command rather than a
18954         pipeline.
18955         (fixlicense): Now a variable, not a function.
18956         (remove_trailing_blanks): Remove.
18957         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
18958         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18959         Undo previous (whitespace-only) change.
18960
18961 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18962
18963         Merge from coreutils.
18964         * modules/euidaccess: Add lib_SOURCES, include for new
18965         file euidaccess.h
18966
18967 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18968
18969         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18970         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18971         Normalize leading white space and remove trailing white space.
18972
18973         Merge from coreutils
18974         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
18975
18976         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
18977         0.12.1.  These files are now being upgraded automatically by
18978         ../config/srclist-update.
18979
18980 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18981
18982         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18983         Normalize leading white space and remove trailing white space.
18984         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
18985         notice, as per ../config/srclist-update.
18986
18987         Merge from coreutils.
18988         * lib/euidaccess.h: New file.
18989         * lib/euidaccess.c: Include it.
18990         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
18991         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
18992         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
18993
18994 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18995
18996         * config/srclist-update: Add copyright notice.
18997         (remove_id_lines, remove_trailing_blanks): New constants.
18998         (fixfile): Use them to normalize spacing a bit in copied files.
18999         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19000         Normalize leading white space and remove trailing white space.
19001
19002         * config/texinfo.tex: Sync with texinfo.
19003
19004         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
19005         strtoul.c from libc, to merge coreutils whitespace changes.
19006
19007         * config/srclist.txt: Get the following m4 files from gettext:
19008         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
19009         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
19010         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
19011         wint_t.m4.
19012
19013 2003-08-12  Karl Berry  <karl@gnu.org>
19014
19015         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
19016         been made.
19017
19018 2003-08-11  Paul Eggert  <eggert@twinsun.com>
19019
19020         * modules/gnu-source, m4/gnu-source.m4:
19021         Remove; we're assuming Autoconf 2.54 or later now.
19022         Suggested by Bruno Haible.
19023         * MODULES.html.sh (func_all_modules): Remove gnu-source.
19024
19025 2003-08-11  Bruno Haible  <bruno@clisp.org>
19026
19027         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
19028
19029 2003-08-11  Bruno Haible  <bruno@clisp.org>
19030
19031         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
19032         (vasnprintf): Use it instead of wcslen.
19033
19034 2003-08-11  Bruno Haible  <bruno@clisp.org>
19035
19036         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
19037         value to ensure that _Bool promotes to int. Use #define for _Bool when
19038         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
19039
19040 2003-08-10  Karl Berry  <karl@gnu.org>
19041
19042         * lib/regex.h: update from libc (whitespace fix).
19043
19044 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19045
19046         Merge some files from coreutils.  These changes were
19047         originally made by Jim Meyering.
19048         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
19049         many older Unixes require this.
19050         * lib/alloca.c (alloca): Remove cast to argument of free;
19051         no longer needed in C89.
19052         * lib/alloca_.h, regex.h: Fix white space to match
19053         what GNU indent does.
19054
19055 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19056
19057         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
19058         apparently Emacs's Unicode mode got confused before my 2003-08-05
19059         checkin.
19060
19061 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19062
19063         * m4/extensions.m4: New file.
19064         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
19065         Require gl_USE_SYSTEM_EXTENSIONS.
19066         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
19067         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
19068
19069 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19070
19071         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
19072         * modules/extensions, modules/gnu-source: New files.
19073         * modules/timespec, modules/unlocked-io: Depend on extensions.
19074
19075 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19076
19077         * modules/restrict: New file.
19078         * MODULES.html.sh (func_all_modules): Add restrict.
19079         * modules/regex: Depend on restrict.
19080
19081 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19082
19083         * m4/restrict.m4: New file.
19084         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19085
19086 2003-08-07  Bruno Haible  <bruno@clisp.org>
19087
19088         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19089         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19090
19091 2003-08-07  Bruno Haible  <bruno@clisp.org>
19092
19093         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19094         makes the module 'getndelim2' compatible with the module 'getline'.
19095
19096 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19097
19098         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19099         byte with "\201" to avoid glitches when editing that source file
19100         with multi-gnome-terminal.
19101
19102 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19103
19104         * lib/bumpalloc.h: Remove.
19105
19106 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19107
19108         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19109         * modules/bumpalloc: Remove.
19110
19111 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19112
19113         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19114         GNU coding style.
19115
19116         Merge from coreutils.
19117         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
19118         1. From glibc.
19119         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
19120         from Karl Berry, implemented by Jim Meyering.
19121         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
19122         from Dmitry V. Levin.
19123         Remove anachronistic cast of xrealloc.
19124         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
19125         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
19126         type. Otherwise, it wouldn't compile with at least /bin/cc on
19127         ymp-cray-unicos9.0.2.X.
19128         Combine two mostly-identical uses of alloca into one.
19129         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
19130
19131 2003-08-04  Dave Love  <d.love@dl.ac.uk>
19132
19133         [From Emacs.]
19134
19135         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
19136         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
19137         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
19138         obsolete NLIST_NAME_UNION.
19139         [__GNU__]: Undef BSD and FSCALE.
19140         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
19141
19142 2003-08-03  Paul Eggert  <eggert@twinsun.com>
19143
19144         * lib/stdbool_.h (_Bool): Make it signed char, instead of
19145         an enum type, so that it's guaranteed to promote to int.  See:
19146         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
19147
19148 2003-08-03  Karl Berry  <karl@gnu.org>
19149
19150         * config/depcomp: update from automake.
19151
19152 2003-07-31  Paul Eggert  <eggert@twinsun.com>
19153
19154         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
19155         (strerror): Don't assume that a printable int fits in 14 bytes.
19156
19157 2003-07-31  Bruno Haible  <bruno@clisp.org>
19158
19159         * modules/getpass-gnu: New file.
19160         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
19161
19162 2003-07-31  Bruno Haible  <bruno@clisp.org>
19163
19164         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
19165
19166 2003-07-24  Karl Berry  <karl@gnu.org>
19167
19168         * config/missing: update from automake.
19169
19170 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
19171             Bruno Haible  <bruno@clisp.org>
19172
19173         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
19174         * lib/getline.c (getline, getdelim): Likewise.
19175         Remove _GNU_SOURCE define; now it's defined in config.h through
19176         m4/getline.m4.
19177
19178 2003-07-23  Karl Berry  <karl@gnu.org>
19179
19180         * config/config.sub: update from prep.
19181
19182 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19183
19184         * modules/xalloc (Depends-on): Add exitfail.
19185         * modules/xmemcoll: Likewise.
19186
19187 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19188
19189         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
19190         over-parenthesization in macros.
19191
19192         Sync with coreutils.
19193
19194         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
19195         required by C99.
19196
19197         Use `exit_failure' for xalloc and xmemcoll instead of their own
19198         private exit-failure variables.
19199         * lib/xalloc.h (xalloc_exit_failure): Remove.
19200         * lib/xmalloc.c: Likewise.  Include exitfail.h.
19201         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
19202         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
19203         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
19204         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
19205
19206 2003-07-20  Jim Meyering  <jim@meyering.net>
19207
19208         * modules/closeout (Depends-on): Add exitfail.
19209         Suggestion from Bruno Haible.
19210
19211 2003-07-19  Karl Berry  <karl@gnu.org>
19212
19213         * config/config.sub: update from prep.
19214
19215 2003-07-18  Paul Eggert  <eggert@twinsun.com>
19216
19217         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
19218         Remove.
19219         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
19220         to test that it can stand by itself.  Include "exitfail.h".
19221         Clients should set exit_failure instead.
19222         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
19223
19224 2003-07-18  Bruno Haible  <bruno@clisp.org>
19225
19226         * modules/getndelim2: New file.
19227         * modules/getline: Share files with module getndelim2.
19228         * modules/getnline: Depend on getndelim2 instead of sharing files with
19229         it. Add getnline.c to lib_SOURCES.
19230         * MODULES.html.sh (func_all_modules): Add getndelim2.
19231
19232 2003-07-18  Bruno Haible  <bruno@clisp.org>
19233
19234         * m4/getndelim2.m4: New file.
19235         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
19236         invoke gl_PREREQ_GETNDELIM2.
19237         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
19238         gl_PREREQ_GETNDELIM2.
19239         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
19240         gl_GETNDELIM2.
19241
19242 2003-07-18  Bruno Haible  <bruno@clisp.org>
19243
19244         * lib/getndelim2.h: New file.
19245         * lib/getndelim2.c: Make into a module of its own. Include config.h,
19246         getndelim2.h.
19247         (getndelim2): Make non-static. Change return type to ssize_t.
19248         * lib/getline.h: Change argument names.
19249         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
19250         * lib/getnline.c: Include getndelim2.h.
19251
19252 2003-07-18  Andreas Schwab  <schwab@suse.de>
19253
19254         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
19255
19256 2003-07-17  Karl Berry  <karl@gnu.org>
19257
19258         * config/config.sub: update from prep.
19259
19260 2003-07-17  Bruno Haible  <bruno@clisp.org>
19261
19262         * modules/getnline: New file.
19263         * modules/getline: Add lib/getndelim2.c to source file list.
19264         * MODULES.html.sh (func_all_modules): Add getnline.
19265
19266 2003-07-17  Bruno Haible  <bruno@clisp.org>
19267
19268         * m4/getnline.m4: New file.
19269
19270 2003-07-17  Bruno Haible  <bruno@clisp.org>
19271
19272         * m4/Makefile.am.in: Remove file.
19273         * m4/Makefile.am: Remove file.
19274         * m4/Makefile.in: Remove file.
19275
19276 2003-07-17  Bruno Haible  <bruno@clisp.org>
19277
19278         * lib/getnline.h: New file.
19279         * lib/getnline.c: New file.
19280         * lib/getndelim2.c: New file, extracted from getline.c.
19281         (getndelim2): Renamed from getdelim2, with added nmax argument.
19282         * lib/getline.c: Include getndelim2.c.
19283         (getdelim2): Moved out to getndelim2.c.
19284         (getline, getdelim): Update.
19285
19286 2003-07-17  Bruno Haible  <bruno@clisp.org>
19287
19288         * lib/Makefile.am: Remove file.
19289         * lib/Makefile.in: Remove file.
19290
19291 2003-07-17  Bruno Haible  <bruno@clisp.org>
19292
19293         * configure.in: Remove file.
19294         * Makefile.in: Remove file.
19295
19296 2003-07-17  Bruno Haible  <bruno@clisp.org>
19297
19298         * MODULES.html.sh: Put the </BODY> right before </HTML>.
19299
19300 2003-07-16  Karl Berry  <karl@gnu.org>
19301
19302         * config/srclist-update: was running fixlicense twice, which caused
19303                 texinfo.tex to be nullified for some reason.  Simplify,
19304                 $gplsrc is no longer needed as far as I can see?
19305
19306 2003-07-16  Jim Meyering  <jim@meyering.net>
19307
19308         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
19309
19310 2003-07-15  Paul Eggert  <eggert@twinsun.com>
19311
19312         * config/srclist.txt: Get the following files from gettext-runtime/intl
19313         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
19314         ref-del.sin.  From Bruno Haible.
19315         * config/srclist-update (fixfile): Change grep pattern again, since the
19316         previous fix didn't work (there was another trailing $).  Use
19317         '[$]' to escape the $s.
19318
19319 2003-07-15  Karl Berry  <karl@gnu.org>
19320
19321         * lib/vasnprintf.c: update from gettext.
19322
19323 2003-07-15  Karl Berry  <karl@gnu.org>
19324
19325         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
19326         gets expanded when surrounded by '$'.
19327
19328 2003-07-15  Jim Meyering  <jim@meyering.net>
19329
19330         * modules/save-cwd: Don't depend on error.  From Derek Price.
19331
19332 2003-07-15  Jim Meyering  <jim@meyering.net>
19333
19334         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
19335
19336 2003-07-14  Simon Josefsson  <jas@extundo.com>
19337
19338         * modules/mempcpy: New file.
19339         * MODULES.html.sh (func_all_modules): Add mempcpy.
19340
19341 2003-07-14  Simon Josefsson  <jas@extundo.com>
19342
19343         * m4/mempcpy.m4: New file.
19344
19345 2003-07-14  Simon Josefsson  <jas@extundo.com>
19346
19347         * lib/mempcpy.h: New file.
19348         * lib/mempcpy.c: New file.
19349
19350 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19351
19352         * modules/getdate, modules/posixtm: Depend on mktime.
19353
19354 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19355
19356         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19357         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19358         unicodeio.c, unicodeio.h, unlocked-io.h:
19359         Switch from LGPL to GPL.
19360
19361 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19362
19363         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19364         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19365         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19366         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19367         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19368         updated automatically by ../config/srclist-update.  This changes
19369         their license from LPGL to GPL.
19370
19371 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19372
19373         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19374         assumed to refer to the root of the most recent stable gettext version.
19375         * config/srclistvars.sh: Add defaults for eggert.
19376         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19377         Match "This program" as well as "The program".  This is needed
19378         for gettext.
19379
19380 2003-07-14  Jim Meyering  <jim@meyering.net>
19381
19382         Don't emit diagnostics.  Let callers do that.
19383         * lib/save-cwd.c: Don't include "error.h".
19384         (save_cwd): Don't call error.  Ensure that errno is valid
19385         when returning nonzero.
19386
19387         * lib/save-cwd.h (restore_cwd): Update prototype.
19388         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19389         Simplify.  Don't call error upon failure.  Let callers do that.
19390         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19391         when auditing is enabled.  But don't bother updating the #if.
19392
19393 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19394
19395         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19396         it breaks C++ compilation.
19397         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19398
19399 2003-07-10  Simon Josefsson  <jas@extundo.com>
19400
19401         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19402
19403 2003-07-10  Jim Meyering  <jim@meyering.net>
19404
19405         * m4/clock_time.m4: Remove trailing blank.
19406         * m4/intmax_t.m4: Likewise.
19407
19408 2003-07-10  Jim Meyering  <jim@meyering.net>
19409
19410         * lib/vasnprintf.c: Remove trailing blanks.
19411         Make cpp indentation consistent.
19412
19413 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19414
19415         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19416         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19417         Switch from LGPL to GPL.
19418
19419 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19420
19421         * config/srclist.txt: Sort sublists.  Add
19422         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19423         that differ from gnulib for one reason or another; we'd like this list
19424         to be smaller but for now let's document what we have.
19425
19426 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19427
19428         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19429         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19430         and sweeter "eval x=$x".
19431         * config/srclist.txt: Get lib/argp* from glibc.
19432
19433 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19434
19435         * lib/mktime.c: Fix some boundary cases and remove need for floating
19436         point.
19437
19438         Issue a compile-time diagnostic if time_t is floating point, or if
19439         two's complement arithmetic is not in effect, or if arithmetic
19440         right shift does not propagate the sign.  These assumptions were
19441         all in the original code but they weren't checked.
19442
19443         (TIME_T_MIDPOINT, verify): New macros.
19444         (__isleap): Remove; it has integer overflow problems.
19445         (leapyear): New function, without those problems.
19446         (ydhms_tm_diff): Remove; splitting into two parts.
19447         (ydhms_diff): New function, containing the arithmetic part of
19448         the old ydhms_tm_diff function.  Issue a compile-time
19449         diagnostic if we are not using C99 integer division.
19450         Avoid casts when possible.
19451         (guess_time_tm): New function, containing the checking part of
19452         the old ydhms_tm_diff function.  Return the new value, rather than
19453         the difference between it and the old.  Accept a new argument T
19454         so that *T specifies the old value.  Check for overflow in the result.
19455
19456         (__mktime_internal): Use a time_t offset, not a long int offset.
19457         This undoes the 2003-06-04 change, which is no longer needed now
19458         that we have better overflow checking.
19459         (localtime_offset): Likewise.
19460
19461         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19462         and long are 64-bit but int is only 32-bit.
19463         (ydhms_diff): Use long int to store year1 and yday1.
19464         Issue a compile-time diagnostic if long int is not wide enough.
19465
19466         (__mktime_internal): Use long int to store adjusted year and yday.
19467         Use plain C rather than preprocessor commands, if that doesn't
19468         affect efficiency.
19469         Check for overflow (and try to repair) after each probe
19470         rather than checking only at the very end.  This avoids some bugs
19471         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19472         does not equal GMT offset at maximum time).
19473         Use integer to check for overflow rather than floating point; this
19474         is more portable to non-IEEE hosts, and is a tad faster.
19475         When we detect that we are oscillating between two values,
19476         don't check whether tm_isdst has the requested value, since
19477         we already know the answer.  When tm_isdst has the wrong value,
19478         use a different heuristic to find the right one, based on the
19479         extreme values actually observed in practice in tz2003a,
19480         rather than the (overly optimistic) "previous 3 calendar quarters".
19481
19482         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19483         "T const" to accommodate glibc style.
19484         (check_result): Use less-confusing report format.  "long" -> "long int.
19485         (main): Likewise.
19486         Don't loop if the iteration overflows time_t.
19487         Allow a negative step in the iteration.
19488
19489 2003-07-06  Karl Berry  <karl@gnu.org>
19490
19491         * config/depcomp: update from automake.
19492         * config/config.sub: update from prep.
19493
19494 2003-07-03  Karl Berry  <karl@gnu.org>
19495
19496         * config/config.guess: update from prep.
19497
19498 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19499
19500         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19501         xreadlink.c now includes it unconditionally.
19502
19503 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19504
19505         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19506         having it depend on HAVE_SYS_TYPES_H.
19507
19508 2003-07-01  Bruno Haible  <bruno@clisp.org>
19509
19510         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19511         <sys/types.h> should be sufficient.
19512         Reported by Paul Eggert.
19513
19514 2003-06-26  Karl Berry  <karl@gnu.org>
19515
19516         * config/depcomp: update from automake.
19517
19518 2003-06-26  Bruno Haible  <bruno@clisp.org>
19519
19520         * modules/human: Depend on module stdbool.
19521
19522 2003-06-25  Bruno Haible  <bruno@clisp.org>
19523
19524         * modules/readlink: New file.
19525         * modules/xreadlink: Depend on it.
19526         * MODULES.html.sh (func_all_modules): Add readlink.
19527
19528 2003-06-25  Bruno Haible  <bruno@clisp.org>
19529
19530         * m4/readlink.m4: New file.
19531
19532 2003-06-25  Bruno Haible  <bruno@clisp.org>
19533
19534         * lib/readlink.c: New file.
19535
19536 2003-06-22  Karl Berry  <karl@gnu.org>
19537
19538         * config/srclist.txt: update mkinstalldirs from automake.
19539         * config/mkinstalldirs: update.
19540
19541 2003-06-22  Bruno Haible  <bruno@clisp.org>
19542
19543         Portability to mingw32.
19544         * m4/ssize_t.m4: New file, from GNU gettext.
19545         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
19546         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
19547
19548 2003-06-22  Bruno Haible  <bruno@clisp.org>
19549
19550         * modules/safe-read: Add m4/ssize_t.m4.
19551         * modules/xreadlink: Add m4/ssize_t.m4.
19552
19553 2003-06-20  Bruno Haible  <bruno@clisp.org>
19554
19555         Assume C89, so PARAMS isn't needed.
19556         * lib/unicodeio.h (PARAMS): Remove.
19557         * lib/unicodeio.c: Don't use PARAMS.
19558
19559 2003-06-18  Karl Berry  <karl@gnu.org>
19560
19561         * config/config.{guess,sub}: update from prep.
19562
19563 2003-06-18  Jim Meyering  <jim@meyering.net>
19564
19565         Merge changes from coreutils.
19566         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19567         Remove explicit declarations of xmalloc and realloc.
19568         Include xalloc.h.
19569         (read_utmp): Remove anachronistic cast of xmalloc.
19570
19571 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19572
19573         Assume C89, so PARAMS isn't needed.
19574         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19575         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19576         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19577         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19578         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19579         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19580         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19581         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19582         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19583         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19584         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19585         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19586         no longer needed. Anyway, config.h should always be included before any
19587         other file.
19588
19589 2003-06-11  Simon Josefsson  <jas@extundo.com>
19590
19591         * modules/sysexits: New file.
19592         * MODULES.html.sh (func_all_modules): Add sysexits.
19593
19594 2003-06-11  Simon Josefsson  <jas@extundo.com>
19595
19596         * lib/sysexit_.h: New file.
19597
19598 2003-06-11  Derek Price  <derek@ximbiot.com>
19599
19600         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19601         necessary.
19602
19603 2003-06-11  Bruno Haible  <bruno@clisp.org>
19604
19605         * m4/sysexits.m4: New file.
19606
19607 2003-06-10  Simon Josefsson  <jas@extundo.com>
19608
19609         * lib/argp.h: New file, from glibc.
19610         * lib/argp-ba.c: New file, from glibc.
19611         * lib/argp-eexst.c: New file, from glibc.
19612         * lib/argp-fmtstream.c: New file, from glibc.
19613         * lib/argp-fmtstream.h: New file, from glibc.
19614         * lib/argp-fs-xinl.c: New file, from glibc.
19615         * lib/argp-help.c: New file, from glibc.
19616         * lib/argp-namefrob.h: New file, from glibc.
19617         * lib/argp-parse.c: New file, from glibc.
19618         * lib/argp-pv.c: New file, from glibc.
19619         * lib/argp-pvh.c: New file, from glibc.
19620         * lib/argp-xinl.c: New file, from glibc.
19621
19622 2003-06-10  Simon Josefsson  <jas@extundo.com>
19623
19624         * modules/strchrnul: New file.
19625
19626 2003-06-10  Simon Josefsson  <jas@extundo.com>
19627
19628         * modules/argp: New file.
19629
19630 2003-06-10  Simon Josefsson  <jas@extundo.com>
19631
19632         * m4/strchrnul.m4: New file.
19633
19634 2003-06-10  Simon Josefsson  <jas@extundo.com>
19635
19636         * lib/strchrnul.h: New file.
19637         * lib/strchrnul.c: New file.
19638
19639 2003-06-10  Bruno Haible  <bruno@clisp.org>
19640
19641         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19642
19643 2003-06-07  Karl Berry  <karl@gnu.org>
19644
19645         * config/config.{guess,sub}: update from prep.
19646
19647 2003-06-07  Jim Meyering  <jim@meyering.net>
19648
19649         * modules/strtod: Use $(...) notation, not @...@ for
19650         AC_REPLACE'd variables.
19651         * modules/localcharset: Likewise.
19652
19653 2003-06-07  Jim Meyering  <jim@meyering.net>
19654
19655         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19656         in place of my name in the copyright comment.
19657         Remove definition and uses of __P.
19658
19659         From coreutils.
19660         * lib/stat.c: Don't declare xmalloc explicitly.
19661         Instead, include "xalloc.h".
19662         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19663         xrealloc, and xcalloc return values.
19664         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19665         Improve comment.
19666         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19667
19668 2003-06-07  Bruno Haible  <bruno@clisp.org>
19669
19670         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19671         avoid AC_CONFIG_LINKS.
19672         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19673         fnmatch.h, to avoid AC_CONFIG_LINKS.
19674         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19675
19676 2003-06-07  Bruno Haible  <bruno@clisp.org>
19677
19678         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19679         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19680         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19681         directory.
19682         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19683         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19684         directory.
19685
19686 2003-06-06  Jim Meyering  <jim@meyering.net>
19687
19688         Merge from coreutils.
19689         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19690         Consolidate declarations and initializations of *_base* locals.
19691
19692         Merge from coreutils.
19693         This avoids a core dump on systems without GNU putenv,
19694         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19695         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19696         (unsetenv): New static function, from GNU libc.
19697         (rpl_putenv): Use it.
19698
19699         * lib/modechange.c: Remove trailing blanks.
19700
19701         Merge from coreutils.
19702         * lib/fsusage.c: Remove declaration of statfs.
19703         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19704
19705         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19706
19707 2003-06-06  Jim Meyering  <jim@meyering.net>
19708
19709         * lib/stdbool_.h: Renamed from stdbool.h.in.
19710
19711 2003-06-06  Jim Meyering  <jim@meyering.net>
19712             Bruno Haible  <bruno@clisp.org>
19713
19714         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19715         Adjust Makefile.am snippet not to redirect directly to target.
19716         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19717
19718 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19719
19720         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19721         mismatch, look in future quarters as well as past.  This fixes a
19722         bug when processing fall-backwards gaps immediately after a long
19723         period of daylight-saving time.
19724
19725         * lib/mktime.c: Assume freestanding C89 or better.
19726         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19727         (__P): Remove; not used.
19728         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19729         (mktime, not_equal_tm, print_tm, check_result,
19730         main): Use prototypes.  Use const * where appropriate.
19731         (main): Fix typo in testing code that uncovered by above changes.
19732         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19733
19734 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19735
19736         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19737         locale.h, localeconv.  This merges changes from coreutils.
19738
19739         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19740         It can be removed after the next Autoconf is released.
19741         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19742         needed.
19743
19744 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19745
19746         * lib/mktime.c: Fix Debian bug 177940
19747         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19748         (localtime_offset): Now long int, not time_t, because we want it
19749         to be guaranteed to be signed.  All uses changed.
19750         (__mktime_internal): If overflow would occur when adding offset,
19751         don't add it.
19752
19753         Merge 'human' changes from coreutils.  Rewrite to support
19754         locale-specific notations like thousands separators.
19755         * lib/human.c: Simplify authorship notice.
19756         Include human.h immediately after config.h.
19757         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19758         <limits.h>: Do not include, since human.h does.
19759         (SIZE_MAX, UINTMAX_MAX): New macros.
19760         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19761         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19762         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19763         (power_letter): Renamed from suffixes.
19764         (generate_suffix_backwards): Remove.
19765         (adjust_value): Now takes int style (because of human.h changes)
19766         and long double value (for greater precision on some platforms).
19767         (group_number): New function.
19768         (human_readable): Use it.  Use integer options, not enum.
19769         Put the options before the sizes in the arg list.
19770         Support all the new options.
19771         The old human_readable function has been removed;
19772         use inttostr.h instead.
19773         (human_readable, default_block_size, humblock):
19774         Use uintmax_t, not int, for block sizes.
19775         (human_readable_inexact, block_size_types): Remove.
19776         (block_size_opts): New constant.
19777         (human_options): Renamed from human_block_size, with new signature
19778         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19779         * lib/human.h: Add copyright and authorship notice.
19780         Include <limits.h> and <stdbool.h> unconditionally.
19781         (PARAMS): Remove.  All uses removed.
19782         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19783         (enum human_inexact_style): Remove tag; now a nameless enum.
19784         (human_floor, human_ceiling, human_round_to_even): Now have
19785         values 2, 0, 1 rather than -1, 1, 0.
19786         (human_group_digits, human_suppress_point_zero, human_autoscale,
19787         human_base_1024, human_SI, human_B): New constants.
19788         (human_readable_inexact, human_block_size): Remove.
19789         (human_readable): Size args are now uintmax_t, not int.
19790         (human_options): New decl.
19791
19792         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19793         unnecessary now that we assume C89 or better.  This change
19794         imported from coreutils.
19795
19796         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19797         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19798         in the 2003-05-30 sync from glibc.
19799
19800         .h files should stand alone, but we shouldn't include <sys/types.h>
19801         if we can get away with just <stddef.h>.
19802
19803         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19804         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19805         rather than <sys/types.h>, as we merely need size_t.
19806         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19807         to get size_t.
19808         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19809         Include <stdio.h>, to get FILE.
19810         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19811         memcasecmp.h has included <stddef.h> and all we need is size_t.
19812         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19813         our interface, instead of including <sys/types.h>
19814
19815 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19816
19817         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19818         now, as glibc mktime is buggy on non-glibc systems.
19819
19820 2003-06-03  Karl Berry  <karl@gnu.org>
19821
19822         * config/config.sub: update from prep.
19823
19824 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19825
19826         [from coreutils]
19827         Fix some minor time-related bugs with POSIX time arguments.
19828         Some valid time stamps were being rejected (notably -1, and
19829         time stamps before 1900 on 64-bit hosts).  And some invalid
19830         time stamps were being accepted, e.g. September 31.
19831
19832         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
19833         that we can return (time_t) -1 successfully.
19834         * lib/posixtm.c: Likewise.
19835         [HAVE_STDBOOL_H]: Include <stdbool.h>.
19836         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
19837         (t): Remove static var.
19838         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
19839         of static var.  All uses changed.
19840         (year): Do not reject years before 1900; they can occur with
19841         64-bit time_t.
19842         (posix_time_parse): Do not check for out-of-range components;
19843         that is now the caller's responsibility, since our checks were
19844         only approximations.
19845         (posixtime): Use mktime to check for out-of-range components,
19846         since it knows them exactly.
19847         If mktime returns (time_t) -1, check whether an error actually occurred
19848         by invoking localtime on -1.
19849         (main) [TEST_POSIXTIME]: Check for input data errors, and report
19850         posixtime failures better.
19851         Improve the test data (in comments only).
19852
19853 2003-06-02  Karl Berry  <karl@gnu.org>
19854
19855         * config/mkinstalldirs (version): new variable.
19856         (--version): new option.
19857         (usage): improve message.
19858
19859 2003-05-30  Karl Berry  <karl@gnu.org>
19860
19861         * lib/mktime.c: update from libc.
19862
19863 2003-05-30  Bruno Haible  <bruno@clisp.org>
19864
19865         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
19866         * config/config.rpath: Upgrade to gettext-0.12.1.
19867
19868 2003-05-30  Bruno Haible  <bruno@clisp.org>
19869
19870         * m4/gettext.m4: Upgrade to gettext-0.12.1.
19871         * m4/nls.m4: New file, from gettext-0.12.1.
19872         * m4/po.m4: New file, from gettext-0.12.1.
19873         * m4/progtest.m4: Upgrade to gettext-0.12.1.
19874
19875 2003-05-30  Bruno Haible  <bruno@clisp.org>
19876
19877         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
19878         * lib/localcharset.h: Likewise.
19879         * lib/localcharset.c: Likewise.
19880
19881 2003-05-29  Karl Berry  <karl@gnu.org>
19882
19883         * config/config.rpath: update from gettext.
19884
19885 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19886
19887         Assume the headers required for C89 freestanding compilers.
19888         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
19889         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
19890         * m4/human.m4 (gl_HUMAN): Likewise.
19891         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
19892         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
19893         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19894         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
19895         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19896         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
19897
19898 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19899
19900         Assume the headers required for C89 freestanding compilers.
19901         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
19902         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
19903         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
19904         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
19905         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
19906         define, since <limits.h> is guaranteed to do that.
19907         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
19908         * lib/exclude.c: Include <stdbool.h> unconditionally.
19909         * lib/tempname.c: Include <stddef.h> unconditionally.
19910         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
19911         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
19912         <stddef.h> does that.
19913         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
19914         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
19915         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
19916         needed.
19917         * lib/xstrtol.c: Likewise.
19918         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
19919         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
19920
19921         * lib/addext.c (addext): Use assignment rather than cast, to avoid
19922         warnings on some platforms.
19923
19924         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19925         arbitrarily.
19926
19927 2003-05-26  Jim Meyering  <jim@meyering.net>
19928
19929         Merge in a change from coreutils:
19930         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
19931         that is guaranteed to be `no'.  Use `no_such_member' to indicate
19932         that condition, rather than `-1' which is slightly misleading.
19933         Change the name of the cache variable to have the gl_ prefix.
19934         Prompted by a patch from Richard Dawe for DJGPP.
19935
19936 2003-05-24  Karl Berry  <karl@gnu.org>
19937
19938         * config/config.guess: update from prep.
19939
19940 2003-05-22  Karl Berry  <karl@gnu.org>
19941
19942         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
19943
19944 2003-05-20  Karl Berry  <karl@gnu.org>
19945
19946         * config/config.guess: update from prep.
19947
19948 2003-05-18  Karl Berry  <karl@gnu.org>
19949
19950         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
19951         might actually be set by the user.
19952
19953         * config/depcomp, install-sh, mdate-sh: update from automake.
19954
19955 2003-05-17  Bruno Haible  <bruno@clisp.org>
19956
19957         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
19958         invalid expansion for AC_EGREP_CPP.
19959         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
19960         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
19961         Suggested by Akim Demaille <akim@epita.fr> in
19962         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
19963
19964 2003-05-12  Jim Meyering  <jim@meyering.net>
19965
19966         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
19967         the space-padded-by-default conversion specifiers, %e, %k, %l.
19968
19969 2003-05-12  Bruno Haible  <bruno@clisp.org>
19970
19971         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
19972         the string is longer than 4 KB.
19973
19974 2003-05-11  Karl Berry  <karl@gnu.org>
19975
19976         * config/config.{guess,sub}: update from prep.
19977
19978 2003-05-09  Bruno Haible  <bruno@clisp.org>
19979
19980         * modules/error: Add m4/strerror_r.m4 to file list.
19981
19982 2003-05-03  Bruno Haible  <bruno@clisp.org>
19983
19984         Upgrade to Unicode-4.0.
19985         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
19986         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
19987         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
19988         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
19989         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
19990         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
19991         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
19992         Change width of U+E0100..U+E01EF from 1 to 0.
19993
19994 2003-04-25  Jim Meyering  <jim@meyering.net>
19995
19996         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
19997         of type size_t, not int.
19998
19999 2003-04-25  Bruno Haible  <bruno@clisp.org>
20000
20001         * lib/copy-file.c: Include <stddef.h>, for size_t.
20002
20003 2003-04-21  Paul Eggert  <eggert@twinsun.com>
20004
20005         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
20006         code which expansion is under static control.  Patch imported from
20007         Akim Demaille's patch to Bison; see
20008         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
20009
20010 2003-04-14  Bruno Haible  <bruno@clisp.org>
20011
20012         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
20013
20014 2003-04-11  Jim Meyering  <jim@meyering.net>
20015
20016         Merge changes from Coreutils.
20017
20018         2003-03-22  Jim Meyering  <jim@meyering.net>
20019
20020         * lib/strftime.c (widen): Cast alloca return value to proper type.
20021
20022         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
20023
20024         From GNU libc.
20025         * lib/strftime.c (my_strftime): Handle very large width
20026         specifications for numeric values correctly.  Improve checks for
20027         overflow.
20028
20029         2003-01-19  Jim Meyering  <jim@meyering.net>
20030
20031         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
20032         definitions.
20033         (nl_get_alt_digit) [! defined my_strftime]: Define.
20034         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
20035         _nl_get_alt_digit and _nl_get_walt_digit.
20036
20037         * lib/strftime.c (my_strftime): Merge in locale-related changes from
20038         libc. These changes have no effect outside of _LIBC.
20039
20040 2003-04-10  Bruno Haible  <bruno@clisp.org>
20041
20042         * modules/findprog: New file.
20043         * MODULES.html.sh (func_all_modules): Add it.
20044
20045 2003-04-10  Bruno Haible  <bruno@clisp.org>
20046
20047         * m4/findprog.m4: New file.
20048         * m4/eaccess.m4: New file.
20049
20050 2003-04-10  Bruno Haible  <bruno@clisp.org>
20051
20052         * lib/findprog.h: New file, from GNU gettext.
20053         * lib/findprog.c: New file, from GNU gettext.
20054
20055 2003-04-05  Jim Meyering  <jim@meyering.net>
20056
20057         Merge changes from Coreutils.
20058
20059         * lib/exclude.h (PARAMS): Remove definition and uses.
20060         * lib/exclude.c: Remove uses of `PARAMS'.
20061
20062         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
20063         Add test-cases for DOS filenames. Declare program_name.
20064         (main): Set up program_name.  Patch by Rich Dawe.
20065
20066         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20067         error from mntctl.
20068         Use mntctl's return value to drive the entry-processing loop, since
20069         we can't rely on the value of the vmt_length member in the last
20070         entry.  On some systems doing so could result in exhausting
20071         virtual memory.  Based in part on a patch from Mike Jetzer.
20072
20073 2003-04-04  Bruno Haible  <bruno@clisp.org>
20074
20075         * modules/linebreak: New file.
20076         * MODULES.html.sh (func_all_modules): Add it.
20077
20078 2003-04-04  Bruno Haible  <bruno@clisp.org>
20079
20080         * m4/linebreak.m4: New file.
20081
20082 2003-04-04  Bruno Haible  <bruno@clisp.org>
20083
20084         * lib/linebreak.h: New file, from GNU gettext.
20085         * lib/linebreak.c: New file, from GNU gettext with slight
20086         modifications.
20087         * lib/lbrkprop.h: New file, from GNU gettext.
20088
20089 2003-04-03  Bruno Haible  <bruno@clisp.org>
20090
20091         * modules/utf8-ucs4: New file.
20092         * modules/utf16-ucs4: New file.
20093         * modules/ucs4-utf8: New file.
20094         * modules/ucs4-utf16: New file.
20095         * MODULES.html.sh (func_all_modules): Add them.
20096
20097 2003-04-03  Bruno Haible  <bruno@clisp.org>
20098
20099         * m4/utf-ucs4.m4: New file.
20100         * m4/ucs4-utf.m4: New file.
20101
20102 2003-04-03  Bruno Haible  <bruno@clisp.org>
20103
20104         * lib/utf8-ucs4.h: New file, from GNU gettext.
20105         * lib/utf16-ucs4.h: New file, from GNU gettext.
20106         * lib/ucs4-utf8.h: New file, from GNU gettext.
20107         * lib/ucs4-utf16.h: New file, from GNU gettext.
20108
20109 2003-04-02  Bruno Haible  <bruno@clisp.org>
20110
20111         * modules/binary-io: New file.
20112         * MODULES.html.sh (func_all_modules): Add it.
20113
20114 2003-04-02  Bruno Haible  <bruno@clisp.org>
20115
20116         * lib/binary-io.h: New file, from GNU gettext.
20117
20118 2003-04-01  Bruno Haible  <bruno@clisp.org>
20119
20120         * modules/pathname: New file.
20121         * MODULES.html.sh (func_all_modules): Add it.
20122
20123 2003-04-01  Bruno Haible  <bruno@clisp.org>
20124
20125         * lib/pathname.h: New file, from GNU gettext.
20126         * lib/concatpath.c: New file, from GNU gettext.
20127
20128 2003-03-30  Bruno Haible  <bruno@clisp.org>
20129
20130         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
20131
20132 2003-03-30  Bruno Haible  <bruno@clisp.org>
20133
20134         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
20135         function chown() doesn't exist.
20136
20137 2003-03-28  Bruno Haible  <bruno@clisp.org>
20138
20139         * modules/copy-file: New file.
20140         * MODULES.html.sh (func_all_modules): Add it.
20141
20142 2003-03-28  Bruno Haible  <bruno@clisp.org>
20143
20144         * m4/copy-file.m4: New file.
20145
20146 2003-03-28  Bruno Haible  <bruno@clisp.org>
20147
20148         * lib/copy-file.h: New file, from GNU gettext.
20149         * lib/copy-file.c: New file, from GNU gettext.
20150
20151 2003-03-18  Jim Meyering  <jim@meyering.net>
20152
20153         * lib/quote.c (quote_n): Fix typo in comment.
20154
20155 2003-03-18  Bruno Haible  <bruno@clisp.org>
20156
20157         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
20158         checking.
20159         * m4/onceonly_2_57.m4: Likewise.
20160
20161 2003-03-17  Bruno Haible  <bruno@clisp.org>
20162
20163         * m4/onceonly.m4: Require autoconf 2.54 or newer.
20164         (m4_quote): Remove macro.
20165         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
20166
20167 2003-03-14  Jim Meyering  <jim@meyering.net>
20168
20169         Merge changes from Coreutils.
20170         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
20171         to be const, in order to avoid warnings.
20172         (obstack_room): Likewise.
20173         (obstack_empty_p): Likewise.
20174
20175 2003-03-14  Bruno Haible  <bruno@clisp.org>
20176
20177         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
20178         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
20179
20180 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20181
20182         Merge changes from Bison.
20183         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
20184         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
20185         when compiling Bison 1.875's `bitset bset = obstack_alloc
20186         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
20187         * lib/hash.c: Include <stdbool.h> unconditionally.
20188
20189 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20190
20191         * m4/onceonly.m4 (m4_quote): New macro.
20192         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
20193         Quote AC_FOREACH variable-expansions properly.
20194
20195 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20196
20197         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
20198
20199 2003-03-09  Paul Eggert  <eggert@twinsun.com>
20200
20201         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
20202         Reported by Bruce Becker; see:
20203         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
20204
20205 2003-03-03  Paul Eggert  <eggert@twinsun.com>
20206             Bruno Haible  <bruno@clisp.org>
20207
20208         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
20209         Reported by John Hughes, see
20210         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
20211
20212 2003-02-20  Bruno Haible  <bruno@clisp.org>
20213
20214         * MODULES.html.sh (func_all_modules): Add poll.
20215
20216 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20217
20218         * modules/poll: New file.
20219
20220 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20221
20222         * lib/poll_.h: New file.
20223         * lib/poll.c: New file.
20224
20225 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20226
20227         * m4/poll.m4: New file.
20228
20229 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20230
20231         * modules/mathl: New file.
20232
20233 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20234
20235         * lib/mathl.h: New file.
20236         * lib/acosl.c: New file.
20237         * lib/asinl.c: New file.
20238         * lib/atanl.c: New file.
20239         * lib/ceill.c: New file.
20240         * lib/cosl.c: New file.
20241         * lib/expl.c: New file.
20242         * lib/floorl.c: New file.
20243         * lib/frexpl.c: New file.
20244         * lib/ldexpl.c: New file.
20245         * lib/logl.c: New file.
20246         * lib/sincosl.c: New file.
20247         * lib/sinl.c: New file.
20248         * lib/sqrtl.c: New file.
20249         * lib/tanl.c: New file.
20250         * lib/trigl.c: New file.
20251         * lib/trigl.h: New file.
20252
20253 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20254
20255         * m4/mathl.m4: New file.
20256
20257 2003-02-18  Bruno Haible  <bruno@clisp.org>
20258
20259         * MODULES.html.sh (func_all_modules): Add mathl.
20260
20261 2003-02-17  Bruno Haible  <bruno@clisp.org>
20262
20263         * modules/mkdtemp: New module.
20264         * MODULES.html.sh (func_all_modules): Add it.
20265
20266 2003-02-17  Bruno Haible  <bruno@clisp.org>
20267
20268         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
20269
20270 2003-02-17  Bruno Haible  <bruno@clisp.org>
20271
20272         * lib/mkdtemp.h: New file, from GNU gettext.
20273         * lib/mkdtemp.c: New file, from GNU gettext.
20274
20275 2003-02-02  Jim Meyering  <jim@meyering.net>
20276
20277         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
20278         e.g. glibc-2.2.93.
20279
20280 2003-01-31  Bruno Haible  <bruno@clisp.org>
20281
20282         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
20283         'rpl_rename'.
20284         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
20285         'rpl_strnlen'.
20286         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
20287         'rpl_strtod'.
20288         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
20289         'rpl_utime'.
20290
20291 2003-01-31  Bruno Haible  <bruno@clisp.org>
20292
20293         * lib/rename.c: #undef rename before defining rpl_rename.
20294         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
20295
20296 2003-01-30  Bruno Haible  <bruno@clisp.org>
20297
20298         * modules/vasnprintf, modules/vasprintf: New modules.
20299         * MODULES.html.sh (func_all_modules): Add them.
20300
20301 2003-01-30  Bruno Haible  <bruno@clisp.org>
20302
20303         * m4/signed.m4: New file, from GNU gettext.
20304         * m4/longdouble.m4: New file, from GNU gettext.
20305         * m4/wchar_t.m4: New file, from GNU gettext.
20306         * m4/wint_t.m4: New file, from GNU gettext.
20307         * m4/vasnprintf.m4: New file.
20308         * m4/vasprintf.m4: New file.
20309
20310 2003-01-30  Bruno Haible  <bruno@clisp.org>
20311
20312         * lib/printf-args.h: New file, from GNU gettext.
20313         * lib/printf-args.c: New file, from GNU gettext.
20314         * lib/printf-parse.h: New file, from GNU gettext.
20315         * lib/printf-parse.c: New file, from GNU gettext.
20316         * lib/vasnprintf.h: New file, from GNU gettext.
20317         * lib/vasnprintf.c: New file, from GNU gettext.
20318         * lib/asnprintf.c: New file, from GNU gettext.
20319         * lib/vasprintf.h: New file, from GNU gettext with modifications.
20320         * lib/vasprintf.c: New file, from GNU gettext.
20321         * lib/asprintf.c: New file, from GNU gettext.
20322
20323 2003-01-29  Bruno Haible  <bruno@clisp.org>
20324
20325         * modules/stpncpy: New module.
20326         * MODULES.html.sh (func_all_modules): Add it.
20327
20328 2003-01-29  Bruno Haible  <bruno@clisp.org>
20329
20330         * m4/stpncpy.m4: New file.
20331
20332 2003-01-29  Bruno Haible  <bruno@clisp.org>
20333
20334         * lib/stpncpy.h: New file, from GNU gettext with modifications.
20335         * lib/stpncpy.c: New file, from GNU gettext with modifications.
20336
20337 2003-01-28  Bruno Haible  <bruno@clisp.org>
20338
20339         * modules/c-ctype: New module.
20340         * MODULES.html.sh (func_all_modules): Add it.
20341
20342 2003-01-28  Bruno Haible  <bruno@clisp.org>
20343
20344         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
20345         Paul Eggert.
20346         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
20347         Paul Eggert.
20348
20349 2003-01-27  Bruno Haible  <bruno@clisp.org>
20350
20351         * modules/xsetenv: New module.
20352         * MODULES.html.sh (func_all_modules): Add it.
20353
20354 2003-01-27  Bruno Haible  <bruno@clisp.org>
20355
20356         * lib/xsetenv.h: New file, from GNU gettext.
20357         * lib/xsetenv.c: New file, from GNU gettext.
20358
20359 2003-01-23  Jim Meyering  <jim@meyering.net>
20360
20361         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20362         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20363
20364 2003-01-23  Bruno Haible  <bruno@clisp.org>
20365
20366         * modules/minmax: New module.
20367         * MODULES.html.sh (func_all_modules): Add it.
20368
20369 2003-01-23  Bruno Haible  <bruno@clisp.org>
20370
20371         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20372         Eggert.
20373
20374 2003-01-22  Bruno Haible  <bruno@clisp.org>
20375
20376         * modules/exit: New module.
20377         * MODULES.html.sh (func_all_modules): Add it.
20378
20379 2003-01-22  Bruno Haible  <bruno@clisp.org>
20380
20381         * lib/exit.h: New file, from GNU gettext.
20382
20383 2003-01-19  Bruno Haible  <bruno@clisp.org>
20384
20385         * gnulib-tool: Recognize option --extract-maintainer.
20386         (func_get_maintainer): New function.
20387         * modules/*: Add Maintainer entry.
20388
20389 2003-01-16  Jim Meyering  <jim@meyering.net>
20390
20391         * m4/regex.m4: The `regex' struct is both input and output.
20392         Initialize it before each use.  Patch by Tim Waugh.
20393
20394 2003-01-16  Bruno Haible  <bruno@clisp.org>
20395
20396         * MODULES.html.sh: Add a table of contents. Add the module name as
20397         leftmost column. Add hyperlinks.
20398
20399 2003-01-15  Bruno Haible  <bruno@clisp.org>
20400
20401         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20402
20403 2003-01-15  Bruno Haible  <bruno@clisp.org>
20404
20405         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20406         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20407         suffix.
20408
20409 2003-01-15  Bruno Haible  <bruno@clisp.org>
20410
20411         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20412
20413 2003-01-15  Bruno Haible  <bruno@clisp.org>
20414
20415         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20416         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20417
20418 2003-01-14  Jim Meyering  <jim@meyering.net>
20419
20420         * lib/same.c (same_name): Tweak a comment.
20421
20422 2003-01-14  Bruno Haible  <bruno@clisp.org>
20423
20424         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20425         when a string comparison is sufficient.
20426
20427 2003-01-14  Bruno Haible  <bruno@clisp.org>
20428
20429         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20430         'unsigned int'.
20431
20432 2003-01-14  Bruno Haible  <bruno@clisp.org>
20433
20434         * lib/hash-pjw.c: Add comment about low quality of this function.
20435
20436 2003-01-13  Bruno Haible  <bruno@clisp.org>
20437
20438         * modules/stpcpy: Distribute lib/stpcpy.h.
20439         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20440
20441 2003-01-13  Bruno Haible  <bruno@clisp.org>
20442
20443         * modules/*: Add a description.
20444         * modules/strpbrk: Fix Makefile.am snippet.
20445         * modules/strtoimax: Fix dependencies.
20446         * modules/strtoumax: Likewise.
20447
20448 2003-01-13  Bruno Haible  <bruno@clisp.org>
20449
20450         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20451         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20452         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20453
20454 2003-01-13  Bruno Haible  <bruno@clisp.org>
20455
20456         * gnulib-tool (func_create_testdir): Store config/* files in the main
20457         directory.
20458         * config.rpath: Move to ...
20459         * config/config.rpath: ... here.
20460         * modules/gettext: Contains config/config.rpath, not config.rpath.
20461         * modules/iconv: Likewise.
20462
20463 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20464
20465         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20466         to avoid collisions with libcurses and libreadline.
20467
20468         * m4/getstr.m4: Remove.
20469         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20470
20471 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20472
20473         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20474         to avoid collisions with libcurses and libreadline.
20475
20476         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20477         * lib/getstr.h, getstr.c: Remove.
20478         * lib/getline.c: Include "getline.h", to check interface.
20479         Move body of old getstr.c here: this defines MIN_CHUNK and
20480         declares getdelim2, which is renamed from getstr.
20481         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20482
20483         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20484         All uses changed.
20485         * lib/linebuffer.h: Likewise.
20486         (readline): Remove backward-compatibility macro.
20487
20488 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20489
20490         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20491         to avoid collisions with libcurses and libreadline.
20492         * getstr: Remove.
20493         * MODULES.html.sh: Remove getstr.
20494         * modules/getline: Depend on unlocked-io, not getstr.
20495
20496 2003-01-12  Jim Meyering  <jim@meyering.net>
20497
20498         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20499
20500 2003-01-10  Bruno Haible  <bruno@clisp.org>
20501
20502         * modules/alloca: Change Makefile.am requirements. Simplify Include
20503         requirements. Add lib/alloca_.h to file list.
20504
20505 2003-01-10  Bruno Haible  <bruno@clisp.org>
20506
20507         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20508
20509 2003-01-10  Bruno Haible  <bruno@clisp.org>
20510
20511         * lib/alloca_.h: New file.
20512         * lib/getdate.y: Unconditionally include alloca.h.
20513         * lib/makepath.c: Likewise.
20514         * lib/setenv.c: Likewise.
20515         * lib/userspec.c: Likewise.
20516
20517 2003-01-09  Karl Berry  <karl@gnu.org>
20518
20519         * MODULES.html.sh: include `dirname $0` in PATH, to find
20520         gnulib-tool.
20521
20522 2003-01-09  Bruno Haible  <bruno@clisp.org>
20523
20524         * modules/stdbool: Change configure.ac, Makefile.am requirements.
20525         Simplify Include requirements. Add lib/stdbool.h.in to file list.
20526
20527 2003-01-09  Bruno Haible  <bruno@clisp.org>
20528
20529         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
20530
20531 2003-01-09  Bruno Haible  <bruno@clisp.org>
20532
20533         * lib/stdbool.h.in: New file.
20534
20535 2003-01-09  Bruno Haible  <bruno@clisp.org>
20536
20537         * gnulib-tool (func_all_modules): Ignore files ending in ~.
20538         * MODULES.html.sh: Likewise.
20539
20540 2003-01-08  Jim Meyering  <jim@meyering.net>
20541
20542         * lib/full-write.c: Undefine and define-away `const' after inclusion
20543         of errno.h, not before.  Suggestion from Bruno Haible.
20544
20545 2003-01-08  Bruno Haible  <bruno@clisp.org>
20546
20547         * modules/full-read: Depend on full-write.
20548
20549 2003-01-08  Bruno Haible  <bruno@clisp.org>
20550
20551         * lib/safe-read.c: Include specification header first, to ensure its
20552         selfcontainedness.
20553         * lib/full-write.c: Likewise.
20554
20555 2003-01-07  Jim Meyering  <jim@meyering.net>
20556
20557         * lib/full-write.c: Rework so that it may serve to define full_read,
20558         too.
20559         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
20560
20561 2003-01-07  Bruno Haible  <bruno@clisp.org>
20562
20563         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20564         <inttypes.h>.
20565         * lib/xstrtol.h: Likewise.
20566         * lib/xstrtoimax.c: Likewise.
20567         * lib/xstrtoumax.c: Likewise.
20568         * lib/human.h: Likewise.
20569
20570         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20571         on systems that have <inttypes.h> but not <stdint.h>.
20572
20573 2003-01-07  Bruno Haible  <bruno@clisp.org>
20574
20575         * MODULES.html.sh: Add copyright notice.
20576         (missed_files): Omit CVS directory entries.
20577         (func_module): Make it work with sed-3.02.
20578         * MODULES.txt: Remove file.
20579
20580 2003-01-06  Jim Meyering  <jim@meyering.net>
20581
20582         * lib/version-etc.c: Update year in translatable copyright string.
20583
20584 2003-01-03  Karl Berry  <karl@gnu.org>
20585
20586         * config/config.{guess,sub}: update from prep.
20587
20588 2003-01-02  Karl Berry  <karl@gnu.org>
20589
20590         * doc/COPYING.DOC: belatedly updated to 1.2.
20591
20592 2003-01-01  Karl Berry  <karl@gnu.org>
20593
20594         * gnulib-tool (func_verify_module): report module name $module in
20595         error message, not $1.
20596         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20597         be created, only if it doesn't exist.
20598         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20599
20600 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20601
20602         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20603
20604 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20605
20606         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20607         memcmp if strcoll doesn't work.
20608
20609 2002-12-31  Bruno Haible  <bruno@clisp.org>
20610
20611         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20612         nonempty.
20613
20614 2002-12-31  Bruno Haible  <bruno@clisp.org>
20615
20616         * lib/memcoll.c (STRCOLL): New macro.
20617         (memcoll): Use it.
20618
20619 2002-12-31  Bruno Haible  <bruno@clisp.org>
20620
20621         * lib/localcharset.h: New file.
20622         * lib/localcharset.c: Include it.
20623         * lib/unicodeio.c: Likewise.
20624
20625 2002-12-31  Bruno Haible  <bruno@clisp.org>
20626
20627         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20628         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20629
20630 2002-12-31  Bruno Haible  <bruno@clisp.org>
20631
20632         * lib/getline.h: Include <stddef.h>, for size_t.
20633
20634         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20635         * lib/unicodeio.c: Don't include <stddef.h>.
20636
20637 2002-12-31  Bruno Haible  <bruno@clisp.org>
20638
20639         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20640         HAVE_TM_ZONE.
20641
20642 2002-12-24  Karl Berry  <karl@gnu.org>
20643
20644         * config/config.guess: update from prep.
20645
20646 2002-12-24  Bruno Haible  <bruno@clisp.org>
20647
20648         General infrasructure.
20649         * m4/README: Rewritten.
20650         * m4/onceonly.m4: New file.
20651         * m4/onceonly_2_57.m4: New file.
20652
20653         Module atexit.
20654         * m4/atexit.m4: New file.
20655
20656         Module strtod.
20657         * m4/strtod.m4: New file.
20658
20659         Module strtol.
20660         * m4/strtol.m4: New file.
20661
20662         Module strtoul.
20663         * m4/strtoul.m4: New file.
20664
20665         Module memchr.
20666         * m4/memchr.m4: New file.
20667
20668         Module memcmp.
20669         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20670         (jm_FUNC_MEMCMP): Invoke it.
20671
20672         Module memcpy.
20673         * m4/memcpy.m4: New file.
20674
20675         Module memmove.
20676         * m4/memmove.m4: New file.
20677
20678         Module memset.
20679         * m4/memset.m4: New file.
20680
20681         Module strcspn.
20682         * m4/strcspn.m4: New file.
20683
20684         Module strpbrk.
20685         * m4/strpbrk.m4: New file.
20686
20687         Module strstr.
20688         * m4/strstr.m4: New file.
20689
20690         Module strerror.
20691         * m4/strerror.m4: New file.
20692
20693         Module mktime.
20694         * m4/mktime.m4: Renamed from jm-mktime.m4.
20695         (gl_PREREQ_MKTIME): New macro.
20696         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20697
20698         Module malloc.
20699         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20700         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20701         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20702
20703         Module realloc.
20704         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20705         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20706         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20707
20708         Module strftime.
20709         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20710         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20711         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20712         gl_TM_GMTOFF.
20713         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20714
20715         Module xalloc.
20716         * m4/xalloc.m4: New file.
20717
20718         Module alloca.
20719         * m4/alloca.m4: New file.
20720
20721         Module putenv.
20722         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20723         (jm_FUNC_PUTENV): Invoke it.
20724
20725         Module setenv.
20726         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20727         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20728         when invoked twice.
20729         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20730         gt_FUNC_SETENV.
20731
20732         Module memrchr.
20733         * m4/memrchr.m4: New file.
20734
20735         Module stpcpy.
20736         * m4/stpcpy.m4: New file.
20737
20738         Module strcase.
20739         * m4/strcase.m4: New file.
20740
20741         Module strdup.
20742         * m4/strdup.m4: New file.
20743
20744         Module strnlen.
20745         * m4/strnlen.m4: New file.
20746
20747         Module strndup.
20748         * m4/strndup.m4: New file.
20749
20750         Module xstrtod.
20751         * m4/xstrtod.m4: New file.
20752
20753         Module xstrtol.
20754         * m4/xstrtol.m4: New file.
20755
20756         Module getdate.
20757         * m4/getdate.m4: New file.
20758
20759         Module unlocked-io.
20760         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20761         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20762         * m4/jm-glibc-io.m4n: Remove file.
20763
20764         Module long-options.
20765         * m4/long-options.m4: New file.
20766
20767         Module md5.
20768         * m4/md5.m4: New file.
20769
20770         Module sha.
20771         * m4/sha.m4: New file.
20772
20773         Module getstr.
20774         * m4/getstr.m4: New file.
20775
20776         Module getline.
20777         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20778         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20779         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20780         simply getline. Infoke gl_PREREQ_GETLINE.
20781
20782         Module obstack.
20783         * m4/obstack.m4: New file.
20784
20785         Module hash.
20786         * m4/hash.m4: New file.
20787
20788         Module readtokens.
20789         * m4/readtokens.m4: New file.
20790
20791         Module strverscmp.
20792         * m4/strverscmp.m4: New file.
20793
20794         Module stdbool.
20795         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20796         OSF/1.
20797
20798         Module strtoll.
20799         * m4/strtoll.m4: New file.
20800
20801         Module strtoull.
20802         * m4/strtoull.m4: New file.
20803
20804         Module strtoimax.
20805         * m4/strtoimax.m4: New file.
20806
20807         Module strtoumax.
20808         * m4/strtoumax.m4: New file.
20809
20810         Module xstrtoimax.
20811         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20812         jm_AC_PREREQ_XSTRTOIMAX.
20813         Moved the strtol prerequisites to strtol.m4.
20814         Moved the strtoll prerequisites to strtoll.m4.
20815         Moved the strtoimax prerequisites to strtoimax.m4.
20816
20817         Module xstrtoumax.
20818         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20819         jm_AC_PREREQ_XSTRTOUMAX.
20820         Moved the strtoul prerequisites to strtoul.m4.
20821         Moved the strtoull prerequisites to strtoull.m4.
20822         Moved the strtoumax prerequisites to strtoumax.m4.
20823
20824         Module chown.
20825         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20826         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20827
20828         Module dup2.
20829         * m4/dup2.m4: New file.
20830
20831         Module ftruncate.
20832         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
20833         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
20834
20835         Module getgroups.
20836         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
20837         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
20838
20839         Module gettimeofday.
20840         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
20841         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
20842         gl_PREREQ_GETTIMEOFDAY.
20843
20844         Module mkdir.
20845         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
20846         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
20847
20848         Module mkstemp.
20849         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
20850         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
20851         jm_AC_TYPE_UINTMAX_T.
20852         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
20853
20854         Module stat.
20855         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
20856         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
20857
20858         Module lstat.
20859         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
20860         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
20861
20862         Module timespec.
20863         * m4/timespec.m4 (gl_TIMESPEC): New macro.
20864         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
20865         * m4/st_mtim.m4: Indentation.
20866
20867         Module nanosleep.
20868         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
20869         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
20870         gl_PREREQ_NANOSLEEP.
20871
20872         Module regex.
20873         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
20874         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
20875         (gl_REGEX): New macro.
20876
20877         Module rename.
20878         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
20879         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
20880
20881         Module rmdir.
20882         * m4/rmdir.m4: New file.
20883
20884         Module utime.
20885         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
20886         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
20887         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
20888
20889         Module dirname.
20890         * m4/dirname.m4: New file.
20891
20892         Module getopt.
20893         * m4/getopt.m4: New file.
20894
20895         Module unistd-safer.
20896         * m4/unistd-safer.m4: New file.
20897
20898         Module fnmatch.
20899         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
20900         declaration.
20901         (gl_PREREQ_FNMATCH_EXTRA): New macro.
20902         (gl_FUNC_FNMATCH_POSIX): New macro.
20903         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
20904         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
20905         simply fnmatch.
20906
20907         Module exclude.
20908         * m4/exclude.m4: New file.
20909
20910         Module human.
20911         * m4/human.m4: New file.
20912
20913         Module acl.
20914         * m4/acl.m4: Nop.
20915
20916         Module backupfile.
20917         * m4/backupfile.m4: New file.
20918         * m4/d-ino.m4: Indentation.
20919
20920         Module fsusage.
20921         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
20922         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
20923         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
20924
20925         Module dirfd.
20926         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
20927         requirements.
20928
20929         Module euidaccess.
20930         * m4/euidaccess.m4: New file.
20931
20932         Module file-type.
20933         * m4/file-type.m4: New file.
20934
20935         Module fileblocks.
20936         * m4/fileblocks.m4: New file.
20937
20938         Module filemode.
20939         * m4/filemode.m4: New file.
20940
20941         Module isdir.
20942         * m4/isdir.m4: New file.
20943
20944         Module lchown.
20945         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
20946         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
20947
20948         Module makepath.
20949         * m4/makepath.m4: New file.
20950
20951         Module modechange.
20952         * m4/modechange.m4: New file.
20953
20954         Module mountlist.
20955         * m4/mountlist.m4: New file.
20956         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
20957         Indentation.
20958
20959         Module path-concat.
20960         * m4/path-concat.m4: New file.
20961
20962         Module pathmax.
20963         * m4/pathmax.m4: New file.
20964
20965         Module same.
20966         * m4/same.m4: New file.
20967
20968         Module save-cwd.
20969         * m4/save-cwd.m4: New file.
20970
20971         Module savedir.
20972         * m4/savedir.m4: New file.
20973
20974         Module xgetcwd.
20975         * m4/xgetcwd.m4: New file.
20976         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
20977
20978         Module xreadlink.
20979         * m4/xreadlink.m4: New file.
20980
20981         Module safe-read.
20982         * m4/safe-read.m4: New file.
20983
20984         Module safe-write.
20985         * m4/safe-write.m4: New file.
20986
20987         Module closeout.
20988         * m4/closeout.m4: New file.
20989
20990         Module stdio-safer.
20991         * m4/stdio-safer.m4: New file.
20992
20993         Module getpass.
20994         * m4/getpass.m4: New file.
20995
20996         Module getugroups.
20997         * m4/getugroups.m4: New file.
20998
20999         Module group-member.
21000         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
21001         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
21002
21003         Module idcache.
21004         * m4/idcache.m4: New file.
21005
21006         Module userspec.
21007         * m4/userspec.m4: New file.
21008
21009         Module gettime.
21010         * m4/clock_time.m4: New file.
21011         * m4/gettime.m4: New file.
21012
21013         Module settime.
21014         * m4/settime.m4: New file.
21015
21016         Module posixtm.
21017         * m4/posixtm.m4: New file.
21018
21019         Module gethostname.
21020         * m4/gethostname.m4: New file.
21021
21022         Module canon-host.
21023         * m4/canon-host.m4: New file.
21024
21025         Module gettext.
21026         * m4/codeset.m4: New file, from gettext-0.11.5.
21027         * m4/gettext.m4: New file, from gettext-0.11.5.
21028         * m4/glibc21.m4: New file, from gettext-0.11.5.
21029         * m4/iconv.m4: New file, from gettext-0.11.5.
21030         * m4/intdiv0.m4: New file, from gettext-0.11.5.
21031         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
21032         * m4/inttypes.m4: New file, from gettext-0.11.5.
21033         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
21034         * m4/isc-posix.m4: New file, from gettext-0.11.5.
21035         * m4/lcmessage.m4: New file, from gettext-0.11.5.
21036         * m4/lib-ld.m4: New file, from gettext-0.11.5.
21037         * m4/lib-link.m4: New file, from gettext-0.11.5.
21038         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
21039         * m4/progtest.m4: New file, from gettext-0.11.5.
21040         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
21041         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
21042         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
21043
21044         Module localcharset.
21045         * m4/localcharset.m4: New file.
21046
21047         Module hard-locale.
21048         * m4/hard-locale.m4: New file.
21049
21050         Module mbswidth.
21051         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
21052         onceonly macros.
21053         * m4/mbrtowc.m4: Add comment.
21054
21055         Module memcasecmp.
21056         * m4/memcasecmp.m4: New file.
21057
21058         Module memcoll.
21059         * m4/memcoll.m4: New file.
21060
21061         Module unicodeio.
21062         * m4/unicodeio.m4: New file.
21063
21064         Module rpmatch.
21065         * m4/rpmatch.m4: New file.
21066
21067         Module yesno.
21068         * m4/yesno.m4: New file.
21069
21070         Module exitfail.
21071         * m4/exitfail.m4: New file.
21072
21073         Module c-stack.
21074         * m4/c-stack.m4 (gl_C_STACK): New macro.
21075         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
21076
21077         Module error.
21078         * m4/error.m4 (gl_ERROR): New macro.
21079         (jm_PREREQ_ERROR): Use onceonly macros.
21080
21081         Module fatal.
21082         * m4/fatal.m4: New file.
21083
21084         Module getloadavg.
21085         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21086         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21087
21088         Module getpagesize.
21089         * m4/getpagesize.m4: New file.
21090
21091         Module getusershell.
21092         * m4/getusershell.m4: New file.
21093
21094         Module physmem.
21095         * m4/physmem.m4: New file.
21096
21097         Module posixver.
21098         * m4/posixver.m4: New file.
21099
21100         Module quotearg.
21101         * m4/quotearg.m4: New file.
21102
21103         Module quote.
21104         * m4/quote.m4: New file.
21105
21106         Module readutmp.
21107         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21108
21109         Module sig2str.
21110         * m4/sig2str.m4: New file.
21111
21112         Other.
21113         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21114         ulonglong.m4.
21115         * m4/intmax_t.m4: New file.
21116         * m4/d-type.m4: Indentation.
21117         * m4/jm-macros.m4: Update.
21118         * m4/prereq.m4 (jm_PREREQ): Update.
21119         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
21120         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
21121         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
21122         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
21123         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
21124         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
21125         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
21126         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
21127         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
21128         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
21129         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
21130         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
21131         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
21132         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
21133         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
21134         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
21135         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
21136         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
21137         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
21138
21139 2002-12-24  Bruno Haible  <bruno@clisp.org>
21140
21141         * MODULES.txt: Update according to m4/ changes.
21142
21143         Module gettext.
21144         * config.rpath: New file, from gettext-0.11.5.
21145
21146         * modules/*: New module descriptions.
21147         * gnulib-tool: New file.
21148         * MODULES.html.sh: New file.
21149
21150 2002-12-21  Karl Berry  <karl@gnu.org>
21151
21152         * doc/fdl.texi: update to version 1.2.
21153
21154 2002-12-19  Karl Berry  <karl@gnu.org>
21155
21156         * config/config.guess: update from prep.
21157
21158 2002-12-18  Bruno Haible  <bruno@clisp.org>
21159
21160         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
21161         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
21162
21163 2002-12-17  Bruno Haible  <bruno@clisp.org>
21164
21165         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
21166         stdlib.h, string.h.
21167
21168 2002-12-17  Bruno Haible  <bruno@clisp.org>
21169
21170         * lib/canon-host.c (strdup): Remove unused declaration.
21171
21172         * lib/fsusage.c: Include full_read.h.
21173         (get_fs_usage): Use full_read instead of safe_read.
21174
21175         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
21176
21177 2002-12-12  Karl Berry  <karl@gnu.org>
21178
21179         * config/config.guess: update from prep.
21180
21181 2002-12-11  Bruno Haible  <bruno@clisp.org>
21182
21183         * m4/setenv.m4: New file, from gettext-0.11.5.
21184
21185 2002-12-11  Bruno Haible  <bruno@clisp.org>
21186
21187         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
21188         not unsetenv().
21189         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
21190         modifications:
21191
21192         2002-12-11  Bruno Haible  <bruno@clisp.org>
21193
21194                 * setenv.c (alloca): Fall back to malloc.
21195                 (freea): New macro.
21196                 (setenv): Use freea() to free memory allocated with alloca().
21197
21198         2002-11-13  Bruno Haible  <bruno@clisp.org>
21199
21200                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
21201                 function declarations.
21202                 * unsetenv.c (unsetenv): Likewise.
21203
21204         2002-03-04  Bruno Haible  <bruno@clisp.org>
21205
21206                 Portability to AIX 4.3.3.
21207                 * unsetenv.c: New file, extracted from setenv.c.
21208                 * setenv.c: Move the unsetenv() function to unsetenv.c.
21209
21210         2001-12-20  Bruno Haible  <bruno@clisp.org>
21211
21212                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
21213                 use malloc instead. For SunOS 4.
21214
21215         2001-12-11  Bruno Haible  <bruno@clisp.org>
21216
21217                 * setenv.c: Declare alloca.
21218                 (compar_fn_t): New typedef.
21219                 (KNOWN_VALUE, STORE_VALUE): Use it.
21220
21221         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
21222         setenv.h.
21223
21224 2002-12-10  Paul Eggert  <eggert@twinsun.com>
21225
21226         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
21227         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
21228         Choose values that are less likely to collide with system fnmatch
21229         options.
21230         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
21231         defined (e.g., a pure POSIX system).
21232         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
21233         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
21234
21235 2002-12-06  Paul Eggert  <eggert@twinsun.com>
21236
21237         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
21238         a pain in practice to deal with generated m4 files.  This change
21239         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
21240
21241         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
21242         and jm-glibc-io.m4, as they are no longer a special case.
21243         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
21244         kludge and the auto-generation stuff.  Check only whether the
21245         functions are declared, not whether they exist, since older hosts
21246         that don't declare the functions can't use the optimization anyway.
21247
21248 2002-12-06  Jim Meyering  <jim@meyering.net>
21249
21250         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
21251
21252         Merge in changes from libc's misc/error.c, in preparation
21253         for the merge of gnulib's changes back into libc.
21254
21255         * lib/error.c (_): Define only if not already defined.
21256         Move definition to follow all #include directives.
21257         Include unlocked-io.h only if !_LIBC.
21258         [_LIBC]: Include <libio/libioP.h>.
21259         [USE_IN_LIBIO]: Include <libio/iolibio.h>
21260         (fflush): Tweak definition to use INTUSE.
21261         (putc): Define.
21262
21263 2002-12-05  Paul Eggert  <eggert@twinsun.com>
21264
21265         * lib/alloca.c [defined emacs]: Include "lisp.h".
21266         (xalloc_die) [defined emacs]: New macro.
21267         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
21268         [! defined emacs]: Include <xalloc.h>.
21269         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
21270         (pointer): Typedef to POINTER_TYPE *.
21271         (malloc): Remove decl; we now always use xmalloc.
21272         (alloca): Use old-style definition, since Emacs needs this.
21273         Check for arithmetic overflow when computing combined size.
21274
21275 2002-12-04  Paul Eggert  <eggert@twinsun.com>
21276
21277         Do not generate unlocked-io.h automatically, since it's easier to
21278         maintain it by hand.
21279
21280         * lib/unlocked-io.h: New file, from GNU diffutils,
21281         but with proper copyright notice and attribution.
21282         * lib/gen-uio: Remove.
21283         * lib/Makefile.am: Add copyright notice.
21284         (libfetish_a_SOURCES): Add unlocked-io.h.
21285         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
21286         (DISTCLEANFILES, io_functions): Remove macros.
21287         (EXTRA_DIST): Remove gen_uio.
21288         (unlocked-io.h): Remove rule.
21289
21290 2002-12-04  Jim Meyering  <jim@meyering.net>
21291
21292         Reflect the fact that stat.c and lstat.c are no longer generated.
21293         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
21294         (DISTCLEANFILES): Likewise.
21295         (EXTRA_DIST): Likewise.
21296         (all_local): Don't depend on stat.c or lstat.c.
21297         (stat.c, lstat.c): Remove rules.
21298         (EXTRA_DIST): Remove xstat.in.
21299
21300         * lib/xstat.in: Remove file.  Contents moved into stat.c.
21301         * lib/stat.c: New file.  Contents mostly from xstat.in.
21302         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
21303         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
21304
21305         * lib/safe-read.c: Rework so that it may serve to define safe_write,
21306         too.
21307         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
21308
21309 2002-12-03  Jim Meyering  <jim@meyering.net>
21310
21311         * lib/safe-read.c, safe-write.c: Change variable names and comments,
21312         but not semantics, to minimize the differences between these two files.
21313         (safe_read): Change comment to mention SAFE_READ_ERROR.
21314
21315         * lib/safe-read.c (IS_EINTR): Define.
21316         (safe_read): Use IS_EINTR in place of in-function cpp directives.
21317
21318 2002-12-02  Jim Meyering  <jim@meyering.net>
21319
21320         * lib/safe-read.c (EINTR): Define.
21321         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21322         (INT_MAX): Provide fallback.
21323         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
21324
21325         * lib/safe-read.h (SAFE_READ_ERROR): Define.
21326
21327 2002-12-02  Bruno Haible  <bruno@clisp.org>
21328
21329         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
21330         Define, taken from safe-read.c.
21331         (INT_MAX): Provide fallback.
21332         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21333         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
21334
21335         * lib/safe-read.c (EINTR): Remove definition.
21336         (safe_read): Don't use EINTR if it is absent.
21337
21338 2002-12-01  Jim Meyering  <jim@meyering.net>
21339
21340         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
21341         zero.
21342         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
21343
21344 2002-11-27  Paul Eggert  <eggert@twinsun.com>
21345
21346         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
21347         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
21348         with `if (! (value < limit)) abort ();', for readability.
21349
21350 2002-11-26  Karl Berry  <karl@gnu.org>
21351
21352         * lib/strdup.c: copy from libc again, with jim's ok.
21353         * lib/.cppi-disable: re-add strdup.c
21354
21355 2002-11-25  Karl Berry  <karl@gnu.org>
21356
21357         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21358         instead of "strtol.c".
21359
21360 2002-11-25  Karl Berry  <karl@gnu.org>
21361
21362         * config/install-sh: update from automake for variable quoting, $0 in
21363         error msgs, etc.
21364
21365         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21366         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21367         entry.
21368
21369 2002-11-25  Jim Meyering  <jim@meyering.net>
21370
21371         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21372
21373 2002-11-24  Karl Berry  <karl@gnu.org>
21374
21375         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21376         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21377
21378 2002-11-24  Jim Meyering  <jim@meyering.net>
21379
21380         Update from coreutils:
21381
21382         * lib/mktime.c: Merge in changes from libc.
21383
21384         Avoid a link-time failure on some Linux systems.
21385         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21386         (otherwise).
21387         (__mon_yday): Declare with the STATIC attribute.
21388         (__mktime_internal): Likewise.
21389         Based on a report from Greg Schafer.
21390
21391 2002-11-23  Jim Meyering  <jim@meyering.net>
21392
21393         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21394         Use `unsigned', not `int', as type of index.
21395
21396         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21397
21398         * lib/fsusage.c: Remove unneeded parentheses around operands of
21399         `defined'.
21400
21401 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21402
21403         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21404         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21405         so that we can be included first.
21406         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21407         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21408         No need to include stddef.h or sys/types.h any more.
21409         Surround local include files with "", not "<>".
21410         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21411         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21412         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21413         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21414         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21415         (ISPRINT): Remove; no longer needed now that we assume C89.
21416
21417         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21418         Preserve errno.
21419
21420         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21421         quotearg_char): Use SIZE_MAX rather than
21422         (size_t) -1 when we are talking about "infinity".
21423
21424         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21425
21426 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21427
21428         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21429         hint that one should use `if (! x) abort ();' rather than `assert
21430         (x);', and anyway it's one less thing to worry about configuring.
21431         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21432         hash_rehash, hash_insert): Use abort rather than assert.
21433
21434 2002-11-22  Bruno Haible  <bruno@clisp.org>
21435
21436         * lib/safe-read.h: Assume C89. Add comments.
21437         (safe_read): Change return type to size_t.
21438         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21439         byte counts > SSIZE_MAX correctly.
21440         * lib/safe-write.h: New file.
21441         * lib/safe-write.c: New file.
21442         * lib/full-read.h: New file.
21443         * lib/full-read.c: New file.
21444         * lib/full-write.h: Assume C89. Add comments.
21445         * lib/full-write.c: Include safe-write.h.
21446         (full_write): Rewritten to use safe_write.
21447         Suggested by Jim Meyering and Paul Eggert.
21448
21449 2002-11-21  Jim Meyering  <jim@meyering.net>
21450
21451         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21452
21453         Merge in changes from the coreutils.
21454
21455         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21456         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21457         <stdint.h>.
21458         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21459         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21460         int.  Work more efficiently if X is the same width as uintmax_t.
21461         Do not compare X to -1, to avoid bogus compiler warning.
21462         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21463         Don't assume that f_frsize and f_bsize are the same type.
21464
21465         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21466         warning on FreeBSD.
21467
21468         * lib/makepath.c (make_path): Restore umask *before* creating the final
21469         component.
21470         (make_path): Minor reformatting.
21471
21472         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21473         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21474         HAVE_MALLOC/HAVE_REALLOC.
21475
21476         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21477         dummy ones.  At least on GNU/Linux systems, `auto' means something
21478         else.
21479         From Michael Stone.
21480
21481 2002-11-21  Bruno Haible  <bruno@clisp.org>
21482
21483         Remove case insensitive option matching.
21484         * lib/argmatch.h (argcasematch): Remove declaration.
21485         (ARGCASEMATCH): Remove macro.
21486         (__xargmatch_internal): Remove case_sensitive argument.
21487         (XARGMATCH): Update.
21488         (XARGCASEMATCH): Remove macro.
21489         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21490         case_sensitive argument.
21491         (argcasematch): Remove function.
21492         (__xargmatch_internal): Remove case_sensitive argument.
21493         (main): Use XARGMATCH instead of XARGCASEMATCH.
21494
21495         * lib/xmalloc.c: Change compile-time error message. Add comment about
21496         required autoconf version.
21497
21498 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21499
21500         Merge argmatch cleanups from Bison.  Assume C89.
21501
21502         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21503         Include stdlib.h, for EXIT_FAILURE.
21504         Always include <string.h>, since we assume C89.
21505         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21506         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21507         Include <stddef.h> instead, since it's all we need for size_t.
21508         (PARAMS): Remove.  All uses removed.
21509         (ARRAY_CARDINALITY): Do not bother to #undef.
21510         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21511         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21512         Remove unnecessary parentheses.
21513         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21514         Insert necessary parentheses.
21515         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
21516         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
21517
21518 2002-11-19  Bruno Haible  <bruno@clisp.org>
21519
21520         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
21521         * lib/mbswidth.h: Include <stddef.h>, for size_t.
21522
21523         * lib/mbswidth.h (PARAMS): Remove macro.
21524         (mbswidth, mbsnwidth): Use ANSI C function declarations.
21525         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
21526
21527         * lib/gcd.h (PARAMS): Remove macro.
21528         (gcd): Use ANSI C function declarations.
21529         * lib/gcd.c (gcd): Likewise.
21530
21531 2002-11-15  Bruno Haible  <bruno@clisp.org>
21532
21533         * lib/strcspn.c: Include <stddef.h>.
21534         (strcspn): Use ANSI C function declaration. Change return type to
21535         size_t. Use NULL.
21536         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
21537         (strpbrk): Use NULL.
21538         * lib/strpbrk.h (PARAMS): Remove macro.
21539         (strpbrk): Use ANSI C function declaration.
21540         * lib/strstr.c: Don't include <sys/types.h>.
21541         * lib/strstr.h (PARAMS): Remove macro.
21542         (strstr): Use ANSI C function declarations.
21543
21544 2002-11-14  Karl Berry  <karl@gnu.org>
21545
21546         * config/mkinstalldirs: `do' on separate line, instead of
21547         `for var; do'.
21548
21549 2002-11-06  Bruno Haible  <bruno@clisp.org>
21550
21551         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
21552         * lib/gcd.c (gcd): Likewise.
21553
21554 2002-11-05  Bruno Haible  <bruno@clisp.org>
21555
21556         * lib/gcd.h: New file, from gettext-0.11.5.
21557         * lib/gcd.c: New file, from gettext-0.11.5.
21558
21559 2002-11-05  Bruno Haible  <bruno@clisp.org>
21560
21561         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21562         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21563         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21564         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21565
21566         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21567         <libintl.h>.
21568         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21569         <libintl.h>.
21570
21571         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21572         * lib/human.c: Include gettext.h instead of <libintl.h>.
21573         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21574         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21575         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21576         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21577         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21578         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21579         (textdomain): Remove definition.
21580         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21581
21582         * lib/long-options.c: Remove include of <libintl.h> and definition of
21583         _.
21584         * lib/same.c: Remove include of <libintl.h> and definition of _.
21585
21586 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21587
21588         * lib/config.charset: A few additions for Solaris.
21589
21590 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21591
21592         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21593         * lib/localcharset.c (locale_charset): Declare as extern "C".
21594
21595 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21596
21597         * lib/config.charset: msdos in uk_UA uses CP1125.
21598
21599 2002-11-04  Bruno Haible  <bruno@clisp.org>
21600
21601         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21602         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21603         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21604         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21605         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21606
21607 2002-11-04  Bruno Haible  <bruno@clisp.org>
21608
21609         * lib/localcharset.c (locale_charset): Don't return an empty string.
21610
21611 2002-11-04  Bruno Haible  <bruno@clisp.org>
21612
21613         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21614         aliases.
21615
21616 2002-11-04  Bruno Haible  <bruno@clisp.org>
21617
21618         * lib/config.charset: Update for newest glibc. Add canonical names
21619         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21620
21621 2002-11-04  Bruno Haible  <bruno@clisp.org>
21622
21623         * lib/config.charset: Add support for NetBSD.
21624
21625 2002-11-04  Bruno Haible  <bruno@clisp.org>
21626
21627         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21628
21629 2002-11-01  Bruno Haible  <bruno@clisp.org>
21630
21631         * configure.in: Add AC_CONFIG_AUX_DIR call.
21632         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21633         test/Makefile.
21634         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21635
21636 2002-09-28  Karl Berry  <karl@gnu.org>
21637
21638         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21639         installed automake until the next release, since changes have been
21640         made.
21641
21642 2002-09-25  Karl Berry  <karl@gnu.org>
21643
21644         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21645         * lib/getopt*: copy from libc/posix.
21646         * lib/gettext.h: copy from gettext.
21647         * lib/.cppi-disable: add strdup.c, gettext.h.
21648
21649 2002-09-25  Karl Berry  <karl@gnu.org>
21650
21651         * config/srclist.txt: enable gettext.h check.
21652         * config/config.{guess,sub}: update from prep.
21653         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21654                 from automake 1.6.3.
21655         See srclist*.
21656
21657 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21658
21659         * regex.c (PATFETCH): Remove the translating fetch.
21660         (PATFETCH_RAW): Rename to PATFETCH.
21661         (set_image_of_range): New fun.
21662         (SET_RANGE_TABLE_WORK_AREA): Use it.
21663         (regex_compile): Don't translate the pattern chars so eagerly.
21664         Only do it when inserting an `exactn' bytecode or when handling
21665         a char-range.
21666         (mutually_exclusive_p): Avoid empty statement.
21667
21668 2002-07-06  Jim Meyering  <meyering@lucent.com>
21669
21670         * m4/README: Don't mention Makefile.am.in.
21671         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21672
21673 2002-07-01  Jim Meyering  <meyering@lucent.com>
21674
21675         * lib/c-stack.c: Include sys/time.h.
21676         From Volker Borchert.
21677
21678 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21679
21680         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21681
21682 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21683
21684         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21685         New macro.  Use it uniformly instead of
21686         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21687         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21688         reported by Vin Shelton.
21689
21690 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21691
21692         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21693         Do not assume SA_SIGINFO behavior.
21694         Bug reported by Jim Meyering on NetBSD 1.5.2.
21695
21696 2002-06-22  Jim Meyering  <meyering@lucent.com>
21697
21698         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21699         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21700
21701         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21702         now that configure.ac uses AC_GNU_SOURCE.
21703         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21704         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21705
21706         Update to latest tools.  Suggestions from Paul Eggert.
21707         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21708         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21709         * m4/fnmatch.m4: Likewise.
21710         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21711         to AC_HEADER_STDBOOL
21712
21713 2002-06-22  Jim Meyering  <meyering@lucent.com>
21714
21715         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21716         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21717
21718 2002-06-22  Jim Meyering  <meyering@lucent.com>
21719
21720         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21721
21722         * lib/exitfail.c, exitfail.h: Likewise.
21723         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21724
21725         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21726         of fnmatch.h.
21727         (EXTRA_DIST): Add fnmatch_loop.c.
21728         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21729
21730         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21731         * lib/fnmatch.c: Update from diffutils-2.8.2.
21732         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21733         * lib/fnmatch.h: Remove file.
21734
21735 2002-06-21  Jim Meyering  <meyering@lucent.com>
21736
21737         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21738         * m4/mbrtowc.m4: Likewise.
21739
21740         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21741         * m4/mbswidth.m4: Reflect name change:
21742         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21743         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21744
21745         * m4/lib-link.m4: Update from gettext-0.11.2.
21746         * m4/gettext.m4: Likewise.
21747
21748         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21749         From Alfred M. Szmidt.
21750
21751 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21752
21753         * lib/file-type.h: Report an error if neither S_ISREG nor
21754         S_IFREG is defined, instead of using a test specific to glibc
21755         2.2.  This should be safe, since POSIX requires S_ISREG and
21756         Unix Version 7 had S_IFREG.  We don't need to check for
21757         <sys/types.h> since we don't use any symbols that it defines.
21758
21759 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21760
21761         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21762         $@-t, so that each temporary file name is unique and valid in the first
21763         8 characters, for operation under DOS.
21764
21765 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21766
21767         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21768
21769 2002-06-15  Jim Meyering  <meyering@lucent.com>
21770
21771         Work even with DJGPP 2.03, which lacks support for symlinks.
21772         From Richard Dawe.
21773         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21774         is defined.
21775         * lib/lchown.c (S_ISLNK): Likewise.
21776
21777 2002-06-15  Jim Meyering  <meyering@lucent.com>
21778
21779         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21780         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21781         have been included before this file.
21782
21783 2002-06-14  Jim Meyering  <meyering@lucent.com>
21784
21785         * lib/file-type.h: Use the version from diffutils-2.8.2.
21786         * lib/file-type.c: Likewise.
21787
21788 2002-06-07  Jim Meyering  <meyering@lucent.com>
21789
21790         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21791         They're needed at least for NetBSD 1.5.2.
21792         ($statxfs_includes): Include those same headers.
21793         ($statxfs_includes): Include sys/vfs.h if available.
21794         ($statxfs_includes): Likewise for sys/statvfs.h.
21795         Check for the following members in both structs statfs and statvfs:
21796         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21797
21798 2002-06-01  Jim Meyering  <meyering@lucent.com>
21799
21800         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21801         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21802
21803 2002-05-28  Jim Meyering  <meyering@lucent.com>
21804
21805         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21806         Reported by Volker Borchert.
21807
21808 2002-05-27  Jim Meyering  <meyering@lucent.com>
21809
21810         Fix a problem seen only on nonconforming systems whereby ls.c's
21811         use of localtime, and then of gettimeofday would cause trouble:
21812         the localtime call used to initialize rpl_gettimeofday's save
21813         mechanism would clobber ls's current local time information so
21814         that in any long listing the first file would always be listed
21815         with date 1970-01-01.  Analysis by Volker Borchert.
21816
21817         * lib/gettimeofday.c (localtime): Undefine.
21818         (rpl_localtime): New function.
21819
21820 2002-05-27  Jim Meyering  <meyering@lucent.com>
21821
21822         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21823         localtime.
21824
21825         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21826         use the replacement function; it wouldn't resolve at link time.
21827         Reported by Volker Borchert.
21828
21829 2002-05-22  Jim Meyering  <meyering@lucent.com>
21830
21831         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
21832         file-type.h.
21833         * lib/file-type.h: New file.
21834         * lib/file-type.c (file_type): New file/function.  Extracted from
21835         diffutils.
21836
21837 2002-04-30  Jim Meyering  <meyering@lucent.com>
21838
21839         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
21840
21841 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21842
21843         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
21844
21845 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21846
21847         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
21848         Do not check for alloca.h (no longer used) or stdbool.h (was never
21849         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
21850
21851 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21852
21853         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
21854
21855 2002-04-29  Jim Meyering  <meyering@lucent.com>
21856
21857         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
21858         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
21859         Use AC_FUNC_STRNLEN here instead.
21860
21861         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
21862         With autoconf-2.53a, it's part of AC_PROG_CC.
21863
21864 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21865
21866         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
21867         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
21868
21869 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21870
21871         * lib/sig2str.h, lib/sig2str.c: New files.
21872         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
21873
21874 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21875
21876         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
21877         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
21878         of 127, since 64 is the largest conceivable number for ancient
21879         nonstandard hosts.
21880         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
21881
21882 2002-04-28  Jim Meyering  <meyering@lucent.com>
21883
21884         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
21885
21886 2002-04-24  Jim Meyering  <meyering@lucent.com>
21887
21888         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
21889         (jm_PREREQ): Use it.
21890
21891         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
21892         mach/mach.h fcntl.h.
21893         Check for this function: setlocale.
21894
21895 2002-04-24  Jim Meyering  <meyering@lucent.com>
21896
21897         * lib/gettext.h: New file, from Gettext.
21898         * lib/Makefile.am (INCLUDES): Remove -I../intl.
21899         (libfetish_a_SOURCES): Add gettext.h.
21900
21901 2002-04-16  Jim Meyering  <meyering@lucent.com>
21902
21903         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
21904         ut_pid, ut_id, ut_exit.
21905
21906 2002-04-16  Jim Meyering  <meyering@lucent.com>
21907
21908         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
21909         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
21910         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
21911
21912 2002-04-12  Jim Meyering  <meyering@lucent.com>
21913
21914         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
21915         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
21916         existence of the getmntinfo function.  Needed for Darwin 5.3.
21917
21918         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
21919         This is necessary at least on Darwin 5.3.
21920
21921         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
21922         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
21923         strnlen.o in the library, and that makes some versions of ranlib
21924         object.
21925
21926 2002-04-12  Jim Meyering  <meyering@lucent.com>
21927
21928         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
21929
21930 2002-04-09  Jim Meyering  <meyering@lucent.com>
21931
21932         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
21933         to be more precise.  Rather than saying we're checking whether the
21934         function `works', say what we're testing.
21935         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
21936         Reported by Bruno Haible.
21937
21938 2002-03-10  Jim Meyering  <meyering@lucent.com>
21939
21940         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
21941         Suggestion from Santiago Vila.
21942
21943 2002-03-08  Jim Meyering  <meyering@lucent.com>
21944
21945         * lib/rename.c: Mention that this wrapper is needed also on
21946         mips-dec-ultrix4.4 systems.
21947
21948 2002-03-02  Jim Meyering  <meyering@lucent.com>
21949
21950         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
21951         not HAVE_CLOCK_SETTIME.
21952
21953 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21954
21955         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
21956         Check for clock_settime.
21957
21958 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21959
21960         * lib/nanosleep.h: Rename to....
21961         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
21962
21963         * lib/gettime.c: New file.
21964         * lib/settime.c: New file.
21965         * lib/stime.c: Remove.
21966
21967         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
21968         timespec.h.  Remove nanosleep.h.
21969
21970 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21971
21972         * m4/acl.m4: New file.
21973         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
21974         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
21975
21976 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21977
21978         * lib/acl.c, lib/acl.h: New files.
21979         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
21980
21981 2002-02-24  Jim Meyering  <meyering@lucent.com>
21982
21983         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
21984         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
21985         cause trouble.  Reported by Nelson Beebe.
21986
21987 2002-02-23  Paul Eggert  <eggert@twinsun.com>
21988
21989         * lib/path-concat.c (xpath_concat): Reorder code to pacify
21990         compilers that don't know that xalloc_die never returns.
21991
21992 2002-02-20  Jim Meyering  <meyering@lucent.com>
21993
21994         * lib/getdate.c: Regenerate using bison-1.33.
21995
21996 2002-02-17  Jim Meyering  <meyering@lucent.com>
21997
21998         * config/config.guess (main): Don't use `head -1'; it's no longer
21999         portable. Use `sed 1q' instead.
22000
22001 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
22002
22003         * m4/codeset.m4: Upgrade to gettext-0.11.
22004         * m4/gettext.m4: Upgrade to gettext-0.11.
22005         * m4/glibc21.m4: Upgrade to gettext-0.11.
22006         * m4/iconv.m4: Upgrade to gettext-0.11.
22007         * m4/isc-posix.m4: Upgrade to gettext-0.11.
22008         * m4/lcmessage.m4: Upgrade to gettext-0.11.
22009         * m4/lib-ld.m4: New file, from gettext-0.11.
22010         * m4/lib-link.m4: New file, from gettext-0.11.
22011         * m4/lib-prefix.m4: New file, from gettext-0.11.
22012         * m4/progtest.m4: Upgrade to gettext-0.11.
22013
22014 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22015
22016         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
22017         (jm_PREREQ): Use it.
22018
22019 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22020
22021         * lib/posixver.c, lib/posixver.h: New files.
22022         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22023
22024 2002-02-02  Paul Eggert  <eggert@twinsun.com>
22025             Bruno Haible  <bruno@clisp.org>
22026
22027         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
22028         (fwrite_success_callback): New declaration.
22029         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
22030         print_unicode_char. Call failure callback instead of error.
22031         (fwrite_success_callback): New function.
22032         (exit_failure_callback): New function.
22033         (fallback_failure_callback): New function.
22034         (print_unicode_char): Call unicode_to_mb.
22035
22036 2002-01-26  Jim Meyering  <meyering@lucent.com>
22037
22038         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
22039         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
22040
22041 2002-01-26  Jim Meyering  <meyering@lucent.com>
22042
22043         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
22044
22045 2002-01-22  Paul Eggert  <eggert@twinsun.com>
22046
22047         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
22048
22049 2002-01-22  Jim Meyering  <meyering@lucent.com>
22050
22051         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
22052         Otherwise, some versions of automake would omit the rule that makes
22053         Makefile from Makefile.in.
22054
22055 2002-01-21  Paul Eggert  <eggert@twinsun.com>
22056
22057         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
22058         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22059         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
22060         (memcoll): Set errno to zero if there is no error.
22061
22062         * lib/quotearg.c (quotearg_buffer_restyled):
22063         Fix bug with quoting buffers containing NUL when backslashing escapes.
22064         This bug was exposed by the other changes in this patch.
22065         (quotearg_n_options): New arg ARGSIZE.
22066         All callers changed.
22067         (quoting_options_from_style): New function.
22068         (quotearg_n_style): Use it.
22069         (quotearg_n_style_mem): New function.
22070
22071         * lib/quotearg.h (quotearg_n_style_mem): New function.
22072
22073 2002-01-19  Jim Meyering  <meyering@lucent.com>
22074
22075         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
22076         Remove useless quotes: DF_PROG="df".
22077         * m4/strnlen.m4: New file.
22078
22079 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22080
22081         * lib/backupfile.c (ISDIGIT): Comment fix.
22082         * lib/getdate.y (ISDIGIT): Likewise.
22083         * lib/posixtm.c (ISDIGIT, year): Likewise.
22084         * lib/strverscmp.c (ISDIGIT): Likewise.
22085         * lib/userspec.c (ISDIGIT): Likewise.
22086
22087 2002-01-16  Jim Meyering  <meyering@lucent.com>
22088
22089         * lib/getdate.y: Add three semicolons, each just before a closing
22090         brace. Bison (as of version 1.31) no longer papers over that mistake.
22091
22092 2002-01-05  Jim Meyering  <meyering@lucent.com>
22093
22094         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22095
22096 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22097
22098         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22099         not silently exit merely because the output buffer happens to
22100         have nothing pending.
22101
22102 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22103
22104         See the big note in ../ChangeLog.
22105         * lib/human.c (suffixes): Prefer K to k for 1024.
22106         (generate_suffix_backwards): New function.
22107         (human_readable_inexact): Use it.
22108         * lib/xstrtol.c (__xstrtol): If there is no number but there
22109         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22110         Accept 'K' as well as 'k'.
22111
22112 2001-12-15  Jim Meyering  <meyering@lucent.com>
22113
22114         * lib/regex.h (__restrict_arr): Update from libc.
22115
22116         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
22117         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
22118         (STREQ): Define.
22119
22120 2001-12-14  Jim Meyering  <meyering@lucent.com>
22121
22122         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
22123         Suggestion from Bruno Haible.
22124
22125 2001-12-10  Jim Meyering  <meyering@lucent.com>
22126
22127         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
22128         xrealloc, Instead, include "xalloc.h".
22129         (initbuffer): Don't cast xmalloc return value to char*.
22130         (readline): Reword comment.
22131         Don't cast xrealloc return value to char*
22132         Return NULL, not 0.
22133
22134 2001-12-09  Jim Meyering  <meyering@lucent.com>
22135
22136         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
22137         about `signed and unsigned type in conditional expression'.
22138         * lib/posixtm.c (posix_time_parse): Likewise.
22139
22140         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
22141
22142         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
22143         to avoid a pedantic warning.
22144
22145         * lib/getstr.c: Don't include assert.h.
22146         (getstr): Remove warning-evoking assertions.
22147         Return -1 if offset parameter is out of bounds.
22148         Change the type of a local from int to size_t.
22149
22150         * lib/strftime.c (my_strftime_localtime_r): Include this function
22151         definition in the `#if ! HAVE_TM_GMTOFF' block.
22152
22153         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
22154         Include xalloc.h instead.
22155
22156 2001-12-02  Jim Meyering  <meyering@lucent.com>
22157
22158         * lib/tempname.c: Don't declare getenv, thus reverting the change of
22159         2001-11-18.  It's no longer necessary, now that stdlib.h is always
22160         included.
22161
22162         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
22163         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
22164
22165 2001-11-30  Akim Demaille  <akim@epita.fr>
22166
22167         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
22168         before being defined.
22169
22170 2001-11-27  Paul Eggert  <eggert@twinsun.com>
22171
22172         * lib/quotearg.h (quotearg_n, quotearg_n_style):
22173         First arg is int, not unsigned.
22174         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22175         (SIZE_MAX, UINT_MAX): New macros.
22176         (quotearg_n_options): Abort if N is negative.
22177         Avoid overflow check on hosts where size_t is 64 bits and int
22178         is 32 bits, as overflow is impossible there.
22179         Fix off-by-one typo that caused unnecessary reallocation.
22180
22181 2001-11-27  Jim Meyering  <meyering@lucent.com>
22182
22183         * lib/tempname.c: Merge with version from libc.
22184         * lib/regex.c: Likewise.
22185
22186         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
22187         systems for which STDC_HEADERS is 0, it was not included, resulting in
22188         a warning about an integer-to-pointer conversion problem with getenv.
22189         Reported by Volker Borchert.
22190
22191 2001-11-26  Jim Meyering  <meyering@lucent.com>
22192
22193         * lib/gtod.h: Remove file.
22194         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
22195         * lib/gettimeofday.c: Don't include gtod.h.
22196         (GTOD_init): Remove function.
22197         (rpl_gettimeofday): Do its job here instead, rather than aborting.
22198         Suggestion from Volker Borchert.
22199
22200 2001-11-23  Jim Meyering  <meyering@lucent.com>
22201
22202         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
22203         it.
22204         * lib/hash.c (struct hash_table): Define it here instead.
22205
22206 2001-11-22  Jim Meyering  <meyering@lucent.com>
22207
22208         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
22209
22210 2001-11-20  Jim Meyering  <meyering@lucent.com>
22211
22212         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
22213         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
22214
22215 2001-11-19  Jim Meyering  <meyering@lucent.com>
22216
22217         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
22218         directory.  Use "conftestXXXXXX" as the template.
22219         Suggestion from Paul Eggert.
22220
22221         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
22222         immediately, so the test doesn't mistakenly hit the max-open-files
22223         limit.
22224
22225 2001-11-18  Paul Eggert  <eggert@twinsun.com>
22226
22227         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
22228         (TEMPORARIES): New macro.
22229         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
22230         removes an artificial limitation (e.g. HP-UX 10.20, where
22231         TMP_MAX is 17576).
22232
22233 2001-11-18  Jim Meyering  <meyering@lucent.com>
22234
22235         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
22236
22237 2001-11-18  Jim Meyering  <meyering@lucent.com>
22238
22239         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
22240         on SunOS 4.
22241
22242         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
22243         files will be created before anything else.
22244
22245 2001-11-17  Paul Eggert  <eggert@twinsun.com>
22246
22247         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
22248         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
22249
22250 2001-11-17  Jim Meyering  <meyering@lucent.com>
22251
22252         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
22253         Prompted by a report from Bob Proulx.
22254
22255         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
22256         Instead, require UTILS_FUNC_MKSTEMP.
22257
22258 2001-11-17  Jim Meyering  <meyering@lucent.com>
22259
22260         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
22261         Now, that's done as part of AC_FUNC_STRTOD.
22262
22263 2001-11-17  Jim Meyering  <meyering@lucent.com>
22264
22265         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
22266         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
22267         rather than group writable.  Patch by Juan F. Codagnone.
22268
22269         * lib/readtokens.c: Remove explicit declarations of xmalloc and
22270         xrealloc, Instead, include "xalloc.h".
22271
22272         * lib/mountlist.c: Include unlocked-io.h after all system headers.
22273         Remove explicit declarations of xmalloc, xrealloc,
22274         and xstrdup.  Instead, include "xalloc.h".
22275
22276         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
22277         unlocked-io.h.
22278         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
22279         Likewise.
22280         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
22281
22282         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
22283         Reported by Padraig Brady.
22284
22285         * lib/mkstemp.c: #undef mkstemp.
22286         Include config.h.
22287         (rpl_mkstemp): Rename from mkstemp.
22288         Protoize.
22289
22290 2001-11-16  Jim Meyering  <meyering@lucent.com>
22291
22292         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
22293         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
22294         determine the amount of total physical memory, use pstat_getstatic.
22295         HPUX-11 doesn't define _SC_PHYS_PAGES.
22296         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
22297         If sysconf couldn't be used to determine the amount of available
22298         physical memory, use both pstat_getstatic and pstat_getdynamic.
22299         Based on a patch from Bob Proulx.
22300
22301 2001-11-10  Jim Meyering  <meyering@lucent.com>
22302
22303         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
22304         (jm_PREREQ): Use it.
22305
22306 2001-11-09  Jim Meyering  <meyering@lucent.com>
22307
22308         * m4/jm-macros.m4: Require autoconf-2.52f.
22309         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
22310         Use these AC_-prefixed names, not the AM_-prefixed ones.
22311
22312         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
22313
22314 2001-11-05  Jim Meyering  <meyering@lucent.com>
22315
22316         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
22317
22318 2001-11-04  Jim Meyering  <meyering@lucent.com>
22319
22320         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
22321         $DEFS.
22322
22323 2001-11-03  Jim Meyering  <meyering@lucent.com>
22324
22325         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
22326         of AC_DEFUN.
22327
22328         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
22329         know the name of the variable in the macro definition.
22330
22331 2001-11-03  Jim Meyering  <meyering@lucent.com>
22332
22333         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
22334         in argmatch_to_argument call.
22335
22336         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
22337         argument.
22338
22339         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
22340         e.g., a fault due to an attempt to free a NULL pointer.
22341
22342 2001-11-01  Jim Meyering  <meyering@lucent.com>
22343
22344         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
22345         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
22346
22347 2001-11-01  Jim Meyering  <meyering@lucent.com>
22348
22349         * lib/dirfd.c, lib/dirfd.h: New files.
22350         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22351
22352         * lib/hash.c (hash_print) [TESTING]: Clean up.
22353
22354 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22355
22356         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22357         to avoid a warning if -Wall.
22358
22359 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22360
22361         * README: New file
22362         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22363         (per RMS's instructions, this is now the canonical source)
22364         * lgpl/, gpl/: New directories.
22365
22366 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22367
22368         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22369
22370 2001-10-21  Jim Meyering  <meyering@lucent.com>
22371
22372         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22373         this code would end up calling gettext even in packages built
22374         with --disable-nls.
22375         * lib/getopt.c (_): Likewise.
22376         * lib/regex.c (_): Likewise.
22377
22378 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22379
22380         * m4/error.m4 (jm_PREREQ_ERROR):
22381         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22382         AC_FUNC_STRERROR_R does that.
22383         Check for strerror declaration.
22384
22385         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22386         are supposed to have them these days.
22387         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22388         Merge changes from latest Autoconf CVS.
22389         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22390         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22391         POSIX decided to standardize on the int flavor of strerror_r.
22392
22393 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22394
22395         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22396         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22397         Use strerror_r that is only a macro, even if it is not a function.
22398         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22399         (private_strerror): Use prototypes, not old-style function definition.
22400         (print_errno_message): New function.
22401         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22402         char*-flavored one.
22403         (error_tail, error, error_at_line): Use it.
22404
22405 2001-10-11  Jim Meyering  <meyering@lucent.com>
22406
22407         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22408         and quote_n (1, ... to avoid clobbering a buffer.
22409
22410 2001-10-05  Jim Meyering  <meyering@lucent.com>
22411
22412         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22413         hash-pjw.h.
22414         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22415         * lib/hash-pjw.h: New file.
22416
22417 2001-09-30  Jim Meyering  <meyering@lucent.com>
22418
22419         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22420         `struct fsstat' has the `f_fstypename' member.
22421         Use that to define FS_TYPE, which is now used to make
22422         the getfsstat link test tighter.
22423
22424 2001-09-30  Jim Meyering  <meyering@lucent.com>
22425
22426         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22427         Include <sys/ucred.h>, for Apple Darwin.
22428         Include sys/mount.h and sys/fs_types.h only if available.
22429         (FS_TYPE): Define.
22430         (read_filesystem_list): Use FS_TYPE.
22431
22432 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22433
22434         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22435         a boolean context.
22436
22437 2001-09-29  Jim Meyering  <meyering@lucent.com>
22438
22439         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22440         [one-argument getmntent function]): Include stdio.h before mntent.h.
22441         SunOS 4.1.x needs it for the declaration of `FILE'.
22442         Patch by Volker Borchert.
22443
22444         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22445         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22446         sys/fs_types.h, and make the link-test for getfsstat guard #include
22447         directives with appropriate #if HAVE_*_H tests so that we can
22448         detect getfsstat on Apple Darwin1.3.7 systems.
22449         Reported by Nelson Beebe.
22450         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22451
22452 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22453
22454         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22455         #defines strtoimax.  Also treat the other strto* functions
22456         like strtoimax.
22457
22458         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22459         Check for strtoul and strtoumax,
22460         as those declarations are made even in the signed case.
22461         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22462         Likewise, for strtol and strtoimax.
22463
22464 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22465
22466         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22467         #defines strtoimax.  Also treat the other strto* functions
22468         like strtoimax.
22469
22470         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22471         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22472         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22473
22474 2001-09-26  Jim Meyering  <meyering@lucent.com>
22475
22476         Most macros in unlocked-io.h had the wrong number of arguments.
22477         * lib/gen-uio: New script.
22478         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22479         * lib/unlocked-io.hin: Remove file.
22480         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22481         rather than trying to embed it here.
22482         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22483         Reported by Padraig Brady.
22484
22485 2001-09-25  Volker Borchert  <bt@teknon.de>
22486
22487         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22488         `result'.
22489
22490 2001-09-24  Jim Meyering  <meyering@lucent.com>
22491
22492         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
22493
22494 2001-09-23  Jim Meyering  <meyering@lucent.com>
22495
22496         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
22497         instead of the mere test for existence of mntent.h.  The latter
22498         would get a false-positive on AIX 3.4 systems.
22499         In the outer getmntent if-block, don't die if neither of the getmntent
22500         tests succeeds.  Instead, just fall through and continue with the
22501         remaining tests.
22502
22503 2001-09-23  Jim Meyering  <meyering@lucent.com>
22504
22505         * lib/mountlist.c: Remove useless parentheses in #if directives.
22506         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22507         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22508
22509 2001-09-22  Jim Meyering  <meyering@lucent.com>
22510
22511         * m4/gettext.m4: New file.  From gettext.
22512         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22513         * m4/progtest.m4: Likewise
22514         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
22515         * m4/glibc21.m4: Likewise.
22516
22517         * m4/libintl.m4: Remove.  No longer used.
22518
22519 2001-09-22  Jim Meyering  <meyering@lucent.com>
22520
22521         * lib/localcharset.c: Update from latest gettext.
22522         * lib/config.charset: Likewise.
22523
22524 2001-09-20  Jim Meyering  <meyering@lucent.com>
22525
22526         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
22527         strtoimax.
22528         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
22529         strtoumax.
22530
22531 2001-09-20  Jim Meyering  <meyering@lucent.com>
22532
22533         * lib/xstrtol.c (strtoimax): Guard declaration with
22534         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
22535         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
22536         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
22537         (strtoumax): Likewise, for completeness (it wasn't necessary).
22538
22539 2001-09-17  Paul Eggert  <eggert@twinsun.com>
22540
22541         * lib/strtoimax.c (HAVE_LONG_LONG):
22542         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
22543         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
22544         to work around bug in IBM C compiler.
22545
22546 2001-09-17  Jim Meyering  <meyering@lucent.com>
22547
22548         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
22549         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
22550         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
22551         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
22552         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
22553         whenever the right hand side need not be expanded by the shell.
22554
22555 2001-09-16  Paul Eggert  <eggert@twinsun.com>
22556
22557         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
22558         library.  It's not correct, as some older glibcs are buggy.
22559         fnmatch wasn't fixed until glibc 2.2.
22560
22561         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
22562         special shell magic here.
22563
22564 2001-09-16  Jim Meyering  <meyering@lucent.com>
22565
22566         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22567         * m4/jm-macros.m4: Require it.
22568
22569 2001-09-16  Jim Meyering  <meyering@lucent.com>
22570
22571         * lib/mkdir.c: New file.
22572
22573 2001-09-15  Jim Meyering  <meyering@lucent.com>
22574
22575         * m4/jm-macros.m4: Check for help2man.
22576
22577 2001-09-11  Jim Meyering  <meyering@lucent.com>
22578
22579         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22580         The body, by Paul Eggert, was moved here from configure.in.
22581         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22582
22583 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22584
22585         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22586         (jm_PREREQ): Use it.
22587
22588 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22589
22590         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22591         Use ssize_t, not int, to store result of readlink.
22592         Check for ssize_t overflow as well as size_t overflow,
22593         as POSIX says the result of readlink is implementation-defined
22594         when ssize_t overflows.
22595         Remove unnecessary cast to char*.
22596         Use free+malloc instead of realloc, as the storage doesn't need
22597         to be preserved and it's clearer and can be more efficient that way.
22598         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22599         * lib/xreadlink.h (xreadlink): Update prototype.
22600
22601 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22602
22603         * lib/xgetcwd.c: Revert some of the previous change; intead,
22604         fix the HAVE_GETCWD_NULL code to behave more like the
22605         !HAVE_GETCWD_NULL code used to.
22606
22607         Include "xalloc.h".
22608         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22609         invoke xalloc_die.
22610
22611 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22612
22613         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22614         sys/param.h, as pathmax.h includes them.
22615
22616 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22617
22618         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22619         (jm_PREREQ_XGETCWD): New macro.
22620
22621         * m4/getcwd.m4: New file.
22622
22623 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22624
22625         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22626         like the HAVE_GETCWD_NULL code.
22627         Include pathmax.h if not HAVE_GETCWD.
22628         Do not include xalloc.h.
22629         (INITIAL_BUFFER_SIZE): New symbol.
22630         Do not use xmalloc / xrealloc, since the caller is responsible for
22631         handling errors.  Preserve errno around `free' during failure.
22632         Do not overrun buffer when using getwd.
22633
22634 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22635
22636         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22637         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22638         getcwd (NULL, 0).
22639
22640 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22641
22642         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22643         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22644         spotted by Jim Meyering.
22645
22646 2001-09-03  Jim Meyering  <meyering@lucent.com>
22647
22648         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22649         failure.
22650
22651 2001-09-02  Jim Meyering  <meyering@lucent.com>
22652
22653         * lib/error.c: Update from GNU libc.
22654
22655 2001-09-01  Jim Meyering  <meyering@lucent.com>
22656
22657         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22658         Used by df.
22659
22660 2001-09-01  Jim Meyering  <meyering@lucent.com>
22661
22662         * lib/xreadlink.c: New file.
22663         * lib/xreadlink.h: New file.
22664         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22665         xreadlink.h.
22666
22667         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22668         doesn't conflict with sparc Solaris 7's definition in
22669         /usr/include/sys/int_types.h.
22670
22671         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22672         files.
22673         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22674         and strncasecmp as r-values.  Unixware didn't have declarations.
22675
22676 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22677
22678         * lib/xstrtol.h: Add copyright notice.
22679         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22680         LONGINT_INVALID_SUFFIX_CHAR.
22681
22682 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22683
22684         * lib/xstrtol.c (strtoimax): New decl.
22685
22686 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22687
22688         * lib/xgetcwd.c: Don't include pathmax.h.
22689         Include stdlib.h and unistd.h if available.
22690         Include xalloc.h.
22691         (xmalloc, xstrdup, free): Remove decls.
22692         (xgetcwd): Don't assume sizes fit in unsigned.
22693         Check for overflow when computing sizes.
22694         Simplify reallocation code.
22695
22696 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22697
22698         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22699         a directory's st_size can have an arbitrary value, so the old
22700         usage could waste an arbitrary amount of memory.  All uses
22701         changed.
22702         * lib/savedir.h: Update prototype.
22703
22704 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22705
22706         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22707
22708         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22709         old strtoimax.c.
22710
22711         Also, make the following further changes to make this file's
22712         configuration more similar to that of strtol.c:
22713         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22714         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22715         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22716         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22717         changed to signed values.
22718
22719         And make the following changes as well:
22720         Fix copyright notice, as 1999 was missing.
22721         (verify): New macro.
22722         (strtoimax): Check sizes at compile-time, not run-time.
22723         Prefer strtol to strtoll if both work.
22724         (main): Remove; it was not that useful and was a pain to maintain.
22725
22726         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22727
22728 2001-08-31  Jim Meyering  <meyering@lucent.com>
22729
22730         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22731         Use an initial, malloc'd, buffer of length 128 rather than
22732         a statically allocated one of length 1024.
22733
22734 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22735
22736         Simplify code, partly by assuming autoconf 2.52 semantics.
22737
22738         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22739
22740         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22741         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22742         All uses removed.
22743         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22744         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22745         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22746         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22747         jm_AC_HEADER_INTTYPES_H.
22748         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22749
22750         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22751
22752         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22753         Quote first arg of AC_DEFUN.
22754         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22755         since they are needed to parse the include file even if we need
22756         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22757         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22758         but with opposite signedness.
22759
22760 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22761
22762         Merge 'exclude' changes from tar 1.13.22.
22763         This fixes one or two unlikely storage allocation overflow bugs,
22764         but doesn't change user-visible behavior otherwise.
22765
22766 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22767
22768         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22769         (jm_PREREQ_EXCLUDE): New macro.
22770
22771 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22772
22773         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22774         tm to be declared.
22775
22776 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22777
22778         * lib/hash.c: Remove '2001' from copyright notice.
22779
22780 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22781
22782         * lib/full-write.h: New file.
22783         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22784         * lib/full-write.c: Correct credits, as cccp.c no longer
22785         exists and anyway it was so heavily changed from the old cccp
22786         code as to be unrecognizable.  Include full-write.h.
22787         (full_write) Return size_t, with short writes meaning failure.
22788         All callers changed.  This fixes a bug with large buffers
22789         on 64-bit hosts.
22790         * lib/utime.c: Include full-write.h.
22791
22792 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22793
22794         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22795         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22796         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22797         Include if available.
22798         (<xalloc.h>): Include
22799         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22800         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22801         collide with FNM macros.
22802         (struct patopts): New struct.
22803         (struct exclude): Use it, as exclude patterns now come with options.
22804         (new_exclude): Support above changes.
22805         (new_exclude, add_exclude_file):
22806         Initial size must now be a power of two to simplify overflow checking.
22807         (free_exclude, fnmatch_no_wildcards): New function.
22808         (excluded_filename): No longer requires options arg, as the options
22809         are determined by add_exclude.  Now returns bool, not int.
22810         (excluded_filename, add_exclude):
22811         Add support for the fancy new exclusion options.
22812         (add_exclude, add_exclude_file): Now takes int options arg.
22813         Check for arithmetic overflow when computing sizes.
22814         (add_exclude_file): xrealloc might modify errno, so don't
22815         realloc until after errno might be used.
22816
22817         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22818         New macros.
22819         (free_exclude): New decl.
22820         (add_exclude, add_exclude_file): Now takes int options arg.
22821         (excluded_filename): No longer requires options arg, as the options
22822         are determined by add_exclude.  Now returns bool, not int.
22823
22824 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22825
22826         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22827
22828 2001-08-27  Jim Meyering  <meyering@lucent.com>
22829
22830         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
22831
22832         * lib/version-etc.c (N_): Remove definition.
22833         Revert most of last change.
22834         Instead, simply don't mark the `Copyright...' string for translation.
22835         Based on advice from Paul Eggert.
22836
22837         * lib/strtoxmax.c: Tweak comment.
22838
22839 2001-08-26  Jim Meyering  <meyering@lucent.com>
22840
22841         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
22842
22843         * m4/xstrtoimax.m4: New file.
22844         * m4/xstrtoumax.m4: Add comments explaining why we
22845         AC_REPLACE_FUNCS(strtol).
22846
22847 2001-08-26  Jim Meyering  <meyering@lucent.com>
22848
22849         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
22850         of copyright with `%s' so translators don't get an untranslated
22851         message in 2002.
22852         (COPYRIGHT_YEAR): Define.
22853         (version_etc): Use fprintf rather than fputs.
22854         Suggestion from Ulrich Drepper.
22855
22856         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
22857
22858         * lib/strtoll.c: New file, from GNU libc.
22859         * lib/xstrtoimax.c: New file.
22860
22861         * lib/xstrtol.h: Add xstrtoimax.
22862         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
22863         * lib/strtoimax.c: New file.  Likewise, but first define
22864         STRTOUXMAX_SIGNED.
22865
22866         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
22867         ...
22868         * lib/strtoxmax.c: ... then renamed to this.
22869
22870 2001-08-18  Paul Eggert  <eggert@twinsun.com>
22871
22872         * m4/inttypes.m4: Add AC_PREREQ(2.13).
22873         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
22874         (jm_AC_TYPE_INTMAX_T): New macro.
22875         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
22876
22877         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
22878
22879         * m4/longlong.m4: Renamed from ulonglong.m4.
22880         * m4/inttypes.m4: Renamed from inttypes_h.m4.
22881         * m4/uintmax_t.m4: Removed.
22882
22883 2001-08-13  Paul Eggert  <eggert@twinsun.com>
22884
22885         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
22886         Port to Solaris 8, where 'sed' requires a space after the 'r'
22887         command, and where sh dislikes "$/".  Clean up the spacing a bit.
22888         Redirect output to $tmp just once.
22889
22890 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
22891
22892         * lib/addext.c (<errno.h>): Include.
22893         (errno): Declare if not defined.
22894         (addext): Work correctly when pathconf returns -1 and leaves
22895         errno alone because there is no limit.  Also, work even if
22896         pathconf returns a value greater than SIZE_MAX.
22897
22898 2001-08-12  Jim Meyering  <meyering@lucent.com>
22899
22900         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
22901         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
22902         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
22903         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
22904         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
22905         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
22906         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
22907         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
22908         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
22909         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
22910         utime.m4, utimes.m4, xstrtoumax.m4:
22911         Quote the first argument in each use of AC_DEFUN.
22912
22913 2001-08-12  Jim Meyering  <meyering@lucent.com>
22914
22915         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
22916         Simply `return getcwd (NULL, 0);'.
22917         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
22918         Use 1300 as initial value for length, not PATH_MAX.
22919
22920         * lib/pathmax.h: Clean up cpp syntax.
22921
22922 2001-08-12  Jim Meyering  <meyering@lucent.com>
22923
22924         * lib/gettimeofday.c: New file.
22925         * lib/gtod.h: New file.
22926         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
22927
22928 2001-08-05  Jim Meyering  <meyering@lucent.com>
22929
22930         * m4/jm-macros.m4: Require autoconf-2.52.
22931
22932 2001-08-04  Jim Meyering  <meyering@lucent.com>
22933
22934         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
22935         stmt, to get in sync with glibc.
22936
22937 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22938
22939         The following changes are from gettext 0.10.39 as maintained by
22940         Bruno Haible.
22941
22942         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
22943         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
22944         with inverted sense.  All uses changed.
22945
22946         * lib/mbswidth.c: Don't include <limits.h>.
22947         Include <stdlib.h> and <string.h> unconditionally.
22948         (iswcntrl, mbsinit, ISCNTRL): New macros.
22949         (mbsnwidth): Use K&R style function declarations.
22950         Don't bother checking for MB_LEN_MAX == 1, since the compiler
22951         can optimize it when MB_CUR_MAX == 1.
22952         The width of control characters is zero, not 1.
22953
22954 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22955
22956         The following changes are from gettext 0.10.39 as maintained by
22957         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
22958
22959         * m4/codeset.m4: Upgrade to serial AM1.
22960         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
22961         all uses changed.  Quote first arg of AC_DEFUN.
22962         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
22963
22964         * m4/iconv.m4: Upgrade to serial AM2.
22965         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
22966         Add --with-libconv-prefix.
22967         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
22968         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
22969         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
22970         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
22971         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
22972
22973         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
22974         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
22975         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
22976         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
22977         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
22978         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
22979         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
22980         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
22981         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
22982
22983         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
22984         string.h any more.
22985
22986         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
22987         not the default value.
22988
22989         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
22990         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
22991         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
22992         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
22993         Also check for iswcntrl, used for wcwidth fallback.
22994         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
22995         to Autoconf 2.13.
22996
22997 2001-08-03  Jim Meyering  <meyering@lucent.com>
22998
22999         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
23000         as it was in the original.  Reported by Paul Eggert.
23001
23002 2001-07-16  Jim Meyering  <meyering@lucent.com>
23003
23004         * m4/gettimeofday.m4: New file.
23005         Prompted by a report from Bernhard Baehr.
23006
23007 2001-07-15  Jim Meyering  <meyering@lucent.com>
23008
23009         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
23010         stuff. Now it's in ../Makefile.cfg.
23011
23012 2001-07-15  Jim Meyering  <meyering@lucent.com>
23013
23014         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
23015         (BUILT_SOURCES): Add unlocked-io.h.
23016         (io_functions): Define.
23017         (unlocked-io.h): New rule.
23018         (DISTCLEANFILES): Add unlocked-io.h.
23019         (all-local): Depend on unlocked-io.h, to ensure it is created.
23020
23021         * lib/unlocked-io.hin: New file
23022
23023         * lib/regex.c: Update from glibc.
23024
23025 2001-07-05  Jim Meyering  <meyering@lucent.com>
23026
23027         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
23028         recommendation.
23029         (libfetish_a_SOURCES): Put all .h files here instead.
23030         Remove a thus-exposed (better checks in automake) duplicate and
23031         two unnecessary .h files.
23032
23033 2001-07-04  Jim Meyering  <meyering@lucent.com>
23034
23035         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
23036         that generates jm-glibc-io.m4 so that it doesn't trigger any make
23037         distcheck failure.
23038
23039 2001-07-02  Jim Meyering  <meyering@lucent.com>
23040
23041         The following changes were prompted by suggestions from Bruno Haible.
23042
23043         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
23044         is now generated.
23045         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
23046         definition of EXTRA_DIST.
23047         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
23048         ensure that the generated file is created/updated whenever the list
23049         of $(unlocked_functions) is changed.
23050         (jm-glibc-io.m4): New rule.
23051         (unlocked-io.h): New rule -- currently unused.
23052
23053 2001-06-24  Jim Meyering  <meyering@lucent.com>
23054
23055         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
23056         unmatched right bracket, rather than kludging it with an extra,
23057         falsely-matching quote in a comment.  Patch by Akim Demaille.
23058
23059 2001-06-11  Jim Meyering  <meyering@lucent.com>
23060
23061         * lib/regex.c: Update from GNU libc.
23062
23063 2001-05-27  Jim Meyering  <meyering@lucent.com>
23064
23065         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
23066         Check for ut_type in struct utmp.
23067
23068 2001-05-27  Jim Meyering  <meyering@lucent.com>
23069
23070         * lib/readutmp.h (UT_TYPE): Define.
23071
23072 2001-05-24  Jim Meyering  <meyering@lucent.com>
23073
23074         * lib/argmatch.c: Include "quote.h".
23075         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
23076         quote function.  Reported by Göran Uddeborg.
23077
23078 2001-05-22  Jim Meyering  <meyering@lucent.com>
23079
23080         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23081         now that we use the package-supplied version unconditionally.
23082         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23083
23084 2001-05-21  Jim Meyering  <meyering@lucent.com>
23085
23086         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23087         shell syntax errors.
23088
23089 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23090
23091         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23092
23093 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23094
23095         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23096         Don't bother to check library strftime, since
23097         we'll be using our own my_strftime function anyway.
23098         Define my_strftime instead of strftime.
23099
23100 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23101
23102         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23103         which is not yet declared.
23104
23105 2001-05-15  Jim Meyering  <meyering@lucent.com>
23106
23107         * m4/regex.m4: Use proper quoting so brackets appear in the test
23108         program.
23109         Reported by, and with help from, Bruno Haible.
23110
23111 2001-05-13  Jim Meyering  <meyering@lucent.com>
23112
23113         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23114         undefined.
23115
23116 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23117
23118         dirname code cleanup.  base_name now behaves more compatibly
23119         with POSIX basename when given file names that have trailing
23120         slashes, and similarly for dir_name.  Add new primitives
23121         base_len and dir_len.  Put the directory-name-related decls
23122         into dirname.h.
23123
23124         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
23125         * lib/backupfile.c (base_name): Likewise.
23126         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
23127         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
23128         * lib/makepath.c (strip_trailing_slashes): Likewise.
23129         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
23130         ISSLASH): Likewise.
23131         * lib/rename.c (strip_trailing_slashes): Likewise.
23132         * lib/same.c (base_name): Likewise.
23133         * lib/stripslash.c (ISSLASH): Likewise.
23134
23135         * lib/addext.c: Include <dirname.h> after size_t is defined.
23136         * lib/backupfile.c: Likewise.
23137
23138         * lib/addext.c (addext): Use base_len to trim redundant
23139         trailing slashes instead of doing it ourselves.
23140         But do not trim the last slash if it is not redundant.
23141
23142         * lib/backupfile.c (find_backup_file_name,
23143         max_backup_version): Use base_len instead of rolling it ourselves.
23144         Handle the case of "" and (on DOS) "C:" correctly.
23145
23146         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
23147         needed. Include <string.h>, <dirname.h>.
23148         (base_name): Allow file names ending in slashes, other than names
23149         that are all slashes.  In this case, return the basename followed
23150         by the slashes.  This is more general, and can be used in places
23151         where the original base_name purposely had an assertion failure.
23152         (base_len): New function.
23153
23154         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
23155         Do not include <assert.h>; no longer needed.
23156         Include xalloc.h.
23157         (memrchr): Remove decl.
23158         (dir_name_r): Remove.
23159         (dir_len): Renamed from dirlen.  All callers changed.
23160         Rewrite in terms of base_name, for simplicity and consistency.
23161         (dir_name): Never return NULL.  All callers changed.
23162         Do not include <stdlib.h> in test program; no longer needed.
23163         return 0; is fine for test program.
23164
23165         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
23166         New macros.
23167         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
23168
23169         * lib/path-concat.c (path_concat): Use base_len to compute
23170         base length, not strlen; this means we cannot rely on memcpy
23171         to null-terminate.
23172
23173         * lib/same.c (STREQ): Remove.
23174         (same_name): Handle the case where the basename ends in trailing '/'.
23175
23176         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
23177         a slash was stripped.  Do not strip the last slash after a
23178         file system prefix.
23179
23180 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23181
23182         * lib/Makefile.am (libfetish_a_SOURCES):
23183         Add strftime.c, since we now compile it on all hosts.
23184
23185         * lib/strftime.c (my_strftime):
23186         Define to nstrftime if emacs, but only if my_strftime is not defined.
23187         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
23188         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
23189         Add one more extra argument: a nanoseconds value.
23190         All uses changed.
23191         (ns): New macro.
23192         (my_strftime function): Add %N format.
23193         (emacs_strftimeu): Renamed from emacs_strftime,
23194         with extra ut argument.
23195
23196 2001-05-09  Paul Eggert  <eggert@twinsun.com>
23197
23198         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
23199
23200 2001-04-21  Jim Meyering  <meyering@lucent.com>
23201
23202         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
23203         doesn't interfere.
23204
23205 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23206
23207         * m4/ftruncate.m4: Check for chsize.
23208         Link with ftruncate.o unconditionally if ftruncate is missing.
23209         This was required when cross-compiling to i586-mingw32msvc.
23210
23211 2001-04-08  Jim Meyering  <meyering@lucent.com>
23212
23213         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
23214         recomputed; that's necessary when the offset spans a DST transition.
23215         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
23216
23217 2001-04-02  Jim Meyering  <meyering@lucent.com>
23218
23219         * lib/regex.h, regex.c: Update from GNU libc.
23220
23221 2001-03-24  Jim Meyering  <meyering@lucent.com>
23222
23223         * m4/jm-macros.m4: Require autoconf-2.49d.
23224
23225 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
23226
23227         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
23228
23229 2001-03-19  Paul Eggert  <eggert@twinsun.com>
23230
23231         * lib/version-etc.c (version_etc_copyright): Update to 2001.
23232
23233 2001-03-17  Jim Meyering  <meyering@lucent.com>
23234
23235         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
23236         now that the version in autoconf is equivalent.
23237         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
23238
23239         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
23240         Suggestion from Akim Demaille.
23241
23242         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
23243         (jm_PREREQ_TEMPNAME): New function.
23244
23245 2001-03-16  Paul Eggert  <eggert@twinsun.com>
23246
23247         * lib/tempname.c (uint64_t): Define to uintmax_t if
23248         not defined, and if UINT64_MAX is not defined.
23249         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
23250         Reported by John David Anglin.
23251
23252 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
23253
23254         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
23255         resolve alias if codeset is empty.
23256         * lib/config.charset (BeOS): Use wildcard syntax.
23257
23258 2001-03-13  Jim Meyering  <meyering@lucent.com>
23259
23260         * lib/path-concat.c (path_concat)
23261         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
23262         concatenating e.g., `C:' and `foo'.
23263         From Bruno Haible.
23264
23265 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23266
23267         * lib/localcharset.c (locale_charset): Don't use
23268         setlocale(LC_CTYPE,NULL). Don't return NULL.
23269         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
23270
23271 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23272
23273         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
23274         support for DOS/DJGPP.
23275
23276 2001-03-01  Paul Eggert  <eggert@twinsun.com>
23277
23278         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
23279         lacks mkstemp.  Compile our own tempname.c if we compile our own
23280         mkstemp.c, as mkstemp relies on tempname.
23281
23282 2001-03-01  Jim Meyering  <meyering@lucent.com>
23283
23284         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
23285         AH_VERBATIM really does output its argument verbatim.
23286
23287 2001-02-28  Paul Eggert  <eggert@twinsun.com>
23288
23289         * lib/Makefile.am (libfetish_a_SOURCES):
23290         Add dup-safer.c, fopen-safer.c.
23291         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
23292
23293         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
23294         * lib/unistd-safer.h: New files.
23295
23296 2001-02-25  Paul Eggert  <eggert@twinsun.com>
23297
23298         The mkstemp replacement is taken from glibc 2.2.2, with some
23299         portability fixes for use outside glibc, as follows:
23300
23301         * lib/tempname.c (struct_stat64): New macro.
23302         (direxists, __gen_tempname): Use it.
23303         This avoids a portability problem with Solaris 8.
23304
23305         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
23306         (<stddef.h>, <stdint.h>, <string.h>):
23307         Include only if STDC_HEADERS || _LIBC.
23308         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
23309         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
23310         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
23311         (__set_errno): Define this macro if <errno.h> doesn't.
23312         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
23313         Define these macros if <stdio.h> doesn't.
23314         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
23315         Define these macros if <sys/stat.h>
23316         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
23317         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
23318         __xstat64): Define if not _LIBC.
23319         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
23320         (__gen_tempname): Invoke gettimeofday only if
23321         HAVE_GETTIMEOFDAY || _LIBC;
23322         otherwise, fall back on plain "time".
23323         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
23324
23325         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
23326
23327         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
23328
23329 2001-02-18  Paul Eggert  <eggert@twinsun.com>
23330
23331         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
23332
23333 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23334
23335         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
23336         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
23337         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
23338         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23339
23340 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23341
23342         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
23343         Remove workaround macros for hosts that have mbrtowc but not
23344         mbstate_t, as we now insist on proper declarations for both
23345         before using mbrtowc.
23346
23347 2001-02-17  Jim Meyering  <meyering@lucent.com>
23348
23349         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
23350         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23351         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23352         UnixWare 7.1.1.
23353
23354         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23355         rather than AC_CACHE_VAL.
23356
23357 2001-02-17  Jim Meyering  <meyering@lucent.com>
23358
23359         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23360         around included file name.
23361
23362         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23363
23364         * lib/strftime.c: Update from GNU libc (the only changes were to
23365         comments).
23366
23367 2001-02-17  Jim Meyering  <meyering@lucent.com>
23368
23369         * lib/regex.c: Update from libc.
23370
23371 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23372
23373         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23374         clash.
23375
23376 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23377
23378         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23379         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23380         Reported by Mark Hounschell via Paul Eggert.
23381
23382 2001-02-07  Jim Meyering  <meyering@lucent.com>
23383
23384         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23385
23386 2001-02-05  Jim Meyering  <meyering@lucent.com>
23387
23388         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23389         it includes the patch required for `large file' support with at least
23390         HP-UX's 10.20 /bin/cc.
23391
23392 2001-02-03  Jim Meyering  <meyering@lucent.com>
23393
23394         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23395         AS_IF, now that it works once again (mysteriously).
23396         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23397
23398 2001-01-30  Jim Meyering  <meyering@lucent.com>
23399
23400         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23401         * m4/chown.m4: Rename conftestchown to conftest.chown.
23402         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23403         s/conftestdir2/conftest.d2/.
23404         * m4/utimes.m4: s/conftestdata/conftest.data/
23405         Inspired by Pavel Roskin's change in autoconf.
23406
23407 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23408
23409         * lib/config.charset: Update for FreeBSD 4.2.
23410
23411 2001-01-27  Jim Meyering  <meyering@lucent.com>
23412
23413         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23414         a use of AS_IF.
23415         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23416
23417 2001-01-26  Jim Meyering  <meyering@lucent.com>
23418
23419         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23420         quotearg.c includes it.
23421
23422 2001-01-26  Jim Meyering  <meyering@lucent.com>
23423
23424         * lib/quotearg.c: Include stddef.h.
23425         * lib/quote.c: Include stddef.h.
23426         Reported by Axel Kittenberger.
23427
23428         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23429         line in double quotes so that it evokes a better diagnostic.
23430         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23431         Reported by Axel Kittenberger.
23432
23433 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23434
23435         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23436         as if it was a `charset'.
23437
23438 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23439
23440         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23441         has const.
23442
23443 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23444
23445         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23446         to avoid a warning.  Add back 'const' to inptr.
23447
23448 2001-01-20  Jim Meyering  <meyering@lucent.com>
23449
23450         Be sure that headers are checked before used in code compiled
23451         for the type checks.
23452         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23453         In place of that, invoke jm_CHECK_ALL_TYPES.
23454         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23455         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23456         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23457         The check for ssize_t was mistakenly run before the test for unistd.h.
23458
23459         The configure-time check for stdbool.h was missing.
23460         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23461         (jm_PREREQ_HASH): New function.
23462
23463 2001-01-17  Jim Meyering  <meyering@lucent.com>
23464
23465         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23466         for autoconf-2.49c.
23467         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23468
23469 2001-01-16  Jim Meyering  <meyering@lucent.com>
23470
23471         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23472         From Bruno Haible.
23473
23474 2001-01-14  Jim Meyering  <meyering@lucent.com>
23475
23476         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23477         foo and bar.  Create conftestdir/ in the script, not in the C code.
23478         Remove directories in the script, not in the C code.
23479         Remove conftestdir{,2} before trying to create the directory.
23480         Make the entire configure script fail if the mkdir fails.
23481
23482 2001-01-14  Jim Meyering  <meyering@lucent.com>
23483
23484         * lib/rename.c: New file.  From Volker Borchert.
23485         Include stdlib.h, string.h or strings.h, and xalloc.h.
23486         Use strip_trailing_slashes rather than open-coding it.
23487
23488 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23489
23490         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
23491
23492 2001-01-03  Jim Meyering  <meyering@lucent.com>
23493
23494         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
23495         of local `inptr' to avoid warning with some system declarations of
23496         iconv.
23497
23498 2001-01-02  Volker Borchert  <bt@teknon.de>
23499
23500         * m4/rename.m4: New file.
23501         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23502
23503 2001-01-01  Jim Meyering  <meyering@lucent.com>
23504
23505         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23506         even on systems with utmpx.h.  It's necessary for the declaration of
23507         utmp's ut_user member.  Reported by Andreas Jaeger.
23508
23509         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23510         available. They are required for the declarations of getgrgid and
23511         getpwuid resp.
23512         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23513         Reported by Andreas Jaeger.
23514
23515 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
23516
23517         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
23518         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
23519         so `make install' also works in VPATH builds.
23520
23521 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
23522
23523         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
23524         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
23525         can be used in subdirectories.
23526
23527 2000-12-29  Paul Eggert  <eggert@twinsun.com>
23528
23529         * lib/modechange.c: Do not assume that mode_t uses the
23530         traditional octal encoding.  E.g. "chmod 1 FOO" should set
23531         the other-execute bit of FOO even if S_IXOTH != 1.
23532
23533         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23534         WOTH, XOTH, ALLM): New macros.
23535         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
23536          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
23537         Use them.
23538         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
23539         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
23540         (mode_compile):
23541         No need to use uintmax_t; unsigned long is long enough.
23542         Don't bother to get suffix since we don't use it.
23543
23544 2000-12-26  Jim Meyering  <meyering@lucent.com>
23545
23546         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
23547         better with autoheader.
23548
23549 2000-12-24  Jim Meyering  <meyering@lucent.com>
23550
23551         * lib/hash.c (is_prime): Return explicit boolean values.
23552         (hash_get_first): Return NULL to appease Irix5.6's 89.
23553         Reported by Nelson Beebe.
23554
23555 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
23556
23557         * lib/localcharset.c (locale_charset): Add support for Win32.
23558
23559 2000-12-18  Paul Eggert  <eggert@twinsun.com>
23560
23561         * lib/physmem.h, lib/physmem.c: New files.
23562
23563         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23564         (noinst_HEADERS): Add physmem.h.
23565
23566         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23567         't' for compatibility with Solaris 8 sort.
23568
23569 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23570
23571         * lib/config.charset: Add support for BeOS.
23572
23573 2000-12-17  Jim Meyering  <meyering@lucent.com>
23574
23575         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23576         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23577
23578 2000-12-16  Jim Meyering  <meyering@lucent.com>
23579
23580         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23581         N and M) would have treated it like `chown N:N FILE'.
23582
23583         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23584
23585 2000-12-16  Jim Meyering  <meyering@lucent.com>
23586
23587         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23588         SHELLS_FILE to a file name that's useful on djgpp systems.
23589         Include stdlib.h.
23590         (ADDITIONAL_DEFAULT_SHELLS): Define.
23591         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23592         Based mostly on a patch from Prashant TR.
23593
23594 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23595
23596         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23597         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23598         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23599
23600 2000-12-08  Andreas Schwab  <schwab@suse.de>
23601
23602         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23603         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23604
23605 2000-12-07  Jim Meyering  <meyering@lucent.com>
23606
23607         * lib/stripslash.c (ISSLASH): Define.
23608         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23609         `/'.
23610         From Prashant TR.
23611
23612         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23613         (dir_name_r): Declare this function as static.
23614         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23615         manifest itself on a name containing a mix of slashes and
23616         backslashes.
23617         Make this function work with names starting with a DOS-style
23618         drive letter and colon prefix.
23619         (dir_name): Append `.' if necessary.
23620         Based mostly on patches from Prashant TR and Eli Zaretskii.
23621
23622         * lib/dirname.h (dir_name_r): Remove prototype.
23623
23624 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23625
23626         * m4/off_t-format.m4: Remove this file.
23627         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23628
23629 2000-12-06  Jim Meyering  <meyering@lucent.com>
23630
23631         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23632         replacement strtoull, we may well need the replacement strtoul, too.
23633         Check for declarations of strtoul and strtoull.
23634         Check for strtol.  Mainly as a cue to cause automake to include
23635         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23636         Check for limits.h -- strtol.c needs it.
23637
23638 2000-12-05  Jim Meyering  <meyering@lucent.com>
23639
23640         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23641
23642 2000-12-04  Jim Meyering  <meyering@lucent.com>
23643
23644         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23645         Also include memory.h, stdlib.h, unistd.h if appropriate.
23646         Reported by Andreas Jaeger (conflicting declaration of malloc).
23647
23648 2000-12-02  Jim Meyering  <meyering@lucent.com>
23649
23650         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23651         * m4/jm-macros.m4 (jm_MACROS): require it.
23652
23653 2000-12-02  Jim Meyering  <meyering@lucent.com>
23654
23655         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23656
23657 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23658
23659         * lib/memrchr.c: Include <config.h> before any system include file.
23660
23661 2000-11-30  Jim Meyering  <meyering@lucent.com>
23662
23663         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23664
23665 2000-11-30  Jim Meyering  <meyering@lucent.com>
23666
23667         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23668
23669 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23670
23671         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23672
23673 2000-11-26  Jim Meyering  <meyering@lucent.com>
23674
23675         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23676
23677 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23678
23679         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23680         size of (size_t) -1; it's not portable.
23681
23682 2000-11-17  Jim Meyering  <meyering@lucent.com>
23683
23684         * lib/strstr.c: Update from GNU libc.
23685
23686 2000-11-17  Akim Demaille  <akim@epita.fr>
23687
23688         * lib/obstack.h: Formatting changes.
23689         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23690         prevent type checking.
23691         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23692         cast the value to (void *): assigning a `foo *' to a `void *'
23693         variable is valid.
23694         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23695
23696 2000-11-16  Jim Meyering  <meyering@lucent.com>
23697
23698         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23699
23700 2000-11-11  Jim Meyering  <meyering@lucent.com>
23701
23702         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23703
23704 2000-11-10  Jim Meyering  <meyering@lucent.com>
23705
23706         * lib/obstack.h: Update from GNU libc.
23707         * lib/obstack.c: Likewise.
23708
23709 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23710
23711         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23712
23713 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23714
23715         * lib/getusershell.c (setusershell): Use rewind rather than
23716         fseek/fseeko, to avoid configuration hassles with fseeko.
23717         Don't bother opening SHELLS_FILE if shellstream is NULL;
23718         it's not necessary.
23719
23720 2000-11-05  Jim Meyering  <meyering@lucent.com>
23721
23722         * lib/makepath.h (make_dir): Declare.
23723         * lib/makepath.c (make_dir): Remove `static' attribute.
23724         Tweak a comment.
23725
23726 2000-11-04  Jim Meyering  <meyering@lucent.com>
23727
23728         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23729
23730 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23731
23732         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23733         last one in a bucket, advance to the next bucket.
23734
23735 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23736
23737         * lib/fnmatch.c: Do not comment out all the code if we are using
23738         the GNU C library, because in some cases we are replacing buggy
23739         code in the GNU C library itself.
23740
23741 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23742
23743         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23744         (regex_compile): Catch bogus \(\1\).
23745
23746 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23747
23748         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23749         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23750         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23751
23752 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23753
23754         * lib/error.h, getline.h, modechange.h:
23755         Remove "2000" from Copyright line, as the file hasn't been
23756         changed this year other than in the copyright notice.
23757
23758         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23759         was changed this year.
23760
23761 2000-10-29  Jim Meyering  <meyering@lucent.com>
23762
23763         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23764         renaming.
23765         * m4/ls-mntd-fs.m4: Likewise
23766
23767 2000-10-29  Jim Meyering  <meyering@lucent.com>
23768
23769         * lib/xstat.in: Fix grammar in comment.
23770
23771 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23772
23773         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23774         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23775         doesn't define __restrict_arr.
23776
23777 2000-10-28  Jim Meyering  <meyering@lucent.com>
23778
23779         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23780         (jm_PREREQ_MEMCHR): New function.
23781
23782 2000-10-28  Jim Meyering  <meyering@lucent.com>
23783
23784         * lib/memchr.c: Update from libc.
23785         Adjust for portability:
23786         [HAVE_STDLIB_H]: Include stdlib.h.
23787         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23788         Undef __memchr, too.
23789         [!weak_alias]: Define __memchr to memchr.
23790
23791         * lib/regex.c: Update from libc.
23792         * lib/regex.h: Likewise.
23793         * lib/getopt1.c: Likewise.
23794         * lib/memcmp.c: Likewise.
23795
23796         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23797         Avoid using fseek, when possible -- it's broken by design.
23798         Patch by Ulrich Drepper.
23799
23800 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23801
23802         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23803         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23804         Giving in to popular pressure to shut up the compiler with casts.
23805
23806 2000-10-26  Jim Meyering  <meyering@lucent.com>
23807
23808         * lib/strftime.c: Update from libc.
23809
23810 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23811
23812         * regex.c: More `unsigned char' -> `re_char' changes.
23813         Also change several `int' into `re_wchar_t'.
23814         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23815         (PUSH_FAILURE_POINTER): Don't cast any more.
23816         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23817         We want GCC to complain, since this piece of code makes
23818         re_match non-reentrant, which *should* be fixed.
23819         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23820         (EXTEND_BUFFER): Use RETALLOC.
23821         (SET_LIST_BIT): Don't cast.
23822         (re_wchar_t): New type.
23823         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23824         that those two functions will always properly return.
23825         (IMMEDIATE_QUIT_CHECK): Cast to void.
23826         (analyse_first): Use recursion rather than an explicit stack.
23827         (re_compile_fastmap): Can't fail anymore.
23828         (re_search_2): Don't check re_compile_fastmap for failure.
23829         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
23830         Now also sets the new value (passed in a new argument).
23831         (re_match_2_internal): Use it.
23832         Also, use a new var `reg' of type size_t when looping through regs
23833         rather than reuse the inappropriate `mcnt'.
23834
23835 2000-10-25  Jim Meyering  <meyering@lucent.com>
23836
23837         * lib/obstack.c: Update from libc.
23838
23839 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
23840
23841         * regex.c (regex_compile): Change the way of handling a range from
23842         a char less than 256 to a char not less than 256.
23843
23844 2000-10-24  Andrew Innes  <andrewi@gnu.org>
23845
23846         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
23847         NT-Emacs only.
23848         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
23849         so that re_search functions only quit when callers expect them to.
23850
23851 2000-10-23  Jim Meyering  <meyering@lucent.com>
23852
23853         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
23854         wrong.  That set_locale call must not have any side effects.
23855         From Paul Eggert.
23856
23857 2000-10-22  Jim Meyering  <meyering@lucent.com>
23858
23859         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
23860         [CYCLIC]: Remove now-unused definition.
23861
23862         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
23863         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
23864         Suggestion from Ulrich Drepper.
23865
23866 2000-10-21  Jim Meyering  <meyering@lucent.com>
23867
23868         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
23869         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
23870         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
23871
23872 2000-10-21  Jim Meyering  <meyering@lucent.com>
23873
23874         * lib/dirname.c (memrchr): Declare if necessary.
23875         (dir_name): Remove the restriction that there be no
23876         trailing slashes.  Now, this code skips past them, effectively
23877         ignoring them.
23878         [TEST_DIRNAME] (main): New unit tests.
23879
23880         * lib/memrchr.c: New file from GNU libc.
23881         Undef __memrchr, too.
23882         [!weak_alias]: Define __memrchr to memrchr.
23883         Guard weak_alias use with `#ifdef weak_alias'.
23884
23885 2000-10-21  Jim Meyering  <meyering@lucent.com>
23886
23887         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
23888         (dir_name): Use dir_name_r.
23889         * lib/dirname.h (dir_name_r): Declare it.
23890
23891 2000-10-17  Jim Meyering  <meyering@lucent.com>
23892
23893         * lib/quote.h (PARAMS): Define and use.
23894         Reported by Akim Demaille.
23895
23896         * lib/getopt.c: Update from libc.
23897
23898 2000-10-16  Jim Meyering  <meyering@lucent.com>
23899
23900         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
23901         setlocale.
23902         From Jan Fedak.
23903
23904 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
23905
23906         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
23907
23908 2000-09-25  Jim Meyering  <meyering@lucent.com>
23909
23910         * lib/md5.h (rol): Define (from GnuPG).
23911
23912         * lib/sha.c: Give credit (GnuPG) where due.
23913         (M): Use rol rather than open-coding it.
23914         Add a FIXME comment.
23915
23916 2000-09-21  Jim Meyering  <meyering@lucent.com>
23917
23918         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
23919         Reported by Michael Stone.
23920
23921 2000-09-20  Jim Meyering  <meyering@lucent.com>
23922
23923         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
23924         (noinst_HEADERS): Add sha.h.
23925         Based on code from Scott G. Miller and from GnuPG.
23926
23927 2000-09-18  Jim Meyering  <meyering@lucent.com>
23928
23929         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
23930         LIBS. Otherwise, everyone ends up linking with -lelf for some
23931         configurations.
23932         Reported by Mike Stone.
23933
23934 2000-09-15  Jim Meyering  <meyering@lucent.com>
23935
23936         * lib/regex.c: Update from libc.
23937
23938 2000-09-10  Jim Meyering  <meyering@lucent.com>
23939
23940         * lib/getopt.c (_getopt_internal): Update from glibc.
23941
23942 2000-09-09  Jim Meyering  <meyering@lucent.com>
23943
23944         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
23945         think it should be used as a general replacement for isascii.
23946         * lib/fnmatch.c: Likewise.
23947         * lib/mbswidth.c: Likewise
23948         * lib/regex.c: Likewise.
23949
23950         Don't use atoi.
23951         * lib/userspec.c: Include sys/param.h and limits.h.
23952         Include xstrtol.h.
23953         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23954         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
23955         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
23956         UID, GID.  Check range.
23957
23958 2000-09-06  Jim Meyering  <meyering@lucent.com>
23959
23960         * lib/getopt.c (_getopt_internal): Update from glibc.
23961
23962 2000-08-30  Jim Meyering  <meyering@lucent.com>
23963
23964         * lib/strftime.c: Merge in changes from GNU libc.
23965
23966 2000-08-26  Jim Meyering  <meyering@lucent.com>
23967
23968         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
23969         * m4/fpending.m4: New file.
23970
23971 2000-08-26  Jim Meyering  <meyering@lucent.com>
23972
23973         * lib/closeout.c: Include "__fpending.h".
23974         (close_stdout_status): Return right away if there's nothing to flush.
23975
23976         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
23977         * lib/__fpending.c: New file.
23978         * lib/__fpending.h: New file.
23979
23980 2000-08-20  Jim Meyering  <meyering@lucent.com>
23981
23982         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
23983         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
23984         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
23985
23986 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
23987
23988         Improve fileutils installation on systems where running
23989         programs (like install) can't be unlinked.
23990         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
23991         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
23992
23993 2000-08-07  Paul Eggert  <eggert@twinsun.com>
23994
23995         Standardize on "memory exhausted" instead of "Memory exhausted"
23996         or "virtual memory exhausted".
23997         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
23998         "virtual memory exhausted".
23999         * lib/same.c (same_name): Invoke xalloc_die instead of printing
24000         our own message.
24001         * lib/userspec.c (parse_user_spec): Likewise.
24002         * lib/bumpalloc.h: comment fix
24003         * lib/same.c, userspec.c: Include xalloc.h.
24004
24005         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
24006         not char *const and pointing to a constant array.
24007         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
24008         (xrealloc): Comment fix.
24009
24010         * lib/userspec.c (parse_user_spec):
24011         Don't translate a message until just before returning,
24012         to avoid unnecessary translation.
24013
24014 2000-08-07  Jim Meyering  <meyering@lucent.com>
24015
24016         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
24017         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
24018         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
24019         getgroups.c, gethostname.c, getopt.h, group-member.c,
24020         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
24021         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
24022         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
24023         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
24024         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
24025         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
24026         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
24027         yesno.c: Back out Copyright date changes for each file with no change
24028         this year.  This eases coordination with other programs using the same
24029         source code modules.  From Paul Eggert.
24030
24031 2000-08-06  Paul Eggert  <eggert@twinsun.com>
24032
24033         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
24034         not char, for compatibility with glibc 2.1.3 strftime.c.
24035
24036 2000-08-03  Greg McGary  <greg@mcgary.org>
24037
24038         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
24039         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
24040         (EXTEND_BUFFER): Use them.
24041
24042 2000-08-01  Jim Meyering  <meyering@lucent.com>
24043
24044         * lib/dirname.c (ISSLASH): Define.
24045         (BACKSLASH_IS_PATH_SEPARATOR): Define.
24046         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
24047         both `\' and `/' may be use as path separators.
24048         Based on a patch from Prashant TR.
24049
24050 2000-07-31  Paul Eggert  <eggert@twinsun.com>
24051
24052         * lib/quotearg.c (quotearg_n_options): Don't make the initial
24053         slot vector a constant, since it might get modified.
24054
24055 2000-07-31  Jim Meyering  <meyering@lucent.com>
24056
24057         * lib/xmalloc.c: Use `virtual memory exhausted', not
24058         `Memory exhausted'.
24059         * lib/obstack.c (print_and_abort): Likewise.
24060
24061 2000-07-30  Paul Eggert  <eggert@twinsun.com>
24062
24063         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
24064         buffer, so that the caller can always quote one small
24065         component of a "memory exhausted" message in slot 0.
24066         From a suggestion by Jim Meyering.
24067
24068 2000-07-30  Jim Meyering  <meyering@lucent.com>
24069
24070         * lib/makepath.c (make_path): Quote the other instance, too.
24071
24072         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
24073         (STATIC_BUF_SIZE): Define.
24074         (quotearg_n_options): Use only statically allocated storage when
24075         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
24076         than STATIC_BUF_SIZE.
24077
24078 2000-07-29  Jim Meyering  <meyering@lucent.com>
24079
24080         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24081         * lib/dirname.c (dir_name): Likewise.
24082
24083         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24084         `/'.
24085
24086         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24087         (dir_name): Assert that there are no trailing slashes.
24088
24089 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24090
24091         * lib/mbswidth.h (mbswidth): Add a flags argument.
24092         (mbswidth): New declaration.
24093         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24094         * lib/mbswidth.c (mbswidth): Add a flags argument.
24095         (mbsnwidth): New function.
24096
24097 2000-07-24  Jim Meyering  <meyering@lucent.com>
24098
24099         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24100
24101 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24102
24103         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24104
24105 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24106
24107         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24108         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24109         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24110         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24111         invoke multibyte primitives.
24112
24113 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24114
24115         * lib/quotearg.c:
24116         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
24117         so that mbstate_t is always defined.
24118
24119         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
24120         be 1 in at least one GCC installation, and this configuration
24121         error is likely to be common.  Ignoring MB_LEN_MAX hurts
24122         performance on hosts that have mbrtowc but have only unibyte
24123         locales, but I assume these hosts are rare.
24124
24125 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24126
24127         * lib/mbswidth.c (_XOPEN_SOURCE):
24128         Don't define; this causes problems on Solaris 7.
24129         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
24130
24131 2000-07-23  Jim Meyering  <meyering@lucent.com>
24132
24133         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
24134         too: getgrgid, getpwuid, getuid.
24135
24136 2000-07-23  Jim Meyering  <meyering@lucent.com>
24137
24138         * lib/basename.c (base_name): Add an assertion.
24139
24140 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
24141
24142         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
24143         shadow its mbsinit function.
24144
24145 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24146
24147         * lib/mbswidth.h: New file.
24148         * lib/mbswidth.c: New file.
24149         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
24150         (noinst_HEADERS): Add mbswidth.h.
24151
24152 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24153
24154         * lib/config.charset: Add support for FreeBSD. Improve support for
24155         HP-UX and IRIX 6.
24156
24157 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
24158
24159         * m4/mbswidth.m4: New file.
24160         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
24161
24162 2000-07-15  Jim Meyering  <meyering@lucent.com>
24163
24164         * lib/makepath.c: Include quote.h.
24165         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
24166         corresponding argument in a `quote (...)' call.
24167         Give better diagnostics.
24168
24169         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
24170         (noinst_HEADERS): Add quote.h.
24171
24172         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
24173         from tar's src/misc.c.
24174         * lib/quote.h: New file.  Prototypes for same.
24175
24176 2000-07-14  Paul Eggert  <eggert@twinsun.com>
24177
24178         From a suggestion by Bruno Haible.
24179         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
24180         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
24181         to decide whether to define the BeOS workaround macro;
24182         this adjusts to the change to AC_MBSTATE_T.
24183
24184 2000-07-14  Jim Meyering  <meyering@lucent.com>
24185
24186         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
24187         jm_AC_TYPE_UINTMAX_T.
24188
24189 2000-07-13  Paul Eggert  <eggert@twinsun.com>
24190
24191         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
24192
24193         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
24194         quotearg_buffer_restyled): Add support for
24195         clocale_quoting_style.  Undo previous change to
24196         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
24197         and "{RIGHT QUOTATION MARK}" msgids.
24198
24199 2000-07-10  Paul Eggert  <eggert@twinsun.com>
24200
24201         From a suggestion by Bruno Haible.
24202         * m4/mbstate_t.m4 (AC_MBSTATE_T):
24203         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
24204         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
24205         and mbstate_t, to a single-part test that simply defines mbstate_t.
24206         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
24207         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
24208
24209 2000-07-10  Jim Meyering  <meyering@lucent.com>
24210
24211         * m4/strerror_r.m4: Mirror the correction made in autoconf.
24212
24213         * m4/gnu-source.m4: Output to confdefs.h directly.
24214         Suggestion from Akim Demaille.
24215
24216 2000-07-09  Paul Eggert  <eggert@twinsun.com>
24217
24218         The old behavior of quoting `like this' doesn't look good with
24219         newer, ISO-style fonts.  See:
24220         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
24221
24222         Instead, quote "like this" by default.  Let the translator
24223         tailor the locale-specific quoting behavior by providing
24224         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
24225
24226         * lib/quotearg.c (N_): New macro.
24227         (gettext_default): New function.
24228         (quotearg_buffer_restyled): Use
24229         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
24230         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
24231
24232 2000-07-09  Jim Meyering  <meyering@lucent.com>
24233
24234         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
24235         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
24236
24237         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
24238         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
24239
24240 2000-07-09  Jim Meyering  <meyering@lucent.com>
24241
24242         * lib/Most files: Update copyright dates to include 2000.
24243
24244 2000-07-08  Jim Meyering  <meyering@lucent.com>
24245
24246         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
24247         if not defined.
24248         (xgethostname): Remove now-unnecessary #ifdef.
24249         Move declaration of `err' into loop where it's used.
24250
24251 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24252         and Bruno Haible  <haible@clisp.cons.org>
24253
24254         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
24255         only if the test for an object-type mbstate_t fails.  This
24256         prevents us from mistakenly reporting that mbstate_t is a
24257         system object type after we "#define mbstate_t int" to work
24258         around its lack.
24259
24260 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24261         and Bruno Haible  <haible@clisp.cons.org>
24262
24263         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
24264
24265 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24266
24267         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
24268         to strerror_r.
24269         Include <ctype.h> for use of isalpha.
24270
24271 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24272
24273         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
24274         by allocating a larger buffer. Test the gethostname return value for
24275         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
24276         returns an error and ENAMETOOLONG isn't defined.
24277
24278 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24279
24280         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
24281         dimension.
24282
24283 2000-07-04  Jim Meyering  <meyering@lucent.com>
24284
24285         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
24286         of the deprecated AC_CHECKING.
24287
24288 2000-07-04  Jim Meyering  <meyering@lucent.com>
24289
24290         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
24291         Reported by Bruno Haible.
24292
24293 2000-07-04  Jim Meyering  <meyering@lucent.com>
24294
24295         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
24296         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
24297         lacks mbrtowc.
24298
24299 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24300
24301         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
24302         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
24303
24304 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24305         and Bruno Haible  <haible@clisp.cons.org>
24306
24307         * lib/quotearg.c (mbrtowc):
24308         Assign to *pwc, and return 1 only if result is nonzero.
24309         (iswprint): Use ISPRINT when substituting our own mbrtowc.
24310
24311 2000-07-03  Jim Meyering  <meyering@lucent.com>
24312
24313         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
24314
24315 2000-07-03  Jim Meyering  <meyering@lucent.com>
24316
24317         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
24318         This is necessary to get a definition of e.g., UTMP_FILE on
24319         HP-UX 10.20.
24320         From Bob Proulx.
24321
24322 2000-07-02  Jim Meyering  <meyering@lucent.com>
24323
24324         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
24325
24326         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
24327         AC_LIBOBJ(function_name).
24328         * m4/chown.m4: Likewise.
24329         * m4/fnmatch.m4: Likewise.
24330         * m4/ftruncate.m4: Likewise.
24331         * m4/getgroups.m4: Likewise.
24332         * m4/getline.m4: Likewise.
24333         * m4/group-member.m4: Likewise.
24334         * m4/jm-macros.m4: Likewise.
24335         * m4/lstat.m4: Likewise.
24336         * m4/malloc.m4: Likewise.
24337         * m4/memcmp.m4: Likewise.
24338         * m4/nanosleep.m4: Likewise.
24339         * m4/putenv.m4: Likewise.
24340         * m4/realloc.m4: Likewise.
24341         * m4/regex.m4: Likewise.
24342         * m4/stat.m4: Likewise.
24343         * m4/strftime.m4: Likewise.
24344
24345 2000-07-02  Jim Meyering  <meyering@lucent.com>
24346
24347         * lib/quotearg.c (mbstate_t): Don't define here.
24348
24349 2000-07-02  Jim Meyering  <meyering@lucent.com>
24350
24351         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24352
24353 2000-07-01  Jim Meyering  <meyering@lucent.com>
24354
24355         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24356
24357 2000-07-01  Jim Meyering  <meyering@lucent.com>
24358
24359         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24360         problem.
24361
24362 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24363
24364         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24365         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24366
24367 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24368
24369         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24370         per change in ../m4/ls-mntd-fs.m4.
24371         (read_filesystem_list): Ignore symbolic links.
24372
24373 2000-06-29  Jim Meyering  <meyering@lucent.com>
24374
24375         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24376         for declaration of strcmp.
24377
24378         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24379
24380         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24381         Avoid warning by casting result to `char *' to remove `const'.
24382
24383 2000-06-28  Jim Meyering  <meyering@lucent.com>
24384
24385         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24386         included by quotearg.c, for which we perform this test.  From
24387         Bruno Haible.
24388
24389 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24390
24391         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24392         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24393         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24394
24395 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24396
24397         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24398
24399 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24400
24401         savedir now sets errno on failure and invokes xmalloc to get memory.
24402         Fix a couple of other minor bugs while we're at it.
24403
24404         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24405         (NAMLEN): Remove macro.
24406         (malloc, realloc): Remove decls.
24407         (stpcpy): Likewise.
24408         ("xalloc.h"): Include.
24409         (NAME_SIZE_DEFAULT): New macro.
24410         (savedir): Use xmalloc / xrealloc to allocate memory.
24411         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24412         Skip "" directory entries.
24413         Use strlen to calculate directory entry length, since the old method
24414         is rarely used these days and isn't worth supporting.
24415         Don't use a pointer after freeing it.
24416         Check for integer overflow when calculating allocation size.
24417         Use memcpy to copy entries, instead of stpcpy.
24418         Set errno properly when returning NULL.
24419         Check for readdir error.
24420
24421 2000-06-26  Jim Meyering  <meyering@lucent.com>
24422
24423         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24424
24425 2000-06-25  Jim Meyering  <meyering@lucent.com>
24426
24427         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24428         Linux header bug when _XOPEN_SOURCE is defined to 500.
24429
24430 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24431
24432         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24433         deficiency.
24434
24435 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24436
24437         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24438         Include xalloc.h.
24439         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24440
24441 2000-06-24  Jim Meyering  <meyering@lucent.com>
24442
24443         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24444         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24445         for which strerror does return char*, but which lacks a conveniently
24446         accessible declaration of the function.  If the compile-test says
24447         strerror_r doesn't work, then resort to a `run'-test that works on
24448         BeOS and segfaults on DEC Unix.
24449
24450 2000-06-24  Jim Meyering  <meyering@lucent.com>
24451
24452         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24453
24454 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24455
24456         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24457         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24458
24459 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24460
24461         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24462         (mbrtowc, mbstate_t): Define substitutes if
24463         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24464         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24465         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24466
24467 2000-06-23  Jim Meyering  <meyering@lucent.com>
24468
24469         * m4/afs.m4: Add missing AC_MSG_RESULT.
24470         Reported by Bruno Haible.
24471
24472         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24473         Suggestion from Bruno Haible.
24474
24475 2000-06-23  Jim Meyering  <meyering@lucent.com>
24476
24477         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24478
24479 2000-06-21  Jim Meyering  <meyering@lucent.com>
24480
24481         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24482
24483 2000-06-21  Jim Meyering  <meyering@lucent.com>
24484
24485         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24486         (noinst_HEADERS): Add getstr.h.
24487
24488         * lib/getline.c (getstr): Move into a separate file.
24489         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24490         the following changes: new parameter, delim2; both delim[12]
24491         parameters have type `int', not `char'.  The latter would lose
24492         with 8-bit delimiters.
24493         * lib/getstr.h: New file.
24494
24495 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24496
24497         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24498         than 1024, return a memory chunk of least possible size, instead
24499         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24500         Use free/xmalloc instead of xrealloc to avoid copying for very long
24501         paths.
24502
24503 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24504
24505         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24506         the empty string.
24507
24508 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24509
24510         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24511         address, not strdup.  Include <stdlib.h> and don't declare free().
24512
24513 2000-06-19  Jim Meyering  <meyering@lucent.com>
24514
24515         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
24516
24517 2000-06-18  Jim Meyering  <meyering@lucent.com>
24518
24519         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
24520
24521         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
24522         `checking whether...' message to be consistent with that of the
24523         lstat test.
24524
24525 2000-06-18  Jim Meyering  <meyering@lucent.com>
24526
24527         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
24528         Besides, these days every porting target provides a mkdir function.
24529
24530         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
24531         needed. (this snippet comes from src/system.h).
24532
24533 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
24534
24535         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
24536
24537 2000-06-15  Paul Eggert  <eggert@twinsun.com>
24538
24539         * lib/human.c (adjust_value): New function.
24540         (human_readable_inexact): Apply rounding style even when
24541         printing approximate values.
24542
24543 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24544
24545         * lib/human.c (human_readable_inexact): Allow an input block
24546         size that is not a multiple of the output block size, and vice versa.
24547         Reported by Piergiorgio Sartor.
24548
24549 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24550
24551         * lib/getdate.y (get_date): Apply relative times after time
24552         zone indicator, not before.  Reported by Todd A. Jacobs.
24553
24554 2000-06-13  Jim Meyering  <meyering@lucent.com>
24555
24556         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
24557
24558         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
24559
24560 2000-06-12  Paul Eggert  <eggert@twinsun.com>
24561
24562         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24563
24564 2000-06-12  Jim Meyering  <meyering@lucent.com>
24565
24566         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24567         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24568         optional argument.
24569         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24570         the optional argument, `lib'.
24571
24572 2000-06-08  Jim Meyering  <meyering@lucent.com>
24573
24574         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24575
24576 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24577
24578         Rewrite largefile configuration so that we don't need to run
24579         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24580         AC_CANONICAL_HOST in configure.in -- jmm]
24581
24582         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24583         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24584         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24585         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24586         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24587         All uses changed.
24588         Instead of inspecting the output of getconf, try to compile the
24589         test program without and with the macro definition.
24590         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24591         for getconf.  Instead, check for the needed flags by compiling
24592         test programs.
24593
24594 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24595
24596         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24597
24598 2000-06-04  Jim Meyering  <meyering@lucent.com>
24599
24600         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24601         SunOS 4.1.4 for which gid_t is an unsigned type.
24602
24603 2000-06-03  Jim Meyering  <meyering@lucent.com>
24604
24605         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24606         now that autoconf requires that.
24607
24608         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24609         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24610         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24611
24612 2000-06-03  Jim Meyering  <meyering@lucent.com>
24613
24614         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24615
24616 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24617
24618         * m4/glibc21.m4: New file.
24619         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24620
24621 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24622
24623         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24624         newer, don't install charset.alias.
24625         * lib/config.charset: Change the Linux/glibc rules so they become empty
24626         on glibc-2.1 or newer.
24627
24628 2000-06-02  Jim Meyering  <meyering@lucent.com>
24629
24630         * lib/mountlist.c: Back out last change.  Instead, do this...
24631         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24632         me_dummy member using the same `ignore'-testing code.
24633         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24634         fs_type strings.
24635         From Mark D. Roth.
24636
24637 2000-05-29  Jim Meyering  <meyering@lucent.com>
24638
24639         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24640         mounts with the `ignore' attribute.  Based on a patch from
24641         Mark D. Roth.
24642
24643 2000-05-28  Jim Meyering  <meyering@lucent.com>
24644
24645         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24646         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24647         * m4/stat.m4: Likewise.
24648         * m4/lstat.m4: Likewise.
24649         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24650
24651         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24652         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24653
24654 2000-05-26  Jim Meyering  <meyering@lucent.com>
24655
24656         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24657
24658 2000-05-24  Jim Meyering  <meyering@lucent.com>
24659
24660         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24661         autoconf requires that.
24662         * m4/lib-check.m4: Likewise.
24663         * m4/jm-macros.m4: Likewise.
24664         * m4/strftime.m4: Likewise.
24665
24666         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24667         AC_CHECK_DECLS, now that autoconf requires that.
24668
24669 2000-05-22  Jim Meyering  <meyering@lucent.com>
24670
24671         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24672         * m4/lstat.m4: Likewise.
24673
24674 2000-05-22  Jim Meyering  <meyering@lucent.com>
24675
24676         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24677
24678 2000-05-20  Jim Meyering  <meyering@lucent.com>
24679
24680         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24681         (jm_PREREQ): Use it.
24682
24683 2000-05-18  Jim Meyering  <meyering@lucent.com>
24684
24685         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24686         back, too, since it may have been modified by allocate_entry.
24687         (hash_delete): Rewrite to use neither the assignment operator
24688         nor the comma operator in an if-expression.
24689
24690 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24691
24692         * lib/closeout.c:
24693         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24694         Remove; no longer needed.
24695         "quotearg.h": Add include.
24696         (file_name): Do not bother to explicitly initialize to NULL; it's less
24697         efficient on some hosts.
24698         (close_stdout_status): Remove test as to whether stdout was already
24699         closed; it breaks for the case "echo x | sort >&-".
24700         Quote file name colons.
24701         Do not assume that _("write error") lacks format strings.
24702
24703 2000-05-15  Jim Meyering  <meyering@lucent.com>
24704
24705         * lib/version-etc.c (version_etc_copyright): Update the copyright
24706         string used in all --version output.
24707
24708 2000-05-14  Jim Meyering  <meyering@lucent.com>
24709
24710         * lib/closeout.c (close_stdout_set_file_name): New function.
24711         (close_stdout_status): Use new file-scoped global.
24712         Return right away if fstat says the stdout file descriptor is invalid.
24713         * lib/closeout.h (close_stdout_set_file_name): Declare.
24714
24715 2000-05-10  Jim Meyering  <meyering@lucent.com>
24716
24717         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24718         (close_stdout_set_status): New function.
24719         * lib/closeout.h (close_stdout_set_status): Declare.
24720
24721 2000-05-09  Jim Meyering  <meyering@lucent.com>
24722
24723         * m4/gettext.m4: Rename this...
24724         * m4/libintl.m4: ...to this.
24725
24726 2000-05-08  Jim Meyering  <meyering@lucent.com>
24727
24728         * lib/long-options.c: Don't include closeout.h.
24729         (parse_long_options): Don't call close_stdout for --version.
24730
24731 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24732
24733         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24734         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24735         2.1.3 bug.  This avoids a clash when files like regex.c define
24736         _GNU_SOURCE.
24737
24738 2000-05-06  Jim Meyering  <meyering@lucent.com>
24739
24740         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24741         (AC_REPLACE_FUNCS): Add strnlen.
24742
24743         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24744         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24745
24746         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24747         AC_SEARCH_LIBS call for nanosleep.
24748         (LIB_NANOSLEEP): Set and AC_SUBST.
24749
24750 2000-05-06  Jim Meyering  <meyering@lucent.com>
24751
24752         * lib/strnlen.c: Undefine __strnlen and strnlen.
24753         [!weak_alias]: Define __strnlen to strnlen.
24754
24755         * lib/atexit.c: New file, from libiberty.
24756
24757 2000-05-06  Jim Meyering  <meyering@lucent.com>
24758
24759         * lib/closeout.c (close_stdout_status): Also check for errors on the
24760         stderr stream.
24761
24762 2000-05-05  Jim Meyering  <meyering@lucent.com>
24763
24764         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24765         AC_SEARCH_LIBS call for clock_gettime.
24766         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24767
24768         * m4/search-libs.m4: Update from autoconf.
24769
24770         su doesn't work on Solaris 2.6.
24771         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24772         <shadow.h>.  Reported by Dragos Harabor.
24773
24774 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24775
24776         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24777         memcpy instead of xmalloc, xrealloc, path_concat.
24778         (locale_charset): Treat empty environment variables as absent.
24779         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24780
24781 2000-05-04  Jim Meyering  <meyering@lucent.com>
24782
24783         * lib/getopt.c: Update from glibc.
24784         * lib/obstack.c: Likewise.
24785         * lib/obstack.h: Likewise.
24786         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24787         file
24788
24789         * lib/regex.h: Likewise.
24790         * lib/strndup.c: Likewise.
24791         * lib/strnlen.c: New file, from glibc.
24792
24793 2000-05-03  Jim Meyering  <meyering@lucent.com>
24794
24795         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24796
24797 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24798
24799         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24800         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24801         compile-time test, rather than inspecting host and OS, to
24802         decide whether to define _LARGEFILE_SOURCE.
24803
24804 2000-05-01  Jim Meyering  <meyering@lucent.com>
24805
24806         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24807
24808         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24809         Based on a patch from Bruno Haible.
24810
24811 2000-05-01  Jim Meyering  <meyering@lucent.com>
24812
24813         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24814
24815 2000-04-29  Jim Meyering  <meyering@lucent.com>
24816
24817         * lib/path-concat.c: Declare strdup only if it's not defined.
24818         * lib/canon-host.c: Likewise.
24819
24820 2000-04-28  Jim Meyering  <meyering@lucent.com>
24821
24822         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24823         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24824         is included first, then limits.h is included by locale.h by libintl.h.
24825         From John David Anglin.
24826
24827 2000-04-25  Jim Meyering  <meyering@lucent.com>
24828
24829         * lib/makepath.c (S_IRWXUGO): Define.
24830         (make_path): Always perform explicit chmod if MODE specifies any
24831         of the `special' permission bits.  Prompted by a bug report against
24832         install from Mate Wierdl and Joost van Baal.
24833
24834 2000-04-18  Jim Meyering  <meyering@lucent.com>
24835
24836         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
24837         (jm_PREREQ): Use it.
24838
24839 2000-04-18  Jim Meyering  <meyering@lucent.com>
24840
24841         * lib/README: New file.
24842
24843         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
24844         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
24845
24846 2000-04-17  Jim Meyering  <meyering@lucent.com>
24847
24848         Get it right :-)
24849         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
24850         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
24851         Suggestion from Akim Demaille.
24852
24853 2000-04-17  Jim Meyering  <meyering@lucent.com>
24854
24855         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
24856         the definition of it to rpl_strftime also defined-away the system's
24857         declaration.
24858
24859 2000-04-15  Jim Meyering  <meyering@lucent.com>
24860
24861         Use `C' to denote so-called `contiguous' files, the same way
24862         that tar does.
24863         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
24864         (ftypelet): Use S_ISCTG.
24865         From Michael Deutschmann.
24866
24867 2000-04-14  Jim Meyering  <meyering@lucent.com>
24868
24869         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
24870         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
24871         clobbered.
24872
24873 2000-04-14  Jim Meyering  <meyering@lucent.com>
24874
24875         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
24876
24877 2000-04-13  Jim Meyering  <meyering@lucent.com>
24878
24879         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
24880         AH_VERBATIM to insert required #ifndef into config.h.in.
24881         Suggestion from Akim Demaille.
24882
24883 2000-04-12  Jim Meyering  <meyering@lucent.com>
24884
24885         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
24886         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
24887         Christian Krackowizer.
24888
24889         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
24890         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
24891         (AC_SYS_LARGEFILE): Require.
24892         (AM_C_PROTOTYPES): Require.
24893
24894 2000-04-08  Jim Meyering  <meyering@lucent.com>
24895
24896         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
24897         names don't conflict.  Reported by Eli Zaretskii.
24898
24899 2000-04-07  Jim Meyering  <meyering@lucent.com>
24900
24901         * lib/putenv.c: Move inclusion of errno.h so it follows that of
24902         sys/types.h, to work around system header problems on AIX 3.2.5.
24903         From Bruno Haible.
24904
24905 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
24906
24907         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
24908         bug.  Deal with the different error behavior of Irix iconv.
24909
24910 2000-04-05  Paul Eggert  <eggert@twinsun.com>
24911
24912         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
24913         IRIX if the installer said otherwise.
24914
24915 2000-04-05  Jim Meyering  <meyering@lucent.com>
24916
24917         Portability tweaks required for ultrix4.3.
24918         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
24919         (jm_CHECK_DECLS): Add getutent to the list of functions.
24920         (_jm_DECL_HEADERS): Add utmpx.h.
24921         From John David Anglin.
24922
24923         * m4/strftime.m4: Back out the 2000-04-02 change.
24924         Instead of that change, simply undefine putenv in the test program.
24925
24926 2000-04-05  Jim Meyering  <meyering@lucent.com>
24927
24928         Portability tweaks required for ultrix4.3.
24929         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
24930         getutent.
24931         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
24932         * lib/canon-host.c: Declare strdup.
24933         * lib/path-concat.c: Likewise.
24934         From John David Anglin.
24935
24936 2000-04-04  Jim Meyering  <meyering@lucent.com>
24937
24938         Be more DOS 8.3-friendly.
24939         * lib/ref-add.sin: Renamed from ref-add.sed.in.
24940         * lib/ref-del.sin: Renamed from ref-del.sed.in.
24941         * lib/Makefile.am: Reflect renaming.
24942         Reported by Eli Zaretskii.
24943
24944         Use a temporary file name that won't clash with `charset.alias'
24945         in the DOS 8.3 name space.
24946         * lib/Makefile.am (charset_tmp): Define.
24947         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
24948         (uninstall-local): Likewise.
24949         Reported by Eli Zaretskii.
24950
24951 2000-04-03  Jim Meyering  <meyering@lucent.com>
24952
24953         * m4/gettext.m4: Fix typo in comment.
24954
24955         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
24956         textutils/configure.in).  Suggestion from Paul Eggert.
24957         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
24958
24959 2000-04-02  Paul Eggert  <eggert@twinsun.com>
24960
24961         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
24962         variable in the shell rather than using putenv, which isn't
24963         portable.  This avoids the configure-time inter-test dependency
24964         on the potentially-renamed putenv function.
24965
24966 2000-03-30  Paul Eggert  <eggert@twinsun.com>
24967
24968         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
24969         before checking struct stat.st_blksize, so that
24970         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
24971
24972 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24973
24974         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
24975         since strftime.c uses HAVE_STRFTIME to decide whether to use
24976         the underlying strftime.
24977
24978 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24979
24980         * lib/time/strftime.c (my_strftime): Make sure we call the system
24981         strftime, not ourselves, when invoking the underlying strftime.
24982
24983 2000-03-24  Jim Meyering  <meyering@lucent.com>
24984
24985         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
24986         (charset_alias): Define.
24987         (install-exec-local): Factor out common code.
24988         (uninstall-local): Split lines longer than 80.
24989         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
24990         (SUFFIXES): Define.
24991         (.sed.in.sed): New rule.  Don't redirect directly to $@.
24992         (CLEANFILES): Add ref-add.sed and ref-del.sed.
24993
24994 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
24995
24996         * lib/config.charset: Output a line containing "Packages using this
24997         file".
24998         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
24999         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
25000         ref-del.sed): New rules.
25001
25002 2000-03-17  Jim Meyering  <meyering@lucent.com>
25003
25004         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
25005         Otherwise, include <strings.h>
25006
25007 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
25008
25009         * lib/unicodeio.c (utf8_wctomb): New function.
25010         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
25011         format instead of in UCS-4 with platform dependent endianness.
25012
25013 2000-03-10  Jim Meyering  <meyering@lucent.com>
25014
25015         * m4/lib-check.m4: Look for getspnam in -lgen, too.
25016         From Marco Franzen.
25017
25018 2000-03-07  Paul Eggert  <eggert@twinsun.com>
25019
25020         * lib/savedir.c (savedir): Work even if directory size is
25021         negative; this can happen with some screwy NFS configurations.
25022
25023 2000-03-06  Jim Meyering  <meyering@lucent.com>
25024
25025         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
25026         if it's NULL (because we ran out of memory).  From Bruno Haible.
25027
25028 2000-03-05  Jim Meyering  <meyering@lucent.com>
25029
25030         * lib/localcharset.c ("path-concat.h"): Include.
25031         (get_charset_aliases): Use path_concat instead of ANSI string
25032         concatenation.
25033
25034         * lib/unicodeio.h (PARAMS): Define.
25035         Use it to guard prototype.
25036
25037 2000-03-04  Jim Meyering  <meyering@lucent.com>
25038
25039         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
25040         for lib/localcharset.c.
25041
25042 2000-03-04  Jim Meyering  <meyering@lucent.com>
25043
25044         * lib/Makefile.am (install-exec-local): Create $(libdir) before
25045         installing into it.
25046         (uninstall-local): Uncomment this rule so `make distcheck' works
25047         once again.
25048
25049         * lib/unicodeio.c (<errno.h>): Include it.
25050         (errno): Declare if not defined.
25051
25052         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
25053
25054         * lib/config.charset: New version, incorporating remarks from a linux
25055         i18n mailing list.  From Bruno Haible.
25056
25057 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
25058
25059         * m4/codeset.m4: New file.
25060         * m4/iconv.m4: New file.
25061         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
25062
25063 2000-03-03  Jim Meyering  <meyering@lucent.com>
25064
25065         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
25066
25067 2000-03-02  Jim Meyering  <meyering@lucent.com>
25068
25069         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
25070         the messages come out on separate lines.
25071
25072         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
25073         rather than jm_CHECK_DECLARATIONS.
25074         * m4/decl.m4: Remove now-unused file.
25075
25076         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25077         geteuid.
25078
25079 2000-03-02  Jim Meyering  <meyering@lucent.com>
25080
25081         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25082
25083 2000-03-01  Jim Meyering  <meyering@lucent.com>
25084
25085         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25086         * lib/unicodeio.c: Likewise.
25087
25088 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25089
25090         * lib/config.charset: New file.
25091         * lib/localcharset.c: New file.
25092         * lib/unicodeio.h, lib/unicodeio.c: New files.
25093         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25094         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25095         (noinst_HEADERS): Add unicodeio.h.
25096         (all-local, install-exec-local, charset.alias): New targets.
25097
25098 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25099
25100         * lib/quotearg.c (ALERT_CHAR): New macro.
25101         (quotearg_buffer_restyled): Use it.
25102
25103 2000-02-27  Jim Meyering  <meyering@lucent.com>
25104
25105         * m4/check-decl.m4: Add getenv to the list.
25106
25107 2000-02-27  Jim Meyering  <meyering@lucent.com>
25108
25109         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25110         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25111
25112         * lib/backupfile.c: Guard inclusion of stdlib.h with
25113         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25114         Declare malloc if needed.
25115
25116         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
25117         `#ifndef HAVE_DECL..'
25118         now that autoconf always defines the HAVE_DECL_ symbols.
25119         * lib/human.c: Likewise.
25120         * lib/same.c: Likewise.
25121         * lib/strtoumax.c: Likewise.
25122
25123         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
25124         declaration check was not run.
25125         * lib/hash.c: Likewise.
25126         * lib/human.c: Likewise.
25127         * lib/same.c: Likewise.
25128         * lib/strtoumax.c: Likewise.
25129
25130         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
25131         `.', then first look up the entire `.'-containing string as a login
25132         name.
25133
25134 2000-02-23  Jim Meyering  <meyering@lucent.com>
25135
25136         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
25137         in place of my hack.
25138
25139 2000-02-18  Paul Eggert  <eggert@twinsun.com>
25140
25141         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
25142         (textint): New typedef.
25143         (parser_control): Member year changed from int to textint.
25144         All uses changed.
25145         (YYSTYPE): Removed; replaced by %union with int and textint members.
25146         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
25147         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
25148         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
25149         (tSNUMBER, tUNUMBER): Now of type <textintval>.
25150         (date, number, to_year): Use width of number in digits, not its value,
25151         to determine whether it's a 2-digit year, or a 2-digit time.
25152         (yylex): Store number of digits of numeric tokens.
25153         Reported by John Kendall.
25154
25155         (parser_control): Changed from struct parser_control to typedef (for
25156         consistency).  All uses changed.
25157
25158         (tID): Removed; not used.
25159         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
25160
25161 2000-02-14  Paul Eggert  <eggert@twinsun.com>
25162
25163         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
25164         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
25165
25166 2000-02-12  Jim Meyering  <meyering@lucent.com>
25167
25168         * lib/userspec.c (ISDIGIT): Define it.
25169         (isdigit): Remove definition.
25170         (is_number): Use ISDIGIT, not isdigit.
25171         <libintl.h>: Include.
25172         (_ and N_): Define.
25173         (parse_user_spec): Mark translatable strings.
25174
25175 2000-02-10  Jim Meyering  <meyering@lucent.com>
25176
25177         With these changes, nanosleep.[ch] are finally enough like the other
25178         lib/* replacement files to compile on a few more losing systems.
25179
25180         * lib/nanosleep.h: Don't include config.h.
25181         Remove prototype from declaration of nanosleep.
25182         (PARAMS): Remove now-unneeded definition.
25183         * lib/nanosleep.c: #undef nanosleep.
25184         (rpl_nanosleep): Rename from nanosleep.
25185
25186 2000-02-10  Jim Meyering  <meyering@lucent.com>
25187
25188         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
25189         gnu_nanosleep to rpl_nanosleep.
25190
25191 2000-02-09  Jim Meyering  <meyering@lucent.com>
25192
25193         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
25194         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
25195
25196 2000-02-08  Akim Demaille  <akim@epita.fr>
25197
25198         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
25199         `[' and `]' and remove uses of `changequote'.
25200         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
25201         (AC_SYS_LARGEFILE): Likewise.
25202         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
25203         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
25204         of changequote.
25205         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
25206         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
25207         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
25208         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
25209
25210 2000-02-05  Jim Meyering  <meyering@lucent.com>
25211
25212         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
25213         Remove explicit use of AC_HEADER_TIME.  It is required by
25214         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
25215         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
25216         in autoconf whereby the expansion of the latter ended up preceding
25217         the expansion of its prerequisite, AC_HEADER_TIME.
25218         Reported by Volker Borchert.
25219
25220 2000-02-03  Jim Meyering  <meyering@lucent.com>
25221
25222         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
25223
25224 2000-02-03  Jim Meyering  <meyering@lucent.com>
25225
25226         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
25227         rather than with `#if HAVE_UTMPNAME'.
25228
25229 2000-02-02  Jim Meyering  <meyering@lucent.com>
25230
25231         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
25232         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
25233         Reported by Eli Zaretskii.
25234
25235 2000-02-01  Jim Meyering  <meyering@lucent.com>
25236
25237         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
25238
25239 2000-01-31  Jim Meyering  <meyering@lucent.com>
25240
25241         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
25242         functions.  Add the time.h and sys/time.h headers along with the
25243         AC_REQUIRE'ment of AC_HEADER_TIME.
25244
25245 2000-01-31  Jim Meyering  <meyering@lucent.com>
25246
25247         * lib/nanosleep.h (nanosleep): Guard declaration with
25248         `#if ! HAVE_DECL_NANOSLEEP'.
25249         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
25250         the declaration in that vendor's sys/timers.h.
25251         Reported by Christian Krackowizer.
25252
25253         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
25254         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
25255         (ISPRINT): Likewise.
25256         Reported by Tom Tromey.
25257
25258 2000-01-30  Jim Meyering  <meyering@lucent.com>
25259
25260         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
25261
25262         * m4/prereq.m4 (utmp_includes): Define.
25263         Check for ut_user and ut_name members in both struct utmpx
25264         and struct utmp.
25265
25266 2000-01-30  Jim Meyering  <meyering@lucent.com>
25267
25268         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
25269         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
25270         header files where only utmpx.ut_user is declared.
25271
25272         * lib/readutmp.h (UT_USER): Define.
25273
25274 2000-01-29  Jim Meyering  <meyering@lucent.com>
25275
25276         * m4/lib-check.m4: New file containing library-related checks from
25277         fileutils and sh-utils (textutils had none).
25278
25279 2000-01-28  Jim Meyering  <meyering@lucent.com>
25280
25281         * m4/perl.m4: Change format of warning message to look more like that
25282         from the missing script.  Suggestion from François Pinard.
25283
25284 2000-01-25  Jim Meyering  <meyering@lucent.com>
25285
25286         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
25287         well as time.h in the compile check.
25288         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
25289         Fix typo in cross-compiling case: s/yes/no/.
25290
25291 2000-01-23  Jim Meyering  <meyering@lucent.com>
25292
25293         * m4/jm-macros.m4: Move df-related tests here from
25294         fileutils/configure.in
25295
25296         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
25297         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
25298
25299         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
25300         s/space/ac_fsusage_space/.
25301         (jm_FILE_SYSTEM_USAGE): Take two parameters.
25302
25303         * m4/ftruncate.m4: New file (derived from part of
25304         fileutils/configure.in).
25305         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
25306         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
25307
25308         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
25309         AC_SUBST these here, rather than just in sh-util/configure.in, so
25310         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
25311         all the same.
25312         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
25313         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
25314         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
25315         (AC_SUBST(POW_LIBM)): Likewise.
25316         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
25317
25318 2000-01-23  Jim Meyering  <meyering@lucent.com>
25319
25320         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
25321         obstack.c.
25322
25323 2000-01-22  Jim Meyering  <meyering@lucent.com>
25324
25325         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
25326
25327         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
25328
25329         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
25330         configure.in
25331         (AC_CHECK_HEADERS): Likewise for sh-utils.
25332         (AC_CHECK_HEADERS): Likewise for textutils.
25333         Merge the three lists of headers.
25334
25335         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
25336         from fileutils' configure.in.
25337
25338         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
25339         code. Moved tests into their own function (_jm_DECL_HEADERS) in
25340         check-decl.m4.
25341
25342         * m4/check-decl.m4: Use #if rather than #ifdef.
25343         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
25344         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
25345         (_jm_DECL_HEADERS): Define new function.
25346         (jm_CHECK_DECLARATIONS): Require it.
25347
25348 2000-01-22  Jim Meyering  <meyering@lucent.com>
25349
25350         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25351         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25352         Required for some AIX systems.  Reported by Christian Krackowizer.
25353         [TESTING] (main): New function.
25354
25355         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25356         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25357         letters.
25358
25359         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25360         iswprint.
25361
25362         * lib/strverscmp.c (ISDIGIT): Define.
25363         (strverscmp): Use ISDIGIT, not isdigit.
25364
25365 2000-01-19  Jim Meyering  <meyering@lucent.com>
25366
25367         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25368         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25369         defines `struct timespec' in <sys/time.h>
25370
25371         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25372         Thanks to Akim for explaining.
25373
25374 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25375
25376         * lib/nanosleep.c (nanosleep):
25377         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25378         POSIX.1 doesn't require SA_INTERRUPT and some systems
25379         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25380         it's been part of POSIX.1 since day 1 (in 1988).
25381
25382 2000-01-17  Jim Meyering  <meyering@lucent.com>
25383
25384         * lib/interlock: Remove unused file.  Reported by François Pinard.
25385
25386 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25387
25388         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25389         alert, backslash, formfeed, and vertical tab unnecessarily in
25390         shell quoting style.
25391
25392 2000-01-16  Jim Meyering  <meyering@lucent.com>
25393
25394         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25395         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25396         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25397         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25398
25399 2000-01-16  Jim Meyering  <meyering@lucent.com>
25400
25401         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25402         because the latter didn't work.
25403
25404 2000-01-15  Jim Meyering  <meyering@lucent.com>
25405
25406         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25407         (AC_REPLACE_FUNCS): Add memcpy and memset.
25408         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25409         Add strpbrk.
25410         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25411
25412 2000-01-12  Jim Meyering  <meyering@lucent.com>
25413
25414         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25415         (jm_PREREQ): Use it.
25416         (jm_PREREQ_READUTMP): New macro.
25417         (jm_PREREQ): Use it.
25418
25419 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25420
25421         Quote multibyte characters correctly.
25422         * m4/c-bs-a.m4: New file.
25423         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25424         (jm_PREREQ): Use it.
25425
25426 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25427
25428         * m4/uintmax_t.m4: Port to autoconf 2.13.
25429
25430 2000-01-08  Jim Meyering  <meyering@ascend.com>
25431
25432         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25433         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25434
25435 2000-01-04  Jim Meyering  <meyering@ascend.com>
25436
25437         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25438         jm_STRUCT_DIRENT_D_TYPE.
25439         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25440         jm_STRUCT_DIRENT_D_INO.
25441         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25442         jm_STRUCT_UTIMBUF.
25443         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25444         renamings.
25445         * m4/utime.m4: Likewise.
25446
25447         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25448         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25449
25450 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25451
25452         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25453         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25454
25455 2000-01-02  Jim Meyering  <meyering@ascend.com>
25456
25457         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25458         remember if this is necessary.
25459
25460 1999-12-26  Jim Meyering  <meyering@ascend.com>
25461
25462         * m4/jm-macros.m4: Use it here.
25463         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25464
25465 1999-12-23  Jim Meyering  <meyering@ascend.com>
25466
25467         * m4/jm-macros.m4: Check for clock_gettime (moved from
25468         fileutils/configure.in)
25469         Check for gettimeofday.
25470
25471 1999-12-20  Jim Meyering  <meyering@ascend.com>
25472
25473         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25474         autoconf-2.14a-1999-12-20.
25475
25476 1999-12-19  Jim Meyering  <meyering@ascend.com>
25477
25478         * m4/lstat-slash.m4: New file.
25479         * m4/jm-macros.m4: Use the new macro:
25480         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25481
25482 1999-12-07  Jim Meyering  <meyering@ascend.com>
25483
25484         * m4/perl.m4: Require that File::Compare be available, too.
25485         Too many systems seem to lack it.
25486
25487         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25488         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25489
25490 1999-11-18  Paul Eggert  <eggert@twinsun.com>
25491
25492         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
25493         problem with the QNX 4.25 shell, which doesn't propagate exit
25494         status of failed commands inside shell assignments.
25495
25496 1999-11-17  Jim Meyering  <meyering@ascend.com>
25497
25498         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25499
25500 1999-11-07  Jim Meyering  <meyering@ascend.com>
25501
25502         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25503
25504 1999-11-06  Jim Meyering  <meyering@ascend.com>
25505
25506         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25507         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25508
25509 1999-11-05  Jim Meyering  <meyering@ascend.com>
25510
25511         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25512         configure.in of textutils, fileutils, and sh-utils into this one
25513         (shared between those packages) file.
25514         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
25515         AC_STRUCT_ST_BLKSIZE.
25516
25517 1999-11-03  Jim Meyering  <meyering@ascend.com>
25518
25519         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
25520         of AC_CHECK_TYPE checks includes unistd.h.
25521         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
25522         Suggestion from Akim Demaille.
25523
25524 1999-10-30  Jim Meyering  <meyering@ascend.com>
25525
25526         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
25527         m4-quoted string.
25528         * m4/ls-mntd-fs.m4: Likewise.
25529         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
25530         * m4/jm-winsz1.m4: Likewise.
25531
25532         * m4/const.m4: Remove file, since the fix made it into the experimental
25533         version of autoconf.
25534         * m4/mktime.m4: Likewise.
25535
25536         * m4/check-type.m4: Remove file, now that the latest version of
25537         AC_CHECK_TYPE takes a third arg to specify additional #includes.
25538
25539         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
25540         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
25541         AC_CHECK_TYPE.
25542
25543 1999-10-04  Jim Meyering  <meyering@ascend.com>
25544
25545         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
25546
25547 1999-09-22  Paul Eggert  <eggert@twinsun.com>
25548
25549         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
25550         2.95.1 bug with HP-UX 10.20.
25551
25552 1999-09-17  Jim Meyering  <meyering@ascend.com>
25553
25554         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
25555         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
25556         due to missing strdup (against sh-utils-2.0).
25557
25558 1999-08-29  Jim Meyering  <meyering@ascend.com>
25559
25560         * m4/jm-macros.m4: Require jm_BISON.
25561         * m4/bison.m4: New file.
25562
25563 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25564
25565         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25566         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25567
25568 1999-08-05  Jim Meyering  <meyering@ascend.com>
25569
25570         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25571         to avoid conflicts with `conftest' on 8+3 filesystems.
25572         Suggestion from Eli Zaretskii.
25573
25574 1999-08-04  Jim Meyering  <meyering@ascend.com>
25575
25576         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25577         fileutils and sh-utils (textutils's getline test was inadequate).
25578         (AM_FUNC_GETLINE): Run this test.
25579         (AC_CHECK_FUNCS): Check for getdelim.
25580         Reported by Bob Proulx.
25581
25582 1999-08-02  Jim Meyering  <meyering@ascend.com>
25583
25584         * m4/jm-macros.m4: Add a comment.
25585
25586 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25587
25588         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25589         <inttypes.h> defines strtoumax as a macro (and not as a
25590         function).
25591
25592 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25593
25594         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25595         that we can shift, multiply and divide unsigned long long
25596         values; Ultrix cc can't do it.
25597
25598 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25599
25600         * m4/mktime.m4: New file, which is a preview of what should appear
25601         in the next public autoconf release.
25602
25603 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25604
25605         * m4/lfs.m4: Remove this file.
25606         * m4/largefile.m4: New file.  It contains the old contents of
25607         lfs.m4, except that all names with prefix AC_LFS have been
25608         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25609         compatible with future autoconf versions.  Also, some minor m4
25610         quoting problems have been fixed.
25611
25612 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25613
25614         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25615         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25616         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25617         and simplify the shell code.
25618
25619 1999-08-01  Jim Meyering  <meyering@ascend.com>
25620
25621         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25622         m4.
25623
25624 1999-07-20  Jim Meyering  <meyering@ascend.com>
25625
25626         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25627
25628 1999-07-15  Jim Meyering  <meyering@ascend.com>
25629
25630         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25631
25632 1999-05-22  Jim Meyering  <meyering@ascend.com>
25633
25634         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25635
25636 1999-05-20  Jim Meyering  <meyering@ascend.com>
25637
25638         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25639         Add a colon after each `then' in case $4 is empty.
25640
25641 1999-05-16  Jim Meyering  <meyering@ascend.com>
25642
25643         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25644
25645 1999-05-10  Jim Meyering  <meyering@ascend.com>
25646
25647         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25648
25649         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25650         AC_FUNC_MKTIME.
25651
25652 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25653
25654         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25655
25656 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25657
25658         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25659         not CPPFLAGS, so that linking works correctly in IRIX.
25660
25661 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25662
25663         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25664
25665 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25666
25667         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25668         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25669         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25670         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25671         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25672
25673         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25674
25675 1999-04-20  Jim Meyering  <meyering@ascend.com>
25676
25677         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25678         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25679         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25680
25681 1999-04-18  Jim Meyering  <meyering@ascend.com>
25682
25683         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25684         * m4/jm-macros.m4: Use it.
25685
25686 1999-04-06  Jim Meyering  <meyering@ascend.com>
25687
25688         * m4/strftime.m4: Remove test for %f.
25689
25690 1999-03-29  Jim Meyering  <meyering@ascend.com>
25691
25692         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25693         superset of the AC_TYPE_* checks in the textutils, fileutils,
25694         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25695         AC_TYPE_PID_T.
25696
25697 1999-03-28  Jim Meyering  <meyering@ascend.com>
25698
25699         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25700         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25701         replaced e.g., in the *.sh files of the sh-utils.
25702
25703 1999-03-20  Jim Meyering  <meyering@ascend.com>
25704
25705         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25706         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25707         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25708
25709 1999-03-19  Jim Meyering  <meyering@ascend.com>
25710
25711         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25712
25713 1999-03-12  Jim Meyering  <meyering@ascend.com>
25714
25715         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25716
25717 1999-03-07  Jim Meyering  <meyering@ascend.com>
25718
25719         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25720         declared.
25721
25722 1999-02-17  Jim Meyering  <meyering@ascend.com>
25723
25724         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25725         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25726
25727 1999-02-07  Jim Meyering  <meyering@ascend.com>
25728
25729         * m4/group-member.m4: New file -- extracted from sh-utils'
25730         configure.in.
25731
25732         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25733         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25734
25735 1999-02-06  Jim Meyering  <meyering@ascend.com>
25736
25737         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25738         * m4/fnmatch.m4: Likewise.
25739         * m4/getgroups.m4: Likewise.
25740         * m4/lstat.m4: Likewise.
25741         * m4/malloc.m4: Likewise.
25742         * m4/putenv.m4: Likewise.
25743         * m4/realloc.m4: Likewise.
25744         * m4/regex.m4: Likewise.
25745         * m4/stat.m4: Likewise.
25746         * m4/strftime.m4: Likewise.
25747         Suggestion from Alain Magloire.
25748
25749         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25750         * m4/fnmatch.m4: Likewise.
25751         * m4/getgroups.m4: Likewise.
25752         * m4/getline.m4: Likewise.
25753         * m4/lstat.m4: Likewise.
25754         * m4/malloc.m4: Likewise.
25755         * m4/memcmp.m4: Likewise.
25756         * m4/putenv.m4: Likewise.
25757         * m4/realloc.m4: Likewise.
25758         * m4/regex.m4: Likewise.
25759         * m4/stat.m4: Likewise.
25760         * m4/strftime.m4: Likewise.
25761         Suggestion from Alain Magloire.
25762
25763         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25764         an argument.
25765
25766         * m4/regex.m4: Add a run-time Test for proper operation of
25767         re_compile_pattern.
25768
25769 1999-01-31  Jim Meyering  <meyering@ascend.com>
25770
25771         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25772
25773 1999-01-30  Jim Meyering  <meyering@ascend.com>
25774
25775         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25776
25777         * m4/jm-mktime.m4: Make this a wrapper around the official
25778         AM_FUNC_MKTIME rather than my private copy, now that the official one
25779         is up to date.
25780         * m4/mktime.m4: Remove file.
25781
25782         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25783         * m4/uptime.m4: Likewise.
25784         * m4/uintmax_t.m4: Likewise.
25785
25786 1999-01-28  Jim Meyering  <meyering@ascend.com>
25787
25788         * m4/jm-macros.m4: Use jm_AFS.
25789         * m4/afs.m4: New file (from fileutils' configure.in).
25790
25791         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25792         * m4/chown.m4: Likewise.
25793         * m4/d-ino.m4: Likewise.
25794         * m4/d-type.m4: Likewise.
25795         * m4/fnmatch.m4: Likewise.
25796         * m4/getgroups.m4: Likewise.
25797         * m4/gettext.m4: Likewise.
25798         * m4/jm-mktime.m4: Likewise.
25799         * m4/jm-winsz2.m4: Likewise.
25800         * m4/lcmessage.m4: Likewise.
25801         * m4/ls-mntd-fs.m4: Likewise.
25802         * m4/malloc.m4: Likewise.
25803         * m4/memcmp.m4: Likewise.
25804         * m4/putenv.m4: Likewise.
25805         * m4/realloc.m4: Likewise.
25806         * m4/st_mtim.m4: Likewise.
25807         * m4/strftime.m4: Likewise.
25808
25809 1999-01-16  Jim Meyering  <meyering@ascend.com>
25810
25811         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25812         (ARGMATCH_DIE_DECL): Define.
25813
25814 1999-01-12  Jim Meyering  <meyering@ascend.com>
25815
25816         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25817         Reported by Lars Hecking.
25818
25819 1999-01-10  Jim Meyering  <meyering@ascend.com>
25820
25821         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25822         gross kludge.
25823         * m4/inttypes_h.m4: Likewise.
25824         * m4/lstat.m4: Likewise.
25825         * m4/malloc.m4: Likewise.
25826         * m4/readdir.m4: Likewise.
25827         * m4/realloc.m4: Likewise.
25828         * m4/st_dm_mode.m4: Likewise.
25829         * m4/stat.m4: Likewise.
25830         * m4/utimbuf.m4: Likewise.
25831         * m4/utimes.m4: Likewise.
25832
25833         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
25834         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
25835         comments in config.h.in are meaningful.
25836
25837         * m4/jm-macros.m4: Require autoconf-2.13 here.
25838
25839         * m4/regex.m4: By default, don't use the included regex.c on systems
25840         with glibc 2.  Suggestion from Uli Drepper.
25841
25842 1999-01-02  Jim Meyering  <meyering@ascend.com>
25843
25844         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
25845
25846 1998-12-18  Jim Meyering  <meyering@ascend.com>
25847
25848         * m4/Makefile.am.in (Makefile.am): Simplify rule.
25849         Based on a suggestion from Lars Hecking.
25850
25851 1998-11-16  Paul Eggert  <eggert@twinsun.com>
25852
25853         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
25854
25855 1998-11-16  Jim Meyering  <meyering@ascend.com>
25856
25857         * m4/lfs.m4: Double-quote the `uname...` expression.
25858
25859 1998-11-14  Jim Meyering  <meyering@ascend.com>
25860
25861         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
25862         * m4/stat.m4: Likewise.
25863
25864 1998-11-03  Jim Meyering  <meyering@ascend.com>
25865
25866         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
25867         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
25868
25869 1998-10-18  Jim Meyering  <meyering@ascend.com>
25870
25871         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
25872
25873 1998-10-17  Jim Meyering  <meyering@ascend.com>
25874
25875         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
25876         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
25877         calls for those previously hard-coded headers.  Instead, take a new
25878         parameter.
25879         (jm_CHECK_DECLARATIONS): Reflect interface change.
25880         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
25881         (jm_CHECK_DECL_LOCALTIME_R): New macro.
25882
25883         * m4/mktime.m4: Test for spring-forward gap before long-running test.
25884
25885 1998-10-14  Jim Meyering  <meyering@ascend.com>
25886
25887         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
25888         instead of "TZ=America/Vancouver".  From Paul Eggert.
25889
25890 1998-10-11  Jim Meyering  <meyering@ascend.com>
25891
25892         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
25893         This adds a test for a recently added compatibility fix for mktime.c.
25894         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
25895
25896 1998-09-27  Jim Meyering  <meyering@ascend.com>
25897
25898         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
25899
25900         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
25901         ../configure.in, including a change from Gordon Matzigkeit to allow
25902         cross-compiling for the Hurd.
25903
25904         * m4/glibc.m4: New file/macro to test for the GNU C Library
25905         versions 1 and 2.  From Gordon Matzigkeit.
25906         Indent.
25907
25908 1998-09-21  Jim Meyering  <meyering@ascend.com>
25909
25910         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
25911
25912 1998-08-18  Paul Eggert  <eggert@twinsun.com>
25913
25914         Port nanosecond-resolution times to UnixWare 2.1.2 and
25915         pedantic Solaris 2.6.
25916
25917         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
25918         AC_STRUCT_ST_MTIM.
25919         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
25920         Generate name of ns member, instead of just 1 or undef.
25921         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
25922
25923 1998-08-15  Jim Meyering  <meyering@ascend.com>
25924
25925         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
25926         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
25927         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
25928         instead of jm_TYPE_SSIZE_T.
25929
25930 1998-08-12  Jim Meyering  <meyering@ascend.com>
25931
25932         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
25933
25934 1998-08-02  Jim Meyering  <meyering@ascend.com>
25935
25936         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
25937         in acconfig.h manually.
25938
25939 1998-07-31  Paul Eggert  <eggert@twinsun.com>
25940
25941         * m4/st_mtim.m4: New file.
25942
25943 1998-07-28  Jim Meyering  <meyering@ascend.com>
25944
25945         * m4/utimes.m4: Undef stat.
25946
25947 1998-07-25  Jim Meyering  <meyering@ascend.com>
25948
25949         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
25950         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
25951
25952 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
25953
25954         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
25955         uid and gid actually remain unchanged.
25956
25957 1998-07-07  Jim Meyering  <meyering@ascend.com>
25958
25959         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
25960
25961 1998-07-04  Jim Meyering  <meyering@ascend.com>
25962
25963         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
25964         to prove that this macro can be used in packages without regex.c.
25965
25966 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
25967
25968         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
25969         is to be used.
25970
25971 1998-07-03  Jim Meyering  <meyering@ascend.com>
25972
25973         * m4/gettext.m4: Add -lintl if it's found to be necessary.
25974
25975         * m4/gettext.m4: New file -- from gettext-0.10.35.
25976         * m4/lcmessage.m4: Likewise.
25977         * m4/progtest.m4: Likewise.
25978
25979         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
25980         * m4/jm-macros.m4: Require the new macro.
25981
25982 1998-06-29  Jim Meyering  <meyering@ascend.com>
25983
25984         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
25985         for the definition of NGROUPS (used in a system header included
25986         by sys/mount.h).
25987
25988 1998-06-28  Jim Meyering  <meyering@ascend.com>
25989
25990         * m4/ls-mntd-fs.m4: New file.
25991         * m4/fstypename.m4: New file.
25992
25993         * m4/jm-macros.m4: Require the new macro.
25994         * m4/jm-glibc-io.m4: New file.
25995
25996 1998-05-19  Jim Meyering  <meyering@ascend.com>
25997
25998         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
25999         * m4/lchown.m4: New file.
26000
26001         * m4/Makefile.am.in: New file.
26002         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
26003
26004 1998-05-14  Jim Meyering  <meyering@ascend.com>
26005
26006         * m4/Makefile.am (EXTRA_DIST): Add them.
26007         * m4/jm-macros.m4: New file.
26008         * m4/utimbuf.m4: New file.
26009
26010 1998-05-12  Jim Meyering  <meyering@ascend.com>
26011
26012         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
26013
26014 1998-05-11  Jim Meyering  <meyering@ascend.com>
26015
26016         * m4/isc-posix.m4: New file.
26017
26018 1998-05-10  Jim Meyering  <meyering@ascend.com>
26019
26020         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
26021
26022 1998-05-09  Jim Meyering  <meyering@ascend.com>
26023
26024         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
26025         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
26026         with automake.
26027
26028         * m4/ssize_t.m4: New file.
26029         * m4/mktime.m4: Remove file -- the new automake has this now.
26030
26031 1998-04-26  Jim Meyering  <meyering@ascend.com>
26032
26033         * m4/assert.m4: New file.
26034         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
26035
26036 1998-04-05  Jim Meyering  <meyering@ascend.com>
26037
26038         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
26039         (jm_PREREQ): Use it here.
26040
26041 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
26042
26043         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
26044         in acconfig.h.
26045
26046 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
26047
26048         * m4/prereq.m4: New file.
26049         * m4/error.m4: New file.
26050         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
26051
26052 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
26053
26054         * m4/getline.m4: Don't set am_cv_func_working_getline before the
26055         cache-check for the same variable -- that defeated the purpose of
26056         the test; the test program was never run.  This was a problem only
26057         on systems with losing getline functions -- HP-UX 10.20 is one.
26058         Reported by Bjorn Helgaas.
26059
26060 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
26061
26062         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
26063
26064 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
26065
26066         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
26067
26068         * m4/const.m4: New file.  Use an initializer in this declaration
26069         typedef int charset[2]; const charset x;
26070         Reported by Bob Glickstein.
26071
26072 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
26073
26074         * m4/chown.m4: Fix reversed types on -1 args to chown.
26075         From Kaveh Ghazi.
26076
26077 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26078
26079         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26080         Add lseek and memchr.
26081
26082         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26083         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26084         have a 20-character limit on names.
26085
26086 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26087
26088         * m4/inttypes_h.m4: New file.
26089         * m4/uintmax_t.m4: New file.
26090         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26091
26092 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26093   Free Software Foundation, Inc.
26094 Copying and distribution of this file, with or without modification,
26095 are permitted provided the copyright notice and this notice are preserved.